cavapy 1.1.0__py3-none-any.whl → 1.1.5__py3-none-any.whl

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 cavapy might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cavapy
3
- Version: 1.1.0
3
+ Version: 1.1.5
4
4
  Summary: CAVA Python package. Retrive climate data.
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -100,6 +100,13 @@ The get_climate_data function performs automatically:
100
100
  - Convert into a Gregorian calendar (CORDEX-CORE models do not have a full 365 days calendar) through linear interpolation
101
101
  - Bias correction using the empirical quantile mapping (optional)
102
102
 
103
+ ### Parallelization strategy
104
+ - If you request a single model/RCP combination, cavapy parallelizes **across variables** (one process per variable).
105
+ - If you request multiple models and/or RCPs, cavapy parallelizes **across combo-variable tasks** (one process per variable per model), capped globally.
106
+ - If `num_processes <= 1` or only one variable is requested, variables run sequentially (even for a single combo).
107
+ - By default, up to **12 total processes** are used (capped by number of combo-variable tasks).
108
+ - Inside each process, a thread pool handles per-variable downloads and observation/model fetches concurrently.
109
+
103
110
  ## Example usage
104
111
 
105
112
  Depending on the interest, downloading climate data can be done in a few different ways. Note that GCM stands for General Circulation Model while RCM stands for Regional Climate Model. As the climate data comes from the CORDEX-CORE initiative, users can choose between 3 different GCMs downscaled with two RCMs. In total, there are six simulations for any given domain (except for CAS-22 where only three are available).
@@ -238,6 +245,44 @@ import cavapy
238
245
  Togo_climate_data = cavapy.get_climate_data(country="Togo", variables=["tasmax", "pr"], obs=True, years_obs=range(1980,2019))
239
246
  ```
240
247
 
248
+ ### Multiple models and/or RCPs
249
+
250
+ You can pass lists (or None) to `rcp`, `gcm`, and `rcm`. If multiple combinations are requested,
251
+ the return structure becomes nested:
252
+
253
+ ```
254
+ results[rcp][f"{gcm}-{rcm}"][variable] -> DataArray
255
+ ```
256
+
257
+ Example: all models and both RCPs for Togo (AFR-22):
258
+ ```
259
+ import cavapy
260
+
261
+ data = cavapy.get_climate_data(
262
+ country="Togo",
263
+ cordex_domain="AFR-22",
264
+ rcp=None, # all RCPs
265
+ gcm=None, # all GCMs
266
+ rcm=None, # all RCMs
267
+ years_up_to=2030,
268
+ historical=True,
269
+ dataset="CORDEX-CORE",
270
+ )
271
+ ```
272
+
273
+ Example: specific models and RCPs:
274
+ ```
275
+ data = cavapy.get_climate_data(
276
+ country="Togo",
277
+ cordex_domain="AFR-22",
278
+ rcp=["rcp26", "rcp85"],
279
+ gcm=["MPI", "MOHC"],
280
+ rcm=["Reg", "REMO"],
281
+ years_up_to=2030,
282
+ historical=True,
283
+ )
284
+ ```
285
+
241
286
  ## Plotting Functionality
242
287
 
243
288
  `cavapy` now includes built-in plotting functions to easily visualize your climate data as maps and time series. The plotting functions work seamlessly with the data returned by `get_climate_data()`. **However, if your main goal is visualisation, we strongly encourage you to check out [CAVAanalytics](https://risk-team.github.io/CAVAanalytics/), our R package**.
@@ -0,0 +1,5 @@
1
+ cavapy.py,sha256=SdCVxMgMBGkQA97mrWwnazLOmfwphWI7yFSisfFihpg,19586
2
+ cavapy-1.1.5.dist-info/METADATA,sha256=2ftyfOcFYQX8bP-J99c9Bwh8nOwRgpfjpFXNKyLixaU,12184
3
+ cavapy-1.1.5.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
4
+ cavapy-1.1.5.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
5
+ cavapy-1.1.5.dist-info/RECORD,,