Skip to content

Add a script to create Aerosol monthly climatology from CPLHIST daily data to use for CESM3/CMIP7 1850 simulations - #4257

Open
ekluzek wants to merge 26 commits into
ESCOMP:b4b-devfrom
ekluzek:aero_daily_to_monthly_clim_script
Open

ekluzek wants to merge 26 commits into
ESCOMP:b4b-devfrom
ekluzek:aero_daily_to_monthly_clim_script

Conversation

@ekluzek

@ekluzek ekluzek commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Description of changes

Add a script to handle creating aerosol monthly climatology from daily CPLHIST data.

The climatology script will be adapted in the future to work with historical and future scenarios, as well as doing an ensemble average over multiple CESM simulations. For historical, there were 5 year averages done, with a linear interpolation between those for each year. Adding the bit about ensemble average will be straight-forward, but perhaps a running average should be done, rather than fixed five year bins? I looked at the existing code that @olyson and @tilmes had, both of which were NCL, so need to be replaced and neither quite did what was needed. Since, this will be adapted in the future using LDF climatology isn't quite right either.

Specific notes

Contributors other than yourself, if any:

CTSM issues resolved or otherwise addressed, if any:

  • (Replace this text, including GitHub issue #, and add more list items as needed)

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

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

Testing planned or performed, if any:

  • python testing

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?: a
  • 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?: a

ekluzek and others added 22 commits October 14, 2026 00:08
…get a monthly climatology of daily CPLHIST data for aerosols
…neral changes from looking at our other bash scripts, one of which is handling abort on either killing the batch job, or hitting Ctrl-C when running interactive
…es, and remove the specific one for mksurfdata_esmf
…directory structure and checking, I ran the new script for b.e30_alpha09e_m.B1850C_MTso_Gris_Marbl years 100-130 and the answers were identical to the shell script
…sts, and if monthly files already exist use them rather than overwritting
…carefully examined it's description of what it did and why, as well as the final code changes
…o NOT have the time dimension as that can't be done on the final file, and it's a mistake that CPLHIST files have it to begin with
…r for the last step of adding the 12 climatological months together
@ekluzek ekluzek added this to the cesm3_0_beta12 (compset) milestone Oct 14, 2026
@ekluzek
ekluzek requested a review from slevis-lmwg October 14, 2026 16:32
@ekluzek ekluzek self-assigned this Oct 14, 2026
@ekluzek ekluzek added enhancement new capability or improved behavior of existing capability b4b bit-for-bit labels Oct 14, 2026
@github-project-automation github-project-automation Bot moved this to Ready to start (or start again) in CTSM: Upcoming tags Oct 14, 2026
@wwieder wwieder moved this from Todo to In Progress in LMWG: Sprint Planning Board Oct 15, 2026
@wwieder wwieder moved this from Ready to start (or start again) to In progress - master in CTSM: Upcoming tags Oct 15, 2026
@ekluzek
ekluzek requested a review from olyson October 15, 2026 18:03
ekluzek and others added 4 commits October 15, 2026 12:04

@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.

Erik and I discussed this PR last Monday and today.
Erik posted a few comments to address.
Approving.

@ekluzek ekluzek left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Things I'll do:

  • Seperate into base class and aerosol specific script
  • Add unit tests using Claude to help
  • Remove the batch capability from the aerosol specific one

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm going to split this into two, one for the specific things for aerosols, and then the more general base class stuff

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The aerosol specific one doesn't really need the batch capability, so I'll remove it from it. But, the base class can keep it for other purposes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The other thing I'll do is to add tests using Claude to help me with that.

@ekluzek ekluzek moved this from In progress - master to In progress - b4b-dev in CTSM: Upcoming tags Oct 22, 2026

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

b4b bit-for-bit enhancement new capability or improved behavior of existing capability

Projects

Status: In progress - b4b-dev
Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants