doppy 0.3.4__cp310-abi3-macosx_11_0_arm64.whl → 0.3.5__cp310-abi3-macosx_11_0_arm64.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 doppy might be problematic. Click here for more details.

doppy/raw/windcube.py CHANGED
@@ -160,11 +160,14 @@ def _from_vad_src(nc: Dataset) -> WindCube:
160
160
  elevation_list = []
161
161
  range_list = []
162
162
  height_list = []
163
+ time_reference = (
164
+ nc["time_reference"][:] if "time_reference" in nc.variables else None
165
+ )
163
166
 
164
167
  for i, group in enumerate(
165
168
  nc[group] for group in (nc.variables["sweep_group_name"][:])
166
169
  ):
167
- time_list.append(_extract_datetime64_or_raise(group["time"]))
170
+ time_list.append(_extract_datetime64_or_raise(group["time"], time_reference))
168
171
  radial_wind_speed_list.append(
169
172
  _extract_float64_or_raise(group["radial_wind_speed"])
170
173
  )
@@ -198,12 +201,21 @@ def _from_vad_src(nc: Dataset) -> WindCube:
198
201
  )
199
202
 
200
203
 
201
- def _extract_datetime64_or_raise(nc: Dataset) -> npt.NDArray[np.datetime64]:
204
+ def _extract_datetime64_or_raise(
205
+ nc: Dataset, time_reference: str | None
206
+ ) -> npt.NDArray[np.datetime64]:
202
207
  match nc.name:
203
208
  case "time":
204
209
  if nc.dimensions != ("time",):
205
210
  raise ValueError
206
- return np.array(num2date(nc[:], units=nc.units), dtype="datetime64[us]")
211
+
212
+ units = nc.units
213
+ if "time_reference" in nc.units:
214
+ if time_reference is not None:
215
+ units = nc.units.replace("time_reference", time_reference)
216
+ else:
217
+ raise ValueError("Unknown time_reference")
218
+ return np.array(num2date(nc[:], units=units), dtype="datetime64[us]")
207
219
  case _:
208
220
  raise ValueError(f"Unexpected variable name {nc.name}")
209
221
 
doppy/rs.abi3.so CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: doppy
3
- Version: 0.3.4
3
+ Version: 0.3.5
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: Programming Language :: Python :: 3.10
@@ -1,7 +1,7 @@
1
- doppy-0.3.4.dist-info/METADATA,sha256=FxaqzuMbp4XSHF2H6_9NcWf_r4XED1rUPk0TAxuvDRQ,4175
2
- doppy-0.3.4.dist-info/WHEEL,sha256=GmPQBnUDZgDWUSmU3r_BHIfcmbjw_LVs138d_NT7BE4,103
3
- doppy-0.3.4.dist-info/entry_points.txt,sha256=9b_Ca7vJoh6AwL3W8qAPh_UmJ_1Pa6hi-TDfCTDjvSk,43
4
- doppy-0.3.4.dist-info/licenses/LICENSE,sha256=V-0iroMNMI8ctnLgUau1kdFvwhkYhr9vi-5kWKxw2wc,1089
1
+ doppy-0.3.5.dist-info/METADATA,sha256=Elbf8GWld1QLg3qAvBvl2_Wpp59I2nexthXgAaWXSfU,4175
2
+ doppy-0.3.5.dist-info/WHEEL,sha256=GmPQBnUDZgDWUSmU3r_BHIfcmbjw_LVs138d_NT7BE4,103
3
+ doppy-0.3.5.dist-info/entry_points.txt,sha256=9b_Ca7vJoh6AwL3W8qAPh_UmJ_1Pa6hi-TDfCTDjvSk,43
4
+ doppy-0.3.5.dist-info/licenses/LICENSE,sha256=V-0iroMNMI8ctnLgUau1kdFvwhkYhr9vi-5kWKxw2wc,1089
5
5
  doppy/options.py,sha256=73BDODO4OYHn2qOshhwz6u6G3J1kNd3uj6P0a3V4HBE,205
6
6
  doppy/__init__.py,sha256=Z9aEUlbPRWRUAoB8_-djkgrJuS4-6pjem4-mVSB6Z9I,191
7
7
  doppy/product/wind.py,sha256=dRXXBGRN5GY0ICqkdqEikS-UaKz0jM3V-qc6IKXMIPw,16030
@@ -23,7 +23,7 @@ doppy/raw/__init__.py,sha256=AMHyONuH0aUJUQz20EhlANaq9UjWJtSZf7kWUVx3ZjA,228
23
23
  doppy/raw/wls70.py,sha256=PMyr_JYTiKuYv1JpWHgVX6OA5zU83DOnr8vBCxFyFAw,7420
24
24
  doppy/raw/halo_bg.py,sha256=8t9j-SUF1yJht3vrT6KAYJQyxcg3W-0zr8h0jAEhWes,5815
25
25
  doppy/raw/halo_hpl.py,sha256=YFTepAWXvIfAVGgLZCadsc1d-VaOh7j2RB3cpb6Sv6k,18486
26
- doppy/raw/windcube.py,sha256=639hAeHT6Cpcb0jW4UQVBHuJFmloP-WkK02bPBKFLP4,10002
26
+ doppy/raw/windcube.py,sha256=MlN6glTwlfoqFL7ejehqQdRECMAt3Jt5nr5WO6MTCfg,10442
27
27
  doppy/__main__.py,sha256=zrKQJVj0k0ypBQCGK65Czt9G9FZ_qx3ussw6Q9VJ14g,346
28
- doppy/rs.abi3.so,sha256=KVRkYebDjIe751ChFHZRYVg7PGtGZxsio8k2o3a27pE,2566816
29
- doppy-0.3.4.dist-info/RECORD,,
28
+ doppy/rs.abi3.so,sha256=4pxdvdGgdcWGr_mOb7WFbpp2PoxyL645TGBChzPqLxA,2566816
29
+ doppy-0.3.5.dist-info/RECORD,,
File without changes