iris.exceptions#

Exceptions specific to the Iris package.

exception iris.exceptions.AncillaryVariableNotFoundError[source]#

Bases: KeyError

Raised when a search yields no ancillary variables.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.CannotAddError[source]#

Bases: ValueError

Raised when an object (e.g. coord) cannot be added to a Cube.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.CellMeasureNotFoundError[source]#

Bases: KeyError

Raised when a search yields no cell measures.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.ConcatenateError(differences)[source]#

Bases: IrisError

Raised when concatenate is expected to produce a single cube, but fails to do so.

Create a ConcatenateError with a list of textual descriptions of differences.

Create a ConcatenateError with a list of textual descriptions of the differences which prevented a concatenate.

Parameters:

differences (list of str) – The list of strings which describe the differences.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.ConnectivityNotFoundError[source]#

Bases: KeyError

Raised when a search yields no connectivities.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.ConstraintMismatchError[source]#

Bases: IrisError

Raised when a constraint operation has failed to find the correct number of results.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.CoordinateCollapseError[source]#

Bases: IrisError

Raised when a requested coordinate cannot be collapsed.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.CoordinateMultiDimError(msg)[source]#

Bases: ValueError

Raised when a routine doesn’t support multi-dimensional coordinates.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.CoordinateNotFoundError[source]#

Bases: KeyError

Raised when a search yields no coordinates.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.CoordinateNotRegularError[source]#

Bases: ValueError

Raised when a coordinate is unexpectedly irregular.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.DuplicateDataError(msg)[source]#

Bases: MergeError

Raised when merging two or more cubes that have identical metadata.

Create a MergeError with a list of textual descriptions of the differences.

Creates a MergeError with a list of textual descriptions of the differences which prevented a merge.

Parameters:

differences (list of str) – The list of strings which describe the differences.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IgnoreCubeException[source]#

Bases: IrisError

Raised from a callback function when a cube should be ignored on load.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.InvalidCubeError[source]#

Bases: IrisError

Raised when a Cube validation check fails.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisCannotAddWarning[source]#

Bases: IrisIgnoringWarning

Warnings where a member object cannot be added to a Cube .

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisCfInvalidCoordParamWarning[source]#

Bases: IrisCfLoadWarning

Warnings where incorrect information for CF coord construction is in a file.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisCfLabelVarWarning[source]#

Bases: IrisCfLoadWarning, IrisIgnoringWarning

Warnings where a CF string/label variable is being used inappropriately.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisCfLoadWarning[source]#

Bases: IrisCfWarning, IrisLoadWarning

Any warning relating to both loading and CF Conventions .

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisCfMissingVarWarning[source]#

Bases: IrisCfLoadWarning

Warnings where a CF variable references another variable that is not in the file.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisCfNonSpanningVarWarning[source]#

Bases: IrisCfLoadWarning, IrisIgnoringWarning

Warnings where a CF variable is ignored because it does not span the required dimension.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisCfSaveWarning[source]#

Bases: IrisCfWarning, IrisSaveWarning

Any warning relating to both saving and CF Conventions .

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisCfWarning[source]#

Bases: IrisUserWarning

Any warning relating to CF Conventions .

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisDefaultingWarning[source]#

Bases: IrisUserWarning

Any warning that involves Iris changing invalid/missing information.

E.g. creating a AuxCoord from an invalid DimCoord definition.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisError[source]#

Bases: Exception

Base class for errors in the Iris package.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisFactoryCoordNotFoundWarning[source]#

Bases: IrisLoadWarning

Warnings where a referenced factory coord can not be found when loading a variable in NetCDF Format.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisGeometryExceedWarning[source]#

Bases: IrisUserWarning

iris.analysis.geometry warnings about geometry exceeding dimensions.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisGuessBoundsWarning[source]#

Bases: IrisDefaultingWarning

Warnings where Iris has filled absent bounds information with a best estimate.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisIgnoringBoundsWarning[source]#

Bases: IrisIgnoringWarning

Warnings where bounds information has not been used by an Iris operation.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisIgnoringWarning[source]#

Bases: IrisUserWarning

Any warning that involves an Iris operation not using some information.

E.g. AuxCoordFactory generation disregarding bounds.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisImpossibleUpdateWarning[source]#

Bases: IrisUserWarning

Warnings where it is not possible to update an object.

Mainly generated during regridding where the necessary information for updating an AuxCoordFactory is no longer present.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisLoadWarning[source]#

Bases: IrisUserWarning

Any warning relating to loading.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisMaskValueMatchWarning[source]#

Bases: IrisUserWarning

Warnings where the value representing masked data is actually present in data.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisNimrodTranslationWarning[source]#

Bases: IrisLoadWarning

For unsupported vertical coord types in iris.file_formats.nimrod_load_rules.

(Pre-dates the full categorisation of Iris UserWarnings).

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisPpClimModifiedWarning[source]#

Bases: IrisSaveWarning, IrisDefaultingWarning

Warnings where a climatology has been modified while saving Post Processing (PP) Format .

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisSaveWarning[source]#

Bases: IrisUserWarning

Any warning relating to saving.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisSaverFillValueWarning[source]#

Bases: IrisMaskValueMatchWarning, IrisSaveWarning

For fill value complications during Iris file saving NetCDF Format.

(Pre-dates the full categorisation of Iris UserWarnings).

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisUnknownCellMethodWarning[source]#

Bases: IrisCfLoadWarning

If a loaded CellMethod is not one the method names known to Iris.

(Pre-dates the full categorisation of Iris UserWarnings).

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisUnsupportedPlottingWarning[source]#

Bases: IrisUserWarning

Warnings where support for a plotting module/function is not guaranteed.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisUserWarning[source]#

Bases: UserWarning

Base class for UserWarning generated by Iris.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.IrisVagueMetadataWarning[source]#

Bases: IrisUserWarning

Warnings where object metadata may not be fully descriptive.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.LazyAggregatorError[source]#

Bases: Exception

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.MergeError(differences)[source]#

Bases: IrisError

Raised when merge is expected to produce a single cube, but fails to do so.

Create a MergeError with a list of textual descriptions of the differences.

Creates a MergeError with a list of textual descriptions of the differences which prevented a merge.

Parameters:

differences (list of str) – The list of strings which describe the differences.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.NotYetImplementedError[source]#

Bases: IrisError

Raised by missing functionality.

Different meaning to NotImplementedError, which is for abstract methods.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.TranslationError[source]#

Bases: IrisError

Raised when Iris is unable to translate format-specific codes.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception iris.exceptions.UnitConversionError[source]#

Bases: IrisError

Raised when Iris is unable to convert a unit.

add_note()#

Exception.add_note(note) – add a note to the exception

args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.