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
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Allocated `State_Diag%SatDiagnPEDGE` ffield with vertical dimension `State_Grid%NZ+1`
- Modified `run/GCClassic/cleanRunDir.sh` to skip removing bpch files, as well as now removing `fort.*` and `OutputDir/*.txt` files
- Edited `run/shared/kpp_standalone_interface.yml` to include additional entries under `active cells` and `locations`
- Modified tagCO simulation to use GFED4 biomass burning emissions and GEOS-Chem v5 OH fields for consistency with carbon simulation

### Fixed
- Added a fix to skip the call to KPP when only CO2 is defined in the carbon simulation
Expand All @@ -43,6 +44,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Fixed errors in adjoint-only code preventing successful adjoint build
- Fixed zero convective precipitation and high cloud base in runs using GEOS-FP (>=01Jun2020) or GEOS-IT
- Updated GEOS-only code for compatibility with GEOS-Chem 14.5
- Fixed typos in `HEMCO_Config.rc` for CH4 simulations causing mobile combustion emissions to be double counted
- Fixed handling of FIRST flag in carbon_gases_mod.F to limit log prints to first timestep only
- Removed extraneous pressure correction in GCHP carbon simulations by adding 'activate: true' to geoschem_config.yml
- Fixed bug in GC-Classic OCS emissions where unit conversion of km2 to m2 occurred twice
- Changed dimension of EmisOCS_Total from 2D to 3D since all emissions for all sectors are 2D
msulprizio marked this conversation as resolved.
Show resolved Hide resolved
- Added fixes to only apply archived PCO_CH4 field for carbon simulations with CO only

