-
Notifications
You must be signed in to change notification settings - Fork 212
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
CIME usability problems when using it as a library #3393
Comments
@jgfouca I do this and it works but I agree that the defaults aren't great. |
Thanks, @jedwards4b . So there's interest on CESM side as well. |
I have used this a little bit in https://github.com/ESCOMP/CTSM/tree/master/python/ctsm but only for some smallish things that don't depend on having a case:
I have used this to create a wrapper on top of |
I just got E3SM to create, config, build, and run from python. Here's my script: https://gist.github.com/PeterCaldwell/97c23d143ed989caa85792122bcab204 . It wasn't that hard, but it was disappointingly awkward/clunky. Some comments:
My goal is to create a python-based run script for E3SM folks to use to document exactly what they did in their run. We currently do that with shell scripts, but python would allow us to make our run scripts much cleaner by hiding standard utilities (like downloading the code from github) in utility functions. It would also be nice for launching perturbed physics ensembles. |
@PeterCaldwell the example I provided is to build an ensemble. |
Ah yes, I saw that. Nice! I'm confused how your case ran without specifying driver in case.create |
Ah - it's using our cime5.6 branch which is before we introduced cime_driver. We should be able to change that default to something reasonable. |
Gotcha, thanks! |
Glad to see that this is being re-activated. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
I have used this in for example https://github.com/jedwards4b/CESM2-Realtime-Forecast/blob/master/bin/buildcase.py I agree that the interface could be simplified. |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
I've long thought that it would be nice to be able to interact with CIME via python, as a library, in addition to the current CLI. It turns out, I'm not the only one and I received indicators of interest for this capability from others in E3SM.
For example, a user should be able to do this:
This works in theory, but in practice it's quite difficult. The main problem is that case.create takes a ton of arguments and, unlike the CLI which populates fields with reasonable defaults, the defaults to the create function are must less usable.
We should strive to make the defaults for all main CIME entry points be identical regardless of CLI vs. library use (and do this without duplication).
The text was updated successfully, but these errors were encountered: