Skip to content

Conversation

@kdraeder
Copy link

Motivation

Enable testing of the gregorian calendar for all of the start modes of a multi-instance case,
which will help ensure that DART can be used with every release (maybe tag) of CESM.

Description

The ERI test cannot use both the _CG (gregorian calendar) _C# (multi-instance) modifiers
because some conditionals in cime refer only to _C and unsuitable years are requested
from some CAM external forcing files.
This PR makes the test work for leap days.
It should require no changes to other uses of the ERI test,
but I have not run other tests because I don't know which tests to run.

Fixes

Several more changes are needed in cime, which are being handled in CIME PR #4899.

This was tested using
ERI_D_C3_CG_Ld8.ne30pg3_g17.F1850C_LTso.derecho_intel.cam-outfrq9s_leapday

bld/namelist_files/use_cases/1850_cam_lt.xml

  • Change year of some forcing files to 1852 so that leap day is handled.

cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/shell_commands

  • Change start year to 2008, so that adding 4 (cime) yields a date that's within the time span of all of the forcing files.

Several more changes are needed in cime,
which will have a commit with the same title.

This was tested using
ERI_D_C3_CG_Ld8.ne30pg3_g17.F1850C_LTso.derecho_intel.cam-outfrq9s_leapday

bld/namelist_files/use_cases/1850_cam_lt.xml
   Change year of some forcing files to 1852 so that leap day is handled.
cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/shell_commands
   Change start year to 2008, so that adding 4 (cime) yields a date
   that's within the time span of all of the forcing files.
@kdraeder
Copy link
Author

I can't request reviewers, assign the issue, or select labels, so please add those as appropriate.
@billsacks and @jedwards4b are requested reviewers in the CIME issue.

<!-- LBC Files : -->
<flbc_file>atm/waccm/lb/LBC_17500116-20150116_CMIP6_0p5degLat_c180905.nc</flbc_file>
<flbc_cycle_yr>1850</flbc_cycle_yr>
<flbc_cycle_yr>1852</flbc_cycle_yr>

Choose a reason for hiding this comment

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

I'm not sure that it will be acceptable to change the start year for this usecase, could you create a new usecase instead? 1852_cam_lt.xml perhaps

Copy link
Author

Choose a reason for hiding this comment

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

I've moved the new 1850_cam_lt.xml to leapyears_cam_lt.xml and reverted 1850_cam_lt.xml.
My push of these changes to my fork is failing with "The requested URL returned error: 500".
Should I push it somewhere else instead?

./xmlchange GLC_NCPL=\$ATM_NCPL
fi
./xmlchange RUN_STARTDATE=2012-02-29
./xmlchange RUN_STARTDATE=2008-02-29

Choose a reason for hiding this comment

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

Why this change? Aren't these both leapyears?

Copy link
Author

Choose a reason for hiding this comment

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

Some of the external forcing files end in 2014. Since I'm changing the increment between the forecasts from 2 to 4 years I wanted to avoid problems from requesting a year that's beyond
the time span of those files. If that was too pre-emptive, I'll try a test with 2012.

The F1850 test of the gregorian calender in ERI requires that some forcing
files provide data from 1852, while others can only provide 1850.
@kdraeder
Copy link
Author

@jedwards4b
I was pushing your requested changes to the use_case files as you were approving the pull request,
so I'm not sure that you saw them before approval.

@jedwards4b
Copy link

You can see on the conversation tab of the pull request that your commit was made before my review was made.

Comment on lines 1 to 3
<?xml version="1.0"?>
<namelist_defaults>

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see any hooks to this use_case. That probably should be added with this PR or the accompanying cime PR ESMCI/cime#4899

Copy link
Author

Choose a reason for hiding this comment

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

I don't see any hooks to this use_case. That probably should be added with this PR or the accompanying cime PR ESMCI/cime#4899

Yes, I ended up going in a different direction, which doesn't require this use_case.
I've removed it from my branch, but not committed that yet.

@kdraeder
Copy link
Author

kdraeder commented Dec 1, 2025

A git(hub) question; I'm trying to update my cam branch (gregorian_ERI) before committing and pushing changes.
My fork in github.com/kdraeder has my branch, but I can't see how sync it with cam_development.
Only main seems to be available for syncing, and that doesn't seem right.
I tried pulling cam_development to my local clone, but that failed due to diverging branches.
Doing a merge --no-ff also failed. The last alternative seems to be to rebase, but I have the impression
that that's a somewhat drastic thing to do. Any recommendations?

@cacraigucar
Copy link
Collaborator

In your local clone, I would do the following:
git remote add upstream https://github.com/ESCOMP/CAM
git fetch upstream
git merge upstream/cam_development

You might need to do a fresh clone of your branch to make sure that remnants from your previous attempts are no longer there.

Do these commands work for you, or is this what you already did?

outfrq9s_leapday/user_nl_clm
   Prevented CLM failure due to year check
outfrq9s_leapday/user_nl_cice
outfrq9s_leapday/user_nl_mosart
   Added to make the history output daily, so that comparison files exist
   even when the forecasts span a month end.
outfrq9s_leapday/shell_scripts
   Kept the change of start year from 2012 to 2008

This test also requires changes to cime
   Replacement of modifier _CG with _cG
   Test with HIST compsets, not 1850 (or other spinup)

These were tested using
ERI_D_C3_cG_Ld8.ne3_ne3_mg37.FHISTC_LTso.derecho_intel.cam-outfrq9s_leapday.
No standard resolution or B compsets have been tested yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants