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 Prod/Loss diagnostics for Hg simulation -- Closes #1284, #1285 #1356

Merged
merged 3 commits into from
Aug 23, 2022

Conversation

yantosca
Copy link
Contributor

This is the corresponding PR to issue #1284. It adds several minor fixes to the Hg added by @arifein, namely:

  • Fixing code to archive the prod and loss diagnostics in GeosCore/mercury_mod.F90
  • Added prod families PHg0, PHg2, PHg2Br, PHg2OH, PHg2Cl to Hg.kpp and species_database_hg.yml
  • Setting the units for prod and loss diagnostics to molec cm-3 s-1 for all KPP-based simulations
  • Rebuilding the Hg mechanism with KPP 2.5.0
  • Adding the ProdLoss collection for Hg species to run/GCClassic/HISTORY.rc.templates/HISTORY.rc.Hg

Also note: I have updated default Hg restart file so that it now contains the PHg* species. You can download the updated file from: http://ftp.as.harvard.edu/gcgrid/data/ExtData/GEOSCHEM_RESTARTS/v2021-12/GEOSChem.Restart.Hg.20190101_0000z.nc4. This will let you start a simulation without having to change the time cycle flag for SPC_ from EFYO to EY in HEMCO_Config.rc.

Also tagging @viral211 @lfreese @hmhorow

These updates address the issues raised in geoschem/geos-chem #1284

Headers/diaglist_mod.F90
- Added IsHg and IsCarbonCycle module variables.  (The IsCarbonCycle
  is future-proofing us for 14.1.0, when that mechanism will be added.)

Headers/state_diag_mod.F90
- PROD and LOSS for simulations with KPP are now assigned units of
  molec cm-3 s-1.  PROD and LOSS for other specialty simulations are
  assigned units of kg s-1 (until we bring these into KPP).

GeosCore/mercury_mod.F90
- Updated loops that store in to State_Diag%Prod, following suggestion
  by Ari Feinberg

KPP/Hg/Hg.kpp
- Added prod families PHg0, PHg2, PHg2Br, PHg2OH, PHg2Cl to Hg.kpp

run/shared/species_database_hg.yml
- Added entries for PHg0, PHg2Br, PHg2OH, PHg2_Br, PHg2Cl

KPP/Hg/gckpp*
- Rebuilt with KPP 2.5.0

Signed-off-by: Bob Yantosca <[email protected]>
Now that the Hg simulation has several defined production families,
we have added the ProdLoss diagnostic with the 'Prod_?PRD?' wildcard.

Signed-off-by: Bob Yantosca <[email protected]>
An .or. statement was missing a trailing "." character.  Now fixed.

Signed-off-by: Bob Yantosca <[email protected]>
@yantosca yantosca added this to the 14.0.1 milestone Aug 22, 2022
@yantosca yantosca requested a review from Jourdan-He August 22, 2022 17:58
@yantosca yantosca self-assigned this Aug 22, 2022
@yantosca yantosca changed the title Bug fixes for Prod/Loss diagnostics for Hg simulation -- Closes #1284 Bug fixes for Prod/Loss diagnostics for Hg simulation -- Closes #1284, #1285 Aug 22, 2022
Copy link
Contributor

@Jourdan-He Jourdan-He left a comment

Choose a reason for hiding this comment

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

Looks great!

Copy link
Contributor Author

Thanks @Jourdan-He, I'll merge it into patch/14.0.1.

@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.

@jennyfisher
Copy link
Contributor

Hi @yantosca @msulprizio - I'm trying to get the version of GCClassic with all of these Hg simulation fixes. I can't seem to figure out which version this is or what I need to pull. I've cloned 14.0.0-rc3 (I think? Whatever the current main version is). I looked for a branch called patch/14.0.1 or feature/HgFamilies but I couldn't find either of these.

Is there a quick and easy way to get a version with all the Hg updates? Thanks!

