cloudnetpy 1.80.6__py3-none-any.whl → 1.80.7__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.
@@ -1,24 +1,24 @@
1
- from typing import NamedTuple
2
-
3
-
4
- class MetaData(NamedTuple):
5
- long_name: str
6
- units: str
7
- comment: str | None = None
8
- standard_name: str | None = None
9
- axis: str | None = None
10
- positive: str | None = None
11
- calendar: str | None = None
12
-
1
+ from cloudnetpy.metadata import MetaData
13
2
 
14
3
  MODEL_ATTRIBUTES = {
15
- "time": MetaData(units="", long_name="Time UTC", axis="T", calendar="standard"),
16
- "latitude": MetaData(long_name="Latitude of grid point", units="degree_north"),
17
- "longitude": MetaData(long_name="Longitude of grid point", units="degree_east"),
4
+ "time": MetaData(
5
+ units="",
6
+ long_name="Time UTC",
7
+ axis="T",
8
+ calendar="standard",
9
+ dimensions=("time",),
10
+ ),
11
+ "latitude": MetaData(
12
+ long_name="Latitude of grid point", units="degree_north", dimensions=None
13
+ ),
14
+ "longitude": MetaData(
15
+ long_name="Longitude of grid point", units="degree_east", dimensions=None
16
+ ),
18
17
  "horizontal_resolution": MetaData(
19
18
  long_name="Horizontal resolution of model",
20
19
  units="km",
21
20
  comment="Distance between two grid point",
21
+ dimensions=None,
22
22
  ),
23
23
  "level": MetaData(
24
24
  long_name="Model level",
@@ -26,6 +26,7 @@ MODEL_ATTRIBUTES = {
26
26
  comment="Level 1 describes the highest height from ground.",
27
27
  axis="Z",
28
28
  positive="down",
29
+ dimensions=("level",),
29
30
  ),
30
31
  }
31
32
 
@@ -38,6 +39,7 @@ CYCLE_ATTRIBUTES = {
38
39
  "which it was taken. Note that the profiles in this file may be taken\n"
39
40
  "from more than one forecast."
40
41
  ),
42
+ dimensions=("time",),
41
43
  ),
42
44
  "height": MetaData(
43
45
  long_name="Height above ground",
@@ -47,18 +49,21 @@ CYCLE_ATTRIBUTES = {
47
49
  "specific humidity."
48
50
  ),
49
51
  positive="up",
52
+ dimensions=("time", "level"),
50
53
  ),
51
- "pressure": MetaData(long_name="Pressure", units="Pa"),
52
- "temperature": MetaData(long_name="Temperature", units="K"),
54
+ "pressure": MetaData(long_name="Pressure", units="Pa", dimensions=None),
55
+ "temperature": MetaData(long_name="Temperature", units="K", dimensions=None),
53
56
  "uwind": MetaData(
54
57
  long_name="Zonal wind",
55
58
  units="m s-1",
56
59
  standard_name="eastward_wind",
60
+ dimensions=None,
57
61
  ),
58
62
  "vwind": MetaData(
59
63
  long_name="Meridional wind",
60
64
  units="m s-1",
61
65
  standard_name="northward_wind",
66
+ dimensions=None,
62
67
  ),
63
68
  "wwind": MetaData(
64
69
  long_name="Vertical wind",
@@ -68,13 +73,15 @@ CYCLE_ATTRIBUTES = {
68
73
  "The vertical wind has been calculated from omega (Pa s-1),\n"
69
74
  "height and pressure using: w=omega*dz/dp"
70
75
  ),
76
+ dimensions=None,
71
77
  ),
72
78
  "omega": MetaData(
73
79
  long_name="Vertical wind in pressure coordinates",
74
80
  units="PA s-1",
75
81
  standard_name="omega",
82
+ dimensions=None,
76
83
  ),
