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

[PULL REQUEST] Apply fix for updating manual HEMCO diagnostics #121

Merged
merged 1 commit into from Dec 1, 2021

Conversation

msulprizio
Copy link
Contributor

Several users reported issues with zero emissions in the Hg and CH4 simulations (see #112, geoschem/geos-chem#895, geoschem/geos-chem#1011). The problem was tracked to the call to Diagn_Update in hco_calc_mod.F90. In commit 0573632 for the GCHP adjoint, the argument COL=-1 was changed to COL=HcoState%Diagn%HcoDiagnIDDefault (where HcoState%Diagn%HcoDiagnIDDefault = 1). However, COL=-1 is needed to update all HEMCO diagnostics, not just the default diagnostics. This is essential to update manual diagnostics, such as those defined in GEOS-Chem's hcoi_gc_diagn_mod.F90 for the CH4, Hg, and TOMAS simulations. Without this fix, arrays containing all zeroes are passed when manual diagnostics are obtained via HCO_GC_GetDiagn.

This commit reverts changes made in commit 0573632 for the GCHP adjoint. It is not clear if this has an impact on the GCHP adjoint, but if so then changing the value of COL should be done within an IF block so that it only applies to adjoint simulations.

This bug fix impacts the CH4, Hg, and TOMAS simulations in GEOS-Chem 13.1.0 - 13.3.2 and HEMCO 3.0.0 - 3.3.0.

Passing COL=-1 to Diagn_Update in hco_calc_mod.F90 is needed to update
all HEMCO diagnostics, not just the default diagnostics. This is essential
to update manual diagnostics, such as those defined in GEOS-Chem's
hcoi_gc_diagn_mod.F90 for the CH4, Hg, and TOMAS simulations. Without
this fix, arrays containing all zeroes are passed when manual diagnostics
are obtained via HCO_GC_GetDiagn.

This fix reverts changes made in commit 0573632
for the GCHP adjoint. It is not clear if this has an impact on the GCHP adjoint,
but if so then changing the value of COL should be done within an IF block
so that it only applies to adjoint simulations.

Signed-off-by: Melissa Sulprizio <mpayer@seas.harvard.edu>
@msulprizio msulprizio added the category: Bug Something isn't working label Nov 30, 2021
@msulprizio msulprizio changed the base branch from main to dev November 30, 2021 17:50
@msulprizio
Copy link
Contributor Author

Please note that I only tested this with the CH4 simulation. I would recommend further testing in the GEOS-Chem Hg simulation to see if this does resolve the diagnostic issues there and also doing a difference test with GEOS-Chem full-chemistry simulations to ensure zero differences.

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.

This is straighforward, returning the behavior prior to the merge with the GCHP adjoint updates. Approved.

@yantosca
Copy link
Contributor

yantosca commented Dec 1, 2021

GEOS-Chem Classic integration tests all passed:

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%  All execution tests passed!  %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@yantosca yantosca added the topic: Diagnostics Pertaining to HEMCO diagnostic outputs label Dec 1, 2021
@yantosca yantosca self-assigned this Dec 1, 2021
@yantosca yantosca added this to the 3.2.2 milestone Dec 1, 2021
@yantosca
Copy link
Contributor

yantosca commented Dec 1, 2021

GCHP integration tests passed.

==============================================================================
GCHP: Execution Test Results

Number of execution tests: 3
==============================================================================

Execution tests:
------------------------------------------------------------------------------
gchp_fullchem_benchmark_merra2_c48...............Execute Simulation.....PASS
gchp_fullchem_standard_merra2_c24................Execute Simulation.....PASS
gchp_TransportTracers_geosfp_c24.................Execute Simulation.....PASS

Summary of execution test results:
------------------------------------------------------------------------------
Execution tests passed:        3
Execution tests failed:        0
Execution tests not completed: 0

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%  All execution tests passed!  %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

We are good to release 13.3.0.

@yantosca yantosca merged commit 815ec9c into dev Dec 1, 2021
@yantosca yantosca deleted the bugfix/ManualDiags branch December 1, 2021 18:38
@yantosca
Copy link
Contributor

yantosca commented Dec 3, 2021

I just discovered that this update also will restore the biogenic emissions to their proper values, as the HEMCO MEGAN extension uses manual HEMCO diagnostics (i.e. calling Diagn_Create) to update diagnostics for non-advected species. This leads to small differences (as seen in benchmark 13.4.0-alpha.3, which uses HEMCO 3.2.2.):

2021_12_03_10_42_03_Greenshot

This leads to very small differences in biogenic emission totals, all less than 0.3%:

###################################################################################
### Emissions totals for species ACET [Tg]                                      ###
### Ref = GCC_13.4.0-alpha.2; Dev = GCC_13.4.0-alpha.3                          ###
###################################################################################
                                    Ref                 Dev     Dev - Ref    % diff
ACET Biogenic      :           4.374804            4.364581     -0.010222    -0.234
ALD2 Biogenic      :           1.741248            1.739270     -0.001978    -0.114
EOH Biogenic       :           1.741248            1.739270     -0.001978    -0.114
ISOP Biogenic      :          34.674372           34.578112     -0.096260    -0.278
LIMO Biogenic      :           0.965262            0.964323     -0.000939    -0.097
MTPA Biogenic      :           8.559976            8.558323     -0.001653    -0.019
MTPO Biogenic      :           3.941243            3.940485     -0.000758    -0.019
PRPE Biogenic      :           2.495728            2.489808     -0.005920    -0.237
SOAP Biogenic      :           1.216940            1.215157     -0.001783    -0.147
SOAS Biogenic      :           1.216940            1.215157     -0.001783    -0.147

@msulprizio msulprizio linked an issue Dec 6, 2021 that may be closed by this pull request
@yantosca yantosca added category: Bug Fix Fixes a bug that was previously reported and removed category: Bug Something isn't working labels Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Fix Fixes a bug that was previously reported topic: Diagnostics Pertaining to HEMCO diagnostic outputs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[QUESTION] Emissions turned off by default in CH4 simulations?
2 participants