Skip to content

enable different time ranges for ts and climo files in LDF#302

Merged
TeaganKing merged 11 commits intoNCAR:mainfrom
wwieder:climo_ldf
Oct 30, 2025
Merged

enable different time ranges for ts and climo files in LDF#302
TeaganKing merged 11 commits intoNCAR:mainfrom
wwieder:climo_ldf

Conversation

@wwieder
Copy link
Collaborator

@wwieder wwieder commented Oct 16, 2025

Description of changes:

LDF allows users to define seperate time bounds for climo vs. ts generation

All PRs Checklist:

@TeaganKing volunteered to functionally test this for me
Note, LDF will fail if there are multiple climo files for a variable in the same directory

It may be nice to use the same start year and end year for both ts and climo if users don't define climo_*_year strings. LDF already does this, but not sure how to enable it in CUPiD?

@wwieder wwieder added the enhancement New feature or request label Oct 16, 2025
@wwieder
Copy link
Collaborator Author

wwieder commented Oct 17, 2025

One note, the config file used by LDF has the ability for users to add case_nickname for both test and base cases. This short name is then used in plots to avoid long strings in legend labels. I think I've done this correctly, but it would be nice to have a functional test.

Better yet may be to enable the code to just use the case_name if no case_nickname is provided in the config.yaml file, but for now I'm more interested in enabling / requiring users to provide a nickname

@TeaganKing TeaganKing self-requested a review October 22, 2025 17:53
@TeaganKing
Copy link
Contributor

I did also update external diag packages to use the nicknames and climo start/end years. Note that this IS backwards compatible if those are not included in the config file due to the default settings. Eg, if you don't provide a case nickname, the case nickname is set to the case name. If you don't provide climo start/end years, these are set to the start/end years. ADF config file generation script has also been updated to use these values if provided.

@TeaganKing
Copy link
Contributor

TeaganKing commented Oct 29, 2025

Currently there is a line hist_str: clm2.h0 under both diag_cam_climo and diag_cam_baseline_climo. This does not match hist_str under diag_basic_info, and it doesn't seem to be pulled from the key metrics config file; rather, it's a default from the config file in LDF. We should probably write that one out from the config file, too. Also see #305

@TeaganKing
Copy link
Contributor

TeaganKing commented Oct 29, 2025

The hist strings now work and LDF finds files & runs as expected. Note has been added to PR #305 . This has all been tested and looks good to me. @wwieder , can you make sure the changes I made work for you, and then, if so, I can merge this in?

@TeaganKing
Copy link
Contributor

TeaganKing commented Oct 29, 2025

  • @wwieder is still checking that regional plotting is working as expected

Copy link
Contributor

@TeaganKing TeaganKing left a comment

Choose a reason for hiding this comment

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

Looks great to me! Once Will checks the output of regional plots, this can be merged in.

@wwieder
Copy link
Collaborator Author

wwieder commented Oct 30, 2025

My functional test of CUPiD failed @TeaganKing ... but I think this is because I didn't remove the offending line of code. I'll try getting to this later today or tomorrow.

 File "/glade/u/home/wwieder/CUPiD/externals/LDF/lib/../scripts/plotting/regional_climatology.py", line 88, in regional_climatology
    with open(ymlFilename, 'r') as file:
         ^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'lib/regions_lnd.yaml'

@TeaganKing
Copy link
Contributor

Yes, I think you'll want to update that in LDF to do something similar to this line. Thanks for testing that!

@TeaganKing TeaganKing merged commit 277969e into NCAR:main Oct 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lnd

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants