geodata.Cutout#
- class geodata.Cutout(module: Literal['era5', 'merra2'], weather_data_config: str, years: slice, name: str | None = None, cutout_dir: str | pathlib.Path = config.cutout_dir, bounds: collections.abc.Iterable | None = None, months: slice | None = None, xs: slice | None = None, ys: slice | None = None)#
Cutout class to handle a subset of a Dataset.
- Parameters:
module (Literal["era5", "merra2"]) – name of the dataset module to use.
weather_data_config (str) – name of the weather data config to use. the name will be automatically generated.
years (slice) – years of the cutout.
name (Optional[str]) – name of the cutout. Optional. If not specified,
cutout_dir (str) – path to the cutout directory. Defaults to config.cutout_dir.
bounds (Optional[Iterable]) – bounds of the cutout. Optional. If not specified, the bounds will be automatically generated.
months (Optional[slice]) – months of the cutout. Optional. If not specified, the months will be automatically generated.
xs (Optional[slice]) – longitude coordinates of the cutout. Optional. If not specified, the x coordinates will be automatically generated.
ys (Optional[slice]) – latitude coordinates of the cutout. Optional. If not specified, the y coordinates will be automatically generated.
- name#
- cutout_dir#
- prepared = False#
- empty = False#
- meta_append = 0#
- config#
- meta = None#
- merged_mask = None#
- shape_mask = None#
- area = None#
- params_dict#
- property meta_data_config#
- Metadata configuration for the Cutout
- property weather_data_config#
- The weather data configuration for the Cutout.
- property variables#
- The variables contained in the Cutout.
- property info#
- Summary information about the Cutout.
- property projection#
- The projection of the Cutout.
- property coords#
- The coordinates covered by the Cutout.
- property meta_clean#
- property shape#
- The shape of the Cutout by (y, x).
- property extent#
- The extent of the Cutout by (x_min, x_max, y_min, y_max).
- property years#
- Cutout's covered years as slice object.
- property months#
- Cutout's covered months as slice object.
- get_meta#
- get_meta_view#
- prepare#
- produce_specific_dataseries#
Methods#
|
Return path to dataset xarray files related to this Cutout. |
Return grid coordinates of the Cutout. |
|
Return grid cells of the Cutout. |
|
|
Add mask attribute to the cutout, from a previously saved mask objects. |
|
Add attribute 'area' to the cutout containing area for each grid cell |
|
Mask a converted xarray.Dataset from cutout with previously added mask attribute |
|
Convert outside temperature into daily heat demand using the |
|
Convert temperature in Cutout to outside temperature. |
|
Return soil temperature (useful for e.g. heat pump T-dependent |
|
Convert downward short-wave radiation flux and outside temperature |
|
Generate wind generation time-series |
|
Generate wind speed time-series |
|
Generate wind power density time-series |
|
Convert downward-shortwave, upward-shortwave radiation flux and |
|
Generate PM2.5 time series [ug / m3] |