-
Notifications
You must be signed in to change notification settings - Fork 24
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
Adding a few rof notebooks #126
base: main
Are you sure you want to change the base?
Conversation
… this, and change from pre-commit reformatting
Hey @nmizukami ! Thanks so much for adding these notebooks! I made those changes we discussed to One note: I think we'll need to provide Would you be able to pull these changes in locally, test running your notebook with |
Hi Teagan (@TeaganKing), The notebook almost ran with You can see /glade/work/mizukami/CUPiD/examples/coupled_model/month_annual_flow.ipynb. cupid prints on screen this:
I have seen this before. I don't fully understand the error, but this is coming from When I ran the notebook outside cupid, it runs fine but I activated hopefully I am simply setting something e.g., environment incorrectly... |
Hi @nmizukami , Sorry I let this slip! In the environment in which this was working, did you have a particular version of This error may be because PROJ is already installed-- I'm not sure where at this point, but can look into that. |
Hi @TeaganKing, some hint is that I can ran outside cupid-run, meaning I can run the notebook manually on jupyterhub with |
It sounds like there may be some issue related to the ipykernel installation. I think one of these might be the installation from ipykernel (a soft linked conda environment) and the other may be a conda environment found elsewhere (possibly an outdated I had updated a test environment but not my actual cupid-analysis environment; I'm doing that now and will test your notebook out. This is probably not the most efficient workflow, but I wonder if it might also be worth removing your cupid-analysis environment, see if it's still listed as an option in JupyterHub, make sure that both versions are removed, and then re-install a clean version? |
I did the following steps to remove cupid-analysis env and reinstall it on terminal.
It did not fix it. After removing cupid-analysis, jupyterhub still showed cupid-analysis, though [conda-env:cupid-analysis] was gone. |
Hi @TeaganKing , trying to run
|
casper-login1:/glade/work/mizukami/CUPiD/examples/coupled_model (main_adding_rof)> cupid-run -rof
|
Hi @TeaganKing, I was able to create /glade/work/mizukami/CUPiD/examples/coupled_model/computed_notebooks/quick-run/_build/html/index.html |
Hi @nmizukami , I'm glad that is temporarily working (but of course we need this to work for any user's environment). Yes, I think this would be a good conversation to have with CISL. Regarding looking at output, see the second section on this page for recommendations on NCAR machines. |
Hey @nmizukami , I added a PR to bring |
To-do:
|
Updated key_metrics/config.yml and coupled_model/config.yml for rof Review is needed and some science questions came up (e.g., what to do if you plot for time period when no observation is available. Are the other notebooks comparing the model outputs with observations??) |
Hey @nmizukami , thanks for these updates. Not all notebooks are comparing with observations, but you can see an example of an observational comparison in the glacier notebook & corresponding config.yml details. I think that if you are plotting for a time period where observations are not available, perhaps a warning statement that the obs are unavailable would be useful? |
And I'll review after our discussion on Thursday. |
Right now I am pointing to case The time period for this case is year 0001-0102, when for sure there is no observation for any components. So I thought this config is meant to compare the simulation with some base simulation, to see the model comparison or something like that, not meant to validate the model component with observations. Just wanted to understand the context of this setup. just with current config, the rof notebooks look less interesting, but technically the notebook works now (I believe). If config point to any CESM cases that use 20th-21st century, rof notebook automatically adds the observed streamflow to the plots, and compare the simulations with observations. |
The key setup here that's different from the coupled-model example is in the 'global params' section of the config file, where we have both a case name for the case you're looking at, as well as the base_case_name for a comparison case. The observations are defined separately in each individual notebook config section at this point. |
That sounds good that plots are generated without obs if obs do not exist. |
@nmizukami is planning to do the following:
Once these items are done, @TeaganKing can review. |
Hi @TeaganKing, all are done! |
examples/key_metrics/config.yml
Outdated
month_annual_flow: | ||
parameter_groups: | ||
none: | ||
analysis_name: 'mosart_test' |
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.
Just want to note that mosart_test
is here too. Could we perhaps use the case name and type and/or years of analysis being run?
## Configurations used for ctsm-mizuRoute | ||
|
||
# Directories | ||
geospatial_dir: /glade/campaign/cgd/tss/people/mizukami/ctsm-mizuRoute/geospatial |
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'm a little concerned about including personal directories that may not be accessible to everyone
Hey @nmizukami , thanks for all your work on this! It's definitely getting much closer! I made a few in-line comments above and also wanted to remind you of @mnlevy1981 's comment from above: "I noticed in month_annual_flow.ipynb you have a logical flag parallel that enables using PBSCluster when set to true. If you look at examples/nblibrary/ocn/ocean_surface.ipynb you'll see how CUPiD already passes a serial flag and uses a LocalCluster when that is set to false... I haven't looked at the other runoff notebooks, but we need to avoid casper- or derecho-specific blocks of code". This same structure is also currently used in Also, this is a minor comment, but would you be able to rename your notebooks according to our new suggested naming convention: |
It looks like the notebooks ran in In the |
I believe I have upadted both notebooks so they use LocaCluster now like this. Are you looking at the old ones??
How about these?
For comparison part, it plots observations, but it is not available (because of analysis year), it is not plotted. what does mean (is it different from ?) |
15min-> did you run all the components? It seems to take too long. I put a 10 year period (rof_start_data and rof_end_date) in config.yml now, so should be read faster and reading netcdfs is a bottleneck now.
Regarding no inline figures from cells - actually those cells are not running without observations available. I was not sure what to do with this situation. If there are observations, they should run and produce the figures.
|
Thanks for clarifying-- the way you are using LocalCluster works! For the notebook names, would these work? Or if you prefer, maybe you could just take out
RE plotting in line-- I think that's fine if the plots show up when observations are available. Since the default is save_figs=False, I think this is reasonable. Did you want to take out the coupled_model config file changes, per our discussion on updating the config file to a similar format as the key_metrics config file? |
Initial commits for ROF notebooks.
An ultimate set of the notebooks intend to mimic old ROF diagnostic plots
This PR is just starting with a few notebooks.
All Submissions:
pre-commit
check)?New Feature Submissions:
Changes to Core Features: