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
ESMValTool Core: core functionalities for the ESMValTool, a community diagnostic and performance metrics tool for routine evaluation of Earth system models in CMIP
12
+
ESMValTool Core: core functionalities for the ESMValTool, a community
13
+
diagnostic and performance metrics tool for routine evaluation of Earth System
14
+
Models in CMIP.
13
15
14
16
# Getting started
15
-
This is the development branch for ESMValTool Core. ESMValTool version 2 is under rapid development, an installation from source is recommended at the moment.
16
-
17
-
## Installing from source [recommended]
18
-
Please see [CONTRIBUTING.md](https://github.com/ESMValGroup/ESMValCore/blob/development/CONTRIBUTING.md) for instructions on installing ESMValTool from source.
19
17
20
18
## Installing from Anaconda
19
+
21
20
The Anaconda package can be found on [ESMValGroup Anaconda Channel.](https://anaconda.org/ESMValGroup)
22
21
23
-
If you already installed Anaconda, you can install ESMValTool by running:
- Review `config-user.yml`. To customize for your system, create a copy, edit and use the command line option `-c` to instruct `esmvaltool` to use your custom configuration.
30
-
- Optionally install the ESMValTool recipes and diagnostics
31
-
- Run e.g. `esmvaltool -c ~/config-user.yml examples/recipe_python.yml
48
+
49
+
- Review `config-user.yml`. To customize for your system, create a copy, edit
50
+
and use the command line option `-c` to instruct `esmvaltool` to use your
51
+
custom configuration file.
52
+
53
+
- Install the [ESMValTool](https://github.com/ESMValGroup/ESMValTool)
54
+
to run [ESMValTool recipes and diagnostics](https://esmvaltool.readthedocs.io/en/latest/recipes/index.html)
55
+
56
+
- Run e.g. `esmvaltool -c ~/config-user.yml examples/recipe_python.yml` after
57
+
downloading the necessary data.
32
58
33
59
## Getting help
34
-
The easiest way to get help if you cannot find the answer in the documentation on [readthedocs](https://esmvaltool.readthedocs.io), is to open an [issue on GitHub](https://github.com/ESMValGroup/ESMValCore/issues).
60
+
61
+
The easiest way to get help if you cannot find the answer in the documentation
62
+
on [readthedocs](https://esmvaltool.readthedocs.io), is to open an
63
+
[issue on GitHub](https://github.com/ESMValGroup/ESMValCore/issues).
35
64
36
65
## Contributing
37
-
If you would like to contribute a new diagnostic or feature, please have a look at [CONTRIBUTING.md](https://github.com/ESMValGroup/ESMValCore/blob/development/CONTRIBUTING.md).
38
66
67
+
If you would like to contribute a new feature, please have a
68
+
look at [CONTRIBUTING.md](https://github.com/ESMValGroup/ESMValCore/blob/development/CONTRIBUTING.md).
Copy file name to clipboardExpand all lines: doc/sphinx/source/esmvalcore/preprocessor.inc
+61-15Lines changed: 61 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -131,7 +131,7 @@ The _area.py module contains the following preprocessor functions:
131
131
132
132
* extract_region: Extract a region from a cube based on lat/lon corners.
133
133
* zonal_means: Calculates the zonal or meridional means.
134
-
* average_region: Calculates the average value over a region.
134
+
* area_statistics: Calculates the average value over a region.
135
135
* extract_named_regions: Extract a specific region from in the region cooordinate.
136
136
137
137
@@ -166,26 +166,24 @@ This function takes two arguments:
166
166
See also :func:`esmvalcore.preprocessor.zonal_means`.
167
167
168
168
169
-
3. average_region
169
+
3. area_statistics
170
170
-----------------
171
171
172
172
This functioncalculates the average value over a region - weighted by the
173
173
cell areas of the region.
174
174
175
-
This functiontakes three arguments:
176
-
coord1: the nameof the coordinate in the first direction.
177
-
coord2: the nameof the coordinate in the second dimension.
178
-
operator: the nameof the operation to apply (default: mean).
175
+
This functiontakes the argument,
176
+
operator: the nameof the operation to apply.
179
177
180
-
While this functionis named `average_region`, it can be used to apply several
178
+
This functioncan be used to apply several
181
179
different operations in the horizonal plane: mean, standard deviation, median
182
180
variance, minimum and maximum.
183
181
184
182
Note that this functionis applied over the entire dataset. Ifonly a specific
185
183
region, depth layer or time period is required, then those regions need to be
186
184
removed using other preprocessor operations in advance.
187
185
188
-
See also :func:`esmvalcore.preprocessor.average_region`.
186
+
See also :func:`esmvalcore.preprocessor.area_statistics`.
189
187
190
188
191
189
4. extract_named_regions
@@ -205,7 +203,7 @@ Volume manipulation
205
203
The _volume.py module contains the following preprocessor functions:
206
204
207
205
* extract_volume: Extract a specific depth range from a cube.
208
-
* average_volume: Calculate the volume-weighted average.
206
+
* volume_statistics: Calculate the volume-weighted average.
209
207
* depth_integration: Integrate over the depth dimension.
210
208
* extract_transect: Extract data along a line of constant latitude or longitude.
211
209
* extract_trajectory: Extract data along a specified trajectory.
@@ -225,19 +223,19 @@ negative, then z_min and z_max need to be negative numbers.
225
223
See also :func:`esmvalcore.preprocessor.extract_volume`.
226
224
227
225
228
-
2. average_volume
226
+
2. volume_statistics
229
227
-----------------
230
228
231
229
This functioncalculates the volume-weighted average across three dimensions,
232
230
but maintains the time dimension. The following arguments are required:
233
231
234
-
coord1: the nameofthe coordinate in the first direction.
235
-
coord2: the nameof the coordinate in the second dimension.
232
+
This functiontakesthe argument: operator, which defines the
233
+
operation to apply over the volume.
236
234
237
235
No depth coordinate is required as this is determined by iris. This
238
236
functionworks best when the fx_files provide the cell volume.
239
237
240
-
See also :func:`esmvalcore.preprocessor.average_volume`.
238
+
See also :func:`esmvalcore.preprocessor.volume_statistics`.
241
239
242
240
243
241
3. depth_integration
@@ -294,15 +292,21 @@ Vertical interpolation
294
292
======================
295
293
Documentation of _regrid.py (part 1)
296
294
297
-
Land/Sea/Ice Masking
298
-
====================
295
+
Masking
296
+
=======
299
297
Documentation of _mask.py (part 1)
300
298
299
+
1. Introduction to masking
300
+
---------------------------
301
+
301
302
Certain metrics and diagnostics need to be computed and performed on restricted regions of the Globe; ESMValTool supports subsetting the input data on land mass, oceans and seas, ice. This is achived by masking the model data and keeping only the values associated with grid points that correspond to e.g. land mass
302
303
or oceans and seas; masking is done either by using standard mask files that have the same grid resolution as the model data (these files are usually produced
303
304
at the same time with the model data and are called fx files) or, in the absence of these files, by using Natural Earth masks. Natural Earth masks, even if they are not model-specific, represent a good approximation since their grid resolution is almost always much higher than the model data, and they are constantly updated with changing
304
305
geographical features.
305
306
307
+
2. Land-sea masking
308
+
-------------------
309
+
306
310
In ESMValTool v2 land-seas-ice masking can be done in two places: in the preprocessor, to apply a mask on the data before any subsequent preprocessing step, and before
307
311
running the diagnostic, orin the disgnostic phase. We present both these implementations below.
308
312
@@ -321,6 +325,9 @@ kept in the data after applying the mask; conversely, it will retrieve the `fx:
321
325
typeof files; observational data is missing them altogether), then the tool attempts to mask using Natural Earth mask files (that are vectorized rasters).
322
326
Note that the resolutions for the Natural Earth masks are much higher than any usual CMIP model: 10m for land and 50m for ocean masks.
323
327
328
+
3. Ice masking
329
+
---------------
330
+
324
331
Note that for masking out ice the preprocessor is using a different function, this so that both land and sea or ice can be masked out without
325
332
losing generality. To mask ice out one needs to add the preprocessing step much as above:
326
333
@@ -334,6 +341,9 @@ losing generality. To mask ice out one needs to add the preprocessing step much
334
341
To keep only the ice, one needs to mask out landsea, so use that asvaluefor mask_out. Asin the caseof mask_landsea, the tool will automatically
335
342
retrieve the `fx: sftgif` file corresponding the the used variable and extract the ice mask from it.
336
343
344
+
4. mask files
345
+
--------------
346
+
337
347
At the core of the land/sea/ice masking in the preprocessor are the mask files (whether it be fx typeor Natural Earth typeof files); these files (bar Natural Earth)
338
348
can be retrived and used in the diagnostic phase as well or solely. By specifying the `fx_files:` key in the variable in diagnostic in the recipe, and populating it
339
349
with a list of desired files e.g.:
@@ -356,6 +366,42 @@ the 'config' diagnostic variable items e.g.:
0 commit comments