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
cloudnetpy/cloudnetarray.py
CHANGED
@@ -14,7 +14,6 @@ class CloudnetArray:
|
|
14
14
|
"""Stores netCDF4 variables, numpy arrays and scalars as CloudnetArrays.
|
15
15
|
|
16
16
|
Args:
|
17
|
-
----
|
18
17
|
variable: The netCDF4 :class:`Variable` instance,
|
19
18
|
numpy array (masked or regular), or scalar (float, int).
|
20
19
|
name: Name of the variable.
|
@@ -59,12 +58,10 @@ class CloudnetArray:
|
|
59
58
|
"""Rebins `data` in time.
|
60
59
|
|
61
60
|
Args:
|
62
|
-
----
|
63
61
|
time: 1D time array.
|
64
62
|
time_new: 1D new time array.
|
65
63
|
|
66
64
|
Returns:
|
67
|
-
-------
|
68
65
|
Time indices without data.
|
69
66
|
|
70
67
|
"""
|
@@ -149,12 +146,10 @@ class CloudnetArray:
|
|
149
146
|
"""Calculates std of radar velocity.
|
150
147
|
|
151
148
|
Args:
|
152
|
-
----
|
153
149
|
time: 1D time array.
|
154
150
|
time_new: 1D new time array.
|
155
151
|
|
156
152
|
Notes:
|
157
|
-
-----
|
158
153
|
The result is masked if the bin contains masked values.
|
159
154
|
"""
|
160
155
|
data_as_float = self.data.astype(float)
|
@@ -171,7 +166,6 @@ class CloudnetArray:
|
|
171
166
|
"""Rebins Doppler velocity in polar coordinates.
|
172
167
|
|
173
168
|
Args:
|
174
|
-
----
|
175
169
|
time: 1D time array.
|
176
170
|
time_new: 1D new time array.
|
177
171
|
folding_velocity: Folding velocity (m/s). Can be a float when
|
cloudnetpy/concat_lib.py
CHANGED
@@ -47,16 +47,13 @@ def update_nc(old_file: str, new_file: str) -> int:
|
|
47
47
|
"""Appends data to existing netCDF file.
|
48
48
|
|
49
49
|
Args:
|
50
|
-
----
|
51
50
|
old_file: Filename of an existing netCDF file.
|
52
51
|
new_file: Filename of a new file whose data will be appended to the end.
|
53
52
|
|
54
53
|
Returns:
|
55
|
-
-------
|
56
54
|
1 = success, 0 = failed to add new data.
|
57
55
|
|
58
56
|
Notes:
|
59
|
-
-----
|
60
57
|
Requires 'time' variable with unlimited dimension.
|
61
58
|
|
62
59
|
"""
|
@@ -86,7 +83,6 @@ def concatenate_files(
|
|
86
83
|
"""Concatenate netCDF files in one dimension.
|
87
84
|
|
88
85
|
Args:
|
89
|
-
----
|
90
86
|
filenames: List of files to be concatenated.
|
91
87
|
output_file: Output file name.
|
92
88
|
concat_dimension: Dimension name for concatenation. Default is 'time'.
|
@@ -98,7 +94,6 @@ def concatenate_files(
|
|
98
94
|
another (value from the first file is saved).
|
99
95
|
|
100
96
|
Notes:
|
101
|
-
-----
|
102
97
|
Arrays without 'concat_dimension', scalars, and global attributes will be taken
|
103
98
|
from the first file. Groups, possibly present in a NETCDF4 formatted file,
|
104
99
|
are ignored.
|
cloudnetpy/datasource.py
CHANGED
@@ -16,12 +16,10 @@ class DataSource:
|
|
16
16
|
"""Base class for all Cloudnet measurements and model data.
|
17
17
|
|
18
18
|
Args:
|
19
|
-
----
|
20
19
|
full_path: Calibrated instrument / model NetCDF file.
|
21
20
|
radar: Indicates if data is from cloud radar. Default is False.
|
22
21
|
|
23
22
|
Attributes:
|
24
|
-
----------
|
25
23
|
filename (str): Filename of the input file.
|
26
24
|
dataset (netCDF4.Dataset): A netCDF4 Dataset instance.
|
27
25
|
source (str): Global attribute `source` read from the input file.
|
@@ -65,15 +63,12 @@ class DataSource:
|
|
65
63
|
variables dictionary, fetched from the input netCDF file.
|
66
64
|
|
67
65
|
Args:
|
68
|
-
----
|
69
66
|
*args: possible names of the variable. The first match is returned.
|
70
67
|
|
71
68
|
Returns:
|
72
|
-
-------
|
73
69
|
ndarray: The actual data.
|
74
70
|
|
75
71
|
Raises:
|
76
|
-
------
|
77
72
|
RuntimeError: The variable is not found.
|
78
73
|
|
79
74
|
"""
|
@@ -93,7 +88,6 @@ class DataSource:
|
|
93
88
|
"""Adds new CloudnetVariable or RadarVariable into `data` attribute.
|
94
89
|
|
95
90
|
Args:
|
96
|
-
----
|
97
91
|
variable: netCDF variable or data array to be added.
|
98
92
|
key: Key used with *variable* when added to `data`
|
99
93
|
attribute (dictionary).
|
@@ -107,11 +101,9 @@ class DataSource:
|
|
107
101
|
"""Returns date components.
|
108
102
|
|
109
103
|
Returns
|
110
|
-
-------
|
111
104
|
list: Date components [YYYY, MM, DD].
|
112
105
|
|
113
106
|
Raises
|
114
|
-
------
|
115
107
|
RuntimeError: Not found or invalid date.
|
116
108
|
|
117
109
|
"""
|
@@ -191,13 +183,11 @@ class DataSource:
|
|
191
183
|
"""Transforms netCDF4-variables into CloudnetArrays.
|
192
184
|
|
193
185
|
Args:
|
194
|
-
----
|
195
186
|
keys: netCDF4-variables to be converted. The results
|
196
187
|
are saved in *self.data* dictionary with *fields*
|
197
188
|
strings as keys.
|
198
189
|
|
199
190
|
Notes:
|
200
|
-
-----
|
201
191
|
The attributes of the variables are not copied. Just the data.
|
202
192
|
|
203
193
|
"""
|
@@ -215,7 +205,6 @@ class DataSource:
|
|
215
205
|
"""Transforms single netCDF4 variable into CloudnetArray.
|
216
206
|
|
217
207
|
Args:
|
218
|
-
----
|
219
208
|
possible_names: Tuple of strings containing the possible
|
220
209
|
names of the variable in the input NetCDF file.
|
221
210
|
key: Key for self.data dictionary and name-attribute
|
@@ -224,7 +213,6 @@ class DataSource:
|
|
224
213
|
ignore_mask: If true, always writes an ordinary numpy array.
|
225
214
|
|
226
215
|
Raises:
|
227
|
-
------
|
228
216
|
RuntimeError: No variable found.
|
229
217
|
|
230
218
|
"""
|
cloudnetpy/instruments/basta.py
CHANGED
@@ -22,7 +22,6 @@ def basta2nc(
|
|
22
22
|
steps.
|
23
23
|
|
24
24
|
Args:
|
25
|
-
----
|
26
25
|
basta_file: Filename of a daily BASTA .nc file.
|
27
26
|
output_file: Output filename.
|
28
27
|
site_meta: Dictionary containing information about the site. Required key
|
@@ -31,15 +30,12 @@ def basta2nc(
|
|
31
30
|
date: Expected date of the measurements as YYYY-MM-DD.
|
32
31
|
|
33
32
|
Returns:
|
34
|
-
-------
|
35
33
|
UUID of the generated file.
|
36
34
|
|
37
35
|
Raises:
|
38
|
-
------
|
39
36
|
ValueError: Timestamps do not match the expected date.
|
40
37
|
|
41
38
|
Examples:
|
42
|
-
--------
|
43
39
|
>>> from cloudnetpy.instruments import basta2nc
|
44
40
|
>>> site_meta = {'name': 'Palaiseau', 'latitude': 48.718, 'longitude': 2.207}
|
45
41
|
>>> basta2nc('basta_file.nc', 'radar.nc', site_meta)
|
@@ -74,7 +70,6 @@ class Basta(NcRadar):
|
|
74
70
|
"""Class for BASTA raw radar data. Child of NcRadar().
|
75
71
|
|
76
72
|
Args:
|
77
|
-
----
|
78
73
|
full_path: BASTA netCDF filename.
|
79
74
|
site_meta: Site properties in a dictionary. Required key is `name`.
|
80
75
|
|
cloudnetpy/instruments/ceilo.py
CHANGED
@@ -40,7 +40,6 @@ def ceilo2nc(
|
|
40
40
|
of weak aerosol layers and supercooled liquid clouds.
|
41
41
|
|
42
42
|
Args:
|
43
|
-
----
|
44
43
|
full_path: Ceilometer file name.
|
45
44
|
output_file: Output file name, e.g. 'ceilo.nc'.
|
46
45
|
site_meta: Dictionary containing information about the site and instrument.
|
@@ -54,15 +53,12 @@ def ceilo2nc(
|
|
54
53
|
date: Expected date as YYYY-MM-DD of all profiles in the file.
|
55
54
|
|
56
55
|
Returns:
|
57
|
-
-------
|
58
56
|
UUID of the generated file.
|
59
57
|
|
60
58
|
Raises:
|
61
|
-
------
|
62
59
|
RuntimeError: Failed to read or process raw ceilometer data.
|
63
60
|
|
64
61
|
Examples:
|
65
|
-
--------
|
66
62
|
>>> from cloudnetpy.instruments import ceilo2nc
|
67
63
|
>>> site_meta = {'name': 'Mace-Head', 'altitude': 5}
|
68
64
|
>>> ceilo2nc('vaisala_raw.txt', 'vaisala.nc', site_meta)
|
@@ -317,14 +317,12 @@ def calc_sigma_units(
|
|
317
317
|
how many steps in time and height corresponds to this smoothing.
|
318
318
|
|
319
319
|
Args:
|
320
|
-
----
|
321
320
|
time_vector: 1D vector (fraction hour).
|
322
321
|
range_los: 1D vector (m).
|
323
322
|
sigma_minutes: Smoothing in minutes.
|
324
323
|
sigma_metres: Smoothing in metres.
|
325
324
|
|
326
325
|
Returns:
|
327
|
-
-------
|
328
326
|
tuple: Two element tuple containing number of steps in time and height to
|
329
327
|
achieve wanted smoothing.
|
330
328
|
|
@@ -21,7 +21,6 @@ def copernicus2nc(
|
|
21
21
|
"""Converts 'Copernicus' cloud radar data into Cloudnet Level 1b netCDF file.
|
22
22
|
|
23
23
|
Args:
|
24
|
-
----
|
25
24
|
raw_files: Input file name or folder containing multiple input files.
|
26
25
|
output_file: Output filename.
|
27
26
|
site_meta: Dictionary containing information about the site. Required key
|
@@ -31,15 +30,12 @@ def copernicus2nc(
|
|
31
30
|
date: Expected date as YYYY-MM-DD of all profiles in the file.
|
32
31
|
|
33
32
|
Returns:
|
34
|
-
-------
|
35
33
|
UUID of the generated file.
|
36
34
|
|
37
35
|
Raises:
|
38
|
-
------
|
39
36
|
ValidTimeStampError: No valid timestamps found.
|
40
37
|
|
41
38
|
Examples:
|
42
|
-
--------
|
43
39
|
>>> from cloudnetpy.instruments import copernicus2nc
|
44
40
|
>>> site_meta = {'name': 'Chilbolton'}
|
45
41
|
>>> copernicus2nc('raw_radar.nc', 'radar.nc', site_meta)
|
@@ -109,7 +105,6 @@ class Copernicus(ChilboltonRadar):
|
|
109
105
|
"""Class for Copernicus raw radar data. Child of ChilboltonRadar().
|
110
106
|
|
111
107
|
Args:
|
112
|
-
----
|
113
108
|
full_path: Filename of a daily Copernicus .nc NetCDF file.
|
114
109
|
site_meta: Site properties in a dictionary. Required keys are: `name`.
|
115
110
|
|
@@ -129,7 +124,6 @@ class Copernicus(ChilboltonRadar):
|
|
129
124
|
"""Experimental masking of corrupted Copernicus data.
|
130
125
|
|
131
126
|
Notes
|
132
|
-
-----
|
133
127
|
This method is based on a few days of test data only. Should be improved
|
134
128
|
and tested more carefully in the future.
|
135
129
|
"""
|
@@ -33,7 +33,6 @@ def parsivel2nc(
|
|
33
33
|
file.
|
34
34
|
|
35
35
|
Args:
|
36
|
-
----
|
37
36
|
disdrometer_file: Filename of disdrometer file or list of filenames.
|
38
37
|
output_file: Output filename.
|
39
38
|
site_meta: Dictionary containing information about the site. Required key
|
@@ -47,16 +46,13 @@ def parsivel2nc(
|
|
47
46
|
timestamps:
|
48
47
|
|
49
48
|
Returns:
|
50
|
-
-------
|
51
49
|
UUID of the generated file.
|
52
50
|
|
53
51
|
Raises:
|
54
|
-
------
|
55
52
|
DisdrometerDataError: Timestamps do not match the expected date, or unable
|
56
53
|
to read the disdrometer file.
|
57
54
|
|
58
55
|
Examples:
|
59
|
-
--------
|
60
56
|
>>> from cloudnetpy.instruments import parsivel2nc
|
61
57
|
>>> site_meta = {'name': 'Lindenberg', 'altitude': 104, 'latitude': 52.2,
|
62
58
|
'longitude': 14.1}
|
@@ -436,7 +432,6 @@ def _read_toa5(filename: str | PathLike) -> dict[str, list]:
|
|
436
432
|
"""Read ASCII data from Campbell Scientific datalogger such as CR1000.
|
437
433
|
|
438
434
|
References
|
439
|
-
----------
|
440
435
|
CR1000 Measurement and Control System.
|
441
436
|
https://s.campbellsci.com/documents/us/manuals/cr1000.pdf
|
442
437
|
"""
|
@@ -15,7 +15,6 @@ def thies2nc(
|
|
15
15
|
"""Converts Thies-LNM disdrometer data into Cloudnet Level 1b netCDF file.
|
16
16
|
|
17
17
|
Args:
|
18
|
-
----
|
19
18
|
disdrometer_file: Filename of disdrometer .log file.
|
20
19
|
output_file: Output filename.
|
21
20
|
site_meta: Dictionary containing information about the site. Required key
|
@@ -24,16 +23,13 @@ def thies2nc(
|
|
24
23
|
date: Expected date of the measurements as YYYY-MM-DD.
|
25
24
|
|
26
25
|
Returns:
|
27
|
-
-------
|
28
26
|
UUID of the generated file.
|
29
27
|
|
30
28
|
Raises:
|
31
|
-
------
|
32
29
|
DisdrometerDataError: Timestamps do not match the expected date, or unable
|
33
30
|
to read the disdrometer file.
|
34
31
|
|
35
32
|
Examples:
|
36
|
-
--------
|
37
33
|
>>> from cloudnetpy.instruments import thies2nc
|
38
34
|
>>> site_meta = {'name': 'Lindenberg', 'altitude': 104, 'latitude': 52.2,
|
39
35
|
'longitude': 14.1}
|
@@ -20,7 +20,6 @@ def galileo2nc(
|
|
20
20
|
"""Converts 'Galileo' cloud radar data into Cloudnet Level 1b netCDF file.
|
21
21
|
|
22
22
|
Args:
|
23
|
-
----
|
24
23
|
raw_files: Input file name or folder containing multiple input files.
|
25
24
|
output_file: Output filename.
|
26
25
|
site_meta: Dictionary containing information about the site. Required key
|
@@ -30,15 +29,12 @@ def galileo2nc(
|
|
30
29
|
date: Expected date as YYYY-MM-DD of all profiles in the file.
|
31
30
|
|
32
31
|
Returns:
|
33
|
-
-------
|
34
32
|
UUID of the generated file.
|
35
33
|
|
36
34
|
Raises:
|
37
|
-
------
|
38
35
|
ValidTimeStampError: No valid timestamps found.
|
39
36
|
|
40
37
|
Examples:
|
41
|
-
--------
|
42
38
|
>>> from cloudnetpy.instruments import galileo2nc
|
43
39
|
>>> site_meta = {'name': 'Chilbolton'}
|
44
40
|
>>> galileo2nc('raw_radar.nc', 'radar.nc', site_meta)
|
@@ -105,7 +101,6 @@ class Galileo(ChilboltonRadar):
|
|
105
101
|
"""Class for Galileo raw radar data. Child of ChilboltonRadar().
|
106
102
|
|
107
103
|
Args:
|
108
|
-
----
|
109
104
|
full_path: Filename of a daily Galileo .nc NetCDF file.
|
110
105
|
site_meta: Site properties in a dictionary. Required keys are: `name`.
|
111
106
|
|
cloudnetpy/instruments/hatpro.py
CHANGED
@@ -34,7 +34,6 @@ def hatpro2l1c(
|
|
34
34
|
"""Converts RPG HATPRO microwave radiometer data into Cloudnet Level 1c netCDF file.
|
35
35
|
|
36
36
|
Args:
|
37
|
-
----
|
38
37
|
mwr_dir: Folder containing one day of HATPRO files.
|
39
38
|
output_file: Output file name.
|
40
39
|
site_meta: Dictionary containing information about the site and instrument
|
@@ -42,7 +41,6 @@ def hatpro2l1c(
|
|
42
41
|
date: Expected date in the input files.
|
43
42
|
|
44
43
|
Returns:
|
45
|
-
-------
|
46
44
|
UUID of the generated file.
|
47
45
|
"""
|
48
46
|
coeff_files = site_meta.get("coefficientFiles", None)
|
@@ -123,7 +121,6 @@ def hatpro2nc(
|
|
123
121
|
concatenates the data and writes it into netCDF file.
|
124
122
|
|
125
123
|
Args:
|
126
|
-
----
|
127
124
|
path_to_files: Folder containing one day of RPG HATPRO files.
|
128
125
|
output_file: Output file name.
|
129
126
|
site_meta: Dictionary containing information about the site with keys:
|
@@ -140,18 +137,15 @@ def hatpro2nc(
|
|
140
137
|
only files that match the date will be used.
|
141
138
|
|
142
139
|
Returns:
|
143
|
-
-------
|
144
140
|
2-element tuple containing
|
145
141
|
|
146
142
|
- UUID of the generated file.
|
147
143
|
- Files used in the processing.
|
148
144
|
|
149
145
|
Raises:
|
150
|
-
------
|
151
146
|
ValidTimeStampError: No valid timestamps found.
|
152
147
|
|
153
148
|
Examples:
|
154
|
-
--------
|
155
149
|
>>> from cloudnetpy.instruments import hatpro2nc
|
156
150
|
>>> site_meta = {'name': 'Hyytiala', 'altitude': 174}
|
157
151
|
>>> hatpro2nc('/path/to/files/', 'hatpro.nc', site_meta)
|
cloudnetpy/instruments/mira.py
CHANGED
@@ -27,7 +27,6 @@ def mira2nc(
|
|
27
27
|
steps.
|
28
28
|
|
29
29
|
Args:
|
30
|
-
----
|
31
30
|
raw_mira: Filename of a daily MIRA .mmclx or .zncfile. Can be also a folder
|
32
31
|
containing several non-concatenated .mmclx or .znc files from one day
|
33
32
|
or list of files. znc files take precedence because they are the newer
|
@@ -39,18 +38,15 @@ def mira2nc(
|
|
39
38
|
date: Expected date as YYYY-MM-DD of all profiles in the file.
|
40
39
|
|
41
40
|
Returns:
|
42
|
-
-------
|
43
41
|
UUID of the generated file.
|
44
42
|
|
45
43
|
Raises:
|
46
|
-
------
|
47
44
|
ValidTimeStampError: No valid timestamps found.
|
48
45
|
FileNotFoundError: No suitable input files found.
|
49
46
|
ValueError: Wrong suffix in input file(s).
|
50
47
|
TypeError: Mixed mmclx and znc files.
|
51
48
|
|
52
49
|
Examples:
|
53
|
-
--------
|
54
50
|
>>> from cloudnetpy.instruments import mira2nc
|
55
51
|
>>> site_meta = {'name': 'Vehmasmaki'}
|
56
52
|
>>> mira2nc('raw_radar.mmclx', 'radar.nc', site_meta)
|
@@ -89,7 +85,6 @@ class Mira(NcRadar):
|
|
89
85
|
"""Class for MIRA-35 raw radar data. Child of NcRadar().
|
90
86
|
|
91
87
|
Args:
|
92
|
-
----
|
93
88
|
full_path: Filename of a daily MIRA .mmclx NetCDF file.
|
94
89
|
site_meta: Site properties in a dictionary. Required keys are: `name`.
|
95
90
|
|
cloudnetpy/instruments/mrr.py
CHANGED
@@ -29,7 +29,6 @@ def mrr2nc(
|
|
29
29
|
contains only the relevant data.
|
30
30
|
|
31
31
|
Args:
|
32
|
-
----
|
33
32
|
input_file: Filename of a daily MMR-PRO .nc file, path to directory
|
34
33
|
containing several non-concatenated .nc files from one day, or list
|
35
34
|
of filenames.
|
@@ -40,15 +39,12 @@ def mrr2nc(
|
|
40
39
|
date: Expected date as YYYY-MM-DD of all profiles in the file.
|
41
40
|
|
42
41
|
Returns:
|
43
|
-
-------
|
44
42
|
UUID of the generated file.
|
45
43
|
|
46
44
|
Raises:
|
47
|
-
------
|
48
45
|
ValidTimeStampError: No valid timestamps found.
|
49
46
|
|
50
47
|
Examples:
|
51
|
-
--------
|
52
48
|
>>> from cloudnetpy.instruments import mira2nc
|
53
49
|
>>> site_meta = {'name': 'LIM', 'latitude': 51.333, 'longitude': 12.389}
|
54
50
|
>>> mrr2nc('input.nc', 'output.nc', site_meta)
|
@@ -124,7 +120,6 @@ class MrrPro(NcRadar):
|
|
124
120
|
"""Class for MRR-PRO raw data. Child of NcRadar().
|
125
121
|
|
126
122
|
Args:
|
127
|
-
----
|
128
123
|
full_path: MRR-PRO netCDF filename.
|
129
124
|
site_meta: Site properties in a dictionary. Required keys are `name`,
|
130
125
|
`latitude`, `longitude` and `altitude`.
|
@@ -20,12 +20,10 @@ class NcRadar(DataSource, CloudnetInstrument):
|
|
20
20
|
"""Class for radars providing netCDF files. Child of DataSource().
|
21
21
|
|
22
22
|
Args:
|
23
|
-
----
|
24
23
|
full_path: Filename of a radar-produced netCDF file.
|
25
24
|
site_meta: Some metadata of the site.
|
26
25
|
|
27
26
|
Notes:
|
28
|
-
-----
|
29
27
|
Used with BASTA, MIRA and Copernicus radars.
|
30
28
|
"""
|
31
29
|
|
@@ -25,7 +25,6 @@ def pollyxt2nc(
|
|
25
25
|
"""Converts PollyXT Raman lidar data into Cloudnet Level 1b netCDF file.
|
26
26
|
|
27
27
|
Args:
|
28
|
-
----
|
29
28
|
input_folder: Path to pollyxt netCDF files.
|
30
29
|
output_file: Output filename.
|
31
30
|
site_meta: Dictionary containing information about the site with keys:
|
@@ -40,11 +39,9 @@ def pollyxt2nc(
|
|
40
39
|
date: Expected date of the measurements as YYYY-MM-DD.
|
41
40
|
|
42
41
|
Returns:
|
43
|
-
-------
|
44
42
|
UUID of the generated file.
|
45
43
|
|
46
44
|
Examples:
|
47
|
-
--------
|
48
45
|
>>> from cloudnetpy.instruments import pollyxt2nc
|
49
46
|
>>> site_meta = {'name': 'Mindelo', 'altitude': 13, 'zenith_angle': 6,
|
50
47
|
'snr_limit': 3}
|
@@ -24,7 +24,6 @@ def radiometrics2nc(
|
|
24
24
|
"""Converts Radiometrics .csv file into Cloudnet Level 1b netCDF file.
|
25
25
|
|
26
26
|
Args:
|
27
|
-
----
|
28
27
|
full_path: Input file name or folder containing multiple input files.
|
29
28
|
output_file: Output file name, e.g. 'radiometrics.nc'.
|
30
29
|
site_meta: Dictionary containing information about the site and instrument.
|
@@ -34,11 +33,9 @@ def radiometrics2nc(
|
|
34
33
|
date: Expected date as YYYY-MM-DD of all profiles in the file.
|
35
34
|
|
36
35
|
Returns:
|
37
|
-
-------
|
38
36
|
UUID of the generated file.
|
39
37
|
|
40
38
|
Examples:
|
41
|
-
--------
|
42
39
|
>>> from cloudnetpy.instruments import radiometrics2nc
|
43
40
|
>>> site_meta = {'name': 'Soverato', 'altitude': 21}
|
44
41
|
>>> radiometrics2nc('radiometrics.csv', 'radiometrics.nc', site_meta)
|
@@ -84,7 +81,6 @@ class Radiometrics:
|
|
84
81
|
"""Reader for level 2 files of Radiometrics microwave radiometers.
|
85
82
|
|
86
83
|
References
|
87
|
-
----------
|
88
84
|
Radiometrics (2008). Profiler Operator's Manual: MP-3000A, MP-2500A,
|
89
85
|
MP-1500A, MP-183A.
|
90
86
|
"""
|
cloudnetpy/instruments/rpg.py
CHANGED
@@ -35,7 +35,6 @@ def rpg2nc(
|
|
35
35
|
concatenates the data and writes a netCDF file.
|
36
36
|
|
37
37
|
Args:
|
38
|
-
----
|
39
38
|
path_to_l1_files: Folder containing one day of RPG LV1 files.
|
40
39
|
output_file: Output file name.
|
41
40
|
site_meta: Dictionary containing information about the
|
@@ -48,18 +47,15 @@ def rpg2nc(
|
|
48
47
|
only files that match the date will be used.
|
49
48
|
|
50
49
|
Returns:
|
51
|
-
-------
|
52
50
|
2-element tuple containing
|
53
51
|
|
54
52
|
- UUID of the generated file.
|
55
53
|
- Files used in the processing.
|
56
54
|
|
57
55
|
Raises:
|
58
|
-
------
|
59
56
|
ValidTimeStampError: No valid timestamps found.
|
60
57
|
|
61
58
|
Examples:
|
62
|
-
--------
|
63
59
|
>>> from cloudnetpy.instruments import rpg2nc
|
64
60
|
>>> site_meta = {'name': 'Hyytiala', 'altitude': 174}
|
65
61
|
>>> rpg2nc('/path/to/files/', 'test.nc', site_meta)
|
@@ -116,7 +112,6 @@ def _stack_rpg_data(rpg_objects: RpgObjects) -> tuple[dict, dict]:
|
|
116
112
|
"""Combines data from hourly RPG objects.
|
117
113
|
|
118
114
|
Notes
|
119
|
-
-----
|
120
115
|
Ignores variable names starting with an underscore.
|
121
116
|
|
122
117
|
"""
|
@@ -165,7 +165,6 @@ class HatproBin:
|
|
165
165
|
"""HATPRO binary file reader. Byte order is assumed to be little endian.
|
166
166
|
|
167
167
|
References
|
168
|
-
----------
|
169
168
|
Radiometer Physics (2014): Instrument Operation and Software Guide
|
170
169
|
Operation Principles and Software Description for RPG standard single
|
171
170
|
polarization radiometers (G5 series).
|
@@ -301,7 +301,6 @@ class Ct25k(VaisalaCeilo):
|
|
301
301
|
"""Class for Vaisala CT25k ceilometer.
|
302
302
|
|
303
303
|
References
|
304
|
-
----------
|
305
304
|
https://www.manualslib.com/manual/1414094/Vaisala-Ct25k.html
|
306
305
|
|
307
306
|
"""
|
@@ -364,12 +363,10 @@ def split_string(string: str, indices: list) -> list:
|
|
364
363
|
"""Splits string between indices.
|
365
364
|
|
366
365
|
Notes
|
367
|
-
-----
|
368
366
|
It is possible to skip characters from the beginning and end of the
|
369
367
|
string but not from the middle.
|
370
368
|
|
371
369
|
Examples
|
372
|
-
--------
|
373
370
|
>>> s = 'abcde'
|
374
371
|
>>> indices = [1, 2, 4]
|
375
372
|
>>> split_string(s, indices)
|
@@ -383,7 +380,6 @@ def values_to_dict(keys: tuple, values: list) -> dict:
|
|
383
380
|
"""Converts list elements to dictionary.
|
384
381
|
|
385
382
|
Examples
|
386
|
-
--------
|
387
383
|
>>> keys = ('a', 'b')
|
388
384
|
>>> values = [[1, 2], [1, 2], [1, 2], [1, 2]]
|
389
385
|
>>> values_to_dict(keys, values)
|
@@ -22,7 +22,6 @@ def ws2nc(
|
|
22
22
|
"""Converts weather-station data into Cloudnet Level 1b netCDF file.
|
23
23
|
|
24
24
|
Args:
|
25
|
-
----
|
26
25
|
weather_station_file: Filename of weather-station ASCII file.
|
27
26
|
output_file: Output filename.
|
28
27
|
site_meta: Dictionary containing information about the site. Required key
|
@@ -31,11 +30,9 @@ def ws2nc(
|
|
31
30
|
date: Expected date of the measurements as YYYY-MM-DD.
|
32
31
|
|
33
32
|
Returns:
|
34
|
-
-------
|
35
33
|
UUID of the generated file.
|
36
34
|
|
37
35
|
Raises:
|
38
|
-
------
|
39
36
|
WeatherStationDataError : Unable to read the file.
|
40
37
|
ValidTimeStampError: No valid timestamps found.
|
41
38
|
"""
|
@@ -20,7 +20,6 @@ def update_attributes(model_downsample_variables: dict, attributes: dict) -> Non
|
|
20
20
|
New attributes are added.
|
21
21
|
|
22
22
|
Args:
|
23
|
-
----
|
24
23
|
model_downsample_variables (dict): Array instances.
|
25
24
|
attributes (dict): Product-specific attributes.
|
26
25
|
"""
|
@@ -71,7 +70,6 @@ def save_downsampled_file(
|
|
71
70
|
"""Saves a standard downsampled day product file.
|
72
71
|
|
73
72
|
Args:
|
74
|
-
----
|
75
73
|
id_mark (str): File identifier, format "(product name)_(model name)"
|
76
74
|
file_name (str): Name of the output file to be generated
|
77
75
|
objects (tuple): Include two objects: The :class:'ModelManager' and
|
@@ -165,12 +163,10 @@ def add_time_attribute(date: datetime) -> dict:
|
|
165
163
|
""" "Adds time attribute with correct units.
|
166
164
|
|
167
165
|
Args:
|
168
|
-
----
|
169
166
|
attributes: Attributes of variables.
|
170
167
|
date: Date as Y M D 0 0 0.
|
171
168
|
|
172
169
|
Returns:
|
173
|
-
-------
|
174
170
|
dict: Same attributes with 'time' attribute added.
|
175
171
|
"""
|
176
172
|
return {
|