Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 1 addition & 11 deletions lib/iris/analysis/calculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)

Expand Down Expand Up @@ -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 = \
Expand Down
21 changes: 5 additions & 16 deletions lib/iris/analysis/maths.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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`

Expand All @@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that you've removed this usage of warn_deprecated you'll also need to remove the import on L34.


bad_coord_grps = (coord_comp['ungroupable_and_dimensioned'] +
coord_comp['resamplable'])
if bad_coord_grps:
Expand Down
9 changes: 4 additions & 5 deletions lib/iris/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down