Exceptions

exception ocgis.exc.AllElementsMaskedError(message=None)[source]

Bases: ocgis.exc.OcgException

Raised when all elements are masked.

exception ocgis.exc.BoundsAlreadyAvailableError(message=None)[source]

Bases: ocgis.exc.OcgException

Raised when an attempt is made to extrapolate bounds and they are already present.

exception ocgis.exc.CFException(message=None)[source]

Bases: ocgis.exc.OcgException

exception ocgis.exc.CRSDepthNotImplemented(depth)[source]

Bases: ocgis.exc.CFException

Raised when a CRS depth check is not supported.

exception ocgis.exc.CRSNotEquivalenError(lhs, rhs)[source]

Bases: ocgis.exc.OcgException

Raised when coordinate systems are not equivalent (not compatible for transform).

exception ocgis.exc.CalculationException(function_klass, message=None)[source]

Bases: ocgis.exc.OcgException

exception ocgis.exc.CannotFormatTimeError(property_name)[source]

Bases: ocgis.exc.OcgException

Raised when datetime objects from numeric are blocked by “format_time”.

exception ocgis.exc.CornersInconsistentError(message=None)[source]

Bases: ocgis.exc.RegriddingError

Raised when corners are not available on all sources and/or destination fields.

exception ocgis.exc.DefinitionValidationError(ocg_argument, msg)[source]

Bases: ocgis.exc.OcgException

Raised when validation fails on OcgOperations.

Parameters:
  • ocg_argument (ocgis.driver.definition.AbstractParameter, str) – The origin of the exception.
  • msg (str) – The message related to the exception to display in the exception’s template.
exception ocgis.exc.DimensionMapError(entry_key, message)[source]

Bases: ocgis.exc.OcgException

Raised when there is an issue with a dimension map entry.

exception ocgis.exc.DimensionMismatchError(dim_name, vc_name, message=None)[source]

Bases: ocgis.exc.OcgException

Raised when a variable’s dimensions do not match those in the existing collection.

exception ocgis.exc.DimensionNotFound(name)[source]

Bases: ocgis.exc.CFException

exception ocgis.exc.DimensionsRequiredError(message=None)[source]

Bases: ocgis.exc.OcgException

Raised when a variable requires dimensions.

exception ocgis.exc.DummyDimensionEncountered(message=None)[source]

Bases: ocgis.exc.OcgException

exception ocgis.exc.EmptyData(message=None, origin=None)[source]

Bases: ocgis.exc.SubsetException

exception ocgis.exc.EmptyDataNotAllowed[source]

Bases: ocgis.exc.SubsetException

Raised when the empty set for a geometry is returned and allow_empty is False.

exception ocgis.exc.EmptyIterationError(obj)[source]

Bases: ocgis.exc.OcgException

exception ocgis.exc.EmptyObjectError(message=None)[source]

Bases: ocgis.exc.OcgException

Raised when an empty object is not allowed.

exception ocgis.exc.EmptySubsetError(origin=None)[source]

Bases: ocgis.exc.SubsetException

exception ocgis.exc.ExtentError(message=None)[source]

Bases: ocgis.exc.SubsetException

exception ocgis.exc.GridDeficientError(message=None)[source]

Bases: ocgis.exc.OcgException

Raised when a grid is missing parameters necessary to create a geometry array.

exception ocgis.exc.IncompleteSeasonError(season, year=None, month=None)[source]

Bases: ocgis.exc.OcgException

exception ocgis.exc.InterpreterException(message=None)[source]

Bases: ocgis.exc.OcgException

exception ocgis.exc.InterpreterNotRecognized(message=None)[source]

Bases: ocgis.exc.InterpreterException

exception ocgis.exc.MaskedDataError[source]

Bases: ocgis.exc.SubsetException

exception ocgis.exc.MaskedDataFound(message=None)[source]

Bases: ocgis.exc.OcgException

Raised when data is masked.

exception ocgis.exc.MultipleElementsFound(sdim)[source]

Bases: ocgis.exc.OcgException

Raised when multiple elements are encountered in a ocgis.interface.base.dimension.spatial.SpatialDimension object.

Parameters:sdim (ocgis.interface.base.dimension.spatial.SpatialDimension) – The incoming spatial dimension object.
exception ocgis.exc.NoDataVariablesFound[source]

