Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
fa75892
New subr. time_evolv_params to calc. time-evolving leafcn_patch
slevis-lmwg Feb 18, 2022
26ad2e5
Rename new history variable to LEAFCN_TARGET
slevis-lmwg Feb 18, 2022
48c2912
Correction for new history field LEAFCN_TARGET to appear in hist
slevis-lmwg Feb 18, 2022
878728a
Add time-evolving leafcn_patch (LEAFCN_TARGET) to restart
slevis-lmwg Feb 21, 2022
6c230ef
Move leafcn_patch declaration to CNVegNitrogenStateType from CanopyState
slevis-lmwg Feb 21, 2022
86b805b
Replace pftcon%leafcn w cnveg_nitrogenstate_inst%leafcn_patch
slevis-lmwg Feb 22, 2022
13a9af8
Repl. pftcon%leafcn also in function SpeciesTypeMultiplier
slevis-lmwg Feb 23, 2022
a5f4856
Renamed subr. time_evolv_params to time_evolv_leafcn to be specific
slevis-lmwg Feb 26, 2022
0fe849e
Changed hardwired settings for cn_slope and co2_base
slevis-lmwg Mar 2, 2022
1414d0d
Merge tag 'ctsm5.3.030' into time_evolv_params
slevis-lmwg Mar 18, 2025
830abfa
Additional conflict resolutions from side-by-side comparison of mods
slevis-lmwg Mar 18, 2025
1d64552
Corrections for aux_clm tests to build successfully
slevis-lmwg Mar 19, 2025
625ded8
Updates to get specific failing test to pass
slevis-lmwg Mar 19, 2025
1be5e2a
Merge tag 'ctsm5.3.033' into time_evolv_params
slevis-lmwg Mar 19, 2025
f7be84e
Try allocating leafcn_patch twice to prevent test failures
slevis-lmwg Mar 19, 2025
a619476
Missed this change in the original implementation
slevis-lmwg Mar 21, 2025
a24446f
This should have gone together with the last commit
slevis-lmwg Mar 21, 2025
8e1e2c6
Clarify the variable name to leafcn_t_evolving in CNFUNMod
slevis-lmwg Mar 21, 2025
237d949
Apply use_cn to the new code in Photosynthesis and clm_driver
slevis-lmwg Mar 21, 2025
6da19db
Remove the new variable from restart and update its initialization
slevis-lmwg Mar 21, 2025
cb1880a
Code change to address izumi failures
slevis-lmwg Mar 24, 2025
430b5b1
Code change to address FUNIT failure on derecho
slevis-lmwg Mar 24, 2025
1503e17
Read params leafcn_co2_base and leafcn_co2_slope from the paramfile
slevis-lmwg Mar 24, 2025
287fea8
Rename leafcn to leafcn_t_evolving where appropriate and add comments
slevis-lmwg Mar 26, 2025
56a3d6c
Rename leafcn_patch to leafcn_t_evolving_patch update some comments
slevis-lmwg Mar 26, 2025
9bbc216
Remove redundant leafcn_t_evolving_patch update from subr. restart
slevis-lmwg Mar 26, 2025
50785f6
Update comments
slevis-lmwg Mar 26, 2025
f298fc8
Rm allocate(this%leafcn_t_evolving_patch from subr. time_evolv_leafcn
slevis-lmwg Mar 26, 2025
e511893
Add testmods_dirs/clm/leafcn_t_evolving for aux_clm test to be added
slevis-lmwg Mar 26, 2025
14ef248
Add the new test to testlist_clm.xml
slevis-lmwg Mar 26, 2025
c7f008b
Move "call time_evolv_leafcn" into a loop over clumps (Bill's review)
slevis-lmwg Mar 26, 2025
e859033
Use the bgc_vegp filter instead of an if-statement for efficiency
slevis-lmwg Mar 28, 2025
9eab348
Merge tag 'ctsm5.3.043' into time_evolv_params
slevis-lmwg May 14, 2025
4ad5256
Calculate co2_ppmv with both pco2 & pbot not_downscaled (Bill's review)
slevis-lmwg May 14, 2025
7371590
Updated ChangeLog/Sum
slevis-lmwg May 14, 2025
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
9 changes: 9 additions & 0 deletions cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,15 @@
<option name="comment">Smoke test of soil CN-matrix on with soil CN ratio set to 30</option>
</options>
</test>
<test name="SMS_Lm1" grid="f10_f10_mg37" compset="IHistClm60Bgc" testmods="clm/leafcn_t_evolving">
<machines>
<machine name="derecho" compiler="intel" category="aux_clm"/>
</machines>
<options>
<option name="wallclock">01:20:00</option>
<option name="comment">Smoke test using custom paramfile with leafcn_co2_slope set to 30 (default = 0). This confirms that the calculation of leafcn_t_evolving does not fail.</option>
</options>
</test>
<test name="ERS_D" grid="f19_g17" compset="I1850Clm50BgcCrop" testmods="clm/ciso_monthly_matrixcn_spinup">
<machines>
<machine name="derecho" compiler="intel" category="aux_clm"/>
Expand Down
10 changes: 7 additions & 3 deletions cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/README
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
This points to an alternate params file with
rf_cwdl2 = 0.5
rf_cwdl3_bgc = 0.5
while by default these parameters equal zero.
ceta = 450 (default = 358)

The README used to say that the alternate paramfile contained
rf_cwdl2 = 0.5 (default 0)
rf_cwdl3_bgc = 0.5 (default 0)
but now 0.5 is the default.

The README also used to say:
The test outputs inactive history fields that would contain zeros
when running with the default params file and should be greater than zero
when running with the alternate params file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This points to an alternate params file with
leafcn_co2_slope = 30 (default = 0)
to confirm that the leafcn_t_evolving calculation doesn't fail.

When we added this test, slevis and ekluzek agreed to consolidate our custom paramfiles into one.
The first of the consolidated paramfiles is named ctsm60_ceta450_cn30_co2_slope30.c250326.nc.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../default
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm60_ceta450_cn30_co2_slope30.c250326.nc'
60 changes: 60 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,64 @@
===============================================================
Tag name: ctsm5.3.044
Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310)
Date: Wed 14 May 2025 11:42:41 AM MDT
One-line Summary: Introduce time-evolving LEAFCN_TARGET as function of leafcn param

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

Motivated by a phd student's project (Emma Hauser, now Professor at UW-Madison) we have introduced time-evolving leafcn as a possible template for other time-evolving parameters.

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


Bugs fixed
----------
List of CTSM issues fixed (include CTSM Issue # and description) [one per line]:
Resolves #1646 Time evolving parameterization for leaf properties

Notes of particular relevance for developers:
---------------------------------------------
Changes to tests or testing:
New test in aux_clm that points to an alternate params file with leafcn_co2_slope = 30 (default = 0) to confirm that the leafcn_t_evolving calculation doesn't fail

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

[PASS means all tests PASS; OK means tests PASS other than expected fails.]

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

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

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

Changes answers relative to baseline: No
but field lists differ due to new history field LEAFCN_TARGET

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

===============================================================
===============================================================
Tag name: ctsm5.3.043
Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310)
Date: Fri 09 May 2025 12:28:17 PM MDT
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.3.044 slevis 05/14/2025 Introduce time-evolving LEAFCN_TARGET as function of leafcn param
ctsm5.3.043 slevis 05/09/2025 Merge b4b-dev
ctsm5.3.042 glemieux 05/08/2025 Update FATES tag, tests and address namelist option bug
ctsm5.3.041 samrabin 04/25/2025 Merge b4b-dev to master
Expand Down
8 changes: 5 additions & 3 deletions src/biogeochem/CNAllocationMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module CNAllocationMod
use CNVegCarbonStateType , only : cnveg_carbonstate_type
use CNVegCarbonFluxType , only : cnveg_carbonflux_type
use CNVegStateType , only : cnveg_state_type
use CNVegNitrogenStateType, only: cnveg_nitrogenstate_type
use CropReprPoolsMod , only : nrepr
use CNPhenologyMod , only : CropPhase
use CNSharedParamsMod , only : use_fun
Expand Down Expand Up @@ -433,7 +434,7 @@ end subroutine calc_crop_allocation_fractions

!-----------------------------------------------------------------------
subroutine calc_allometry(num_soilp, filter_soilp, &
cnveg_carbonflux_inst, cnveg_state_inst)
cnveg_carbonflux_inst, cnveg_state_inst, cnveg_nitrogenstate_inst)
!
! !DESCRIPTION:
! Calculate c_allometry and n_allometry terms based on allocation fractions
Expand All @@ -442,6 +443,7 @@ subroutine calc_allometry(num_soilp, filter_soilp, &
integer , intent(in) :: num_soilp ! number of soil patches in filter
integer , intent(in) :: filter_soilp(:) ! filter for soil patches
type(cnveg_carbonflux_type) , intent(in) :: cnveg_carbonflux_inst
type(cnveg_nitrogenstate_type) , intent(in) :: cnveg_nitrogenstate_inst
type(cnveg_state_type) , intent(inout) :: cnveg_state_inst
!
! !LOCAL VARIABLES:
Expand All @@ -464,7 +466,7 @@ subroutine calc_allometry(num_soilp, filter_soilp, &
croot_stem => pftcon%croot_stem , & ! Input: allocation parameter: new coarse root C per new stem C (gC/gC)
stem_leaf => pftcon%stem_leaf , & ! Input: allocation parameter: new stem c per new leaf C (gC/gC)
flivewd => pftcon%flivewd , & ! Input: allocation parameter: fraction of new wood that is live (phloem and ray parenchyma) (no units)
leafcn => pftcon%leafcn , & ! Input: leaf C:N (gC/gN)
leafcn_t_evolving => cnveg_nitrogenstate_inst%leafcn_t_evolving_patch, & ! Input: leaf C:N (gC/gN)
frootcn => pftcon%frootcn , & ! Input: fine root C:N (gC/gN)
livewdcn => pftcon%livewdcn , & ! Input: live wood (phloem and ray parenchyma) C:N (gC/gN)
deadwdcn => pftcon%deadwdcn , & ! Input: dead wood (xylem and heartwood) C:N (gC/gN)
Expand Down Expand Up @@ -503,7 +505,7 @@ subroutine calc_allometry(num_soilp, filter_soilp, &
else
g1 = grperc(ivt(p))
end if
cnl = leafcn(ivt(p))
cnl = leafcn_t_evolving(p)
Comment thread
slevis-lmwg marked this conversation as resolved.
cnfr = frootcn(ivt(p))
cnlw = livewdcn(ivt(p))
cndw = deadwdcn(ivt(p))
Expand Down
2 changes: 1 addition & 1 deletion src/biogeochem/CNDriverMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ subroutine CNDriverNoLeaching(bounds,
end if

call calc_allometry(num_bgc_vegp, filter_bgc_vegp, &
cnveg_carbonflux_inst, cnveg_state_inst)
cnveg_carbonflux_inst, cnveg_state_inst, cnveg_nitrogenstate_inst)
call t_stopf('cnalloc')
end if

Expand Down
10 changes: 5 additions & 5 deletions src/biogeochem/CNFUNMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ subroutine CNFUNInit (bounds,cnveg_state_inst,cnveg_carbonstate_inst,cnveg_nitro

! Set local pointers
associate(ivt => patch%itype , & ! Input: [integer (:) ] p
leafcn => pftcon%leafcn , & ! Input: leaf C:N (gC/gN)
leafcn_t_evolving => cnveg_nitrogenstate_inst%leafcn_t_evolving_patch , & ! Input: leaf C:N (gC/gN)
leafcn_offset => cnveg_state_inst%leafcn_offset_patch , & ! Output:
! [real(r8) (:) ] Leaf C:N used by FUN
leafc_storage_xfer_acc => cnveg_carbonstate_inst%leafc_storage_xfer_acc_patch , & ! Output: [real(r8) (:)
Expand Down Expand Up @@ -249,7 +249,7 @@ subroutine CNFUNInit (bounds,cnveg_state_inst,cnveg_carbonstate_inst,cnveg_nitro
!---
numofyear = nstep/nstep_fun
if (mod(nstep,nstep_fun) == 0) then
leafcn_offset(bounds%begp:bounds%endp) = leafcn(ivt(bounds%begp:bounds%endp))
leafcn_offset(bounds%begp:bounds%endp) = leafcn_t_evolving(bounds%begp:bounds%endp)
storage_cdemand(bounds%begp:bounds%endp) = 0._r8
storage_ndemand(bounds%begp:bounds%endp) = 0._r8
leafn_storage_xfer_acc(bounds%begp:bounds%endp) = 0._r8
Expand Down Expand Up @@ -573,7 +573,7 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp&
!--------------------------------------------------------------------
!---------------------------------
associate(ivt => patch%itype , & ! Input: [integer (:) ] p
leafcn => pftcon%leafcn , & ! Input: leaf C:N (gC/gN)
leafcn_t_evolving => cnveg_nitrogenstate_inst%leafcn_t_evolving_patch , & ! Input: leaf C:N (gC/gN)
season_decid => pftcon%season_decid , & ! Input: binary flag for seasonal
! -deciduous leaf habit (0 or 1)
stress_decid => pftcon%stress_decid , & ! Input: binary flag for stress
Expand Down Expand Up @@ -1276,7 +1276,7 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp&
litterfall_c_step(p,istp)* fixerfrac,&
litterfall_n_step(p,istp)* fixerfrac,&
total_n_resistance, total_c_spent_retrans,total_c_accounted_retrans, &
free_n_retrans,paid_for_n_retrans, leafcn(ivt(p)), &
free_n_retrans,paid_for_n_retrans, leafcn_t_evolving(p), &
grperc(ivt(p)), plantCN(p))

else
Expand Down Expand Up @@ -1307,7 +1307,7 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp&
if (leafn(p) == 0.0_r8) then ! to avoid division by zero
delta_CN = fun_cn_flex_c(ivt(p)) ! Max CN ratio over standard
else
delta_CN = (leafc(p)+leafc_storage(p))/(leafn(p)+leafn_storage(p)) - leafcn(ivt(p)) ! leaf CN ratio
delta_CN = (leafc(p)+leafc_storage(p))/(leafn(p)+leafn_storage(p)) - leafcn_t_evolving(p) ! leaf CN ratio
end if
! C used for uptake is reduced if the cost of N is very high
frac_ideal_C_use = max(0.0_r8,1.0_r8 - (total_N_resistance-fun_cn_flex_a(ivt(p)))/fun_cn_flex_b(ivt(p)) )
Expand Down
1 change: 0 additions & 1 deletion src/biogeochem/CNGRespMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ subroutine CNGResp(num_soilp, filter_soilp, cnveg_carbonflux_inst, canopystate_i
woody => pftcon%woody , & ! Input: binary flag for woody lifeform (1=woody, 0=not woody)
grperc => pftcon%grperc , & ! Input: growth respiration parameter
grpnow => pftcon%grpnow , & ! Input: growth respiration parameter
leafcn => pftcon%leafcn , & ! Input: leaf C:N (gC/gN)
livewdcn => pftcon%livewdcn , & ! Input: live wood (phloem and ray parenchyma) C:N (gC/gN)

laisun => canopystate_inst%laisun_patch , & ! Input: [real(r8) (:)] sunlit projected leaf area index
Expand Down
1 change: 0 additions & 1 deletion src/biogeochem/CNGapMortalityMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ subroutine CNGapMortality (bounds, num_soilp, filter_soilp, &
greffic => dgvs_inst%greffic_patch , & ! Input: [real(r8) (:) ]
heatstress => dgvs_inst%heatstress_patch , & ! Input: [real(r8) (:) ]

leafcn => pftcon%leafcn , & ! Input: [real(r8) (:)] leaf C:N (gC/gN)
livewdcn => pftcon%livewdcn , & ! Input: [real(r8) (:)] live wood (phloem and ray parenchyma) C:N (gC/gN)
laisun => canopystate_inst%laisun_patch , & ! Input: [real(r8) (:) ] sunlit projected leaf area index
laisha => canopystate_inst%laisha_patch , & ! Input: [real(r8) (:) ] shaded projected leaf area index
Expand Down
Loading