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 carbon simulations in GCClassic and GCHP #2554

Merged
merged 11 commits into from
Jan 8, 2025

Conversation

msulprizio
Copy link
Contributor

@msulprizio msulprizio commented Nov 4, 2024

Name and Institution (Required)

Name: Melissa Sulprizio & Lizzie Lundgren
Institution: Harvard University

Describe the update

This pull request contains several fixes and updates to the carbon simulation to (1) reproduce carbon species in the GCClassic standalone CH4, CO2, and tagCO simulations and (2) ensure consistent results between the carbon simulation in GCClassic and GCHP.

Expected changes

These changes impact only the carbon, CH4, CO2, and tagCO simulations and do not impact the full-chemistry benchmark simulations.

Related Github Issue

closes geoschem/GCHP#440

msulprizio and others added 7 commits October 30, 2024 09:29
…mbustion emissions

The emission for GHGI_EE_COAST_OTHER_MCOMB in HEMCO_Config.rc.CH4 was incorrectly
assigned a hierarcy of 100 (added to regional US emissions) when it should
have been 1 (added to EDGAR global emissions). The wrong mask was also applied
to this field - it should be 1009 (CONUS_MASK_MIRROR) and not 1008 (CONUS_MASK).
These typos caused mobile combustion emissions to be double counted over the US.
The typos were not present in the HEMCO_Config.rc files for carbon simulations.

Also made other white space and comment updates to HEMCO_Config.rc files
for the carbon and CH4 simulations to ensure consistency between the two
simulations.

Signed-off-by: Melissa Sulprizio <mpayer@seas.harvard.edu>
…n against carbon simulation

The carbon simulation currently uses GFED biomass burning emissions by default
(for all carbon species). It also uses GEOS-Chem v5 OH which is currently
required for CH4 in the carbon simulation. To simplify validation of
the CO in the tagCO simulation vs the carbon simulation, we update the
HEMCO_Config.rc.tagCO to use the same options.

Also made a minor change to the OCS biomass burning diagnostic name for
consistency with the other carbon species.

Signed-off-by: Melissa Sulprizio <mpayer@seas.harvard.edu>
This update prevents printing a message every timestep intended only to
be printed once.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
The activate flag is needed in the transport menu since it is used to set
Input_Opt%LTRAN. This update fixes a bug that caused mixing ratio update
with pressure ratio every timestep.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
…lassic

The scale factor is removed from HEMCO_Config.rc since the conversion
happens automatically in HEMCO read for GC-Classic. For GCHP the scale
factor is now configured in ExtData.rc.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
All emissions for OCS are surface so total can be 2-dimensional rather than
3-dimensional.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
@msulprizio msulprizio changed the title Bugfix/carbon sim Bug fixes for the carbon simulations in GCClassic and GCHP Nov 4, 2024
@msulprizio msulprizio added category: Bug Fix Fixes a previously-reported bug topic: Carbon Gases Simulations Related to simulations with carbon gases (carbon, CO2, CH4, tagCH4, tagCO) labels Nov 4, 2024
@msulprizio msulprizio added this to the 14.5.1 milestone Nov 4, 2024
@Aosrain
Copy link

Aosrain commented Nov 12, 2024

@msulprizio I can successfully compile GCHP 14.5.0, but when I include these bug fixes, the following error appears.

[ 93%] Building Fortran object src/GCHP_GridComp/GEOSChem_GridComp/geos-chem/GeosCore/CMakeFiles/GeosCore.dir/emissions_mod.F90.o
/nobackup/lwu5/GCHP/src/GCHP_GridComp/GEOSChem_GridComp/geos-chem/GeosCore/emissions_mod.F90(127): error #6580: Name in only-list does not exist or is not accessible.   [EMISS_CARBON_GASES]
    USE Carbon_Gases_Mod,      ONLY : Emiss_Carbon_Gases
