Skip to content

Make nc3crop and nc3irrig private to pftconMod - #4112

Merged
samsrabin merged 18 commits into
ESCOMP:b4b-devfrom
samsrabin:allow-new-non-crop-pfts
Jul 22, 2026
Merged

Make nc3crop and nc3irrig private to pftconMod#4112
samsrabin merged 18 commits into
ESCOMP:b4b-devfrom
samsrabin:allow-new-non-crop-pfts

Conversation

@samsrabin

@samsrabin samsrabin commented Jul 8, 2026

Copy link
Copy Markdown
Member

Description of changes

As part of our goal to make our code agnostic to the ordering of PFTs (#21) and avoid hard-coded PFT properties (#3388), this PR makes the nc3crop and nc3irrig variables (PFT indices for the generic crops) private to pftconMod.

Specific notes

Contributors other than yourself, if any: None

CTSM issues resolved or otherwise addressed, if any:

Any user interface changes (namelist or namelist defaults changes)? No

Testing planned or performed, if any:

  • aux_clm
  • fates (just to make sure some new variables I added aren't ever needed under FATES)
  • SMS_Ln9_P256x3.f19_g17.IHistClm50Sp.derecho_intel.clm-waccmx_offline2005Start, SMS_Lm1.f19_g17.I1850Clm60BgcCropCmip6waccm.derecho_intel.clm-basic, SMS_Lm1.f10_f10_mg37.I1850Clm60BgcCropCmip6waccm.derecho_gnu.clm-basic

Requirements before merge:

  • The code in this PR branch builds with no errors.
  • The code in this PR branch runs with no errors. Briefly describe tested configuration(s):
  • This either (a) does not change answers, (b) it only changes answers at roundoff level, or (c) I have performed a scientific evaluation of the answer changes. Which?: Doesn't change answers
  • I have reviewed relevant parts of the CLM documentation Tech Note or User's Guide to determine if anything needs to be changed or added. If it does, describe:
  • This PR either (a) does not create a need to update the documentation or (b) includes required documentation updates (see guidelines for contributing documentation). Which?: No need

@samsrabin samsrabin self-assigned this Jul 8, 2026
@samsrabin samsrabin added the b4b bit-for-bit label Jul 9, 2026
@samsrabin samsrabin changed the title [WIP] Allow new non-crop pfts [WIP] Makes nc3crop and nc3irrig private to pftconMod Jul 9, 2026
@samsrabin samsrabin added the next this should get some attention in the next week or two. Normally each Thursday SE meeting. label Jul 9, 2026
@samsrabin samsrabin changed the title [WIP] Makes nc3crop and nc3irrig private to pftconMod [WIP] Make nc3crop and nc3irrig private to pftconMod Jul 9, 2026
@wwieder

wwieder commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@adrifoster asked if adding an extral moss PFT is critical for the ABOVE project, as there are unused PFTs for the Arctic sites she's running (which include "tropical trees") and could be adopted for moss.

Long-term this is something we'll need, but it's a larger project.

@samsrabin would like to bring this PR in, as it's mostly done, which seems appropriate.

@samsrabin
samsrabin force-pushed the allow-new-non-crop-pfts branch 5 times, most recently from ed55e78 to 81c7b3f Compare July 9, 2026 22:11
@samsrabin
samsrabin force-pushed the allow-new-non-crop-pfts branch from 81c7b3f to 509d713 Compare July 10, 2026 15:52
@samsrabin
samsrabin marked this pull request as draft July 10, 2026 15:58
Comment thread src/biogeochem/FireEmisFactorsMod.F90 Outdated
Comment thread src/cpl/share_esmf/cropcalStreamMod.F90
@samsrabin
samsrabin force-pushed the allow-new-non-crop-pfts branch from aba3729 to 893922f Compare July 13, 2026 19:17
@samsrabin
samsrabin force-pushed the allow-new-non-crop-pfts branch from 893922f to e6a9938 Compare July 13, 2026 19:19
File needs to have at least one entry for every natural PFT, plus one more to be used for crops.
Specifically, the indices of rainfed and irrigated CFTs used by surfrdUtilsMod, as well as the indices of all CFTs used by handle_too_short_fire_emis_factor_file().
@samsrabin
samsrabin force-pushed the allow-new-non-crop-pfts branch from 558fca0 to 922a6aa Compare July 15, 2026 15:10
@samsrabin samsrabin removed the next this should get some attention in the next week or two. Normally each Thursday SE meeting. label Jul 16, 2026
@samsrabin samsrabin changed the title [WIP] Make nc3crop and nc3irrig private to pftconMod Make nc3crop and nc3irrig private to pftconMod Jul 16, 2026
@samsrabin samsrabin added the code health improving internal code structure to make easier to maintain (sustainability) label Jul 16, 2026
@samsrabin
samsrabin marked this pull request as ready for review July 16, 2026 19:46
@samsrabin samsrabin added the PR status: awaiting review Work on this PR is paused while waiting for review. label Jul 16, 2026
@github-project-automation github-project-automation Bot moved this to Ready to start (or start again) in CTSM: Upcoming tags Jul 16, 2026
@samsrabin samsrabin moved this from Ready to start (or start again) to In progress - b4b-dev in CTSM: Upcoming tags Jul 16, 2026
@slevis-lmwg
slevis-lmwg self-requested a review July 16, 2026 21:29

@slevis-lmwg slevis-lmwg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving preemptively but asking for a guided tour of a few items. Thanks @samsrabin :-)

Comment thread src/biogeochem/FireEmisFactorsMod.F90
Comment thread src/main/pftconMod.F90
Comment thread src/main/test/surfrdUtils_test/test_surfrdUtils.pf
@github-project-automation github-project-automation Bot moved this from In progress - b4b-dev to In progress - master in CTSM: Upcoming tags Jul 16, 2026
@samsrabin samsrabin moved this from In progress - master to In progress - b4b-dev in CTSM: Upcoming tags Jul 17, 2026
@samsrabin samsrabin removed the PR status: awaiting review Work on this PR is paused while waiting for review. label Jul 22, 2026
@samsrabin
samsrabin merged commit 16a6736 into ESCOMP:b4b-dev Jul 22, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from In progress - b4b-dev to Done (non release/external) in CTSM: Upcoming tags Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

b4b bit-for-bit code health improving internal code structure to make easier to maintain (sustainability)

Projects

Status: Done (non release/external)

Development

Successfully merging this pull request may close these issues.

3 participants