Skip to content

subset_data point: Fix --create-datm and Longitude TypeErrors#3259

Merged
samsrabin merged 19 commits into
ESCOMP:b4b-devfrom
samsrabin:subset_data-lon-fixes
Jun 20, 2025
Merged

subset_data point: Fix --create-datm and Longitude TypeErrors#3259
samsrabin merged 19 commits into
ESCOMP:b4b-devfrom
samsrabin:subset_data-lon-fixes

Conversation

@samsrabin
Copy link
Copy Markdown
Member

@samsrabin samsrabin commented Jun 17, 2025

Description of changes

My Longitude work introduced a problem that wasn't caught by testing. This PR adds testing and fixes the issue. It also fixes a problem I found where --create-datm was looking for monthly files when it actually should be looking for annual files.

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 1244d9e:

  • New SystemTests added; failing before fix and passing after.
  • Python unit tests pass
  • Python system tests
  • clm_pymods suite: /glade/derecho/scratch/samrabin/tests_0620-161235de/

@samsrabin samsrabin self-assigned this Jun 17, 2025
@samsrabin samsrabin added bug something is working incorrectly b4b bit-for-bit test: python Pass clm_pymods test suite plus Python sys/unit tests before merging PR status: awaiting review Work on this PR is paused while waiting for review. next this should get some attention in the next week or two. Normally each Thursday SE meeting. labels Jun 17, 2025
@samsrabin samsrabin linked an issue Jun 17, 2025 that may be closed by this pull request
@samsrabin samsrabin linked an issue Jun 17, 2025 that may be closed by this pull request
@samsrabin samsrabin changed the title subset_data point: Fix --create-surface Longitude TypeError subset_data point: Fix --create-datm and Longitude TypeErrors Jun 17, 2025
@slevis-lmwg slevis-lmwg linked an issue Jun 17, 2025 that may be closed by this pull request
@samsrabin samsrabin added the priority: high High priority to fix/merge soon, e.g., because it is a problem in important configurations label Jun 17, 2025
@samsrabin
Copy link
Copy Markdown
Member Author

This PR exposes problems with plumber2_surf_wrapper; those are fixed in PR #3264.

@samsrabin samsrabin mentioned this pull request Jun 18, 2025
4 tasks
@github-project-automation github-project-automation Bot moved this to Ready to start (or start again) in CTSM: Upcoming tags Jun 20, 2025
@samsrabin samsrabin moved this from Ready to start (or start again) to In progress - b4b-dev in CTSM: Upcoming tags Jun 20, 2025
@ekluzek ekluzek removed the next this should get some attention in the next week or two. Normally each Thursday SE meeting. label Jun 20, 2025
@ekluzek ekluzek self-requested a review June 20, 2025 19:55
Comment thread python/ctsm/site_and_regional/single_point_case.py Outdated
Comment thread python/ctsm/site_and_regional/single_point_case.py Outdated
Comment thread python/ctsm/site_and_regional/single_point_case.py
Comment thread python/ctsm/site_and_regional/single_point_case.py
Comment thread python/ctsm/test/test_sys_subset_data.py
Comment thread python/ctsm/test/test_sys_subset_data.py Outdated
Copy link
Copy Markdown
Contributor

@ekluzek ekluzek left a comment

Choose a reason for hiding this comment

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

@samsrabin and I went over this. There are some things we thought should be done that he has notes for, and I added a few here. This is great work on his part and I'm glad to know it's coming in.

This is a great set of changes that both fix problems and adds testing and better error handling. The error handling would've caught the problems that came up, so good regression testing to keep around. This is another move to having these problem caught earlier, and in an automated fashion, that helps to resolve it when it happens again. Having it in our automated testing also means that it's more likely that just a developer that makes a change will see the problem -- rather than random users. When random users see these problems it's much harder for them to resolve and it potentially affects a bunch of people at once.

This was also a win for doing the parallel work sessions as this came up during the last one on Wednesday.

Comment thread python/ctsm/site_and_regional/single_point_case.py
Comment thread python/ctsm/test/test_sys_subset_data.py
Comment thread python/ctsm/test/test_sys_subset_data.py
@samsrabin samsrabin linked an issue Jun 20, 2025 that may be closed by this pull request
@samsrabin samsrabin merged commit 426e977 into ESCOMP:b4b-dev Jun 20, 2025
7 of 8 checks passed
@github-project-automation github-project-automation Bot moved this from In progress - master to Done (non release/external) in CTSM: Upcoming tags Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

b4b bit-for-bit bug something is working incorrectly PR status: awaiting review Work on this PR is paused while waiting for review. priority: high High priority to fix/merge soon, e.g., because it is a problem in important configurations test: python Pass clm_pymods test suite plus Python sys/unit tests before merging

Projects

Status: Done (non release/external)

2 participants