easyclimate.core.extract¶
Obtain data within a specified time period
Functions¶
|
Slicing and extracting the part of the data containing the specified year based on an array of given integer years. |
Slicing and extracting the part of the data containing the specified year based on an array of given integer months. |
|
|
Slicing and extracting the part of the data containing the specified year based on an array of given integer days. |
|
Slicing and extracting the part of the data containing the specified year based on an array of given integer hours. |
|
Slicing and extracting the part of the data containing the specified year based on an array of given integer minutes. |
|
Slicing and extracting the part of the data containing the specified year based on an array of given integer seconds. |
|
Slicing and extracting the part of the data containing the specified year based on an array of given integer microseconds. |
|
Slicing and extracting the part of the data containing the specified year based on an array of given integer nanoseconds. |
|
Slicing and extracting the part of the data containing the specified year based on an array of given integer dayofweek. |
|
Get the annual average of certain months. |
|
Extract the years under the specified threshold (upper bound) in the annual average index (one-dimensional data with only a time dimension). |
|
Extract the years under the specified threshold (lower bound) in the annual average index (one-dimensional data with only a time dimension). |
|
Extract the time under the specified threshold (upper bound) in the annual average index (one-dimensional data with only a time dimension). |
|
Extract the time under the specified threshold (lower bound) in the annual average index (one-dimensional data with only a time dimension). |
Module Contents¶
- easyclimate.core.extract.get_specific_years_data(data_input: xarray.DataArray | xarray.Dataset, year_array: np.array(int) | List[int], dim: str = 'time') xarray.DataArray | xarray.Dataset¶
Slicing and extracting the part of the data containing the specified year based on an array of given integer years.
Parameters¶
- data_input
xarray.DataArray xarray.DataArrayto be extracted.- year_array:
list[int] Year(s) to be extracted.
- dim
str Dimension(s) over which to apply extracting. By default extracting is applied over the time dimension.
Returns¶
- data_input
- easyclimate.core.extract.get_specific_months_data(data_input: xarray.DataArray | xarray.Dataset, month_array: numpy.array, dim: str = 'time') xarray.DataArray | xarray.Dataset¶
Slicing and extracting the part of the data containing the specified year based on an array of given integer months.
Parameters¶
- data_input
xarray.DataArray xarray.DataArrayto be extracted.- month_array:
list[int] Month(s) to be extracted.
- dim
str Dimension(s) over which to apply extracting. By default extracting is applied over the time dimension.
Returns¶
- data_input
- easyclimate.core.extract.get_specific_days_data(data_input: xarray.DataArray | xarray.Dataset, day_array: np.array(int) | List[int], dim: str = 'time') xarray.DataArray | xarray.Dataset¶
Slicing and extracting the part of the data containing the specified year based on an array of given integer days.
Parameters¶
- data_input
xarray.DataArray xarray.DataArrayto be extracted.- day_array:
list[int] Days(s) to be extracted.
- dim
str Dimension(s) over which to apply extracting. By default extracting is applied over the time dimension.
Returns¶
- data_input
- easyclimate.core.extract.get_specific_hours_data(data_input: xarray.DataArray | xarray.Dataset, hour_array: np.array(int) | List[int], dim: str = 'time') xarray.DataArray | xarray.Dataset¶
Slicing and extracting the part of the data containing the specified year based on an array of given integer hours.
Parameters¶
- data_input
xarray.DataArray xarray.DataArrayto be extracted.- hour_array:
list[int] Hour(s) to be extracted.
- dim
str Dimension(s) over which to apply extracting. By default extracting is applied over the time dimension.
Returns¶
- data_input
- easyclimate.core.extract.get_specific_minutes_data(data_input: xarray.DataArray | xarray.Dataset, minute_array: np.array(int) | List[int], dim: str = 'time') xarray.DataArray | xarray.Dataset¶
Slicing and extracting the part of the data containing the specified year based on an array of given integer minutes.
Parameters¶
- data_input
xarray.DataArray xarray.DataArrayto be extracted.- minute_array:
list[int] Minute(s) to be extracted.
- dim
str Dimension(s) over which to apply extracting. By default extracting is applied over the time dimension.
Returns¶
- data_input
- easyclimate.core.extract.get_specific_seconds_data(data_input: xarray.DataArray | xarray.Dataset, second_array: np.array(int) | List[int], dim: str = 'time') xarray.DataArray | xarray.Dataset¶
Slicing and extracting the part of the data containing the specified year based on an array of given integer seconds.
Parameters¶
- data_input
xarray.DataArray xarray.DataArrayto be extracted.- second_array:
list[int] Second(s) to be extracted.
- dim
str Dimension(s) over which to apply extracting. By default extracting is applied over the time dimension.
Returns¶
- data_input
- easyclimate.core.extract.get_specific_microseconds_data(data_input: xarray.DataArray | xarray.Dataset, microsecond_array: np.array(int) | List[int], dim: str = 'time') xarray.DataArray | xarray.Dataset¶
Slicing and extracting the part of the data containing the specified year based on an array of given integer microseconds.
Parameters¶
- data_input
xarray.DataArray xarray.DataArrayto be extracted.- microsecond_array:
list[int] Microsecond(s) to be extracted.
- dim:
str Dimension(s) over which to apply extracting. By default extracting is applied over the time dimension.
Returns¶
- data_input
- easyclimate.core.extract.get_specific_nanoseconds_data(data_input: xarray.DataArray | xarray.Dataset, nanosecond_array: np.array(int) | List[int], dim: str = 'time') xarray.DataArray | xarray.Dataset¶
Slicing and extracting the part of the data containing the specified year based on an array of given integer nanoseconds.
Parameters¶
- data_input
xarray.DataArray xarray.DataArrayto be extracted.- nanosecond_array:
list[int] Nanosecond(s) to be extracted.
- dim:
str Dimension(s) over which to apply extracting. By default extracting is applied over the time dimension.
Returns¶
- data_input
- easyclimate.core.extract.get_specific_dayofweek_data(data_input: xarray.DataArray | xarray.Dataset, dayofweek_array: np.array(int) | List[int], dim: str = 'time') xarray.DataArray | xarray.Dataset¶
Slicing and extracting the part of the data containing the specified year based on an array of given integer dayofweek.
Parameters¶
- data_input
xarray.DataArray xarray.DataArrayto be extracted.- dayofweek_array:
list[int] The days of the week to be extracted.
The integer numbers correspond to the days of the week as follows.
Day of the week
Integer numbers
Monday
0
Tuesday
1
Wednesday
2
Thursday
3
Friday
4
Saturday
5
Sunday
6
- dim:
str Dimension(s) over which to apply extracting. By default extracting is applied over the time dimension.
Returns¶
- data_input
- easyclimate.core.extract.get_yearmean_for_specific_months_data(data_input: xarray.DataArray | xarray.Dataset, month_array: np.array(int) | List[int], dim: str = 'time', **kwargs) xarray.DataArray | xarray.Dataset¶
Get the annual average of certain months.
Parameters¶
- data_input
xarray.DataArray xarray.DataArrayto be extracted.- month_array:
list[int] Month(s) to be extracted.
- dim:
str Dimension(s) over which to apply extracting. By default extracting is applied over the time dimension.
- **kwargs:
Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data. These could include dask-specific kwargs like split_every.
Returns¶
- data_input
- easyclimate.core.extract.get_year_exceed_index_upper_bound(data_input: xarray.DataArray, thresh: float, time_dim: str = 'time') numpy.array¶
Extract the years under the specified threshold (upper bound) in the annual average index (one-dimensional data with only a time dimension).
Parameters¶
- data_input
xarray.DataArray The one-dimensional data with only a time dimension.
- thresh:
float. The threshold value.
- time_dim:
str. The time coordinate dimension name.
Returns¶
numpy.array.- data_input
- easyclimate.core.extract.get_year_exceed_index_lower_bound(data_input: xarray.DataArray, thresh: float, time_dim: str = 'time') numpy.array¶
Extract the years under the specified threshold (lower bound) in the annual average index (one-dimensional data with only a time dimension).
Parameters¶
- data_input
xarray.DataArray The one-dimensional data with only a time dimension.
- thresh:
float. The threshold value.
- time_dim:
str. The time coordinate dimension name.
Returns¶
numpy.array.- data_input
- easyclimate.core.extract.get_time_exceed_index_upper_bound(data_input: xarray.DataArray, thresh: float, time_dim: str = 'time') numpy.array¶
Extract the time under the specified threshold (upper bound) in the annual average index (one-dimensional data with only a time dimension).
Parameters¶
- data_input
xarray.DataArray The one-dimensional data with only a time dimension.
- thresh:
float. The threshold value.
- time_dim:
str. The time coordinate dimension name.
Returns¶
Time array.
- data_input
- easyclimate.core.extract.get_time_exceed_index_lower_bound(data_input: xarray.DataArray, thresh: float, time_dim: str = 'time') numpy.array¶
Extract the time under the specified threshold (lower bound) in the annual average index (one-dimensional data with only a time dimension).
Parameters¶
- data_input
xarray.DataArray The one-dimensional data with only a time dimension.
- thresh:
float. The threshold value.
- time_dim:
str. The time coordinate dimension name.
Returns¶
Time array.
- data_input