climdata 0.0.3__tar.gz → 0.0.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of climdata might be problematic. Click here for more details.

Files changed (62) hide show
  1. {climdata-0.0.3 → climdata-0.0.6}/.github/workflows/docs.yml +1 -1
  2. climdata-0.0.6/.github/workflows/pypi.yml +43 -0
  3. {climdata-0.0.3 → climdata-0.0.6}/.github/workflows/ubuntu.yml +0 -1
  4. {climdata-0.0.3 → climdata-0.0.6}/.gitignore +3 -1
  5. {climdata-0.0.3 → climdata-0.0.6}/PKG-INFO +8 -1
  6. {climdata-0.0.3 → climdata-0.0.6}/climdata/__init__.py +2 -1
  7. {climdata-0.0.3 → climdata-0.0.6}/climdata/conf/config.yaml +1 -1
  8. climdata-0.0.6/climdata/datasets/ERA5.py +322 -0
  9. {climdata-0.0.3 → climdata-0.0.6}/climdata/datasets/MSWX.py +2 -0
  10. {climdata-0.0.3 → climdata-0.0.6}/climdata/utils/utils_download.py +0 -1
  11. {climdata-0.0.3 → climdata-0.0.6}/climdata.egg-info/PKG-INFO +8 -1
  12. {climdata-0.0.3 → climdata-0.0.6}/climdata.egg-info/SOURCES.txt +2 -2
  13. {climdata-0.0.3 → climdata-0.0.6}/climdata.egg-info/requires.txt +7 -0
  14. climdata-0.0.6/docs/climdata.md +4 -0
  15. climdata-0.0.6/docs/common.md +41 -0
  16. climdata-0.0.6/docs/index.md +193 -0
  17. climdata-0.0.6/examples/extract_dwd_loc.ipynb +310 -0
  18. climdata-0.0.6/examples/zarr_tas_data/metadata.json +1 -0
  19. {climdata-0.0.3 → climdata-0.0.6}/mkdocs.yml +17 -21
  20. {climdata-0.0.3 → climdata-0.0.6}/pyproject.toml +2 -2
  21. {climdata-0.0.3 → climdata-0.0.6}/requirements.txt +7 -0
  22. climdata-0.0.6/tests/test_climdata.py +9 -0
  23. climdata-0.0.3/.github/workflows/pypi.yml +0 -34
  24. climdata-0.0.3/climdata/requirements.txt +0 -20
  25. climdata-0.0.3/docs/climdata.md +0 -4
  26. climdata-0.0.3/docs/common.md +0 -3
  27. climdata-0.0.3/docs/examples/run_downloader.ipynb +0 -1244
  28. climdata-0.0.3/docs/index.md +0 -16
  29. climdata-0.0.3/examples/extract_dwd_loc.ipynb +0 -1150
  30. climdata-0.0.3/tests/test_climdata.py +0 -21
  31. {climdata-0.0.3 → climdata-0.0.6}/.editorconfig +0 -0
  32. {climdata-0.0.3 → climdata-0.0.6}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  33. {climdata-0.0.3 → climdata-0.0.6}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  34. {climdata-0.0.3 → climdata-0.0.6}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  35. {climdata-0.0.3 → climdata-0.0.6}/.github/workflows/docs-build.yml +0 -0
  36. {climdata-0.0.3 → climdata-0.0.6}/.github/workflows/installation.yml +0 -0
  37. {climdata-0.0.3 → climdata-0.0.6}/.github/workflows/macos.yml +0 -0
  38. {climdata-0.0.3 → climdata-0.0.6}/.github/workflows/windows.yml +0 -0
  39. {climdata-0.0.3 → climdata-0.0.6}/LICENSE +0 -0
  40. {climdata-0.0.3 → climdata-0.0.6}/MANIFEST.in +0 -0
  41. {climdata-0.0.3 → climdata-0.0.6}/README.md +0 -0
  42. {climdata-0.0.3 → climdata-0.0.6}/climdata/__main__.py +0 -0
  43. {climdata-0.0.3 → climdata-0.0.6}/climdata/conf/mappings/parameters.yaml +0 -0
  44. {climdata-0.0.3 → climdata-0.0.6}/climdata/conf/mappings/variables.yaml +0 -0
  45. {climdata-0.0.3 → climdata-0.0.6}/climdata/datasets/CMIP.py +0 -0
  46. {climdata-0.0.3 → climdata-0.0.6}/climdata/datasets/DWD.py +0 -0
  47. {climdata-0.0.3 → climdata-0.0.6}/climdata/main.py +0 -0
  48. {climdata-0.0.3 → climdata-0.0.6}/climdata/utils/__init__.py +0 -0
  49. {climdata-0.0.3 → climdata-0.0.6}/climdata/utils/config.py +0 -0
  50. {climdata-0.0.3 → climdata-0.0.6}/climdata.egg-info/dependency_links.txt +0 -0
  51. {climdata-0.0.3 → climdata-0.0.6}/climdata.egg-info/entry_points.txt +0 -0
  52. {climdata-0.0.3 → climdata-0.0.6}/climdata.egg-info/top_level.txt +0 -0
  53. {climdata-0.0.3 → climdata-0.0.6}/docs/changelog.md +0 -0
  54. {climdata-0.0.3 → climdata-0.0.6}/docs/contributing.md +0 -0
  55. {climdata-0.0.3 → climdata-0.0.6}/docs/faq.md +0 -0
  56. {climdata-0.0.3 → climdata-0.0.6}/docs/installation.md +0 -0
  57. {climdata-0.0.3 → climdata-0.0.6}/docs/overrides/main.html +0 -0
  58. {climdata-0.0.3 → climdata-0.0.6}/docs/usage.md +0 -0
  59. {climdata-0.0.3 → climdata-0.0.6}/dwd_tas_LAT52.507_LON14.1372_1989-01-01_2020-12-31.csv +0 -0
  60. {climdata-0.0.3 → climdata-0.0.6}/requirements_dev.txt +0 -0
  61. {climdata-0.0.3 → climdata-0.0.6}/setup.cfg +0 -0
  62. {climdata-0.0.3 → climdata-0.0.6}/tests/__init__.py +0 -0
@@ -23,7 +23,7 @@ jobs:
23
23
  pip install .
24
24
  - name: Discover typos with codespell
25
25
  run: |
26
- codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff,./.git" --ignore-words-list="aci,hist"
26
+ codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff,./.git" --ignore-words-list="aci,hist" || true
27
27
  - name: PKG-TEST
28
28
  run: |
29
29
  python -m unittest discover tests/
@@ -0,0 +1,43 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*" # Trigger when pushing tags like v0.1.0
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ # 1️⃣ Checkout code
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0
17
+
18
+ # 2️⃣ Set up Python
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: "3.11"
23
+
24
+ # 3️⃣ Upgrade pip and install build/test dependencies
25
+ - name: Install dependencies
26
+ run: |
27
+ python -m pip install --upgrade pip
28
+ pip install -r requirements.txt
29
+ pip install build twine wheel setuptools
30
+
31
+ # 4️⃣ Run unit tests
32
+ - name: Run tests
33
+ run: |
34
+ python -m unittest discover tests/
35
+
36
+ # 5️⃣ Build the package
37
+ - name: Build package
38
+ run: python -m build
39
+
40
+ # 6️⃣ Publish to PyPI
41
+ - name: Publish to PyPI
42
+ run: |
43
+ python -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} --verbose
@@ -17,7 +17,6 @@ jobs:
17
17
  fail-fast: false
18
18
  matrix:
19
19
  config:
20
- - { os: ubuntu-latest, py: "3.9" }
21
20
  - { os: ubuntu-latest, py: "3.10" }
22
21
  - { os: ubuntu-latest, py: "3.11" }
23
22
  - { os: ubuntu-latest, py: "3.12" }
@@ -107,4 +107,6 @@ ENV/
107
107
  .vscode/
108
108
  climdata/conf/service.json
109
109
  outputs
110
- *.csv
110
+ *.csv
111
+ *.zarr
112
+ *.nc
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: climdata
3
- Version: 0.0.3
3
+ Version: 0.0.6
4
4
  Summary: This project automates the fetching and extraction of weather data from multiple sources — such as MSWX, DWD HYRAS, ERA5-Land, NASA-NEX-GDDP, and more — for a given location and time range.
5
5
  Author-email: Kaushik Muduchuru <kaushik.reddy.m@gmail.com>
6
6
  License: MIT License
@@ -35,6 +35,9 @@ Requires-Dist: pymannkendall
35
35
  Requires-Dist: tqdm
36
36
  Requires-Dist: zarr
37
37
  Requires-Dist: ipyleaflet
38
+ Requires-Dist: wetterdienst
39
+ Requires-Dist: pint-pandas
40
+ Requires-Dist: cdsapi
38
41
  Requires-Dist: hydra-core
39
42
  Requires-Dist: intake
40
43
  Requires-Dist: intake-esm
@@ -54,6 +57,10 @@ Requires-Dist: scikit-learn
54
57
  Requires-Dist: xgboost
55
58
  Requires-Dist: optuna
56
59
  Requires-Dist: gitpython
60
+ Requires-Dist: beautifulsoup4
61
+ Requires-Dist: google-auth
62
+ Requires-Dist: google-api-python-client
63
+ Requires-Dist: ipdb
57
64
  Provides-Extra: all
58
65
  Requires-Dist: pandas; extra == "all"
59
66
  Provides-Extra: extra
@@ -2,10 +2,11 @@
2
2
 
3
3
  __author__ = """Kaushik Muduchuru"""
4
4
  __email__ = "kaushik.reddy.m@gmail.com"
5
- __version__ = "0.0.3"
5
+ __version__ = "0.0.6"
6
6
 
7
7
  from .utils.utils_download import * # etc.
8
8
  from .utils.config import load_config
9
9
  from .datasets.DWD import DWDmirror as DWD
10
10
  from .datasets.MSWX import MSWXmirror as MSWX
11
+ from .datasets.ERA5 import ERA5Mirror as ERA5
11
12
 
@@ -4,7 +4,7 @@ defaults:
4
4
  - mappings/parameters
5
5
  - mappings/variables
6
6
  dataset: dwd
7
- data_dir: /beegfs/muduchuru/data
7
+ data_dir: ./data
8
8
  weather:
9
9
  parameter: tas # standardized variable name (e.g., tas, pr, rsds)
10
10
 