Bases: ocgis.exc.RequestValidationError

Raised when no data variables are found in the target dataset.

exception ocgis.exc.NoInteriorsError(message=None)[source]

Bases: ocgis.exc.OcgException

exception ocgis.exc.NoUnitsError(variable, message=None)[source]

Bases: ocgis.exc.OcgException

Raised when a cfunits.Units object is constructed from None.

exception ocgis.exc.OcgDistError(message=None)[source]

Bases: ocgis.exc.OcgException

Raised for MPI-related exceptions.

exception ocgis.exc.OcgException(message=None)[source]

Bases: exceptions.Exception

Base class for all OCGIS exceptions.

exception ocgis.exc.OcgWarning[source]

Bases: exceptions.Warning

Base class for all OCGIS warnings.

exception ocgis.exc.OcgisEnvironmentError(env_parm, msg)[source]

Bases: ocgis.exc.OcgException

exception ocgis.exc.ParameterFormattingError(message=None)[source]

Bases: ocgis.exc.OcgException

exception ocgis.exc.PayloadProtectedError(name)[source]

Bases: ocgis.exc.OcgException

exception ocgis.exc.ProjectionCoordinateNotFound(target)[source]

Bases: ocgis.exc.CFException

exception ocgis.exc.ProjectionDoesNotMatch(message=None)[source]

Bases: ocgis.exc.CFException

exception ocgis.exc.RegriddingError(message=None)[source]

Bases: ocgis.exc.OcgException

Raised for exceptions related to ESMPy-enabled regridding.

exception ocgis.exc.RequestValidationError(keyword, message)[source]

Bases: ocgis.exc.OcgException

Raised when validation fails on a parameter when creating a RequestDataset object.

exception ocgis.exc.RequestableFeature(message=None)[source]

Bases: ocgis.exc.OcgException

Raised when a feature is not implemented but could be provided there is a use case available.

exception ocgis.exc.ResolutionError(message=None)[source]

Bases: ocgis.exc.OcgException

exception ocgis.exc.SampleSizeNotImplemented(function_klass, message=None)[source]

Bases: ocgis.exc.CalculationException

exception ocgis.exc.ShapeError(message=None)[source]

Bases: ocgis.exc.OcgException

Raised when an array has an incompatible shape with an operation.

exception ocgis.exc.SingleElementError(message=None)[source]

Bases: ocgis.exc.ShapeError

Raised when an operation requires more than a single element.

exception ocgis.exc.SpatialWrappingError(message=None)[source]

Bases: ocgis.exc.OcgException

Raised for errors related to wrapping or unwrapping a geographic coordinate system.

exception ocgis.exc.SubcommAlreadyCreatedError(name)[source]

Bases: ocgis.exc.OcgDistError

Raised when a subcommunicator name already exists.

exception ocgis.exc.SubcommNotFoundError(name)[source]

Bases: ocgis.exc.OcgDistError

Raised when a subcommunicator is not found.

exception ocgis.exc.SubsetException(message=None)[source]

Bases: ocgis.exc.OcgException

Base class for all subset exceptions.

exception ocgis.exc.TemporalExtentError[source]

Bases: ocgis.exc.SubsetException

exception ocgis.exc.UniqueIdNotFound[source]

Bases: ocgis.exc.OcgException

exception ocgis.exc.UnitsValidationError(variable, required_units, calculation_key)[source]

Bases: ocgis.exc.OcgException

Raised when units validation fails.

exception ocgis.exc.VariableInCollectionError(variable_or_name)[source]

Bases: ocgis.exc.OcgException

exception ocgis.exc.VariableMissingMetadataError(variable_name)[source]

Bases: ocgis.exc.OcgException

Raised when variable metadata cannot be found.

exception ocgis.exc.VariableNotFoundError(uri, variable)[source]

Bases: ocgis.exc.OcgException

Raised when a variable name is not found in the target dataset.

exception ocgis.exc.VariableNotInCollection(variable_name)[source]

Bases: ocgis.exc.OcgException

Raised when a variable is not present in a collection.

exception ocgis.exc.VariableShapeMismatch(variable, collection_shape)[source]

Bases: ocgis.exc.OcgException

exception ocgis.exc.WrappedStateEvalTargetMissing[source]

Bases: ocgis.exc.OcgException

Raised when attempting to retrieve the wrapped state of a field and no evaluation target is available.