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

Add fix for CH4 analytical inversions to convert state vector values read from file to nearest integer #1976

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

msulprizio
Copy link
Contributor

Name and Institution (Required)

Name: Melissa Sulprizio
Institution: Harvard / GCST

Describe the update

In global_ch4_mod.F90, the state vector elements read from a netCDF file via HEMCO are defined as REAL(fp). To determine if an emissions perturbation needs to be applied, that value is compared to Input_Opt%StateVectorElement which is an INTEGER read from geoschem_config.yml. Roundoff error in the STATE_VECTOR array occasionally led to elements not correctly being identified. The solution is to round the STATE_VECTOR value to the nearest integer before comparing to Input_Opt%StateVectorElement.

Related Github Issue(s)

…read from file to nearest integer

In global_ch4_mod.F90, the state vector elements read from a netCDF file via
HEMCO are defined as REAL(fp). To determine if an emissions perturbation
needs to be applied, that value is compared to Input_Opt%StateVectorElement
which is an INTEGER read from geoschem_config.yml. Roundoff error in the
STATE_VECTOR array occasionally led to elements not correctly being identified.
The solution is to round the STATE_VECTOR value to the nearest integer before
comparing to Input_Opt%StateVectorElement.

See also geoschem/integrated_methane_inversion#167

Signed-off-by: Melissa Sulprizio <mpayer@seas.harvard.edu>
@msulprizio msulprizio added the category: Bug Fix Fixes a previously-reported bug label Oct 4, 2023
@msulprizio msulprizio added this to the 14.2.1 milestone Oct 4, 2023
@msulprizio msulprizio self-assigned this Oct 4, 2023
@yantosca yantosca added the topic: Analytical Inversions Related to analytical inversions or IMI-related updates label Oct 4, 2023
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 looks good to merge @msulprizio! I'll test it for inclusion into 14.2.1.

@yantosca
Copy link
Contributor

yantosca commented Oct 5, 2023

After merging locally atop PR #1974, all GEOS-Chem Classic integration tests passed (except for TOMAS, which is a known issue).

==============================================================================
GEOS-Chem Classic: Execution Test Results

GCClassic #d693e88 GEOS-Chem submod update: Merge PR #1974 (Bug fixes in ExtData.rc templates)
GEOS-Chem #6fa3f574d Merge PR #1976 (Add fix for CH4 state vector for inversions)
HEMCO     #daf54d0 Merge PR #235 (Bug fix for vertical regridding)

Using 24 OpenMP threads
Number of execution tests: 27

Submitted as SLURM job: 3970365
==============================================================================
  
Summary of test results:
------------------------------------------------------------------------------
Execution tests passed: 25
Execution tests failed: 2
Execution tests not yet completed: 0

Furthermore, all integration tests were zero-diff w/r/t the prior integration test (PR#1974) except for the usual suspects (which have known issues that will be fixed later):

Checking gc_4x5_merra2_fullchem_RRTMG
   -> 1 difference found in OutputDir
      * GCC_r28/rundirs/gc_4x5_merra2_fullchem_RRTMG/OutputDir/GEOSChem.RRTMG.20190701_0000z.nc4 
        GCC_r29/rundirs/gc_4x5_merra2_fullchem_RRTMG/OutputDir/GEOSChem.RRTMG.20190701_0000z.nc4 
   -> No differences in Restarts
Checking gc_4x5_merra2_fullchem_RRTMG
   -> 1 difference found in OutputDir
      * GCC_r28/rundirs/gc_4x5_merra2_fullchem_RRTMG/OutputDir/GEOSChem.RRTMG.20190701_0000z.nc4 
        GCC_r29/rundirs/gc_4x5_merra2_fullchem_RRTMG/OutputDir/GEOSChem.RRTMG.20190701_0000z.nc4 
   -> No differences in Restarts

@yantosca
Copy link
Contributor

yantosca commented Oct 5, 2023

After merging locally atop PR #1974, all GCHP integration tests passed:

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

GCClassic #dc45a27 GEOS-Chem submod update: Merge PR #1974 (Bug fixes in ExtData.rc templates)
GEOS-Chem #6fa3f574d Merge PR #1976 (Add fix for CH4 state vector for inversions)
HEMCO     #daf54d0 Merge PR #235 (Bug fix for vertical regridding)

Number of execution tests: 5

Submitted as SLURM job: 3970381
==============================================================================
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%  All execution tests passed!  %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Also, all integration tests were zero-diff w/r/t PR #1974.

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 topic: Analytical Inversions Related to analytical inversions or IMI-related updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants