doppy 0.3.4__tar.gz → 0.3.5__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.
- {doppy-0.3.4 → doppy-0.3.5}/Cargo.lock +2 -2
- {doppy-0.3.4 → doppy-0.3.5}/Cargo.toml +1 -1
- {doppy-0.3.4 → doppy-0.3.5}/PKG-INFO +1 -1
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/raw/windcube.py +15 -3
- {doppy-0.3.4 → doppy-0.3.5}/LICENSE +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/README.md +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/crates/doppy_rs/Cargo.toml +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/crates/doppy_rs/src/lib.rs +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/crates/doppy_rs/src/raw/halo_hpl.rs +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/crates/doppy_rs/src/raw/wls70.rs +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/crates/doppy_rs/src/raw.rs +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/crates/doprs/.gitignore +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/crates/doprs/Cargo.toml +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/crates/doprs/src/lib.rs +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/crates/doprs/src/raw/error.rs +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/crates/doprs/src/raw/halo_hpl.rs +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/crates/doprs/src/raw/wls70.rs +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/crates/doprs/src/raw.rs +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/pyproject.toml +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/__init__.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/__main__.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/bench.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/data/__init__.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/data/api.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/data/cache.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/data/exceptions.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/defaults.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/exceptions.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/netcdf.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/options.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/product/__init__.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/product/stare.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/product/stare_depol.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/product/wind.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/py.typed +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/raw/__init__.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/raw/halo_bg.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/raw/halo_hpl.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/raw/halo_sys_params.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/raw/wls70.py +0 -0
- {doppy-0.3.4 → doppy-0.3.5}/src/doppy/utils.py +0 -0
|
@@ -106,7 +106,7 @@ checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"
|
|
|
106
106
|
|
|
107
107
|
[[package]]
|
|
108
108
|
name = "doppy_rs"
|
|
109
|
-
version = "0.3.
|
|
109
|
+
version = "0.3.5"
|
|
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.3.
|
|
118
|
+
version = "0.3.5"
|
|
119
119
|
dependencies = [
|
|
120
120
|
"chrono",
|
|
121
121
|
"rayon",
|
|
@@ -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(
|
|
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
|
-
|
|
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
|
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|