Skip to content

Commit 299480f

Browse files
authored
Merge pull request #1654 from slevis-lmwg/time_evolv_params
ctsm5.3.044: Introduce time-evolving LEAFCN_TARGET as function of leafcn parameter
2 parents bfd05b5 + 7371590 commit 299480f

25 files changed

Lines changed: 294 additions & 75 deletions

cime_config/testdefs/testlist_clm.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,15 @@
12021202
<option name="comment">Smoke test of soil CN-matrix on with soil CN ratio set to 30</option>
12031203
</options>
12041204
</test>
1205+
<test name="SMS_Lm1" grid="f10_f10_mg37" compset="IHistClm60Bgc" testmods="clm/leafcn_t_evolving">
1206+
<machines>
1207+
<machine name="derecho" compiler="intel" category="aux_clm"/>
1208+
</machines>
1209+
<options>
1210+
<option name="wallclock">01:20:00</option>
1211+
<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>
1212+
</options>
1213+
</test>
12051214
<test name="ERS_D" grid="f19_g17" compset="I1850Clm50BgcCrop" testmods="clm/ciso_monthly_matrixcn_spinup">
12061215
<machines>
12071216
<machine name="derecho" compiler="intel" category="aux_clm"/>
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
This points to an alternate params file with
2-
rf_cwdl2 = 0.5
3-
rf_cwdl3_bgc = 0.5
4-
while by default these parameters equal zero.
2+
ceta = 450 (default = 358)
53

4+
The README used to say that the alternate paramfile contained
5+
rf_cwdl2 = 0.5 (default 0)
6+
rf_cwdl3_bgc = 0.5 (default 0)
7+
but now 0.5 is the default.
8+
9+
The README also used to say:
610
The test outputs inactive history fields that would contain zeros
711
when running with the default params file and should be greater than zero
812
when running with the alternate params file.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
This points to an alternate params file with
2+
leafcn_co2_slope = 30 (default = 0)
3+
to confirm that the leafcn_t_evolving calculation doesn't fail.
4+
5+
When we added this test, slevis and ekluzek agreed to consolidate our custom paramfiles into one.
6+
The first of the consolidated paramfiles is named ctsm60_ceta450_cn30_co2_slope30.c250326.nc.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../default
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm60_ceta450_cn30_co2_slope30.c250326.nc'

doc/ChangeLog

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,64 @@
11
===============================================================
2+
Tag name: ctsm5.3.044
3+
Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310)
4+
Date: Wed 14 May 2025 11:42:41 AM MDT
5+
One-line Summary: Introduce time-evolving LEAFCN_TARGET as function of leafcn param
6+
7+
Purpose and description of changes
8+
----------------------------------
9+
10+
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.
11+
12+
Significant changes to scientifically-supported configurations
13+
--------------------------------------------------------------
14+
15+
Does this tag change answers significantly for any of the following physics configurations?
16+
(Details of any changes will be given in the "Answer changes" section below.)
17+
18+
[Put an [X] in the box for any configuration with significant answer changes.]
19+
20+
[ ] clm6_0
21+
22+
[ ] clm5_0
23+
24+
[ ] ctsm5_0-nwp
25+
26+
[ ] clm4_5
27+
28+
29+
Bugs fixed
30+
----------
31+
List of CTSM issues fixed (include CTSM Issue # and description) [one per line]:
32+
Resolves #1646 Time evolving parameterization for leaf properties
33+
34+
Notes of particular relevance for developers:
35+
---------------------------------------------
36+
Changes to tests or testing:
37+
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
38+
39+
Testing summary:
40+
----------------
41+
42+
[PASS means all tests PASS; OK means tests PASS other than expected fails.]
43+
44+
regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):
45+
46+
derecho ----- OK
47+
izumi ------- OK
48+
49+
Answer changes
50+
--------------
51+
52+
Changes answers relative to baseline: No
53+
but field lists differ due to new history field LEAFCN_TARGET
54+
55+
Other details
56+
-------------
57+
Pull Requests that document the changes (include PR ids):
58+
https://github.com/ESCOMP/ctsm/pull/1654
59+
60+
===============================================================
61+
===============================================================
262
Tag name: ctsm5.3.043
363
Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310)
464
Date: Fri 09 May 2025 12:28:17 PM MDT

