Skip to content

Commit a3e738c

Browse files
authored
Merge pull request #961 from ekluzek/lunadaylbugs
Fixes for the LUNA dayl bugs
2 parents bec2729 + 3b1e861 commit a3e738c

File tree

6 files changed

+162
-12
lines changed

6 files changed

+162
-12
lines changed

bld/namelist_files/namelist_defaults_ctsm.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
393393
<!-- The default filenames are given relative to the root directory
394394
for the CLM2 data in the CESM distribution -->
395395
<!-- Plant function types (relative to {csmdata}) -->
396-
<paramfile phys="clm5_0">lnd/clm2/paramdata/clm5_params.c200614.nc</paramfile>
397-
<paramfile phys="clm4_5">lnd/clm2/paramdata/clm45_params.c200614.nc</paramfile>
396+
<paramfile phys="clm5_0">lnd/clm2/paramdata/clm5_params.c200624.nc</paramfile>
397+
<paramfile phys="clm4_5">lnd/clm2/paramdata/clm45_params.c200624.nc</paramfile>
398398

399399
<!-- ================================================================== -->
400400
<!-- FATES default parameter file -->
@@ -442,7 +442,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
442442
<use_fertilizer use_crop=".true." phys="clm4_5">.true.</use_fertilizer>
443443
<use_fertilizer use_crop=".true." phys="clm5_0">.true.</use_fertilizer>
444444

445-
<jmaxb1 use_luna=".true." phys="clm5_0">0.093563</jmaxb1>
445+
<jmaxb1 use_luna=".true." phys="clm5_0">0.17</jmaxb1>
446446

447447
<use_grainproduct>.false.</use_grainproduct>
448448
<use_grainproduct use_crop=".true." phys="clm4_5">.false.</use_grainproduct> <!-- 1-year grain product pool default to off for clm45 if crop is turned on -->

