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
168 stars 165 forks source link

[BUG/ISSUE] Running nested grid simulation, HEMCO field already exists:SPC_H20 #199

Closed RajMLal closed 4 years ago

RajMLal commented 4 years ago

Describe the bug

Hello, I'm running a nested grid simulation over Asia, but I'm getting an error in the run log that says

HEMCO ERROR: Error: HEMCO field already exists:SPC_H2O

To Reproduce

I followed the directions here: http://wiki.seas.harvard.edu/geos-chem/index.php/Setting_up_GEOS-Chem_nested_grid_simulations No problems getting the global run complete, but when I run the nested run, it pops out the error seen below

Compilation commands

Run commands

Expected behavior

Error messages

Reading part 1 of HEMCO configuration file: HEMCO_Config.rc

 Reading part 2 of HEMCO configuration file: HEMCO_Config.rc
 HEMCO ERROR: Error: HEMCO field already exists:SPC_H2O

===============================================================================
GEOS-Chem ERROR: Error encountered in "Config_Readfile" (Phase 2)!
 -> at HCOI_GC_Init (in module GeosCore/hcoi_gc_main_mod.F90)

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

===============================================================================
GEOS-Chem ERROR: Error encountered in "HCOI_GC_Init"!
 -> at Emissions_Init (in module GeosCore/emissions_mod.F90)
===============================================================================

===============================================================================
GEOS-CHEM ERROR: Error encountered in "Emissions_Init"!
STOP at  -> at GEOS-Chem (in GeosCore/main.F)
===============================================================================

Required information

Please include the following:

Input and log files to attach

Additional context

It didn't write a HEMCO.log file.

In the Hemco version wiki page, there is something similar: http://wiki.seas.harvard.edu/geos-chem/index.php/HEMCO_versions#Stop_with_error_if_multiple_containers_have_the_same_name but the error I have, I believe is coming from the restart file. When I opened the sample restart file from the http://ftp.as.harvard.edu/gcgrid/data/ExtData/GEOSCHEM_RESTARTS/v2018-11/ I didn't see a SpeciesRst_H2O field or fields for other options in the GC_Restart extension found in Hemco_config.rc (Met_TMPU1, Met_SPHU1,etc.). I tried changing the restart pointer to the 4x5 restart file used for the global simulation, but that came out with the same error.

GC_india_run_log_global_1_19_2020.log

Thank you all in advance for your help (hopefully this is a quick issue)

yantosca commented 4 years ago

Hi Raj. I would check the boundary condition files to make sure there are no duplicated SPC_H2O fields first. I'll try to replicate this on my end.

RajMLal commented 4 years ago

Thank you Bob,

I checked the Boundary Condition File, and I only see one SPC_H2O field. Also attached is what the SPC_H2O field looks like (I've gotten similar looking outputs for BCs that worked in other nested runs) image image

Thank you all again for all of your help

~Raj

yantosca commented 4 years ago

Hi Raj. Can you also send attach the HEMCO_Config.rc file that you used?

Also, for the tropchem simulation, I believe H2O is not an advected species, but is a chemical species. So it shouldn't be needed in the species boundary condition file.

Question: did the global run use tropchem or standard? For a nested simulation, the global and nested runs should use the same chemistry mechanism (usually tropchem to reduce computational time). I am wondering if there is some kind of mismatch here between the global and nested runs.

RajMLal commented 4 years ago

Hi Bob,

Attached is the HEMCO_Config.rc file I was using for the nested run.

I was using the standard chem for the global run and trophcem for the nested run. I will use trophchem for the global run and test that out.

I had a nested asia run working at (025x03125) using trophcem and boundary conditions using standard (2x25) just for Jan. 1-14, 2016 and that was working without error.

HEMCO_Config.txt

~Raj

yantosca commented 4 years ago

Thanks for clarifiying. The nested run and global run must use the same chemistry mechanism. That is probably the source of your error. I think your new tropchem global run will work with the nested tropchem run.

The issue is not so much the vertical regridding of the BC files (because HEMCO can handle that), but because both mechanisms have different numbers of species. As I said, in tropchem, H2O isn't advected but in standard H2O is. So that may mess things up.

RajMLal commented 4 years ago

Thank you Bob.

I now see that H20 isn't advected using Tropchem.

I created a new run directory using merra2_4x5_tropchem and went through the regular steps, but for some reason, I'm still getting the same error message, but now on the global run, before I even get to the nest.

I used the restart file from http://ftp.as.harvard.edu/gcgrid/data/ExtData/GEOSCHEM_RESTARTS/v2018-11/ and there does not appear to be a SpeciesRst_H2O variable.

image

I also see that some of the other parameters defined in the GC_restart section of Hemco_config aren't variables here (e.g., MET_TMPU1, met_SPHU1, etc.). I tried running setting up the run with a restart file that does include such variables, but the same error persisted. GC_run_log_global_1272020.log HEMCO_Config.txt

Attached is the log file and HEMCO_config.rc

Thank you for taking the time to go through this with me

yantosca commented 4 years ago

I just noticed that some of the SpeciesRst values are corrupted in the output:

 SPECIESRST_H2O                 | Dry mixing ratio of  | xyz C | mol mol-1 dry
 SPECIESRST_ + OH --> CL +      | Dry mixing ratio of  | xyz C | mol mol-1 dry
 SPECIESRST_            HCL     | Dry mixing ratio of  | xyz C | mol mol-1 dry
 SPECIESRST_                    | Dry mixing ratio of  | xyz C | mol mol-1 dry
 SPECIESRST_2O2                 | Dry mixing ratio of  | xyz C | mol mol-1 dry
 SPECIESRST_H4           PH     | Dry mixing ratio of  | xyz C | mol mol-1 dry
 SPECIESRST_O4           LC     | Dry mixing ratio of  | xyz C | mol mol-1 dry
 SPECIESRST_O            PS     | Dry mixing ratio of  | xyz C | mol mol-1 dry
 SPECIESRST_O            LC     | Dry mixing ratio of  | xyz C | mol mol-1 dry
 SPECIESRST_X            PC     | Dry mixing ratio of  | xyz C | mol mol-1 dry
 SPECIESRST_X            LO     | Dry mixing ratio of  | xyz C | mol mol-1 dry
 SPECIESRST_             PO     | Dry mixing ratio of  | xyz C | mol mol-1 dry
 SPECIESRST_RCOOH               | Dry mixing ratio of  | xyz C | mol mol-1 dry
 SPECIESRST_O2                  | Dry mixing ratio of  | xyz C | mol mol-1 dry

Have you tried to compile with BOUNDS=y DEBUG=y FPEX=y? That might reveal an error such as an out-of-bounds error. See our GEOS-Chem Debuggingpage on the wiki.

RajMLal commented 4 years ago

Hi Bob,

Sorry for the delay on this - putting the debuggers on solved the problem. I was expecting the debuggers to write a new file with some sort of error list; however, when I used them with the compile step, the model ran without error. I couldn't find any details on the wiki why this happened? Can you explain?

Thanks, Raj

yantosca commented 4 years ago

It might be the optimization. When you run with the debugging flags on, it sets -O0, which disables optimization.

yantosca commented 4 years ago

I will close out this issue for now. Feel free to reopen or add a new issue.