Skip to content

Commit e45acf7

Browse files
lbdreyerbjlittle
authored andcommitted
Bring iris_grib back into iris.
1 parent 33d6498 commit e45acf7

File tree

62 files changed

+2216
-2400
lines changed

Some content is hidden

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

62 files changed

+2216
-2400
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ install:
5252
conda install --quiet --file minimal-conda-requirements.txt;
5353
else
5454
if [[ "$TRAVIS_PYTHON_VERSION" == 3* ]]; then
55-
sed -e '/ecmwf_grib/d' -e '/esmpy/d' -e '/iris-grib/d' -e 's/#.\+$//' conda-requirements.txt | xargs conda install --quiet;
55+
sed -e '/ecmwf_grib/d' -e '/esmpy/d' -e 's/#.\+$//' conda-requirements.txt | xargs conda install --quiet;
5656
else
5757
conda install --quiet --file conda-requirements.txt;
5858
fi

INSTALL

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@ grib-api 1.9.16 or later
128128
edition 2 messages. A compression library such as Jasper is required
129129
to read JPEG2000 compressed GRIB2 files.
130130

131-
iris-grib 0.9 or later
132-
(https://github.com/scitools/iris-grib)
133-
Iris interface to ECMWF's GRIB API
134-
135131
matplotlib 1.2.0 (http://matplotlib.sourceforge.net/)
136132
Python package for 2D plotting.
137133

conda-requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ imagehash
2626
requests
2727

2828
# Optional iris dependencies
29-
nc_time_axis
30-
iris-grib
29+
ecmwf_grib
3130
esmpy>=7.0
3231
gdal
3332
libmo_unpack
34-
pandas
35-
pyugrid
3633
mo_pack
34+
nc_time_axis
35+
pandas
3736
python-stratify
37+
pyugrid

docs/iris/src/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@
159159
'matplotlib': ('http://matplotlib.org/', None),
160160
'cartopy': ('http://scitools.org.uk/cartopy/docs/latest/', None),
161161
'biggus': ('https://biggus.readthedocs.io/en/latest/', None),
162-
'iris-grib': ('http://iris-grib.readthedocs.io/en/latest/', None),
163162
}
164163

165164

lib/iris/__init__.py

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ class Future(threading.local):
144144
"""Run-time configuration controller."""
145145

146146
def __init__(self, cell_datetime_objects=False, netcdf_promote=False,
147-
strict_grib_load=False, netcdf_no_unlimited=False,
148-
clip_latitudes=False):
147+
netcdf_no_unlimited=False, clip_latitudes=False):
149148
"""
150149
A container for run-time options controls.
151150
@@ -177,20 +176,6 @@ def __init__(self, cell_datetime_objects=False, netcdf_promote=False,
177176
will expose variables which define reference surfaces for
178177
dimensionless vertical coordinates as independent Cubes.
179178
180-
The option `strict_grib_load` controls whether GRIB files are
181-
loaded as Cubes using a new template-based conversion process.
182-
This new conversion process will raise an exception when it
183-
encounters a GRIB message which uses a template not supported
184-
by the conversion.
185-
186-
.. note::
187-
.. deprecated:: 1.10
188-
The 'strict_grib_load' option is now deprecated, as it affects
189-
only the internal grib module :mod:`iris.fileformats.grib`,
190-
which is now itself deprecated in favour of 'iris_grib'.
191-
Please remove code which sets this, and instead install the
192-
'iris_grib' package : <https://github.com/SciTools/iris-grib>.
193-
194179
The option `netcdf_no_unlimited`, when True, changes the
195180
behaviour of the netCDF saver, such that no dimensions are set to
196181
unlimited. The current default is that the leading dimension is
@@ -203,29 +188,16 @@ def __init__(self, cell_datetime_objects=False, netcdf_promote=False,
203188
"""
204189
self.__dict__['cell_datetime_objects'] = cell_datetime_objects
205190
self.__dict__['netcdf_promote'] = netcdf_promote
206-
self.__dict__['strict_grib_load'] = strict_grib_load
207191
self.__dict__['netcdf_no_unlimited'] = netcdf_no_unlimited
208192
self.__dict__['clip_latitudes'] = clip_latitudes
209193

210194
def __repr__(self):
211195
msg = ('Future(cell_datetime_objects={}, netcdf_promote={}, '
212-
'strict_grib_load={}, netcdf_no_unlimited={}, '
213-
'clip_latitudes={})')
196+
'netcdf_no_unlimited={}, clip_latitudes={})')
214197
return msg.format(self.cell_datetime_objects, self.netcdf_promote,
215-
self.strict_grib_load, self.netcdf_no_unlimited,
216-
self.clip_latitudes)
217-
218-
deprecated_options = {
219-
'strict_grib_load': ('This is because "iris.fileformats.grib" is now '
220-
'deprecated : Please install the "iris_grib" '
221-
'package instead.')}
198+
self.netcdf_no_unlimited, self.clip_latitudes)
222199

223200
def __setattr__(self, name, value):
224-
if name in self.deprecated_options:
225-
reason = self.deprecated_options[name]
226-
msg = ("the 'Future' object property {!r} is now deprecated. "
227-
"Please remove code which uses this. {}")
228-
warn_deprecated(msg.format(name, reason))
229201
if name not in self.__dict__:
230202
msg = "'Future' object has no attribute {!r}".format(name)
231203
raise AttributeError(msg)

lib/iris/fileformats/__init__.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# (C) British Crown Copyright 2010 - 2016, Met Office
1+
# (C) British Crown Copyright 2010 - 2017, Met Office
22
#
33
# This file is part of Iris.
44
#
@@ -28,12 +28,9 @@
2828
from . import abf
2929
from . import um
3030
try:
31-
import iris_grib as igrib
31+
from . import grib as igrib
3232
except ImportError:
33-
try:
34-
from . import grib as igrib
35-
except ImportError:
36-
igrib = None
33+
igrib = None
3734

3835
from . import name
3936
from . import netcdf

0 commit comments

Comments
 (0)