You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _episodes/05-preprocessor.md
+45-43Lines changed: 45 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,22 +88,46 @@ file afterwards. These do not need to be explicitly included in recipes.
88
88
89
89
> ## Exercise: Adding more preprocessor steps
90
90
>
91
-
> Edit the [example recipe](https://github.com/ESMValGroup/ESMValTool_Tutorial/blob/master/data/recipe_example.yml) to first change the variable
92
-
> thetao, then add preprocessors to average over the latitude and longitude
91
+
> Edit the [example recipe](https://github.com/ESMValGroup/ESMValTool_Tutorial/blob/master/data/recipe_example.yml) to first change the variable to
92
+
> `thetao`, then add preprocessors to average over the latitude and longitude
93
93
> dimensions and finally average over the depth. Now run the recipe.
94
94
>
95
95
>> ## Solution
96
96
>>
97
-
>>```yaml
98
-
>> preprocessors:
99
-
>> prep_timeseries:
100
-
>> annual_statistics:
101
-
>> operator: mean
102
-
>> area_statistics:
103
-
>> operator: mean
104
-
>> depth_integration:
105
-
>>```
97
+
>> In the `diff` file below you will see the changes we have made to the file. The top 2 lines are the filenames and the lines like @@ -20,12 +20,15 @@ indicate the line numbers in the original and modified file, respectively. For more info on this format, see [here](https://en.wikipedia.org/wiki/Diff#Unified_format).
>> Complete recipe can be downloaded as [recipe_example_thetao.yml](https://github.com/ESMValGroup/ESMValTool_Tutorial/blob/master/data/recipe_example_thetao.yml)
107
131
>{: .solution}
108
132
{: .challenge}
109
133
@@ -116,6 +140,9 @@ specific preprocessor which should be applied.
@@ -152,6 +179,7 @@ specific preprocessor which should be applied.
152
179
> script: ocean/diagnostic_timeseries.py
153
180
> ```
154
181
>
182
+
> Complete recipe can be downloaded as [recipe_example_thetao_thetaoga.yml](https://github.com/ESMValGroup/ESMValTool_Tutorial/blob/master/data/recipe_example_thetao_thetaoga.yml)
155
183
{: .solution}
156
184
157
185
>## Challenge : How to write a recipe with multiple preprocessors
@@ -271,7 +299,7 @@ specific preprocessor which should be applied.
271
299
## Adding different datasets for different variables
272
300
273
301
Sometimes, we may want to include specific datasets only for certain variables.
274
-
An example is when we use observations for two different variables in a
302
+
An example is when we use observations for variables in a
275
303
diagnostic. While the CMIP dataset details for the two variables may be common,
276
304
the observations will likely not be so. It would be useful to know how to
277
305
include different datasets for different variables. Here is an example of a
@@ -303,9 +331,8 @@ simple preprocessor and diagnostic setup for that:
303
331
> preprocessor: prep_regrid
304
332
> mip: Amon
305
333
> grid: gn # can change for variables from the same model
306
-
> start_year: 1970
307
-
> end_year: 2000 # start and end years for a 30 year period,
0 commit comments