Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c9c40c5
Fast percentile method in Iris V2. (#2687)
bayliffe Aug 31, 2017
1062c66
Remove deprecated ignore args (#2690)
lbdreyer Oct 9, 2017
a157173
Remove deprecated module fileformats/ff.py (#2693)
DPeterK Oct 9, 2017
d442b4d
Bump travis python version 3.5 to 3.6 (#2774)
djkirkham Oct 9, 2017
b192fd8
Remove deprecated modules: iris.unit, iris.proxy and iris.fileformats…
lbdreyer Oct 10, 2017
4a1bb84
Removed deprecated calculate_forecast_period (#2777)
corinnebosley Oct 10, 2017
b3f9fc7
Remove pp deprecations (#2688)
lbdreyer Oct 10, 2017
8f36d8f
Correct STASH regular expression (#2638)
ehogan Oct 11, 2017
1a5bf03
Removed deprecated kwarg 'legacy_custom_rules' from 'iris.fileformats…
corinnebosley Oct 11, 2017
6154b2c
Remove deprecated module interpolate.py (#2783)
DPeterK Oct 11, 2017
aac2840
Remove Cube module deprecations (#2695)
DPeterK Oct 11, 2017
b66d01d
Remove deprecated rule logging
DPeterK Jul 26, 2017
b5c4872
Removed rule log from pp.save_pairs_from_cube.
Oct 11, 2017
cebfc58
Deleted test_verbose_fileformat_rules_logging.py
Oct 11, 2017
97351a7
Remove BitwiseInt class and tests thereof (#2776)
DPeterK Oct 11, 2017
27d833e
Remove references to SAMPLE_DATA_DIR (#2787)
djkirkham Oct 12, 2017
1dc84f3
Instructions on animate.py written more explicitly.
LukeC92 Aug 7, 2017
f7e103b
Merge pull request #2786 from LukeC92/remove_rule_logging
pelson Oct 13, 2017
a53a40f
Remove iris.experimental.fieldsfiles module (#2640)
lbdreyer Oct 13, 2017
bddf20f
Test to demonstrate failure
hdyson Oct 13, 2017
06e61e2
...and corresponding fix
hdyson Oct 13, 2017
85ae7e7
Removed CMCustomAttribute and an elif which depends on it. (#2794)
Oct 16, 2017
bf07ee0
Remove debug string (#2796)
Oct 16, 2017
6fc0fa2
Remove deprecated function `nearest_neighbour_data_value` (#2799)
DPeterK Oct 16, 2017
94e2b15
Merge pull request #2792 from hdyson/df_shared_data_fix
pelson Oct 16, 2017
1b69a30
Merge pull request #2731 from LukeC92/iris_animate_docs
pelson Oct 16, 2017
538f0d6
Translate text PP save rules into Python (#2795)
DPeterK Oct 16, 2017
9f73e45
Remove Linear1dExtrapolator class (#2802)
DPeterK Oct 16, 2017
81468ec
Removed class iris.fileformats.rules.CoordAndDims (#2791)
Oct 17, 2017
3ab3b93
Move trajectory dependency functions out of deprecated module (#2804)
DPeterK Oct 17, 2017
347752b
broke some rules (#2782)
corinnebosley Oct 17, 2017
7f4e6a9
Remove deprecated function analysis.linear (#2801)
DPeterK Oct 17, 2017
4fe35f5
Remove analysis.regrid and extract_nearest_nbr (#2803)
DPeterK Oct 17, 2017
b9e137f
Finally remove deprecated interpolation modules (#2807)
DPeterK Oct 17, 2017
447bc3a
Check DimCoord poins and bounds before setting (#2630)
djkirkham Oct 17, 2017
39647ce
Rename pp_rules to pp_load_rules (#2790)
DPeterK Oct 18, 2017
8c6bb4d
removed CMAttribute and very old text file (#2806)
corinnebosley Oct 18, 2017
7ac1948
Merge remote-tracking branch 'upstream/master' into dask_maskarray_me…
pp-mo Oct 18, 2017
0b89085
Fix bmdi handling in pp_save_rules according to #2748
pp-mo Oct 18, 2017
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
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ install:
fi

# prepare iris build directory
- python setup.py --with-unpack build_ext --include-dirs=${PREFIX}/include --library-dirs=${PREFIX}/lib
- if [[ $TEST_TARGET -ne 'coding' ]]; then
IRIS=$(ls -d1 build/lib*/iris);
mkdir $IRIS/etc;
Expand All @@ -107,8 +106,8 @@ install:
fi

# iris
- python setup.py --quiet --with-unpack build
- python setup.py --quiet --with-unpack install
- python setup.py --quiet build
- python setup.py --quiet install

script:
- if [[ $TEST_TARGET == 'default' ]]; then
Expand Down
2 changes: 1 addition & 1 deletion docs/iris/src/userguide/saving_iris_cubes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ For example, a GRIB2 message with a particular known long_name may need to be sa
Similarly a PP field may need to be written out with a specific value for LBEXP. This can be achieved by::

def tweaked_fields(cube):
for cube, field in iris.fileformats.pp.as_pairs(cube):
for cube, field in iris.fileformats.pp.save_pairs_from_cube(cube):
# post process the PP field, prior to saving
if cube.name() == 'air_pressure':
field.lbexp = 'meaxp'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
`iris.fileformats.pp_rules` has been renamed to `iris.fileformats.pp_load_rules`.
This has been done for the sake of clarity following the introduction of `iris.fileformats.pp_save_rules`.
7 changes: 2 additions & 5 deletions lib/iris/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,11 +454,8 @@ def sample_data_path(*path_to_join):
if iris_sample_data is not None:
target = os.path.join(iris_sample_data.path, target)
else:
wmsg = ("iris.config.SAMPLE_DATA_DIR was deprecated in v1.10.0 and "
"will be removed in a future Iris release. Install the "
"'iris_sample_data' package.")
warn_deprecated(wmsg)
target = os.path.join(iris.config.SAMPLE_DATA_DIR, target)
raise ImportError("Please install the 'iris_sample_data' package to "
"access sample data.")
if not glob.glob(target):
raise ValueError('Sample data file(s) at {!r} not found.\n'
'NB. This function is only for locating files in the '
Expand Down
28 changes: 20 additions & 8 deletions lib/iris/analysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,8 @@ def post_process(self, collapsed_cube, data_result, coords, **kwargs):
return result


def _percentile(data, axis, percent, **kwargs):
def _percentile(data, axis, percent, fast_percentile_method=False,
**kwargs):
"""
The percentile aggregator is an additive operation. This means that
it *may* introduce a new dimension to the data for the statistic being
Expand All @@ -1024,18 +1025,34 @@ def _percentile(data, axis, percent, **kwargs):
If a new additive dimension is formed, then it will always be the last
dimension of the resulting percentile data payload.

Kwargs:

* fast_percentile_method (boolean) :
When set to True, uses the numpy.percentiles method as a faster
alternative to the scipy.mstats.mquantiles method. Does not handle
masked arrays.

"""
# Ensure that the target axis is the last dimension.
data = np.rollaxis(data, axis, start=data.ndim)
quantiles = np.array(percent) / 100.
shape = data.shape[:-1]
# Flatten any leading dimensions.
if shape:
data = data.reshape([np.prod(shape), data.shape[-1]])
# Perform the percentile calculation.
result = scipy.stats.mstats.mquantiles(data, quantiles, axis=-1, **kwargs)
if fast_percentile_method:
msg = 'Cannot use fast np.percentile method with masked array.'
if ma.isMaskedArray(data):
raise TypeError(msg)
result = np.percentile(data, percent, axis=-1)
result = result.T
else:
quantiles = np.array(percent) / 100.
result = scipy.stats.mstats.mquantiles(data, quantiles, axis=-1,
**kwargs)
if not ma.isMaskedArray(data) and not ma.is_masked(result):
result = np.asarray(result)

# Ensure to unflatten any leading dimensions.
if shape:
if not isinstance(percent, collections.Iterable):
Expand Down Expand Up @@ -2477,8 +2494,3 @@ def regridder(self, src_cube, target_grid):
from iris.analysis.trajectory import \
UnstructuredNearestNeigbourRegridder
return UnstructuredNearestNeigbourRegridder(src_cube, target_grid)


# Import "iris.analysis.interpolate" to replicate older automatic imports.
# NOTE: do this at end, as otherwise its import of 'Linear' will fail.
from . import _interpolate_backdoor as interpolate
139 changes: 0 additions & 139 deletions lib/iris/analysis/_interpolate_backdoor.py

This file was deleted.

Loading