cloudnetpy 1.69.7__py3-none-any.whl → 1.69.8__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/weather_station.py +56 -0
- cloudnetpy/version.py +1 -1
- {cloudnetpy-1.69.7.dist-info → cloudnetpy-1.69.8.dist-info}/METADATA +1 -1
- {cloudnetpy-1.69.7.dist-info → cloudnetpy-1.69.8.dist-info}/RECORD +8 -8
- {cloudnetpy-1.69.7.dist-info → cloudnetpy-1.69.8.dist-info}/LICENSE +0 -0
- {cloudnetpy-1.69.7.dist-info → cloudnetpy-1.69.8.dist-info}/WHEEL +0 -0
- {cloudnetpy-1.69.7.dist-info → cloudnetpy-1.69.8.dist-info}/entry_points.txt +0 -0
- {cloudnetpy-1.69.7.dist-info → cloudnetpy-1.69.8.dist-info}/top_level.txt +0 -0
@@ -59,6 +59,8 @@ def ws2nc(
|
|
59
59
|
ws = GalatiWS(weather_station_file, site_meta)
|
60
60
|
elif site_meta["name"] == "Jülich":
|
61
61
|
ws = JuelichWS(weather_station_file, site_meta)
|
62
|
+
elif site_meta["name"] == "Lampedusa":
|
63
|
+
ws = LampedusaWS(weather_station_file, site_meta)
|
62
64
|
else:
|
63
65
|
msg = "Unsupported site"
|
64
66
|
raise ValueError(msg) # noqa: TRY301
|
@@ -486,3 +488,57 @@ class JuelichWS(WS):
|
|
486
488
|
data[keymap[key]].append(parsed)
|
487
489
|
|
488
490
|
return self.format_data(data)
|
491
|
+
|
492
|
+
|
493
|
+
class LampedusaWS(WS):
|
494
|
+
"""Read Lampedusa weather station data in ICOS format."""
|
495
|
+
|
496
|
+
def __init__(self, filenames: list[str], site_meta: dict):
|
497
|
+
super().__init__(site_meta)
|
498
|
+
self.filename = filenames[0]
|
499
|
+
self._data = self._read_data()
|
500
|
+
|
501
|
+
def _read_data(self) -> dict:
|
502
|
+
with open(self.filename, newline="") as f:
|
503
|
+
fields = [
|
504
|
+
"time",
|
505
|
+
"str1",
|
506
|
+
"str2",
|
507
|
+
"T",
|
508
|
+
"RH",
|
509
|
+
"Td",
|
510
|
+
"P",
|
511
|
+
"WSi",
|
512
|
+
"WDi",
|
513
|
+
"WS10m",
|
514
|
+
"WD10m",
|
515
|
+
"rain1m",
|
516
|
+
"rain2h",
|
517
|
+
"empty",
|
518
|
+
]
|
519
|
+
reader = csv.DictReader(f, fieldnames=fields)
|
520
|
+
raw_data: dict = {key: [] for key in fields}
|
521
|
+
for row in reader:
|
522
|
+
for key, value in row.items():
|
523
|
+
parsed_value: float | datetime.datetime
|
524
|
+
if key == "time":
|
525
|
+
parsed_value = datetime.datetime.strptime(
|
526
|
+
value, "%y%m%d %H%M%S"
|
527
|
+
)
|
528
|
+
else:
|
529
|
+
try:
|
530
|
+
parsed_value = float(value)
|
531
|
+
except ValueError:
|
532
|
+
parsed_value = math.nan
|
533
|
+
raw_data[key].append(parsed_value)
|
534
|
+
|
535
|
+
data = {
|
536
|
+
"time": raw_data["time"],
|
537
|
+
"air_temperature": raw_data["T"],
|
538
|
+
"relative_humidity": raw_data["RH"],
|
539
|
+
"air_pressure": raw_data["P"],
|
540
|
+
"wind_speed": raw_data["WSi"],
|
541
|
+
"wind_direction": raw_data["WDi"],
|
542
|
+
"rainfall_rate": raw_data["rain1m"],
|
543
|
+
}
|
544
|
+
return self.format_data(data)
|
cloudnetpy/version.py
CHANGED
@@ -9,7 +9,7 @@ cloudnetpy/metadata.py,sha256=BDEpgwZ58PHznc1gi11gtNNV4kFiMAmlHnF4huTy7nw,5982
|
|
9
9
|
cloudnetpy/output.py,sha256=lq4YSeMT_d-j4rlQkKm9KIZ8boupTBBBKV1eUawpmCI,15672
|
10
10
|
cloudnetpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
cloudnetpy/utils.py,sha256=U0iMIKPiKLrLVAfs_u9pPuoWYW1RJHcM8dbLF9a4yIA,29796
|
12
|
-
cloudnetpy/version.py,sha256
|
12
|
+
cloudnetpy/version.py,sha256=oaJd6xYmjdmgsgXNLrMDy5RnVEklJFG2LJx1HtW5UnE,72
|
13
13
|
cloudnetpy/categorize/__init__.py,sha256=s-SJaysvVpVVo5kidiruWQO6p3gv2TXwY1wEHYO5D6I,44
|
14
14
|
cloudnetpy/categorize/atmos_utils.py,sha256=RcmbKxm2COkE7WEya0mK3yX5rzUbrewRVh3ekm01RtM,10598
|
15
15
|
cloudnetpy/categorize/attenuation.py,sha256=Y_-fzmQTltWTqIZTulJhovC7a6ifpMcaAazDJcnMIOc,990
|
@@ -55,7 +55,7 @@ cloudnetpy/instruments/rpg.py,sha256=vfs_eGahPOxFjOIBczNywRwtdutOsJpSNeXZm99SIOo
|
|
55
55
|
cloudnetpy/instruments/rpg_reader.py,sha256=ThztFuVrWxhmWVAfZTfQDeUiKK1XMTbtv08IBe8GK98,11364
|
56
56
|
cloudnetpy/instruments/toa5.py,sha256=CfmmBMv5iMGaWHIGBK01Rw24cuXC1R1RMNTXkmsm340,1760
|
57
57
|
cloudnetpy/instruments/vaisala.py,sha256=MA6hAlanFrxJlF4suDxLt5FyjcSSzJg-SWRnkLQpu3E,14688
|
58
|
-
cloudnetpy/instruments/weather_station.py,sha256=
|
58
|
+
cloudnetpy/instruments/weather_station.py,sha256=3xClMqo4SV361flX7YM9psEKgF9gr8RHiAN0DKfJ0Kg,20623
|
59
59
|
cloudnetpy/instruments/disdrometer/__init__.py,sha256=lyjwttWvFvuwYxEkusoAvgRcbBmglmOp5HJOpXUqLWo,93
|
60
60
|
cloudnetpy/instruments/disdrometer/common.py,sha256=g52iK2aNp3Z88kovUmGVpC54NZomPa9D871gzO0AmQ4,9267
|
61
61
|
cloudnetpy/instruments/disdrometer/parsivel.py,sha256=HJZrEysQkx9MiIVPDV25CYHpXi_SjgZlgO-otoaKK34,25640
|
@@ -116,9 +116,9 @@ cloudnetpy/products/mie_lu_tables.nc,sha256=It4fYpqJXlqOgL8jeZ-PxGzP08PMrELIDVe5
|
|
116
116
|
cloudnetpy/products/mwr_tools.py,sha256=rd7UC67O4fsIE5SaHVZ4qWvUJTj41ZGwgQWPwZzOM14,5377
|
117
117
|
cloudnetpy/products/product_tools.py,sha256=uu4l6reuGbPcW3TgttbaSrqIKbyYGhBVTdnC7opKvmg,11101
|
118
118
|
docs/source/conf.py,sha256=IKiFWw6xhUd8NrCg0q7l596Ck1d61XWeVjIFHVSG9Og,1490
|
119
|
-
cloudnetpy-1.69.
|
120
|
-
cloudnetpy-1.69.
|
121
|
-
cloudnetpy-1.69.
|
122
|
-
cloudnetpy-1.69.
|
123
|
-
cloudnetpy-1.69.
|
124
|
-
cloudnetpy-1.69.
|
119
|
+
cloudnetpy-1.69.8.dist-info/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
|
120
|
+
cloudnetpy-1.69.8.dist-info/METADATA,sha256=jNccVHKF97dDMCivFHqVVmoHQ0MQ2yU9ZnR6kz-Tfts,5844
|
121
|
+
cloudnetpy-1.69.8.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
122
|
+
cloudnetpy-1.69.8.dist-info/entry_points.txt,sha256=HhY7LwCFk4qFgDlXx_Fy983ZTd831WlhtdPIzV-Y3dY,51
|
123
|
+
cloudnetpy-1.69.8.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
|
124
|
+
cloudnetpy-1.69.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|