Skip to content

Commit

Permalink
Add UseSoilTemperature option to SoilNOx extension in HEMCO_Config.rc…
Browse files Browse the repository at this point in the history
… and read TSOIL1 when activated

A new option UseSoilTemperature has been added to the SoilNOx extension
section in HEMCO_Config.rc.

Entries for TSOIL1 have been added to HEMCO_Config.rc.gmao_fields (GCClassic)
and ExtData.rc.fullchem (GCHP). The field should only be read in GCClassic
if the option UseSoilTemperature - now renamed without spaces for use in
HEMCO logical brackets - is set to true. Additionally, a new
Input_Opt%UseSoilTemp logical is now initialized in hco_interface_mod.F90
and used in flexgrid_read_mod.F90 to only obtain TSOIL1 when UseSoilTemperature
is true in HEMCO. For GCHP, the TSOIL1 line will need to be manually edited
for now.

Signed-off-by: Melissa Sulprizio <mpayer@seas.harvard.edu>
  • Loading branch information
msulprizio committed Aug 19, 2024
1 parent e4e78a7 commit 8ef82c3
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased
### Added
- Added TSOIL1 field to State_Met for use in HEMCO soil NOx extension
- Added TSOIL1 field to State_Met for use in HEMCO soil NOx extension. This should only be read in when the `UseSoilTemperature` option is true in HEMCO config.

## [14.4.2] - 2024-07-24
### Added
Expand Down
17 changes: 12 additions & 5 deletions GeosCore/flexgrid_read_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,6 @@ SUBROUTINE FlexGrid_Read_A1( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, &
CALL Get_Met_2D( Input_Opt, State_Grid, Q, TRIM(v_name), t_index=t_index )
State_Met%TS = Q

! Read TSOIL1
v_name = "TSOIL1"
CALL Get_Met_2D( Input_Opt, State_Grid, Q, TRIM(v_name), t_index=t_index )
State_Met%TSOIL1 = Q

! Read U10M
v_name = "U10M"
CALL Get_Met_2D( Input_Opt, State_Grid, Q, TRIM(v_name), t_index=t_index )
Expand All @@ -505,6 +500,18 @@ SUBROUTINE FlexGrid_Read_A1( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, &
CALL Get_Met_2D( Input_Opt, State_Grid, Q, TRIM(v_name), t_index=t_index )
State_Met%Z0 = Q

!======================================================================
! Get fields for soil NOX extension only when needed
!======================================================================
IF ( Input_Opt%LSOILNOX .and. Input_Opt%UseSoilTemp ) THEN

! Read TSOIL1
v_name = "TSOIL1"
CALL Get_Met_2D(Input_Opt, State_Grid, Q, TRIM(v_name), t_index=t_index)
State_Met%TSOIL1 = Q

ENDIF

! Echo info
stamp = TimeStamp_String( YYYYMMDD, HHMMSS )
WRITE( 6, 10 ) stamp
Expand Down
1 change: 1 addition & 0 deletions GeosCore/hco_interface_gc_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ SUBROUTINE HCOI_GC_Init( Input_Opt, State_Chm, State_Grid, &

! Soil NOx
Input_Opt%LSOILNOX = ( ExtState%SoilNOx > 0 )
Input_Opt%UseSoilTemp = ExtState%TSOIL1%DoUse

! Ginoux dust emissions
IF ( ExtState%DustGinoux > 0 ) THEN
Expand Down
2 changes: 2 additions & 0 deletions Headers/input_opt_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ MODULE Input_Opt_Mod
LOGICAL :: LHCodedOrgHal
LOGICAL :: LCMIP6OrgHal
LOGICAL :: DoLightNOx ! Shadow for LightNOX extension
LOGICAL :: UseSoilTemp

! For HEMCO "intermediate" grid (hplin, 6/2/20)
LOGICAL :: LIMGRID ! Use different grid resolution for HEMCO?
Expand Down Expand Up @@ -626,6 +627,7 @@ SUBROUTINE Set_Input_Opt( am_I_Root, Input_Opt, RC )
Input_Opt%LHCodedOrgHal = .FALSE.
Input_Opt%LCMIP6OrgHal = .FALSE.
Input_Opt%DoLightNOx = .FALSE.
Input_Opt%UseSoilTemp = .FALSE.
Input_Opt%LIMGRID = .FALSE.
Input_Opt%IMGRID_XSCALE = 1
Input_Opt%IMGRID_YSCALE = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ VerboseOnCores: root # Accepted values: root all
--> LightningClimatology : ${RUNDIR_LIGHTNOX_CLIM}
--> CDF table : $ROOT/LIGHTNOX/v2014-07/light_dist.ott2010.dat
104 SoilNOx : ${RUNDIR_SOILNOX_EXT} NO
--> UseSoilTemperature : false
--> Use fertilizer NOx : true
105 DustDead : ${RUNDIR_DUSTDEAD_EXT} DST1/DST2/DST3/DST4
--> Mass tuning factor : ${RUNDIR_DUSTDEAD_TF}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,15 @@ METDIR: ${RUNDIR_MET_DIR}
)))LightningClimatology
)))LightNOx

#==============================================================================
# --- Fields for soil NOx emissions (Extension 104) ---
#==============================================================================
(((SoilNOx
(((UseSoilTemperature
* TSOIL1 $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.$RES.$NC TSOIL1 1980-2100/1-12/1-31/*/+30minute RFY xy 1 * - 1 1
)))UseSoilTemperature
)))SoilNOx

### END SECTION BASE EMISSIONS ###

### END OF HEMCO INPUT FILE ###
Expand Down
7 changes: 7 additions & 0 deletions run/GCHP/ExtData.rc.templates/ExtData.rc.fullchem
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ FLASH_DENS 1 Y Y F1980-%m2-01T00:00:00 none none LDENS ./HcoDir/OFFLINE_LIGHTNIN
CONV_DEPTH 1 Y Y F1980-%m2-01T00:00:00 none none CTH ./HcoDir/OFFLINE_LIGHTNING/v2020-03/${RUNDIR_METLIGHTNING}/CLIM/FLASH_CTH_${RUNDIR_METLIGHTNING}_${RUNDIR_METLIGHTNING_RES}_${RUNDIR_MET_LCLIM}.ymonmean.nc4
#
#==============================================================================
# --- Fields for soil NOx emissions (Extension 104) ---
# These fields are stored in State_Met, along with the other met fields
# Manually uncomment this line is UseSoilTemperature is true in HEMCO config.
#==============================================================================
#TSOIL1 1 N Y F0;003000 none none TSOIL1 ./MetDir/%y4/%m2/GEOSFP.%y4%m2%d2.A1.025x03125.nc
#
#==============================================================================
# --- Fields for RRTMG ---
# Dynamical heating data is only read in when RRTMG FDH/SEFDH is used and
# must be generated in a reference (companion) run. The time after P at
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ VerboseOnCores: root # Accepted values: root all
--> LightningClimatology : ${RUNDIR_LIGHTNOX_CLIM}
--> CDF table : $ROOT/LIGHTNOX/v2014-07/light_dist.ott2010.dat
104 SoilNOx : ${RUNDIR_SOILNOX_EXT} NO
--> UseSoilTemperature : false
--> Use fertilizer NOx : true
105 DustDead : ${RUNDIR_DUSTDEAD_EXT} DST1/DST2/DST3/DST4
--> Mass tuning factor : ${RUNDIR_DUSTDEAD_TF}
Expand Down

0 comments on commit 8ef82c3

Please sign in to comment.