77
- "q": MetaData(long_name="Specific humidity", units="1"),
84
+ "q": MetaData(long_name="Specific humidity", units="1", dimensions=None),
78
85
  "rh": MetaData(
79
86
  long_name="Relative humidity",
80
87
  units="1",
@@ -82,28 +89,36 @@ CYCLE_ATTRIBUTES = {
82
89
  "With respect to liquid above 0 degrees C and with respect to ice\n"
83
90
  "below 0 degrees C"
84
91
  ),
92
+ dimensions=None,
85
93
  ),
86
94
  }
87
95
 
88
96
  MODEL_L3_ATTRIBUTES = {
89
- "cf": MetaData(long_name="Cloud fraction of model grid point", units="1"),
97
+ "cf": MetaData(
98
+ long_name="Cloud fraction of model grid point",
99
+ units="1",
100
+ dimensions=("time", "level"),
101
+ ),
90
102
  "cf_cirrus": MetaData(
91
103
  long_name="Cloud fraction of model grid point with filtered cirrus fraction",
92
104
  units="1",
93
105
  comment="High level cirrus fraction is reduce do to lack if a radar\n"
94
106
  "capability to observe correctly particles small and high.",
107
+ dimensions=("time", "level"),
95
108
  ),
96
109
  "iwc": MetaData(
97
110
  long_name="Ice water content of model grid point",
98
111
  units="kg m-3",
99
112
  comment="Calculated using model ice water mixing ration, pressure\n"
100
113
  "and temperature: qi*P/287*T",
114
+ dimensions=("time", "level"),
101
115
  ),
102
116
  "lwc": MetaData(
103
117
  long_name="Liquid water content of model grid point",
104
118
  units="kg m-3",
105
119
  comment="Calculated using model liquid water mixing ration, pressure\n"
106
120
  "and temperature: ql*P/287*T",
121
+ dimensions=("time", "level"),
107
122
  ),
108
123
  }
109
124
 
@@ -116,6 +131,7 @@ REGRID_PRODUCT_ATTRIBUTES = {
116
131
  "averaged onto the models grid with height and time. Volume is\n"
117
132
  "space within four grid points."
118
133
  ),
134
+ dimensions=("time", "level"),
119
135
  ),
120
136
  "cf_A": MetaData(
121
137
  long_name="Observed cloud fraction by area",
@@ -125,6 +141,7 @@ REGRID_PRODUCT_ATTRIBUTES = {
125
141
  "averaged onto the models grid with height and time. Area is\n"
126
142
  "sum of time columns with any cloud fraction."
127
143
  ),
144
+ dimensions=("time", "level"),
128
145
  ),
129
146
  "cf_V_adv": MetaData(
130
147
  long_name="Observed cloud fraction by advection volume",
@@ -134,6 +151,7 @@ REGRID_PRODUCT_ATTRIBUTES = {
134
151
  "except that model winds were used to estimate the time taken to advect\n"
135
152
  "airflow a distance equivalent to the models horizontal resolution."
136
153
  ),
154
+ dimensions=("time", "level"),
137
155
  ),
138
156
  "cf_A_adv": MetaData(
139
157
  long_name="Observed cloud fraction by advection area",
@@ -143,6 +161,7 @@ REGRID_PRODUCT_ATTRIBUTES = {
143
161
  "except that model winds were used to estimate the time taken to advect\n"
144
162
  "airflow a distance equivalent to the models horizontal resolution."
145
163
  ),
164
+ dimensions=("time", "level"),
146
165
  ),
147
166
  "iwc": MetaData(
148
167
  long_name="Observed ice water content reshaped to model dimensions by"
@@ -154,6 +173,7 @@ REGRID_PRODUCT_ATTRIBUTES = {
154
173
  "The formula has been applied where the categorization data has\n"
155
174
  "diagnosed that the radar echo is due to ice."
156
175
  ),
176
+ dimensions=("time", "level"),
157
177
  ),
158
178
  "iwc_att": MetaData(
159
179
  long_name="Observed ice water content with attenuation reshaped to model grid"
@@ -164,6 +184,7 @@ REGRID_PRODUCT_ATTRIBUTES = {
164
184
  "except that profiles with uncorrected attenuation of the radar\n"
165
185
  "reflectivity were included."
166
186
  ),
187
+ dimensions=("time", "level"),
167
188
  ),