doc/ChangeLog

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,136 @@
11
===============================================================
2+
Tag name: ctsm1.0.dev102
3+
Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326)
4+
Date: Fri Jun 26 01:32:04 MDT 2020
5+
One-line Summary: Some important fixes for LUNA in clm5_0, and small urban issue in clm5_0
6+
7+
Purpose of changes
8+
------------------
9+
10+
Fix some important issues that were found in LUNA for the arctic. These changes were large enough
11+
that we had to re-tune the clm5_0 parameters to give a similar simulation. Leah Birch noticed
12+
that the formulations in the code disagreed with the paper. Correcting this caused arctic plants
13+
to be less productive. In order to compensate parameters for leafcn, and slatop were adjusted for
14+
broadleaf_deciduous_boreal_shrub and c3_arctic_grass for clm5_0.
15+
16+
The total vegetation carbon threshold on exit_spinup (from accelerated decomposition (AD) mode) was
17+
increased from 0.1 to 1.0. Without this change some PFT's can die out in exit spinup even when
18+
they have significant carbon stores from the AD spinup mode.
19+
20+
There is an implicit assumption in the urban building energy model that building width equals
21+
street width. However, this assumption can/should be relaxed and building width can be derived
22+
from the morphology dataset.
23+
24+
25+
Bugs fixed or introduced
26+
------------------------
27+
28+
Issues fixed (include CTSM Issue #): #738 #803 #953 #958 #1056
29+
Fixes #1056 -- Remove allpfts dimension
30+
Fixes #953 -- Incorrect formula in LUNA uses day time rather than average of day/night
31+
Fixes #958 -- LUNA day length factor missing
32+
Fixes #738 -- Totvegc threshold increased from 0.1 to 1.
33+
Fixes #803 -- No longer assume building width
34+
35+
Known bugs introduced in this tag (include github issue ID): #1060
36+
#1060 -- Some code cleanup of luna bug fixes
37+
38+
Significant changes to scientifically-supported configurations
39+
--------------------------------------------------------------
40+
41+
Does this tag change answers significantly for any of the following physics configurations?
42+
(Details of any changes will be given in the "Answer changes" section below.)
43+
44+
[Put an [X] in the box for any configuration with significant answer changes.]
45+
46+
[x] clm5_0
47+
48+
[x] ctsm5_0-nwp
49+
50+
[ ] clm4_5
51+
52+
Notes of particular relevance for users
53+
---------------------------------------
54+
55+
Caveats for users (e.g., need to interpolate initial conditions): clm5_0 climate adjusted for arctic plants
56+
57+
Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): none
58+
59+
Changes made to namelist defaults (e.g., changed parameter values):
60+
61+
Changes to the datasets (e.g., parameter, surface or initial files): New parameter files
62+
63+
Substantial timing or memory changes: None
64+
65+
Notes of particular relevance for developers: (including Code reviews and testing)
66+
---------------------------------------------
67+
NOTE: Be sure to review the steps in README.CHECKLIST.master_tags as well as the coding style in the Developers Guide
68+
69+
Caveats for developers (e.g., code that is duplicated that requires double maintenance): We
70+
chose some bad names for variables, so we'll clean this up in a seperate step (see #1060)
71+
72+
Changes to tests or testing: None
73+
74+
Code reviewed by: self, olyson, bill-sacks, wweider
75+
76+
77+
CTSM testing: regular
78+
79+
[PASS means all tests PASS and OK means tests PASS other than expected fails.]
80+
81+
build-namelist tests:
82+
83+
cheyenne - PASS (266 compare differently because of update in paramsfile and jmaxb1)
84+
85+
python testing (see instructions in python/README.md; document testing done):
86+
87+
cheyenne - PASS
88+
89+
regular tests (aux_clm):
90+
91+
cheyenne ---- PASS
92+
izumi ------- PASS
93+
94+
If the tag used for baseline comparisons was NOT the previous tag, note that here:
95+
96+
97+
Answer changes
98+
--------------
99+
100+
Changes answers relative to baseline: Yes for clm5_0
101+
102+
If a tag changes answers relative to baseline comparison the
103+
following should be filled in (otherwise remove this section):
104+
105+
Summarize any changes to answers, i.e.,
106+
- what code configurations: clm5_0 when Luna on as well as smaller changes for urban
107+
- what platforms/compilers: all
108+
- nature of change: climate changing, but tuned to respond similar to clm5.0
109+
110+
If this tag changes climate describe the run(s) done to evaluate the new
111+
climate (put details of the simulations in the experiment database)
112+
luna changes: oleson case clm50_ctsm10d089_2deg_GSWP3V1_luna3_jmaxb1-0.17_slatopA_leafcnA_hist
113+
114+
URL for LMWG diagnostics output used to validate new climate:
115+
116+
urban changes:
117+
118+
119+
http://webext.cgd.ucar.edu/I2000/clm50_ctsm10d098_1deg_GSWP3V1_CON_FIXBUILDENERGY_2000/lnd/clm50_ctsm10d098_1deg_GSWP3V1_CON_FIXBUILDENERGY_2000.1991_2010-clm50_ctsm10d098_1deg_GSWP3V1_CON_2000.1991_2010/setsIndex.html
120+
121+
122+
Detailed list of changes
123+
------------------------
124+
125+
List any externals directories updated (cime, rtm, mosart, cism, fates, etc.): None
126+
127+
Pull Requests that document the changes (include PR ids): #1034 and #962
128+
(https://github.com/ESCOMP/ctsm/pull)
129+
#1034 -- Building energy fix
130+
#962 --- Fixes for the LUNA dayl bugs
131+
132+
===============================================================
133+
===============================================================
2134
Tag name: ctsm1.0.dev101
3135
Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326), oleson (Keith Oleson)
4136
Date: Wed Jun 17 23:51:22 MDT 2020

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+
ctsm1.0.dev102 erik/ole 06/26/2020 Some important fixes for LUNA in clm5_0, and small urban issue in clm5_0
34
ctsm1.0.dev101 ole/erik 06/17/2020 Changes from Keith to bring a list of variables to the parameter file
45
ctsm1.0.dev100 sacks 06/09/2020 Deallocate memory after running init_interp
56
ctsm1.0.dev099 sacks 06/08/2020 Update cime, needed for izumi machine updates

