Skip to content

Commit 1a39a41

Browse files
committed
Merge branch 'master' into use_cftime
2 parents 743930c + 8ce7624 commit 1a39a41

File tree

137 files changed

+9092
-8263
lines changed

Some content is hidden

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

137 files changed

+9092
-8263
lines changed
File renamed without changes.

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
*.py[co]
22

33
# Packages
4-
*.egg
4+
*.egg?
55
*.egg-info
66
dist
77
build
@@ -15,10 +15,12 @@ develop-eggs
1515

1616
# Installer logs
1717
pip-log.txt
18+
pip-cache
1819

1920
# Unit test / coverage reports
2021
.coverage
2122
.tox
23+
.pytest_cache
2224

2325
#Translations
2426
*.mo
@@ -32,6 +34,7 @@ lib/iris/std_names.py
3234
# Iris test result files
3335
lib/iris/tests/result_image_comparison/
3436
iris_image_test_output/
37+
*.ESMF_LogFile
3538

3639
# Iris test lock file
3740
lib/iris/tests/results/imagerepo.lock
@@ -50,6 +53,7 @@ docs/iris/src/_static/random_image.js
5053
docs/iris/src/_templates/gallery.html
5154
docs/iris/src/examples/
5255
docs/iris/src/iris/
56+
docs/iris/src/matplotlibrc
5357

5458
# Example test results
5559
docs/iris/iris_image_test_output/

.travis.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ sudo: false
1313

1414
env:
1515
matrix:
16-
- TEST_TARGET=coding
1716
- TEST_TARGET=default TEST_MINIMAL=true
1817
- TEST_TARGET=default
1918
- TEST_TARGET=example
@@ -76,13 +75,14 @@ install:
7675
CONDA_REQS_FILE=conda-requirements.txt;
7776
python requirements/gen_conda_requirements.py ${CONDA_REQS_FLAGS} --groups ${CONDA_REQS_GROUPS} > ${CONDA_REQS_FILE};
7877
cat ${CONDA_REQS_FILE};
79-
conda install --quiet --file ${CONDA_REQS_FILE};
78+
conda install --quiet -n $ENV_NAME --file ${CONDA_REQS_FILE};
8079
8180
- PREFIX=$HOME/miniconda/envs/$ENV_NAME
8281

8382
# Output debug info
8483
- >
85-
conda list;
84+
conda list -n $ENV_NAME;
85+
conda list -n $ENV_NAME --explicit;
8686
conda info -a;
8787
8888
# Pre-load Natural Earth data to avoid multiple, overlapping downloads.
@@ -111,13 +111,13 @@ install:
111111
# JUST FOR NOW : Install latest version of iris-grib.
112112
# TODO : remove when iris doesn't do an integration test requiring iris-grib.
113113
- if [[ "$TEST_MINIMAL" != true && ${TRAVIS_PYTHON_VERSION} == 2* ]]; then
114-
conda install python-ecmwf_grib;
114+
conda install --quiet -n $ENV_NAME python-ecmwf_grib;
115115
pip install git+https://github.com/SciTools/iris-grib.git@v0.11.0;
116116
fi
117117

118118
script:
119119
- if [[ $TEST_TARGET == 'default' ]]; then
120-
python -m iris.tests.runner --default-tests --system-tests --print-failed-images --num-processors=3;
120+
python -m iris.tests.runner --default-tests --system-tests --coding-tests --print-failed-images --num-processors=3;
121121
fi
122122
- if [[ $TEST_TARGET == 'example' ]]; then
123123
python -m iris.tests.runner --example-tests --print-failed-images --num-processors=3;
@@ -160,9 +160,3 @@ script:
160160
cd $INSTALL_DIR/docs/iris/src/whatsnew;
161161
python aggregate_directory.py --checkonly;
162162
fi
163-
- if [[ $TEST_TARGET == 'coding' ]]; then
164-
cd $INSTALL_DIR;
165-
python setup.py pyke_rules;
166-
python setup.py std_names;
167-
python setup.py test --coding-tests;
168-
fi

INSTALL

Lines changed: 6 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ https://github.com/SciTools/iris.
3434

3535
Iris makes use of a range of other libraries and python modules. These
3636
dependencies must be in place before you can successfully install
37-
Iris. Once you have satisfied the requirements detailed below,
38-
extract the iris source package, cd to the new directory, and enter::
37+
Iris. Once you have satisfied the requirements detailed in the
38+
``requirements`` directory, go to the root of Iris' and run::
3939

