cloudnetpy 1.56.1__py3-none-any.whl → 1.56.3__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/atmos.py +0 -27
- cloudnetpy/categorize/atmos_utils.py +0 -10
- cloudnetpy/categorize/categorize.py +1 -6
- cloudnetpy/categorize/classify.py +0 -12
- cloudnetpy/categorize/containers.py +0 -6
- cloudnetpy/categorize/droplet.py +0 -17
- cloudnetpy/categorize/falling.py +0 -3
- cloudnetpy/categorize/freezing.py +0 -5
- cloudnetpy/categorize/insects.py +0 -3
- cloudnetpy/categorize/lidar.py +0 -1
- cloudnetpy/categorize/melting.py +0 -3
- cloudnetpy/categorize/model.py +0 -5
- cloudnetpy/categorize/mwr.py +0 -2
- cloudnetpy/categorize/radar.py +0 -8
- cloudnetpy/cloudnetarray.py +0 -6
- cloudnetpy/concat_lib.py +0 -5
- cloudnetpy/datasource.py +0 -12
- cloudnetpy/instruments/basta.py +0 -5
- cloudnetpy/instruments/ceilo.py +0 -4
- cloudnetpy/instruments/ceilometer.py +0 -2
- cloudnetpy/instruments/copernicus.py +0 -6
- cloudnetpy/instruments/disdrometer/parsivel.py +0 -5
- cloudnetpy/instruments/disdrometer/thies.py +0 -4
- cloudnetpy/instruments/galileo.py +0 -5
- cloudnetpy/instruments/hatpro.py +0 -6
- cloudnetpy/instruments/mira.py +0 -5
- cloudnetpy/instruments/mrr.py +0 -5
- cloudnetpy/instruments/nc_radar.py +0 -2
- cloudnetpy/instruments/pollyxt.py +0 -3
- cloudnetpy/instruments/radiometrics.py +0 -4
- cloudnetpy/instruments/rpg.py +0 -5
- cloudnetpy/instruments/rpg_reader.py +0 -1
- cloudnetpy/instruments/vaisala.py +0 -4
- cloudnetpy/instruments/weather_station.py +0 -3
- cloudnetpy/model_evaluation/file_handler.py +0 -4
- cloudnetpy/model_evaluation/plotting/plotting.py +0 -6
- cloudnetpy/model_evaluation/products/advance_methods.py +0 -1
- cloudnetpy/model_evaluation/products/grid_methods.py +0 -2
- cloudnetpy/model_evaluation/products/model_products.py +0 -2
- cloudnetpy/model_evaluation/products/observation_products.py +0 -2
- cloudnetpy/model_evaluation/products/product_resampling.py +0 -4
- cloudnetpy/model_evaluation/products/tools.py +0 -2
- cloudnetpy/model_evaluation/statistics/statistical_methods.py +0 -4
- cloudnetpy/output.py +0 -9
- cloudnetpy/products/classification.py +0 -3
- cloudnetpy/products/der.py +0 -4
- cloudnetpy/products/drizzle.py +0 -8
- cloudnetpy/products/drizzle_error.py +0 -2
- cloudnetpy/products/drizzle_tools.py +0 -12
- cloudnetpy/products/ier.py +0 -4
- cloudnetpy/products/iwc.py +0 -4
- cloudnetpy/products/lwc.py +0 -14
- cloudnetpy/products/product_tools.py +0 -9
- cloudnetpy/utils.py +0 -81
- cloudnetpy/version.py +1 -1
- {cloudnetpy-1.56.1.dist-info → cloudnetpy-1.56.3.dist-info}/METADATA +4 -5
- {cloudnetpy-1.56.1.dist-info → cloudnetpy-1.56.3.dist-info}/RECORD +60 -60
- {cloudnetpy-1.56.1.dist-info → cloudnetpy-1.56.3.dist-info}/LICENSE +0 -0
- {cloudnetpy-1.56.1.dist-info → cloudnetpy-1.56.3.dist-info}/WHEEL +0 -0
- {cloudnetpy-1.56.1.dist-info → cloudnetpy-1.56.3.dist-info}/top_level.txt +0 -0
@@ -44,7 +44,6 @@ def generate_L3_day_plots(
|
|
44
44
|
in same fig.
|
45
45
|
|
46
46
|
Args:
|
47
|
-
----
|
48
47
|
nc_file (str): Path to source file
|
49
48
|
product (str): Name of product wanted to plot
|
50
49
|
model (str): Name of model which downsampling was done with
|
@@ -71,7 +70,6 @@ def generate_L3_day_plots(
|
|
71
70
|
figure.
|
72
71
|
|
73
72
|
Examples:
|
74
|
-
--------
|
75
73
|
>>> from cloudnetpy.model_evaluation.plotting.plotting
|
76
74
|
import generate_L3_day_plots
|
77
75
|
>>> l3_day_file = 'cf_ecmwf.nc'
|
@@ -166,7 +164,6 @@ def get_group_plots(
|
|
166
164
|
timegrids. All model cycles if any will be generated to their own figures.
|
167
165
|
|
168
166
|
Args:
|
169
|
-
----
|
170
167
|
product (str): Name of the product
|
171
168
|
names (list): List of variables to be visualized to same fig
|
172
169
|
nc_file (str): Path to a source file
|
@@ -227,7 +224,6 @@ def get_pair_plots(
|
|
227
224
|
in a given nc-file in loop.
|
228
225
|
|
229
226
|
Args:
|
230
|
-
----
|
231
227
|
product (str): Name of the product
|
232
228
|
names (list): List of variables to be visualized to same fig
|
233
229
|
nc_file (str): Path to a source file
|
@@ -286,7 +282,6 @@ def get_single_plots(
|
|
286
282
|
"""Generates figures of each product variable from given file in loop.
|
287
283
|
|
288
284
|
Args:
|
289
|
-
----
|
290
285
|
product (str): Name of the product
|
291
286
|
names (list): List of variables to be visualized to same fig
|
292
287
|
nc_file (str): Path to a source file
|
@@ -362,7 +357,6 @@ def get_statistic_plots(
|
|
362
357
|
as well as different cycle runs.
|
363
358
|
|
364
359
|
Args:
|
365
|
-
----
|
366
360
|
product (str): Name of the product
|
367
361
|
names (list): List of variables to be visualized to same fig
|
368
362
|
nc_file (str): Path to a source file
|
@@ -11,12 +11,10 @@ class ProductGrid:
|
|
11
11
|
"""Class to generate downsampling of observation product to model grid.
|
12
12
|
|
13
13
|
Args:
|
14
|
-
----
|
15
14
|
model_obj (object): The :class:'ModelManager' object.
|
16
15
|
obs_obj (object): The :class:'ObservationManager' object.
|
17
16
|
|
18
17
|
Notes:
|
19
|
-
-----
|
20
18
|
Downsampled observation products data is added to a ModelManager
|
21
19
|
object which is used for nc-file creation and writing
|
22
20
|
"""
|
@@ -14,14 +14,12 @@ class ModelManager(DataSource):
|
|
14
14
|
"""Class to collect and manage model data.
|
15
15
|
|
16
16
|
Args:
|
17
|
-
----
|
18
17
|
model_file (str): Path to source model file.
|
19
18
|
model (str): Name of model
|
20
19
|
output_file (str): name of output file name and path to save data
|
21
20
|
product (str): name of product to generate
|
22
21
|
|
23
22
|
Notes:
|
24
|
-
-----
|
25
23
|
For this class to work, needed information of model in use should be found in
|
26
24
|
model_metadata.py
|
27
25
|
|
@@ -13,12 +13,10 @@ class ObservationManager(DataSource):
|
|
13
13
|
"""Class to collect and manage observations for downsampling.
|
14
14
|
|
15
15
|
Args:
|
16
|
-
----
|
17
16
|
obs (str): Name of observation product
|
18
17
|
obs_file (str): Path to source observation file
|
19
18
|
|
20
19
|
Notes:
|
21
|
-
-----
|
22
20
|
Output is ObservationManager object where all product data and
|
23
21
|
information is included.
|
24
22
|
|
@@ -31,7 +31,6 @@ def process_L3_day_product(
|
|
31
31
|
and other variables of each cycles.
|
32
32
|
|
33
33
|
Args:
|
34
|
-
----
|
35
34
|
model (str): Name of model
|
36
35
|
obs (str): Name of product to generate
|
37
36
|
model_files (list): List of model + cycles file path(s) to be generated
|
@@ -44,19 +43,16 @@ def process_L3_day_product(
|
|
44
43
|
default False
|
45
44
|
|
46
45
|
Raises:
|
47
|
-
------
|
48
46
|
RuntimeError: Failed to create the L3 product file.
|
49
47
|
ValueError (Warning): No ice clouds in model data
|
50
48
|
|
51
49
|
Notes:
|
52
|
-
-----
|
53
50
|
Model file(s) are given as a list to make all different cycles to be at same
|
54
51
|
nc-file. If list includes more than one model file, nc-file is created within
|
55
52
|
the first round. With rest of rounds, downsample observation and model data
|
56
53
|
is added to same L3 day nc-file.
|
57
54
|
|
58
55
|
Examples:
|
59
|
-
--------
|
60
56
|
>>> from cloudnetpy.model_evaluation.products.product_resampling import \
|
61
57
|
process_L3_day_product
|
62
58
|
>>> product = 'cf'
|
@@ -38,7 +38,6 @@ def calculate_advection_time(
|
|
38
38
|
"""Calculates time which variable takes to go through the time window
|
39
39
|
|
40
40
|
Notes
|
41
|
-
-----
|
42
41
|
Wind speed is stronger in upper levels, so advection time is more
|
43
42
|
there then lower levels. Effect is small in a mid-latitudes,
|
44
43
|
but visible in a tropics.
|
@@ -46,7 +45,6 @@ def calculate_advection_time(
|
|
46
45
|
sampling = 1 -> hour, sampling 1/6 -> 10min
|
47
46
|
|
48
47
|
References
|
49
|
-
----------
|
50
48
|
"""
|
51
49
|
t_adv = resolution * 1000 / wind / 60**2
|
52
50
|
t_adv[t_adv.mask] = 0
|
@@ -15,7 +15,6 @@ class DayStatistics:
|
|
15
15
|
and observation data of wanted product.
|
16
16
|
|
17
17
|
Args:
|
18
|
-
----
|
19
18
|
method (str): Name on statistical method to be calculated
|
20
19
|
product_info (list): List of information of statistical analysis is
|
21
20
|
done with. A list includes observed product name (str), model variable (str)
|
@@ -25,15 +24,12 @@ class DayStatistics:
|
|
25
24
|
observation (np.ndarray): Ndrray of Downsampled observation of product
|
26
25
|
|
27
26
|
Raises:
|
28
|
-
------
|
29
27
|
RuntimeError: A function of given method not found
|
30
28
|
|
31
29
|
Returns:
|
32
|
-
-------
|
33
30
|
day_statistic (object): The :class:'DayStatistic' object.
|
34
31
|
|
35
32
|
Examples:
|
36
|
-
--------
|
37
33
|
>>> from cloudnetpy.model_evaluation.products.product_resampling import \
|
38
34
|
process_L3_day_product
|
39
35
|
>>> method = 'error'
|
cloudnetpy/output.py
CHANGED
@@ -76,7 +76,6 @@ def save_product_file(
|
|
76
76
|
"""Saves a standard Cloudnet product file.
|
77
77
|
|
78
78
|
Args:
|
79
|
-
----
|
80
79
|
short_id: Short file identifier, e.g. 'lwc', 'iwc', 'drizzle', 'classification'.
|
81
80
|
obj: Instance containing product specific attributes: `time`, `dataset`, `data`.
|
82
81
|
file_name: Name of the output file to be generated.
|
@@ -143,7 +142,6 @@ def get_references(identifier: str | None = None, extra: list | None = None) ->
|
|
143
142
|
""" "Returns references.
|
144
143
|
|
145
144
|
Args:
|
146
|
-
----
|
147
145
|
identifier: Cloudnet file type, e.g., 'iwc'.
|
148
146
|
|
149
147
|
"""
|
@@ -175,11 +173,9 @@ def get_source_uuids(*sources) -> str:
|
|
175
173
|
"""Returns file_uuid attributes of objects.
|
176
174
|
|
177
175
|
Args:
|
178
|
-
----
|
179
176
|
*sources: Objects whose file_uuid attributes are read (if exist).
|
180
177
|
|
181
178
|
Returns:
|
182
|
-
-------
|
183
179
|
str: UUIDs separated by comma.
|
184
180
|
|
185
181
|
"""
|
@@ -196,7 +192,6 @@ def merge_history(nc: netCDF4.Dataset, file_type: str, data: dict) -> None:
|
|
196
192
|
"""Merges history fields from one or several files and creates a new record.
|
197
193
|
|
198
194
|
Args:
|
199
|
-
----
|
200
195
|
nc: The netCDF Dataset instance.
|
201
196
|
file_type: Long description of the file.
|
202
197
|
data: Dictionary of objects with history attribute.
|
@@ -235,7 +230,6 @@ def init_file(
|
|
235
230
|
"""Initializes a Cloudnet file for writing.
|
236
231
|
|
237
232
|
Args:
|
238
|
-
----
|
239
233
|
file_name: File name to be generated.
|
240
234
|
dimensions: Dictionary containing dimension for this file.
|
241
235
|
cloudnet_arrays: Dictionary containing :class:`CloudnetArray` instances.
|
@@ -258,7 +252,6 @@ def copy_variables(
|
|
258
252
|
"""Copies variables (and their attributes) from one file to another.
|
259
253
|
|
260
254
|
Args:
|
261
|
-
----
|
262
255
|
source: Source object.
|
263
256
|
target: Target object.
|
264
257
|
keys: Variable names to be copied.
|
@@ -292,7 +285,6 @@ def copy_global(
|
|
292
285
|
"""Copies global attributes from one file to another.
|
293
286
|
|
294
287
|
Args:
|
295
|
-
----
|
296
288
|
source: Source object.
|
297
289
|
target: Target object.
|
298
290
|
attributes: List of attributes to be copied.
|
@@ -360,7 +352,6 @@ def update_attributes(cloudnet_variables: dict, attributes: dict) -> None:
|
|
360
352
|
New attributes are added.
|
361
353
|
|
362
354
|
Args:
|
363
|
-
----
|
364
355
|
cloudnet_variables: CloudnetArray instances.
|
365
356
|
attributes: Product-specific attributes.
|
366
357
|
|
@@ -22,17 +22,14 @@ def generate_classification(
|
|
22
22
|
netCDF file.
|
23
23
|
|
24
24
|
Args:
|
25
|
-
----
|
26
25
|
categorize_file: Categorize file name.
|
27
26
|
output_file: Output file name.
|
28
27
|
uuid: Set specific UUID for the file.
|
29
28
|
|
30
29
|
Returns:
|
31
|
-
-------
|
32
30
|
str: UUID of the generated file.
|
33
31
|
|
34
32
|
Examples:
|
35
|
-
--------
|
36
33
|
>>> from cloudnetpy.products import generate_classification
|
37
34
|
>>> generate_classification('categorize.nc', 'classification.nc')
|
38
35
|
|
cloudnetpy/products/der.py
CHANGED
@@ -41,7 +41,6 @@ def generate_der(
|
|
41
41
|
liquid water path. The results are written in a netCDF file.
|
42
42
|
|
43
43
|
Args:
|
44
|
-
----
|
45
44
|
categorize_file: Categorize file name.
|
46
45
|
output_file: Output file name.
|
47
46
|
uuid: Set specific UUID for the file.
|
@@ -50,11 +49,9 @@ def generate_der(
|
|
50
49
|
used in Frisch approach.
|
51
50
|
|
52
51
|
Returns:
|
53
|
-
-------
|
54
52
|
UUID of the generated file.
|
55
53
|
|
56
54
|
Examples:
|
57
|
-
--------
|
58
55
|
>>> from cloudnetpy.products import generate_der
|
59
56
|
>>> generate_der('categorize.nc', 'der.nc')
|
60
57
|
>>>
|
@@ -63,7 +60,6 @@ def generate_der(
|
|
63
60
|
>>> generate_der('categorize.nc', 'der.nc', parameters=params)
|
64
61
|
|
65
62
|
References:
|
66
|
-
----------
|
67
63
|
Frisch, S., Shupe, M., Djalalova, I., Feingold, G., & Poellot, M. (2002).
|
68
64
|
The Retrieval of Stratus Cloud Droplet Effective Radius with Cloud Radars,
|
69
65
|
Journal of Atmospheric and Oceanic Technology, 19(6), 835-842.
|
cloudnetpy/products/drizzle.py
CHANGED
@@ -26,22 +26,18 @@ def generate_drizzle(
|
|
26
26
|
cloud radar and lidar measurements. The results are written in a netCDF file.
|
27
27
|
|
28
28
|
Args:
|
29
|
-
----
|
30
29
|
categorize_file: Categorize file name.
|
31
30
|
output_file: Output file name.
|
32
31
|
uuid: Set specific UUID for the file.
|
33
32
|
|
34
33
|
Returns:
|
35
|
-
-------
|
36
34
|
str: UUID of the generated file.
|
37
35
|
|
38
36
|
Examples:
|
39
|
-
--------
|
40
37
|
>>> from cloudnetpy.products import generate_drizzle
|
41
38
|
>>> generate_drizzle('categorize.nc', 'drizzle.nc')
|
42
39
|
|
43
40
|
References:
|
44
|
-
----------
|
45
41
|
O’Connor, E.J., R.J. Hogan, and A.J. Illingworth, 2005:
|
46
42
|
Retrieving Stratocumulus Drizzle Parameters Using Doppler Radar and Lidar.
|
47
43
|
J. Appl. Meteor., 44, 14–27, https://doi.org/10.1175/JAM-2181.1
|
@@ -72,12 +68,10 @@ class DrizzleProducts:
|
|
72
68
|
"""Calculates additional quantities from the drizzle properties.
|
73
69
|
|
74
70
|
Args:
|
75
|
-
----
|
76
71
|
drizzle_source: The :class:`DrizzleSource` instance.
|
77
72
|
drizzle_solver: The :class:`DrizzleSolver` instance.
|
78
73
|
|
79
74
|
Attributes:
|
80
|
-
----------
|
81
75
|
derived_products (dict): Dictionary containing derived drizzle products:
|
82
76
|
'drizzle_N', 'drizzle_lwc', 'drizzle_lwf', 'v_drizzle', 'v_air'.
|
83
77
|
|
@@ -154,11 +148,9 @@ class RetrievalStatus:
|
|
154
148
|
"""Estimates the status of drizzle retrievals.
|
155
149
|
|
156
150
|
Args:
|
157
|
-
----
|
158
151
|
drizzle_class: The :class:`DrizzleClassification` instance.
|
159
152
|
|
160
153
|
Attributes:
|
161
|
-
----------
|
162
154
|
drizzle_class: The :class:`DrizzleClassification` instance.
|
163
155
|
retrieval_status (ndarray): 2D array containing drizzle retrieval
|
164
156
|
status information.
|
@@ -15,12 +15,10 @@ def get_drizzle_error(
|
|
15
15
|
"""Estimates error and bias for drizzle classification.
|
16
16
|
|
17
17
|
Args:
|
18
|
-
----
|
19
18
|
categorize: The :class:`DrizzleSource` instance.
|
20
19
|
drizzle_parameters: The :class:`DrizzleSolver` instance.
|
21
20
|
|
22
21
|
Returns:
|
23
|
-
-------
|
24
22
|
dict: Dictionary containing information of estimated error and bias for drizzle
|
25
23
|
|
26
24
|
"""
|
@@ -16,11 +16,9 @@ class DrizzleSource(DataSource):
|
|
16
16
|
"""Class holding the input data for drizzle calculations.
|
17
17
|
|
18
18
|
Args:
|
19
|
-
----
|
20
19
|
categorize_file: Categorize file name.
|
21
20
|
|
22
21
|
Attributes:
|
23
|
-
----------
|
24
22
|
mie (dict): Mie look-up table data.
|
25
23
|
dheight (float): Median difference of height array.
|
26
24
|
z (ndarray): 2D radar echo (linear units).
|
@@ -82,11 +80,9 @@ class DrizzleClassification(ProductClassification):
|
|
82
80
|
child of :class:`ProductClassification`.
|
83
81
|
|
84
82
|
Args:
|
85
|
-
----
|
86
83
|
categorize_file: Categorize file name.
|
87
84
|
|
88
85
|
Attributes:
|
89
|
-
----------
|
90
86
|
is_v_sigma (ndarray): 2D array denoting finite v_sigma.
|
91
87
|
warm_liquid (ndarray): 2D array denoting warm liquid.
|
92
88
|
drizzle (ndarray): 2D array denoting drizzle presence.
|
@@ -150,11 +146,9 @@ class SpectralWidth:
|
|
150
146
|
spectral broadening of the Doppler velocity.
|
151
147
|
|
152
148
|
Args:
|
153
|
-
----
|
154
149
|
categorize_file: Categorize file name.
|
155
150
|
|
156
151
|
Attributes:
|
157
|
-
----------
|
158
152
|
categorize_file (str): Categorize file name.
|
159
153
|
width_ht (ndarray): Spectral width containing the correction for turbulence
|
160
154
|
broadening.
|
@@ -191,7 +185,6 @@ class SpectralWidth:
|
|
191
185
|
"""Calculates magnitude of horizontal wind.
|
192
186
|
|
193
187
|
Returns
|
194
|
-
-------
|
195
188
|
ndarray: Horizontal wind (m s-1).
|
196
189
|
|
197
190
|
"""
|
@@ -205,13 +198,11 @@ class DrizzleSolver:
|
|
205
198
|
"""Estimates drizzle parameters.
|
206
199
|
|
207
200
|
Args:
|
208
|
-
----
|
209
201
|
drizzle_source: The :class:`DrizzleSource` instance.
|
210
202
|
drizzle_class: The :class:`DrizzleClassification` instance.
|
211
203
|
spectral_width: The :class:`SpectralWidth` instance.
|
212
204
|
|
213
205
|
Attributes:
|
214
|
-
----------
|
215
206
|
params (dict): Dictionary of retrieved drizzle parameters 'Do', 'mu', 'S',
|
216
207
|
'beta_corr'.
|
217
208
|
|
@@ -296,18 +287,15 @@ class DrizzleSolver:
|
|
296
287
|
"""Drizzle diameter calculation.
|
297
288
|
|
298
289
|
Args:
|
299
|
-
----
|
300
290
|
beta_z_ratio: Beta to z ratio, multiplied by (2 / pi).
|
301
291
|
mu: Shape parameter for gamma calculations. Default is 0.
|
302
292
|
ray: Mie to Rayleigh ratio for z. Default is 1.
|
303
293
|
k: Alpha to beta ratio . Default is 1.
|
304
294
|
|
305
295
|
Returns:
|
306
|
-
-------
|
307
296
|
ndarray: Drizzle diameter.
|
308
297
|
|
309
298
|
References:
|
310
|
-
----------
|
311
299
|
https://journals.ametsoc.org/doi/pdf/10.1175/JAM-2181.1
|
312
300
|
|
313
301
|
"""
|
cloudnetpy/products/ier.py
CHANGED
@@ -21,22 +21,18 @@ def generate_ier(
|
|
21
21
|
and model temperature. The results are written in a netCDF file.
|
22
22
|
|
23
23
|
Args:
|
24
|
-
----
|
25
24
|
categorize_file: Categorize file name.
|
26
25
|
output_file: Output file name.
|
27
26
|
uuid: Set specific UUID for the file.
|
28
27
|
|
29
28
|
Returns:
|
30
|
-
-------
|
31
29
|
UUID of the generated file.
|
32
30
|
|
33
31
|
Examples:
|
34
|
-
--------
|
35
32
|
>>> from cloudnetpy.products import generate_ier
|
36
33
|
>>> generate_ier('categorize.nc', 'ier.nc')
|
37
34
|
|
38
35
|
References:
|
39
|
-
----------
|
40
36
|
Hogan, R. J., Mittermaier, M. P., & Illingworth, A. J. (2006). The Retrieval
|
41
37
|
of Ice Water Content from Radar Reflectivity Factor and Temperature and Its
|
42
38
|
Use in Evaluating a Mesoscale Model, Journal of Applied Meteorology and
|
cloudnetpy/products/iwc.py
CHANGED
@@ -21,22 +21,18 @@ def generate_iwc(
|
|
21
21
|
netCDF file.
|
22
22
|
|
23
23
|
Args:
|
24
|
-
----
|
25
24
|
categorize_file: Categorize file name.
|
26
25
|
output_file: Output file name.
|
27
26
|
uuid: Set specific UUID for the file.
|
28
27
|
|
29
28
|
Returns:
|
30
|
-
-------
|
31
29
|
UUID of the generated file.
|
32
30
|
|
33
31
|
Examples:
|
34
|
-
--------
|
35
32
|
>>> from cloudnetpy.products import generate_iwc
|
36
33
|
>>> generate_iwc('categorize.nc', 'iwc.nc')
|
37
34
|
|
38
35
|
References:
|
39
|
-
----------
|
40
36
|
Hogan, R.J., M.P. Mittermaier, and A.J. Illingworth, 2006:
|
41
37
|
The Retrieval of Ice Water Content from Radar Reflectivity Factor and
|
42
38
|
Temperature and Its Use in Evaluating a Mesoscale Model.
|
cloudnetpy/products/lwc.py
CHANGED
@@ -25,22 +25,18 @@ def generate_lwc(
|
|
25
25
|
content of observed liquid clouds. The results are written in a netCDF file.
|
26
26
|
|
27
27
|
Args:
|
28
|
-
----
|
29
28
|
categorize_file: Categorize file name.
|
30
29
|
output_file: Output file name.
|
31
30
|
uuid: Set specific UUID for the file.
|
32
31
|
|
33
32
|
Returns:
|
34
|
-
-------
|
35
33
|
str: UUID of the generated file.
|
36
34
|
|
37
35
|
Examples:
|
38
|
-
--------
|
39
36
|
>>> from cloudnetpy.products import generate_lwc
|
40
37
|
>>> generate_lwc('categorize.nc', 'lwc.nc')
|
41
38
|
|
42
39
|
References:
|
43
|
-
----------
|
44
40
|
Illingworth, A.J., R.J. Hogan, E. O'Connor, D. Bouniol, M.E. Brooks,
|
45
41
|
J. Delanoé, D.P. Donovan, J.D. Eastment, N. Gaussiat, J.W. Goddard,
|
46
42
|
M. Haeffelin, H.K. Baltink, O.A. Krasnov, J. Pelon, J. Piriou, A. Protat,
|
@@ -76,11 +72,9 @@ class LwcSource(DataSource):
|
|
76
72
|
structures and methods for holding the results.
|
77
73
|
|
78
74
|
Args:
|
79
|
-
----
|
80
75
|
categorize_file: Categorize file name.
|
81
76
|
|
82
77
|
Attributes:
|
83
|
-
----------
|
84
78
|
lwp (ndarray): 1D liquid water path.
|
85
79
|
lwp_error (ndarray): 1D error of liquid water path.
|
86
80
|
is_rain (ndarray): 1D array denoting presence of rain.
|
@@ -122,11 +116,9 @@ class Lwc:
|
|
122
116
|
"""Class handling the actual LWC calculations.
|
123
117
|
|
124
118
|
Args:
|
125
|
-
----
|
126
119
|
lwc_source: The :class:`LwcSource` instance.
|
127
120
|
|
128
121
|
Attributes:
|
129
|
-
----------
|
130
122
|
lwc_source (LwcSource): The :class:`LwcSource` instance.
|
131
123
|
dheight (float): Median difference in height vector.
|
132
124
|
is_liquid (ndarray): 2D array denoting liquid.
|
@@ -175,12 +167,10 @@ class CloudAdjustor:
|
|
175
167
|
"""Adjusts clouds (where possible) so that theoretical and measured LWP agree.
|
176
168
|
|
177
169
|
Args:
|
178
|
-
----
|
179
170
|
lwc_source: The :class:`LwcSource` instance.
|
180
171
|
lwc: The :class:`Lwc` instance.
|
181
172
|
|
182
173
|
Attributes:
|
183
|
-
----------
|
184
174
|
lwc_source (LwcSource): The :class:`LwcSource` instance.
|
185
175
|
lwc (ndarray): Liquid water content data.
|
186
176
|
is_liquid (ndarray): 2D array denoting liquid.
|
@@ -272,11 +262,9 @@ class CloudAdjustor:
|
|
272
262
|
"""Finds top clouds that contain only lidar-detected pixels.
|
273
263
|
|
274
264
|
Args:
|
275
|
-
----
|
276
265
|
detection: Array of integers where 1=lidar, 2=radar, 3=both.
|
277
266
|
|
278
267
|
Returns:
|
279
|
-
-------
|
280
268
|
Boolean array containing top-clouds that are detected only by lidar.
|
281
269
|
|
282
270
|
"""
|
@@ -313,12 +301,10 @@ class LwcError:
|
|
313
301
|
"""Calculates liquid water content error.
|
314
302
|
|
315
303
|
Args:
|
316
|
-
----
|
317
304
|
lwc_source: The :class:`LwcSource` instance.
|
318
305
|
lwc: The :class:`Lwc` instance.
|
319
306
|
|
320
307
|
Attributes:
|
321
|
-
----------
|
322
308
|
lwc_source (LwcSource): The :class:`LwcSource` instance.
|
323
309
|
lwc (ndarray): Liquid water content data.
|
324
310
|
error (ndarray): 2D array storing lwc_error.
|
@@ -26,11 +26,9 @@ class CategorizeBits:
|
|
26
26
|
"""Class holding information about category and quality bits.
|
27
27
|
|
28
28
|
Args:
|
29
|
-
----
|
30
29
|
categorize_file (str): Categorize file name.
|
31
30
|
|
32
31
|
Attributes:
|
33
|
-
----------
|
34
32
|
category_bits (dict): Dictionary containing boolean fields for `droplet`,
|
35
33
|
`falling`, `cold`, `melting`, `aerosol`, `insect`.
|
36
34
|
|
@@ -78,11 +76,9 @@ class ProductClassification(CategorizeBits):
|
|
78
76
|
of various Cloudnet products. Child of CategorizeBits class.
|
79
77
|
|
80
78
|
Args:
|
81
|
-
----
|
82
79
|
categorize_file (str): Categorize file name.
|
83
80
|
|
84
81
|
Attributes:
|
85
|
-
----------
|
86
82
|
is_rain (ndarray): 1D array denoting rainy profiles.
|
87
83
|
|
88
84
|
"""
|
@@ -190,7 +186,6 @@ class IceSource(DataSource):
|
|
190
186
|
"""Returns coefficients for ice effective radius retrieval.
|
191
187
|
|
192
188
|
References
|
193
|
-
----------
|
194
189
|
Hogan et.al. 2006, https://doi.org/10.1175/JAM2340.1
|
195
190
|
"""
|
196
191
|
if self.product == "ier":
|
@@ -251,12 +246,10 @@ def read_nc_fields(nc_file: str, names: str | list) -> ma.MaskedArray | list:
|
|
251
246
|
"""Reads selected variables from a netCDF file.
|
252
247
|
|
253
248
|
Args:
|
254
|
-
----
|
255
249
|
nc_file: netCDF file name.
|
256
250
|
names: Variables to be read, e.g. 'temperature' or ['ldr', 'lwp'].
|
257
251
|
|
258
252
|
Returns:
|
259
|
-
-------
|
260
253
|
ndarray/list: Array in case of one variable passed as a string.
|
261
254
|
List of arrays otherwise.
|
262
255
|
|
@@ -271,13 +264,11 @@ def interpolate_model(cat_file: str, names: str | list) -> dict[str, np.ndarray]
|
|
271
264
|
"""Interpolates 2D model field into dense Cloudnet grid.
|
272
265
|
|
273
266
|
Args:
|
274
|
-
----
|
275
267
|
cat_file: Categorize file name.
|
276
268
|
names: Model variable to be interpolated, e.g. 'temperature' or ['temperature',
|
277
269
|
'pressure'].
|
278
270
|
|
279
271
|
Returns:
|
280
|
-
-------
|
281
272
|
dict: Interpolated variables.
|
282
273
|
|
283
274
|
"""
|