geoschem / GCHP

The "superproject" wrapper repository for GCHP, the high-performance instance of the GEOS-Chem chemical-transport model.
https://gchp.readthedocs.io
Other
21 stars 25 forks source link

[FEATURE REQUEST] Improving cryptic error messages in GCHP #234

Closed lizziel closed 3 months ago

lizziel commented 2 years ago

Discussed in https://github.com/geoschem/GCHP/discussions/143

Originally posted by **LiamBindle** May 19, 2021 This is a loose list of the GCHP errors that could have better error messages. Feel free to add any crypric errors you encounter here, and I'll try my best to improve the error messages.
lizziel commented 2 years ago

We are moving from GitHub Discussions to GitHub Issues. I am going to delete the original discussion, but the history is here:

@LiamBindle:

  • Missing metfields
  • Missing L/R-bracketing files
  • Blank config files (e.g., GCHP.rc)
  • Mismatched number of processes and config
  • Warning if a blank cap_restart exists

I think https://github.com/geoschem/GCHP/issues/53 could be consolidate here.

Starting in MAPL 2.8.3 errors opening NetCDF files will show (1) the offending file's path, (2) the NetCDF error code, and (3) the error code as a string.

For example, what used to look like

pe=00213 FAIL at line=00245 NetCDF4_FileFormatter.F90 pe=00213 FAIL at line=00090 MAPL_ExtDataCollection.F90 pe=00213 FAIL at line=00232 FileMetadata.F90 pe=00213 FAIL at line=00083 FileMetadataUtilities.F90 pe=00213 FAIL at line=02777 MAPL_ExtDataGridCompMod.F90 pe=00213 FAIL at line=01512 MAPL_ExtDataGridCompMod.F90

will now be

nf90_open: returned error code (13) opening ./MetDir/2016/12/MERRA2.20161214.A3dyn.05x0625.nc4 [Permission denied] pe=00213 FAIL at line=00245 NetCDF4_FileFormatter.F90 pe=00213 FAIL at line=00090 MAPL_ExtDataCollection.F90 pe=00213 FAIL at line=00232 FileMetadata.F90 pe=00213 FAIL at line=00083 FileMetadataUtilities.F90 pe=00213 FAIL at line=02777 MAPL_ExtDataGridCompMod.F90 pe=00213 FAIL at line=01512 MAPL_ExtDataGridCompMod.F90

See: https://github.com/GEOS-ESM/MAPL/pull/962

@lizziel:

Here are some more potential user errors that may or may not have cryptic error messages. I haven't tested them all with recent MAPL. I'll try to remember to add to this list as I think of or encounter more.

  • Typos in HEMCO_Config.rc
  • Typos in ExtData.rc
  • Incorrect format in time units in import file
  • Integers in import file
  • Incorrect grid resolution in restart file
  • Duplicate entries in any config file
  • End time before start time or before start time + duration
lizziel commented 3 months ago

I am closing this issue as we anticipate most confusing or absent error messages will be fixed in MAPL3, to be included in GCHP 15.0.