168
189
  "iwc_rain": MetaData(
169
190
  long_name="Observed ice water content with raining reshaped to model grid"
@@ -174,6 +195,7 @@ REGRID_PRODUCT_ATTRIBUTES = {
174
195
  "including attenuation, iwc_att, except that profiles with rain\n"
175
196
  "at the surface were also included."
176
197
  ),
198
+ dimensions=("time", "level"),
177
199
  ),
178
200
  "iwc_adv": MetaData(
179
201
  long_name="Observed ice water content reshaped to model advection grid"
@@ -184,6 +206,7 @@ REGRID_PRODUCT_ATTRIBUTES = {
184
206
  "except that model winds were used to estimate the time taken to advect\n"
185
207
  "the flow a distance equivalent to the models horizontal resolution."
186
208
  ),
209
+ dimensions=("time", "level"),
187
210
  ),
188
211
  "iwc_att_adv": MetaData(
189
212
  long_name="Observed ice water content with attenuation reshaped to model"
@@ -194,6 +217,7 @@ REGRID_PRODUCT_ATTRIBUTES = {
194
217
  "iwc_adv, except that profiles with uncorrected attenuation of the radar\n"
195
218
  "reflectivity were included."
196
219
  ),
220
+ dimensions=("time", "level"),
197
221
  ),
198
222
  "iwc_rain_adv": MetaData(
199
223
  long_name="Observed ice water content with raining reshaped to model"
@@ -204,6 +228,7 @@ REGRID_PRODUCT_ATTRIBUTES = {
204
228
  "including attenuation, iwc_att_adv, except that profiles with rain\n"
205
229
  "at the surface were also included."
206
230
  ),
231
+ dimensions=("time", "level"),
207
232
  ),
208
233
  "lwc": MetaData(
209
234
  long_name="Observed liquid water content reshaped to model grid by averaging",
@@ -213,6 +238,7 @@ REGRID_PRODUCT_ATTRIBUTES = {
213
238
  "pixels where the categorization data has diagnosed that liquid water \n"
214
239
  "is present, averaged onto the model grid with height and time."
215
240
  ),
241
+ dimensions=("time", "level"),
216
242
  ),
217
243
  "lwc_adv": MetaData(
218
244
  long_name="Observed liquid water content reshaped to model advection grid by "
@@ -223,5 +249,6 @@ REGRID_PRODUCT_ATTRIBUTES = {
223
249
  "lwc, except that model winds were used to estimate the time taken to\n"
224
250
  "advect flow over the models grid points."
225
251
  ),
252
+ dimensions=("time", "level"),
226
253
  ),
227
254
  }
cloudnetpy/output.py CHANGED
@@ -7,7 +7,6 @@ from os import PathLike
7
7
  from uuid import UUID
8
8
 
9
9
  import netCDF4
10
- import numpy as np
11
10
  from numpy import ma
12
11
 
13
12
  from cloudnetpy import utils, version
@@ -15,7 +14,7 @@ from cloudnetpy.categorize.containers import Observations
15
14
  from cloudnetpy.categorize.model import Model
16
15
  from cloudnetpy.datasource import DataSource
17
16
  from cloudnetpy.instruments.instruments import Instrument
18
- from cloudnetpy.metadata import COMMON_ATTRIBUTES, MetaData
17
+ from cloudnetpy.metadata import COMMON_ATTRIBUTES
19
18
 
20
19
 
21
20
  def save_level1b(
@@ -57,10 +56,8 @@ def _get_netcdf_dimensions(obj) -> dict:
57
56
  }
58
57
  # RPG cloud radar
59
58
  if "chirp_start_indices" in obj.data:
60
- if obj.data["chirp_start_indices"][:].ndim == 1:
61
- dimensions["chirp_start_indices"] = len(obj.data["chirp_start_indices"][:])
62
- else:
63
- dimensions["chirp"] = obj.data["chirp_start_indices"][:].shape[1]
59
+ ind = obj.data["chirp_start_indices"][:]
60
+ dimensions["chirp_sequence"] = ind.shape[1] if ind.ndim > 1 else len(ind)
64
61
 
