Skip to content

Set orb_iyear_align for PLUMBER2 and NEON usermods so HIST runs use the model year's orbit - #4341

Open
wwieder wants to merge 3 commits into
ESCOMP:b4b-devfrom
wwieder:fix-plumber2-orb-iyear-align
Open

wwieder wants to merge 3 commits into
ESCOMP:b4b-devfrom
wwieder:fix-plumber2-orb-iyear-align

Conversation

@wwieder

@wwieder wwieder commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Description of changes

The PLUMBER2 usermods set orb_iyear = 2007 in user_nl_cpl without orb_iyear_align. For HIST compsets CMEPS uses orb_mode = variable_year with a default orb_iyear_align = 1850, so orb_year = orb_iyear + (year - orb_iyear_align) put transient PLUMBER2 runs at orbit years of ~2150–2170 (2167 for AR-SLu). Details are in #4340.

The NEON usermods have the same problem: orb_iyear = 2018 without orb_iyear_align, so HIST NEON runs used orbit years of ~2186–2190.

This PR sets orb_iyear_align equal to orb_iyear (with a comment) in three usermods user_nl_cpl files:

  • PLUMBER2/defaults: orb_iyear_align = 2007
  • NEON/defaults: orb_iyear_align = 2018
  • NEON/FATES/defaults: orb_iyear_align = 2018. This file is needed too, because NEON/FATES/defaults does not include NEON/defaults.

In HIST runs the orbit year now equals the model year. For 2000 / spin-up compsets orb_mode = fixed_year, so orb_iyear_align is ignored and the orbit stays fixed at 2007 or 2018.

Status: tested; see the test results.

Specific notes

Contributors other than yourself, if any:

  • Bugs found by the CTSM correctness audit (findings BLD-055 and BLD-059); fix drafted with AI assistance (Claude).

CTSM issues resolved or otherwise addressed, if any:

If answers are expected to change, describe (delete this line otherwise):

  • Only for HIST PLUMBER2 and HIST NEON / NEON-FATES cases, through a small change in orbital parameters (insolation). In aux_clm that is the single test SMS_Ly1_D_Mmpi-serial.CLM_USRDAT.IHist1PtClm60BgcRsGs.{derecho_gnu,izumi_nag}.clm-default--clm-PLUMBER2-ARSLu. All other tests should be bit-for-bit, including the PLUMBER2 I1Pt AD tests and all NEON tests (all of them are I1Pt / fixed_year compsets).

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

  • Yes: drv_in now has orb_iyear_align = 2007 for PLUMBER2 cases and orb_iyear_align = 2018 for NEON and NEON-FATES cases (set through the usermods user_nl_cpl). No model defaults change.

Testing planned or performed, if any:

  • ./preview_namelists on a HIST PLUMBER2 case: drv_in has orb_iyear_align = 2007, and the lnd log orb_year equals the model year
  • SMS_Ly1_D_Mmpi-serial.CLM_USRDAT.IHist1PtClm60BgcRsGs.derecho_gnu.clm-default--clm-PLUMBER2-ARSLu: expect NLCOMP and baseline DIFFs
  • SMS_Ly2_D_Mmpi-serial.CLM_USRDAT.I1PtClm60BgcRsGs.derecho_gnu.clm-default--clm-PLUMBER2-ARSLu--clm-ADspinup: expect b4b
  • NEON aux_clm tests (not run yet) (e.g. SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60BgcRsGs.derecho_gnu.clm-default--clm-NEON-HARV, ...I1PtClm60FatesRsGs...clm-FatesFireLightningPopDens--clm-NEON-FATES-NIWO): expect NLCOMP diff only, b4b answers
  • A NEON HIST case (e.g. run_tower transient at HARV) with ./preview_namelists: drv_in has orb_iyear_align = 2018, and the lnd log orb_year equals the model year

Questions for reviewers

  • This PR targets b4b-dev because it is a one-line usermods change. It is not strictly bit-for-bit: the IHist PLUMBER2 test above will change answers. Is b4b-dev acceptable for this, or should it go to master?
  • Orbit choice: this PR uses the real year (orbit year = model year). A truly fixed 2007 orbit (orb_mode = 'fixed_year') would match the "average year" comment. The two differ negligibly over the 1997–2018 PLUMBER2 period.

🤖 Generated with Claude Code

wwieder and others added 2 commits November 22, 2026 08:01
The PLUMBER2 usermods set orb_iyear = 2007 without orb_iyear_align. For
HIST compsets CMEPS uses orb_mode = variable_year with a default
orb_iyear_align of 1850, so transient PLUMBER2 runs used orbit years of
~2150-2170. Setting orb_iyear_align = 2007 makes the orbit year equal the
model year. 2000/spin-up compsets (fixed_year) are unaffected.

Fixes ESCOMP#4340

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l year

The NEON and NEON/FATES usermods set orb_iyear = 2018 without
orb_iyear_align, so HIST (transient) NEON runs used orbit years of
~2186-2190 instead of the model year. NEON/FATES/defaults does not
include NEON/defaults, so both files need the setting. 2000/spin-up
compsets (fixed_year) are unaffected.