Copy link
Contributor Author

Hi @jennyfisher, you can take the dev branch and I think that will have the fixes. We are very close to releasing 14.0.0 (once the benchmarks are approved).

@jennyfisher
Copy link
Contributor

Thanks @yantosca - I have pulled the dev branch and want to double-check a few things with you, @arifein, and @viral211.

  1. In [BUG/ISSUE] Hg simulation in version 13.4 missing land and ocean emissions #1285, Viral noted that the JBrO, JNO2, Br_GC and BrO_GC fields are no longer used. However these still appear in the HEMCO_Config.rc. Should we remove them from the file for clarity (and to provide people downloading unnecessary files)?

  2. In the 14.0.0-rc3 master branch, all the AERO_ fields for Hg2 partitioning point to SpeciesConc files in $ROOT/GCClassic_Output/14.0.0/, whereas in the dev branch this points to files in $ROOT/GCClassic_Output/13.0.0/. Is that intentional (i.e. we switched back to the older v13 files), or an oversight, or will this be switched back when the new 14.0.0 benchmark is complete?

  3. Most important: In the OXIDANT_FIELDS section of HEMCO_Config.rc, the GLOBAL_ fields all point to $ROOT/MERCURY/v2022-04/Oxidants_for_Hg_sim_2016.nc4 which only contains fields for 2016. However, we also have all of these species in the $ROOT/GCClassic_Output/ SpeciesConc files for all years from 2010-2019. Is there any reason not to update the Hg simulation to use these year-specific oxidant fields?

Thanks!
Jenny

@arifein
Copy link
Contributor

arifein commented Oct 13, 2022

Hi @jennyfisher, regarding 1.: It worked for me to run v14 with these lines deleted from HEMCO_Config.rc, so I would also be on board with this.
For 2. + 3., the others would know better. I am not up to date with how different the Br fields are in the Oxidants_for_Hg_sim_2016.nc4 file vs. the stored v14 GCClassic Output. If these oxidant fields are quite different, it might require a re-calibration of the Hg chemical scheme.

Copy link
Contributor Author

@jennyfisher @arifein: We are awaiting the 14.0.0 10 year benchmark and would use those oxidant fields. We might have those available before 14.1.0 ships. I can change it to the 13.0.0 oxidant fields for now.

I can also make sure that the HEMCO_Config.rc.Hg template file is updated accordingly.

We are a bit stretched thin right now due to circumstances beyond our control. Thanks for your patience as we sort this out.

@jennyfisher
Copy link
Contributor

Thanks both. In this case, sounds like we should remove the extra lines from HEMCO_Config.rc (point 1 but leave all else as is for now. Would be interested in opinion of @viral211 on point 3.

Bob - no rush, and the 13.0.0 fields are the ones in use now so I don't think you need to change that one until the 10-year benchmark is complete. Thanks!

@viral211
Copy link
Contributor

@jennyfisher @arifein @yantosca: The Hg2 gas-particle partitioning no longer uses the AERO_* fields; the aerosol fields are included in the GLOBAL_* fields. These fields can also be removed from HEMCO_Config.rc
The Br fields in version 14.0 will be very different from version 13.0 since sea salt aerosol debromination has been turned off in the newer versions. @arifein is right that using these fields will need recalibration of the reduction rates.
Also, the mechanism expects the oxidant fields to be in molec/cm3, so we won't be able to directly point to the SpecicesConc fields in the GCClassic output. Maybe HEMCO can handle the unit conversion, but I am not sure about it. @yantosca would know.

@jennyfisher
Copy link
Contributor

Thanks @viral211

So for now we should remove the Br fields noted above and the AERO_ fields from the HEMCO_Config.rc, and leave all other fields (e.g. oxidants) pointing to the 13.0.0 versions.

@yantosca - let us know if this makes sense or if you need more clarity!

Copy link
Contributor Author

This should be all done on PR #1367 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants