iris.aux_factory#
Definitions of derived coordinates.
- class iris.aux_factory.AtmosphereSigmaFactory(pressure_at_top=None, sigma=None, surface_air_pressure=None)[source]#
Bases:
AuxCoordFactory
Define an atmosphere sigma coordinate factory with the following formula.
\[p = ptop + sigma * (ps - ptop)\]Create an atmosphere sigma coordinate factory with a formula.
\[p(n, k, j, i) = pressure_at_top + sigma(k) * (surface_air_pressure(n, j, i) - pressure_at_top)\]- property attributes#
- property climatological#
Return False, as a factory itself can never have points/bounds.
Always returns False, as a factory itself can never have points/bounds and therefore can never be climatological by definition.
- property coord_system#
The coordinate-system (if any) of the coordinate made by the factory.
- property dependencies#
Return dependencies.
- derived_dims(coord_dims_func)#
Return the cube dimensions for the derived coordinate.
- Parameters:
coord_dims_func – A callable which can return the list of dimensions relevant to a given coordinate. See
iris.cube.Cube.coord_dims()
.- Return type:
A sorted list of cube dimension numbers.
- property long_name#
The CF Metadata long name for the object.
- make_coord(coord_dims_func)[source]#
Return a new
iris.coords.AuxCoord
as defined by this factory.- Parameters:
coord_dims_func –
A callable which can return the list of dimensions relevant to a given coordinate.
- property metadata#
- name(default=None, token=False)#
Return a string name representing the identity of the metadata.
First it tries standard name, then it tries the long name, then the NetCDF variable name, before falling-back to a default value, which itself defaults to the string ‘unknown’.
- Parameters:
default (optional) – The fall-back string representing the default name. Defaults to the string ‘unknown’.
token (bool, default=False) – If True, ensures that the name returned satisfies the criteria for the characters required by a valid NetCDF name. If it is not possible to return a valid name, then a ValueError exception is raised. Defaults to False.
- Return type:
- rename(name)#
Change the human-readable name.
If ‘name’ is a valid standard name it will assign it to
standard_name
, otherwise it will assign it tolong_name
.
- property standard_name#
The CF Metadata standard name for the object.
- property units#
The S.I. unit of the object.
- update(old_coord, new_coord=None)#
Notify the factory of the removal/replacement of a coordinate.
Notify the factory of the removal/replacement of a coordinate which might be a dependency.
- Parameters:
old_coord – The coordinate to be removed/replaced.
new_coord (optional) – If None, any dependency using old_coord is removed, otherwise any dependency using old_coord is updated to use new_coord.
- updated(new_coord_mapping)#
Create a new instance of this factory.
Create a new instance of this factory where the dependencies are replaced according to the given mapping.
- Parameters:
new_coord_mapping – A dictionary mapping from the object IDs potentially used by this factory, to the coordinate objects that should be used instead.
- property var_name#
The NetCDF variable name for the object.
- xml_element(doc)#
Return a DOM element describing this coordinate factory.
- class iris.aux_factory.AuxCoordFactory[source]#
Bases:
CFVariableMixin
Represents a “factory” which can manufacture additional auxiliary coordinate.
Represents a “factory” which can manufacture an additional auxiliary coordinate on demand, by combining the values of other coordinates.
Each concrete subclass represents a specific formula for deriving values from other coordinates.
The standard_name, long_name, var_name, units, attributes and coord_system of the factory are used to set the corresponding properties of the resulting auxiliary coordinates.
- property attributes#
- property climatological#
Return False, as a factory itself can never have points/bounds.
Always returns False, as a factory itself can never have points/bounds and therefore can never be climatological by definition.
- property coord_system#
The coordinate-system (if any) of the coordinate made by the factory.
- abstract property dependencies#
Return a dict mapping from constructor argument.
Return a dictionary mapping from constructor argument names to the corresponding coordinates.
- derived_dims(coord_dims_func)[source]#
Return the cube dimensions for the derived coordinate.
- Parameters:
coord_dims_func – A callable which can return the list of dimensions relevant to a given coordinate. See
iris.cube.Cube.coord_dims()
.- Return type:
A sorted list of cube dimension numbers.
- property long_name#
Descriptive name of the coordinate made by the factory
- abstract make_coord(coord_dims_func)[source]#
Return a new
iris.coords.AuxCoord
as defined by this factory.- Parameters:
coord_dims_func –
A callable which can return the list of dimensions relevant to a given coordinate.
- property metadata#
- name(default=None, token=False)#
Return a string name representing the identity of the metadata.
First it tries standard name, then it tries the long name, then the NetCDF variable name, before falling-back to a default value, which itself defaults to the string ‘unknown’.
- Parameters:
default (optional) – The fall-back string representing the default name. Defaults to the string ‘unknown’.
token (bool, default=False) – If True, ensures that the name returned satisfies the criteria for the characters required by a valid NetCDF name. If it is not possible to return a valid name, then a ValueError exception is raised. Defaults to False.
- Return type:
- rename(name)#
Change the human-readable name.
If ‘name’ is a valid standard name it will assign it to
standard_name
, otherwise it will assign it tolong_name
.
- property standard_name#
The CF Metadata standard name for the object.
- property units#
The S.I. unit of the object.
- update(old_coord, new_coord=None)[source]#
Notify the factory of the removal/replacement of a coordinate.
Notify the factory of the removal/replacement of a coordinate which might be a dependency.
- Parameters:
old_coord – The coordinate to be removed/replaced.
new_coord (optional) – If None, any dependency using old_coord is removed, otherwise any dependency using old_coord is updated to use new_coord.
- updated(new_coord_mapping)[source]#
Create a new instance of this factory.
Create a new instance of this factory where the dependencies are replaced according to the given mapping.
- Parameters:
new_coord_mapping – A dictionary mapping from the object IDs potentially used by this factory, to the coordinate objects that should be used instead.
- property var_name#
netCDF variable name for the coordinate made by the factory
- class iris.aux_factory.HybridHeightFactory(delta=None, sigma=None, orography=None)[source]#
Bases:
AuxCoordFactory
Defines a hybrid-height coordinate factory.
Create a hybrid-height coordinate factory with the following formula.
\[z = a + b * orog\]At least one of delta or orography must be provided.
- Parameters:
- property attributes#
- property climatological#
Return False, as a factory itself can never have points/bounds.
Always returns False, as a factory itself can never have points/bounds and therefore can never be climatological by definition.
- property coord_system#
The coordinate-system (if any) of the coordinate made by the factory.
- property dependencies#
Return a dict mapping from constructor arg names to coordinates.
Return a dictionary mapping from constructor argument names to the corresponding coordinates.
- derived_dims(coord_dims_func)#
Return the cube dimensions for the derived coordinate.
- Parameters:
coord_dims_func – A callable which can return the list of dimensions relevant to a given coordinate. See
iris.cube.Cube.coord_dims()
.- Return type:
A sorted list of cube dimension numbers.
- property long_name#
The CF Metadata long name for the object.
- make_coord(coord_dims_func)[source]#
Return a new
iris.coords.AuxCoord
as defined by this factory.- Parameters:
coord_dims_func –
A callable which can return the list of dimensions relevant to a given coordinate.
- property metadata#
- name(default=None, token=False)#
Return a string name representing the identity of the metadata.
First it tries standard name, then it tries the long name, then the NetCDF variable name, before falling-back to a default value, which itself defaults to the string ‘unknown’.
- Parameters:
default (optional) – The fall-back string representing the default name. Defaults to the string ‘unknown’.
token (bool, default=False) – If True, ensures that the name returned satisfies the criteria for the characters required by a valid NetCDF name. If it is not possible to return a valid name, then a ValueError exception is raised. Defaults to False.
- Return type:
- rename(name)#
Change the human-readable name.
If ‘name’ is a valid standard name it will assign it to
standard_name
, otherwise it will assign it tolong_name
.
- property standard_name#
The CF Metadata standard name for the object.
- property units#
The S.I. unit of the object.
- update(old_coord, new_coord=None)[source]#
Notify the factory of the removal/replacement of a coordinate.
Notify the factory of the removal/replacement of a coordinate which might be a dependency.
- Parameters:
old_coord – The coordinate to be removed/replaced.
new_coord (optional) – If None, any dependency using old_coord is removed, otherwise any dependency using old_coord is updated to use new_coord.
- updated(new_coord_mapping)#
Create a new instance of this factory.
Create a new instance of this factory where the dependencies are replaced according to the given mapping.
- Parameters:
new_coord_mapping – A dictionary mapping from the object IDs potentially used by this factory, to the coordinate objects that should be used instead.
- property var_name#
The NetCDF variable name for the object.
- xml_element(doc)#
Return a DOM element describing this coordinate factory.
- class iris.aux_factory.HybridPressureFactory(delta=None, sigma=None, surface_air_pressure=None)[source]#
Bases:
AuxCoordFactory
Define a hybrid-pressure coordinate factory.
Create a hybrid-height coordinate factory with the following formula.
\[p = ap + b * ps\]At least one of delta or surface_air_pressure must be provided.
- Parameters:
- property attributes#
- property climatological#
Return False, as a factory itself can never have points/bounds.
Always returns False, as a factory itself can never have points/bounds and therefore can never be climatological by definition.
- property coord_system#
The coordinate-system (if any) of the coordinate made by the factory.
- property dependencies#
Return a dict mapping from constructor arg names to coordinates.
Returns a dictionary mapping from constructor argument names to the corresponding coordinates.
- derived_dims(coord_dims_func)#
Return the cube dimensions for the derived coordinate.
- Parameters:
coord_dims_func – A callable which can return the list of dimensions relevant to a given coordinate. See
iris.cube.Cube.coord_dims()
.- Return type:
A sorted list of cube dimension numbers.
- property long_name#
The CF Metadata long name for the object.
- make_coord(coord_dims_func)[source]#
Return a new
iris.coords.AuxCoord
as defined by this factory.- Parameters:
coord_dims_func –
A callable which can return the list of dimensions relevant to a given coordinate.
- property metadata#
- name(default=None, token=False)#
Return a string name representing the identity of the metadata.
First it tries standard name, then it tries the long name, then the NetCDF variable name, before falling-back to a default value, which itself defaults to the string ‘unknown’.
- Parameters:
default (optional) – The fall-back string representing the default name. Defaults to the string ‘unknown’.
token (bool, default=False) – If True, ensures that the name returned satisfies the criteria for the characters required by a valid NetCDF name. If it is not possible to return a valid name, then a ValueError exception is raised. Defaults to False.
- Return type:
- rename(name)#
Change the human-readable name.
If ‘name’ is a valid standard name it will assign it to
standard_name
, otherwise it will assign it tolong_name
.
- property standard_name#
The CF Metadata standard name for the object.
- property units#
The S.I. unit of the object.
- update(old_coord, new_coord=None)#
Notify the factory of the removal/replacement of a coordinate.
Notify the factory of the removal/replacement of a coordinate which might be a dependency.
- Parameters:
old_coord – The coordinate to be removed/replaced.
new_coord (optional) – If None, any dependency using old_coord is removed, otherwise any dependency using old_coord is updated to use new_coord.
- updated(new_coord_mapping)#
Create a new instance of this factory.
Create a new instance of this factory where the dependencies are replaced according to the given mapping.
- Parameters:
new_coord_mapping – A dictionary mapping from the object IDs potentially used by this factory, to the coordinate objects that should be used instead.
- property var_name#
The NetCDF variable name for the object.
- xml_element(doc)#
Return a DOM element describing this coordinate factory.
- class iris.aux_factory.OceanSFactory(s=None, eta=None, depth=None, a=None, b=None, depth_c=None)[source]#
Bases:
AuxCoordFactory
Defines an Ocean s-coordinate factory.
Create an Ocean s-coordinate factory with a formula.
\[z(n,k,j,i) = eta(n,j,i)*(1+s(k)) + depth_c*s(k) + (depth(j,i)-depth_c)*C(k)\]where:
\[C(k) = (1-b) * sinh(a*s(k)) / sinh(a) + b * [tanh(a * (s(k) + 0.5)) / (2 * tanh(0.5*a)) - 0.5]\]- property attributes#
- property climatological#
Return False, as a factory itself can never have points/bounds.
Always returns False, as a factory itself can never have points/bounds and therefore can never be climatological by definition.
- property coord_system#
The coordinate-system (if any) of the coordinate made by the factory.
- property dependencies#
Return a dict mapping from constructor arg names to coordinates.
Return a dictionary mapping from constructor argument names to the corresponding coordinates.
- derived_dims(coord_dims_func)#
Return the cube dimensions for the derived coordinate.
- Parameters:
coord_dims_func – A callable which can return the list of dimensions relevant to a given coordinate. See
iris.cube.Cube.coord_dims()
.- Return type:
A sorted list of cube dimension numbers.
- property long_name#
The CF Metadata long name for the object.
- make_coord(coord_dims_func)[source]#
Return a new
iris.coords.AuxCoord
as defined by this factory.- Parameters:
coord_dims_func – A callable which can return the list of dimensions relevant to a given coordinate. See
iris.cube.Cube.coord_dims()
.
- property metadata#
- name(default=None, token=False)#
Return a string name representing the identity of the metadata.
First it tries standard name, then it tries the long name, then the NetCDF variable name, before falling-back to a default value, which itself defaults to the string ‘unknown’.
- Parameters:
default (optional) – The fall-back string representing the default name. Defaults to the string ‘unknown’.
token (bool, default=False) – If True, ensures that the name returned satisfies the criteria for the characters required by a valid NetCDF name. If it is not possible to return a valid name, then a ValueError exception is raised. Defaults to False.
- Return type:
- rename(name)#
Change the human-readable name.
If ‘name’ is a valid standard name it will assign it to
standard_name
, otherwise it will assign it tolong_name
.
- property standard_name#
The CF Metadata standard name for the object.
- property units#
The S.I. unit of the object.
- update(old_coord, new_coord=None)#
Notify the factory of the removal/replacement of a coordinate.
Notify the factory of the removal/replacement of a coordinate which might be a dependency.
- Parameters:
old_coord – The coordinate to be removed/replaced.
new_coord (optional) – If None, any dependency using old_coord is removed, otherwise any dependency using old_coord is updated to use new_coord.
- updated(new_coord_mapping)#
Create a new instance of this factory.
Create a new instance of this factory where the dependencies are replaced according to the given mapping.
- Parameters:
new_coord_mapping – A dictionary mapping from the object IDs potentially used by this factory, to the coordinate objects that should be used instead.
- property var_name#
The NetCDF variable name for the object.
- xml_element(doc)#
Return a DOM element describing this coordinate factory.
- class iris.aux_factory.OceanSg1Factory(s=None, c=None, eta=None, depth=None, depth_c=None)[source]#
Bases:
AuxCoordFactory
Defines an Ocean s-coordinate, generic form 1 factory.
Create an Ocean s-coordinate, generic form 1 factory with the following formula.
\[z(n,k,j,i) = S(k,j,i) + eta(n,j,i) * (1 + S(k,j,i) / depth(j,i))\]where:
\[S(k,j,i) = depth_c * s(k) + (depth(j,i) - depth_c) * C(k)\]- property attributes#
- property climatological#
Return False, as a factory itself can never have points/bounds.
Always returns False, as a factory itself can never have points/bounds and therefore can never be climatological by definition.
- property coord_system#
The coordinate-system (if any) of the coordinate made by the factory.
- property dependencies#
Return a dict mapping from constructor arg names to coordinates.
Return a dictionary mapping from constructor argument names to the corresponding coordinates.
- derived_dims(coord_dims_func)#
Return the cube dimensions for the derived coordinate.
- Parameters:
coord_dims_func – A callable which can return the list of dimensions relevant to a given coordinate. See
iris.cube.Cube.coord_dims()
.- Return type:
A sorted list of cube dimension numbers.
- property long_name#
The CF Metadata long name for the object.
- make_coord(coord_dims_func)[source]#
Return a new
iris.coords.AuxCoord
as defined by this factory.- Parameters:
coord_dims_func – A callable which can return the list of dimensions relevant to a given coordinate. See
iris.cube.Cube.coord_dims()
.
- property metadata#
- name(default=None, token=False)#
Return a string name representing the identity of the metadata.
First it tries standard name, then it tries the long name, then the NetCDF variable name, before falling-back to a default value, which itself defaults to the string ‘unknown’.
- Parameters:
default (optional) – The fall-back string representing the default name. Defaults to the string ‘unknown’.
token (bool, default=False) – If True, ensures that the name returned satisfies the criteria for the characters required by a valid NetCDF name. If it is not possible to return a valid name, then a ValueError exception is raised. Defaults to False.
- Return type:
- rename(name)#
Change the human-readable name.
If ‘name’ is a valid standard name it will assign it to
standard_name
, otherwise it will assign it tolong_name
.
- property standard_name#
The CF Metadata standard name for the object.
- property units#
The S.I. unit of the object.
- update(old_coord, new_coord=None)#
Notify the factory of the removal/replacement of a coordinate.
Notify the factory of the removal/replacement of a coordinate which might be a dependency.
- Parameters:
old_coord – The coordinate to be removed/replaced.
new_coord (optional) – If None, any dependency using old_coord is removed, otherwise any dependency using old_coord is updated to use new_coord.
- updated(new_coord_mapping)#
Create a new instance of this factory.
Create a new instance of this factory where the dependencies are replaced according to the given mapping.
- Parameters:
new_coord_mapping – A dictionary mapping from the object IDs potentially used by this factory, to the coordinate objects that should be used instead.
- property var_name#
The NetCDF variable name for the object.
- xml_element(doc)#
Return a DOM element describing this coordinate factory.
- class iris.aux_factory.OceanSg2Factory(s=None, c=None, eta=None, depth=None, depth_c=None)[source]#
Bases:
AuxCoordFactory
Defines an Ocean s-coordinate, generic form 2 factory.
Create an Ocean s-coordinate, generic form 2 factory with the following formula.
\[z(n,k,j,i) = eta(n,j,i) + (eta(n,j,i) + depth(j,i)) * S(k,j,i)\]where:
\[S(k,j,i) = (depth_c * s(k) + depth(j,i) * C(k)) / (depth_c + depth(j,i))\]- property attributes#
- property climatological#
Return False, as a factory itself can never have points/bounds.
Always returns False, as a factory itself can never have points/bounds and therefore can never be climatological by definition.
- property coord_system#
The coordinate-system (if any) of the coordinate made by the factory.
- property dependencies#
Return a dicti mapping from constructor arg names to coordinates.
Return a dictionary mapping from constructor argument names to the corresponding coordinates.
- derived_dims(coord_dims_func)#
Return the cube dimensions for the derived coordinate.
- Parameters:
coord_dims_func – A callable which can return the list of dimensions relevant to a given coordinate. See
iris.cube.Cube.coord_dims()
.- Return type:
A sorted list of cube dimension numbers.
- property long_name#
The CF Metadata long name for the object.
- make_coord(coord_dims_func)[source]#
Return a new
iris.coords.AuxCoord
as defined by this factory.- Parameters:
coord_dims_func – A callable which can return the list of dimensions relevant to a given coordinate. See
iris.cube.Cube.coord_dims()
.
- property metadata#
- name(default=None, token=False)#
Return a string name representing the identity of the metadata.
First it tries standard name, then it tries the long name, then the NetCDF variable name, before falling-back to a default value, which itself defaults to the string ‘unknown’.
- Parameters:
default (optional) – The fall-back string representing the default name. Defaults to the string ‘unknown’.
token (bool, default=False) – If True, ensures that the name returned satisfies the criteria for the characters required by a valid NetCDF name. If it is not possible to return a valid name, then a ValueError exception is raised. Defaults to False.
- Return type:
- rename(name)#
Change the human-readable name.
If ‘name’ is a valid standard name it will assign it to
standard_name
, otherwise it will assign it tolong_name
.
- property standard_name#
The CF Metadata standard name for the object.
- property units#
The S.I. unit of the object.
- update(old_coord, new_coord=None)#
Notify the factory of the removal/replacement of a coordinate.
Notify the factory of the removal/replacement of a coordinate which might be a dependency.
- Parameters:
old_coord – The coordinate to be removed/replaced.
new_coord (optional) – If None, any dependency using old_coord is removed, otherwise any dependency using old_coord is updated to use new_coord.
- updated(new_coord_mapping)#
Create a new instance of this factory.
Create a new instance of this factory where the dependencies are replaced according to the given mapping.
- Parameters:
new_coord_mapping – A dictionary mapping from the object IDs potentially used by this factory, to the coordinate objects that should be used instead.
- property var_name#
The NetCDF variable name for the object.
- xml_element(doc)#
Return a DOM element describing this coordinate factory.
- class iris.aux_factory.OceanSigmaFactory(sigma=None, eta=None, depth=None)[source]#
Bases:
AuxCoordFactory
Defines an ocean sigma coordinate factory.
Create an ocean sigma coordinate factory with the following formula.
\[z(n, k, j, i) = eta(n, j, i) + sigma(k) * (depth(j, i) + eta(n, j, i))\]- property attributes#
- property climatological#
Return False, as a factory itself can never have points/bounds.
Always returns False, as a factory itself can never have points/bounds and therefore can never be climatological by definition.
- property coord_system#
The coordinate-system (if any) of the coordinate made by the factory.
- property dependencies#
Return a dict mapping from constructor arg names to coordinates.
Returns a dictionary mapping from constructor argument names to the corresponding coordinates.
- derived_dims(coord_dims_func)#
Return the cube dimensions for the derived coordinate.
- Parameters:
coord_dims_func – A callable which can return the list of dimensions relevant to a given coordinate. See
iris.cube.Cube.coord_dims()
.- Return type:
A sorted list of cube dimension numbers.
- property long_name#
The CF Metadata long name for the object.
- make_coord(coord_dims_func)[source]#
Return a new
iris.coords.AuxCoord
as defined by this factory.- Parameters:
coord_dims_func – A callable which can return the list of dimensions relevant to a given coordinate. See
iris.cube.Cube.coord_dims()
.
- property metadata#
- name(default=None, token=False)#
Return a string name representing the identity of the metadata.
First it tries standard name, then it tries the long name, then the NetCDF variable name, before falling-back to a default value, which itself defaults to the string ‘unknown’.
- Parameters:
default (optional) – The fall-back string representing the default name. Defaults to the string ‘unknown’.
token (bool, default=False) – If True, ensures that the name returned satisfies the criteria for the characters required by a valid NetCDF name. If it is not possible to return a valid name, then a ValueError exception is raised. Defaults to False.
- Return type:
- rename(name)#
Change the human-readable name.
If ‘name’ is a valid standard name it will assign it to
standard_name
, otherwise it will assign it tolong_name
.
- property standard_name#
The CF Metadata standard name for the object.
- property units#
The S.I. unit of the object.
- update(old_coord, new_coord=None)#
Notify the factory of the removal/replacement of a coordinate.
Notify the factory of the removal/replacement of a coordinate which might be a dependency.
- Parameters:
old_coord – The coordinate to be removed/replaced.
new_coord (optional) – If None, any dependency using old_coord is removed, otherwise any dependency using old_coord is updated to use new_coord.
- updated(new_coord_mapping)#
Create a new instance of this factory.
Create a new instance of this factory where the dependencies are replaced according to the given mapping.
- Parameters:
new_coord_mapping – A dictionary mapping from the object IDs potentially used by this factory, to the coordinate objects that should be used instead.
- property var_name#
The NetCDF variable name for the object.
- xml_element(doc)#
Return a DOM element describing this coordinate factory.
- class iris.aux_factory.OceanSigmaZFactory(sigma=None, eta=None, depth=None, depth_c=None, nsigma=None, zlev=None)[source]#
Bases:
AuxCoordFactory
Defines an ocean sigma over z coordinate factory.
Create an ocean sigma over z coordinate factory with the following formula.
if k < nsigma:
\[z(n, k, j, i) = eta(n, j, i) + sigma(k) * (min(depth_c, depth(j, i)) + eta(n, j, i))\]if k >= nsigma:
\[z(n, k, j, i) = zlev(k)\]The zlev and ‘nsigma’ coordinates must be provided, and at least either eta, or ‘sigma’ and depth and depth_c coordinates.
- property attributes#
- property climatological#
Return False, as a factory itself can never have points/bounds.
Always returns False, as a factory itself can never have points/bounds and therefore can never be climatological by definition.
- property coord_system#
The coordinate-system (if any) of the coordinate made by the factory.
- property dependencies#
Return a dict mapping from constructor arg names to coordinates.
Returns a dictionary mapping from constructor argument names to the corresponding coordinates.
- derived_dims(coord_dims_func)#
Return the cube dimensions for the derived coordinate.
- Parameters:
coord_dims_func – A callable which can return the list of dimensions relevant to a given coordinate. See
iris.cube.Cube.coord_dims()
.- Return type:
A sorted list of cube dimension numbers.
- property long_name#
The CF Metadata long name for the object.
- make_coord(coord_dims_func)[source]#
Return a new
iris.coords.AuxCoord
as defined by this factory.- Parameters:
coord_dims_func – A callable which can return the list of dimensions relevant to a given coordinate. See
iris.cube.Cube.coord_dims()
.
- property metadata#
- name(default=None, token=False)#
Return a string name representing the identity of the metadata.
First it tries standard name, then it tries the long name, then the NetCDF variable name, before falling-back to a default value, which itself defaults to the string ‘unknown’.
- Parameters:
default (optional) – The fall-back string representing the default name. Defaults to the string ‘unknown’.
token (bool, default=False) – If True, ensures that the name returned satisfies the criteria for the characters required by a valid NetCDF name. If it is not possible to return a valid name, then a ValueError exception is raised. Defaults to False.
- Return type:
- rename(name)#
Change the human-readable name.
If ‘name’ is a valid standard name it will assign it to
standard_name
, otherwise it will assign it tolong_name
.
- property standard_name#
The CF Metadata standard name for the object.
- property units#
The S.I. unit of the object.
- update(old_coord, new_coord=None)#
Notify the factory of the removal/replacement of a coordinate.
Notify the factory of the removal/replacement of a coordinate which might be a dependency.
- Parameters:
old_coord – The coordinate to be removed/replaced.
new_coord (optional) – If None, any dependency using old_coord is removed, otherwise any dependency using old_coord is updated to use new_coord.
- updated(new_coord_mapping)#
Create a new instance of this factory.
Create a new instance of this factory where the dependencies are replaced according to the given mapping.
- Parameters:
new_coord_mapping – A dictionary mapping from the object IDs potentially used by this factory, to the coordinate objects that should be used instead.
- property var_name#
The NetCDF variable name for the object.
- xml_element(doc)#
Return a DOM element describing this coordinate factory.