cloudnetpy 1.63.0__py3-none-any.whl → 1.64.0__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/categorize/categorize.py +3 -1
- cloudnetpy/categorize/model.py +7 -1
- cloudnetpy/version.py +1 -1
- {cloudnetpy-1.63.0.dist-info → cloudnetpy-1.64.0.dist-info}/METADATA +1 -1
- {cloudnetpy-1.63.0.dist-info → cloudnetpy-1.64.0.dist-info}/RECORD +8 -8
- {cloudnetpy-1.63.0.dist-info → cloudnetpy-1.64.0.dist-info}/LICENSE +0 -0
- {cloudnetpy-1.63.0.dist-info → cloudnetpy-1.64.0.dist-info}/WHEEL +0 -0
- {cloudnetpy-1.63.0.dist-info → cloudnetpy-1.64.0.dist-info}/top_level.txt +0 -0
@@ -18,6 +18,7 @@ def generate_categorize(
|
|
18
18
|
input_files: dict,
|
19
19
|
output_file: str,
|
20
20
|
uuid: str | None = None,
|
21
|
+
options: dict | None = None,
|
21
22
|
) -> str:
|
22
23
|
"""Generates Cloudnet Level 1c categorize file.
|
23
24
|
|
@@ -33,6 +34,7 @@ def generate_categorize(
|
|
33
34
|
RPG level 0 files.
|
34
35
|
output_file: Full path of the output file.
|
35
36
|
uuid: Set specific UUID for the file.
|
37
|
+
options: Dictionary containing optional parameters.
|
36
38
|
|
37
39
|
Returns:
|
38
40
|
UUID of the generated file.
|
@@ -138,7 +140,7 @@ def generate_categorize(
|
|
138
140
|
data["disdrometer"] = Disdrometer(input_files["disdrometer"])
|
139
141
|
except DisdrometerDataError as err:
|
140
142
|
logging.warning("Unable to use disdrometer: %s", err)
|
141
|
-
data["model"] = Model(input_files["model"], data["radar"].altitude)
|
143
|
+
data["model"] = Model(input_files["model"], data["radar"].altitude, options)
|
142
144
|
time, height = _define_dense_grid()
|
143
145
|
valid_ind = _interpolate_to_cloudnet_grid()
|
144
146
|
if not valid_ind:
|
cloudnetpy/categorize/model.py
CHANGED
@@ -17,6 +17,7 @@ class Model(DataSource):
|
|
17
17
|
Args:
|
18
18
|
model_file: File name of the NWP model file.
|
19
19
|
alt_site: Altitude of the site above mean sea level (m).
|
20
|
+
options: Dictionary containing optional parameters.
|
20
21
|
|
21
22
|
Attributes:
|
22
23
|
source_type (str): Model type, e.g. 'gdas1' or 'ecwmf'.
|
@@ -41,8 +42,9 @@ class Model(DataSource):
|
|
41
42
|
)
|
42
43
|
fields_sparse = (*fields_dense, "q", "uwind", "vwind")
|
43
44
|
|
44
|
-
def __init__(self, model_file: str, alt_site: float):
|
45
|
+
def __init__(self, model_file: str, alt_site: float, options: dict | None = None):
|
45
46
|
super().__init__(model_file)
|
47
|
+
self.options = options
|
46
48
|
self.source_type = _find_model_type(model_file)
|
47
49
|
self.model_heights = self._get_model_heights(alt_site)
|
48
50
|
self.mean_height = _calc_mean_height(self.model_heights)
|
@@ -113,7 +115,11 @@ class Model(DataSource):
|
|
113
115
|
def calc_wet_bulb(self) -> None:
|
114
116
|
"""Calculates wet-bulb temperature in dense grid."""
|
115
117
|
wet_bulb_temp = atmos_utils.calc_wet_bulb_temperature(self.data_dense)
|
118
|
+
offset = (self.options or {}).get("temperature_offset", 0)
|
119
|
+
wet_bulb_temp += offset
|
116
120
|
self.append_data(wet_bulb_temp, "Tw", units="K")
|
121
|
+
if offset:
|
122
|
+
self.data["Tw"].temperature_correction_applied = offset
|
117
123
|
|
118
124
|
def screen_sparse_fields(self) -> None:
|
119
125
|
"""Removes model fields that we don't want to write in the output."""
|
cloudnetpy/version.py
CHANGED
@@ -8,11 +8,11 @@ cloudnetpy/metadata.py,sha256=v_VDo2vbdTxB0zIsfP69IcrwSKiRlLpsGdq6JPI4CoA,5306
|
|
8
8
|
cloudnetpy/output.py,sha256=YkCaxVkG_Mt2hng_IVnhygHteV4UMKzKALkeFZwFJL8,14822
|
9
9
|
cloudnetpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
cloudnetpy/utils.py,sha256=JV0Fawnme1HoZgoiidV3eIzsn6vx0AEjBNmI1CcrBsA,28517
|
11
|
-
cloudnetpy/version.py,sha256=
|
11
|
+
cloudnetpy/version.py,sha256=Vd42PiP_XdZoz_QmRiX6hYj94MB5XO3CY5sRjjHTfPQ,72
|
12
12
|
cloudnetpy/categorize/__init__.py,sha256=gP5q3Vis1y9u9OWgA_idlbjfWXYN_S0IBSWdwBhL_uU,69
|
13
13
|
cloudnetpy/categorize/atmos.py,sha256=G4DmEJCt1FAPYyt7oXzBH47JTeb5lUOGDakkviOXblE,12390
|
14
14
|
cloudnetpy/categorize/atmos_utils.py,sha256=64uenj2uxj3P3Blaq_pBN1pBjcF-X4LYNt-uTOjvevg,3778
|
15
|
-
cloudnetpy/categorize/categorize.py,sha256=
|
15
|
+
cloudnetpy/categorize/categorize.py,sha256=owM4ebqJCHnCWHDMELv6Qa8zM_7qKcBpzJOfPva1Py0,17929
|
16
16
|
cloudnetpy/categorize/classify.py,sha256=a-0bVCtynGfORnDGTsPuzqkuDeOOR_OMz5ai9NsMuic,9870
|
17
17
|
cloudnetpy/categorize/containers.py,sha256=L4UaihDfeMCADZiKdII5NCP49ZNlodCoM9X3yxEfJ_A,4748
|
18
18
|
cloudnetpy/categorize/disdrometer.py,sha256=keU3pFvKtk840A0oLwAyNDuqOCswBPJEKf2bV0YWyA8,2004
|
@@ -22,7 +22,7 @@ cloudnetpy/categorize/freezing.py,sha256=c4k5AIgfBpvw64EaVVVYPi2Fx4SpHk1cyfceE1y
|
|
22
22
|
cloudnetpy/categorize/insects.py,sha256=9J5agmktit8Or66GGNue-bThiaG9rB2SuPNZBXI7FCE,5243
|
23
23
|
cloudnetpy/categorize/lidar.py,sha256=YQrM_LOz8NQrrD9l9HyujV1GSGwkQ8LMqXN13bEJRW4,2605
|
24
24
|
cloudnetpy/categorize/melting.py,sha256=mYdOKxfTC2InB8NdOPwr_7NpbouQMm-9f2Q1kfTqIJE,6262
|
25
|
-
cloudnetpy/categorize/model.py,sha256=
|
25
|
+
cloudnetpy/categorize/model.py,sha256=rLyx9SKz56BmQ809PwwhCnbusshUuYPoqhLJbnZvrt8,5842
|
26
26
|
cloudnetpy/categorize/mwr.py,sha256=rTyVYaMotXl7LRgRQBBcrLInsrWGl4sFdZ4pyM4jXMc,1436
|
27
27
|
cloudnetpy/categorize/radar.py,sha256=C4R74E_jmLOJqXLrfhdrAitHRHHA79UYuChz9VLxy58,13722
|
28
28
|
cloudnetpy/instruments/__init__.py,sha256=_jejVwi_viSZehmAOkEqTNI-0-exGgAJ_bHW1IRRwTI,398
|
@@ -108,8 +108,8 @@ cloudnetpy/products/mie_lu_tables.nc,sha256=It4fYpqJXlqOgL8jeZ-PxGzP08PMrELIDVe5
|
|
108
108
|
cloudnetpy/products/mwr_tools.py,sha256=3esU5cG5GI2WVmOENqrJ0FbMuxLegADv7q8TB0RorGg,4674
|
109
109
|
cloudnetpy/products/product_tools.py,sha256=VNw2diJj30POz68-3qNVkJP7r9AUspT_d1Fp0BbeIx8,10414
|
110
110
|
docs/source/conf.py,sha256=IKiFWw6xhUd8NrCg0q7l596Ck1d61XWeVjIFHVSG9Og,1490
|
111
|
-
cloudnetpy-1.
|
112
|
-
cloudnetpy-1.
|
113
|
-
cloudnetpy-1.
|
114
|
-
cloudnetpy-1.
|
115
|
-
cloudnetpy-1.
|
111
|
+
cloudnetpy-1.64.0.dist-info/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
|
112
|
+
cloudnetpy-1.64.0.dist-info/METADATA,sha256=FWBF4HeLgWopUcCrb5w4RlFOrmVaNdym-v2dZgVD0Fc,5784
|
113
|
+
cloudnetpy-1.64.0.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
114
|
+
cloudnetpy-1.64.0.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
|
115
|
+
cloudnetpy-1.64.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|