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/ISSUE] Incorrect units for ProdLoss diagnostic output in GEOS-Chem 13.0.0+ #965

Closed
msulprizio opened this issue Oct 21, 2021 · 2 comments
Assignees
Labels
category: Bug Something isn't working
Milestone

Comments

@msulprizio
Copy link
Contributor

@ltmurray wrote:

The units output by default into the ProdLoss NetCDF diagnostics for the family and individual species production and loss rates have recently changed from molecules cm-3 s-1 to kg s-1.
The model documentation indicates that these units should still be molecules cm-3 s-1 and the values themselves appear to still be in those units.
Was there a conscious attempt to change the units, or is this is a typo introduced into the diagnostics code?

This is a bug in the diagnostics code. The units of the ProdLoss diagnostic are still in molecules cm-3 s-1. In routine Get_Metadata_State_Diag in Headers/state_diag_mod.F90 there is a check for isFullChem using a logical from Headers/diaglist_mod.F90. The bug is in the code that determines the value of isFullChem:

       ! Find out if this is a full-chemistry simulation
       IF ( INDEX( Line, 'Simulation name' ) > 0 ) THEN
          CALL StrSplit( Line, ':', SubStrs, N )
          SELECT CASE( To_UpperCase( ADJUSTL( SubStrs(2) ) ) )
             CASE( 'ACIDUPTAKE', 'APM',              'BENCHMARK',            &
                   'COMPLEXSOA', 'COMPLEXSOA_SVPOA', 'HEMCO',                &
                   'MARINEPOA',  'RRTMG',            'STANDARD',             &
                   'TROPCHEM',   'TOMAS12',          'TOMAS15',              &
                   'TOMAS30',    'TOMAS40'                                  )
                IsFullChem = .TRUE.
             CASE DEFAULT
                IsFullChem = .FALSE.
          END SELECT
       ENDIF

In GEOS-Chem 13.3.0, the input files for all full-chemistry simulations were consolidated so that the simulation names listed above were replaced with a single "fullchem" option but this code was not updated so isFullChem was always false. To fix the units saved out to the netCDF file, we need to change those lines to:

       ! Find out if this is a full-chemistry simulation
       IF ( INDEX( Line, 'Simulation name' ) > 0 ) THEN
          CALL StrSplit( Line, ':', SubStrs, N )
          SELECT CASE( To_UpperCase( ADJUSTL( SubStrs(2) ) ) )
             CASE( 'FULLCHEM' )
                IsFullChem = .TRUE.
             CASE DEFAULT
                IsFullChem = .FALSE.
          END SELECT
       ENDIF

This bug impacts ProdLoss diagnostic files saved out by GEOS-Chem 13.3.0-13.3.0. We will fix it in 13.3.1.

@msulprizio msulprizio added the category: Bug Something isn't working label Oct 21, 2021
@msulprizio msulprizio added this to the 13.3.1 milestone Oct 21, 2021
@msulprizio msulprizio self-assigned this Oct 21, 2021
msulprizio added a commit that referenced this issue Oct 21, 2021
In GEOS-Chem 13.3.0, the many full-chemistry simulation names were replaced
with a single "fullchem" option. This is now updated in diaglist.F90.

This fix addresses the incorrect units saved out to ProdLoss diagnostic files.
See this Github issue for details: #965.

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

This bug is now fixed in commit b1f0206, which will be included in 13.3.1.

@yantosca
Copy link
Contributor

yantosca commented Nov 1, 2021

Also see PR #978

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

No branches or pull requests

2 participants