src/biogeophys/LunaMod.F90

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,9 @@ subroutine Update_Photosynthesis_Capacity(bounds, fn, filterp, &
319319
vcmx25_z => photosyns_inst%vcmx25_z_patch , & ! Output: [real(r8) (:,:) ] patch leaf Vc,max25 (umol/m2 leaf/s) for canopy layer
320320
jmx25_z => photosyns_inst%jmx25_z_patch , & ! Output: [real(r8) (:,:) ] patch leaf Jmax25 (umol electron/m**2/s) for canopy layer
321321
pnlc_z => photosyns_inst%pnlc_z_patch , & ! Output: [real(r8) (:,:) ] patch proportion of leaf nitrogen allocated for light capture for canopy layer
322-
enzs_z => photosyns_inst%enzs_z_patch & ! Output: [real(r8) (:,:) ] enzyme decay status 1.0-fully active; 0-all decayed during stress
322+
enzs_z => photosyns_inst%enzs_z_patch , & ! Output: [real(r8) (:,:) ] enzyme decay status 1.0-fully active; 0-all decayed during stress
323+
vcmx_prevyr => photosyns_inst%vcmx_prevyr , & ! Output: [real(r8) (:,:) ] patch leaf Vc,max25 from previous year avg
324+
jmx_prevyr => photosyns_inst%jmx_prevyr & ! Output: [real(r8) (:,:) ] patch leaf Jmax25 from previous year avg
323325
)
324326
!----------------------------------------------------------------------------------------------------------------------------------------------------------
325327
!set timestep
@@ -345,7 +347,7 @@ subroutine Update_Photosynthesis_Capacity(bounds, fn, filterp, &
345347
hourpd = dayl(g) / 3600._r8
346348
tleafd10 = t_veg10_day(p) - tfrz
347349
tleafn10 = t_veg10_night(p) - tfrz
348-
tleaf10 = (dayl(g)*tleafd10 +(86400._r8-dayl(g)) * tleafd10)/86400._r8
350+
tleaf10 = (dayl(g)*tleafd10 +(86400._r8-dayl(g)) * tleafn10)/86400._r8
349351
tair10 = t10(p)- tfrz
350352
relh10 = min(1.0_r8, rh10_p(p))
351353
rb10v = rb10_p(p)
@@ -415,18 +417,20 @@ subroutine Update_Photosynthesis_Capacity(bounds, fn, filterp, &
415417
PNcbold = 0.0_r8
416418
call NitrogenAllocation(FNCa,forc_pbot10(p), relh10, CO2a10, O2a10, PARi10, PARimx10, rb10v, hourpd, &
417419
tair10, tleafd10, tleafn10, &
418-
Jmaxb1, PNlcold, PNetold, PNrespold, &
419-
PNcbold, PNstoreopt, PNlcopt, PNetopt, PNrespopt, PNcbopt)
420+
Jmaxb1, PNlcold, PNetold, PNrespold, PNcbold, dayl_factor(p), &
421+
PNstoreopt, PNlcopt, PNetopt, PNrespopt, PNcbopt)
420422
vcmx25_opt= PNcbopt * FNCa * Fc25
421423
jmx25_opt= PNetopt * FNCa * Fj25
422424

423425
chg = vcmx25_opt-vcmx25_z(p, z)
424426
chg_constrn = min(abs(chg),vcmx25_z(p, z)*max_daily_pchg)
425427
vcmx25_z(p, z) = vcmx25_z(p, z)+sign(1.0_r8,chg)*chg_constrn
428+
vcmx_prevyr(p,z) = vcmx25_z(p,z)
426429

427430
chg = jmx25_opt-jmx25_z(p, z)
428431
chg_constrn = min(abs(chg),jmx25_z(p, z)*max_daily_pchg)
429432
jmx25_z(p, z) = jmx25_z(p, z)+sign(1.0_r8,chg)*chg_constrn
433+
jmx_prevyr(p,z) = jmx25_z(p,z)
430434

431435
PNlc_z(p, z)= PNlcopt
432436

@@ -485,8 +489,8 @@ subroutine Update_Photosynthesis_Capacity(bounds, fn, filterp, &
485489
endif !if not C3 plants
486490
else
487491
do z = 1 , nrad(p)
488-
jmx25_z(p, z) = 85._r8
489-
vcmx25_z(p, z) = 50._r8
492+
jmx25_z(p, z) = jmx_prevyr(p,z)
493+
vcmx25_z(p, z) = vcmx_prevyr(p,z)
490494
end do
491495
endif !checking for LAI and LNC
492496
endif !the first daycheck
@@ -803,7 +807,7 @@ end subroutine Clear24_Climate_LUNA
803807
!************************************************************************************************************************************************
804808
!Use the LUNA model to calculate the Nitrogen partioning
805809
subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PARimx10,rb10, hourpd, tair10, tleafd10, tleafn10, &
806-
Jmaxb1, PNlcold, PNetold, PNrespold, PNcbold, &
810+
Jmaxb1, PNlcold, PNetold, PNrespold, PNcbold, dayl_factor, &
807811
PNstoreopt, PNlcopt, PNetopt, PNrespopt, PNcbopt)
808812
implicit none
809813
real(r8), intent (in) :: FNCa !Area based functional nitrogen content (g N/m2 leaf)
@@ -823,6 +827,7 @@ subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PAR
823827
real(r8), intent (in) :: PNetold !old value of the proportion of nitrogen allocated to electron transport (unitless)
824828
real(r8), intent (in) :: PNrespold !old value of the proportion of nitrogen allocated to respiration (unitless)
825829
real(r8), intent (in) :: PNcbold !old value of the proportion of nitrogen allocated to carboxylation (unitless)
830+
real(r8), intent (in) :: dayl_factor !daylight scale factor
826831
real(r8), intent (out):: PNstoreopt !optimal proportion of nitrogen for storage
827832
real(r8), intent (out):: PNlcopt !optimal proportion of nitrogen for light capture
828833
real(r8), intent (out):: PNetopt !optimal proportion of nitrogen for electron transport
@@ -904,7 +909,7 @@ subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PAR
904909
tleafd10c = min(max(tleafd10, Trange1), Trange2) !constrain the physiological range
905910
tleafn10c = min(max(tleafn10, Trange1), Trange2) !constrain the physiological range
906911
ci = 0.7_r8 * CO2a10
907-
JmaxCoef = Jmaxb1 * ((hourpd / 12.0_r8)**2.0_r8) * (1.0_r8 - exp(-params_inst%relhExp * max(relh10 - &
912+
JmaxCoef = Jmaxb1 * dayl_factor * (1.0_r8 - exp(-params_inst%relhExp * max(relh10 - &
908913
params_inst%minrelh, 0.0_r8) / (1.0_r8 - params_inst%minrelh)))
909914
do while (PNlcoldi .NE. PNlc .and. jj < 100)
910915
Fc = VcmxTKattge(tair10, tleafd10c) * Fc25

src/biogeophys/PhotosynthesisMod.F90

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ module PhotosynthesisMod
200200
! LUNA specific variables
201201
real(r8), pointer, public :: vcmx25_z_patch (:,:) ! patch leaf Vc,max25 (umol CO2/m**2/s) for canopy layer
202202
real(r8), pointer, public :: jmx25_z_patch (:,:) ! patch leaf Jmax25 (umol electron/m**2/s) for canopy layer
203+
real(r8), pointer, public :: vcmx_prevyr (:,:) ! patch leaf Vc,max25 previous year running avg
204+
real(r8), pointer, public :: jmx_prevyr (:,:) ! patch leaf Jmax25 previous year running avg
203205
real(r8), pointer, public :: pnlc_z_patch (:,:) ! patch proportion of leaf nitrogen allocated for light capture for canopy layer
204206
real(r8), pointer, public :: enzs_z_patch (:,:) ! enzyme decay status 1.0-fully active; 0-all decayed during stress
205207
real(r8), pointer, public :: fpsn24_patch (:) ! 24 hour mean patch photosynthesis (umol CO2/m**2 ground/day)
@@ -344,6 +346,8 @@ subroutine InitAllocate(this, bounds)
344346
! statements.
345347
allocate(this%vcmx25_z_patch (begp:endp,1:nlevcan)) ; this%vcmx25_z_patch (:,:) = 30._r8
346348
allocate(this%jmx25_z_patch (begp:endp,1:nlevcan)) ; this%jmx25_z_patch (:,:) = 60._r8
349+
allocate(this%vcmx_prevyr (begp:endp,1:nlevcan)) ; this%vcmx_prevyr (:,:) = 85._r8
350+
allocate(this%jmx_prevyr (begp:endp,1:nlevcan)) ; this%jmx_prevyr (:,:) = 50._r8
347351
allocate(this%pnlc_z_patch (begp:endp,1:nlevcan)) ; this%pnlc_z_patch (:,:) = 0.01_r8
348352
allocate(this%fpsn24_patch (begp:endp)) ; this%fpsn24_patch (:) = nan
349353
allocate(this%enzs_z_patch (begp:endp,1:nlevcan)) ; this%enzs_z_patch (:,:) = 1._r8
@@ -888,6 +892,14 @@ subroutine Restart(this, bounds, ncid, flag)
888892
dim1name='pft', dim2name='levcan', switchdim=.true., &
889893
long_name='Maximum carboxylation rate at 25 celcius for canopy layers', units='umol CO2/m**2/s', &
890894
interpinic_flag='interp', readvar=readvar, data=this%jmx25_z_patch)
895+
call restartvar(ncid=ncid, flag=flag, varname='vcmx_prevyr', xtype=ncd_double, &
896+
dim1name='pft', dim2name='levcan', switchdim=.true., &
897+
long_name='avg carboxylation rate at 25 celsius for canopy layers', units='umol CO2/m**2/s', &
898+
interpinic_flag='interp', readvar=readvar, data=this%vcmx_prevyr)
899+
call restartvar(ncid=ncid, flag=flag, varname='jmx_prevyr', xtype=ncd_double, &
900+
dim1name='pft', dim2name='levcan', switchdim=.true., &
901+
long_name='avg carboxylation rate at 25 celsius for canopy layers', units='umol CO2/m**2/s', &
902+
interpinic_flag='interp', readvar=readvar, data=this%jmx_prevyr)
891903
call restartvar(ncid=ncid, flag=flag, varname='pnlc_z', xtype=ncd_double, &
892904
dim1name='pft', dim2name='levcan', switchdim=.true., &
893905
long_name='proportion of leaf nitrogen allocated for light capture', units='unitless', &

src/soilbiogeochem/SoilBiogeochemPrecisionControlMod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ subroutine SoilBiogeochemPrecisionControlInit( soilbiogeochem_carbonstate_inst,
4343
type(soilbiogeochem_nitrogenstate_type) , intent(inout) :: soilbiogeochem_nitrogenstate_inst
4444
!
4545
! !LOCAL VARIABLES:
46-
real(r8), parameter :: totvegcthresh = 0.1_r8 ! Total vegetation carbon threshold to zero out decomposition pools
46+
real(r8), parameter :: totvegcthresh = 1.0_r8 ! Total vegetation carbon threshold to zero out decomposition pools
4747
!-----------------------------------------------------------------------
4848
ccrit = 1.e-8_r8 ! critical carbon state value for truncation (gC/m2)
4949
ncrit = 1.e-8_r8 ! critical nitrogen state value for truncation (gN/m2)

0 commit comments

Comments
 (0)