Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaced list with link of stash mappings #3

Merged
merged 68 commits into from
Oct 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
ddff1e7
minor requirements tidy
bjlittle Jun 14, 2018
a0d1801
Pin Dask for avoid 0.18.2 bug with masked arrays.
pp-mo Aug 2, 2018
c89f43e
Tiny fix for dask, Python3 only?
pp-mo Aug 3, 2018
a6de324
Disable doctests for Python 2.
pp-mo Aug 13, 2018
6e32e14
Ignore warnings and update array printouts.
pp-mo Aug 13, 2018
d69222a
Better way to disable Python2 doctests.
pp-mo Aug 13, 2018
efdf0ae
Merge pull request #3134 from pp-mo/temporary_dask_fix
lbdreyer Aug 14, 2018
ff7ec92
Add gridcell_angles and rotate_grid_vectors to iris.analysis.cartogra…
pp-mo Jul 23, 2018
393489e
Roughly working, snapshotted with complex test plot code, to be reduced.
pp-mo Jul 25, 2018
d8bb331
Small improvements.
pp-mo Jul 26, 2018
c902ce3
Support plotting 2D bounded coords
lbdreyer Jul 20, 2018
723d45b
some words for docs, WIP probably
corinnebosley Jul 31, 2018
0b8baf5
Handle custom coords correctly
lbdreyer Jul 30, 2018
759e357
suggested tweaks and corrections
corinnebosley Jul 31, 2018
ade18ad
Update docs to included 2.2 versions (#3110)
lbdreyer Jul 31, 2018
91d69fa
Provide a test skipper for 2d coords WIP. (#3099)
pp-mo Jul 31, 2018
b6b305f
First working quiver+streamplot.
pp-mo Jul 30, 2018
aee7f56
Change version number (#3118)
lbdreyer Jul 31, 2018
297becf
re-added bounds definition for contiguity check, removed unnecessary …
corinnebosley Jul 31, 2018
a281805
Ensure Sphinx autodocs for grid_angles routines.
pp-mo Aug 2, 2018
e024f50
Codestyle fixes.
pp-mo Aug 2, 2018
e3e82e4
Whatsnew entries for 2d vector support.
pp-mo Aug 2, 2018
b041c50
Pin Dask to avoid 0.18.2 bug with masked arrays. (#3127)
pp-mo Aug 14, 2018
7a9cb5c
Update pp save rules to handle time means (#3132)
hdyson Aug 28, 2018
5de040f
Vector plots 2 (#3120)
pp-mo Aug 29, 2018
2b6b787
Temporary pin to avoid problems caused by Proj4 v5.1. (#3150)
pp-mo Aug 31, 2018
cb64761
Extending ORCA blockplotting (w/ tests) (#3135)
lbdreyer Aug 31, 2018
7455bb1
Tests for rotate_grid_vectors (#3148)
pp-mo Sep 3, 2018
42a90a2
Remove 'skip_2d' test decorator. (#3156)
pp-mo Sep 3, 2018
2d6c6a4
Add integration graphics tests for pcolormesh with 2d coords (#3149)
lbdreyer Sep 3, 2018
f51ae84
Vector plots 4 (#3158)
pp-mo Sep 4, 2018
5923aaa
Fix contig_ tolerance kwarg bug (#3162)
lbdreyer Sep 5, 2018
5bd0d15
Add simple lazy aggregations
DPeterK Sep 10, 2018
6186081
Lazy SUM and COUNT, tests improved
DPeterK Sep 12, 2018
2663a5a
Add tests for MAX and MIN
DPeterK Sep 12, 2018
b4bf847
Update tests for STD_DEV
DPeterK Sep 12, 2018
718f604
Use NetCDF variable's chunks on load (#3131)
DPeterK Sep 13, 2018
b1b4b59
Iteration and less duplication
DPeterK Sep 13, 2018
a957ebc
Attempt to fix Matplotlib issue by resticting to 2.x
tomgreen66 Sep 23, 2018
00ee159
Non-test review actions
DPeterK Sep 24, 2018
76b819b
Make COUNT tests truer unit tests
DPeterK Sep 24, 2018
9908eba
Convert MAX and MIN tests to truer unit tests
DPeterK Sep 24, 2018
e4e07ad
Convert COUNT and SUM agg tests to truer unit tests
DPeterK Sep 24, 2018
50fad00
Tests for new _lazy_data function
DPeterK Sep 24, 2018
63f0b5e
Fix for netCDF4 1.4 behaviour change. (#3177)
pp-mo Sep 28, 2018
5eee6ca
Merge pull request #3175 from tomgreen66/matplotlib_not_3
DPeterK Sep 28, 2018
afee892
Improve gracefully filling warning (#3171)
znicholls Sep 28, 2018
9088c49
Minor clarification to entry via a little more punctuation
DPeterK Sep 28, 2018
94022ad
Revert nc vars masking fix (temporarily). (#3178)
pp-mo Oct 1, 2018
d7f943b
fix for pandas column object bug (#3176)
corinnebosley Oct 2, 2018
0ac4601
Update module headers and installation instructions (#3170)
znicholls Oct 2, 2018
aa0fc4e
Correct some failing tests
DPeterK Oct 2, 2018
f2171a1
Update tests.rst (#3082)
bascrezee Oct 2, 2018
01e3285
Add link to developer guide. (#3093)
tv3141 Oct 2, 2018
e7e3c53
Merge pull request #3153 from SciTools/2d_coords
DPeterK Oct 3, 2018
2b02967
Merge pull request #3067 from bjlittle/minor-requirements-tidy
DPeterK Oct 3, 2018
7ef7985
Combine identical test routines for pcolor + pcolormesh.
pp-mo Sep 19, 2018
a4b3fb7
Test 'contiguity_tolerance' use in iris.plot.pcolor and pcolormesh.
pp-mo Oct 3, 2018
5f2aadc
Unpin dask
DPeterK Oct 3, 2018
c5be03e
Handle printing bounds of long time interval coords (#3140)
DPeterK Oct 3, 2018
e2c47f9
iris.util.reverse on cubes (#3155)
rcomer Oct 3, 2018
a41db2d
Improved Aux factory error handling: better message, delivered earlie…
hdyson Oct 3, 2018
25c5f4d
Correct cube collapse code
DPeterK Oct 4, 2018
7be9b73
Merge pull request #3185 from dkillick/unpin_dask
corinnebosley Oct 4, 2018
adfb264
Merge pull request #3184 from pp-mo/test_contig_tol
corinnebosley Oct 4, 2018
39a7d54
Merge pull request #3168 from dkillick/lazy_aggs
corinnebosley Oct 5, 2018
bddaba1
Add stash mapping changes to v2.1.0 changelog
tv3141 Jul 23, 2018
0d0cd8f
Merge branch 'amend_changelog' into tweak_amendment
tv3141 Oct 15, 2018
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*.py[co]

# Environment file which should be autogenerated
*conda_requirements.txt*

# Packages
*.egg?
*.egg-info
Expand Down
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ install:
export IRIS_TEST_DATA_REF="2f3a6bcf25f81bd152b3d66223394074c9069a96";
export IRIS_TEST_DATA_SUFFIX=$(echo "${IRIS_TEST_DATA_REF}" | sed "s/^v//");

# Cut short doctest phase under Python 2 : now only supports Python 3
# SEE : https://github.com/SciTools/iris/pull/3134
# ------------
- >
if [[ $TEST_TARGET == 'doctest' && ${TRAVIS_PYTHON_VERSION} != 3* ]]; then
echo "DOCTEST phase only valid in Python 3 : ABORTING during 'install'."
exit 0
fi

# Install miniconda
# -----------------
- >
Expand Down
24 changes: 20 additions & 4 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Installing from source
The latest Iris source release is available from
https://github.com/SciTools/iris.

Iris makes use of a range of other libraries and python modules. These
dependencies must be in place before you can successfully install
Iris makes use of a range of other libraries and python modules. These
dependencies must be in place before you can successfully install
Iris. Once you have satisfied the requirements detailed in the
``requirements`` directory, go to the root of Iris' and run::

Expand All @@ -42,8 +42,8 @@ Iris. Once you have satisfied the requirements detailed in the

In-place build - an alternative for developers
==============================================
We are very keen to encourage contributions to Iris. For this type of
development activity an in-place build can be useful. Once you've cloned
We are very keen to encourage contributions to Iris. For this type of
development activity an in-place build can be useful. Once you've cloned
the Iris git repository you can perform an in-place build with::

pip install -e .
Expand All @@ -66,6 +66,22 @@ Alternatively, a full requirements file that includes all optional dependencies
python requirements/gen_conda_requirements.py --groups all > conda_requirements.txt


Running the tests
'''''''''''''''''

In order to run the tests, you will need to use the `test` and `docs` groups (we include the `docs` group so that you can run the pull request tests locally).
Hence the commands change to::

python requirements/gen_conda_requirements.py --groups test docs > conda_requirements.txt
conda create -n my_iris_env --file conda_requirements.txt
conda activate my_iris_env # or whatever other name you gave it
pip install -e .

The tests can then be run with

python setup.py test


Custom site configuration
=========================
The default site configuration values can be overridden by creating the file
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
+ [Documentation](#documentation)
+ [Installation](#installation)
+ [Copyright and licence](#copyright-and-licence)
+ [Contributing](#contributing)

[](TOC)

Expand Down Expand Up @@ -98,5 +99,7 @@ are available in [INSTALL](INSTALL).
Iris may be freely distributed, modified and used commercially under the terms
of its [GNU LGPLv3 license](COPYING.LESSER).

# Contributing
Information on how to contribute can be found in the [Iris developer guide](https://scitools.org.uk/iris/docs/latest/developers_guide/index.html).

(C) British Crown Copyright 2010 - 2018, Met Office
2 changes: 1 addition & 1 deletion docs/iris/src/_templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<span class="linkdescr">extra information on specific technical issues</span></p>
</li>
<li>
<p class="biglink"><a class="biglink" href="whatsnew/2.1.html">What's new in Iris 2.1?</a><br/>
<p class="biglink"><a class="biglink" href="whatsnew/2.2.html">What's new in Iris 2.2?</a><br/>
<span class="linkdescr">recent changes in Iris's capabilities</span></p>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/iris/src/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</a>
<div class="strapline">
<h1>
Iris <span class="version">v2.1</span>
Iris <span class="version">v2.2</span>
</h1>
<p>
A powerful, format-agnostic, community-driven Python library for analysing and
Expand Down
2 changes: 1 addition & 1 deletion docs/iris/src/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) British Crown Copyright 2010 - 2017, Met Office
# (C) British Crown Copyright 2010 - 2018, Met Office
#
# This file is part of Iris.
#
Expand Down
3 changes: 3 additions & 0 deletions docs/iris/src/developers_guide/tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Testing
*******

The Iris tests may be run with ``python setup.py test`` which has a
command line utility included.

There are three categories of tests within Iris:
- Unit tests
- Integration tests
Expand Down
14 changes: 7 additions & 7 deletions docs/iris/src/userguide/interpolation_and_regridding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

import numpy as np
import iris
import warnings
warnings.simplefilter('ignore')

=================================
Cube interpolation and regridding
Expand Down Expand Up @@ -137,10 +139,9 @@ This cube has a "hybrid-height" vertical coordinate system, meaning that the ver
coordinate is unevenly spaced in altitude:

>>> print(column.coord('altitude').points)
[418.6983642578125 434.57049560546875 456.79278564453125 485.3664855957031
520.2932739257812 561.5751953125 609.2144775390625 663.214111328125
723.5769653320312 790.306640625 863.4072265625 942.88232421875
1028.737060546875 1120.9764404296875 1219.6051025390625]
[ 418.69836 434.5705 456.7928 485.3665 520.2933 561.5752
609.2145 663.2141 723.57697 790.30664 863.4072 942.8823
1028.737 1120.9764 1219.6051 ]

We could regularise the vertical coordinate by defining 10 equally spaced altitude
sample points between 400 and 1250 and interpolating our vertical coordinate onto
Expand Down Expand Up @@ -184,9 +185,8 @@ For example, to mask values that lie beyond the range of the original data:
>>> scheme = iris.analysis.Linear(extrapolation_mode='mask')
>>> new_column = column.interpolate(sample_points, scheme)
>>> print(new_column.coord('altitude').points)
[nan 494.44451904296875 588.888916015625 683.333251953125 777.77783203125
872.2222290039062 966.666748046875 1061.111083984375 1155.555419921875
nan]
[ nan 494.44452 588.8889 683.33325 777.77783 872.2222
966.66675 1061.1111 1155.5554 nan]


.. _caching_an_interpolator:
Expand Down
30 changes: 3 additions & 27 deletions docs/iris/src/whatsnew/2.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,30 +78,6 @@ Incompatible Changes
* The deprecated :mod:`iris.experimental.um` was removed.
Please use consider using `mule <https://github.com/SciTools/mule>`_
as an alternative.
* Stash-to-name mapping changes in :mod:`ib/iris/fileformats/um_cf_map.py`:
* m01s00i121: tendency_of_atmosphere_mass_content_of_sulfur_dioxide_expressed_as_sulfur_due_to_volcanic_emission -> "3D NATURAL SO2 EMISSIONS"
* m01s02i207: surface_downwelling_longwave_flux -> surface_downwelling_longwave_flux_in_air
* m01s02i208: surface_downwelling_longwave_flux_assuming_clear_sky -> surface_downwelling_longwave_flux_in_air_assuming_clear_sky
* m01s04i203: stratiform_rainfall_rate -> stratiform_rainfall_flux
* m01s04i204: stratiform_snowfall_rate -> stratiform_snowfall_flux
* m01s05i181: tendency_of_air_temperature_due_to_convection -> change_over_time_in_air_temperature_due_to_convection
* m01s05i182: tendency_of_specific_humidity_due_to_convection -> change_over_time_in_specific_humidity_due_to_convection
* m01s05i185: tendency_of_eastward_wind_due_to_convection -> change_over_time_in_x_wind_due_to_convection
* m01s05i186: tendency_of_northward_wind_due_to_convection -> change_over_time_in_y_wind_due_to_convection
* m01s05i205: convective_rainfall_rate -> convective_rainfall_flux
* m01s05i233: mass_fraction_of_convective_cloud_liquid_water_in_air -> undilute_cape
* m01s12i181': tendency_of_air_temperature_due_to_advection -> change_over_time_in_air_temperature_due_to_advection
* m01s12i182': tendency_of_specific_humidity_due_to_advection -> change_over_time_in_specific_humidity_due_to_advection
* m01s12i183': tendency_of_mass_fraction_of_cloud_liquid_water_in_air_due_to_advection -> change_over_time_in_mass_fraction_of_cloud_liquid_water_in_air_due_to_advection
* m01s12i184': tendency_of_mass_fraction_of_cloud_ice_in_air_due_to_advection -> change_over_time_in_mass_fraction_of_cloud_ice_in_air_due_to_advection
* m01s12i185': tendency_of_eastward_wind_due_to_advection -> change_over_time_in_x_wind_due_to_advection
* m01s12i186': tendency_of_northward_wind_due_to_advection -> change_over_time_in_y_wind_due_to_advection
* m01s30i218: product_of_eastward_wind_and_omega -> product_of_x_wind_and_omega
* m01s30i228: product_of_northward_wind_and_omega -> product_of_y_wind_and_omega
* m01s34i101: number_of_soluble_nucleation_mode_particles_per_molecule_of_air -> number_of_particles_per_air_molecule_of_soluble_nucleation_mode_aerosol_in_air
* m01s34i103: number_of_soluble_Aitken_mode_particles_per_molecule_of_air -> number_of_particles_per_air_molecule_of_soluble_aitken_mode_aerosol_in_air
* m01s34i107: number_of_soluble_accumulation_mode_particles_per_molecule_of_air -> number_of_particles_per_air_molecule_of_soluble_accumulation_mode_aerosol_in_air
* m01s34i113: number_of_soluble_coarse_mode_particles_per_molecule_of_air -> number_of_particles_per_air_molecule_of_soluble_coarse_mode_aerosol_in_air
* m01s34i119: number_of_insoluble_Aitken_mode_particles_per_molecule_of_air -> number_of_particles_per_air_molecule_of_insoluble_aitken_mode_aerosol_in_air
* m01s34i122: number_of_insoluble_accumulation_mode_particles_per_molecule_of_air -> number_of_particles_per_air_molecule_of_insoluble_accumulation_mode_aerosol_in_air
* m01s34i124: number_of_insoluble_coarse_mode_particles_per_molecule_of_air -> number_of_particles_per_air_molecule_of_insoluble_coarse_mode_aerosol_in_air
* This release of Iris contains a number of updated metadata translations.
See [this changelist](https://github.com/SciTools/iris/commit/69597eb3d8501ff16ee3d56aef1f7b8f1c2bb316#diff-1680206bdc5cfaa83e14428f5ba0f848)
for further information.
35 changes: 35 additions & 0 deletions docs/iris/src/whatsnew/2.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
What's New in Iris 2.2.0
************************

:Release: 2.2.0a0
:Date:


This document explains the new/changed features of Iris in the alpha release
of version 2.2.0
(:doc:`View all changes <index>`).


Iris 2.2.0 Features
===================
.. _showcase:

.. admonition:: 2-Dimensional Coordinate Plotting

The iris plot functions :func:`~iris.plot.pcolor` and
:func:`~iris.plot.pcolormesh` now accommodate the plotting of 2-dimensional
coordinates as well as 1-dimensional coordinates.

To enable this feature, each coordinate passed in for plotting will be
automatically checked for contiguity. Coordinate bounds must either be
contiguous, or the cube's data must be masked at the discontiguities in
order to avoid plotting errors.

The iris plot functions :func:`iris.plot.quiver` has been added, and this
also works with 2-dimensional plot coordinates.

.. admonition:: 2-Dimensional Grid Vectors

The iris functions :func:`iris.analysis.cartography.gridcell_angles` and
:func:`iris.analysis.cartography.rotate_grid_vectors` have been added,
allowing you to convert gridcell-oriented vectors to true-North/East ones.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Fixed a bug that prevented printing time coordinates with bounds when the time
coordinate was measured on a long interval (that is, ``months`` or ``years``).
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* "Gracefully filling..." warnings are only issued when the co-ordinate or bound data is actually masked.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* NetCDF data variable chunk sizes are utilised at load time for significant performance improvements.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* :func:`iris.util.reverse` can now be used to reverse a cube by specifying one or more coordinates.
1 change: 1 addition & 0 deletions docs/iris/src/whatsnew/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Iris versions.
.. toctree::
:maxdepth: 2

2.2.rst
2.1.rst
2.0.rst
1.13.rst
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def callback(cube, field, filename):


# Iris revision.
__version__ = '2.2.0dev0'
__version__ = '2.2.0a0'

# Restrict the names imported when using "from iris import *"
__all__ = ['load', 'load_cube', 'load_cubes', 'load_raw',
Expand Down
15 changes: 15 additions & 0 deletions lib/iris/_lazy_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
from __future__ import (absolute_import, division, print_function)
from six.moves import (filter, input, map, range, zip) # noqa

from functools import wraps

import dask
import dask.array as da
import dask.context
Expand All @@ -31,6 +33,19 @@
import numpy.ma as ma


def non_lazy(func):
"""
Turn a lazy function into a function that returns a result immediately.

"""
@wraps(func)
def inner(*args, **kwargs):
"""Immediately return the results of a lazy function."""
result = func(*args, **kwargs)
return dask.compute(result)[0]
return inner


def is_lazy_data(data):
"""
Return whether the argument is an Iris 'lazy' data array.
Expand Down
Loading