65
62
  # disdrometer
66
63
  if hasattr(obj, "n_diameter") and hasattr(obj, "n_velocity"):
@@ -340,9 +337,8 @@ def add_time_attribute(
340
337
  raise TypeError
341
338
  units = f"hours since {date_str} 00:00:00 +00:00"
342
339
  if key not in attributes:
343
- attributes[key] = MetaData(units=units)
344
- else:
345
- attributes[key] = attributes[key]._replace(units=units)
340
+ attributes[key] = COMMON_ATTRIBUTES[key]
341
+ attributes[key] = attributes[key]._replace(units=units)
346
342
  return attributes
347
343
 
348
344
 
@@ -371,10 +367,9 @@ def add_source_attribute(attributes: dict, data: Observations) -> dict:
371
367
  continue
372
368
  source = getattr(data, instrument).dataset.source
373
369
  for key in keys:
374
- if key in attributes:
375
- attributes[key] = attributes[key]._replace(source=source)
376
- else:
377
- attributes[key] = MetaData(source=source)
370
+ if key not in attributes:
371
+ attributes[key] = COMMON_ATTRIBUTES[key]
372
+ attributes[key] = attributes[key]._replace(source=source)
378
373
  return attributes
379
374
 
380
375
 
@@ -403,8 +398,7 @@ def _write_vars2nc(nc: netCDF4.Dataset, cloudnet_variables: dict) -> None:
403
398
  fill_value = netCDF4.default_fillvals[obj.data_type]
404
399
  else:
405
400
  fill_value = False
406
-
407
- size = obj.dimensions or _get_dimensions(nc, obj.data)
401
+ size = obj.dimensions if obj.dimensions is not None else ()
408
402
 
409
403
  nc_variable = nc.createVariable(
410
404
  obj.name,
@@ -418,19 +412,6 @@ def _write_vars2nc(nc: netCDF4.Dataset, cloudnet_variables: dict) -> None:
418
412
  setattr(nc_variable, attr, getattr(obj, attr))
419
413
 
420
414
 
421
- def _get_dimensions(nc: netCDF4.Dataset, data: np.ndarray) -> tuple:
422
- """Finds correct dimensions for a variable."""
423
- if utils.isscalar(data):
424
- return ()
425
- variable_size: list = []
426
- file_dims = nc.dimensions
427
- array_dims = data.shape
428
- for length in array_dims:
429
- dim = [key for key in file_dims if file_dims[key].size == length][0] # noqa: RUF015
430
- variable_size = [*variable_size, dim]
431
- return tuple(variable_size)
432
-
433
-
434
415
  def _get_identifier(short_id: str) -> str:
435
416
  valid_ids = (
436
417
  "lwc",
@@ -190,27 +190,33 @@ CLASSIFICATION_ATTRIBUTES = {
190
190
  comment=COMMENTS["target_classification"],
191
191
  definition=DEFINITIONS["target_classification"],
192
192
  units="1",
193
+ dimensions=("time", "height"),
193
194
  ),
194
195
  "detection_status": MetaData(
195
196
  long_name="Radar and lidar detection status",
196
197
  comment=COMMENTS["detection_status"],
197
198
  definition=DEFINITIONS["detection_status"],
198
199
  units="1",
200
+ dimensions=("time", "height"),
199
201
  ),
200
202
  "cloud_top_height_amsl": MetaData(
201
203
  long_name="Height of cloud top above mean sea level",
202
204
  units="m",
205
+ dimensions=("time",),
203
206
  ),
204
207
  "cloud_base_height_amsl": MetaData(
205
208
  long_name="Height of cloud base above mean sea level",
206
209
  units="m",
210
+ dimensions=("time",),
207
211
  ),
208
212
  "cloud_top_height_agl": MetaData(
209
213
  long_name="Height of cloud top above ground level",
210
214
  units="m",
215
+ dimensions=("time",),
211
216
  ),
212
217
  "cloud_base_height_agl": MetaData(
213
218
  long_name="Height of cloud base above ground level",
214
219
  units="m",
220
+ dimensions=("time",),
215
221
  ),
216
222
  }
@@ -302,32 +302,38 @@ REFF_ATTRIBUTES = {
302
302
  units="m",
303
303
  ancillary_variables="der_error",
304
304
  comment=COMMENTS["der"],
305
+ dimensions=("time", "height"),
305
306
  ),
306
307
  "der_error": MetaData(
307
308
  long_name="Absolute error in droplet effective radius",
308
309
  units="m",
309
310
  comment="",
311
+ dimensions=("time", "height"),
310
312
  ),
311
313
  "der_scaled": MetaData(
312
314
  long_name="Droplet effective radius (scaled to LWP)",
313
315
  units="m",
314
316
  ancillary_variables="der_scaled_error",
315
317
  comment=COMMENTS["der_scaled"],
318
+ dimensions=("time", "height"),
316
319
  ),
317
320
  "der_scaled_error": MetaData(
318
321
  long_name="Absolute error in droplet effective radius (scaled to LWP)",
319
322
  units="m",
320
323
  comment=COMMENTS["der_scaled_error"],
324
+ dimensions=("time", "height"),
321
325
  ),
322
326
  "N_scaled": MetaData(
323
327
  long_name="Cloud droplet number concentration",
324
328
  units="1",
325
329
  ancillary_variables="der_error der_scaled der_scaled_error",
326
330
  comment=COMMENTS["N_scaled"],
331
+ dimensions=("time", "height"),
327
332
  ),
328
333
  "der_retrieval_status": MetaData(
329
334
  long_name="Droplet effective radius retrieval status",
330
335
  definition=DEFINITIONS["der_retrieval_status"],
331
336
  units="1",
337
+ dimensions=("time", "height"),
332
338
  ),
333
339
  }
@@ -201,55 +201,67 @@ DRIZZLE_ATTRIBUTES = {
201
201
  long_name="Drizzle number concentration",
202
202
  units="m-3",
203
203
  ancillary_variables="drizzle_N_error drizzle_N_bias",
204
+ dimensions=("time", "height"),
204
205
  ),
205
206
  "drizzle_N_error": MetaData(
206
207
  long_name="Random error in drizzle number concentration",
207
208
  units="dB",
209
+ dimensions=("time", "height"),
208
210
  ),
209
211
  "drizzle_N_bias": MetaData(
210
212
  long_name="Possible bias in drizzle number concentration",
211
213
  units="dB",
214
+ dimensions=("time", "height"),
212
215
  ),
213
216
  "drizzle_lwc": MetaData(
214
217
  long_name="Drizzle liquid water content",
215
218
  units="kg m-3",
216
219
  ancillary_variables="drizzle_lwc_error drizzle_lwc_bias",
217
220
  standard_name="mass_concentration_of_drizzle_in_air",
221
+ dimensions=("time", "height"),
218
222
  ),
219
223
  "drizzle_lwc_error": MetaData(
220
224
  long_name="Random error in drizzle liquid water content",
221
225
  units="dB",
226
+ dimensions=("time", "height"),
222
227
  ),
223
228
  "drizzle_lwc_bias": MetaData(
224
229
  long_name="Possible bias in drizzle liquid water content",
225
230
  units="dB",
231
+ dimensions=("time", "height"),
226
232
  ),
227
233
  "drizzle_lwf": MetaData(
228
234
  long_name="Drizzle liquid water flux",
229
235
  units="kg m-2 s-1",
230
236
  ancillary_variables="drizzle_lwf_error drizzle_lwf_bias",
237
+ dimensions=("time", "height"),
231
238
  ),
232
239
  "drizzle_lwf_error": MetaData(
233
240
  long_name="Random error in drizzle liquid water flux",
234
241
  units="dB",
242
+ dimensions=("time", "height"),
235
243
  ),
236
244
  "drizzle_lwf_bias": MetaData(
237
245
  long_name="Possible bias in drizzle liquid water flux",
238
246
  units="dB",
247
+ dimensions=("time", "height"),
239
248
  ),
240
249
  "v_drizzle": MetaData(
241
250
  long_name="Drizzle droplet fall velocity", # TODO: should include 'terminal' ?
242
251
  units="m s-1",
243
252
  ancillary_variables="v_drizzle_error v_drizzle_bias",
244
253
  comment="Positive values are towards the ground.",
254
+ dimensions=("time", "height"),
245
255
  ),
246
256
  "v_drizzle_error": MetaData(
247
257
  long_name="Random error in drizzle droplet fall velocity",
248
258
  units="dB",
259
+ dimensions=("time", "height"),
249
260
  ),
250
261
  "v_drizzle_bias": MetaData(
251
262
  long_name="Possible bias in drizzle droplet fall velocity",
252
263
  units="dB",
264
+ dimensions=("time", "height"),
253
265
  ),
254
266
  "v_air": MetaData(
255
267
  long_name="Vertical air velocity",
@@ -257,45 +269,59 @@ DRIZZLE_ATTRIBUTES = {
257
269
  ancillary_variables="v_air_error",
258
270
  comment="Positive values are towards the sky.",
259
271
  standard_name="upward_air_velocity",
272
+ dimensions=("time", "height"),
260
273
  ),
261
274
  "v_air_error": MetaData(
262
275
  long_name="Random error in vertical air velocity",
263
276
  units="dB",
277
+ dimensions=("time", "height"),
264
278
  ),
265
279
  "Do": MetaData(
266
280
  long_name="Drizzle median diameter",
267
281
  units="m",
268
282
  ancillary_variables="Do_error Do_bias",
283
+ dimensions=("time", "height"),
269
284
  ),
270
285
  "Do_error": MetaData(
271
286
  long_name="Random error in drizzle median diameter",
272
287
  units="dB",
288
+ dimensions=("time", "height"),
273
289
  ),
274
290
  "Do_bias": MetaData(
275
291
  long_name="Possible bias in drizzle median diameter",
276
292
  units="dB",
293
+ dimensions=("time", "height"),
277
294
  ),
278
295
  "mu": MetaData(
279
296
  long_name="Drizzle droplet size distribution shape parameter",
280
297
  ancillary_variables="mu_error",
281
298
  units="1",
299
+ dimensions=("time", "height"),
282
300
  ),
283
301
  "mu_error": MetaData(
284
302
  long_name="Random error in drizzle droplet size distribution shape parameter",
285
303
  units="dB",
304
+ dimensions=("time", "height"),
286
305
  ),
287
306
  "S": MetaData(
288
307
  long_name="Lidar backscatter-to-extinction ratio",
289
308
  ancillary_variables="S_error",
290
309
  units="sr",
310
+ dimensions=("time", "height"),
291
311
  ),
292
312
  "S_error": MetaData(
293
313
  long_name="Random error in lidar backscatter-to-extinction ratio",
294
314
  units="dB",
315
+ dimensions=("time", "height"),
316
+ ),
317
+ "beta_corr": MetaData(
318
+ long_name="Lidar backscatter correction factor",
319
+ units="1",
320
+ dimensions=("time", "height"),
295
321
  ),
296
- "beta_corr": MetaData(long_name="Lidar backscatter correction factor", units="1"),
297
322
  "drizzle_retrieval_status": MetaData(
298
323
  long_name="Drizzle parameter retrieval status",
299
324
  units="1",
325
+ dimensions=("time", "height"),
300
326
  ),
301
327
  }
@@ -127,16 +127,19 @@ IER_ATTRIBUTES = {
127
127
  long_name="Ice effective radius",
128
128
  units="m",
129
129
  ancillary_variables="ier_error",
130
+ dimensions=("time", "height"),
130
131
  ),
131
132
  "ier_error": MetaData(
132
133
  long_name="Random error in ice effective radius",
133
134
  units="m",
134
135
  comment=COMMENTS["ier_error"],
136
+ dimensions=("time", "height"),
135
137
  ),
136
138
  "ier_retrieval_status": MetaData(
137
139
  long_name="Ice effective radius retrieval status",
138
140
  comment=COMMENTS["ier_retrieval_status"],
139
141
  definition=DEFINITIONS["ier_retrieval_status"],
140
142
  units="1",
143
+ dimensions=("time", "height"),
141
144
  ),
142
145
  }