40-
python setup.py install
40+
pip install .
4141

4242

4343
In-place build - an alternative for developers
@@ -46,118 +46,18 @@ We are very keen to encourage contributions to Iris. For this type of
4646
development activity an in-place build can be useful. Once you've cloned
4747
the Iris git repository you can perform an in-place build with::
4848

49-
python setup.py develop
50-
51-
52-
Build and runtime requirements
53-
==============================
54-
These are external packages which you will need to have installed before
55-
installing and running Iris.
56-
57-
Many of these packages are available in Linux package managers
58-
such as aptitude and yum. For example, it may be possible to install
59-
Numpy using::
60-
61-
apt-get install python-numpy
62-
63-
If you are installing dependencies with a package manager on Linux,
64-
you may need to install the development packages (look for a "-dev"
65-
postfix) in addition to the core packages.
66-
67-
68-
python 2.7 or 3.5+ (http://www.python.org/)
69-
Iris requires Python 2.7 or Python 3.5+.
70-
71-
numpy (http://numpy.scipy.org/)
72-
Python package for scientific computing including a powerful N-dimensional
73-
array object.
74-
75-
scipy (http://www.scipy.org/)
76-
Python package for scientific computing.
77-
78-
cartopy v0.11.0 or later (http://github.com/SciTools/cartopy/)
79-
Python package which provides cartographic tools for python.
80-
81-
dask v0.15.0 or later (https://dask.pydata.org/)
82-
Python package for parallel computing.
83-
84-
PyKE v1.1.1 or later (http://pyke.sourceforge.net/)
85-
Python knowledge-based inference engine.
86-
87-
netcdf4-python (http://netcdf4-python.googlecode.com/)
88-
Python interface to the netCDF version 4 C library.
89-
(It is strongly recommended to ensure your installation uses a
90-
thread-safe build of HDF5 to avoid segmentation faults when using
91-
lazy evaluation.)
92-
93-
cf_units v2.0 or later (https://github.com/SciTools/cf_units)
94-
CF data units handling, using udunits.
95-
96-
setuptools v36.0 or later (http://pypi.python.org/pypi/setuptools/)
97-
Python package for installing/removing python packages.
98-
99-
100-
The full list of packages may be found in the repository at
101-
``requirements/core.txt``.
102-
103-
104-
Optional
105-
''''''''
106-
These are optional packages which you may want to install to enable
107-
additonal Iris functionality such as plotting and
108-
loading/saving GRIB. These packages are required for the full Iris test
109-
suite to run.
110-
111-
gdal (https://pypi.python.org/pypi/GDAL/)
112-
Python package for the Geospatial Data Abstraction Library (GDAL).
113-
114-
graphviz (http://www.graphviz.org/)
115-
Graph visualisation software.
116-
117-
iris-grib (https://github.com/scitools/iris-grib)
118-
Iris interface to ECMWF's GRIB API
119-
120-
matplotlib (https://matplotlib.org)
121-
Python package for 2D plotting.
122-
123-
mock (http://pypi.python.org/pypi/mock/)
124-
Python mocking and patching package for testing. Note that this package
125-
is only required to support the Iris unit tests.
126-
127-
nose (https://nose.readthedocs.io/en/latest/)
128-
Python package for software testing. Iris is not compatible with nose2.
129-
130-
pep8 (https://pypi.python.org/pypi/pep8)
131-
Python package for software testing.
132-
133-
pandas (http://pandas.pydata.org)
134-
Python package providing high-performance, easy-to-use data structures and
135-
data analysis tools.
136-
137-
PythonImagingLibrary (http://effbot.org/zone/pil-index.htm)
138-
Python package for image processing.
139-
140-
pyugrid (https://github.com/pyugrid/pyugrid)
141-
A Python API to utilize data written using the unstructured grid
142-
UGRID conventions.
143-
144-
shapely (https://github.com/Toblerity/Shapely)
145-
Python package for the manipulation and analysis of planar geometric
146-
objects.
147-
148-
mo_pack (https://github.com/SciTools/mo_pack)
149-
A Python wrapper to libmo_unpack, giving WGDOS packing and unpacking.
49+
pip install -e .
15050

15151

15252
Generating conda requirements
15353
'''''''''''''''''''''''''''''
15454

15555
Requirements for Iris are stored in the ``requirements`` directory in the root of the source repository.
156-
It is possible to generate a requirements file suitable for conda use with::
56+
It is possible to generate a requirements file suitable for use with conda::
15757

15858
python requirements/gen_conda_requirements.py > conda_requirements.txt
15959

160-
This may be installed with::
60+
This may then be installed with::
16161

16262
conda create -n my_iris_env --file conda_requirements.txt
16363

README.md

Lines changed: 77 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,102 @@
1-
Iris
2-
====
1+
<h1 align="center">
2+
<a href="https://scitools.org.uk/iris/docs/latest/" style="display: block; margin: 0 auto;">
3+
<img src="https://raw.githubusercontent.com/pelson/iris/markdown_readme/docs/iris/src/_static/logo_banner.png"
4+
style="max-width: 40%;" alt="Iris"></a><br>
5+
</h1>
36

4-
[![Join the chat at https://gitter.im/SciTools/iris](https://badges.gitter.im/SciTools/iris.svg)](https://gitter.im/SciTools/iris?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5-
[![Build Status](https://api.travis-ci.org/repositories/SciTools/iris.svg?branch=master)](https://travis-ci.org/SciTools/iris/branches)
6-
[![DOI](https://zenodo.org/badge/5312648.svg)](https://zenodo.org/badge/latestdoi/5312648)
7-
[![Documentation for master branch ](https://img.shields.io/badge/docs-master-blue.svg)](https://scitools-docs.github.io/iris/master/index.html)
7+
<h4 align="center">
8+
Iris is a powerful, easy to use, and community-driven Python library for
9+
analysing and visualising Earth science data
10+
</h4>
811

9-
(C) British Crown Copyright 2010 - 2018, Met Office
10-
11-
Iris is a powerful, easy to use, community-driven Python library for
12-
analysing and visualising meteorological and oceanographic data sets.
12+
<p align="center">
13+
<!-- https://shields.io/ is a good source of these -->
14+
<a href="https://anaconda.org/conda-forge/iris">
15+
<img src="https://img.shields.io/conda/dn/conda-forge/iris.svg"
16+
alt="conda-forge downloads" /></a>
17+
<a href="https://github.com/SciTools/iris/releases">
18+
<img src="https://img.shields.io/github/tag/SciTools/iris.svg"
19+
alt="Latest version" /></a>
20+
<a href="https://github.com/SciTools/iris/commits/master">
21+
<img src="https://img.shields.io/github/commits-since/SciTools/iris/latest.svg"
22+
alt="Commits since last release" /></a>
23+
<a href="https://github.com/SciTools/iris/graphs/contributors">
24+
<img src="https://img.shields.io/github/contributors/SciTools/iris.svg"
25+
alt="# contributors" /></a>
26+
<a href="https://travis-ci.org/SciTools/iris/branches">
27+
<img src="https://api.travis-ci.org/repositories/SciTools/iris.svg?branch=master"
28+
alt="Travis-CI" /></a>
29+
<a href="https://zenodo.org/badge/latestdoi/5312648">
30+
<img src="https://zenodo.org/badge/5312648.svg"
31+
alt="zenodo" /></a>
32+
</p>
33+
<br>
1334

35+
<!-- NOTE: toc auto-generated with https://github.com/frnmst/md-toc:
36+
$ md_toc github README.md -i
37+
-->
1438

15-
Installation
16-
------------
39+
<h1>Table of contents</h1>
1740

18-
Provided all of the dependencies are satisfied, Iris can be installed
19-
using the following command:
41+
[](TOC)
2042

21-
python setup.py install
43+
+ [Overview](#overview)
44+
+ [Documentation](#documentation)
45+
+ [Installation](#installation)
46+
+ [Copyright and licence](#copyright-and-licence)
2247

23-
For more detailed instructions, including details of the dependencies,
24-
please see INSTALL.
48+
[](TOC)
2549

50+
# Overview
2651

27-
What's new
28-
----------
52+
Iris implements a data model based on the [CF conventions](http://cfconventions.org/)
53+
giving you a powerful, format-agnostic, interface for working with your data.
54+
It excels when working with multi-dimensional Earth Science data, where tabular
55+
representations become unwieldy and inefficient.
2956

30-
A discussion of recent changes is given by the
31-
"What's new" document:
57+
[CF Standard names](http://cfconventions.org/standard-names.html),
58+
[units](https://github.com/SciTools/cf_units), and coordinate metadata
59+
are built-in to Iris, giving you a rich and expressive interface for maintaining
60+
an accurate representation of your data. Its first-class treatment of data and
61+
associated metadata, includes:
3262

33-
- http://scitools.org.uk/iris/docs/latest/whatsnew/index.html
63+
* aggregations and reductions (min, max, (area-)weighted mean, etc.)
64+
* interpolation and regridding (nearest-neighbor, linear, area-weighted, etc.)
65+
* operator overloads (``+``, ``-``, ``*``, ``/``, etc.)
66+
* merge and concatenate
67+
* subsetting and extraction
68+
* unit conversion
69+
* a visualisation interface based on [matplotlib](https://matplotlib.org/) and
70+
[cartopy](https://scitools.org.uk/cartopy/docs/latest/)
3471

35-
If you need complete detail, then please refer to the commit history of
36-
the Iris project on GitHub:
72+
A number of file formats are recognised by Iris, including CF-compliant NetCDF, GRIB,
73+
and PP, and it has a plugin architecture to allow other formats to be added seamlessly.
3774

38-
- https://github.com/SciTools/iris
75+
Building upon [numpy](http://www.numpy.org/) and [dask](https://dask.pydata.org/en/latest/),
76+
Iris scales from efficient single-machine workflows right through to multi-core clusters and HPC.
77+
Interoperability with packages from the wider scientific python ecosystem comes from Iris'
78+
use of standard numpy/dask arrays as its underlying data storage.
3979

4080

41-
Documentation
42-
-------------
81+
# Documentation
4382

44-
The full documentation for the current release of Iris, including a user guide, example
45-
code, and gallery, is online at:
46-
- http://scitools.org.uk/iris/
83+
The documentation for Iris is available at <https://scitools.org.uk/iris/docs/latest>,
84+
including a user guide, example code, and gallery.
4785

48-
There is also a documentation build for the latest code in the main GitHub repository at:
49-
- https://scitools-docs.github.io/iris/master/index.html
50-
(also similarly for other branches)
86+
# Installation
5187

88+
The easiest way to install Iris is with [conda](https://conda.io/miniconda.html):
5289

53-
Copyright and licence
54-
---------------------
90+
conda install -c conda-forge iris
5591

56-
(C) British Crown Copyright 2010 - 2018, Met Office
92+
Detailed instructions, including information on installing from source,
93+
are available in [INSTALL](INSTALL).
5794

58-
This file is part of Iris.
5995

60-
Iris is free software: you can redistribute it and/or modify it under
61-
the terms of the GNU Lesser General Public License as published by the
62-
Free Software Foundation, either version 3 of the License, or
63-
(at your option) any later version.
96+
# Copyright and licence
6497

65-
Iris is distributed in the hope that it will be useful,
66-
but WITHOUT ANY WARRANTY; without even the implied warranty of
67-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
68-
GNU Lesser General Public License for more details.
98+
Iris may be freely distributed, modified and used commercially under the terms
99+
of its [GNU LGPLv3 license](COPYING.LESSER).
69100

70-
You should have received a copy of the GNU Lesser General Public License
71-
along with Iris. If not, see <http://www.gnu.org/licenses/>.
72101

102+
(C) British Crown Copyright 2010 - 2018, Met Office

docs/iris/example_code/Meteorology/COP_maps.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ def main():
104104
# Add the first subplot showing the E1 scenario
105105
plt.subplot(121)
106106
plt.title('HadGEM2 E1 Scenario', fontsize=10)
107-
iplt.contourf(delta_e1, levels, colors=colors, linewidth=0,
108-
extend='both')
107+
iplt.contourf(delta_e1, levels, colors=colors, extend='both')
109108
plt.gca().coastlines()
110109
# get the current axes' subplot for use later on
111110
plt1_ax = plt.gca()
@@ -114,7 +113,7 @@ def main():
114113
plt.subplot(122)
115114
plt.title('HadGEM2 A1B-Image Scenario', fontsize=10)
116115
contour_result = iplt.contourf(delta_a1b, levels, colors=colors,
117-
linewidth=0, extend='both')
116+
extend='both')
118117
plt.gca().coastlines()
119118
# get the current axes' subplot for use later on
120119
plt2_ax = plt.gca()
15.3 KB
Loading

0 commit comments

Comments
 (0)