geoschem / geos-chem

GEOS-Chem "Science Codebase" repository. Contains GEOS-Chem science routines, run directory generation scripts, and interface code. This repository is used as a submodule within the GCClassic and GCHP wrappers, as well as in other modeling contexts (external ESMs).
http://geos-chem.org
Other
171 stars 166 forks source link

GC-Classic can only be run starting at midnight or 3-hr intervals thereafter #2404

Open lizziel opened 4 months ago

lizziel commented 4 months ago

Your name

Lizzie Lundgren

Your affiliation

Harvard Unversity

What happened? What did you expect to happen?

I recently tried to run two consecutive 1-hr GC-Classic runs. The first run starting at 0000z was fine but the second run starting at 0100z crashed with the following error:

HEMCO ERROR: Cannot find field with valid time stamp in /n/holyscratch01/external_repos/GEOS-CH\
EM/gcgrid/gcdata/ExtData/GEOS_4x5/MERRA2/2019/07/MERRA2.20190702.I3.4x5.nc4 - Cannot get field \
PS_NEXTDAY. Please check file name and time (incl. time range flag) in the config. file

HEMCO ERROR: Error encountered in routine HCOIO_Read!

HEMCO ERROR: Error in HCOIO_DATAREAD called from HEMCO ReadList_Fill: PS_NEXTDAY
 --> LOCATION: ReadList_Fill (HCO_ReadList_Mod.F90)

HEMCO ERROR: Error in ReadList_Fill (4) called from HEMCO ReadList_Read
 --> LOCATION: ReadList_Read (HCO_ReadList_Mod.F90)
 Error in ReadList_Read called from hco_run
===============================================================================
GEOS-Chem ERROR: Error encountered in "HCO_Run"!
 -> at HCOI_GC_Run (in module GeosCore/hco_interface_gc_mod.F90)

THIS ERROR ORIGINATED IN HEMCO!  Please check the HEMCO log file for
additional error messages!
===============================================================================

The problem is HEMCO's algorithm for computing file time for the +1day option. This is done for PS_NEXTDAY in HEMCO_Config.rc.gmao_metfields:

* PS_NEXTDAY   $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.I3.$RES.$NC PS        1900-2100/1-12/1-31/1/+1day     EFY xy  1  * -  1 1

HEMCO is taking the current time and then adding exactly one day. This results in a time that does not exist for the file. This only happens if you start the run at a time that is not at midnight or a multiple of 3 hours from midnight.

The expected behavior would be to get the current day and increment by one, keeping hour/minute as 00:00. GEOS-Chem only needs to retrieve the "NEXTDAY" variables if the model time has HHMMSS equal to 000000.

What are the steps to reproduce the bug?

Start a GEOS-Chem Classic run at anytime other than midnight or 3 hr increments thereafter, e.g. at hour 1, 2, 4, 5, etc.

Please attach any relevant configuration and log files.

No response

What GEOS-Chem version were you using?

14.4.3

What environment were you running GEOS-Chem on?

Local cluster

What compiler and version were you using?

gcc 10

Will you be addressing this bug yourself?

No

In what configuration were you running GEOS-Chem?

GCClassic

What simulation were you running?

Full chemistry

As what resolution were you running GEOS-Chem?

4x5

What meterology fields did you use?

MERRA-2

Additional information

GCST does not plan to fix this problem at this time. This issue is an fyi to users, and an issue to reference if we get a bug report.

lizziel commented 4 months ago

Thinking more about this, since GEOS-Chem only uses the *_NEXTDAY fields at HHMMSS equal to 000000, perhaps we can simply change the flag in HEMCO_Config.rc to not be exact. At time 00:00:00 the correct file would always be found. For all other times choosing the wrong day, as may happen for hour 23, would not matter.

@msulprizio, @yantosca Thoughts?

yantosca commented 4 months ago

@lizziel, it's worth a shot.