From 8ef82c3cf7c241b75902f5d8930c11bf4dee01bf Mon Sep 17 00:00:00 2001 From: Melissa Sulprizio Date: Mon, 19 Aug 2024 16:04:58 -0400 Subject: [PATCH] Add UseSoilTemperature option to SoilNOx extension in HEMCO_Config.rc 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 --- CHANGELOG.md | 2 +- GeosCore/flexgrid_read_mod.F90 | 17 ++++++++++++----- GeosCore/hco_interface_gc_mod.F90 | 1 + Headers/input_opt_mod.F90 | 2 ++ .../HEMCO_Config.rc.fullchem | 1 + .../HEMCO_Config.rc.gmao_metfields | 9 +++++++++ .../ExtData.rc.templates/ExtData.rc.fullchem | 7 +++++++ .../HEMCO_Config.rc.fullchem | 1 + 8 files changed, 34 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e64b1656..f052c6c86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/GeosCore/flexgrid_read_mod.F90 b/GeosCore/flexgrid_read_mod.F90 index bd898dd2d..93ea8cbc0 100644 --- a/GeosCore/flexgrid_read_mod.F90 +++ b/GeosCore/flexgrid_read_mod.F90 @@ -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 ) @@ -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 diff --git a/GeosCore/hco_interface_gc_mod.F90 b/GeosCore/hco_interface_gc_mod.F90 index 7e3bdecfa..ed3db28a3 100644 --- a/GeosCore/hco_interface_gc_mod.F90 +++ b/GeosCore/hco_interface_gc_mod.F90 @@ -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 diff --git a/Headers/input_opt_mod.F90 b/Headers/input_opt_mod.F90 index 8b4623e70..425af6dc1 100644 --- a/Headers/input_opt_mod.F90 +++ b/Headers/input_opt_mod.F90 @@ -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? @@ -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 diff --git a/run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.fullchem b/run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.fullchem index c62ca533f..54d2b05e8 100644 --- a/run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.fullchem +++ b/run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.fullchem @@ -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} diff --git a/run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.gmao_metfields b/run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.gmao_metfields index 92e346dac..b03d10904 100644 --- a/run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.gmao_metfields +++ b/run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.gmao_metfields @@ -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 ### diff --git a/run/GCHP/ExtData.rc.templates/ExtData.rc.fullchem b/run/GCHP/ExtData.rc.templates/ExtData.rc.fullchem index 47669b46b..4812e946d 100644 --- a/run/GCHP/ExtData.rc.templates/ExtData.rc.fullchem +++ b/run/GCHP/ExtData.rc.templates/ExtData.rc.fullchem @@ -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 diff --git a/run/GCHP/HEMCO_Config.rc.templates/HEMCO_Config.rc.fullchem b/run/GCHP/HEMCO_Config.rc.templates/HEMCO_Config.rc.fullchem index 4890cfd65..b426d1453 100644 --- a/run/GCHP/HEMCO_Config.rc.templates/HEMCO_Config.rc.fullchem +++ b/run/GCHP/HEMCO_Config.rc.templates/HEMCO_Config.rc.fullchem @@ -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}