@@ -121,7 +121,7 @@ module ELMFatesInterfaceMod
121121 use ColumnType , only : col_pp
122122 use ColumnDataType , only : col_es, col_ws, col_wf, col_cs, col_cf
123123 use ColumnDataType , only : col_nf, col_pf
124- use VegetationDataType, only : veg_es, veg_wf, veg_ws
124+ use VegetationDataType, only : veg_es, veg_wf, veg_ws, veg_ef
125125 use LandunitType , only : lun_pp
126126
127127 use landunit_varcon , only : istsoil
@@ -2994,24 +2994,31 @@ end subroutine WrapUpdateFatesSeedInOut
29942994
29952995 ! ======================================================================================
29962996
2997- subroutine wrap_update_hifrq_hist (this , bounds_clump )
2997+ subroutine wrap_update_hifrq_hist (this , bounds_clump , solarabs_inst )
29982998
29992999
30003000
30013001 ! Arguments
30023002 class(hlm_fates_interface_type), intent (inout ) :: this
30033003 type (bounds_type), intent (in ) :: bounds_clump
3004+ type (solarabs_type) , intent (in ) :: solarabs_inst
30043005
30053006 ! locals
30063007 real (r8 ) :: dtime
30073008 integer :: nstep
30083009 logical :: is_beg_day
30093010 integer :: s,c,nc
3011+ integer :: ifp,p
30103012
30113013 associate(&
30123014 hr = > col_cf% hr, & ! (gC/m2/s) total heterotrophic respiration
30133015 totsomc = > col_cs% totsomc, & ! (gC/m2) total soil organic matter carbon
3014- totlitc = > col_cs% totlitc) ! (gC/m2) total litter carbon in BGC pools
3016+ totlitc = > col_cs% totlitc, & ! (gC/m2) total litter carbon in BGC pools
3017+ eflx_lh_tot = > veg_ef% eflx_lh_tot, & ! (W/m2) latent heat flux
3018+ eflx_sh_tot = > veg_ef% eflx_sh_tot, & ! (W/m2) sensible heat flux
3019+ fsa_patch = > solarabs_inst% fsa_patch, & ! (W/m2) absorbed solar flux
3020+ eflx_lwrad_net= > veg_ef% eflx_lwrad_net, & ! (W/m2) net longwave radiative flux
3021+ t_ref2m = > veg_es% t_ref2m) ! (K) 2-m air temperature
30153022
30163023 nc = bounds_clump% clump_index
30173024 dtime = real (get_step_size(),r8 )
@@ -3024,6 +3031,22 @@ subroutine wrap_update_hifrq_hist(this, bounds_clump )
30243031 this% fates(nc)% bc_in(s)% tot_litc = totlitc(c)
30253032 end do
30263033
3034+ ! summarize biophysical variables that we want ot output on FATES dimensions
3035+
3036+ do s = 1 , this% fates(nc)% nsites
3037+ c = this% f2hmap(nc)% fcolumn(s)
3038+ do ifp = 0 , this% fates(nc)% sites(s)% youngest_patch% patchno ! !!CDK was 1
3039+ p = ifp+ col_pp% pfti(c)
3040+
3041+ this% fates(nc)% bc_in(s)% lhflux_pa(ifp) = eflx_lh_tot(p)
3042+ this% fates(nc)% bc_in(s)% shflux_pa(ifp) = eflx_sh_tot(p)
3043+ this% fates(nc)% bc_in(s)% swabs_pa(ifp) = fsa_patch(p)
3044+ this% fates(nc)% bc_in(s)% netlw_pa(ifp) = eflx_lwrad_net(p)
3045+ this% fates(nc)% bc_in(s)% t2m_pa(ifp) = t_ref2m(p)
3046+
3047+ end do
3048+ end do
3049+
30273050 ! Update history variables that track these variables
30283051 call fates_hist% update_history_hifrq(nc, &
30293052 this% fates(nc)% nsites, &
0 commit comments