@@ -189,25 +189,30 @@ IWC_ATTRIBUTES = {
189
189
  long_name="Ice water content",
190
190
  units="kg m-3",
191
191
  ancillary_variables="iwc_error iwc_sensitivity iwc_bias",
192
+ dimensions=("time", "height"),
192
193
  ),
193
194
  "iwc_error": MetaData(
194
195
  long_name="Random error in ice water content",
195
196
  units="dB",
197
+ dimensions=("time", "height"),
196
198
  ),
197
199
  "iwc_bias": MetaData(
198
200
  long_name="Possible bias in ice water content",
199
201
  units="dB",
200
202
  comment=COMMENTS["iwc_bias"],
203
+ dimensions=("time", "height"),
201
204
  ),
202
205
  "iwc_sensitivity": MetaData(
203
206
  long_name="Minimum detectable ice water content",
204
207
  units="kg m-3",
205
208
  comment=COMMENTS["iwc_sensitivity"],
209
+ dimensions=("time", "height"),
206
210
  ),
207
211
  "iwc_retrieval_status": MetaData(
208
212
  long_name="Ice water content retrieval status",
209
213
  comment=COMMENTS["iwc_retrieval_status"],
210
214
  definition=DEFINITIONS["iwc_retrieval_status"],
211
215
  units="1",
216
+ dimensions=("time", "height"),
212
217
  ),
