earthkit.data.readers.xarray.time¶
Classes¶
Represents an analysis time. |
|
Represents a constant time. |
|
Represents a forecast time derived from base time and date. |
|
Represents a forecast time derived from base time and date. |
|
Represents a forecast time derived from valid time and base time. |
|
Represents a forecast time derived from valid time and step. |
|
Base class for different time representations. |
Module Contents¶
- class earthkit.data.readers.xarray.time.Analysis(time_coordinate)¶
Bases:
TimeRepresents an analysis time.
- classmethod from_coordinates(coordinates)¶
Create a Time instance from a list of coordinates.
- select_valid_datetime(variable)¶
Select the valid datetime for a given variable.
- Parameters:
variable (
Variable) – The variable to select the datetime for.- Returns:
The name of the time coordinate.
- Return type:
str
- spec(coords_values)¶
Return the time specification based on coordinate values.
- Parameters:
coords_values (
Dict[str,Any]) – Coordinate values.- Returns:
The time specification.
- Return type:
TimeSpec
- time_coordinate_name¶
- class earthkit.data.readers.xarray.time.Constant¶
Bases:
TimeRepresents a constant time.
- fill_time_metadata(coords_values, metadata)¶
Fill metadata with time information.
- Parameters:
coords_values (
Dict[str,Any]) – Coordinate values.metadata (
Dict[str,Any]) – Metadata dictionary.
- classmethod from_coordinates(coordinates)¶
Create a Time instance from a list of coordinates.
- select_valid_datetime(variable)¶
Select the valid datetime for a given variable.
- Parameters:
variable (
Variable) – The variable to select the datetime for.
- spec(coords_values)¶
Return the time specification based on coordinate values.
- Parameters:
coords_values (
Dict[str,Any]) – Coordinate values.- Returns:
The time specification.
- Return type:
TimeSpec
- class earthkit.data.readers.xarray.time.ForecastFromBaseTime(date_coordinate)¶
Bases:
TimeRepresents a forecast time derived from base time and date.
- date_coordinate_name¶
- classmethod from_coordinates(coordinates)¶
Create a Time instance from a list of coordinates.
- select_valid_datetime(variable)¶
Select the valid datetime for a given variable.
- Parameters:
variable (
Variable) – The variable to select the datetime for.- Returns:
The name of the time coordinate.
- Return type:
Optional[str]
- spec(coords_values)¶
Return the time specification based on coordinate values.
- Parameters:
coords_values (
Dict[str,Any]) – Coordinate values.- Returns:
The time specification.
- Return type:
TimeSpec
- class earthkit.data.readers.xarray.time.ForecastFromBaseTimeAndDate(date_coordinate, step_coordinate)¶
Bases:
TimeRepresents a forecast time derived from base time and date.
- date_coordinate_name¶
- classmethod from_coordinates(coordinates)¶
Create a Time instance from a list of coordinates.
- abstractmethod select_valid_datetime(variable)¶
Select the valid datetime for a given variable.
- Parameters:
variable (
Variable) – The variable to select the datetime for.- Returns:
The name of the time coordinate.
- Return type:
Optional[str]
- spec(coords_values)¶
Return the time specification based on coordinate values.
- Parameters:
coords_values (
Dict[str,Any]) – Coordinate values.- Returns:
The time specification.
- Return type:
TimeSpec
- step_coordinate_name¶
- class earthkit.data.readers.xarray.time.ForecastFromValidTimeAndBaseTime(date_coordinate, time_coordinate)¶
Bases:
TimeRepresents a forecast time derived from valid time and base time.
- date_coordinate_name¶
- classmethod from_coordinates(coordinates)¶
Create a Time instance from a list of coordinates.
- select_valid_datetime(variable)¶
Select the valid datetime for a given variable.
- Parameters:
variable (
Variable) – The variable to select the datetime for.- Returns:
The name of the time coordinate.
- Return type:
str
- spec(coords_values)¶
Return the time specification based on coordinate values.
- Parameters:
coords_values (
Dict[str,Any]) – Coordinate values.- Returns:
The time specification.
- Return type:
TimeSpec
- time_coordinate_name¶
- class earthkit.data.readers.xarray.time.ForecastFromValidTimeAndStep(time_coordinate, step_coordinate, date_coordinate=None)¶
Bases:
TimeRepresents a forecast time derived from valid time and step.
- date_coordinate_name¶
- classmethod from_coordinates(coordinates)¶
Create a Time instance from a list of coordinates.
- select_valid_datetime(variable)¶
Select the valid datetime for a given variable.
- Parameters:
variable (
Variable) – The variable to select the datetime for.- Returns:
The name of the time coordinate.
- Return type:
str
- spec(coords_values)¶
Return the time specification based on coordinate values.
- Parameters:
coords_values (
Dict[str,Any]) – Coordinate values.- Returns:
The time specification.
- Return type:
TimeSpec
- step_coordinate_name¶
- time_coordinate_name¶
- class earthkit.data.readers.xarray.time.Time¶
Bases:
abc.ABCBase class for different time representations.
- classmethod from_coordinates(coordinates)¶
Create a Time instance from a list of coordinates.
- abstractmethod select_valid_datetime(variable)¶
Select the valid datetime for a given variable.
- Parameters:
variable (
Variable) – The variable to select the datetime for.- Returns:
The name of the time coordinate.
- Return type:
Optional[str]
- abstractmethod spec(coords_values)¶
Return the time specification based on coordinate values.
- Parameters:
coords_values (
Dict[str,Any]) – Coordinate values.- Returns:
The time specification.
- Return type:
TimeSpec