geoschem / HEMCO

The Harmonized Emissions Component (HEMCO), developed by the GEOS-Chem Support Team.
https://hemco.readthedocs.io
Other
17 stars 32 forks source link

[BUG/ISSUE] HEMCO standalone run failure for grid res 0.5x0.625 #40

Closed lizziel closed 4 years ago

lizziel commented 4 years ago

This issue was previously posted on top of closed issue https://github.com/geoschem/geos-chem/issues/130. It is reposted here since it is relevant to the HEMCO rather than the GEOS-Chem repository, and since it will be handled separately from the original issue in #130.

@Zitely posted:

Hi,

When running HEMCO standalone v3.0.0, I am getting the same error as above (which I think is making other errors to appear). Is fix you mentioned on Nov 12, 2019 only for GCHP? Do you have any fix for HEMCO standalone?

libgomp: Invalid value for environment variable OMP_NUM_THREADS

Reading entire HEMCO configuration file: HEMCO_sa_Config.rc HEMCO ERROR: Improperly formatted grid resolution: 0.5x0.625 ERROR LOCATION: ReadSettings (hco_config_mod.F90)

HEMCO ERROR: Error encountered in routine "Config_Readfile!" ERROR LOCATION: HCOI_SA_Init (in module HEMCO/Interfaces/hcoi_standalone_mod.F90)

HEMCO ERROR: Error encountered in routine "HCO_Sa_Init"! ERROR LOCATION: -> at HCOI_StandAlone_Run (in module HEMCO/Interfaces/hcoi_standalone_mod.F90)

HEMCO_STANDALONE EXITED WITH ERROR!

real 0m0.010s user 0m0.006s sys 0m0.001s

lizziel commented 4 years ago

I was able to reproduce this issue. I was able to get around it by changing this:

      CASE( '05x0625' )
         GridRes = '0.5x0.625'

to this:

    CASE( '05x0625', '0.5x0.625' )
        GridRes = '0.5x0.625'

It appears this same fix was previously made to fix this bug for 2x2.5 standalone runs but not extended to other resolutions for some reason. This fix is now in the dev version of HEMCO, in commit https://github.com/geoschem/HEMCO/commit/34c4702da425bda5191d08b2e6074c5dcddc7ec3, and also extends to 0.25x0.3125.

lizziel commented 4 years ago

After further testing I run into a new run-time error, also related to the resolution string. The HEMCO.log file contains this:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
HEMCO ERROR: Cannot find file for current simulation time: /n/holyscratch01/external_repo\
s/GEOS-CHEM/gcgrid/gcdata/ExtData/GEOS_0.5x0.625/MERRA2/2015/01/MERRA2.20150101.CN.0.5x0.\
625.nc4 - Cannot get field FRLAKE. Please check file name and time (incl. tim
ERROR LOCATION: HCOIO_READ_STD (hcoio_read_std_mod.F90)
ERROR LOCATION: HCOIO_DataRead (hcoio_dataread_mod.F90)
ERROR LOCATION: ReadList_Fill (hco_readlist_mod.F90)
ERROR LOCATION: ReadList_Read (hco_readlist_mod.F90)
ERROR LOCATION: HCO_RUN (hco_driver_mod.F90)

This used HEMCO commit 9beb248, which is the current main branch of HEMCO. When creating the run directory from the source code, I used HEMCO_Config.rc template file from github.com/geoschem/geos-chem-unittest tag 12.8.0, file runs/shared_inputs/fullchem/HISTORY.rc.template.standard. I am investigating this issue.

lizziel commented 4 years ago

I was able to get around the met-field filename issue by updating one of the config files and now it finishes to completion. The issue was HEMCO replaced the HEMCO_Config.rc $RES token with 0.5x0.625 rather than the correct string of 05x0625. To make the quick fix I changed the RES string from 0.5x0.625 to 05x0625 in the run directory file HEMCO_sa_Config.rc.

@zitely, let us know if this fixes it for you as well.

The true fix will involve updating the script used to parse the template file when creating the run directory so that the proper string is inserted into the file. This will go into HEMCO 3.0.0.

lizziel commented 4 years ago

The run directory creation fix is now in the HEMCO dev branch, commit https://github.com/geoschem/HEMCO/commit/6b69c5bebdfaf9231e06d320958abe29108332bf.