Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
13ff24f
Connectivity Class (AVD-1595) (#3968)
trexfeathers Feb 8, 2021
1c699a3
Update feature branch mesh-data-model (#3996)
bjlittle Feb 10, 2021
e0fb557
move connectivity to experimental (#3995)
bjlittle Feb 10, 2021
7e541ec
Update mesh-data-model branch (#4009)
bjlittle Feb 15, 2021
59fa3f1
Master to mesh data model (#4022)
bjlittle Feb 22, 2021
520d135
Mesh API Merge-Back (#4027)
trexfeathers Feb 23, 2021
0bc9bee
add minimalist mesh __eq__ support (#4028)
bjlittle Feb 23, 2021
e719ae0
MeshCoordMetadata [AVD-1629] (#4014)
pp-mo Feb 23, 2021
208e020
add mesh __str__ and __repr__ support (#4033)
bjlittle Feb 25, 2021
48028e9
Mesh tests (#4034)
trexfeathers Feb 25, 2021
c34662c
add mesh public doc-strings (#4037)
bjlittle Mar 1, 2021
18faa96
add Mesh.LOCATIONS enumeration (#4049)
bjlittle Mar 3, 2021
be62cdf
MeshCoord class [AVD-1591] (#4036)
pp-mo Mar 5, 2021
7828e95
align mesh api with cube (#4057)
bjlittle Mar 8, 2021
dc092a3
Better calculations for MeshCoord lazy/real points and bounds. [AVD-1…
pp-mo Mar 9, 2021
3b8f492
Meshcoord printout [AVD-1592] (#4054)
pp-mo Mar 9, 2021
de2372b
Cube.coords mesh_coords key [AVD-1662] (#4063)
pp-mo Mar 15, 2021
04e71c1
Support for cube mesh api [AVD-1663] (#4064)
pp-mo Mar 17, 2021
615bfd5
UGRID Loading (AVD-1656, AVD-1657, AVD-1660) (#4058)
trexfeathers Mar 18, 2021
ac12231
More UGRID Loading Integration Tests (AVD-1517, AVD-1679, AVD-1680, A…
trexfeathers Mar 19, 2021
8c08d14
Migrate synthetic data generation from iris-ugrid (#4076)
trexfeathers Mar 26, 2021
b0f6245
merge master to mesh-data-model
bjlittle Apr 9, 2021
8f6bb44
fix merge conflict for cirrus-ci env variable
bjlittle Apr 9, 2021
bbeb543
Merge pull request #4093 from bjlittle/merge-master-to-mesh-data-model
trexfeathers Apr 9, 2021
a7a8fce
Support unstructured plotting (#4080)
bjlittle Apr 10, 2021
88cfb7e
ng-vat v0.2 is iris v3.1a0 (#4095)
bjlittle Apr 10, 2021
1ed885e
Topology tolerance [AVD-1723] (#4099)
pp-mo Apr 21, 2021
c088c33
Logging fixes (#4106)
trexfeathers Apr 29, 2021
3be8c61
mesh-data-model dev version + purge plotting (#4114)
bjlittle May 4, 2021
cbdb0df
Updating feature branch mesh-data-model from b14a11499c4d1736a126aac6…
trexfeathers Jul 22, 2021
39a4b30
CI fixes for new FB code - Pyke removal and linting.
trexfeathers Jul 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ env:
# Conda packages to be installed.
CONDA_CACHE_PACKAGES: "nox pip"
# Git commit hash for iris test data.
IRIS_TEST_DATA_VERSION: "2.0.0"
IRIS_TEST_DATA_VERSION: "2.2"
# Base directory for the iris-test-data.
IRIS_TEST_DATA_DIR: ${HOME}/iris-test-data

Expand Down Expand Up @@ -193,4 +193,4 @@ linkcheck_task:
- mkdir -p ${MPL_RC_DIR}
- echo "backend : agg" > ${MPL_RC_FILE}
- echo "image.cmap : viridis" >> ${MPL_RC_FILE}
- nox --session linkcheck -- --verbose
- nox --session linkcheck -- --verbose
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ include CHANGES COPYING COPYING.LESSER
# Files from setup.py package_data that are not automatically added to source distributions
recursive-include lib/iris/tests/results *.cml *.cdl *.txt *.xml *.json
recursive-include lib/iris/etc *
include lib/iris/tests/stock/file_headers/*

recursive-include requirements *

Expand Down
2 changes: 1 addition & 1 deletion docs/src/sphinxext/generate_package_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# list of tuples for modules to exclude. Useful if the documentation throws
# warnings, especially for experimental modules.
exclude_modules = [
("experimental/raster", "iris.experimental.raster") # gdal conflicts
("experimental/raster", "iris.experimental.raster"), # gdal conflicts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't on master. Is it explicitly added for UGRID work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the extra comma is an artifact of this list being expanded in #4080, then the additional tuple being removed again in #4114.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can keep it as long as the change isn't in the 3.0.x branch. Personally if not needed i'd remove it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see that side. I'm mostly put off by the prospect of a noisy commit history since we're not using the squash strategy for this PR. Is that a non-issue for you - an extra commit to remove the comma is fine?

]


Expand Down
76 changes: 38 additions & 38 deletions docs/src/userguide/cube_statistics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Collapsing Entire Data Dimensions

In the :doc:`subsetting_a_cube` section we saw how to extract a subset of a
cube in order to reduce either its dimensionality or its resolution.
Instead of simply extracting a sub-region of the data,
we can produce statistical functions of the data values
across a particular dimension,
Instead of simply extracting a sub-region of the data,
we can produce statistical functions of the data values
across a particular dimension,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On master this has a space. We haven't touch the user guide in the UGRID yet, so I'm just wondering why this change is introduced

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My IDE will fix any poorly formatted text in files that it touches, and unfortunately I accidentally touched some extra files and didn't catch it in time (4cf57f0).

The spaces at ends of lines shouldn't be there; this is an improvement, just not one that was asked for or expected!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes aren't associated with any unstructured work. Please can you back them out as they are highly likely to cause conflicts when merging onto main later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having discussed offline, we haven't been able to work out a way to avoid the potential conflict. If this happened again I would have spent the extra 15mins undoing the original mistake, to avoid this later problem.

such as a 'mean over time' or 'minimum over latitude'.

.. _cube-statistics_forecast_printout:
Expand Down Expand Up @@ -57,9 +57,9 @@ For instance, suppose we have a cube:
um_version: 7.3


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

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


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

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

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

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

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

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


Aggregation of Grouped Data
^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

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

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

.. note::

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


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

annual_seasonal_mean = cube.aggregated_by(
['clim_season', 'season_year'],
['clim_season', 'season_year'],
iris.analysis.MEAN)


Printing this cube now shows that two extra coordinates exist on the cube:

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

>>> annual_seasonal_mean = cube.aggregated_by(
... ['clim_season', 'season_year'],
... ['clim_season', 'season_year'],
... iris.analysis.MEAN)
>>> print(repr(annual_seasonal_mean))
<iris 'Cube' of surface_temperature / (K) (time: 19; latitude: 18; longitude: 432)>
The primary change in the cube is that the cube's data has been
reduced in the 'time' dimension by aggregation (taking means, in this case).
This has collected together all data points with the same values of season and

The primary change in the cube is that the cube's data has been
reduced in the 'time' dimension by aggregation (taking means, in this case).
This has collected together all data points with the same values of season and
season-year.
The results are now indexed by the 19 different possible values of season and
season-year in a new, reduced 'time' dimension.

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

.. doctest:: aggregation
Expand All @@ -271,7 +271,7 @@ so adjacent ones are often in the same season:
djf 2007
djf 2007

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

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

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

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

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

.. doctest:: aggregation
Expand Down
Loading