@@ -97,6 +97,7 @@ module CLMFatesInterfaceMod
9797 get_clump_bounds
9898 use SoilBiogeochemDecompCascadeConType , only : mimics_decomp, decomp_method
9999 use SoilBiogeochemDecompCascadeConType , only : no_soil_decomp, century_decomp
100+ use SoilWaterRetentionCurveMod, only : soil_water_retention_curve_type
100101 use GridCellType , only : grc
101102 use ColumnType , only : col
102103 use LandunitType , only : lun
@@ -808,7 +809,8 @@ end subroutine check_hlm_active
808809 subroutine dynamics_driv (this , nc , bounds_clump , &
809810 atm2lnd_inst , soilstate_inst , temperature_inst , active_layer_inst , &
810811 waterstatebulk_inst , waterdiagnosticbulk_inst , wateratm2lndbulk_inst , &
811- canopystate_inst , soilbiogeochem_carbonflux_inst , frictionvel_inst )
812+ canopystate_inst , soilbiogeochem_carbonflux_inst , frictionvel_inst , &
813+ soil_water_retention_curve )
812814
813815 ! This wrapper is called daily from clm_driver
814816 ! This wrapper calls ed_driver, which is the daily dynamics component of FATES
@@ -834,11 +836,13 @@ subroutine dynamics_driv(this, nc, bounds_clump, &
834836 type (canopystate_type) , intent (inout ) :: canopystate_inst
835837 type (soilbiogeochem_carbonflux_type), intent (inout ) :: soilbiogeochem_carbonflux_inst
836838 type (frictionvel_type) , intent (inout ) :: frictionvel_inst
839+ class(soil_water_retention_curve_type), intent (in ) :: soil_water_retention_curve
837840
838841 ! !LOCAL VARIABLES:
839842 integer :: s ! site index
840843 integer :: g ! grid-cell index (HLM)
841844 integer :: c ! column index (HLM)
845+ integer :: j ! Soil layer index
842846 integer :: ifp ! patch index ft
843847 integer :: p ! HLM patch index
844848 integer :: nlevsoil ! number of soil layers at the site
@@ -849,6 +853,7 @@ subroutine dynamics_driv(this, nc, bounds_clump, &
849853 integer :: ier
850854 integer :: begg,endg
851855 real (r8 ) :: harvest_rates(bounds_clump% begg:bounds_clump% endg,num_harvest_inst)
856+ real (r8 ) :: s_node, smp_node ! local for relative water content and potential
852857 logical :: after_start_of_harvest_ts
853858 integer :: iharv
854859 !- ----------------------------------------------------------------------
@@ -933,6 +938,24 @@ subroutine dynamics_driv(this, nc, bounds_clump, &
933938 this% fates(nc)% bc_in(s)% max_rooting_depth_index_col = &
934939 min (nlevsoil, active_layer_inst% altmax_lastyear_indx_col(c))
935940
941+ nlevsoil = this% fates(nc)% bc_in(s)% nlevsoil
942+ do j = 1 ,nlevsoil
943+ this% fates(nc)% bc_in(s)% tempk_sl(j) = temperature_inst% t_soisno_col(c,j)
944+ end do
945+
946+ call get_active_suction_layers(this% fates(nc)% nsites, &
947+ this% fates(nc)% sites, &
948+ this% fates(nc)% bc_in, &
949+ this% fates(nc)% bc_out)
950+
951+ do j = 1 ,nlevsoil
952+ if (this% fates(nc)% bc_out(s)% active_suction_sl(j)) then
953+ s_node = max (waterstatebulk_inst% h2osoi_vol_col(c,j)/ soilstate_inst% eff_porosity_col(c,j) ,0.01_r8 )
954+ call soil_water_retention_curve% soil_suction(c,j,s_node, soilstate_inst, smp_node)
955+ this% fates(nc)% bc_in(s)% smp_sl(j) = smp_node
956+ end if
957+ end do
958+
936959
937960 do ifp = 1 , this% fates(nc)% sites(s)% youngest_patch% patchno ! for vegetated patches
938961 ! Mapping between IFP space (1,2,3) and HLM P space (looping by IFP)
@@ -1998,8 +2021,6 @@ subroutine wrap_btran(this,nc,fn,filterc,soilstate_inst, &
19982021 !
19992022 ! ---------------------------------------------------------------------------------
20002023
2001- use SoilWaterRetentionCurveMod, only : soil_water_retention_curve_type
2002-
20032024 implicit none
20042025
20052026 ! Arguments
0 commit comments