Skip to content

Commit 5e4f2f0

Browse files
authored
Merge pull request #3553 from samsrabin/b4b-dev-merge-20251016
b4b-dev merge 2025-10-16
2 parents 994e029 + ad53f9c commit 5e4f2f0

File tree

6 files changed

+142
-4
lines changed

6 files changed

+142
-4
lines changed

doc/ChangeLog

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,68 @@
11
===============================================================
2+
Tag name: ctsm5.3.080
3+
Originator(s): samrabin (Sam Rabin, UCAR/TSS)
4+
Date: Thu Oct 16 13:41:08 MDT 2025
5+
One-line Summary: Merge b4b-dev to master
6+
7+
Purpose and description of changes
8+
----------------------------------
9+
10+
Merge b4b-dev to master. Includes these PRs:
11+
- [ESCOMP/CTSM Pull Request #3193: resolve issue #103: Example 1.7 typo by linniahawkins](https://github.com/ESCOMP/CTSM/pull/3193)
12+
- [ESCOMP/CTSM Pull Request #3518: Update of the leaching doc by jinmuluo](https://github.com/ESCOMP/CTSM/pull/3518)
13+
- [ESCOMP/CTSM Pull Request #3548: Finishing adding RC14_CANAIR history output by ekluzek](https://github.com/ESCOMP/CTSM/pull/3548)
14+
15+
Significant changes to scientifically-supported configurations
16+
--------------------------------------------------------------
17+
18+
Does this tag change answers significantly for any of the following physics configurations?
19+
(Details of any changes will be given in the "Answer changes" section below.)
20+
21+
[Put an [X] in the box for any configuration with significant answer changes.]
22+
23+
[ ] clm6_0
24+
25+
[ ] clm5_0
26+
27+
[ ] ctsm5_0-nwp
28+
29+
[ ] clm4_5
30+
31+
32+
Bugs fixed
33+
----------
34+
35+
List of CTSM issues fixed in the included PRs:
36+
- [ESCOMP/CTSM Issue #103: Example 1.7 typo](https://github.com/ESCOMP/CTSM/issues/103)
37+
- [ESCOMP/CTSM Issue #3488: Add RC14_CANAIR as optional to history output so that C14 time series data can be verified](https://github.com/ESCOMP/CTSM/issues/3488)
38+
- [ESCOMP/CTSM Issue #3490: Change history averaging of RC13_CANAIR and RC14_CANAIR so that zero's aren't averaged in](https://github.com/ESCOMP/CTSM/issues/3490)
39+
40+
41+
Notes of particular relevance for users
42+
---------------------------------------
43+
44+
Changes to documentation:
45+
- Updated leaching documentation
46+
- Typo fix
47+
48+
49+
Testing summary:
50+
----------------
51+
52+
regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):
53+
54+
derecho ----- OK
55+
izumi ------- OK
56+
57+
58+
Other details
59+
-------------
60+
61+
Pull Requests that document the changes (include PR ids):
62+
- [ESCOMP/CTSM Pull Request #3553: b4b-dev merge 2025-10-16 by samsrabin](https://github.com/ESCOMP/CTSM/pull/3553)
63+
64+
===============================================================
65+
===============================================================
266
Tag name: ctsm5.3.079
367
Originator(s): samrabin (Sam Rabin, UCAR/TSS)
468
Date: Mon Oct 6 21:41:11 MDT 2025

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.080 samrabin 10/16/2025 Merge b4b-dev to master
34
ctsm5.3.079 samrabin 10/06/2025 Update submodules to match versions in cesm3_0_alpha07e
45
ctsm5.3.078 slevis 10/03/2025 Merge b4b-dev to master
56
ctsm5.3.077 rgknox 10/02/2025 Adjustment of timestep albedo filtering with FATES

doc/source/tech_note/External_Nitrogen_Cycle/CLM50_Tech_Note_External_Nitrogen_Cycle.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,45 @@ where :math:`{WS}_{tot\_soil}` (kgH\ :sub:`2`\ O m\ :sup:`-2`) is the total mass
133133
134134
NF_{leached} =\min \left(NF_{leached} ,\frac{NS_{sminn} sf}{\Delta t} \right).
135135
136+
Alternative way of evaluating the Leaching Losses of Nitrogen
137+
--------------------------------------------------------------
138+
139+
The previous leaching mechanism is not designed for describing the vertical transport of :math:`{NO}_{3}^{-}` in soil, an alternative way to evaluate the vertical convective, diffusive, and dispersive of dissolved :math:`{NO}_{3}^{-}` in soil is provided in (:ref:`Luo et al. 2025 <Luoetal2025>`).
140+
To obtain the vertical profile of soil mineral N after vertical movement of each timestep, the vertical transport equation is summarized in :eq:`22.20`.
141+
142+
.. math::
143+
:label: 22.20
144+
145+
\frac{\partial NS_{sminn}}{\partial t} = \frac{\partial J}{\partial z} + S
146+
147+
where :math:`NS_{sminn} (gN m^{-3})` is the soil :math:`{NO}_{3}^{-}` concentration in each layer, :math:`J (gN m^{-2} s^{-1})` is the different vertical transport terms (:math:`J_{convective}, J_{diffusive}, J_{dispersive}`) between two soil layers, and :math:`S` is the sources or sinks fluxes.
148+
Different transport terms are explained below
149+
150+
.. math::
151+
:label: 22.21
152+
153+
J_{convective} = sf \frac{SN_{sminn}q_{out}}{\theta}
154+
155+
where :math:`q_{out} (mH_{2}Os^{-1})` is the darcy flow of water, :math:`\theta (m^3H_{2}O m^{-3}soil)` is the soil water content.
156+
157+
.. math::
158+
:label: 22.22
159+
160+
J_{diffusive} = -D_{aq} \frac{\theta^{7/3}}{\phi^{2}} \frac{\partial SN_{sminn}}{ \partial z}
161+
162+
where :math:`\partial SN_{sminn}/ \partial z` is the concentration gradient, :math:`D_{aq}` is the nitrate aqueous diffusion coefficient which is taken as :math:`1.7*10^{-9} m^{2}s^{-1}`, and :math:`\phi (m^3m^{-3})` is soil porosity.
163+
164+
.. math::
165+
:label: 22.23
166+
167+
J_{dispersive} = -D_{dis} \frac{\theta^{7/3}}{\phi^{2}} \frac{\partial SN_{sminn}}{ \partial z}
168+
169+
where :math:`D_{dis}` is the dispersion coefficient, which equal to :math:`L_{dis} q_{out} \theta ^{-1}`, for simplicity reasons, :math:`L_{dis}` is taken as 0.1 meter.
170+
171+
Finally, the classical convective-diffusion algorithm described in (:ref:`Patankar.2018 <Patankaretal2018>`) is used to discrete and solve the :math:`{NO}_{3}^{-}` vertical transport :eq:`22.20` in soils.
172+
The advantage of this leaching mechanism is the soil :math:`{NO}_{3}^{-}` is able to move vertically (both upward or downward) with soil water movement, the mass of :math:`{NO}_{3}^{-}` reaches bedrock layer is finally taken as the :math:`NF_{leached}`.
173+
174+
136175
Losses of Nitrogen Due to Fire
137176
-----------------------------------
138177

doc/source/tech_note/References/CLM50_Tech_Note_References.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,10 @@ Lowe, P.R. 1977. An approximating polynomial for the computation of saturation v
843843

844844
Luo, Y., Hui, D., and Zhang, D. 2006. Elevated CO2 stimulates net accumulations of carbon and nitrogen in land ecosystems: a meta-analysis. Ecology 87:53-63.
845845

846+
.. _Luoetal2025:
847+
848+
Luo J, Hess P G, Hall S, et al. Agricultural emissions of reactive nitrogen gases from constrained simulations using the Community Land Model. Authorea Preprints, 2025.
849+
846850
.. _Magilletal1997:
847851

848852
Magill, A.H. et al., 1997. Biogeochemical response of forest ecosystems to simulated chronic nitrogen deposition. Ecological Applications, 7: 402-415.
@@ -1048,6 +1052,10 @@ Parton, W. et al. 1996. Generalized model for N2 and N2O production from nitrifi
10481052

10491053
Parton, W.J. et al. 2001. Generalized model for NOx and N2O emissions from soils. J. Geophys. Res. 106(D15):17403-17419.
10501054

1055+
.. _Patankaretal2018:
1056+
1057+
Patankar S., 2018. Numerical heat transfer and fluid flow[M]. CRC press., Boca Raton, section 5.2, 80-95 pp
1058+
10511059
.. _Paterson1994:
10521060

10531061
Paterson, W.S.B., 1994. The Physics of Glaciers. Elsevier Science Inc., New York, 480 pp.

doc/source/users_guide/setting-up-and-running-a-case/customizing-the-clm-namelist.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Example: user_nl_clm namelist outputting some files in 1D Vector format
186186
hist_fincl5 = 'TG'
187187
hist_fincl6 = 'TG'
188188
hist_dov2xy = .true., .false., .false., .false.
189-
hist_type2d_pertape = ' ', 'GRID', 'COLS', ' '
189+
hist_type1d_pertape = ' ', 'GRID', 'COLS', ' '
190190
hist_nhtfrq = 0, -24, -24, -24
191191

192192
.. warning:: ``LAND`` and ``COLS`` are also options to the pertape averaging, but currently there is a bug with them and they fail to work.

src/biogeophys/PhotosynthesisMod.F90

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ module PhotosynthesisMod
172172
real(r8), pointer, public :: rc13_psnsun_patch (:) ! patch C13O2/C12O2 in sunlit canopy psn flux
173173
real(r8), pointer, public :: rc13_psnsha_patch (:) ! patch C13O2/C12O2 in shaded canopy psn flux
174174

175+
real(r8), pointer, public :: rc14_canair_patch (:) ! patch C14O2/C12O2 in canopy air
176+
175177
real(r8), pointer, public :: psnsun_patch (:) ! patch sunlit leaf photosynthesis (umol CO2/m**2/s)
176178
real(r8), pointer, public :: psnsha_patch (:) ! patch shaded leaf photosynthesis (umol CO2/m**2/s)
177179
real(r8), pointer, public :: c13_psnsun_patch (:) ! patch c13 sunlit leaf photosynthesis (umol 13CO2/m**2/s)
@@ -346,6 +348,7 @@ subroutine InitAllocate(this, bounds)
346348
allocate(this%rc13_canair_patch (begp:endp)) ; this%rc13_canair_patch (:) = nan
347349
allocate(this%rc13_psnsun_patch (begp:endp)) ; this%rc13_psnsun_patch (:) = nan
348350
allocate(this%rc13_psnsha_patch (begp:endp)) ; this%rc13_psnsha_patch (:) = nan
351+
allocate(this%rc14_canair_patch (begp:endp)) ; this%rc14_canair_patch (:) = nan
349352

350353
allocate(this%cisun_z_patch (begp:endp,1:nlevcan)) ; this%cisun_z_patch (:,:) = nan
351354
allocate(this%cisha_z_patch (begp:endp,1:nlevcan)) ; this%cisha_z_patch (:,:) = nan
@@ -449,6 +452,7 @@ subroutine Clean(this)
449452
deallocate(this%rc13_canair_patch )
450453
deallocate(this%rc13_psnsun_patch )
451454
deallocate(this%rc13_psnsha_patch )
455+
deallocate(this%rc14_canair_patch )
452456

453457
deallocate(this%cisun_z_patch )
454458
deallocate(this%cisha_z_patch )
@@ -579,7 +583,7 @@ subroutine InitHistory(this, bounds)
579583
this%rc13_canair_patch(begp:endp) = spval
580584
call hist_addfld1d (fname='RC13_CANAIR', units='proportion', &
581585
avgflag='A', long_name='C13/C(12+13) for canopy air', &
582-
ptr_patch=this%rc13_canair_patch, default='inactive')
586+
ptr_patch=this%rc13_canair_patch, set_spec=spval, default='inactive')
583587

584588
this%rc13_psnsun_patch(begp:endp) = spval
585589
call hist_addfld1d (fname='RC13_PSNSUN', units='proportion', &
@@ -592,6 +596,13 @@ subroutine InitHistory(this, bounds)
592596
ptr_patch=this%rc13_psnsha_patch, default='inactive')
593597
endif
594598

599+
if ( use_c14 ) then
600+
this%rc14_canair_patch(begp:endp) = spval
601+
call hist_addfld1d (fname='RC14_CANAIR', units='proportion', &
602+
avgflag='A', long_name='C14/C(12+13) for canopy air', &
603+
ptr_patch=this%rc14_canair_patch, set_spec=spval, default='inactive')
604+
end if
605+
595606
! Canopy physiology
596607

597608
if ( use_c13 ) then
@@ -1034,6 +1045,11 @@ subroutine Restart(this, bounds, ncid, flag)
10341045
dim1name='pft', long_name='', units='', &
10351046
interpinic_flag='interp', readvar=readvar, data=this%rc13_psnsha_patch)
10361047
endif
1048+
if ( use_c14 ) then
1049+
call restartvar(ncid=ncid, flag=flag, varname='rc14_canair', xtype=ncd_double, &
1050+
dim1name='pft', long_name='', units='', &
1051+
interpinic_flag='interp', readvar=readvar, data=this%rc14_canair_patch)
1052+
end if
10371053

10381054
call restartvar(ncid=ncid, flag=flag, varname='GSSUN', xtype=ncd_double, &
10391055
dim1name='pft', dim2name='levcan', switchdim=.true., &
@@ -1173,10 +1189,13 @@ subroutine TimeStepInit (this, bounds)
11731189
.or. lun%itype(l) == istice &
11741190
.or. lun%itype(l) == istwet) then
11751191
if (use_c13) then
1176-
this%rc13_canair_patch(p) = 0._r8
1192+
this%rc13_canair_patch(p) = spval
11771193
this%rc13_psnsun_patch(p) = 0._r8
11781194
this%rc13_psnsha_patch(p) = 0._r8
11791195
end if
1196+
if (use_c14) then
1197+
this%rc14_canair_patch(p) = spval
1198+
end if
11801199
end if
11811200
end do
11821201

@@ -1197,11 +1216,15 @@ subroutine NewPatchInit (this, p)
11971216
if ( use_c13 ) then
11981217
this%alphapsnsun_patch(p) = 0._r8
11991218
this%alphapsnsha_patch(p) = 0._r8
1200-
this%rc13_canair_patch(p) = 0._r8
1219+
this%rc13_canair_patch(p) = spval
12011220
this%rc13_psnsun_patch(p) = 0._r8
12021221
this%rc13_psnsha_patch(p) = 0._r8
12031222
endif
12041223

1224+
if ( use_c14 ) then
1225+
this%rc14_canair_patch(p) = spval
1226+
end if
1227+
12051228
this%psnsun_patch(p) = 0._r8
12061229
this%psnsha_patch(p) = 0._r8
12071230

@@ -2072,6 +2095,7 @@ subroutine PhotosynthesisTotal (fn, filterp, &
20722095
rc13_canair => photosyns_inst%rc13_canair_patch , & ! Output: [real(r8) (:) ] C13O2/C12O2 in canopy air
20732096
rc13_psnsun => photosyns_inst%rc13_psnsun_patch , & ! Output: [real(r8) (:) ] C13O2/C12O2 in sunlit canopy psn flux
20742097
rc13_psnsha => photosyns_inst%rc13_psnsha_patch , & ! Output: [real(r8) (:) ] C13O2/C12O2 in shaded canopy psn flux
2098+
rc14_canair => photosyns_inst%rc14_canair_patch , & ! Output: [real(r8) (:) ] C1342/C12O2 in canopy air
20752099
alphapsnsun => photosyns_inst%alphapsnsun_patch , & ! Output: [real(r8) (:) ] fractionation factor in sunlit canopy psn flux
20762100
alphapsnsha => photosyns_inst%alphapsnsha_patch , & ! Output: [real(r8) (:) ] fractionation factor in shaded canopy psn flux
20772101
psnsun_wc => photosyns_inst%psnsun_wc_patch , & ! Output: [real(r8) (:) ] Rubsico-limited sunlit leaf photosynthesis (umol CO2 /m**2/ s)
@@ -2142,6 +2166,8 @@ subroutine PhotosynthesisTotal (fn, filterp, &
21422166
sector_c14 = 3
21432167
endif
21442168

2169+
rc14_canair(p) = rc14_atm(sector_c14)
2170+
21452171
c14_psnsun(p) = rc14_atm(sector_c14) * psnsun(p)
21462172
c14_psnsha(p) = rc14_atm(sector_c14) * psnsha(p)
21472173
endif

0 commit comments

Comments
 (0)