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
164 stars 154 forks source link

[BUG/ISSUE] GCC-Hg 13.4 Oxidant fields. #1252

Closed CharikleiaGRN closed 1 year ago

CharikleiaGRN commented 2 years ago

Hello! I downloaded the new restart file and mercury oxidants/aerosols netcdf files. I tried to make the new version run but I get this error. GLOBAL_H2 is not in the Oxidants_for_Hg_sim_2016.nc4 and not listed in the HEMCO_configuration file.

GEOS-Chem ERROR: Cannot get pointer from HEMCO! Oxidant data is expected to be
listed in the HEMCO configuration file. This error occured when trying to get
field GLOBAL_H2
-> at Set_HCOPointers (in module GeosCore/mercury_mod.F90)
GEOS-Chem ERROR: Error encountered in "Set_HCOPointers"!
-> at ChemMercury (in GeosCore/mercury_mod.F90)
===============================================================================
GEOS-Chem ERROR: Error encountered in "ChemMercury"!
-> at Do_Chemistry (in module GeosCore/chemistry_mod.F90)
===============================================================================
GEOS-CHEM ERROR: Error encountered in "Do_Chemistry"!
STOP at
``` -> at GEOS-Chem (in GeosCore/main.F90)
yantosca commented 2 years ago

Thanks for writing @CharikleiaGRN. Were you using a pre-release version? I think there was an error that I fixed before 13.4.0 release so that we point to the proper files for GLOBAL_H2. See PR #1196.

CharikleiaGRN commented 2 years ago

Hi! Nope, it is the released 13.4.0!

arifein commented 2 years ago

Hi all, I am getting the same issue as Charikleia for trying to run 13.4.0. I think the issue comes from GeosCore/mercurymod.F90 (L925-947) where the model looks for the fixed KPP species. However, I am confused why it would need to look for H2 at all, because H2 is not included in @viral211 's new Hg chemistry mechanism. Does fixed KPP species refer to fixed oxidants used in the Hg mechanism, or all KPP species that are not included/advected in the Hg simulation?

! Do for each fixed KPP species
    DO N = 1, State_Chm%nKppFix

       ! Get species ID
       spcID = State_Chm%Map_KppFix(N)

       ! Construct field name using species name
       fieldName = 'GLOBAL_' // TRIM( State_Chm%SpcData(SpcID)%Info%Name )

       ! Get pointer to oxidant field [molec/cm3]
       CALL HCO_GetPtr( HcoState, fieldName, FixSpcPtr(N)%Data, RC )

       ! Trap potential errors
       IF ( RC /= GC_SUCCESS ) THEN
          errMsg = 'Cannot get pointer from HEMCO! Oxidant data '//&
                   'is expected to be listed in the HEMCO configuration '  //&
                   'file. This error occured when trying to get field '     //&
                  TRIM( FieldName )
          CALL GC_Error( errMsg, RC, thisLoc )
          RETURN
       ENDIF

    ENDDO !N
viral211 commented 2 years ago

It should refer to the fixed oxidants in the Hg.eqn file, but it seems that KPP is trying to read the fullchem.eqn file, where H2 is the first fixed species. Did you use -DMECH=Hg while compiling?

CharikleiaGRN commented 2 years ago

I cannot remember if I was compiling with -DMECH=Hg but now it is working!!!!!! Thank you! I will wait for the results and I will let you know if everything is ok!!!! :D Thank you all!

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. If there are no updates within 7 days it will be closed. You can add the "never stale" tag to prevent the Stale bot from closing this issue.

yantosca commented 1 year ago

Closing out this issue