From 640428b7038388026f2a3a645e62de258a8834b7 Mon Sep 17 00:00:00 2001 From: LarissaReames-NOAA Date: Wed, 18 Nov 2020 22:43:43 +0000 Subject: [PATCH] Add in a sanity check to fail if variable mapping file is empty or improperly formatted such that the code finds no variable entries to read. Addresses Issue #228 --- sorc/chgres_cube.fd/program_setup.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/chgres_cube.fd/program_setup.f90 b/sorc/chgres_cube.fd/program_setup.f90 index fbae1ba28..0b1fef5cc 100644 --- a/sorc/chgres_cube.fd/program_setup.f90 +++ b/sorc/chgres_cube.fd/program_setup.f90 @@ -444,7 +444,7 @@ subroutine read_varmap if ( trim(line) .eq. '' ) cycle nvars = nvars+1 enddo - + if ( nvars == 0) call error_handler("VARMAP FILE IS EMPTY.", -1) allocate(chgres_var_names(nvars)) allocate(field_var_names(nvars))