Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
496ee06
Add MAX_TLAI_PERHARV history output.
samsrabin Nov 25, 2025
7f9ef13
PlantCrop: Add namelist option to suppress low gddmaturity warning.
samsrabin Nov 2, 2025
e9219a2
Fix a comment
samsrabin Nov 25, 2025
4ee9e6e
Add crop phase transition biomass outputs.
samsrabin Nov 25, 2025
291a158
Rename GRAINC_AT hist vars to HARVORGANC_AT to fix LREPRSTRUCT tests.
samsrabin Nov 26, 2025
7c89b24
Rename HARVORGANC_AT history vars to REPRC_AT.
samsrabin Dec 1, 2025
a263a92
Rename grainc_at vars to reprc_at.
samsrabin Dec 1, 2025
319be76
CropPhaseTransitionBiomass() bugfix for reproductive C.
samsrabin Dec 1, 2025
a7e66aa
PlantCrop: Fix setting max_tlai_patch.
samsrabin Jan 8, 2026
eb3237a
CropPhenology(): New variable is_mature.
samsrabin Jan 9, 2026
533383f
Only save crop maturity biomass if mature. Always save new harvest bi…
samsrabin Jan 9, 2026
7e480b9
CropPhenology(): Add a comment.
samsrabin Jan 12, 2026
71bc137
Fix restart of _harvest_ biomass variables.
samsrabin Jan 12, 2026
af1ed71
CropPhaseTransitionBiomass(): Delete an unused 'use'.
samsrabin Jan 12, 2026
365fda3
CropPhaseTransitionBiomass(): Require is_mature arg if cphase is harv…
samsrabin Jan 12, 2026
df3c1cd
Move some var inits from PlantCrop() to new CropType%InitPlantCrop().
samsrabin Jan 12, 2026
cf7d3fe
Add tests for CropType%CropPhaseTransitionBiomass(). 2 fail.
samsrabin Jan 12, 2026
f26b8e2
CropPhaseTransitionBiomass: Fix behavior if skipping phases.
samsrabin Jan 12, 2026
08b93e7
CropPhaseTransitionBiomass(): Assert cphase in expected range.
samsrabin Jan 12, 2026
3c7eac6
Merge branch 'b4b-dev' into crop-harvest-biomass-history
samsrabin Jan 13, 2026
db86d05
Merge branch 'b4b-dev' into crop-harvest-biomass-history
samsrabin Jan 17, 2026
c087862
Merge branch 'b4b-dev' into crop-harvest-biomass-history
samsrabin Jan 28, 2026
71123fa
Move CropPhaseTransitionBiomass from CropType to CNPhenology.
samsrabin Jan 28, 2026
9af60cb
test_CropPhaseTransitionBiomass: Add two failing tests.
samsrabin Jan 28, 2026
d792a2f
CropPhaseTransitionBiomass(): Consider whether crop actually reached …
samsrabin Jan 29, 2026
e8c5710
Delete an extraneous space.
samsrabin Jan 29, 2026
29bfcf2
Rename leafout to gddtsoi.
samsrabin Jan 29, 2026
485e85e
Docs: Update history_fields_nofates.rst.
samsrabin Jan 30, 2026
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
1 change: 1 addition & 0 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).

<generate_crop_gdds >.false.</generate_crop_gdds>
<use_mxmat >.true.</use_mxmat>
<suppress_gddmaturity_warning >.false.</suppress_gddmaturity_warning>

<!-- use additional stress deciduous onset trigger -->
<constrain_stress_deciduous_onset >.true.</constrain_stress_deciduous_onset>
Expand Down
5 changes: 5 additions & 0 deletions bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1484,6 +1484,11 @@ Set to .true. in order to override crop harvesting logic and to instead harvest
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.
</entry>

<entry id="suppress_gddmaturity_warning" type="logical" category="physics"
group="cnphenology" valid_values="" value=".false.">
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.
</entry>

<entry id="min_critical_dayl_method" type="char*25" category="physics"
group="cnphenology" valid_values="Constant,DependsOnLat,DependsOnVeg,DependsOnLatAndVeg">
Method for determining what the minimum critical day length for seasonal decidious leaf offset depends on
Expand Down
7 changes: 6 additions & 1 deletion cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ hist_fincl2 += 'DYN_COL_SOIL_ADJUSTMENTS_C'
! Note that, under normal circumstances, these should only be saved annually.
! That's needed for the mxsowings and mxharvests axes to make sense.
! However, for testing purposes, it makes sense to save more frequently.
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'
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'
hist_fincl3 += 'FROOTC_AT_EMERGENCE_PERHARV', 'FROOTC_AT_ANTHESIS_PERHARV', 'FROOTC_AT_MATURITY_PERHARV', 'FROOTC_AT_HARVEST_PERHARV'
hist_fincl3 += 'LIVECROOTC_AT_EMERGENCE_PERHARV', 'LIVECROOTC_AT_ANTHESIS_PERHARV', 'LIVECROOTC_AT_MATURITY_PERHARV', 'LIVECROOTC_AT_HARVEST_PERHARV'
hist_fincl3 += 'LIVESTEMC_AT_EMERGENCE_PERHARV', 'LIVESTEMC_AT_ANTHESIS_PERHARV', 'LIVESTEMC_AT_MATURITY_PERHARV', 'LIVESTEMC_AT_HARVEST_PERHARV'
hist_fincl3 += 'LEAFC_AT_EMERGENCE_PERHARV', 'LEAFC_AT_ANTHESIS_PERHARV', 'LEAFC_AT_MATURITY_PERHARV', 'LEAFC_AT_HARVEST_PERHARV'
hist_fincl3 += 'REPRC_AT_EMERGENCE_PERHARV', 'REPRC_AT_ANTHESIS_PERHARV', 'REPRC_AT_MATURITY_PERHARV', 'REPRC_AT_HARVEST_PERHARV'
hist_nhtfrq = -24,-8,-24
hist_mfilt = 1,1,1
hist_type1d_pertape(3) = 'PFTS'
Expand Down
2,890 changes: 1,514 additions & 1,376 deletions doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst

Large diffs are not rendered by default.

185 changes: 175 additions & 10 deletions src/biogeochem/CNPhenologyMod.F90

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/biogeochem/CNVegCarbonStateType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ module CNVegCarbonStateType
procedure , public :: Summary => Summary_carbonstate
procedure , public :: DynamicPatchAdjustments ! adjust state variables when patch areas change

procedure , private :: InitAllocate ! Allocate arrays
procedure , public :: InitAllocate ! Allocate arrays. PUBLIC FOR UNIT TESTING ONLY
procedure , private :: InitReadNML ! Read in namelist
procedure , private :: InitHistory ! Initialize history
procedure , private :: InitCold ! Initialize arrays for a cold-start
Expand Down
4 changes: 4 additions & 0 deletions src/biogeochem/CNVegStructUpdateMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ subroutine CNVegStructUpdate(bounds,num_soilp, filter_soilp, &
peaklai => cnveg_state_inst%peaklai_patch , & ! Output: [integer (:) ] 1: max allowed lai; 0: not at max

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

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

! Maximum LAI seen this season
max_tlai(p) = max(max_tlai(p), tlai(p))

else ! generic crops and ...

! grasses
Expand Down
Loading