doppy 0.5.0__tar.gz → 0.5.2__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 doppy might be problematic. Click here for more details.

Files changed (44) hide show
  1. {doppy-0.5.0 → doppy-0.5.2}/Cargo.lock +2 -2
  2. {doppy-0.5.0 → doppy-0.5.2}/Cargo.toml +1 -1
  3. {doppy-0.5.0 → doppy-0.5.2}/PKG-INFO +1 -1
  4. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/netcdf.py +1 -0
  5. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/product/turbulence.py +13 -14
  6. {doppy-0.5.0 → doppy-0.5.2}/LICENSE +0 -0
  7. {doppy-0.5.0 → doppy-0.5.2}/README.md +0 -0
  8. {doppy-0.5.0 → doppy-0.5.2}/crates/doppy_rs/Cargo.toml +0 -0
  9. {doppy-0.5.0 → doppy-0.5.2}/crates/doppy_rs/src/lib.rs +0 -0
  10. {doppy-0.5.0 → doppy-0.5.2}/crates/doppy_rs/src/raw/halo_hpl.rs +0 -0
  11. {doppy-0.5.0 → doppy-0.5.2}/crates/doppy_rs/src/raw/wls70.rs +0 -0
  12. {doppy-0.5.0 → doppy-0.5.2}/crates/doppy_rs/src/raw.rs +0 -0
  13. {doppy-0.5.0 → doppy-0.5.2}/crates/doprs/.gitignore +0 -0
  14. {doppy-0.5.0 → doppy-0.5.2}/crates/doprs/Cargo.toml +0 -0
  15. {doppy-0.5.0 → doppy-0.5.2}/crates/doprs/src/lib.rs +0 -0
  16. {doppy-0.5.0 → doppy-0.5.2}/crates/doprs/src/raw/error.rs +0 -0
  17. {doppy-0.5.0 → doppy-0.5.2}/crates/doprs/src/raw/halo_hpl.rs +0 -0
  18. {doppy-0.5.0 → doppy-0.5.2}/crates/doprs/src/raw/wls70.rs +0 -0
  19. {doppy-0.5.0 → doppy-0.5.2}/crates/doprs/src/raw.rs +0 -0
  20. {doppy-0.5.0 → doppy-0.5.2}/pyproject.toml +0 -0
  21. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/__init__.py +0 -0
  22. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/__main__.py +0 -0
  23. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/bench.py +0 -0
  24. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/data/__init__.py +0 -0
  25. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/data/api.py +0 -0
  26. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/data/cache.py +0 -0
  27. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/data/exceptions.py +0 -0
  28. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/defaults.py +0 -0
  29. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/exceptions.py +0 -0
  30. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/options.py +0 -0
  31. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/product/__init__.py +0 -0
  32. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/product/noise_utils.py +0 -0
  33. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/product/stare.py +0 -0
  34. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/product/stare_depol.py +0 -0
  35. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/product/wind.py +0 -0
  36. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/py.typed +0 -0
  37. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/raw/__init__.py +0 -0
  38. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/raw/halo_bg.py +0 -0
  39. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/raw/halo_hpl.py +0 -0
  40. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/raw/halo_sys_params.py +0 -0
  41. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/raw/utils.py +0 -0
  42. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/raw/windcube.py +0 -0
  43. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/raw/wls70.py +0 -0
  44. {doppy-0.5.0 → doppy-0.5.2}/src/doppy/utils.py +0 -0
@@ -106,7 +106,7 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
106
106
 
107
107
  [[package]]
108
108
  name = "doppy_rs"
