-
Notifications
You must be signed in to change notification settings - Fork 341
Fix Longitude comparison error for regional subset_data #3100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
eddd7d9 to
443f0ac
Compare
443f0ac to
8797c44
Compare
ekluzek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great work. And I think it's a great example of refactoring to improve the code, rather than putting up with brittle code. You add unit and system testing that gives us much more confidence that subset data is working correctly and will continue working.
I do have a bunch of suggestions. As always many I'm flexible on. Some I think will be helpful to do. Some I may be wrong on. So please reach out if you disagree.
Again though, this is a great improvement to our testing for subset_data, and hopefully will catch most future bugs from happening. It gives me so much more confidence in our testing of the important tool of subset_data.
|
Thanks, @ekluzek! |
This ensures that GitHub format workflow fails if only Pylint has errors (i.e., Black passes).
Merge b4bdev 20250509 Updates to the b4b-dev branch since its last merge to master (PRs ESCOMP#3091 ESCOMP#3092), as shown by git log: - Merge pull request Update docs infrastructure ESCOMP#2809 from samsrabin/update-docs-builder-2 Update docs infrastructure - Merge pull request Update externals to cesm3_0_alpha06c ESCOMP#3106 from ekluzek/update_to_alpha06c Update externals to cesm3_0_alpha06c - Merge pull request User control over snow thermal conductivity scheme over glaciers ESCOMP#3072 from wwieder/JordanGlacier User control over snow thermal conductivity scheme over glaciers
Description of changes
RegionalCaseno longer (necessarily) fails with an error about comparisons not being supported between float and Longitude. It now tries to convert input file longitude values to match_lon_typeof--lon1and--lon2. This is tested with new system tests ofsubset_data.This capability required several supporting changes and tests thereof:
Longitudetype work if initialized with lists or arrays.subset_datano longer fails on missing but unused config file sections. E.g., if you didn't say--create-landuse, it won't try to read anything from the config file'slandusesection.Note that
RegionalCasewill still fail if the input file's longitude values are (a) of an ambiguous type or (b) of a different type than--lon1and--lon2. It would be good to resolve this, but perhaps that should be saved for a future PR.Specific notes
Contributors other than yourself, if any: None
CTSM Issues Fixed:
Are answers expected to change (and if so in what way)? No
Any User Interface Changes (namelist or namelist defaults changes)? No
Does this create a need to change or add documentation? Did you do so? No
Testing performed, if any:
As of 3fa2980:
clm_pymodssuite compared to ctsm5.3.043 (/glade/derecho/scratch/samrabin/tests_0515-105341de/)