Addresses ESCOMP#4340

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wwieder wwieder changed the title Set orb_iyear_align for PLUMBER2 so HIST runs use the model year's orbit Set orb_iyear_align for PLUMBER2 and NEON usermods so HIST runs use the model year's orbit Nov 22, 2026
@wwieder wwieder added bug something is working incorrectly AI (LLM) guidance Things we do to our repo to try and keep AI coding agents on the rails labels Nov 23, 2026
@wwieder wwieder assigned wwieder and unassigned wwieder Nov 23, 2026
@samsrabin samsrabin added AI-generated Stuff that was totally AI-generated, at least to start with. investigation Needs to be verified and more investigation into what's going on. and removed AI (LLM) guidance Things we do to our repo to try and keep AI coding agents on the rails labels Nov 23, 2026
@wwieder

wwieder commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

This seems like a simple enough PR, can we just merge it to b4b-dev, or does it need to come to master?

@wwieder
wwieder marked this pull request as ready for review December 1, 2026 18:32
@ekluzek

ekluzek commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

This seems like a simple enough PR, can we just merge it to b4b-dev, or does it need to come to master?

It is simple, but it does change answers. And it changes answers for tests. So we can't mix it with other b4b things. But, we have established that it's OK to make tiny tags on master. So it's acceptable to go there.

I actually didn't realize that our HIST compsets were advancing the orbit each year by default. But, it looks like that goes back to 2020, with CMEPS. I'm not sure if we did that previousluy with MCT or not. There can be a legit philosophy that you don't want to change the orbit for cases of a small number of years, because the advancement is so small, that it's better to fix the orbit, so you don't have yet another thing changing from underneath a simulation. Astronomers had figured you don't need to update the orbit for 50 years. But, since we have this in place, we might as well make sure it's correct.

Longer term, I wonder if CMEPS shouldn't do more checking on this and use orb_year for orb_year_align in most cases. But, if someone wants to experiment with the orbit, they might do something strange on purpose and they should be allowed to do it. So I'm not sure if that would be desired or not...

@wwieder

wwieder commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

Longer term, I wonder if CMEPS shouldn't do more checking on this and use orb_year for orb_year_align in most cases.

Do you want to create an issue for this, @ekluzek?

@wwieder

wwieder commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

Test results

Branch dee43c234 compared with its base 6fd9f4242 (b4b-dev) on Derecho. Baselines were generated from the base commit.

Test Result Compared with base
SMS_Ly1_D_Mmpi-serial.CLM_USRDAT.IHist1PtClm60BgcRsGs.derecho_gnu.clm-default--clm-PLUMBER2-ARSLu PASS NLCOMP: only orb_iyear_align 1850 → 2007. BASELINE DIFF, as expected: starts at COSZEN and the absorbed solar radiation, then spreads to most fields.
SMS_Ly2_D_Mmpi-serial.CLM_USRDAT.I1PtClm60BgcRsGs.derecho_gnu.clm-default--clm-PLUMBER2-ARSLu--clm-ADspinup PASS NLCOMP: only orb_iyear_align 2000 → 2007. BASELINE PASS (bit-for-bit)

The NLCOMP difference shows up in nuopc.runconfig (ALLCOMP_attributes). With NUOPC, drv_in holds no orbital settings.

Orbit year equals the model year

The lnd log has no orb_year line, so I checked the orbital parameters that shr_orb_params writes to it instead.

PLUMBER2 HIST test (orb_iyear = 2007, start 2010-01-01, one year):

orb_iyear_align Eccentricity, 2010 Long. of perihelion (deg), 2010 Orbit year in use
base 1850 1.663551E-02 105.7577 model year + 157 (≈ 2167)
branch 2007 1.669960E-02 103.0668 model year (2010)

On the branch, the values change once, at the 2010 → 2011 rollover: eccentricity moves to 1.669919E-02, a change of −4.1e-7 per year. On the base, eccentricity is offset by 6.41e-5, which is 156 years at that rate and matches the expected 2007 − 1850 = 157.

NEON HIST case at HARV:

  • Setup: IHist1PtClm60BgcRsGs, CLM_USRDAT, the clm/NEON/HARV usermods, start 2018-01-01, 5 days.
  • ./preview_namelists: the branch has orb_iyear_align = 2018 and the base has orb_iyear_align = 1850. Both have orb_iyear = 2018 and orb_mode = variable_year.
Eccentricity Obliquity (deg) Long. of perihelion (deg) Orbit year in use
base 1.662771E-02 23.41558 106.0835 ≈ 2186 (model year + 168)
branch 1.669635E-02 23.43743 103.2039 2018

At −4.1e-7 per year, 2018 should give eccentricity ≈ 1.66963E-02 (from the 2010 value), which matches the branch.

Not run

  • The NEON aux_clm tests (item 4) and the full aux_clm suite.

Tests set up and run, and this summary written, with AI assistance (Claude Code).

@github-project-automation github-project-automation Bot moved this to Ready to start (or start again) in CTSM: Upcoming tags Dec 3, 2026
@wwieder wwieder moved this from Ready to start (or start again) to In progress - master in CTSM: Upcoming tags Dec 3, 2026
! ./xmlchange USER=foo
!------------------------------------------------------------------------
orb_iyear = 2018
! For HIST compsets CMEPS uses orb_mode=variable_year with a default orb_iyear_align

