-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add a Jupyter esmvalcore API tutorial #339
base: main
Are you sure you want to change the base?
Conversation
Adding lesson made for our ACCESS 2024 workshop Training day Hackathon with @rbeucher. Have edited to remove references to Gadi (Australia's NCI supercomputer) workflow |
@rbeucher - I will also try it this week. Thanks! |
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.
Thanks a lot, @flicj191 ! It is great that we have finally a episode how to use the Jupyter esmvalcore API. And since I've never used it before, I can say that you learn it well with this episode. The examples and exercises are also very useful.
Some comments:
- I am missing in the beginning a small part about the configuration. How to check the CFG keys and how to adapt them. (I think Peter has it in his blog.)
- When using the ESMValCore preprocessor function I got many warnings with the output. Is it the same for you? I am not sure if we should mention that somehow. Otherwise it could be irritating.
- I could not find the 'ACCESS-OM2, omip2' data on ESGF. Did I something wrong or could you replace it with a dataset which is available on ESGF?
Thanks @LisaBock for your comments! Good points, I will address them though I'm at a conference next week so probably the week after. Cheers |
@flicj191 - I have started this review..will try and see if the instructions work simultaneously. |
_episodes/11-esmvalcoreapi.md
Outdated
@@ -0,0 +1,511 @@ | |||
--- | |||
title: "ESMValCore API in a Jupyter notebook" |
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.
In the tutorial so far, we have not distinguished between ESMvalCore and ESMValTool. Also we have not referred to the ESMValCore API as such, so perhaps we should write a line or two to orient the user.
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 have extended the title and added more to the start of the episode
you can run code. | ||
You will need to use a python environment with ESMValTool and ESMValCore installed. | ||
|
||
## Find Datasets with facets |
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.
Could we define facets before this?
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 have added some more words to define and referred to another section in a previous episode
_episodes/11-esmvalcoreapi.md
Outdated
You will need to use a python environment with ESMValTool and ESMValCore installed. | ||
|
||
## Find Datasets with facets | ||
We have seen from running available recipes that ESMValTool is able to find data from facets that |
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.
Can we provide an example for this? I think we either need to have a lesson referencing facets before this or we should adda paragraph with examples here.
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.
edited as above comment, maybe we could add for information to a previous lesson?
were given in the recipe. We can use this in a Notebook, including filling out the facets for | ||
data definition. | ||
To do this we will use the `Dataset` object from the API. Let's look at this example. | ||
|
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.
We usually provide guidance on where this code should go. For instance, is this in a Notebook or a Python file or a YAML file? As it stands, it is not clear where this code will go and what it will be used for. Partly because we haven't discussed ESMValCore APIs in the tutorial.
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 have mentioned adding to a jupyter notebook
## Start JupyterLab | ||
A [jupyter notebook](https://jupyter.org/){:target="_blank"} is an interactive document where | ||
you can run code. | ||
You will need to use a python environment with ESMValTool and ESMValCore installed. |
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.
We will need to tell them how to do this on one server (minimally) and ideally provide steps for their own machine and one or more HPC servers such as JASMIN.
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 not sure we can go to too much detail as support would be at the HPC centers and I wouldn't know the others that well. I have added in links to them. On their own machine we could also link to the jupyter intall page
print(dataset) | ||
``` | ||
> ## Pro tip: Augmented facets in the output | ||
> When running a recipe there is a `_filled` recipe `yml` file in the output `/run` folder which |
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.
We would have to provide the command for running this recipe.
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.
added and changed example recipe
@flicj191 - This is really nice! I have added some comments at the start of the lesson essentially to provide more detailed instructions in keeping with other lessons and for easy assimilation by the user. We haven't mentioned anything about the ESMValCore API in the tutorial, so either we should provide some background here and/or link to documentation in a way that explains this. I'd be interested to know what you and @LisaBock think about this. |
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.
@flicj191 - Leaving this request for changes based on overall comments. Happy to discuss how best to make these changes.
Pull Request checklist
We appreciate your time and effort to improve the tutorial. Please keep in mind that lesson maintainers are volunteers and it may be some time before they can respond to your contribution.
Before you start
Mention posibility of using Jupyter notebooks in the tutorial #283 and Potential lesson additions from the May 2024 Workshop discussions #324
Tasks
If you are contributing to existing lesson materials, please make sure the content conforms to theLesson development
section in CONTRIBUTING.md and does not contain any spelling or grammatical errors.Lesson organization
andLesson formatting
sections in CONTRIBUTING.md and does not contain any spelling or grammatical errors.make serve
, alternativelymake docker-serve
. Please see thePreviewing your changes locally
section in CONTRIBUTING.md for installation instructions.If you need help with any of the tasks above, please do not hesitate to ask by commenting in the issue or pull request.
Closes {Link to the corresponding issue} #283 and part of #324