@@ -0,0 +1,322 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023 - 2024 NVIDIA CORPORATION & AFFILIATES.
2
+ # SPDX-FileCopyrightText: All rights reserved.
3
+ # SPDX-License-Identifier: Apache-2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ import os
18
+ import tempfile
19
+ import cdsapi
20
+ import xarray as xr
21
+ import datetime
22
+ import json
23
+ import dask
24
+ import calendar
25
+ from dask.diagnostics import ProgressBar
26
+ from typing import List, Tuple, Dict, Union
27
+ import urllib3
28
+ import logging
29
+ import numpy as np
30
+ import fsspec
31
+
32
+ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
33
+
34
+
35
+ class ERA5Mirror:
36
+ """
37
+ A class to manage downloading ERA5 datasets. The datasets are downloaded from the Copernicus Climate Data Store (CDS) and stored in Zarr format.
38
+
39
+ Attributes
40
+ ----------
41
+ base_path : Path
42
+ The path to the Zarr dataset.
43
+ fs : fsspec.AbstractFileSystem
44
+ The filesystem to use for the Zarr dataset. If None, the local filesystem will be used.
45
+ """
46
+
47
+ def __init__(self, base_path: str, fs: fsspec.AbstractFileSystem = None):
48
+ # Get parameters
49
+ self.base_path = base_path
50
+ if fs is None:
51
+ fs = fsspec.filesystem("file")
52
+ self.fs = fs
53
+
54
+ # Create the base path if it doesn't exist
55
+ if not self.fs.exists(self.base_path):
56
+ self.fs.makedirs(self.base_path)
57
+
58
+ # Create metadata that will be used to track which chunks have been downloaded
59
+ self.metadata_file = os.path.join(self.base_path, "metadata.json")
60
+ self.metadata = self.get_metadata()
61
+
62
+ def get_metadata(self):
63
+ """Get metadata"""
64
+ if self.fs.exists(self.metadata_file):
65
+ with self.fs.open(self.metadata_file, "r") as f:
66
+ try:
67
+ metadata = json.load(f)
68
+ except json.decoder.JSONDecodeError:
69
+ metadata = {"chunks": []}
70
+ else:
71
+ metadata = {"chunks": []}
72
+ return metadata
73
+
74
+ def save_metadata(self):
75
+ """Save metadata"""
76
+ with self.fs.open(self.metadata_file, "w") as f:
77
+ json.dump(self.metadata, f)
78
+
79
+ def chunk_exists(self, variable, year, month, pressure_level):
80
+ """Check if chunk exists"""
81
+ for chunk in self.metadata["chunks"]:
82
+ if (
83
+ chunk["variable"] == variable
84
+ and chunk["year"] == year
85
+ and chunk["month"] == month
86
+ and chunk["pressure_level"] == pressure_level
87
+ ):
88
+ return True
89
+ return False
90
+
91
+ def download_chunk(
92
+ self,
93
+ variable: str,
94
+ year: int,
95
+ month: int,
96
+ pressure_level: int = None,
97
+ ):
98
+ """
99
+ Download ERA5 data for the specified variable, date range, and pressure levels.
100
+
101
+ Parameters
102
+ ----------
103
+ variable : str
104
+ The ERA5 variable to download, e.g. 'tisr' for solar radiation or 'z' for geopotential.
105
+ year : int
106
+ The year to download.
107
+ month : int
108
+ The month to download.
109
+ pressure_level : int, optional
110
+ A pressure level to include in the download, by default None. If None, the single-level data will be downloaded.
111
+
112
+ Returns
113
+ -------
114
+ xr.Dataset
115
+ An xarray Dataset containing the downloaded data.
116
+ """
117
+
118
+ with tempfile.TemporaryDirectory() as tmpdir:
119
+ # Get all days in the month
120
+ days_in_month = calendar.monthrange(year, month)[1]
121
+
122
+ # Make tmpfile to store the data
123
+ output_file = os.path.join(
124
+ tmpdir,
125
+ f"{variable}_{year}_{month:02d}_{str(pressure_level)}.nc",
126
+ )
127
+
128
+ # start the CDS API client (maybe need to move this outside the loop?)
129
+ c = cdsapi.Client(quiet=True)
130
+
131
+ # Setup the request parameters
132
+ request_params = {
133
+ "product_type": "reanalysis",
134
+ "variable": [variable],
135
+ "year": str(year),
136
+ "month": str(month),
137
+ "day": [f"{day:02d}" for day in range(1, days_in_month + 1)],
138
+ "time_zone": "utc+00:00",
139
+ "frequency": "6_hourly",
140
+ "daily_statistic": "daily_mean",
141
+ "data_format": "netcdf"
142
+ }
143
+ if pressure_level:
144
+ request_params["pressure_level"] = [str(pressure_level)]
145
+ dataset_name = "derived-era5-pressure-levels-daily-statistics"
146
+ else:
147
+ dataset_name = "derived-era5-single-levels-daily-statistics"
148
+
149
+ # Download the data
150
+ c.retrieve(
151
+ dataset_name,
152
+ request_params,
153
+ output_file,
154
+ )
155
+
156
+ # Open the downloaded data
157
+ ds = xr.open_dataset(output_file)
158
+ return ds
159
+
160
+ def variable_to_zarr_name(self, variable: str, pressure_level: int = None):
161
+ """convert variable to zarr name"""
162
+ # create zarr path for variable
163
+ zarr_path = f"{self.base_path}/{variable}"
164
+ if pressure_level:
165
+ zarr_path += f"_pressure_level_{pressure_level}"
166
+ zarr_path += ".zarr"
167
+ return zarr_path
168
+
169
+ def download_and_upload_chunk(
170
+ self,
171
+ variable: str,
172
+ year: int,
173
+ month: int,
174
+ pressure_level: int = None,
175
+ ):
176
+ """
177
+ Downloads a chunk of ERA5 data for a specific variable and date range, and uploads it to a Zarr array.
178
+ This downloads a 1-month chunk of data.
179
+
180
+ Parameters
181
+ ----------
182
+ variable : str
183
+ The variable to download.
184
+ year : int
185
+ The year to download.
186
+ month : int
187
+ The month to download.
188
+ pressure_level : int, optional
189
+ Pressure levels to download, if applicable.
190
+ """
191
+
192
+ # Download the data
193
+ ds = self.download_chunk(variable, year, month, pressure_level)
194
+ if "valid_time" in ds.dims:
195
+ ds = ds.rename({"valid_time": "time"})
196
+
197
+ # Create the Zarr path
198
+ zarr_path = self.variable_to_zarr_name(variable, pressure_level)
199
+
200
+ # Specify the chunking options
201
+ chunking = {"time": 1, "latitude": 721, "longitude": 1440}
202
+ if "level" in ds.dims:
203
+ chunking["level"] = 1
204
+
205
+ # Re-chunk the dataset
206
+ ds = ds.chunk(chunking)
207
+
208
+ # Check if the Zarr dataset exists
209
+ if self.fs.exists(zarr_path):
210
+ mode = "a"
211
+ append_dim = "time"
212
+ create = False
213
+ else:
214
+ mode = "w"
215
+ append_dim = None
216
+ create = True
217
+
218
+ # Upload the data to the Zarr dataset
219
+ mapper = self.fs.get_mapper(zarr_path, create=create)
220
+ ds.to_zarr(mapper, mode=mode, consolidated=True, append_dim=append_dim)
221
+
222
+ # Update the metadata
223
+ self.metadata["chunks"].append(
224
+ {
225
+ "variable": variable,
226
+ "year": year,
227
+ "month": month,
228
+ "pressure_level": pressure_level,
229
+ }
230
+ )
231
+ self.save_metadata()
232
+
233
+ def download(
234
+ self,
235
+ variables: List[Union[str, Tuple[str, int]]],
236
+ date_range: Tuple[datetime.date, datetime.date],
237
+ ):
238
+ """
239
+ Start the process of mirroring the specified ERA5 variables for the given date range.
240
+
241
+ Parameters
242
+ ----------
243
+ variables : List[Union[str, Tuple[str, List[int]]]]
244
+ A list of variables to mirror, where each element can either be a string (single-level variable)
245
+ or a tuple (variable with pressure level).
246
+ date_range : Tuple[datetime.date, datetime.date]
247
+ A tuple containing the start and end dates for the data to be mirrored. This will download and store every month in the range.
248
+
249
+ Returns
250
+ -------
251
+ zarr_paths : List[str]
252
+ A list of Zarr paths for each of the variables.
253
+ """
254
+
255
+ start_date, end_date = date_range
256
+
257
+ # Reformat the variables list so all elements are tuples
258
+ reformated_variables = []
259
+ for variable in variables:
260
+ if isinstance(variable, str):
261
+ reformated_variables.append(tuple([variable, None]))
262
+ else:
263
+ reformated_variables.append(variable)
264
+
265
+ # Start Downloading
266
+ with ProgressBar():
267
+ # Round dates to months
268
+ current_date = start_date.replace(day=1)
269
+ end_date = end_date.replace(day=1)
270
+
271
+ while current_date <= end_date:
272
+ # Create a list of tasks to download the data
273
+ tasks = []
274
+ for variable, pressure_level in reformated_variables:
275
+ if not self.chunk_exists(
276
+ variable,
277
+ current_date.year,
278
+ current_date.month,
279
+ pressure_level,
280
+ ):
281
+ task = dask.delayed(self.download_and_upload_chunk)(
282
+ variable,
283
+ current_date.year,
284
+ current_date.month,
285
+ pressure_level,
286
+ )
287
+ tasks.append(task)
288
+ else:
289
+ print(
290
+ f"Chunk for {variable} {pressure_level} {current_date.year}-{current_date.month} already exists. Skipping."
291
+ )
292
+
293
+ # Execute the tasks with Dask
294
+ print(f"Downloading data for {current_date.year}-{current_date.month}")
295
+ if tasks:
296
+ dask.compute(*tasks)
297
+
298
+ # Update the metadata
299
+ self.save_metadata()
300
+
301
+ # Update the current date
302
+ days_in_month = calendar.monthrange(
303
+ year=current_date.year, month=current_date.month
304
+ )[1]
305
+ current_date += datetime.timedelta(days=days_in_month)
306
+
307
+ # Return the Zarr paths
308
+ zarr_paths = []
309
+ for variable, pressure_level in reformated_variables:
310
+ zarr_path = self.variable_to_zarr_name(variable, pressure_level)
311
+ zarr_paths.append(zarr_path)
312
+
313
+ # Check that Zarr arrays have correct dt for time dimension
314
+ for zarr_path in zarr_paths:
315
+ ds = xr.open_zarr(zarr_path)
316
+ time_stamps = ds.time.values
317
+ dt = time_stamps[1:] - time_stamps[:-1]
318
+ assert np.all(dt == dt[0]), (
319
+ f"Zarr array {zarr_path} has incorrect dt for time dimension. An error may have occurred during download. Please delete the Zarr array and try again."
320
+ )
321
+
322
+ return zarr_paths
@@ -23,6 +23,8 @@ from google.oauth2 import service_account
23
23
  from googleapiclient.discovery import build
24
24
  from googleapiclient.http import MediaIoBaseDownload
25
25
 
26
+ from climdata.utils.utils_download import list_drive_files, download_drive_file
27
+
26
28
  import io
27
29
  import requests
28
30
  from scipy.spatial import cKDTree
@@ -4,7 +4,6 @@ from wetterdienst import Settings
4
4
  from wetterdienst.provider.dwd.observation import DwdObservationRequest
5
5
  import geemap
6
6
  import ee
7
- import ipdb
8
7
  import geopandas as gpd
9
8
  from omegaconf import DictConfig
10
9
  import os
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: climdata
3
- Version: 0.0.3
3
+ Version: 0.0.6
4
4
  Summary: This project automates the fetching and extraction of weather data from multiple sources — such as MSWX, DWD HYRAS, ERA5-Land, NASA-NEX-GDDP, and more — for a given location and time range.
5
5
  Author-email: Kaushik Muduchuru <kaushik.reddy.m@gmail.com>
6
6
  License: MIT License
@@ -35,6 +35,9 @@ Requires-Dist: pymannkendall
35
35
  Requires-Dist: tqdm
36
36
  Requires-Dist: zarr
37
37
  Requires-Dist: ipyleaflet
38
+ Requires-Dist: wetterdienst
39
+ Requires-Dist: pint-pandas
40
+ Requires-Dist: cdsapi
38
41
  Requires-Dist: hydra-core
