Skip to content

Commit

Permalink
Add soil temperature (TSOIL1) field to State_Met for use in HEMCO soi…
Browse files Browse the repository at this point in the history
…l NOx extension

Yi Wang updated the soil NOx algorithm in HEMCO to utilize soil
temperature as described in Yi Wang et al. (ERL, 2021). Those updates
require the addition of a new meteorology field, TSOIL1, for the soil
temperature in layer 1. This field has been added to State_Met.

Signed-off-by: Melissa Sulprizio <mpayer@seas.harvard.edu>
  • Loading branch information
msulprizio committed Aug 14, 2024
1 parent 6a26a6b commit e4e78a7
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This file documents all notable changes to the GEOS-Chem repository starting in

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
### Added
- Added TSOIL1 field to State_Met for use in HEMCO soil NOx extension

## [14.4.2] - 2024-07-24
### Added
- Added number of levels with clouds for photolysis to geoschem_config.yml and Input_Opt to pass to Cloud-J
Expand Down
5 changes: 5 additions & 0 deletions GeosCore/flexgrid_read_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,11 @@ 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 Down
17 changes: 17 additions & 0 deletions GeosCore/hco_interface_gc_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2286,6 +2286,23 @@ SUBROUTINE ExtState_SetFields( Input_Opt, State_Chm, State_Grid, State_Met, HcoS
RETURN
ENDIF

! TSOIL1
#if defined( MODEL_CLASSIC )
CALL ExtDat_Set( HcoState, ExtState%TSOIL1, 'TSOIL', &
HMRC, FIRST )
#else
CALL ExtDat_Set( HcoState, ExtState%TSOIL1, 'TSOIL1_FOR_EMIS', &
HMRC, FIRST, State_Met%TSOIL1 )
#endif

! Trap potential errors
IF ( HMRC /= HCO_SUCCESS ) THEN
RC = HMRC
ErrMsg = 'Error encountered in "ExtDat_Set( TSOIL1_FOR_EMIS )"!'
CALL GC_Error( ErrMsg, RC, ThisLoc, Instr )
RETURN
ENDIF

! GWETROOT
#if defined( MODEL_CLASSIC )
CALL ExtDat_Set( HcoState, ExtState%GWETROOT, 'GWETROOT', &
Expand Down
32 changes: 32 additions & 0 deletions Headers/state_met_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ MODULE State_Met_Mod
REAL(fp), POINTER :: TropHt (:,: ) ! Tropopause height [km]
REAL(fp), POINTER :: TS (:,: ) ! Surface temperature [K]
REAL(fp), POINTER :: TSKIN (:,: ) ! Surface skin temperature [K]
REAL(fp), POINTER :: TSOIL1 (:,: ) ! Soil temperature [K]
REAL(fp), POINTER :: U10M (:,: ) ! E/W wind speed @ 10m ht [m/s]
REAL(fp), POINTER :: USTAR (:,: ) ! Friction velocity [m/s]
REAL(fp), POINTER :: UVALBEDO (:,: ) ! UV surface albedo [1]
Expand Down Expand Up @@ -435,6 +436,7 @@ SUBROUTINE Zero_State_Met( State_Met, RC )
State_Met%TropHt => NULL()
State_Met%TS => NULL()
State_Met%TSKIN => NULL()
State_Met%TSOIL1 => NULL()
State_Met%U10M => NULL()
State_Met%USTAR => NULL()
State_Met%UVALBEDO => NULL()
Expand Down Expand Up @@ -1837,6 +1839,24 @@ SUBROUTINE Init_State_Met( Input_Opt, State_Grid, State_Met, RC )
RETURN
ENDIF

!------------------------------------------------------------------------
! TSOIL1 [K]
!------------------------------------------------------------------------
metId = 'TSOIL1'
CALL Init_and_Register( &
Input_Opt = Input_Opt, &
State_Met = State_Met, &
State_Grid = State_Grid, &
metId = metId, &
Ptr2Data = State_Met%TSOIL1, &
RC = RC )

IF ( RC /= GC_SUCCESS ) THEN
errMsg = TRIM( errMsg_ir ) // TRIM( metId )
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF

!------------------------------------------------------------------------
! U10M [m s-1]
!------------------------------------------------------------------------
Expand Down Expand Up @@ -3700,6 +3720,13 @@ SUBROUTINE Cleanup_State_Met( State_Met, RC )
State_Met%TSKIN => NULL()
ENDIF

IF ( ASSOCIATED( State_Met%TSOIL1 ) ) THEN
DEALLOCATE( State_Met%TSOIL1, STAT=RC )
CALL GC_CheckVar( 'State_Met%TSOIL1', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
State_Met%TSOIL1 => NULL()
ENDIF

IF ( ASSOCIATED( State_Met%TO3 ) ) THEN
DEALLOCATE( State_Met%TO3, STAT=RC )
CALL GC_CheckVar( 'State_Met%TO3', 2, RC )
Expand Down Expand Up @@ -4844,6 +4871,11 @@ SUBROUTINE Get_Metadata_State_Met( am_I_Root, metadataID, Found, RC, &
IF ( isUnits ) Units = 'K'
IF ( isRank ) Rank = 2

CASE ( 'TSOIL1' )
IF ( isDesc ) Desc = 'Soil temperature'
IF ( isUnits ) Units = 'K'
IF ( isRank ) Rank = 2

CASE ( 'U10M' )
IF ( isDesc ) Desc = 'East-west wind at 10 meter height'
IF ( isUnits ) Units = 'm s-1'
Expand Down

0 comments on commit e4e78a7

Please sign in to comment.