Commit 054cccd
committed
Fix error reporting when config_nfglevels is insufficiently large
In init_atmosphere, during the interpolation of first-guess meteorological
fields from the intermediate files (config_init_case = 7 or 9), the value of
config_nfglevels must be set to a minimum of the number of vertical levels in
the intermediate file. Currently, the routines init_atm_case_gfs and
init_atm_case_lbc have a logic to throw an error and exit if config_nfglevels
is not sufficiently large. In practice, this error message is not reported
consistently with intermediate files containing many levels and/or many MPI
ranks being used.
This commit fixes the inconsistent error reporting issue by adding the required
deallocate statements before the repeated calls to read_next_met_field in the
case of config_nfglevels being insufficiently large. Without the deallocate,
one or more MPI ranks crash during the read of the field % slab from the
intermediate file. This typically results in a crash of init_atmosphere without
any useful error messages in the log files.1 parent 1d6ec7c commit 054cccd
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3547 | 3547 | | |
3548 | 3548 | | |
3549 | 3549 | | |
| 3550 | + | |
3550 | 3551 | | |
3551 | 3552 | | |
3552 | 3553 | | |
| |||
5283 | 5284 | | |
5284 | 5285 | | |
5285 | 5286 | | |
| 5287 | + | |
5286 | 5288 | | |
5287 | 5289 | | |
5288 | 5290 | | |
| |||
0 commit comments