Skip to content

Commit 43f12fd

Browse files
authored
Merge pull request #3633 from samsrabin/crop-harvest-biomass-history
Add history outputs: Crop biomass and LAI per harvest
2 parents f90f9f1 + 485e85e commit 43f12fd

File tree

11 files changed

+2653
-1389
lines changed

11 files changed

+2653
-1389
lines changed

bld/namelist_files/namelist_defaults_ctsm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
703703

704704
<generate_crop_gdds >.false.</generate_crop_gdds>
705705
<use_mxmat >.true.</use_mxmat>
706+
<suppress_gddmaturity_warning >.false.</suppress_gddmaturity_warning>
706707

707708
<!-- use additional stress deciduous onset trigger -->
708709
<constrain_stress_deciduous_onset >.true.</constrain_stress_deciduous_onset>

bld/namelist_files/namelist_definition_ctsm.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,6 +1484,11 @@ Set to .true. in order to override crop harvesting logic and to instead harvest
14841484
Set to .false. in order to ignore crop PFT parameter for maximum growing season length (mxmat). Must be set to .false. when generate_crop_gdds is .true.
14851485
</entry>
14861486

1487+
<entry id="suppress_gddmaturity_warning" type="logical" category="physics"
1488+
group="cnphenology" valid_values="" value=".false.">
1489+
If set to .true., suppress the warning message when a prescribed cultivar GDD requirement is below the minimum allowed value and is replaced with min_gddmaturity. Useful when using prescribed crop calendars with intentionally low GDD requirements.
1490+
</entry>
1491+
14871492
<entry id="min_critical_dayl_method" type="char*25" category="physics"
14881493
group="cnphenology" valid_values="Constant,DependsOnLat,DependsOnVeg,DependsOnLatAndVeg">
14891494
Method for determining what the minimum critical day length for seasonal decidious leaf offset depends on

cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ hist_fincl2 += 'DYN_COL_SOIL_ADJUSTMENTS_C'
1313
! Note that, under normal circumstances, these should only be saved annually.
1414
! That's needed for the mxsowings and mxharvests axes to make sense.
1515
! However, for testing purposes, it makes sense to save more frequently.
16-
hist_fincl3 = 'SDATES', 'SDATES_PERHARV', 'SYEARS_PERHARV', 'HDATES', 'GRAINC_TO_FOOD_PERHARV', 'GRAINC_TO_FOOD_ANN', 'GRAINN_TO_FOOD_PERHARV', 'GRAINN_TO_FOOD_ANN', 'GRAINC_TO_SEED_PERHARV', 'GRAINC_TO_SEED_ANN', 'GRAINN_TO_SEED_PERHARV', 'GRAINN_TO_SEED_ANN', 'HDATES', 'GDDHARV_PERHARV', 'GDDACCUM_PERHARV', 'HUI_PERHARV', 'SOWING_REASON_PERHARV', 'HARVEST_REASON_PERHARV', 'SWINDOW_STARTS', 'SWINDOW_ENDS', 'GDD20_BASELINE', 'GDD20_SEASON_START', 'GDD20_SEASON_END'
16+
hist_fincl3 = 'SDATES', 'SDATES_PERHARV', 'SYEARS_PERHARV', 'HDATES', 'GRAINC_TO_FOOD_PERHARV', 'GRAINC_TO_FOOD_ANN', 'GRAINN_TO_FOOD_PERHARV', 'GRAINN_TO_FOOD_ANN', 'GRAINC_TO_SEED_PERHARV', 'GRAINC_TO_SEED_ANN', 'GRAINN_TO_SEED_PERHARV', 'GRAINN_TO_SEED_ANN', 'HDATES', 'GDDHARV_PERHARV', 'GDDACCUM_PERHARV', 'HUI_PERHARV', 'SOWING_REASON_PERHARV', 'HARVEST_REASON_PERHARV', 'SWINDOW_STARTS', 'SWINDOW_ENDS', 'GDD20_BASELINE', 'GDD20_SEASON_START', 'GDD20_SEASON_END', 'MAX_TLAI_PERHARV'
17+
hist_fincl3 += 'FROOTC_AT_EMERGENCE_PERHARV', 'FROOTC_AT_ANTHESIS_PERHARV', 'FROOTC_AT_MATURITY_PERHARV', 'FROOTC_AT_HARVEST_PERHARV'
18+
hist_fincl3 += 'LIVECROOTC_AT_EMERGENCE_PERHARV', 'LIVECROOTC_AT_ANTHESIS_PERHARV', 'LIVECROOTC_AT_MATURITY_PERHARV', 'LIVECROOTC_AT_HARVEST_PERHARV'
19+
hist_fincl3 += 'LIVESTEMC_AT_EMERGENCE_PERHARV', 'LIVESTEMC_AT_ANTHESIS_PERHARV', 'LIVESTEMC_AT_MATURITY_PERHARV', 'LIVESTEMC_AT_HARVEST_PERHARV'
20+
hist_fincl3 += 'LEAFC_AT_EMERGENCE_PERHARV', 'LEAFC_AT_ANTHESIS_PERHARV', 'LEAFC_AT_MATURITY_PERHARV', 'LEAFC_AT_HARVEST_PERHARV'
21+
hist_fincl3 += 'REPRC_AT_EMERGENCE_PERHARV', 'REPRC_AT_ANTHESIS_PERHARV', 'REPRC_AT_MATURITY_PERHARV', 'REPRC_AT_HARVEST_PERHARV'
1722
hist_nhtfrq = -24,-8,-24
1823
hist_mfilt = 1,1,1
1924
hist_type1d_pertape(3) = 'PFTS'

doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst

Lines changed: 1514 additions & 1376 deletions
Large diffs are not rendered by default.

src/biogeochem/CNPhenologyMod.F90

Lines changed: 175 additions & 10 deletions
Large diffs are not rendered by default.

src/biogeochem/CNVegCarbonStateType.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ module CNVegCarbonStateType
215215
procedure , public :: Summary => Summary_carbonstate
216216
procedure , public :: DynamicPatchAdjustments ! adjust state variables when patch areas change
217217

218-
procedure , private :: InitAllocate ! Allocate arrays
218+
procedure , public :: InitAllocate ! Allocate arrays. PUBLIC FOR UNIT TESTING ONLY
219219
procedure , private :: InitReadNML ! Read in namelist
220220
procedure , private :: InitHistory ! Initialize history
221221
procedure , private :: InitCold ! Initialize arrays for a cold-start

src/biogeochem/CNVegStructUpdateMod.F90

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ subroutine CNVegStructUpdate(bounds,num_soilp, filter_soilp, &
127127
peaklai => cnveg_state_inst%peaklai_patch , & ! Output: [integer (:) ] 1: max allowed lai; 0: not at max
128128

129129
harvdate => crop_inst%harvdate_patch , & ! Input: [integer (:) ] harvest date
130+
max_tlai => crop_inst%max_tlai_patch , & ! Output: [real(r8) (:) ] maximum total projected leaf area seen this season
130131

131132
! *** Key Output from CN***
132133
tlai => canopystate_inst%tlai_patch , & ! Output: [real(r8) (:) ] one-sided leaf area index, no burying by snow
@@ -260,6 +261,9 @@ subroutine CNVegStructUpdate(bounds,num_soilp, filter_soilp, &
260261
htop(p) = max(0.05_r8, max(htmx(p),htop(p)))
261262
hbot(p) = 0.02_r8
262263

264+
! Maximum LAI seen this season
265+
max_tlai(p) = max(max_tlai(p), tlai(p))
266+
263267
else ! generic crops and ...
264268

265269
! grasses

0 commit comments

Comments
 (0)