### Removed
- Removed duplicate `WD_RetFactor` tag for HgClHO2 in `species_database.yml`
Expand Down
3 changes: 3 additions & 0 deletions GeosCore/carbon_gases_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ SUBROUTINE CO2_Production( Input_Opt, State_Chm, State_Diag, &
Spc => NULL()
ENDIF

! Reset first-time flag
FIRST = .FALSE.

! Free pointers for safety's sake
Spc => NULL()
Ptr2D => NULL()
Expand Down
14 changes: 7 additions & 7 deletions GeosCore/input_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2020,7 +2020,7 @@ SUBROUTINE Config_CO( Config, Input_Opt, RC )
!------------------------------------------------------------------------
! Use P(CO) from CH4 (archived from a fullchem simulation)?
!------------------------------------------------------------------------
key = "CO_simulation_options%use_fullchem_PCO_from_CH4"
key = "CO_simulation_options%use_archived_PCO_from_CH4"
v_bool = MISSING_BOOL
CALL QFYAML_Add_Get( Config, key, v_bool, "", RC )
IF ( RC /= GC_SUCCESS ) THEN
Expand All @@ -2033,7 +2033,7 @@ SUBROUTINE Config_CO( Config, Input_Opt, RC )
!------------------------------------------------------------------------
! Use P(CO) from NMVOC (archived from a fullchem simulation)?
!------------------------------------------------------------------------
key = "CO_simulation_options%use_fullchem_PCO_from_NMVOC"
key = "CO_simulation_options%use_archived_PCO_from_NMVOC"
v_bool = MISSING_BOOL
CALL QFYAML_Add_Get( Config, key, v_bool, "", RC )
IF ( RC /= GC_SUCCESS ) THEN
Expand All @@ -2050,8 +2050,8 @@ SUBROUTINE Config_CO( Config, Input_Opt, RC )
WRITE(6,90 ) 'TAGGED CO SIMULATION SETTINGS'
WRITE(6,95 ) '(overwrites any other settings related to CO)'
WRITE(6,95 ) '---------------------------------------------'
WRITE(6,100) 'Use full chem. P(CO) from CH4? :', Input_Opt%LPCO_CH4
WRITE(6,100) 'Use full chem. P(CO) from NMVOC? :', Input_Opt%LPCO_NMVOC
WRITE(6,100) 'Use archived P(CO) from CH4? :', Input_Opt%LPCO_CH4
WRITE(6,100) 'Use archived P(CO) from NMVOC? :', Input_Opt%LPCO_NMVOC
ENDIF

! FORMAT statements
Expand Down Expand Up @@ -2113,9 +2113,9 @@ SUBROUTINE Config_CO2( Config, Input_Opt, RC )
thisLoc = ' -> at Config_CO2 (in module GeosCore/input_mod.F90)'

!------------------------------------------------------------------------
! Turn on CO2 3D chemical source and surface correction?
! Use archived fields of CO2 production from CO oxidation?
!------------------------------------------------------------------------
key = "CO2_simulation_options%sources%3D_chemical_oxidation_source"
key = "CO2_simulation_options%sources%use_archived_PCO2_from_CO"
v_bool = MISSING_BOOL
CALL QFYAML_Add_Get( Config, key, v_bool, "", RC )
IF ( RC /= GC_SUCCESS ) THEN
Expand Down Expand Up @@ -2158,7 +2158,7 @@ SUBROUTINE Config_CO2( Config, Input_Opt, RC )
WRITE( 6,90 ) 'CO2 SIMULATION SETTINGS'
WRITE( 6,95 ) '(overwrites any other settings related to CO2)'
WRITE( 6,95 ) '----------------------------------------------'
WRITE( 6,100 ) 'CO2 from oxidation (CO,CH4,..):', Input_Opt%LCHEMCO2
WRITE( 6,100 ) 'Use archived P(CO2) from CO? :', Input_Opt%LCHEMCO2
WRITE( 6, 95 ) 'Tagged CO2 settings'
WRITE( 6,100 ) ' Tag Biosphere/Ocean CO2 :', Input_Opt%LBIOSPHTAG
WRITE( 6,100 ) ' Tag Fossil Fuel CO2 :', Input_Opt%LFOSSILTAG
Expand Down
2 changes: 1 addition & 1 deletion KPP/carbon/carbon_Funcs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ SUBROUTINE carbon_ComputeRateConstants( &
C(ind_FixedCl) = ConcClMnd

! CH4 + offline OH reaction rate [1/s]
! This is a pseudo-2nd order rate appropriate for CH4 + OH
! Use rates saved from full-chemistry run (if CH4 is not advected)
IF ( PCO_fr_CH4_use ) THEN
k_Trop(1) = PCO_fr_CH4 * OHdiurnalFac
k_Trop(1) = SafeDiv( k_Trop(1), C(ind_CH4)*C(ind_FixedOH), 0.0_dp )
Expand Down
2 changes: 1 addition & 1 deletion KPP/carbon/gckpp_Function.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!
! The ODE Function of Chemical Model File
!
! Generated by KPP-3.0.0 symbolic chemistry Kinetics PreProcessor
! Generated by KPP-3.1.1 symbolic chemistry Kinetics PreProcessor
! (https:/github.com/KineticPreProcessor/KPP
! KPP is distributed under GPL, the general public licence
! (http://www.gnu.org/copyleft/gpl.html)
Expand Down
2 changes: 1 addition & 1 deletion KPP/carbon/gckpp_Global.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!
! Global Data Module File
!
! Generated by KPP-3.0.0 symbolic chemistry Kinetics PreProcessor
! Generated by KPP-3.1.1 symbolic chemistry Kinetics PreProcessor
! (https:/github.com/KineticPreProcessor/KPP
! KPP is distributed under GPL, the general public licence
! (http://www.gnu.org/copyleft/gpl.html)
Expand Down
2 changes: 1 addition & 1 deletion KPP/carbon/gckpp_Initialize.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!
! Initialization File
!
! Generated by KPP-3.0.0 symbolic chemistry Kinetics PreProcessor
! Generated by KPP-3.1.1 symbolic chemistry Kinetics PreProcessor
! (https:/github.com/KineticPreProcessor/KPP
! KPP is distributed under GPL, the general public licence
! (http://www.gnu.org/copyleft/gpl.html)
Expand Down
2 changes: 1 addition & 1 deletion KPP/carbon/gckpp_Integrator.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!
! Numerical Integrator (Time-Stepping) File
!
! Generated by KPP-3.0.0 symbolic chemistry Kinetics PreProcessor
! Generated by KPP-3.1.1 symbolic chemistry Kinetics PreProcessor
! (https:/github.com/KineticPreProcessor/KPP
! KPP is distributed under GPL, the general public licence
! (http://www.gnu.org/copyleft/gpl.html)
Expand Down
2 changes: 1 addition & 1 deletion KPP/carbon/gckpp_Jacobian.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!
! The ODE Jacobian of Chemical Model File
!
! Generated by KPP-3.0.0 symbolic chemistry Kinetics PreProcessor
! Generated by KPP-3.1.1 symbolic chemistry Kinetics PreProcessor
! (https:/github.com/KineticPreProcessor/KPP
! KPP is distributed under GPL, the general public licence
! (http://www.gnu.org/copyleft/gpl.html)
Expand Down
2 changes: 1 addition & 1 deletion KPP/carbon/gckpp_LinearAlgebra.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!
! Linear Algebra Data and Routines File
!
! Generated by KPP-3.0.0 symbolic chemistry Kinetics PreProcessor
! Generated by KPP-3.1.1 symbolic chemistry Kinetics PreProcessor
! (https:/github.com/KineticPreProcessor/KPP
! KPP is distributed under GPL, the general public licence
! (http://www.gnu.org/copyleft/gpl.html)
Expand Down
2 changes: 1 addition & 1 deletion KPP/carbon/gckpp_Monitor.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!
! Utility Data Module File
!
! Generated by KPP-3.0.0 symbolic chemistry Kinetics PreProcessor
! Generated by KPP-3.1.1 symbolic chemistry Kinetics PreProcessor
! (https:/github.com/KineticPreProcessor/KPP
! KPP is distributed under GPL, the general public licence
! (http://www.gnu.org/copyleft/gpl.html)
Expand Down
2 changes: 1 addition & 1 deletion KPP/carbon/gckpp_Parameters.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!
! Parameter Module File
!
! Generated by KPP-3.0.0 symbolic chemistry Kinetics PreProcessor
! Generated by KPP-3.1.1 symbolic chemistry Kinetics PreProcessor
! (https:/github.com/KineticPreProcessor/KPP
! KPP is distributed under GPL, the general public licence
! (http://www.gnu.org/copyleft/gpl.html)
Expand Down
2 changes: 1 addition & 1 deletion KPP/carbon/gckpp_Rates.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!
! The Reaction Rates File
!
! Generated by KPP-3.0.0 symbolic chemistry Kinetics PreProcessor
! Generated by KPP-3.1.1 symbolic chemistry Kinetics PreProcessor
! (https:/github.com/KineticPreProcessor/KPP
! KPP is distributed under GPL, the general public licence
! (http://www.gnu.org/copyleft/gpl.html)
Expand Down
2 changes: 1 addition & 1 deletion KPP/carbon/gckpp_Util.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!
! Auxiliary Routines File
!
! Generated by KPP-3.0.0 symbolic chemistry Kinetics PreProcessor
! Generated by KPP-3.1.1 symbolic chemistry Kinetics PreProcessor
! (https:/github.com/KineticPreProcessor/KPP
! KPP is distributed under GPL, the general public licence
! (http://www.gnu.org/copyleft/gpl.html)
Expand Down
18 changes: 9 additions & 9 deletions run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.CH4
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ VerboseOnCores: root # Accepted values: root all
)))UseTotalPriorEmis

(((.not.UseTotalPriorEmis

#==============================================================================
# --- Gridded GHGI v2 (Maasakkers et al., submitted to ES&T, 2023) ---
#
Expand Down Expand Up @@ -251,7 +252,7 @@ VerboseOnCores: root # Accepted values: root all
0 GHGI_EE_COAST_GAS_TRANSMISSION - - - - - - CH4 1009 2 5
0 GHGI_EE_GAS_POSTMETER $ROOT/CH4/v2023-07/Gridded_GHGI_v2/Express_Extension_Gridded_GHGI_Methane_v2_$YYYY.nc emi_ch4_Supp_1B2b_PostMeter 2012-2020/1/1/0 C xy molec/cm2/s CH4 1008 2 100

### Coal ###
### Coal ###
0 GHGI_EE_COAL_UNDERGROUND $ROOT/CH4/v2023-07/Gridded_GHGI_v2/Express_Extension_Gridded_GHGI_Methane_v2_$YYYY.nc emi_ch4_1B1a_Underground_Coal 2012-2020/1/1/0 C xy molec/cm2/s CH4 1008 3 100
0 GHGI_EE_COAST_COAL_UNDERGROUND - - - - - - CH4 1009 3 5
0 GHGI_EE_COAL_SURFACE $ROOT/CH4/v2023-07/Gridded_GHGI_v2/Express_Extension_Gridded_GHGI_Methane_v2_$YYYY.nc emi_ch4_1B1a_Surface_Coal 2012-2020/1/1/0 C xy molec/cm2/s CH4 1008 3 100
Expand Down Expand Up @@ -281,11 +282,11 @@ VerboseOnCores: root # Accepted values: root all

### Rice ###
0 GHGI_EE_RICE $ROOT/CH4/v2023-07/Gridded_GHGI_v2/Express_Extension_Gridded_GHGI_Methane_v2_$YYYY.nc emi_ch4_3C_Rice_Cultivation 2012-2020/1-12/1/0 C xy molec/cm2/s CH4 58/1008 7 100
0 GHGI_EE_COAST_RICE - - - - -y - CH4 58/1009 7 1
0 GHGI_EE_COAST_RICE - - - - - - CH4 58/1009 7 1

### Other Anthro ###
0 GHGI_EE_OTHER_MCOMB $ROOT/CH4/v2023-07/Gridded_GHGI_v2/Express_Extension_Gridded_GHGI_Methane_v2_$YYYY.nc emi_ch4_1A_Combustion_Mobile 2012-2020/1/1/0 C xy molec/cm2/s CH4 1008 8 100
0 GHGI_EE_COAST_OTHER_MCOMB - - - - - - CH4 1008 8 100
0 GHGI_EE_COAST_OTHER_MCOMB - - - - - - CH4 1009 8 1
0 GHGI_EE_OTHER_SCOMB $ROOT/CH4/v2023-07/Gridded_GHGI_v2/Express_Extension_Gridded_GHGI_Methane_v2_$YYYY.nc emi_ch4_1A_Combustion_Stationary 2012-2020/1-12/1/0 C xy molec/cm2/s CH4 50/1008 8 100
0 GHGI_EE_COAST_OTHER_SCOMB - - - - - - CH4 50/1009 8 1
0 GHGI_EE_OTHER_PIND $ROOT/CH4/v2023-07/Gridded_GHGI_v2/Express_Extension_Gridded_GHGI_Methane_v2_$YYYY.nc emi_ch4_2B8_Industry_Petrochemical 2012-2020/1/1/0 C xy molec/cm2/s CH4 1008 8 100
Expand Down Expand Up @@ -415,7 +416,7 @@ VerboseOnCores: root # Accepted values: root all
)))EDGARv8

#==============================================================================
# CEDS (historical) or Shared Socioeconomic Pathways (future)
# --- CEDS (historical) or Shared Socioeconomic Pathways (future) ---
#==============================================================================
(((CMIP6_SFC_LAND_ANTHRO
0 CMIP6_CH4_AGR $ROOT/CMIP6/v2021-01/$GCAPSCENARIO/$GCAPSCENARIO_$YYYY.nc4 CH4_agr 1970-2014/1-12/1/0 C xy kg/m2/s CH4 - 4 1
Expand All @@ -431,7 +432,7 @@ VerboseOnCores: root # Accepted values: root all
)))CMIP6_SHIP

#==============================================================================
# BB4MIPs historical / SSP future biomass burning inventories
# --- BB4MIPs historical / SSP future biomass burning inventories ---
#==============================================================================
(((BB4MIPS
0 CMIP6_BB_CH4 $ROOT/CMIP6/v2021-01/$GCAPSCENARIO/$GCAPSCENARIO_$YYYY.nc4 CH4_bbn 1750-2015/1-12/1/0 C xyL=1:PBL kg/m2/s CH4 75 9 1
Expand All @@ -450,7 +451,7 @@ VerboseOnCores: root # Accepted values: root all
#==============================================================================
# --- CH4: JPL WetCHARTs v1.0 (Bloom et al., https://doi.org/10.3334/ORNLDAAC/1502) ---
#
# # Use updated files (v2024-01); these are COARDS-compliant.
# Use updated files (v2024-01); these are COARDS-compliant.
#==============================================================================
(((JPL_WETCHARTS
0 JPLW_CH4 $ROOT/CH4/v2024-01/JPL_WetCharts/HEensemble/JPL_WetCharts_2010-2019.Ensemble_Mean.0.5x0.5.nc emi_ch4 2010-2019/1-12/1/0 C xy molec/cm2/s CH4 - 10 1
Expand Down Expand Up @@ -496,7 +497,7 @@ VerboseOnCores: root # Accepted values: root all
)))FUNG_SOIL_ABSORPTION

#==============================================================================
# --- # Soil absorption from MeMo model (Murguia-Flores et al. 2018, GMD) ---
# --- Soil absorption from MeMo model (Murguia-Flores et al. 2018, GMD) ---
#
# - Multiply soil absorption by -1 to get a "negative" flux
#==============================================================================
Expand Down Expand Up @@ -623,7 +624,7 @@ VerboseOnCores: root # Accepted values: root all
# --- GEOS-Chem boundary condition file ---
#==============================================================================
(((GC_BCs
* BC_ $ROOT/SAMPLE_BCs/v2021-07/CH4/GEOSChem.BoundaryConditions.$YYYY$MM$DD_0000z.nc4 SpeciesBC_?ADV? 1900-2100/1-12/1-31/* EFY xyz 1 * - 1 1
* BC_ $ROOT/SAMPLE_BCs/v2021-07/CH4/GEOSChem.BoundaryConditions.$YYYY$MM$DD_0000z.nc4 SpeciesBC_?ADV? 1900-2100/1-12/1-31/* EFY xyz 1 * - 1 1
)))GC_BCs

#==============================================================================
Expand Down Expand Up @@ -945,7 +946,6 @@ ${RUNDIR_GLOBAL_Cl}
# Country/region masks
#==============================================================================

# Use updated files (v2024-01); these are COARDS-compliant.
(((Scarpelli_Mexico
1001 MEX_MASK $ROOT/MASKS/v2024-04/Mexico_Mask.01x01.nc MASK 2000/1/1/0 C xy 1 1 -118/17/-95/33
1010 MEX_MASK_MIRROR $ROOT/MASKS/v2024-04/Mexico_Mask_Mirror.01x01.nc MASK 2000/1/1/0 C xy 1 1 -118/17/-95/33
Expand Down
Loading