earthkit.data.xr_engine.dim¶
Attributes¶
Classes¶
Represent a dimension. |
|
Represent a dimension. |
|
Represent a dimension. |
|
Represent a dimension. |
|
Represent a dimension. |
|
Represent a dimension. |
|
Represent a dimension. |
|
Represent a dimension. |
|
Represent a dimension. |
|
Represent a dimension. |
|
Represent a dimension. |
|
Represent a dimension. |
|
Represent a dimension. |
|
Represent a dimension. |
|
Represent a dimension. |
|
Represent a dimension. |
|
Build time dimensions based on the |
|
Represent a dimension. |
Functions¶
|
|
|
|
|
Module Contents¶
- earthkit.data.xr_engine.dim.ALL_TIME_ROLES = ['forecast_reference_time', 'step', 'valid_time', 'date', 'time']¶
- earthkit.data.xr_engine.dim.BASE_DATETIME_KEYS¶
- earthkit.data.xr_engine.dim.COMPOUND_KEYS¶
- class earthkit.data.xr_engine.dim.CompoundKey¶
- keys = []¶
- static make(key)¶
- name = None¶
- remapping()¶
- class earthkit.data.xr_engine.dim.CompoundKeyDim(owner, ck)¶
Bases:
RemappingDimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias = None¶
- as_coord(values, source)¶
- build_drop(keys)¶
- check()¶
- ck¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop¶
- enforce_unique = False¶
- get_simple_name()¶
- key = None¶
- keys¶
- label = None¶
- name¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- class earthkit.data.xr_engine.dim.CustomForecastRefDim(owner, keys, *args, active=True, name=None, **kwargs)¶
Bases:
DimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias = None¶
- as_coord(values, source)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop = None¶
- enforce_unique = False¶
- get_simple_name()¶
- key = None¶
- label = None¶
- name = None¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- earthkit.data.xr_engine.dim.DATETIME_KEYS¶
- earthkit.data.xr_engine.dim.DATE_KEYS¶
- earthkit.data.xr_engine.dim.DIM_BUILDERS¶
- class earthkit.data.xr_engine.dim.DateDim(owner, name=None, key=None, alias=None, drop=None, active=True)¶
Bases:
DimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias = None¶
- as_coord(values, source)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop¶
- enforce_unique = False¶
- get_simple_name()¶
- key = None¶
- label = None¶
- name = 'date'¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- class earthkit.data.xr_engine.dim.Dim(owner, name=None, key=None, alias=None, drop=None, active=True)¶
Represent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias = None¶
- as_coord(values, source)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop = None¶
- enforce_unique = False¶
- get_simple_name()¶
- key = None¶
- label = None¶
- name = None¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- class earthkit.data.xr_engine.dim.DimHandler(profile, extra_dims, drop_dims, ensure_dims, fixed_dims, split_dims, rename_dims, dim_roles, dim_name_from_role_name, dims_as_attrs, time_dims, level_dim_mode, squeeze)¶
- property active_dim_keys¶
- property active_time_dim_names¶
Return the names of the active time dimensions in dim order.
Handles both the normal case (dims built via
TimeDimBuilder) and thefixed_dimscase where dim names are raw metadata keys.
- deactivate(keys, ignore_dim=None, others=False, collect=False)¶
- dim_roles¶
- dims_as_attrs = []¶
- drop_dims = []¶
- ensure_dims = []¶
- extra_dims¶
- fixed_dims¶
- get_dims(names)¶
- level_dim_mode¶
- make_coords()¶
- profile¶
- register_remapping(remapping, patch=None)¶
- remove(keys, ignore_dim=None, others=False, collect=False)¶
- rename_dataset_dims(dataset)¶
- rename_dims_map¶
- split_dims = []¶
- squeeze¶
- time_dims = []¶
- to_list()¶
- update(ds)¶
- var_dim_found_error_message(keys)¶
- var_key_dim = None¶
- class earthkit.data.xr_engine.dim.DimRole(d, name_as_key=True)¶
- NAMES = ('member', 'date', 'time', 'step', 'level', 'level_type', 'forecast_reference_time', 'valid_time')¶
- d¶
- name_as_key = True¶
- role(name, default=None, raise_error=True)¶
- earthkit.data.xr_engine.dim.ENS_KEYS¶
- class earthkit.data.xr_engine.dim.ForecastRefTimeDim(owner, name=None, key=None, alias=None, drop=None, active=True)¶
Bases:
DimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias = ['time.base_datetime']¶
- as_coord(values, source)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop¶
- enforce_unique = False¶
- get_simple_name()¶
- key = None¶
- label = None¶
- name = 'forecast_reference_time'¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- class earthkit.data.xr_engine.dim.IndexingTimeDim(owner, name=None, key=None, alias=None, drop=None, active=True)¶
Bases:
DimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias = None¶
- as_coord(values, source)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop¶
- enforce_unique = False¶
- get_simple_name()¶
- key = None¶
- label = None¶
- name = 'indexing_time'¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- earthkit.data.xr_engine.dim.KEYS¶
- earthkit.data.xr_engine.dim.LEVEL_DIM_MODES¶
- earthkit.data.xr_engine.dim.LEVEL_KEYS¶
- earthkit.data.xr_engine.dim.LEVEL_TYPE_KEYS¶
- class earthkit.data.xr_engine.dim.LevelAndTypeDim(owner, level_key, level_type_key, active=True, *args, **kwargs)¶
Bases:
DimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias = None¶
- as_coord(values, source)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop¶
- enforce_unique = False¶
- get_simple_name()¶
- key = None¶
- label = None¶
- level_key¶
- level_type_key¶
- name = 'level_and_type'¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- class earthkit.data.xr_engine.dim.LevelAndTypeDimMode¶
- build(profile, owner, **kwargs)¶
- dim¶
- name = 'level_and_type'¶
- class earthkit.data.xr_engine.dim.LevelDim(owner, name=None, key=None, alias=None, drop=None, active=True)¶
Bases:
DimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias¶
- as_coord(values, source)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop = None¶
- enforce_unique = False¶
- get_simple_name()¶
- key = None¶
- label = None¶
- name = None¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- class earthkit.data.xr_engine.dim.LevelDimBuilder(profile, owner)¶
Bases:
DimBuilder- dims()¶
- ignored¶
- name = 'level'¶
- used¶
- class earthkit.data.xr_engine.dim.LevelPerTypeDim(owner, level_key, level_type_key, *args, **kwargs)¶
Bases:
DimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias = None¶
- as_coord(values, source)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop¶
- enforce_unique = False¶
- get_simple_name()¶
- key¶
- label = None¶
- level_key¶
- level_type_key¶
- name = '<level_per_type>'¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- class earthkit.data.xr_engine.dim.LevelPerTypeDimMode¶
Bases:
LevelAndTypeDimMode- build(profile, owner, **kwargs)¶
- dim¶
- name = 'level_per_type'¶
- class earthkit.data.xr_engine.dim.LevelTypeDim(owner, name=None, key=None, alias=None, drop=None, active=True)¶
Bases:
DimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias¶
- as_coord(values, source)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop = None¶
- enforce_unique = True¶
- get_simple_name()¶
- key = None¶
- label = None¶
- name = None¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- earthkit.data.xr_engine.dim.MONTH_KEYS¶
- class earthkit.data.xr_engine.dim.MemberDim(owner, name=None, key=None, alias=None, drop=None, active=True)¶
Bases:
DimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias¶
- as_coord(values, source)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop = None¶
- enforce_unique = False¶
- get_simple_name()¶
- key = None¶
- label = None¶
- name = None¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- class earthkit.data.xr_engine.dim.MemberDimBuilder(profile, owner)¶
Bases:
DimBuilder- dims()¶
- ignored¶
- name = 'member'¶
- used¶
- class earthkit.data.xr_engine.dim.OtherDim(owner, name=None, key=None, alias=None, drop=None, active=True)¶
Bases:
DimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias = None¶
- as_coord(values, source)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop = None¶
- enforce_unique = False¶
- get_simple_name()¶
- key = None¶
- label = None¶
- name = None¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- earthkit.data.xr_engine.dim.PREDEFINED_DIMS¶
- class earthkit.data.xr_engine.dim.ParamLevelKey¶
Bases:
CompoundKey- keys = ['param', 'level', 'levelist']¶
- static make(key)¶
- name = 'param_level'¶
- remapping()¶
- class earthkit.data.xr_engine.dim.ReferenceTimeDim(owner, name=None, key=None, alias=None, drop=None, active=True)¶
Bases:
DimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias = None¶
- as_coord(values, source)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop¶
- enforce_unique = False¶
- get_simple_name()¶
- key = None¶
- label = None¶
- name = 'reference_time'¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- class earthkit.data.xr_engine.dim.RemappingDim(owner, name, keys, **kwargs)¶
Bases:
DimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias = None¶
- as_coord(values, source)¶
- build_drop(keys)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop¶
- enforce_unique = False¶
- get_simple_name()¶
- key = None¶
- keys¶
- label = None¶
- name¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- earthkit.data.xr_engine.dim.STEP_KEYS¶
- class earthkit.data.xr_engine.dim.StepDim(owner, name=None, key=None, alias=None, drop=None, active=True)¶
Bases:
DimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias = ['step', 'step_timedelta']¶
- as_coord(values, source)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop¶
- enforce_unique = False¶
- get_simple_name()¶
- key = None¶
- label = None¶
- name = None¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- earthkit.data.xr_engine.dim.TIME_KEYS¶
- class earthkit.data.xr_engine.dim.TimeDim(owner, name=None, key=None, alias=None, drop=None, active=True)¶
Bases:
DimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias = None¶
- as_coord(values, source)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop¶
- enforce_unique = False¶
- get_simple_name()¶
- key = None¶
- label = None¶
- name = 'time'¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- class earthkit.data.xr_engine.dim.TimeDimBuilder(profile, owner)¶
Bases:
DimBuilderBuild time dimensions based on the
time_dimslist.Each element of
time_dimsis a role name (e.g."forecast_reference_time","step","valid_time","date","time"). For every requested role the corresponding dimension is created as active; all other known time roles are created as inactive (ignored).- dims()¶
- ignored¶
- name = 'time'¶
- used¶
- earthkit.data.xr_engine.dim.VALID_DATETIME_KEYS¶
- class earthkit.data.xr_engine.dim.ValidTimeDim(owner, name=None, key=None, alias=None, drop=None, active=True)¶
Bases:
DimRepresent a dimension.
- Parameters:
name (
str) – Name of the dimension.key (
str) – Metadata key to be used to get the values of the dimension.alias (
list) – List of metadata keys that has the same meaning as thekey.drop (
list) – List of metadata keys used to identify the dimensions that cannot be used when the current dimension isactive. When this dimension is active and the dimension consistency is checked all the other dimensions containing any keys fromdropasname,keyoraliasshould be deactivated.active (
bool) – Status. Only active dimensions are used in the dataset construction.
- active = True¶
- alias = None¶
- as_coord(values, source)¶
- check()¶
- condition()¶
- coords¶
- deactivate_drop_list()¶
- dim_key(source)¶
- drop¶
- enforce_unique = False¶
- get_simple_name()¶
- key = None¶
- label = None¶
- name = 'valid_time'¶
- owner¶
- profile¶
- remapping_keys()¶
- update(ds)¶
- earthkit.data.xr_engine.dim.ensure_dim_map(d)¶
- earthkit.data.xr_engine.dim.find_alias(key, drop=None)¶
- earthkit.data.xr_engine.dim.get_keys(keys, drop=None)¶
- earthkit.data.xr_engine.dim.make_dim(owner, *args, name=None, key=None, **kwargs)¶