Skip to content

Commit cbdb0df

Browse files
committed
Updating feature branch mesh-data-model from b14a114 to head of main, a6cd220
2 parents a6cd220 + 3be8c61 commit cbdb0df

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+13187
-556
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ env:
3838
# Conda packages to be installed.
3939
CONDA_CACHE_PACKAGES: "nox pip"
4040
# Git commit hash for iris test data.
41-
IRIS_TEST_DATA_VERSION: "2.0.0"
41+
IRIS_TEST_DATA_VERSION: "2.2"
4242
# Base directory for the iris-test-data.
4343
IRIS_TEST_DATA_DIR: ${HOME}/iris-test-data
4444

@@ -193,4 +193,4 @@ linkcheck_task:
193193
- mkdir -p ${MPL_RC_DIR}
194194
- echo "backend : agg" > ${MPL_RC_FILE}
195195
- echo "image.cmap : viridis" >> ${MPL_RC_FILE}
196-
- nox --session linkcheck -- --verbose
196+
- nox --session linkcheck -- --verbose

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ include CHANGES COPYING COPYING.LESSER
44
# Files from setup.py package_data that are not automatically added to source distributions
55
recursive-include lib/iris/tests/results *.cml *.cdl *.txt *.xml *.json
66
recursive-include lib/iris/etc *
7+
include lib/iris/tests/stock/file_headers/*
78

89
recursive-include requirements *
910

docs/src/sphinxext/generate_package_rst.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# list of tuples for modules to exclude. Useful if the documentation throws
1414
# warnings, especially for experimental modules.
1515
exclude_modules = [
16-
("experimental/raster", "iris.experimental.raster") # gdal conflicts
16+
("experimental/raster", "iris.experimental.raster"), # gdal conflicts
1717
]
1818

1919

docs/src/userguide/cube_statistics.rst

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ Collapsing Entire Data Dimensions
2323

2424
In the :doc:`subsetting_a_cube` section we saw how to extract a subset of a
2525
cube in order to reduce either its dimensionality or its resolution.
26-
Instead of simply extracting a sub-region of the data,
27-
we can produce statistical functions of the data values
28-
across a particular dimension,
26+
Instead of simply extracting a sub-region of the data,
27+
we can produce statistical functions of the data values
28+
across a particular dimension,
2929
such as a 'mean over time' or 'minimum over latitude'.
3030

3131
.. _cube-statistics_forecast_printout:
@@ -57,9 +57,9 @@ For instance, suppose we have a cube:
5757
um_version: 7.3
5858

5959

60-
In this case we have a 4 dimensional cube;
61-
to mean the vertical (z) dimension down to a single valued extent
62-
we can pass the coordinate name and the aggregation definition to the
60+
In this case we have a 4 dimensional cube;
61+
to mean the vertical (z) dimension down to a single valued extent
62+
we can pass the coordinate name and the aggregation definition to the
6363
:meth:`Cube.collapsed() <iris.cube.Cube.collapsed>` method:
6464

6565
>>> import iris.analysis
@@ -88,8 +88,8 @@ we can pass the coordinate name and the aggregation definition to the
8888
mean: model_level_number
8989

9090

91-
Similarly other analysis operators such as ``MAX``, ``MIN`` and ``STD_DEV``
92-
can be used instead of ``MEAN``, see :mod:`iris.analysis` for a full list
91+
Similarly other analysis operators such as ``MAX``, ``MIN`` and ``STD_DEV``
92+
can be used instead of ``MEAN``, see :mod:`iris.analysis` for a full list
9393
of currently supported operators.
9494

9595
For an example of using this functionality, the
@@ -103,14 +103,14 @@ in the gallery takes a zonal mean of an ``XYT`` cube by using the
103103
Area Averaging
104104
^^^^^^^^^^^^^^
105105

106-
Some operators support additional keywords to the ``cube.collapsed`` method.
107-
For example, :func:`iris.analysis.MEAN <iris.analysis.MEAN>` supports
108-
a weights keyword which can be combined with
106+
Some operators support additional keywords to the ``cube.collapsed`` method.
107+
For example, :func:`iris.analysis.MEAN <iris.analysis.MEAN>` supports
108+
a weights keyword which can be combined with
109109
:func:`iris.analysis.cartography.area_weights` to calculate an area average.
110110

111-
Let's use the same data as was loaded in the previous example.
112-
Since ``grid_latitude`` and ``grid_longitude`` were both point coordinates
113-
we must guess bound positions for them
111+
Let's use the same data as was loaded in the previous example.
112+
Since ``grid_latitude`` and ``grid_longitude`` were both point coordinates
113+
we must guess bound positions for them
114114
in order to calculate the area of the grid boxes::
115115

116116
import iris.analysis.cartography
@@ -155,24 +155,24 @@ including an example on taking a :ref:`global area-weighted mean
155155
Partially Reducing Data Dimensions
156156
----------------------------------
157157

158-
Instead of completely collapsing a dimension, other methods can be applied
159-
to reduce or filter the number of data points of a particular dimension.
158+
Instead of completely collapsing a dimension, other methods can be applied
159+
to reduce or filter the number of data points of a particular dimension.
160160

161161

162162
Aggregation of Grouped Data
163163
^^^^^^^^^^^^^^^^^^^^^^^^^^^
164164

165-
The :meth:`Cube.aggregated_by <iris.cube.Cube.aggregated_by>` operation
166-
combines data for all points with the same value of a given coordinate.
167-
To do this, you need a coordinate whose points take on only a limited set
168-
of different values -- the *number* of these then determines the size of the
165+
The :meth:`Cube.aggregated_by <iris.cube.Cube.aggregated_by>` operation
166+
combines data for all points with the same value of a given coordinate.
167+
To do this, you need a coordinate whose points take on only a limited set
168+
of different values -- the *number* of these then determines the size of the
169169
reduced dimension.
170-
The :mod:`iris.coord_categorisation` module can be used to make such
171-
'categorical' coordinates out of ordinary ones: The most common use is
172-
to aggregate data over regular *time intervals*,
170+
The :mod:`iris.coord_categorisation` module can be used to make such
171+
'categorical' coordinates out of ordinary ones: The most common use is
172+
to aggregate data over regular *time intervals*,
173173
such as by calendar month or day of the week.
174174

175-
For example, let's create two new coordinates on the cube
175+
For example, let's create two new coordinates on the cube
176176
to represent the climatological seasons and the season year respectively::
177177

178178
import iris
@@ -188,8 +188,8 @@ to represent the climatological seasons and the season year respectively::
188188

189189
.. note::
190190

191-
The 'season year' is not the same as year number, because (e.g.) the months
192-
Dec11, Jan12 + Feb12 all belong to 'DJF-12'.
191+
The 'season year' is not the same as year number, because (e.g.) the months
192+
Dec11, Jan12 + Feb12 all belong to 'DJF-12'.
193193
See :meth:`iris.coord_categorisation.add_season_year`.
194194

195195

@@ -206,10 +206,10 @@ to represent the climatological seasons and the season year respectively::
206206
iris.coord_categorisation.add_season_year(cube, 'time', name='season_year')
207207

208208
annual_seasonal_mean = cube.aggregated_by(
209-
['clim_season', 'season_year'],
209+
['clim_season', 'season_year'],
210210
iris.analysis.MEAN)
211211

212-
212+
213213
Printing this cube now shows that two extra coordinates exist on the cube:
214214

215215
.. doctest:: aggregation
@@ -238,20 +238,20 @@ These two coordinates can now be used to aggregate by season and climate-year:
238238
.. doctest:: aggregation
239239

240240
>>> annual_seasonal_mean = cube.aggregated_by(
241-
... ['clim_season', 'season_year'],
241+
... ['clim_season', 'season_year'],
242242
... iris.analysis.MEAN)
243243
>>> print(repr(annual_seasonal_mean))
244244
<iris 'Cube' of surface_temperature / (K) (time: 19; latitude: 18; longitude: 432)>
245-
246-
The primary change in the cube is that the cube's data has been
247-
reduced in the 'time' dimension by aggregation (taking means, in this case).
248-
This has collected together all data points with the same values of season and
245+
246+
The primary change in the cube is that the cube's data has been
247+
reduced in the 'time' dimension by aggregation (taking means, in this case).
248+
This has collected together all data points with the same values of season and
249249
season-year.
250250
The results are now indexed by the 19 different possible values of season and
251251
season-year in a new, reduced 'time' dimension.
252252

253-
We can see this by printing the first 10 values of season+year
254-
from the original cube: These points are individual months,
253+
We can see this by printing the first 10 values of season+year
254+
from the original cube: These points are individual months,
255255
so adjacent ones are often in the same season:
256256

257257
.. doctest:: aggregation
@@ -271,7 +271,7 @@ so adjacent ones are often in the same season:
271271
djf 2007
272272
djf 2007
273273

274-
Compare this with the first 10 values of the new cube's coordinates:
274+
Compare this with the first 10 values of the new cube's coordinates:
275275
All the points now have distinct season+year values:
276276

277277
.. doctest:: aggregation
@@ -294,7 +294,7 @@ All the points now have distinct season+year values:
294294

295295
Because the original data started in April 2006 we have some incomplete seasons
296296
(e.g. there were only two months worth of data for 'mam-2006').
297-
In this case we can fix this by removing all of the resultant 'times' which
297+
In this case we can fix this by removing all of the resultant 'times' which
298298
do not cover a three month period (note: judged here as > 3*28 days):
299299

300300
.. doctest:: aggregation
@@ -306,7 +306,7 @@ do not cover a three month period (note: judged here as > 3*28 days):
306306
>>> full_season_means
307307
<iris 'Cube' of surface_temperature / (K) (time: 17; latitude: 18; longitude: 432)>
308308

309-
The final result now represents the seasonal mean temperature for 17 seasons
309+
The final result now represents the seasonal mean temperature for 17 seasons
310310
from jja-2006 to jja-2010:
311311

312312
.. doctest:: aggregation

0 commit comments

Comments
 (0)