Skip to content
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

Plumber.5.2 #2485

Merged
merged 45 commits into from
Aug 22, 2024
Merged

Plumber.5.2 #2485

merged 45 commits into from
Aug 22, 2024

Conversation

wwieder
Copy link
Contributor

@wwieder wwieder commented Apr 23, 2024

Description of changes

Fixes usermods to point to 5.2 datasets

Specific notes

Still kind of hacky, ideally we can take this out of the custom shell commands for individual sites.
I think this can happen after @TeaganKing adds PLUMBER2SITE to cdeps?

CTSM Issues Fixed (include github issue #):
Fixes #2484

Any User Interface Changes (namelist or namelist defaults changes)?
updates for usermods

Testing performed, if any:
Manual test to make sure sites run as expected with 5.2 datasets

@wwieder wwieder marked this pull request as draft April 23, 2024 00:06
@wwieder
Copy link
Contributor Author

wwieder commented Apr 23, 2024

@ekluzek I wasn't clear if you thought this should go on b4b-dev or master. If we merge it with other changes from @TeaganKing it may be easier? I just wanted to create this branch and PR so we can keep making progress on PLUMBER2 work.

@ekluzek ekluzek changed the base branch from master to b4b-dev April 23, 2024 01:21
@ekluzek
Copy link
Collaborator

ekluzek commented Apr 23, 2024

I think this should go to b4b-dev, and I just rebased it to reflect that. Technically right now both are identical.

@TeaganKing
Copy link
Contributor

This is the WIP PR where some of these changes are being made. Maybe I can just make a separate PR for the config_component.xml and cime_config details in order to contribute that to this PR? I think the rest of the linked PR will take a decent amount of additional effort to finalize.

@wwieder
Copy link
Contributor Author

wwieder commented Apr 23, 2024

That could be nice to bring in the cime_config and config_component work here, as it will further clean up the usermods_dirs. I'll let you manage what makes the most sense, @TeaganKing. I mainly wanted to get something that you could start working with for the larger run_towers refactor you're doing.

@TeaganKing
Copy link
Contributor

TeaganKing commented Apr 23, 2024

I actually realized there is also a relevant CDEPS PR that goes along with these changes. I'll add the CTSM changes here.

@TeaganKing
Copy link
Contributor

I ran black on cime_config/buildnml and got a clean run with the second commit, so I'm not sure why that's still failing on black? Have you seen that before?

Screen Shot 2024-04-23 at 2 27 55 PM

@TeaganKing TeaganKing linked an issue May 1, 2024 that may be closed by this pull request
@TeaganKing
Copy link
Contributor

In the ctsm_pylib environment, I ran black --version and saw: black, 22.3.0 (compiled: no). Black that's being run on GitHub is black[colorama]==22.3.0. I think this is the same version.

python/pyproject.toml contains the same information that is in my local copy-- could this be overwritten somewhere during the black check such that black fails on GitHub? This includes items such as line-length and target-version.

This seems like it should be a very simple fix...

@TeaganKing
Copy link
Contributor

I still haven't resolved the black issue, but need to head out soon so am leaving this unresolved at the moment. Where I'm at right now is that I found the reverting the following line to the original passes black (and does not include PLUMBER functionality that we need):
if ("NEON" in clm_usrdat_name or "PLUMBER" in clm_usrdat_name) and clm_force_coldstart == "off":

If I run black locally, it makes a whole lot of other changes that apparently aren't needed to pass the black check on push.

Adding a 'format ignore' (see commit titled 'trying a workaround' does not seem to resolve the issue, either.

@TeaganKing
Copy link
Contributor

Issues with black-check on push are finally resolved! I think that should be all of the changes for the cime_config and config_component part of this work.

@TeaganKing
Copy link
Contributor

TeaganKing commented May 2, 2024

And moving forward, is the plan to pull in the CDEPS PR, add the CDEPS tag to this PR, and then bring this on to b4b? Or does this PR need additional work, @wwieder ?

Copy link
Contributor

@slevis-lmwg slevis-lmwg left a comment

Choose a reason for hiding this comment

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

I understand this PR as waiting for ESCOMP/CDEPS#262 (correct me if I'm wrong).

tools/site_and_regional/plumber2_usermods.py Outdated Show resolved Hide resolved
cime_config/buildnml Outdated Show resolved Hide resolved
@slevis-lmwg slevis-lmwg added the blocked: dependency Wait to work on this until dependency is resolved label May 7, 2024
@TeaganKing
Copy link
Contributor

TeaganKing commented Jun 25, 2024

@wwieder I'm thinking this PR should also include a PLUMBER defaults usermod directory that also includes the xmlchange for CLM_USRDAT_NAME to be set to PLUMBER2 for all the plumber cases?

@wwieder
Copy link
Contributor Author

wwieder commented Jun 26, 2024

@wwieder I'm thinking this PR should also include a PLUMBER defaults usermod directory that also includes the xmlchange for CLM_USRDAT_NAME to be set to PLUMBER for all the plumber cases?

I think this is marked with a TODO in #2485? But maybe a quick conversation would be helpful? It's been a while since I thought about this.

@TeaganKing
Copy link
Contributor

@wwieder I'm thinking this PR should also include a PLUMBER defaults usermod directory that also includes the xmlchange for CLM_USRDAT_NAME to be set to PLUMBER for all the plumber cases?

I think this is marked with a TODO in #2485? But maybe a quick conversation would be helpful? It's been a while since I thought about this.

Did you intend to tag another issue? I'll be in the office tomorrow, and it looks like you're onsite too-- let's chat sometime then?

@wwieder
Copy link
Contributor Author

wwieder commented Jun 26, 2024

Sorry yes, this one that was already merged?

@TeaganKing
Copy link
Contributor

Sorry yes, this one that was already merged?

Oh, I see it now! Thanks!

@TeaganKing
Copy link
Contributor

TeaganKing commented Jun 28, 2024

I also did uncomment the following line in the last commit given that this will come in after the CDEPS PR:
./xmlchange PLUMBER2SITE='+site + '\n'

This should now be ready for review after the CDEPS PR 262 is merged in.

@TeaganKing
Copy link
Contributor

The merge conflicts are fixed now, too. Some variables had already been renamed in b4b-dev to conform to snake case, and the plumber2_usermods.py file had been moved to the python directory.

@TeaganKing TeaganKing marked this pull request as ready for review June 28, 2024 22:21
@TeaganKing
Copy link
Contributor

Ready for review with the caveat of the dependency of CDEPS PR 262 (as the label on this PR suggests). I can also leave this as not ready for review if that's preferred given the dependency.

@wwieder wwieder requested a review from slevis-lmwg June 29, 2024 13:42
@wwieder
Copy link
Contributor Author

wwieder commented Jun 29, 2024

Thanks @TeaganKing . @slevis-lmwg do you have time to review this? I'm hosting a workshop next week.

cime_config/buildnml Show resolved Hide resolved
@TeaganKing
Copy link
Contributor

Ok, thanks @ekluzek for your help! The cdeps tag has been updated and this is ready for review!

@wwieder wwieder removed the blocked: dependency Wait to work on this until dependency is resolved label Aug 20, 2024
@wwieder wwieder added the PR status: awaiting review Work on this PR is paused while waiting for review. label Aug 20, 2024
@wwieder
Copy link
Contributor Author

wwieder commented Aug 20, 2024

Looks like this PR was to B4B-Dev, which means we may need to rebase this to the latest, but could it come in next week if things look OK @ekluzek?

Note, it would be nice to merge this before the 5.3 tag gets made, which means we'd need new PLUMBER2 surface datasets to be created before the 5.3 merge.

@wwieder wwieder added next this should get some attention in the next week or two. Normally each Thursday SE meeting. enhancement new capability or improved behavior of existing capability labels Aug 20, 2024
@TeaganKing
Copy link
Contributor

TeaganKing commented Aug 20, 2024

Thanks Will. FYI I also rebased this on Friday and brought in updates from b4b-dev that were made before then.

Copy link
Collaborator

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

This is great and a nice improvement that gets us so much further along with a clean implementation of PLUMBER that works with the newer datasets. Thanks for all the work here.

The bulk of this is straightforward work that's site specific so not something to review. There's a couple points where you catch some misspellings which is awesome.

The one thing I had was to simplify the buildnml code a bit to remove some duplication. This could also be done with an issue that's done later. But, I think it's straightforward enough to do now. We could go over this also if that's helpful.

cime_config/buildnml Outdated Show resolved Hide resolved
cime_config/buildnml Outdated Show resolved Hide resolved
cime_config/buildnml Outdated Show resolved Hide resolved
cime_config/config_component.xml Show resolved Hide resolved
@ekluzek ekluzek removed the PR status: awaiting review Work on this PR is paused while waiting for review. label Aug 21, 2024
@TeaganKing
Copy link
Contributor

TeaganKing commented Aug 21, 2024

@ekluzek thanks for reviewing. Let me know what you think about the above conversation; otherwise, your suggestions have been addressed!

Also, my comment regarding RUN_REFTOD seems to have disappeared on my end... if you can't find it, the gist was that RUN_REFTOD is set to zero for ad/postad/transient cases for plumber and START_TOD is set to a nonzero (correct) value. We could update all of the shell commands to set RUN_REFTOD instead of setting START_TOD; I'm not sure if that would cause any issues elsewhere but imagine it would be fine (just need to check). Maybe let me know if you think this is worth doing?

Copy link
Collaborator

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

Cool. Awesome. Let's bring this in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new capability or improved behavior of existing capability next this should get some attention in the next week or two. Normally each Thursday SE meeting.
Projects
Status: Done (non release/external)
Development

Successfully merging this pull request may close these issues.

Add PLUMBER2SITE list to config_component.xml
4 participants