Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
[submodule "fates"]
path = src/fates
url = https://github.com/NGEET/fates
fxtag = sci.1.89.0_api.43.0.0
fxtag = sci.1.91.1_api.43.1.0
fxrequired = AlwaysRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/NGEET/fates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS',
'FATES_SEED_ALLOC', 'FATES_STEM_ALLOC', 'FATES_FROOT_ALLOC',
'FATES_CROOT_ALLOC', 'FATES_STORE_ALLOC',
'FATES_PATCHAREA_LU', 'FATES_DISTURBANCE_RATE_MATRIX_LULU',
'FATES_TRANSITION_MATRIX_LULU'
'FATES_TRANSITION_MATRIX_LULU',
'FATES_VEGC_LUPF','FATES_NOCOMP_PATCHAREA_LUPF',
'FATES_TVEG_LU','FATES_TSA_LU','FATES_SWABS_LU','FATES_NETLW_LU',
'FATES_SHFLUX_LU','FATES_LHFLUX_LU','FATES_GPP_LU'
72 changes: 72 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,76 @@
===============================================================
Tag name: ctsm5.4.026
Originator(s): glemieux (Gregory Lemieux, LBNL, glemieux@lbl.gov)
Date: Wed Mar 18 01:12:09 AM MDT 2026
One-line Summary: Transfer biophysical variables for output with FATES dimensions

Purpose and description of changes
----------------------------------

This pull request updates the high frequency wrapper procedure in the interface to pass
biophysical CLM variables to be output along FATES dimensions. The FATES land use x
pft dimension is also added to the history module. The FATES base land use test module
adds the FATES history noted above to the test output.

Significant changes to scientifically-supported configurations
--------------------------------------------------------------

Does this tag change answers significantly for any of the following physics configurations?
(Details of any changes will be given in the "Answer changes" section below.)

[Put an [X] in the box for any configuration with significant answer changes.]

[ ] clm6_0

[ ] clm5_0

[ ] ctsm5_0-nwp

[ ] clm4_5


Notes of particular relevance for developers:
---------------------------------------------
Changes to tests or testing:
- Landuse history variables adding to the base FatesColdLUH2 test module

Contributors: @ckoven

Testing summary:
----------------

regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):

derecho ----- OK
izumi ------- OK

fates tests: (give name of baseline if different from CTSM tagname, normally fates baselines are fates-<FATES TAG>-<CTSM TAG>)
derecho ----- OK
izumi ------- OK

If the tag used for baseline comparisons was NOT the previous tag, note that here:
izumi fates tested against `fates-sci.1.89.0_api.43.0.0-ctsm5.4.025`
derecho fates tested against `fates-sci.1.91.1_api.43.1.0-ctsm5.4.025`

Answer changes
--------------

Changes answers relative to baseline: Yes, fates only

Other details
-------------

List any git submodules updated (cime, rtm, mosart, cism, fates, etc.):
fates: sci.1.89.0_api.43.0.0 -> sci.1.91.1_api.43.1.0

Pull Requests that document the changes (include PR ids):
(https://github.com/ESCOMP/ctsm/pull)

https://github.com/ESCOMP/CTSM/pull/3760
https://github.com/NGEET/fates/pull/1536

===============================================================
===============================================================
Tag name: ctsm5.4.025
Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326)
Date: Mon Mar 16 12:46:16 PM MDT 2026
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Tag Who Date Summary
============================================================================================================================
ctsm5.4.026 glemieux 03/18/2026 Transfer biophysical variables for output with FATES dimensions
ctsm5.4.025 erik 03/16/2026 Merge b4b-dev to master
ctsm5.4.024 erik 03/11/2026 Update derecho_intel again and a few fixes for it
ctsm5.4.023 samrabin 03/10/2026 Replace more netCDFs with NaN issues
Expand Down
2 changes: 1 addition & 1 deletion src/fates
Submodule fates updated 115 files
3 changes: 2 additions & 1 deletion src/main/clm_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,8 @@ subroutine clm_drv(doalb, nextsw_cday, declinp1, declin, rstwr, nlend, rdate, ro

call clm_fates%wrap_update_hifrq_hist(bounds_clump, &
soilbiogeochem_carbonflux_inst, &
soilbiogeochem_carbonstate_inst)
soilbiogeochem_carbonstate_inst, &
solarabs_inst, energyflux_inst, temperature_inst)


if( is_beg_curr_day() ) then
Expand Down
3 changes: 3 additions & 0 deletions src/main/histFileMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2583,6 +2583,7 @@ subroutine htape_create (t, f, histrest)
call ncd_defdim(lnfid, 'fates_levclscpf', nclmax*nlevsclass*numpft_fates, dimid)
call ncd_defdim(lnfid, 'fates_levlanduse', n_landuse_cats, dimid)
call ncd_defdim(lnfid, 'fates_levlulu', n_landuse_cats * n_landuse_cats, dimid)
call ncd_defdim(lnfid, 'fates_levlupft', n_landuse_cats * numpft_fates, dimid)
end if

