-
Notifications
You must be signed in to change notification settings - Fork 319
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
b4b-dev: Plumber2 Implementation #2406
base: b4b-dev
Are you sure you want to change the base?
Conversation
This PR will also address #2186 |
We'll also need to add the new CDEPS tag to this PR. |
Per conversation with Erik, we'll move this to bfb once the other Plumber-related PRs are in bfb next week. |
To Do for this PR:
|
We don't currently have restart files for PLUMBER2, which has brought up the question: to what extent do we want to provide support for PLUMBER tower sites? Two options that @wwieder and I discussed this morning are described below:
@danicalombardozzi @slevis-lmwg @olyson let me know if you have thoughts on this. We were planning to chat on Tuesday at 9am but it looks like there is a NCAR-NEON-Community partnership meeting that will be taking that time slot and I'd ideally like to make a decision before August 20th; also happy to tag up an additional time if that's easier than a GitHub discussion. |
My guess is that most users will want to change the model and will likely have to do their own spinups anyway. So I might lean toward not providing initial files if it requires significant work to generate, keep track of, and update those files. |
I would agree with this. These runs are cheap and the point is to have a
set of tower sites that can be run quickly and easily with different model
configurations and with new model versions. The ICs quickly become
irrelevant as the model changes.
…On Tue, Aug 6, 2024 at 7:02 PM Keith Oleson ***@***.***> wrote:
My guess is that most users will want to change the model and will likely
have to do their own spinups anyway. So I might lean toward not providing
initial files if it requires significant work to generate, keep track of,
and update those files.
—
Reply to this email directly, view it on GitHub
<#2406 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFABYVB663VOB5R7GAWPZJDZQFIYNAVCNFSM6AAAAABELMMUA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZSGMYDEMBTHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Ok, thank you both for this feedback! |
Thanks for weighing in here. Teagan since Dave and Keith came to the same conclusion we did yesterday lets move forward with the plan to support 'spinup' and 'transient' PLUMBER2 cases, without providing initial conditions. It might be nice to differentiate how we do this for SP (fast spinup, ~20 or 40 years) vs. BGC (more involved, like NEON) cases. Would that be difficult to integrate into the run_towers workflow? |
That sounds good. I have successfully run the AD & postAD case (with a bit of hard-coding), so this will require the following updates, which should be feasible:
@wwieder To clarify, regarding the option for SP vs BGC, are you envisioning a flag that allows users to pick between these options? |
A few comments:
Happy to have a quick that if it's helpful. |
Ok, in that case, I'll just plan to change the default for PLUMBER to AD and add some documentation on this anticipated workflow for users. Thanks for clarifying! Why don't I plan to get that first part implemented and then we can talk more about the BGC vs. SP options. |
It seems like perhaps the SP vs BGC option should come later. It will be
useful for both PLUMBER and NEON and therefore might require more in-depth
work to do it well.
We should also create a separate tutorial for people to check the stability
of their site spin up. We apply a standard number of years for the AD and
post-AD NEON site simulations and it would be useful to help users evaluate
the stability after making changes. I don't recall that we evaluated all
sites for stability thoroughly, either, so perhaps it would also help us to
know if the number of years we use is effective everywhere.
…On Wed, Aug 7, 2024 at 11:41 AM Teagan King ***@***.***> wrote:
Ok, in that case, I'll just plan to change the default for PLUMBER to AD
and add some documentation on this anticipated workflow for users. Thanks
for clarifying!
Why don't I plan to get that first part implemented and then we can talk
more about the BGC vs. SP options.
—
Reply to this email directly, view it on GitHub
<#2406 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGHW2QOYGE75H6BHKVQVDGLZQJL4RAVCNFSM6AAAAABELMMUA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZTHE4TINRTGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Dr. Danica Lombardozzi
she/her/hers
Terrestrial Sciences Section
Climate and Global Dynamics
NSF National Center for Atmospheric Research
Boulder, CO 80305
email: ***@***.***
office: (303) 497-1777
|
This is about ready to go, but once #2485 is in, I'll run the unit and system tests once more and perform a few final tests to make sure the various |
Hi @ekluzek , I have now addressed the comments from @wwieder 's review. Two outstanding issues that Will and I discussed are the following (more details in comments above):
And a software-focused review of the code would be helpful now that Will reviewed some of the functionality pieces. Before merging (and after @ekluzek 's review), I will be sure to run the following tests one last time (I ran them before Will's review but there are changes that we should test again before merging):
Lastly, note that there are some related outstanding issues that have been documented that are outside the scope of this PR. |
It seems like this PR also fixes #2739 |
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.
Hi @TeaganKing thanks for all your work on this. So sorry it's been so long. I know your head isn't into this anymore. This is something that @wwieder wants me to work on, and I will.
I mostly suggest making some changes to make this Object Oriented. Those changes will be worth getting in as it will make it more flexible, extensible and maintainable. With the things needed for NEON isolated in NEON modules and things needed for PLUMBER2 isolated in it's own module as well. It'll also make it easier for these things to evolve separately as well as bring in some new class for something like AmeriFlux or a class to users handle their own list of generic tower sites. Or whatever the future needs are dreamed up...
I know you don't have time to do coding, but if possible and you are up for it, I would like to talk design with you. Would you be up for that?
Also @adrifoster this seems like a good thing to bring you in on as well. Could we maybe meet Thursday when I come in?
run_type: str, opt | ||
transient, post_ad, or ad case, default ad | ||
(ad case is default because PLUMBER requires spinup) | ||
prism: bool, opt |
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.
I think we remove the prism option for PLUMBER2 right? You might have to include it in the interface, but we then should check to make sure it's False.
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.
Another way to handle this would be to have PRISM only within the NEON class and only able to be set there.
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.
Right, PRISM is not available for PLUMBER-- having this in the NEON class could work.
base_case_root, | ||
run_from_postad, | ||
setup_only, | ||
no_batch, | ||
rerun, | ||
user_version, | ||
) = get_parser(sys.argv, description, valid_neon_sites) | ||
) = get_parser(sys.argv, description, valid_neon_sites, valid_plumber_sites) |
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.
Rather than returning a list for both valid plumber sites and neon sites maybe it should be more generic of valid sites?
@@ -1,12 +1,12 @@ | |||
#!/usr/bin/env python3 | |||
""" | |||
This is a just top-level skeleton script that calls | |||
run_neon.py. | |||
The original code (run_neon.py) is located under | |||
run_tower.py. |
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.
I think we should either rename this to
run_plumber
OR remove run_neon and only have run_tower which can run both NEON or PLUMBER sites. And then can be extended to work with generic tower sites, or another set of data similar to NEON or PLUMBER.
available_plumber_list = setup_plumber_data(valid_plumber_sites) | ||
|
||
# -- Looping over plumber sites | ||
if plumber_site_list: |
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.
Again, if we have a generic list we don't have to know if it's plumber or neon (or something else).
@@ -18,7 +18,7 @@ | |||
from CIME.utils import setup_standard_logging_options | |||
|
|||
|
|||
def get_parser(args, description, valid_neon_sites): | |||
def get_parser(args, description, valid_neon_sites, valid_plumber_sites): |
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.
Again remove returning both site lists and just have a general list of sites.
@@ -185,31 +185,36 @@ def get_parser(args, description, valid_neon_sites): | |||
|
|||
args = parse_args_and_handle_standard_logging_options(args, parser) | |||
|
|||
if "all" in args.neon_sites: | |||
neon_sites = valid_neon_sites | |||
if args.neon_sites: |
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 would be lifted to the neon specific implementation.
elif args.run_type == "postad": | ||
run_length = "100Y" | ||
neon_sites = None | ||
if args.plumber_sites: |
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.
Likewise this would go to the PLUMBER2 specific implementation.
@@ -0,0 +1,121 @@ | |||
#!/usr/bin/env python3 |
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.
Rather than having this do both NEON and PLUMBER2 I suggest there should be a NEON and PLUMBER2 specific versions that just do their own things rather than both.
Doing it this way is a more OO programming pattern and will help extensibility and keeping NEON and PLUMBER2 logic separated. As such will be easier to maintain.
Hi @ekluzek , happy to tag up to chat about this (and share some challenges that resulted in me implementing this a certain way). My calendar is up to date and lists the days that I'm on site-- feel free to just schedule something on there with me at some point when we're both in person! Or we can meet remotely. |
Co-authored-by: Erik Kluzek <[email protected]>
Co-authored-by: Erik Kluzek <[email protected]>
Per discussion with @adrifoster and @ekluzek , we decided that it would be best to focus on updating the user interface. We will implement updates in a way that is similar to how making surface datasets uses point and global parameters and then has additional optional parameters based on whether it is a point or global case. In this case, we will provide a user interface that looks like the following: The additional parameters that should apply to NEON are:
The additional parameters that should apply to PLUMBER2 are:
|
Thanks for this work, Tegan. Minor comment, default cases for plumber should be SP, which doesn't require an ad spin up. This may be most relevant with the user interface topic you all discussed today. |
This PR will use the TowerSite class (parent to both NEON and PLUBMER sites) and create a Plumber2Site class as well as implement capabilities for running single point simulations at PLUMBER sites.
Contributors other than yourself, if any:
@ekluzek
@adrifoster
CTSM Issues Fixed (include github issue #):
Addresses part of #1487
Are answers expected to change (and if so in what way)?
No, this PR should be BFB. However, it should expand existing capabilities to allow users to run at PLUMBER sites.
Any User Interface Changes (namelist or namelist defaults changes)?
Additional flags will be implemented for run_neon