Skip to content

Commit f49077e

Browse files
fixed #278 issue
1 parent d4e0ecf commit f49077e

File tree

1 file changed

+109
-102
lines changed

1 file changed

+109
-102
lines changed

_episodes/10-debugging.md

Lines changed: 109 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -127,110 +127,117 @@ and then <kbd>ctrl</kbd> + <kbd>X</kbd> to exit ``nano``.
127127
>## See the recipe_python.yml
128128
>
129129
> ```yaml
130-
> # ESMValTool
131-
> # recipe_python.yml
132-
> ---
133-
> documentation:
134-
> description: |
135-
> Example recipe that plots a map and timeseries of temperature.
136-
>
137-
> title: Recipe that runs an example diagnostic written in Python.
138-
>
139-
> authors:
140-
> - andela_bouwe
141-
> - righi_mattia
142-
>
143-
> maintainer:
144-
> - schlund_manuel
145-
>
146-
> references:
147-
> - acknow_project
148-
>
149-
> projects:
150-
> - esmval
151-
> - c3s-magic
152-
>
153-
> datasets:
154-
> - {dataset: BCC-ESM1, project: CMIP6, exp: historical, ensemble: r1i1p1f1, grid: gn}
155-
> - {dataset: CanESM2, project: CMIP5, exp: historical, ensemble: r1i1p1}
156-
>
157-
> preprocessors:
158-
>
159-
> select_january:
160-
> extract_month:
161-
> month: 1
162-
>
163-
> annual_mean_amsterdam:
164-
> extract_point:
165-
> latitude: 52.379189
166-
> longitude: 4.899431
167-
> scheme: linear
168-
> annual_statistics:
169-
> operator: mean
170-
> multi_model_statistics:
171-
> statistics:
172-
> - mean
173-
> span: overlap
174-
>
175-
> annual_mean_global:
176-
> area_statistics:
177-
> operator: mean
178-
> fx_variables:
179-
> areacella:
180-
> annual_statistics:
181-
> operator: mean
182-
>
183-
> diagnostics:
184-
>
185-
> map:
186-
> description: Global map of temperature in January 2000.
187-
> themes:
188-
> - phys
189-
> realms:
190-
> - atmos
191-
> variables:
192-
> tas:
193-
> mip: Amon
194-
> preprocessor: select_january
195-
> start_year: 2000
196-
> end_year: 2000
197-
> scripts:
198-
> script1:
199-
> script: examples/diagnostic.py
200-
> write_netcdf: true
201-
> output_file_type: pdf
202-
> quickplot:
203-
> plot_type: pcolormesh
204-
> cmap: Reds
205-
>
206-
> timeseries:
207-
> description: Annual mean temperature in Amsterdam and global mean since 1850.
208-
> themes:
209-
> - phys
210-
> realms:
211-
> - atmos
212-
> variables:
213-
> tas_amsterdam:
214-
> short_name: tas
215-
> mip: Amon
216-
> preprocessor: annual_mean_amsterdam
217-
> start_year: 1850
218-
> end_year: 2000
219-
> tas_global:
220-
> short_name: tas
221-
> mip: Amon
222-
> preprocessor: annual_mean_global
223-
> start_year: 1850
224-
> end_year: 2000
225-
> scripts:
226-
> script1:
227-
> script: examples/diagnostic.py
228-
> quickplot:
229-
> plot_type: plot
230-
> ```
231-
>
130+
# ESMValTool
131+
# recipe_python.yml
132+
#
133+
# See https://docs.esmvaltool.org/en/latest/recipes/recipe_examples.html
134+
# for a description of this recipe.
135+
#
136+
# See https://docs.esmvaltool.org/projects/esmvalcore/en/latest/recipe/overview.html
137+
# for a description of the recipe format.
138+
---
139+
documentation:
140+
description: |
141+
Example recipe that plots a map and timeseries of temperature.
142+
143+
title: Recipe that runs an example diagnostic written in Python.
144+
145+
authors:
146+
- andela_bouwe
147+
- righi_mattia
148+
149+
maintainer:
150+
- schlund_manuel
151+
152+
references:
153+
- acknow_project
154+
155+
projects:
156+
- esmval
157+
- c3s-magic
158+
159+
datasets:
160+
- {dataset: BCC-ESM1, project: CMIP6, exp: historical, ensemble: r1i1p1f1, grid: gn}
161+
- {dataset: bcc-csm1-1, version: v1, project: CMIP5, exp: historical, ensemble: r1i1p1}
162+
163+
preprocessors:
164+
# See https://docs.esmvaltool.org/projects/esmvalcore/en/latest/recipe/preprocessor.html
165+
# for a description of the preprocessor functions.
166+
167+
to_degrees_c:
168+
convert_units:
169+
units: degrees_C
170+
171+
annual_mean_amsterdam:
172+
extract_location:
173+
location: Amsterdam
174+
scheme: linear
175+
annual_statistics:
176+
operator: mean
177+
multi_model_statistics:
178+
statistics:
179+
- mean
180+
span: overlap
181+
convert_units:
182+
units: degrees_C
183+
184+
annual_mean_global:
185+
area_statistics:
186+
operator: mean
187+
annual_statistics:
188+
operator: mean
189+
convert_units:
190+
units: degrees_C
191+
192+
diagnostics:
193+
194+
map:
195+
description: Global map of temperature in January 2000.
196+
themes:
197+
- phys
198+
realms:
199+
- atmos
200+
variables:
201+
tas:
202+
mip: Amon
203+
preprocessor: to_degrees_c
204+
timerange: 2000/P1M
205+
caption: |
206+
Global map of {long_name} in January 2000 according to {dataset}.
207+
scripts:
208+
script1:
209+
script: examples/diagnostic.py
210+
quickplot:
211+
plot_type: pcolormesh
212+
cmap: Reds
213+
214+
timeseries:
215+
description: Annual mean temperature in Amsterdam and global mean since 1850.
216+
themes:
217+
- phys
218+
realms:
219+
- atmos
220+
variables:
221+
tas_amsterdam:
222+
short_name: tas
223+
mip: Amon
224+
preprocessor: annual_mean_amsterdam
225+
timerange: 1850/2000
226+
caption: Annual mean {long_name} in Amsterdam according to {dataset}.
227+
tas_global:
228+
short_name: tas
229+
mip: Amon
230+
preprocessor: annual_mean_global
231+
timerange: 1850/2000
232+
caption: Annual global mean {long_name} according to {dataset}.
233+
scripts:
234+
script1:
235+
script: examples/diagnostic.py
236+
quickplot:
237+
plot_type: plot
232238
{: .solution}
233239
240+
234241
## Keys and values in recipe settings
235242
236243
The [ESMValTool

0 commit comments

Comments
 (0)