if ( .not. lhistrest )then
Expand Down Expand Up @@ -5811,6 +5812,8 @@ subroutine hist_addfld2d (fname, type2d, units, avgflag, long_name, type1d_out,
num2d = n_landuse_cats
case ('fates_levlulu')
num2d = n_landuse_cats * n_landuse_cats
case ('fates_levlupft')
num2d = n_landuse_cats * numpft_fates
case('cft')
if (cft_size > 0) then
num2d = cft_size
Expand Down
38 changes: 33 additions & 5 deletions src/utils/clmfates_interfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3067,24 +3067,34 @@ end subroutine WrapUpdateFatesSeedInOut

subroutine wrap_update_hifrq_hist(this, bounds_clump, &
soilbiogeochem_carbonflux_inst, &
soilbiogeochem_carbonstate_inst)
soilbiogeochem_carbonstate_inst, &
solarabs_inst, energyflux_inst, &
temperature_inst)

! Arguments
class(hlm_fates_interface_type), intent(inout) :: this
type(bounds_type), intent(in) :: bounds_clump
type(soilbiogeochem_carbonflux_type), intent(in) :: soilbiogeochem_carbonflux_inst
type(soilbiogeochem_carbonstate_type), intent(in) :: soilbiogeochem_carbonstate_inst
type(solarabs_type), intent(in) :: solarabs_inst
type(energyflux_type), intent(in) :: energyflux_inst
type(temperature_type), intent(in) :: temperature_inst

! locals
real(r8) :: dtime
integer :: s, c, nc
integer :: s, c, nc, ifp, p

call t_startf('fates_wrap_update_hifrq_hist')

associate(&
hr => soilbiogeochem_carbonflux_inst%hr_col, & ! (gC/m2/s) total heterotrophic respiration
totsomc => soilbiogeochem_carbonstate_inst%totsomc_col, & ! (gC/m2) total soil organic matter carbon
totlitc => soilbiogeochem_carbonstate_inst%totlitc_col) ! (gC/m2) total litter carbon in BGC pools
totlitc => soilbiogeochem_carbonstate_inst%totlitc_col, & ! (gC/m2) total litter carbon in BGC pools
eflx_lh_tot => energyflux_inst%eflx_lh_tot_patch, & ! (W/m2) latent heat flux
eflx_sh_tot => energyflux_inst%eflx_sh_tot_patch, & ! (W/m2) sensible heat flux
fsa_patch => solarabs_inst%fsa_patch, & ! (W/m2) absorbed solar flux
eflx_lwrad_net=> energyflux_inst%eflx_lwrad_net_patch, & ! (W/m2) net longwave radiative flux
t_ref2m => temperature_inst%t_ref2m_patch) ! (K) 2-m air temperature

nc = bounds_clump%clump_index

Expand All @@ -3105,6 +3115,21 @@ subroutine wrap_update_hifrq_hist(this, bounds_clump, &
end do
end if


! Summarize biophysical variables that we want to output on FATES dimensions
! Note that we pass in the bareground patch values here by starting the ifp
! do loop from zero
do s = 1, this%fates(nc)%nsites
c = this%f2hmap(nc)%fcolumn(s)
do ifp = 0, this%fates(nc)%sites(s)%youngest_patch%patchno
Comment thread
glemieux marked this conversation as resolved.
p = ifp + col%patchi(c)
this%fates(nc)%bc_in(s)%lhflux_pa(ifp) = eflx_lh_tot(p)
this%fates(nc)%bc_in(s)%shflux_pa(ifp) = eflx_sh_tot(p)
this%fates(nc)%bc_in(s)%swabs_pa(ifp) = fsa_patch(p)
this%fates(nc)%bc_in(s)%t2m_pa(ifp) = t_ref2m(p)
end do
end do

dtime = get_step_size_real()

! Update history variables that track these variables
Expand Down Expand Up @@ -3348,7 +3373,7 @@ subroutine init_history_io(this,bounds_proc)
use FatesIOVariableKindMod, only : site_height_r8, site_elem_r8, site_elpft_r8
use FatesIOVariableKindMod, only : site_elcwd_r8, site_elage_r8, site_agefuel_r8
use FatesIOVariableKindMod, only : site_cdpf_r8, site_cdsc_r8, site_clscpf_r8
use FatesIOVariableKindMod, only : site_landuse_r8, site_lulu_r8
use FatesIOVariableKindMod, only : site_landuse_r8, site_lulu_r8, site_lupft_r8
use FatesIODimensionsMod, only : fates_bounds_type


Expand Down Expand Up @@ -3454,7 +3479,7 @@ subroutine init_history_io(this,bounds_proc)
site_scagpft_r8, site_agepft_r8, site_elem_r8, site_elpft_r8, &
site_elcwd_r8, site_elage_r8, site_agefuel_r8, &
site_cdsc_r8, site_cdpf_r8, &
site_landuse_r8, site_lulu_r8)
site_landuse_r8, site_lulu_r8, site_lupft_r8)


d_index = fates_hist%dim_kinds(dk_index)%dim2_index
Expand Down Expand Up @@ -3808,6 +3833,9 @@ subroutine hlm_bounds_to_fates_bounds(hlm, fates)

fates%lulu_begin = 1
fates%lulu_end = n_landuse_cats * n_landuse_cats

fates%lupft_begin = 1
fates%lupft_end = n_landuse_cats * numpft_fates

call t_stopf('fates_hlm2fatesbnds')

Expand Down
Loading