Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixes for the Hg simulation with KPP #1336

Merged
merged 7 commits into from Aug 8, 2022
Merged

Conversation

yantosca
Copy link
Contributor

@yantosca yantosca commented Aug 4, 2022

This PR fixes several minor issues for the Hg specialty simulation, including:

  • Restored missing call to Hg emission routine SrcHg0 in GeosCore/mercury_mod.F90
  • Removed references to N_Hg_CATS and related code; this is now obsolete as we no longer have tagged Hg species
  • Restored ocean Hg and snow Hg quantities to the HISTORY.rc.Hg template file
  • Restored the MercuryEmis collection to the HISTORY.rc.Hg template file
  • Updated the species_database_yml.Hg to to add new Hg species, and also to add Is_Hg0, Is_Hg2, Is_HgP tags
  • Bug fix: replaced references to VAR and FIX with C in the prod/loss diagnostic section of fullchem_mod.f90

Although some of these updates touch the run directory, this is for a specialty simulation so we should be able to add it to the 14.0.1 patch version.

….F90

GeosCore/fullchem_mod.F90
- Replace the KPP global variable "VAR" with "C".  The "VAR" and "FIX"
  variables are now private to the gckpp_Integrator.F90 file, in order
  to make the KPP-generated chemistry mechanism threadsafe.

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
This commit applies the bug fixes described in geoschem/geos-chem #1286,
namely:

(1) Add DD_F0 and DD_HSTAR for Hg(II) species
(2) Add Hg(II) anchor to HgBrNO2 properties
(3) Use molecular weight of 200.59 for Hg(I) and Hg(II) species
(4) Change wetdep properties to match Shah et al 2021.

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
Updated by Viral Shah to address a bug in the prior version

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
The MercuryEmis collection contains Hg0 emissions for land, ocean, soil,
and snow (as these are computed outside of HEMCO).

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
Evidently the ocean Hg and snow Hg quantities were commented out in
the Restart collection in the HISTORY.rc.Hg template file.  We have now
uncommented these.

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
Headers/state_chm_mod.F90
- Removed N_Hg_CATS from State_Chm
- Removed the N_Hg_CATS dimension from various arrays in State_Chm
- Removed Hg*_Id_List arrays from State_Chm
- Removed the PerSpc = 'HgCat' setting in Get_Metadata_State_Chm

Headers/species_mod.F90
- Removed Hg_Cat from the Species derived type

Headers/species_database_mod.F90
- Removed references to ThisSpc%HgCat

GeosCore/depo_mercury_mod.F90
- Removed Hg_Cat as an argument from Add_Hg* subroutines
- Removed the 3rd dimension of DD_Hg* and WD_Hg* module arrays
- Removed the 3rd dimension of SNOW_Hg_* pointer arrays
- Removed pointers to Hg*_Id_List and Hg*_Cat arrays
- Remove initialization of Hg category variables for tagged Hg simulations

GeosCore/emissions_mod.F90
- Do not pass Hg_Cat as an argument to Add_Hg* subroutines
- Restore call to EmissMercury

GeosCore/hco_interface_gc_mod.F90
- Do not pass Hg_Cat as an argument to Add_Hg* subroutines
- Restore Hg_EMIS array in Compute_Sflx_for_VDIFF

GeosCore/hco_utilities_gc_mod.F90
- Remove references to Check_Ocean_Mercury
- Remove initialization of local variables for tagged Hg sims
- Remove the N_Hg_CATS dimension when copying arrays from restart files
- Remove code specific to the tagged Hg simulation

GeosCore/land_mercury_mod.F90
GeosCore/ocean_mercury_mod.F90
- Remove the N_Hg_CATS dimension of module arrays
- Remove "DO NN = 1, N_Hg_CATS" loops
- Remove code specific to the tagged Hg simulation

GeosCore/mercury_mod.f90
- Remove the N_Hg_CATS dimension of module arrays
- Remove "DO NN = 1, N_Hg_CATS" loops
- Remove code specific to the tagged Hg simulation
- Restore EmissMercury, EmitHg, and SrcHg0 routines

GeosCore/vdiff_mod.F90
- Remove references to Add_Hg* routines from depo_mercury_mod.F90

GeosCore/convection_mod.F90
GeosCore/wetscav_mod.F90
- Do not pass Hg_Cat as an argument to Add_Hg* subroutines

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
Due to an oversight, we have apparently omitted the call to SrcHg0
from the EmissMercury routine.  This has now been restored.

Thanks to @arifein for the update.

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
@yantosca yantosca added category: Bug Something isn't working specialty simulations Attn: Hg-POPs WG Attention: Hg & POPs Working Group labels Aug 4, 2022
@yantosca yantosca added this to the 14.0.1 milestone Aug 4, 2022
@yantosca yantosca self-assigned this Aug 4, 2022
Copy link
Contributor

@msulprizio msulprizio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me code-wise, but it may be good for @viral211 to have a quick look at these changes also.

@viral211
Copy link

viral211 commented Aug 5, 2022

Thanks @yantosca and @msulprizio. The changes look good to me too.

@yantosca yantosca merged commit 6499520 into patch/14.0.1 Aug 8, 2022
@yantosca yantosca deleted the bugfix/Hg-sim branch August 8, 2022 18:02
@yantosca
Copy link
Contributor Author

GEOS-Chem Classic integration tests all passed except for the CO2 simulation:

Summary of test results:
------------------------------------------------------------------------------
Execution tests passed: 47
Execution tests failed: 1
Execution tests not yet completed: 0

The error in the CO2 simulation was tracked down to an incorrect entry in HEMCO_Config.rc for CEDS_CO2_SHP, and has now been fixed in #1356.

@msulprizio msulprizio modified the milestones: 14.0.1, 14.0.0 Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Attn: Hg-POPs WG Attention: Hg & POPs Working Group category: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants