geodata.Cutout
==============

.. toctree::
   :hidden:

   /autoapi/geodata/Cutout.datasetfn
   /autoapi/geodata/Cutout.grid_coordinates
   /autoapi/geodata/Cutout.grid_cells
   /autoapi/geodata/Cutout.add_mask
   /autoapi/geodata/Cutout.add_grid_area
   /autoapi/geodata/Cutout.mask
   /autoapi/geodata/Cutout.heat_demand
   /autoapi/geodata/Cutout.temperature
   /autoapi/geodata/Cutout.soil_temperature
   /autoapi/geodata/Cutout.solar_thermal
   /autoapi/geodata/Cutout.wind
   /autoapi/geodata/Cutout.windspd
   /autoapi/geodata/Cutout.windwpd
   /autoapi/geodata/Cutout.pv
   /autoapi/geodata/Cutout.pm25

.. py:class:: geodata.Cutout(module: Literal['era5', 'merra2'], weather_data_config: str, years: slice, name: Optional[str] = None, cutout_dir: Union[str, pathlib.Path] = config.cutout_dir, bounds: Optional[collections.abc.Iterable] = None, months: Optional[slice] = None, xs: Optional[slice] = None, ys: Optional[slice] = None)

   Cutout class to handle a subset of a Dataset.

   :param module: name of the dataset module to use.
   :type module: Literal["era5", "merra2"]
   :param weather_data_config: name of the weather data config to use.
                               the name will be automatically generated.
   :type weather_data_config: str
   :param years: years of the cutout.
   :type years: slice
   :param name: name of the cutout. Optional. If not specified,
   :type name: Optional[str]
   :param cutout_dir: path to the cutout directory. Defaults to config.cutout_dir.
   :type cutout_dir: str
   :param bounds: bounds of the cutout. Optional. If not specified,
                  the bounds will be automatically generated.
   :type bounds: Optional[Iterable]
   :param months: months of the cutout. Optional. If not specified,
                  the months will be automatically generated.
   :type months: Optional[slice]
   :param xs: longitude coordinates of the cutout. Optional. If not specified,
              the x coordinates will be automatically generated.
   :type xs: Optional[slice]
   :param ys: latitude coordinates of the cutout. Optional. If not specified,
              the y coordinates will be automatically generated.
   :type ys: Optional[slice]


   .. py:attribute:: name


   .. py:attribute:: cutout_dir


   .. py:attribute:: prepared
      :value: False



   .. py:attribute:: empty
      :value: False



   .. py:attribute:: meta_append
      :value: 0



   .. py:attribute:: config


   .. py:attribute:: meta
      :value: None



   .. py:attribute:: merged_mask
      :value: None



   .. py:attribute:: shape_mask
      :value: None



   .. py:attribute:: area
      :value: None



   .. py:attribute:: params_dict


   .. py:property:: meta_data_config
      Metadata configuration for the Cutout


   .. py:property:: weather_data_config
      The weather data configuration for the Cutout.


   .. py:property:: variables
      The variables contained in the Cutout.


   .. py:property:: info
      Summary information about the Cutout.


   .. py:property:: projection
      The projection of the Cutout.


   .. py:property:: coords
      The coordinates covered by the Cutout.


   .. py:property:: meta_clean


   .. py:property:: shape
      The shape of the Cutout by (y, x).


   .. py:property:: extent
      The extent of the Cutout by (x_min, x_max, y_min, y_max).


   .. py:property:: years
      Cutout's covered years as slice object.


   .. py:property:: months
      Cutout's covered months as slice object.


   .. py:attribute:: get_meta


   .. py:attribute:: get_meta_view


   .. py:attribute:: prepare


   .. py:attribute:: produce_specific_dataseries

Methods
-------

.. autoapisummary::

   geodata.Cutout.datasetfn
   geodata.Cutout.grid_coordinates
   geodata.Cutout.grid_cells
   geodata.Cutout.add_mask
   geodata.Cutout.add_grid_area
   geodata.Cutout.mask
   geodata.Cutout.heat_demand
   geodata.Cutout.temperature
   geodata.Cutout.soil_temperature
   geodata.Cutout.solar_thermal
   geodata.Cutout.wind
   geodata.Cutout.windspd
   geodata.Cutout.windwpd
   geodata.Cutout.pv
   geodata.Cutout.pm25