@olyson olyson Dec 3, 2026 •

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.

It seems a bit confusing to set the orb_iyear_align to something specific for a historical compset (and differently depending on whether it is NEON or PLUMBER) since the CMEPS default would work fine (orb_mode=variable_year, orb_iyear=1850, orb_iyear_align=1850). So the orbital year would always line up with the model year. And the average year comment for PLUMBER2 sites is confusing as well in a historical compset context.

The default for a 2000 (spinup) compset is:
orb_iyear = 2000
orb_iyear_align = 2000
orb_mode = fixed_year
The only change we want to make here is to set orb_iyear = 2007 for PLUMBER2 and orb_iyear=2018 for NEON, since orb_iyear_align is ignored for orb_mode=fixed_year.

So, an alternative could be to have a conditional in cime_config/usermods_dirs/clm/PLUMBER2/defaults/shell_commands such as:

if [[ $compset =~ ^2000 ]]; then
echo " ! average year of all PLUMBER2 170 sites is 2007" >> user_nl_cpl
echo "orb_iyear = 2007" >> user_nl_cpl
fi

Similarly in cime_config/usermods_dirs/clm/NEON/defaults/shell_commands
and in cime_config/usermods_dirs/clm/NEON/FATES/defaults/shell_commands

My other comment on this PR is that I thought we decided not to put this on b4b-dev?

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.

Starting from your question: You are correct that we decided to put this on master as answer-changing.

Regarding your recommendations, let me see if I understood:

  1. Historical, i.e. transient: Use CMEPS default
  2. Time-slice cases: Set orb_iyear = 2007 for PLUMBER2 and orb_iyear=2018 for NEON via shell_commands to avoid ever needing to set orb_iyear_align.

If I understood correctly, then I like your suggestion.

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.

Correct.

! ./xmlchange USER=foo
!------------------------------------------------------------------------
orb_iyear = 2018
! For HIST compsets CMEPS uses orb_mode=variable_year with a default orb_iyear_align

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.

Starting from your question: You are correct that we decided to put this on master as answer-changing.

Regarding your recommendations, let me see if I understood:

  1. Historical, i.e. transient: Use CMEPS default
  2. Time-slice cases: Set orb_iyear = 2007 for PLUMBER2 and orb_iyear=2018 for NEON via shell_commands to avoid ever needing to set orb_iyear_align.

If I understood correctly, then I like your suggestion.

@github-project-automation github-project-automation Bot moved this from In progress - master to Stalled (needs review, blocked etc.) in CTSM: Upcoming tags Dec 3, 2026
@slevis-lmwg

Copy link
Copy Markdown
Contributor

@olyson since this PR was opened on b4b-dev, let's rebase to master. It will be simplest to do that when b4b-dev syncs up with master (Erik's doing that in the next day or two).

@slevis-lmwg slevis-lmwg moved this from Stalled (needs review, blocked etc.) to In progress - master in CTSM: Upcoming tags Dec 3, 2026
@olyson

olyson commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

I've rerun the two PLUMBER2 tests indicated by Claude, with my suggested changes:

SMS_Ly1_D_Mmpi-serial.CLM_USRDAT.IHist1PtClm60BgcRsGs.derecho_gnu.clm-default--clm-PLUMBER2-ARSLu
SMS_Ly2_D_Mmpi-serial.CLM_USRDAT.I1PtClm60BgcRsGs.derecho_gnu.clm-default--clm-PLUMBER2-ARSLu--clm-ADspinup

For the historical test, results were the same as indicated by Claude, including the values for eccentricity and long. of perihelion in the historical test. The only difference is that the NLCOMP has a different failure, as expected.

  • orb_iyear : 2007
  • orb_iyear : 1850

For the spinup test, results were bfb as indicated by Claude. The only difference is that the NLCOMP does not have a failure, as expected, because there is no need to change orb_year_align since it is ignored.

So I will move on to test the NEON and NEON-FATES cases and then commit these changes.

@olyson

olyson commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

I ran a NEON HARV transient test:
./run_tower --neon-sites HARV --run-type transient --xmlchange STOP_OPTION=ndays,STOP_N=5,RESUBMIT=0,JOB_WALLCLOCK_TIME=01:00:00,PROJECT=P93300041 --overwrite

and the orbital parameters agree with what Claude reported.

An AD version of this:
./run_tower --neon-sites HARV --run-type ad --xmlchange STOP_OPTION=nyears,STOP_N=2,RESUBMIT=0,JOB_WALLCLOCK_TIME=01:00:00,PROJECT=P93300041 --overwrite

has the correct orbital settings:
orb_iyear = 2018
orb_iyear_align = 2000
orb_mode = fixed_year

since orb_year_align is ignored.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-generated Stuff that was totally AI-generated, at least to start with. bug something is working incorrectly investigation Needs to be verified and more investigation into what's going on.

Projects

Status: In progress - master

Development

Successfully merging this pull request may close these issues.

5 participants