geodata.dataset.Dataset#
- class geodata.dataset.Dataset(module: str, weather_data_config: str, years: slice, months: slice | None = None, opendap: bool = False, bounds: collections.abc.Iterable | None = 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.
- Parameters:
module (str) – Name of dataset module
weather_data_config (str) – The type of weather data configuration to use. For more information, please refer to the documentation for the dataset you are using.
years (slice) – The years to download. For example, slice(2000, 2010) will download all data from 2000 to 2010.
months (slice, optional) – The months to download. For example, slice(1, 12) will download all data from January to December. Defaults to slice(1, 12).
opendap (bool, optional) – Whether to use OpenDAP protocol for downloading. Defaults to False.
bounds (Optional[Iterable], optional) – 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.
- module#
- config#
- dataset_module#
- weatherconfig#
- opendap#
- years#
- months#
- prepared = False#
- toDownload = []#
- downloadedFiles = []#
- totalFiles = []#
- incomplete_count = 0#
- step#
- yrs#
- mos#
- property meta_data_config#
- Metadata configuration for dataset.
- property shape#
- The shape of the Cutout by (y, x).
- property extent: collections.abc.Iterable[float]#
The extent of the Cutout by (x_min, x_max, y_min, y_max).
Methods#
|
Construct file name from template function in weather_data_config and args (yr, mo, day) |
|
Construct url for OpenDap protocol. Depends on datasetfn() |
|
Download data from server. |
Reduce size of file by trimming variables in file. |
|
Return grid coordinates of the Cutout. |
|
Return grid cells of the Cutout. |