GEOS-ESM / GEOSchem_GridComp

GEOS Earth System Model Chemistry Components
Apache License 2.0
3 stars 4 forks source link

Component stubbing in GEOSchem_GridComp broken for GMI and ACHEM #79

Open bena-nasa opened 4 years ago

bena-nasa commented 4 years ago

The chemistry has had the ability for a long time to stub code. I.E. if one of the gridded component directories specified in the GNUmakefile or now the CMakelists.txt file is not actually present, a .F90 with the appropriate set services is automatically created so that GEOS_ChemGridComp.F90 can link and all the missing grid comps can run in a no-op sense.

I was trying to make use of the stubbing feature when working on a new fixture for this Radiation code driver (RadApp) to run radiation + gocart/pchem. I did not want to build all of the chemistry components as I only needed those two. I noticed that GMI and achem can't be stubbed out.

  1. The issue with achem is that the directory name is GEOSachem_GridComp but based on this the stubbed module name becomes GEOSachem_GridCompMod but GEOS_ChemGridComp needs a module named GEOS_AChemGridCompMod. Simply changing the directory name to GEOS_AChemGridComp fixes this problem.
  2. GEOS_ChemGridComp.F90 has a dependence on GMI beyond the setservice routine. It uses a very, very simply function in GMI that takes an ESFM_Config type, parses a label. If the label is "T" or "t", it returns true, otherwise it returns false. This is could easily move to GEOS_ChemGridComp.F90 itself or one of the chemistry shared areas so that GMI can also be successfully stubbed out.
mmanyin commented 4 years ago

@bena-nasa You are correct. I will fix the GMI dependency. Before re-naming the AChem directory we should confer with Anton.