doc/ChangeSum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Tag Who Date Summary
22
============================================================================================================================
3+
ctsm5.3.044 slevis 05/14/2025 Introduce time-evolving LEAFCN_TARGET as function of leafcn param
34
ctsm5.3.043 slevis 05/09/2025 Merge b4b-dev
45
ctsm5.3.042 glemieux 05/08/2025 Update FATES tag, tests and address namelist option bug
56
ctsm5.3.041 samrabin 04/25/2025 Merge b4b-dev to master

src/biogeochem/CNAllocationMod.F90

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module CNAllocationMod
2323
use CNVegCarbonStateType , only : cnveg_carbonstate_type
2424
use CNVegCarbonFluxType , only : cnveg_carbonflux_type
2525
use CNVegStateType , only : cnveg_state_type
26+
use CNVegNitrogenStateType, only: cnveg_nitrogenstate_type
2627
use CropReprPoolsMod , only : nrepr
2728
use CNPhenologyMod , only : CropPhase
2829
use CNSharedParamsMod , only : use_fun
@@ -433,7 +434,7 @@ end subroutine calc_crop_allocation_fractions
433434

434435
!-----------------------------------------------------------------------
435436
subroutine calc_allometry(num_soilp, filter_soilp, &
436-
cnveg_carbonflux_inst, cnveg_state_inst)
437+
cnveg_carbonflux_inst, cnveg_state_inst, cnveg_nitrogenstate_inst)
437438
!
438439
! !DESCRIPTION:
439440
! Calculate c_allometry and n_allometry terms based on allocation fractions
@@ -442,6 +443,7 @@ subroutine calc_allometry(num_soilp, filter_soilp, &
442443
integer , intent(in) :: num_soilp ! number of soil patches in filter
443444
integer , intent(in) :: filter_soilp(:) ! filter for soil patches
444445
type(cnveg_carbonflux_type) , intent(in) :: cnveg_carbonflux_inst
446+
type(cnveg_nitrogenstate_type) , intent(in) :: cnveg_nitrogenstate_inst
445447
type(cnveg_state_type) , intent(inout) :: cnveg_state_inst
446448
!
447449
! !LOCAL VARIABLES:
@@ -464,7 +466,7 @@ subroutine calc_allometry(num_soilp, filter_soilp, &
464466
croot_stem => pftcon%croot_stem , & ! Input: allocation parameter: new coarse root C per new stem C (gC/gC)
465467
stem_leaf => pftcon%stem_leaf , & ! Input: allocation parameter: new stem c per new leaf C (gC/gC)
466468
flivewd => pftcon%flivewd , & ! Input: allocation parameter: fraction of new wood that is live (phloem and ray parenchyma) (no units)
467-
leafcn => pftcon%leafcn , & ! Input: leaf C:N (gC/gN)
469+
leafcn_t_evolving => cnveg_nitrogenstate_inst%leafcn_t_evolving_patch, & ! Input: leaf C:N (gC/gN)
468470
frootcn => pftcon%frootcn , & ! Input: fine root C:N (gC/gN)
469471
livewdcn => pftcon%livewdcn , & ! Input: live wood (phloem and ray parenchyma) C:N (gC/gN)
470472
deadwdcn => pftcon%deadwdcn , & ! Input: dead wood (xylem and heartwood) C:N (gC/gN)
@@ -503,7 +505,7 @@ subroutine calc_allometry(num_soilp, filter_soilp, &
503505
else
504506
g1 = grperc(ivt(p))
505507
end if
506-
cnl = leafcn(ivt(p))
508+
cnl = leafcn_t_evolving(p)
507509
cnfr = frootcn(ivt(p))
508510
cnlw = livewdcn(ivt(p))
509511
cndw = deadwdcn(ivt(p))

src/biogeochem/CNDriverMod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ subroutine CNDriverNoLeaching(bounds,
429429
end if
430430

431431
call calc_allometry(num_bgc_vegp, filter_bgc_vegp, &
432-
cnveg_carbonflux_inst, cnveg_state_inst)
432+
cnveg_carbonflux_inst, cnveg_state_inst, cnveg_nitrogenstate_inst)
433433
call t_stopf('cnalloc')
434434
end if
435435

src/biogeochem/CNFUNMod.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ subroutine CNFUNInit (bounds,cnveg_state_inst,cnveg_carbonstate_inst,cnveg_nitro
216216

217217
! Set local pointers
218218
associate(ivt => patch%itype , & ! Input: [integer (:) ] p
219-
leafcn => pftcon%leafcn , & ! Input: leaf C:N (gC/gN)
219+
leafcn_t_evolving => cnveg_nitrogenstate_inst%leafcn_t_evolving_patch , & ! Input: leaf C:N (gC/gN)
220220
leafcn_offset => cnveg_state_inst%leafcn_offset_patch , & ! Output:
221221
! [real(r8) (:) ] Leaf C:N used by FUN
222222
leafc_storage_xfer_acc => cnveg_carbonstate_inst%leafc_storage_xfer_acc_patch , & ! Output: [real(r8) (:)
@@ -249,7 +249,7 @@ subroutine CNFUNInit (bounds,cnveg_state_inst,cnveg_carbonstate_inst,cnveg_nitro
249249
!---
250250
numofyear = nstep/nstep_fun
251251
if (mod(nstep,nstep_fun) == 0) then
252-
leafcn_offset(bounds%begp:bounds%endp) = leafcn(ivt(bounds%begp:bounds%endp))
252+
leafcn_offset(bounds%begp:bounds%endp) = leafcn_t_evolving(bounds%begp:bounds%endp)
253253
storage_cdemand(bounds%begp:bounds%endp) = 0._r8
254254
storage_ndemand(bounds%begp:bounds%endp) = 0._r8
255255
leafn_storage_xfer_acc(bounds%begp:bounds%endp) = 0._r8
@@ -573,7 +573,7 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp&
573573
!--------------------------------------------------------------------
574574
!---------------------------------
575575
associate(ivt => patch%itype , & ! Input: [integer (:) ] p
576-
leafcn => pftcon%leafcn , & ! Input: leaf C:N (gC/gN)
576+
leafcn_t_evolving => cnveg_nitrogenstate_inst%leafcn_t_evolving_patch , & ! Input: leaf C:N (gC/gN)
577577
season_decid => pftcon%season_decid , & ! Input: binary flag for seasonal
578578
! -deciduous leaf habit (0 or 1)
579579
stress_decid => pftcon%stress_decid , & ! Input: binary flag for stress
@@ -1276,7 +1276,7 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp&
12761276
litterfall_c_step(p,istp)* fixerfrac,&
12771277
litterfall_n_step(p,istp)* fixerfrac,&
12781278
total_n_resistance, total_c_spent_retrans,total_c_accounted_retrans, &
1279-
free_n_retrans,paid_for_n_retrans, leafcn(ivt(p)), &
1279+
free_n_retrans,paid_for_n_retrans, leafcn_t_evolving(p), &
12801280
grperc(ivt(p)), plantCN(p))
12811281

12821282
else
@@ -1307,7 +1307,7 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp&
13071307
if (leafn(p) == 0.0_r8) then ! to avoid division by zero
13081308
delta_CN = fun_cn_flex_c(ivt(p)) ! Max CN ratio over standard
13091309
else
1310-
delta_CN = (leafc(p)+leafc_storage(p))/(leafn(p)+leafn_storage(p)) - leafcn(ivt(p)) ! leaf CN ratio
1310+
delta_CN = (leafc(p)+leafc_storage(p))/(leafn(p)+leafn_storage(p)) - leafcn_t_evolving(p) ! leaf CN ratio
13111311
end if
13121312
! C used for uptake is reduced if the cost of N is very high
13131313
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)) )

0 commit comments

Comments
 (0)