213
218
  }
@@ -445,16 +445,19 @@ LWC_ATTRIBUTES = {
445
445
  comment=COMMENTS["lwc"],
446
446
  ancillary_variables="lwc_error",
447
447
  standard_name="mass_concentration_of_liquid_water_in_air",
448
+ dimensions=("time", "height"),
448
449
  ),
449
450
  "lwc_error": MetaData(
450
451
  long_name="Random error in liquid water content, one standard deviation",
451
452
  comment=COMMENTS["lwc_error"],
452
453
  units="dB",
454
+ dimensions=("time", "height"),
453
455
  ),
454
456
  "lwc_retrieval_status": MetaData(
455
457
  long_name="Liquid water content retrieval status",
456
458
  comment=COMMENTS["lwc_retrieval_status"],
457
459
  definition=DEFINITIONS["lwc_retrieval_status"],
458
460
  units="1",
461
+ dimensions=("time", "height"),
459
462
  ),
460
463
  }
cloudnetpy/utils.py CHANGED
@@ -1100,7 +1100,12 @@ def add_site_geolocation(
1100
1100
 
1101
1101
  for key in ("latitude", "longitude", "altitude"):
1102
1102
  if key in tmp_data:
1103
- data[key] = CloudnetArray(tmp_data[key], key, source=tmp_source[key])
1103
+ data[key] = CloudnetArray(
1104
+ tmp_data[key],
1105
+ key,
1106
+ source=tmp_source[key],
1107
+ dimensions=None if isinstance(tmp_data[key], float) else ("time",),
1108
+ )
1104
1109
 
1105
1110
 
1106
1111
  def _parse_global_attribute_numeral(dataset: netCDF4.Dataset, key: str) -> float | None:
cloudnetpy/version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  MAJOR = 1
2
2
  MINOR = 80
3
- PATCH = 6
3
+ PATCH = 7
4
4
  __version__ = f"{MAJOR}.{MINOR}.{PATCH}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudnetpy
3
- Version: 1.80.6
3
+ Version: 1.80.7
4
4
  Summary: Python package for Cloudnet processing
5
5
  Author: Simo Tukiainen
6
6
  License: MIT License