cloudnetpy 1.83.0__py3-none-any.whl → 1.83.1__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.
- cloudnetpy/instruments/disdrometer/parsivel.py +1 -0
- cloudnetpy/instruments/weather_station.py +63 -29
- cloudnetpy/version.py +1 -1
- {cloudnetpy-1.83.0.dist-info → cloudnetpy-1.83.1.dist-info}/METADATA +1 -1
- {cloudnetpy-1.83.0.dist-info → cloudnetpy-1.83.1.dist-info}/RECORD +9 -9
- {cloudnetpy-1.83.0.dist-info → cloudnetpy-1.83.1.dist-info}/WHEEL +0 -0
- {cloudnetpy-1.83.0.dist-info → cloudnetpy-1.83.1.dist-info}/entry_points.txt +0 -0
- {cloudnetpy-1.83.0.dist-info → cloudnetpy-1.83.1.dist-info}/licenses/LICENSE +0 -0
- {cloudnetpy-1.83.0.dist-info → cloudnetpy-1.83.1.dist-info}/top_level.txt +0 -0
@@ -205,6 +205,7 @@ TOA5_HEADERS = {
|
|
205
205
|
"precipitation": "_rain_accum",
|
206
206
|
"rain accum [mm]": "_rain_accum",
|
207
207
|
"weatherCodeWaWa": "synop_WaWa",
|
208
|
+
"wawa": "synop_WaWa",
|
208
209
|
"weather_code_wawa": "synop_WaWa",
|
209
210
|
"radarReflectivity": "radar_reflectivity",
|
210
211
|
"radar_reflectivity": "radar_reflectivity",
|
@@ -70,6 +70,8 @@ def ws2nc(
|
|
70
70
|
ws = LimassolWS(weather_station_file, site_meta)
|
71
71
|
elif site_meta["name"] == "L'Aquila":
|
72
72
|
ws = LAquilaWS(weather_station_file, site_meta)
|
73
|
+
elif site_meta["name"] == "Maïdo Observatory":
|
74
|
+
ws = MaidoWS(weather_station_file, site_meta)
|
73
75
|
else:
|
74
76
|
msg = "Unsupported site"
|
75
77
|
raise ValueError(msg)
|
@@ -162,6 +164,26 @@ class WS(CSVFile):
|
|
162
164
|
|
163
165
|
|
164
166
|
class PalaiseauWS(WS):
|
167
|
+
expected_header_identifiers: tuple[str, ...] = (
|
168
|
+
"DateTime(yyyy-mm-ddThh:mm:ssZ)",
|
169
|
+
"Windspeed(m/s)",
|
170
|
+
"Winddirection(deg",
|
171
|
+
"Airtemperature",
|
172
|
+
"Relativehumidity(%)",
|
173
|
+
"Pressure(hPa)",
|
174
|
+
"Precipitationrate(mm/min)",
|
175
|
+
"precipitation",
|
176
|
+
)
|
177
|
+
keys: tuple[str, ...] = (
|
178
|
+
"wind_speed",
|
179
|
+
"wind_direction",
|
180
|
+
"air_temperature",
|
181
|
+
"relative_humidity",
|
182
|
+
"air_pressure",
|
183
|
+
"rainfall_rate",
|
184
|
+
"rainfall_amount",
|
185
|
+
)
|
186
|
+
|
165
187
|
def __init__(self, filenames: Sequence[str | PathLike], site_meta: dict) -> None:
|
166
188
|
super().__init__(site_meta)
|
167
189
|
self.filenames = filenames
|
@@ -175,16 +197,16 @@ class PalaiseauWS(WS):
|
|
175
197
|
for row in data:
|
176
198
|
if not (columns := row.split()):
|
177
199
|
continue
|
178
|
-
if
|
179
|
-
header_row = "".join(columns)
|
180
|
-
if header_row not in header:
|
181
|
-
header.append(header_row)
|
182
|
-
else:
|
200
|
+
if re.match(r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z", columns[0]):
|
183
201
|
timestamp = datetime.datetime.strptime(
|
184
202
|
columns[0], "%Y-%m-%dT%H:%M:%SZ"
|
185
203
|
).replace(tzinfo=datetime.timezone.utc)
|
186
204
|
values.append([timestamp] + [float(x) for x in columns[1:]])
|
187
205
|
timestamps.append(timestamp)
|
206
|
+
else:
|
207
|
+
header_row = "".join(columns)
|
208
|
+
if header_row not in header:
|
209
|
+
header.append(header_row)
|
188
210
|
|
189
211
|
self._validate_header(header)
|
190
212
|
return {"time": timestamps, "values": values}
|
@@ -204,16 +226,9 @@ class PalaiseauWS(WS):
|
|
204
226
|
]
|
205
227
|
|
206
228
|
def add_data(self) -> None:
|
207
|
-
|
208
|
-
"
|
209
|
-
|
210
|
-
"air_temperature",
|
211
|
-
"relative_humidity",
|
212
|
-
"air_pressure",
|
213
|
-
"rainfall_rate",
|
214
|
-
"rainfall_amount",
|
215
|
-
)
|
216
|
-
for ind, key in enumerate(keys):
|
229
|
+
for ind, key in enumerate(self.keys):
|
230
|
+
if key.startswith("_"):
|
231
|
+
continue
|
217
232
|
array = [row[ind + 1] for row in self._data["values"]]
|
218
233
|
array_masked = ma.masked_invalid(array)
|
219
234
|
self.data[key] = CloudnetArray(array_masked, key)
|
@@ -223,27 +238,46 @@ class PalaiseauWS(WS):
|
|
223
238
|
self.data["rainfall_amount"][:] / 1000
|
224
239
|
) # mm -> m
|
225
240
|
|
226
|
-
|
227
|
-
def _validate_header(header: list[str]) -> None:
|
228
|
-
expected_identifiers = [
|
229
|
-
"DateTime(yyyy-mm-ddThh:mm:ssZ)",
|
230
|
-
"Windspeed(m/s)",
|
231
|
-
"Winddirection(deg",
|
232
|
-
"Airtemperature",
|
233
|
-
"Relativehumidity(%)",
|
234
|
-
"Pressure(hPa)",
|
235
|
-
"Precipitationrate(mm/min)",
|
236
|
-
"precipitation",
|
237
|
-
]
|
241
|
+
def _validate_header(self, header: list[str]) -> None:
|
238
242
|
column_titles = [row for row in header if "Col." in row]
|
239
243
|
error_msg = "Unexpected weather station file format"
|
240
|
-
if len(column_titles) != len(
|
244
|
+
if len(column_titles) != len(self.expected_header_identifiers):
|
241
245
|
raise ValueError(error_msg)
|
242
|
-
for title, identifier in zip(
|
246
|
+
for title, identifier in zip(
|
247
|
+
column_titles, self.expected_header_identifiers, strict=True
|
248
|
+
):
|
243
249
|
if identifier not in title:
|
244
250
|
raise ValueError(error_msg)
|
245
251
|
|
246
252
|
|
253
|
+
class MaidoWS(PalaiseauWS):
|
254
|
+
expected_header_identifiers = (
|
255
|
+
"DateTimeyyyy-mm-ddThh:mm:ssZ",
|
256
|
+
"Winddirection-average",
|
257
|
+
"Windspeed-maximumvalue(m/s)",
|
258
|
+
"Windspeed-average(m/s)",
|
259
|
+
"Pressure-average(hPa)",
|
260
|
+
"Relativehumidity-maximumvalue(%)",
|
261
|
+
"Relativehumidity-average(%)",
|
262
|
+
"Airtemperature-minimumvalue",
|
263
|
+
"Airtemperature-average",
|
264
|
+
)
|
265
|
+
|
266
|
+
keys = (
|
267
|
+
"wind_direction",
|
268
|
+
"_wind_speed_max",
|
269
|
+
"wind_speed",
|
270
|
+
"air_pressure",
|
271
|
+
"_relative_humidity_max",
|
272
|
+
"relative_humidity",
|
273
|
+
"_air_temperature_min",
|
274
|
+
"air_temperature",
|
275
|
+
)
|
276
|
+
|
277
|
+
def convert_rainfall_amount(self) -> None:
|
278
|
+
pass
|
279
|
+
|
280
|
+
|
247
281
|
class BucharestWS(PalaiseauWS):
|
248
282
|
def convert_rainfall_rate(self) -> None:
|
249
283
|
rainfall_rate = self.data["rainfall_rate"][:]
|
cloudnetpy/version.py
CHANGED
@@ -9,7 +9,7 @@ cloudnetpy/metadata.py,sha256=CFpXmdEkVPzvLPv2xHIR-aMMQ-TR26KfESYw-98j7sk,7213
|
|
9
9
|
cloudnetpy/output.py,sha256=0bybnILsgKHWIuw2GYkqTz2iMCJDZLUN25IQ9o_v3Cg,14968
|
10
10
|
cloudnetpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
cloudnetpy/utils.py,sha256=Qv60_vxknB3f2S3EFtyoD2CBY3N6mgDRObNp2u1oYUc,31806
|
12
|
-
cloudnetpy/version.py,sha256=
|
12
|
+
cloudnetpy/version.py,sha256=d6L38ljX0Yx-3zD1dzNjm0VBGy_-ok1lac4Hom2TSAY,72
|
13
13
|
cloudnetpy/categorize/__init__.py,sha256=gtvzWr0IDRn2oA6yHBvinEhTGTuub-JkrOv93lBsgrE,61
|
14
14
|
cloudnetpy/categorize/atmos_utils.py,sha256=uWc9TABVYPI0sn4H5Az9Jf6NVRaWyEKIi17f0pAJQxE,10679
|
15
15
|
cloudnetpy/categorize/attenuation.py,sha256=Y_-fzmQTltWTqIZTulJhovC7a6ifpMcaAazDJcnMIOc,990
|
@@ -56,10 +56,10 @@ cloudnetpy/instruments/rpg.py,sha256=R1rUdeSADvB1IMkGOF1S0rUEJDGEI_19SPrmErZpn5M
|
|
56
56
|
cloudnetpy/instruments/rpg_reader.py,sha256=NaOtTxXx20PozNTj1xNvmbsEsAxuplFXRzBiM1_-Zg4,11651
|
57
57
|
cloudnetpy/instruments/toa5.py,sha256=CfmmBMv5iMGaWHIGBK01Rw24cuXC1R1RMNTXkmsm340,1760
|
58
58
|
cloudnetpy/instruments/vaisala.py,sha256=tu7aljkMKep0uCWz-Sd-GuBXF_Yy421a4nHy0ffpMoc,4725
|
59
|
-
cloudnetpy/instruments/weather_station.py,sha256=
|
59
|
+
cloudnetpy/instruments/weather_station.py,sha256=KD-pGpEEbeyma74DdNPd24PFxFCdZc1UMLE0Hm2PLO0,28509
|
60
60
|
cloudnetpy/instruments/disdrometer/__init__.py,sha256=lyjwttWvFvuwYxEkusoAvgRcbBmglmOp5HJOpXUqLWo,93
|
61
61
|
cloudnetpy/instruments/disdrometer/common.py,sha256=WCPRCfAlElUzZpllOSjjWrLG2jgkiRIy0rWz_omFoJQ,10815
|
62
|
-
cloudnetpy/instruments/disdrometer/parsivel.py,sha256=
|
62
|
+
cloudnetpy/instruments/disdrometer/parsivel.py,sha256=OZTLZgSOMfPF5cxY-ICSb0gvyEMm_3JspmRYYvb9hCo,25837
|
63
63
|
cloudnetpy/instruments/disdrometer/thies.py,sha256=7gPYFzpa58ot6pTblhEnY5eRw5yrue42XwyacHQm14k,11205
|
64
64
|
cloudnetpy/model_evaluation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
65
65
|
cloudnetpy/model_evaluation/file_handler.py,sha256=yAbJ3yOqufQGV3rahwOm9-k1swEDDq8V8n-zaNVaN54,6473
|
@@ -117,10 +117,10 @@ cloudnetpy/products/lwc.py,sha256=xsNiiG6dGKIkWaFk0xWTabc1bZ4ULf6SqcqHs7itAUk,19
|
|
117
117
|
cloudnetpy/products/mie_lu_tables.nc,sha256=It4fYpqJXlqOgL8jeZ-PxGzP08PMrELIDVe55y9ob58,16637951
|
118
118
|
cloudnetpy/products/mwr_tools.py,sha256=MMWnp68U7bv157-CPB2VeTQvaR6zl7sexbBT_kJ_pn8,6734
|
119
119
|
cloudnetpy/products/product_tools.py,sha256=eyqIw_0KhlpmmYQE69RpGdRIAOW7JVPlEgkTBp2kdps,11302
|
120
|
-
cloudnetpy-1.83.
|
120
|
+
cloudnetpy-1.83.1.dist-info/licenses/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
|
121
121
|
docs/source/conf.py,sha256=IKiFWw6xhUd8NrCg0q7l596Ck1d61XWeVjIFHVSG9Og,1490
|
122
|
-
cloudnetpy-1.83.
|
123
|
-
cloudnetpy-1.83.
|
124
|
-
cloudnetpy-1.83.
|
125
|
-
cloudnetpy-1.83.
|
126
|
-
cloudnetpy-1.83.
|
122
|
+
cloudnetpy-1.83.1.dist-info/METADATA,sha256=5h8hN5FEQoYpQjog5r1LvdsqnJ2MZDF9yMvzGXY2Yw4,5836
|
123
|
+
cloudnetpy-1.83.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
124
|
+
cloudnetpy-1.83.1.dist-info/entry_points.txt,sha256=HhY7LwCFk4qFgDlXx_Fy983ZTd831WlhtdPIzV-Y3dY,51
|
125
|
+
cloudnetpy-1.83.1.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
|
126
|
+
cloudnetpy-1.83.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|