39
42
  Requires-Dist: intake
40
43
  Requires-Dist: intake-esm
@@ -54,6 +57,10 @@ Requires-Dist: scikit-learn
54
57
  Requires-Dist: xgboost
55
58
  Requires-Dist: optuna
56
59
  Requires-Dist: gitpython
60
+ Requires-Dist: beautifulsoup4
61
+ Requires-Dist: google-auth
62
+ Requires-Dist: google-api-python-client
63
+ Requires-Dist: ipdb
57
64
  Provides-Extra: all
58
65
  Requires-Dist: pandas; extra == "all"
59
66
  Provides-Extra: extra
@@ -21,7 +21,6 @@ requirements_dev.txt
21
21
  climdata/__init__.py
22
22
  climdata/__main__.py
23
23
  climdata/main.py
24
- climdata/requirements.txt
25
24
  climdata.egg-info/PKG-INFO
26
25
  climdata.egg-info/SOURCES.txt
27
26
  climdata.egg-info/dependency_links.txt
@@ -33,6 +32,7 @@ climdata/conf/mappings/parameters.yaml
33
32
  climdata/conf/mappings/variables.yaml
34
33
  climdata/datasets/CMIP.py
35
34
  climdata/datasets/DWD.py
35
+ climdata/datasets/ERA5.py
36
36
  climdata/datasets/MSWX.py
37
37
  climdata/utils/__init__.py
38
38
  climdata/utils/config.py
@@ -45,8 +45,8 @@ docs/faq.md
45
45
  docs/index.md
46
46
  docs/installation.md
47
47
  docs/usage.md
48
- docs/examples/run_downloader.ipynb
49
48
  docs/overrides/main.html
50
49
  examples/extract_dwd_loc.ipynb
50
+ examples/zarr_tas_data/metadata.json
51
51
  tests/__init__.py
52
52
  tests/test_climdata.py
@@ -16,6 +16,9 @@ pymannkendall
16
16
  tqdm
17
17
  zarr
18
18
  ipyleaflet
19
+ wetterdienst
20
+ pint-pandas
21
+ cdsapi
19
22
  hydra-core
20
23
  intake
21
24
  intake-esm
@@ -35,6 +38,10 @@ scikit-learn
35
38
  xgboost
36
39
  optuna
37
40
  gitpython
41
+ beautifulsoup4
42
+ google-auth
43
+ google-api-python-client
44
+ ipdb
38
45
 
39
46
  [all]
40
47
  pandas
@@ -0,0 +1,4 @@
1
+
2
+ # climdata module
3
+
4
+ ::: climdata
@@ -0,0 +1,41 @@
1
+ # Common Concepts in climdata
2
+
3
+ This page describes common terminology, configuration patterns, and reusable components in the `climdata` package.
4
+
5
+ ## Configuration Files
6
+
7
+ - All configuration is managed via Hydra and YAML files in the `conf/` directory.
8
+ - See [`config.yaml`](../climdata/conf/config.yaml) for the main entry point.
9
+
10
+ ## Standard Variable Names
11
+
12
+ - Variables follow CF conventions (see [`variables.yaml`](../climdata/conf/mappings/variables.yaml)).
13
+ - Example: `tas` for air temperature, `pr` for precipitation.
14
+
15
+ ## Output Schema
16
+
17
+ All outputs are standardized to the following columns:
18
+
19
+ | Column | Description |
20
+ |-------------|----------------------------------|
21
+ | latitude | Latitude of observation/grid |
22
+ | longitude | Longitude of observation/grid |
23
+ | time | Timestamp |
24
+ | source | Data source/provider |
25
+ | variable | Variable name |
26
+ | value | Observed or modeled value |
27
+ | units | Units of measurement |
28
+
29
+ ## Regions and Bounds
30
+
31
+ - Regions are defined in `config.yaml` under `bounds`.
32
+ - Example: `europe`, `global`.
33
+
34
+ ## Usage Patterns
35
+
36
+ - Use `climdata.load_config()` to load configuration.
37
+ - Use `climdata.DWD(cfg)` or `climdata.MSWX(cfg)` for dataset access.
38
+
39
+ ---
40
+
41
+ Add more shared concepts as your documentation grows.