109
- version = "0.5.0"
109
+ version = "0.5.2"
110
110
  dependencies = [
111
111
  "doprs",
112
112
  "numpy",
@@ -115,7 +115,7 @@ dependencies = [
115
115
 
116
116
  [[package]]
117
117
  name = "doprs"
118
- version = "0.5.0"
118
+ version = "0.5.2"
119
119
  dependencies = [
120
120
  "chrono",
121
121
  "rayon",
@@ -4,6 +4,6 @@ resolver = "2"
4
4
 
5
5
  [workspace.package]
6
6
  edition = "2021"
7
- version = "0.5.0"
7
+ version = "0.5.2"
8
8
  authors = ["Niko Leskinen <niko.leskinen@fmi.fi>"]
9
9
  license-file = "LICENSE"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: doppy
3
- Version: 0.5.0
3
+ Version: 0.5.2
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: Programming Language :: Python :: 3.10
@@ -56,6 +56,7 @@ class Dataset:
56
56
  var = self.nc.createVariable(name, dtype, dimensions, compression="zlib")
57
57
  var.units = units
58
58
  var.calendar = calendar
59
+ var.axis = "T"
59
60
  var[:] = time
60
61
  if standard_name is not None:
61
62
  var.standard_name = standard_name
@@ -1,4 +1,3 @@
1
- # type: ignore
2
1
  from __future__ import annotations
3
2
 
4
3
  from dataclasses import dataclass
@@ -94,18 +93,18 @@ def _compute_variance(vert: VerticalWind, period: float) -> VarResult:
94
93
  N_cumsum = N_i.cumsum(axis=0)
95
94
 
96
95
  def N_func(i: int, j: int) -> npt.NDArray[np.float64]:
97
- return N_cumsum[j] - N_cumsum[i] + N_i[i]
96
+ return np.array(N_cumsum[j] - N_cumsum[i] + N_i[i], dtype=np.float64)
98
97
 
99
98
  def S(i: int, j: int) -> npt.NDArray[np.float64]:
100
- return X_cumsum[j] - X_cumsum[i] + X[i]
99
+ return np.array(X_cumsum[j] - X_cumsum[i] + X[i], dtype=np.float64)
101
100
 
102
101
  def S2(i: int, j: int) -> npt.NDArray[np.float64]:
103
- return X2_cumsum[j] - X2_cumsum[i] + X2[i]
102
+ return np.array(X2_cumsum[j] - X2_cumsum[i] + X2[i], dtype=np.float64)
104
103
 
105
104
  def var_ij(i: int, j: int) -> npt.NDArray[np.float64]:
106
105
  N = N_func(i, j)
107
106
  with np.errstate(invalid="ignore"):
108
- return (S2(i, j) - S(i, j) ** 2 / N) / N
107
+ return np.array((S2(i, j) - S(i, j) ** 2 / N) / N, dtype=np.float64)
109
108
 
110
109
  half_period = np.timedelta64(int(1e6 * period / 2), "us")
111
110
  period_start = np.full(vert.w.shape, np.datetime64("NaT", "us"))
@@ -147,7 +146,7 @@ def _length_scale_low(
147
146
 
148
147
  def _preprocess_horiontal_wind(
149
148
  vert: VerticalWind, hori: HorizontalWind, options: Options
150
- ):
149
+ ) -> npt.NDArray[np.float64]:
151
150
  if np.isnan(hori.V).any():
152
151
  raise ValueError("horizontal wind speed cannot contains NaNs")
153
152
  trg_points = np.meshgrid(vert.time, vert.height, indexing="ij")
@@ -186,8 +185,8 @@ def _rolling_mean_over_time(
186
185
 
187
186
  S = arr.cumsum(axis=0)
188
187
 
189
- def rolling_mean(i: int, j: int) -> npt.NDArray[np.flaat64]:
190
- return (S[j] - S[i] + arr[i]) / (j - i + 1)
188
+ def rolling_mean(i: int, j: int) -> npt.NDArray[np.float64]:
189
+ return np.array((S[j] - S[i] + arr[i]) / (j - i + 1), dtype=np.float64)
191
190
 
192
191
  half_period = np.timedelta64(int(period * 0.5e6), "us")
193
192
  rol_mean = np.full(arr.shape, np.nan, dtype=np.float64)
@@ -208,7 +207,7 @@ def _compute_dissipation_rate(
208
207
  variance: npt.NDArray[np.float64],
209
208
  length_scale_lower: npt.NDArray[np.float64],
210
209
  length_scale_upper: npt.NDArray[np.float64],
211
- ):
210
+ ) -> npt.NDArray[np.float64]:
212
211
  """
213
212
  Parameters
214
213
  ----------
@@ -225,10 +224,10 @@ def _compute_dissipation_rate(
225
224
  * (length_scale_upper ** (2 / 3) - length_scale_lower ** (2 / 3))
226
225
  ** (-3 / 2)
227
226
  )
228
- return dr
227
+ return np.array(dr, dtype=np.float64)
229
228
 
230
229
 
231
- def _next_valid_from_mask(mask):
230
+ def _next_valid_from_mask(mask: npt.NDArray[np.bool_]) -> npt.NDArray[np.int64]:
232
231
  """
233
232
  mask[t,v] (time,value)
234
233
 
@@ -244,10 +243,10 @@ def _next_valid_from_mask(mask):
244
243
  for t in reversed(range(n - 1)):
245
244
  N[t][~mask[t]] = t
246
245
  N[t][mask[t]] = N[t + 1][mask[t]]
247
- return N
246
+ return np.array(N, dtype=np.int64)
248
247
 
249
248
 
250
- def _prev_valid_from_mask(mask):
249
+ def _prev_valid_from_mask(mask: npt.NDArray[np.bool_]) -> npt.NDArray[np.int64]:
251
250
  """
252
251
  mask[t,v] (time,value)
253
252
 
@@ -262,4 +261,4 @@ def _prev_valid_from_mask(mask):
262
261
  for t in range(1, n):
263
262
  N[t][~mask[t]] = t
264
263
  N[t][mask[t]] = N[t - 1][mask[t]]
265
- return N
264
+ return np.array(N, dtype=np.int64)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes