Repository navigation
Add a script to create Aerosol monthly climatology from CPLHIST daily data to use for CESM3/CMIP7 1850 simulations - #4257
Merged
ekluzek merged 40 commits intoOct 28, 2026
Conversation
…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
…adata around for clarity and ordering
…n the CESM3 one is available
…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
… give the full command and command line options
…checker will be available to check compliance of our files we make with CTSM tools
…k/CTSM into aero_daily_to_monthly_clim_script
slevis-lmwg
approved these changes
Oct 16, 2026
slevis-lmwg
left a comment
Contributor
There was a problem hiding this comment.
Erik and I discussed this PR last Monday and today.
Erik posted a few comments to address.
Approving.
ekluzek
commented
Oct 16, 2026
… passes all python tests. It adds about a minute to the sys test time, which seems acceptable, passes black and pylint checks
…er, change some names to be more descriptive, also tweak some error messages, and also disallow year 0, which means the unit test doesn't run
…tiblity stale check and test for it, and run _write_clim with default for with_time_bnds as well as both explicit ways
slevis-lmwg
reviewed
Oct 26, 2026
slevis-lmwg
left a comment
Contributor
There was a problem hiding this comment.
@ekluzek I had two comments. I'm happy to look this over again and to talk about it more with you.
…equired an update to the fake files, Claude helped me to get it working
…m with a more generic base class, and the specific application for aerosols on top as a seperate wrapper, this is what it gave me, the tests all work, and black and pylint is clean
Merged
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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:
Requirements before merge: