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

SpeciesConcSubset is not working in the HISTORY.rc #2217

Closed
jinlx opened this issue Mar 25, 2024 · 5 comments
Closed

SpeciesConcSubset is not working in the HISTORY.rc #2217

jinlx opened this issue Mar 25, 2024 · 5 comments
Assignees
Labels
category: Bug Something isn't working topic: Configuration Files Related to GEOS-Chem configuration files topic: Diagnostics Related to output diagnostic data

Comments

@jinlx
Copy link

jinlx commented Mar 25, 2024

Name and Institution (Required)

Name: Lixu Jin
Institution: University of Montana

Description of your issue or question

I was trying to use GC14.2.3 to save out subset from HISTORY.rc. However, setting up LON_RANGE and LAT_RANGE might be conflicted with error checking in ./Headers/diaglist_mod.F90.

===============================================================================
GEOS-Chem ERROR: The diagnostic field name
"SpeciesConcSubset.LON_RANGE:-114.0-113.0," does not begin with a single quote
character! Please check the HISTORY.rc file.
 -> at Init_DiagList (Headers/diaglist_mod.F90)

 -> ERROR occurred at (or near) line    149 of the HISTORY.rc file
===============================================================================

===============================================================================
GEOS-CHEM ERROR: Error encountered in "Init_DiagList"!
STOP at  -> at GEOS-Chem (in GeosCore/main.F90)
===============================================================================

Thus, I further commented the error check and try to walk around the error. However, this further results in a error said the SPECIESCONCSUBSET.LON_RANGE:-114.0-113.0 is not found in the registry for the DIAG object. I was wondering if there is any easy fix to make the SPECIESCONCSUBSET work in the recent GC version. Thanks!

===============================================================================
GEOS-Chem ERROR: SPECIESCONCSUBSET.LON_RANGE:-114.0-113.0 is not found in the
registry for the DIAG object!
 -> at Registry_Lookup (in Headers/registry_mod.F90)
===============================================================================

===============================================================================
GEOS-Chem ERROR: Could not locate SpeciesConcSubset.LON_RANGE:-114.0-113.0
diagnostics state registry.
 -> History_AddItemToCollection (in History/history_mod.F90)
===============================================================================

===============================================================================
GEOS-Chem ERROR: Could not add diagnostic
"SpeciesConcSubset.LON_RANGE:-114.0-113.0" to collection: SpeciesConcSubset
 -> at History_ReadCollectionData (in module History/history_mod.F90)

 -> ERROR occurred at (or near) line    149 of the HISTORY.rc file
===============================================================================

===============================================================================
GEOS-Chem ERROR: Error encountered in "History_ReadCollectionData"!
 -> at History_Init (in module History/history_mod.F90)
===============================================================================

===============================================================================
GEOS-CHEM ERROR: Error encountered in "History_Init"!
STOP at  -> at GEOS-Chem (in GeosCore/main.F90)
===============================================================================

To repeat the issue, you need to set up a SpeciesConcSubset. Below goes an template I used in the HISTORY.rc

#==============================================================================
# %%%%% COLLECTION NAME DECLARATIONS %%%%%
#
# To enable a collection, remove the "#" character in front of its name. The
# Restart collection should always be turned on.
#
# NOTE: These are the "default" collections for GEOS-Chem, but you can create
# your own customized diagnostic collections as well.
#==============================================================================
COLLECTIONS: 'Restart',
             'Metrics',
             #'SpeciesConc',
             'SpeciesConcSubset',
::

#==============================================================================
# %%%%% THE SpeciesConcSubset COLLECTION %%%%%
#
# Same as the SpeciesConc collection, but will subset data in the horizontal
# and vertical dimensions so that the netCDF diagnostic files will cover
# a smaller region of the globe.  This can save disk space and memory.
#
# NOTE: This capability will be available in GEOS-Chem "Classic" 12.5.0
# and later versions.
#
# Available for all simulations
#==============================================================================
SpeciesConcSubset.template:     'MSO_hourly.%y4%m2%d2_%h2%n2z.nc4',
SpeciesConcSubset.format:       'CFIO',
SpeciesConcSubset.frequency:    010000,
SpeciesConcSubset.duration:     00000001 000000,
SpeciesConcSubset.mode:         'time-averaged',
SpeciesConcSubset.levels:       1 2 3,
SpeciesConcSubset.fields:       'SpeciesConcVV_?ALL?',
SpeciesConcSubset.LON_RANGE:    -114.0 -113.0,
SpeciesConcSubset.LAT_RANGE:    46.0 47.0,
::

@yantosca yantosca self-assigned this Mar 25, 2024
@yantosca yantosca added category: Bug Something isn't working topic: Diagnostics Related to output diagnostic data labels Mar 25, 2024
@yantosca
Copy link
Contributor

Thanks for writing @jinlx. Try adding the LON_RANGE and LAT_RANGE before the fields tag. Anything that comes after fields is assumed to be a diagnostic field name.

@yantosca
Copy link
Contributor

@jinlx: I know that a lot of History documentation is still left on the wiki. We need to port them over to ReadTheDocs eventually but haven't gotten around to it yet due to other priorities.

@yantosca yantosca added the topic: Configuration Files Related to GEOS-Chem configuration files label Mar 25, 2024
@lizziel
Copy link
Contributor

lizziel commented Mar 25, 2024

@yantosca, I think we could add the lat and lon ranges to this list in diaglist_mod.F90 to avoid the error too. Maybe excluding them was an omission since they were added later.

! Skip to next line if the diagnostic name is commented out,
! missing, or contains an attribute tag.
IF ( fullname(1:1) == '#' ) CYCLE
IF ( LEN_TRIM( fullname ) == 0 ) CYCLE
IF ( INDEX( fullname, '.template' ) > 0 ) CYCLE
IF ( INDEX( fullname, '.frequency' ) > 0 ) CYCLE
IF ( INDEX( fullname, '.duration' ) > 0 ) CYCLE
IF ( INDEX( fullname, '.format' ) > 0 ) CYCLE
IF ( INDEX( fullname, '.mode' ) > 0 ) CYCLE

Copy link
Contributor

Good point @lizziel.

@jinlx
Copy link
Author

jinlx commented Mar 26, 2024

Thanks @yantosca and @lizziel ! The fix works pretty well and I will close the issue for now.

@jinlx jinlx closed this as completed Mar 26, 2024
yantosca added a commit that referenced this issue Apr 29, 2024
This PR merges the most recent commits as of PR #2217 back into
the bugfix/carbon-gchp-extdata branch.  This is necessary as there were
some additional fixes for the carbon simulation in PR #2266.

Signed-off-by: Bob Yantosca <[email protected]>
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 topic: Configuration Files Related to GEOS-Chem configuration files topic: Diagnostics Related to output diagnostic data
Projects
None yet
Development

No branches or pull requests

3 participants