-
Notifications
You must be signed in to change notification settings - Fork 10
Fixes indentation of solution of multiple preprocessors challenge #109
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
Conversation
Tested by running following recipe recipe_example_multi_preprocessors.yml# ESMValTool
# recipe_example.yml
---
documentation:
description: Demonstrate basic ESMValTool example
authors:
- demora_lee
- mueller_benjamin
- swaminathan_ranjini
maintainer:
- demora_lee
references:
- demora2018gmd
# Some plots also appear in ESMValTool paper 2.
projects:
- ukesm
datasets:
- {dataset: UKESM1-0-LL, project: CMIP6, exp: historical,
ensemble: r1i1p1f2} #single dataset as an example
preprocessors:
prep_map:
regrid: #apply the preprocessor to regrid
target_grid: 1x1 # target resolution
scheme: linear #how to interpolate for regridding
prep_map_land:
custom_order: true #ensure that given order of preprocessing is followed
mask_landsea: #apply a mask
mask_out: sea #mask out sea grid cells
regrid: # now apply the preprocessor to regrid
target_grid: 1x1 # target resolution
scheme: linear #how to interpolate for regridding
diagnostics:
# --------------------------------------------------
# Two Simple diagnostics that illustrate the use of
# different preprocessors
# --------------------------------------------------
diag_simple_plot:
description: # preprocess a variable for a simple 2D plot
variables:
tas: # surface temperature
preprocessor: prep_map
mip: Amon
grid: gn #can change for variables from the same model
start_year: 1970
end_year: 2000
scripts: null
diag_land_only_plot:
description: #preprocess a variable for a 2D land only plot
variables:
tas: # surface temperature
preprocessor: prep_map_land
mip: Amon
grid: gn #can change for variables from the same model
start_year: 1970
end_year: 2000
scripts: null
|
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.
Hey @sverhoeven ,
Very well spotted, I completely agree that the example should be correct. However, there are some other code snippets in the same file where the indentation also seems off (but that are not complete recipes). I think we should fix those as well. E.g.:
variables:
timeseries_variable:
short_name: thetaoga
preprocessor: prep_timeseries_1
In your example the the yaml is still valid. I would like store the solution recipes for checks in CI and to use the diff view in the Markdown files so I am sure the reader gets correct solution, see #110 |
It may be valid but it's good practice to stick to 2 indents, so it should be:
Then let's open another issue for fixing these, because I do think we should. |
…i-preprocessors-solution Fixes indentation of solution of multiple preprocessors challenge
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
Tasks
Lesson 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}