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 Externals_CLM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local_path = src/fates
protocol = git
repo_url = https://github.com/NGEET/fates
tag = sci.1.59.7_api.24.1.0
tag = sci.1.61.0_api.25.0.0
required = True

[externals_description]
Expand Down
2 changes: 1 addition & 1 deletion bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<!-- FATES default parameter file -->
<!-- ================================================================== -->

<fates_paramfile>lnd/clm2/paramdata/fates_params_api.24.0.0_12pft_c220608.nc</fates_paramfile>
<fates_paramfile>lnd/clm2/paramdata/fates_params_api.25.0.0_12pft_c221128.nc</fates_paramfile>

<!-- ======================================================================================== -->
<!-- clm 5.0 BGC nitrogen model -->
Expand Down
2 changes: 1 addition & 1 deletion cime_config/testdefs/testmods_dirs/clm/Fates/user_nl_clm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS',
'FATES_FUEL_AMOUNT', 'FATES_LITTER_IN', 'FATES_LITTER_OUT',
'FATES_SEED_BANK', 'FATES_SEEDS_IN', 'FATES_STOREC', 'FATES_VEGC',
'FATES_SAPWOODC', 'FATES_LEAFC', 'FATES_FROOTC', 'FATES_REPROC',
'FATES_CEFFLUX', 'FATES_STRUCTC', 'FATES_NONSTRUCTC', 'FATES_VEGC_ABOVEGROUND',
'FATES_STRUCTC', 'FATES_NONSTRUCTC', 'FATES_VEGC_ABOVEGROUND',
'FATES_CANOPY_VEGC', 'FATES_USTORY_VEGC', 'FATES_PRIMARY_PATCHFUSION_ERR',
'FATES_DISTURBANCE_RATE_P2P', 'FATES_DISTURBANCE_RATE_P2S',
'FATES_DISTURBANCE_RATE_S2S', 'FATES_DISTURBANCE_RATE_FIRE',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ hist_fincl1 = 'FATES_CROWNAREA_PF', 'FATES_CANOPYCROWNAREA_PF',
'FATES_CROOTMAINTAR_USTORY_SZ', 'FATES_FROOTMAINTAR_USTORY_SZ',
'FATES_GROWAR_USTORY_SZ', 'FATES_MAINTAR_USTORY_SZ', 'FATES_VEGC_SZPF',
'FATES_LEAFC_SZPF', 'FATES_FROOTC_SZPF', 'FATES_SAPWOODC_SZPF',
'FATES_STOREC_SZPF', 'FATES_REPROC_SZPF', 'FATES_CEFFLUX_SZPF'
'FATES_STOREC_SZPF', 'FATES_REPROC_SZPF'
13 changes: 12 additions & 1 deletion cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/user_nl_clm
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
fates_parteh_mode = 2
fates_parteh_mode = 2
hist_fincl1 = 'FATES_L2FR','FATES_L2FR_CANOPY_REC_PF','FATES_L2FR_USTORY_REC_PF',
'FATES_NH4UPTAKE_SZPF','FATES_NO3UPTAKE_SZPF','FATES_NEFFLUX_SZPF',
'FATES_NDEMAND_SZPF','FATES_NFIX_SYM_SZPF','FATES_NH4UPTAKE','FATES_NO3UPTAKE',
'FATES_NEFFLUX','FATES_NDEMAND','FATES_NFIX_SYM','FATES_STOREN','FATES_STOREN_TF',
'FATES_VEGN','FATES_SAPWOODN','FATES_LEAFN','FATES_FROOTN','FATES_REPRON','FATES_VEGN_SZPF',
'FATES_LEAFN_SZPF','FATES_FROOTN_SZPF','FATES_SAPWOODN_SZPF','FATES_STOREN_SZPF','FATES_STOREN_TF_CANOPY_SZPF',
'FATES_STOREN_TF_USTORY_SZPF','FATES_REPRON_SZPF','FATES_STOREP','FATES_STOREP_TF','FATES_VEGP','FATES_SAPWOODP',
'FATES_LEAFP','FATES_FROOTP','FATES_REPROP','FATES_PUPTAKE','FATES_PEFFLUX','FATES_PDEMAND',
'FATES_VEGP_SZPF','FATES_LEAFP_SZPF','FATES_FROOTP_SZPF','FATES_SAPWOODP_SZPF','FATES_STOREP_SZPF',
'FATES_STOREP_TF_CANOPY_SZPF','FATES_STOREP_TF_USTORY_SZPF','FATES_REPROP_SZPF','FATES_PUPTAKE_SZPF',
'FATES_PEFFLUX_SZPF','FATES_PDEMAND_SZPF'
2 changes: 1 addition & 1 deletion cime_config/usermods_dirs/fates_sp/user_nl_clm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ hist_fexcl1 = 'FATES_TRIMMING', 'FATES_COLD_STATUS', 'FATES_DROUGHT_STATUS', 'FA
'FATES_FUEL_AMOUNT_AP', 'FATES_FUEL_BURNT_BURNFRAC_FC', 'FATES_LITTER_IN', 'FATES_LITTER_OUT', 'FATES_SEED_BANK',
'FATES_SEEDS_IN', 'FATES_LITTER_IN_EL', 'FATES_LITTER_OUT_EL', 'FATES_SEED_BANK_EL', 'FATES_SEEDS_IN_LOCAL_EL',
'FATES_SEEDS_IN_EXTERN_EL', 'FATES_SEED_GERM_EL', 'FATES_SEED_DECAY_EL', 'FATES_STOREC', 'FATES_VEGC',
'FATES_SAPWOODC', 'FATES_FROOTC', 'FATES_REPROC', 'FATES_CEFFLUX', 'FATES_STRUCTC', 'FATES_NONSTRUCTC',
'FATES_SAPWOODC', 'FATES_FROOTC', 'FATES_REPROC', 'FATES_STRUCTC', 'FATES_NONSTRUCTC',
'FATES_VEGC_ABOVEGROUND', 'FATES_CANOPY_VEGC', 'FATES_USTORY_VEGC', 'FATES_PRIMARY_PATCHFUSION_ERR',
'FATES_DISTURBANCE_RATE_P2P', 'FATES_DISTURBANCE_RATE_P2S', 'FATES_DISTURBANCE_RATE_S2S',
'FATES_DISTURBANCE_RATE_FIRE', 'FATES_DISTURBANCE_RATE_LOGGING', 'FATES_DISTURBANCE_RATE_TREEFALL',
Expand Down
77 changes: 77 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,81 @@
===============================================================
Tag name: ctsm5.1.dev115
Originator(s): rgknox (Ryan Knox)
Date: Fri Dec 2 15:45:32 MST 2022
One-line Summary: API compatability with FATES V2 nutrient dynamics

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

This set of changes allows CTSM to continue API compatability with changes to the FATES API. FATES has updated its nutrient dynamics routine, and required a modification to the test environment, some minor updates to variable dimensions in the history, and a call to a new FATES history routine. Implicitly, the updating of the FATES tag introduces new content in the FATES model since the last API update (mostly bug fixes).


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


The changes here will only affect FATES simulations. Any FATES simulation will be affected. Carbon-only FATES simulations will not have qualitatively different results since the last API update (but will have bit-for-bit differences). Nutrient enabled FATES simulations (not fully coupled to CLM, only via prognosed plant N,P boundaries), and FATES-Hydro simulations (bug fix) will be different.

Bugs fixed or introduced
------------------------

See the descriptions in FATES tags between sci.1.57.4_api.24.0.0 to sci.1.60.0_api.25.0.0 for details on FATES changes in this tag.

CTSM issues fixed (include CTSM Issue #): None

Externals issues fixed (include issue #): None

Known bugs introduced in this tag (include issue #): None

Known bugs found since the previous tag (include issue #): None


Notes of particular relevance for users
---------------------------------------

This set of changes comes with an updated FATES parameter file. This includes format changes only. No changes to variable values were introduced. Format changes are relegated to new parameters and/or name changes only. These changes are encapsulated in: fates/parameter_files/archive/apichange_24.2to25.xml


Notes of particular relevance for developers:
---------------------------------------------

Nothing of note regarding changes for developers.

Changes to tests or testing: New history variables were added to the FATES PRT2 user_nl_clm.


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

regular

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

cheyenne ---- nominal: /glade/scratch/rgknox/tests_1201-121507ch
izumi ------- nominal: /scratch/cluster/rgknox/tests_1201-122133iz

fates tests: (give name of baseline if different from CTSM tagname, normally fates baselines are fates-<FATES TAG>-<CTSM TAG>)
cheyenne ---- nominal against ctsm5.1_dev112 /glade/scratch/rgknox/tests_1130-082657ch
izumi ------- NA

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

Changes answers relative to baseline: FATES answers changed relative to base. Explanation already provided (nutrient and hydro changes are qualitative).


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

FATES external was updated.

Pull Requests that document the changes (include PR ids):

https://github.com/ESCOMP/CTSM/pull/1874
https://github.com/NGEET/fates/pull/880

===============================================================
===============================================================
Tag name: ctsm5.1.dev114
Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326)/@wwieder/@olyson/@ka7eh
Date: Sat Nov 19 18:11:15 MST 2022
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.1.dev115 rgknox 12/02/2022 API compatability with FATES V2 nutrient dynamics
ctsm5.1.dev114 multiple 11/19/2022 Some NEON updates fixing AG sites, update MOSART, small fixes
ctsm5.1.dev113 multiple 10/28/2022 Fix some compsets; add only clauses for ESMF use statements
ctsm5.1.dev112 multiple 10/15/2022 Rework fates test definitions and add new fates tests
Expand Down
3 changes: 3 additions & 0 deletions src/main/histFileMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2468,6 +2468,7 @@ subroutine htape_create (t, histrest)
call ncd_defdim(lnfid, 'fates_levelcwd', num_elements_fates * ncwd, dimid)
call ncd_defdim(lnfid, 'fates_levelage', num_elements_fates * nlevage, dimid)
call ncd_defdim(lnfid, 'fates_levagefuel', nlevage * nfsc, dimid)
call ncd_defdim(lnfid, 'fates_levclscpf', nclmax*nlevsclass*numpft_fates, dimid)
end if

if ( .not. lhistrest )then
Expand Down Expand Up @@ -5512,6 +5513,8 @@ subroutine hist_addfld2d (fname, type2d, units, avgflag, long_name, type1d_out,
num2d = num_elements_fates*nlevage
case ('fates_levagefuel')
num2d = nlevage*nfsc
case('fates_levclscpf')
num2d = nclmax * nclmax * numpft_fates
case('cft')
if (cft_size > 0) then
num2d = cft_size
Expand Down
30 changes: 19 additions & 11 deletions src/utils/clmfates_interfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,7 @@ subroutine dynamics_driv(this, nc, bounds_clump, &
! ---------------------------------------------------------------------------------
call fates_hist%flush_hvars(nc,upfreq_in=1)

call fates_hist%flush_hvars(nc,upfreq_in=5)

! ---------------------------------------------------------------------------------
! Part II: Call the FATES model now that input boundary conditions have been
Expand Down Expand Up @@ -1088,7 +1089,8 @@ subroutine dynamics_driv(this, nc, bounds_clump, &
! ---------------------------------------------------------------------------------
call fates_hist%update_history_dyn( nc, &
this%fates(nc)%nsites, &
this%fates(nc)%sites)
this%fates(nc)%sites, &
this%fates(nc)%bc_in)

if (masterproc) then
write(iulog, *) 'clm: leaving fates model', bounds_clump%begg, &
Expand Down Expand Up @@ -1659,12 +1661,13 @@ subroutine restart( this, bounds_proc, ncid, flag, waterdiagnosticbulk_inst, &
! ------------------------------------------------------------------------
call fates_hist%flush_hvars(nc,upfreq_in=1)
do s = 1,this%fates(nc)%nsites
call fates_hist%zero_site_hvars(this%fates(nc)%sites(s), &
call fates_hist%zero_site_hvars(this%fates(nc)%sites(s), &
upfreq_in=1)
end do
call fates_hist%update_history_dyn( nc, &
this%fates(nc)%nsites, &
this%fates(nc)%sites)
call fates_hist%update_history_dyn( nc, &
this%fates(nc)%nsites, &
this%fates(nc)%sites, &
this%fates(nc)%bc_in)


end if
Expand Down Expand Up @@ -1831,12 +1834,13 @@ subroutine init_coldstart(this, waterstatebulk_inst, waterdiagnosticbulk_inst, &
! ------------------------------------------------------------------------
call fates_hist%flush_hvars(nc,upfreq_in=1)
do s = 1,this%fates(nc)%nsites
call fates_hist%zero_site_hvars(this%fates(nc)%sites(s), &
call fates_hist%zero_site_hvars(this%fates(nc)%sites(s), &
upfreq_in=1)
end do
call fates_hist%update_history_dyn( nc, &
this%fates(nc)%nsites, &
this%fates(nc)%sites)
call fates_hist%update_history_dyn( nc, &
this%fates(nc)%nsites, &
this%fates(nc)%sites, &
this%fates(nc)%bc_in)



Expand Down Expand Up @@ -2745,7 +2749,7 @@ subroutine init_history_io(this,bounds_proc)
use FatesIOVariableKindMod, only : site_can_r8, site_cnlf_r8, site_cnlfpft_r8
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
use FatesIOVariableKindMod, only : site_cdpf_r8, site_cdsc_r8, site_clscpf_r8
use FatesIODimensionsMod, only : fates_bounds_type


Expand Down Expand Up @@ -2844,7 +2848,7 @@ subroutine init_history_io(this,bounds_proc)

case(site_soil_r8, site_size_pft_r8, site_size_r8, site_pft_r8, &
site_age_r8, site_height_r8, site_coage_r8,site_coage_pft_r8, &
site_fuel_r8, site_cwdsc_r8, &
site_fuel_r8, site_cwdsc_r8, site_clscpf_r8, &
site_can_r8,site_cnlf_r8, site_cnlfpft_r8, site_scag_r8, &
site_scagpft_r8, site_agepft_r8, site_elem_r8, site_elpft_r8, &
site_elcwd_r8, site_elage_r8, site_agefuel_r8, &
Expand Down Expand Up @@ -3227,6 +3231,10 @@ subroutine hlm_bounds_to_fates_bounds(hlm, fates)

fates%cdam_begin = 1
fates%cdam_end = nlevdamage

fates%clscpf_begin = 1
fates%clscpf_end = numpft_fates * nlevsclass * nclmax


call t_stopf('fates_hlm2fatesbnds')

Expand Down