geodata.Dataset
===============

.. toctree::
   :hidden:

   /autoapi/geodata/Dataset.datasetfn
   /autoapi/geodata/Dataset.datasetfn_opendap
   /autoapi/geodata/Dataset.get_data
   /autoapi/geodata/Dataset.trim_variables
   /autoapi/geodata/Dataset.grid_coordinates
   /autoapi/geodata/Dataset.grid_cells

.. py:class:: geodata.Dataset(module: str, weather_data_config: str, years: slice, months: Optional[slice] = None, opendap: bool = False, bounds: Optional[collections.abc.Iterable] = None)

   Dataset is a class that encapsulates any datasets natively supported by geodata.
   It provides a streamlined workflow for downloading, preprocessing, and storing of these datasets.

   :param module: Name of dataset module
   :type module: str
   :param weather_data_config: The type of weather data configuration to use. For more information, please
                               refer to the documentation for the dataset you are using.
   :type weather_data_config: str
   :param years: The years to download.
                 For example, `slice(2000, 2010)` will download all data from 2000 to 2010.
   :type years: slice
   :param months: The months to download.
                  For example, `slice(1, 12)` will download all data from January to December.
                  Defaults to `slice(1, 12)`.
   :type months: slice, optional
   :param opendap: Whether to use OpenDAP protocol for downloading.
                   Defaults to `False`.
   :type opendap: bool, optional
   :param bounds: The bounds to download.
                  For example, `[-180, 90, 180, -90]` will download all data from the entire globe.
                  If omitted, global data will be downloaded.
   :type bounds: Optional[Iterable], optional


   .. py:attribute:: module


   .. py:attribute:: config


   .. py:attribute:: dataset_module


   .. py:attribute:: weatherconfig


   .. py:attribute:: datadir
      :type:  str


   .. py:attribute:: opendap


   .. py:attribute:: years


   .. py:attribute:: months


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



   .. py:attribute:: toDownload
      :value: []



   .. py:attribute:: downloadedFiles
      :value: []



   .. py:attribute:: totalFiles
      :value: []



   .. py:attribute:: incomplete_count
      :value: 0



   .. py:attribute:: step


   .. py:attribute:: yrs


   .. py:attribute:: mos


   .. py:property:: meta_data_config
      Metadata configuration for dataset.


   .. py:property:: weather_data_config
      :type: dict

      Weather data config for dataset.


   .. py:property:: projection
      :type: str

      Projection for dataset.


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


   .. py:property:: extent
      :type: collections.abc.Iterable[float]

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

Methods
-------

.. autoapisummary::

   geodata.Dataset.datasetfn
   geodata.Dataset.datasetfn_opendap
   geodata.Dataset.get_data
   geodata.Dataset.trim_variables
   geodata.Dataset.grid_coordinates
   geodata.Dataset.grid_cells


