diff --git a/lib/iris/analysis/calculus.py b/lib/iris/analysis/calculus.py index 8d7d35d9c4..f1022187f8 100644 --- a/lib/iris/analysis/calculus.py +++ b/lib/iris/analysis/calculus.py @@ -443,7 +443,7 @@ def _trig_method(coord, trig_function): return trig_coord -def curl(i_cube, j_cube, k_cube=None, ignore=None): +def curl(i_cube, j_cube, k_cube=None): r""" Calculate the 2-dimensional or 3-dimensional spherical or cartesian curl of the given vector of cubes. @@ -463,11 +463,6 @@ def curl(i_cube, j_cube, k_cube=None, ignore=None): * k_cube The k cube of the vector to operate on - * ignore - This argument is not used. - - .. deprecated:: 0.8 - The coordinates to ignore are determined automatically. Return (i_cmpt_curl_cube, j_cmpt_curl_cube, k_cmpt_curl_cube) @@ -525,11 +520,6 @@ def curl(i_cube, j_cube, k_cube=None, ignore=None): where phi is longitude, theta is latitude. """ - if ignore is not None: - ignore = None - warn_deprecated('The ignore keyword to iris.analysis.calculus.curl ' - 'is deprecated, ignoring is now done automatically.') - # Get the vector quantity names. # (i.e. ['easterly', 'northerly', 'vertical']) vector_quantity_names, phenomenon_name = \ diff --git a/lib/iris/analysis/maths.py b/lib/iris/analysis/maths.py index f0c35e1235..abd6e3a633 100644 --- a/lib/iris/analysis/maths.py +++ b/lib/iris/analysis/maths.py @@ -31,7 +31,6 @@ import numpy as np from numpy import ma -from iris._deprecation import warn_deprecated import iris.analysis import iris.coords import iris.cube @@ -225,7 +224,7 @@ def _assert_matching_units(cube, other, operation_name): raise iris.exceptions.NotYetImplementedError(msg) -def add(cube, other, dim=None, ignore=True, in_place=False): +def add(cube, other, dim=None, in_place=False): """ Calculate the sum of two cubes, or the sum of a cube and a coordinate or scalar value. @@ -265,10 +264,10 @@ def add(cube, other, dim=None, ignore=True, in_place=False): else: op = operator.add return _add_subtract_common(op, 'add', cube, other, new_dtype, dim=dim, - ignore=ignore, in_place=in_place) + in_place=in_place) -def subtract(cube, other, dim=None, ignore=True, in_place=False): +def subtract(cube, other, dim=None, in_place=False): """ Calculate the difference between two cubes, or the difference between a cube and a coordinate or scalar value. @@ -308,11 +307,11 @@ def subtract(cube, other, dim=None, ignore=True, in_place=False): else: op = operator.sub return _add_subtract_common(op, 'subtract', cube, other, new_dtype, - dim=dim, ignore=ignore, in_place=in_place) + dim=dim, in_place=in_place) def _add_subtract_common(operation_function, operation_name, cube, other, - new_dtype, dim=None, ignore=True, in_place=False): + new_dtype, dim=None, in_place=False): """ Function which shares common code between addition and subtraction of cubes. @@ -328,8 +327,6 @@ def _add_subtract_common(operation_function, operation_name, cube, other, case of scalar masked arrays dim - dimension along which to apply `other` if it's a coordinate that is not found in `cube` - ignore - The value of this argument is ignored. - .. deprecated:: 0.8 in_place - whether or not to apply the operation in place to `cube` and `cube.data` @@ -342,14 +339,6 @@ def _add_subtract_common(operation_function, operation_name, cube, other, # operation with coord_comp = iris.analysis.coord_comparison(cube, other) - # provide a deprecation warning if the ignore keyword has been set - if ignore is not True: - msg = ('The "ignore" keyword has been deprecated in ' - 'add/subtract. This functionality is now automatic. ' - 'The provided value to "ignore" has been ignored, ' - 'and has been automatically calculated.') - warn_deprecated(msg) - bad_coord_grps = (coord_comp['ungroupable_and_dimensioned'] + coord_comp['resamplable']) if bad_coord_grps: diff --git a/lib/iris/cube.py b/lib/iris/cube.py index efa8d4a34d..67c6aa8fa6 100644 --- a/lib/iris/cube.py +++ b/lib/iris/cube.py @@ -3078,19 +3078,18 @@ def __hash__(self): return hash(id(self)) def __add__(self, other): - return iris.analysis.maths.add(self, other, ignore=True) + return iris.analysis.maths.add(self, other) def __iadd__(self, other): - return iris.analysis.maths.add(self, other, ignore=True, in_place=True) + return iris.analysis.maths.add(self, other, in_place=True) __radd__ = __add__ def __sub__(self, other): - return iris.analysis.maths.subtract(self, other, ignore=True) + return iris.analysis.maths.subtract(self, other) def __isub__(self, other): - return iris.analysis.maths.subtract(self, other, - ignore=True, in_place=True) + return iris.analysis.maths.subtract(self, other, in_place=True) __mul__ = iris.analysis.maths.multiply __rmul__ = iris.analysis.maths.multiply