--------------------------------------^
compilation aborted for /nobackup/lwu5/GCHP/src/GCHP_GridComp/GEOSChem_GridComp/geos-chem/GeosCore/emissions_mod.F90 (code 1)
make[2]: *** [src/GCHP_GridComp/GEOSChem_GridComp/geos-chem/GeosCore/CMakeFiles/GeosCore.dir/build.make:283: src/GCHP_GridComp/GEOSChem_GridComp/geos-chem/GeosCore/CMakeFiles/GeosCore.dir/emissions_mod.F90.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:11451: src/GCHP_GridComp/GEOSChem_GridComp/geos-chem/GeosCore/CMakeFiles/GeosCore.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

I found the updated emissions_mod.F90 somewhere, but it doesn't included in the "Files Changed" here. Now the GCClassic is successfully compiled. I'll also try GCHP later.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
@yantosca yantosca added the no-diff-to-benchmark This update will not change the results of fullchem benchmark simulations label Nov 20, 2024
@Aosrain
Copy link

Aosrain commented Nov 21, 2024

@yidant Would you please upload $ROOT/CH4/v2024-01/ResME/reservoir_mask.01x01.nc to the data server? Thank you.

@yidant
Copy link
Contributor

yidant commented Nov 21, 2024

Thanks @Aosrain! This file is synced!

Signed-off-by: Melissa Sulprizio <mpayer@seas.harvard.edu>
…ns with CO only

To make it more clear that the PCO_CH4 fields are read from file, the option in
in the CO2 menu of geoschem_config.yml has been renamed from from "use_fullchem_PCO_from_CH4"
to "use_archived_PCO_from_CH4 (same for NMVOC source)". The use_archived_PCO_from_CH4
option is now set to false by default for carbon simulations and only set to true in carbon simulations
where only CO is advected. Similarly, "3D_chemical_oxidation_source" in the CO2 menu
has been renamed to "use_archived_PCO2_from_CO".

The carbon mechanism was rebuilt with KPP 3.1.1 here but that is a zero-
difference update simply changing the headers of the KPP/carbon/gckpp* files.

Signed-off-by: Melissa Sulprizio <mpayer@seas.harvard.edu>
@msulprizio
Copy link
Contributor Author

1-month benchmarks for January 2019 at 4x5 resolution have been completed with GCClassic and comparisons of the CO, CO2 and, CH4 in the "offline" specialty simulations has been compared to the joint and single-species carbon simulations.

Performance results are outlined below:

Screenshot 2025-01-07 at 3 05 18 PM

Difference plots may be viewed here: GCClassic_Carbon_comparisons.pdf.zip (compressed because of file size limit). These plots show: (1) CO2 is identical between the CO2 simulation and CO2 in the carbon simulation; (2) There are numerical differences in CH4 in the CH4 simulation vs the CH4-only carbon simulation due to performance of the chemistry in KPP vs in global_ch4_mod.F90; (3) Some differences still exist in CO when comparing the tagCO simulation with the CO-only carbon simulation, but perhaps the user community can help sort these out.

As such, I think this PR is now ready for merging into dev/no-diff-to-benchmark for inclusion in 14.5.1.

Tagging @lizziel and @yantosca

@msulprizio msulprizio requested a review from yantosca January 7, 2025 20:07
@msulprizio msulprizio marked this pull request as ready for review January 7, 2025 20:07
Copy link
Contributor

@yantosca yantosca left a comment

Choose a reason for hiding this comment

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

Thanks @msulprizio. I just had a comment about the CHANGELOG.md

CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Melissa Sulprizio <mpayer@seas.harvard.edu>
@msulprizio msulprizio requested a review from yantosca January 8, 2025 13:17
Copy link
Contributor

@yantosca yantosca left a comment

Choose a reason for hiding this comment

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

Thanks @msulprizio, all is good to merge now.

@msulprizio msulprizio merged commit ac0b765 into dev/no-diff-to-benchmark Jan 8, 2025
@msulprizio
Copy link
Contributor Author

All GCClassic and GCHP integrations pass

@msulprizio msulprizio deleted the bugfix/carbon_sim branch January 8, 2025 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Fix Fixes a previously-reported bug no-diff-to-benchmark This update will not change the results of fullchem benchmark simulations topic: Carbon Gases Simulations Related to simulations with carbon gases (carbon, CO2, CH4, tagCH4, tagCO)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants