diff --git a/lib/iris/fileformats/rules.py b/lib/iris/fileformats/rules.py index f8e003f9b7..ee1c958dcc 100644 --- a/lib/iris/fileformats/rules.py +++ b/lib/iris/fileformats/rules.py @@ -315,43 +315,6 @@ class Reference(iris.util._OrderedHashable): """ -def calculate_forecast_period(time, forecast_reference_time): - """ - Return the forecast period in hours derived from time and - forecast_reference_time scalar coordinates. - - .. deprecated:: 1.10 - - """ - warn_deprecated("the `iris.fileformats.rules.calculate_forecast_period " - "method is deprecated.") - - if time.points.size != 1: - raise ValueError('Expected a time coordinate with a single ' - 'point. {!r} has {} points.'.format(time.name(), - time.points.size)) - - if not time.has_bounds(): - raise ValueError('Expected a time coordinate with bounds.') - - if forecast_reference_time.points.size != 1: - raise ValueError('Expected a forecast_reference_time coordinate ' - 'with a single point. {!r} has {} ' - 'points.'.format(forecast_reference_time.name(), - forecast_reference_time.points.size)) - - origin = time.units.origin.replace(time.units.origin.split()[0], 'hours') - units = cf_units.Unit(origin, calendar=time.units.calendar) - - # Determine start and eof of period in hours since a common epoch. - end = time.units.convert(time.bounds[0, 1], units) - start = forecast_reference_time.units.convert( - forecast_reference_time.points[0], units) - forecast_period = end - start - - return forecast_period - - class Rule(object): """ A collection of condition expressions and their associated action expressions.