cloudnetpy 1.66.3__py3-none-any.whl → 1.66.5__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.
@@ -98,6 +98,9 @@ class Ceilometer:
98
98
  self.data[key] = float(self.site_meta[key])
99
99
 
100
100
  def get_date_and_time(self, epoch: Epoch) -> None:
101
+ if "time" not in self.data:
102
+ msg = "Time array missing from data"
103
+ raise ValidTimeStampError(msg)
101
104
  if self.expected_date is not None:
102
105
  self.data = utils.screen_by_time(self.data, epoch, self.expected_date)
103
106
  self.date = utils.seconds2date(self.data["time"][0], epoch=epoch)[:3]
@@ -21,7 +21,7 @@ from mpl_toolkits.axes_grid1 import make_axes_locatable
21
21
  from numpy import ma, ndarray
22
22
  from scipy.ndimage import uniform_filter
23
23
 
24
- from cloudnetpy.categorize.freezing import find_t0_alt
24
+ from cloudnetpy.constants import T0
25
25
  from cloudnetpy.exceptions import PlottingError
26
26
  from cloudnetpy.instruments.ceilometer import calc_sigma_units
27
27
  from cloudnetpy.plotting.plot_meta import ATTRIBUTES, PlotMeta
@@ -428,22 +428,6 @@ class Plot2D(Plot):
428
428
  if figure_data.is_mwrpy_product():
429
429
  self._fill_flagged_data(figure_data)
430
430
 
431
- if self.sub_plot.variable.name == "Tw":
432
- tw = figure_data.file["Tw"][:]
433
- height = figure_data.height
434
- if height is None:
435
- msg = "No height information in the file."
436
- raise ValueError(msg)
437
- t0_alt = find_t0_alt(tw, height)
438
- t0_alt = ma.masked_where(t0_alt <= height[0], t0_alt)
439
- self._ax.plot(
440
- figure_data.time,
441
- t0_alt,
442
- color="gray",
443
- linestyle="dashed",
444
- zorder=_get_zorder("t0"),
445
- )
446
-
447
431
  def _fill_flagged_data(self, figure_data: FigureData) -> None:
448
432
  flags = self._read_flagged_data(figure_data)
449
433
  batches = find_batches_of_ones(flags)
@@ -543,19 +527,36 @@ class Plot2D(Plot):
543
527
  cbar.ax.set_yticklabels(tick_labels)
544
528
 
545
529
  if self._plot_meta.contour:
546
- time_length = len(figure_data.time_including_gaps)
547
- step = max(1, time_length // 200)
548
- ind_time = np.arange(0, time_length, step)
549
- self._ax.contour(
550
- figure_data.time_including_gaps[ind_time],
530
+ self._plot_contour(
531
+ figure_data,
551
532
  alt,
552
- self._data[ind_time, :].T,
553
533
  levels=np.linspace(vmin, vmax, num=10),
554
534
  colors="black",
555
535
  linewidths=0.5,
556
- zorder=_get_zorder("contour"),
557
536
  )
558
537
 
538
+ if self.sub_plot.variable.name == "Tw":
539
+ self._plot_contour(
540
+ figure_data,
541
+ alt,
542
+ levels=np.array([T0]),
543
+ colors="gray",
544
+ linewidths=1.25,
545
+ linestyles="dashed",
546
+ )
547
+
548
+ def _plot_contour(self, figure_data: FigureData, alt: np.ndarray, **options):
549
+ time_length = len(figure_data.time_including_gaps)
550
+ step = max(1, time_length // 200)
551
+ ind_time = np.arange(0, time_length, step)
552
+ self._ax.contour(
553
+ figure_data.time_including_gaps[ind_time],
554
+ alt,
555
+ self._data[ind_time, :].T,
556
+ **options,
557
+ zorder=_get_zorder("contour"),
558
+ )
559
+
559
560
  def _screen_data_by_max_y(self, figure_data: FigureData) -> ndarray:
560
561
  if figure_data.height is None:
561
562
  msg = "No height information in the file."
@@ -897,10 +898,10 @@ def _reformat_units(unit: str) -> str:
897
898
 
898
899
 
899
900
  def _get_max_gap_in_minutes(figure_data: FigureData) -> float:
900
- source = getattr(figure_data.file, "source", "")
901
+ source = getattr(figure_data.file, "source", "").lower()
901
902
  file_type = getattr(figure_data.file, "cloudnet_file_type", "")
902
903
  max_allowed_gap = {
903
- "model": 181 if "gdas1" in source else 61,
904
+ "model": 181 if "gdas1" in source or "ecmwf open" in source else 61,
904
905
  "mwr-multi": 35,
905
906
  "weather-station": 12,
906
907
  "doppler-lidar-wind": 75,
cloudnetpy/version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  MAJOR = 1
2
2
  MINOR = 66
3
- PATCH = 3
3
+ PATCH = 5
4
4
  __version__ = f"{MAJOR}.{MINOR}.{PATCH}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cloudnetpy
3
- Version: 1.66.3
3
+ Version: 1.66.5
4
4
  Summary: Python package for Cloudnet processing
5
5
  Author: Simo Tukiainen
6
6
  License: MIT License
@@ -8,7 +8,7 @@ cloudnetpy/metadata.py,sha256=v_VDo2vbdTxB0zIsfP69IcrwSKiRlLpsGdq6JPI4CoA,5306
8
8
  cloudnetpy/output.py,sha256=YrWRBEZg0QNZRVnd9ziAziH-eJSh7O5JuWiH4ZxM0_s,15584
9
9
  cloudnetpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  cloudnetpy/utils.py,sha256=RIqxZoB62JmMOOfYH6_fqpaudH8wqS9WDbpnR2HCcTM,29040
11
- cloudnetpy/version.py,sha256=zhcZNAONGXJka0B3BYGCqhzx8q3OnD5Qn1D-g_JSQh4,72
11
+ cloudnetpy/version.py,sha256=RRwzP1UIktb7j48KlcmVNqYg-tOvF82DH-sZMh_TCHI,72
12
12
  cloudnetpy/categorize/__init__.py,sha256=s-SJaysvVpVVo5kidiruWQO6p3gv2TXwY1wEHYO5D6I,44
13
13
  cloudnetpy/categorize/atmos_utils.py,sha256=9-ymI6i1xASf-XAFyO87FaTfvq6bF89N1i_27OkUp-M,10104
14
14
  cloudnetpy/categorize/attenuation.py,sha256=Y_-fzmQTltWTqIZTulJhovC7a6ifpMcaAazDJcnMIOc,990
@@ -35,7 +35,7 @@ cloudnetpy/instruments/__init__.py,sha256=_jejVwi_viSZehmAOkEqTNI-0-exGgAJ_bHW1I
35
35
  cloudnetpy/instruments/basta.py,sha256=_OTnySd36ktvxk_swWBzbv_H4AVGlkF_Ce3KtPGD1rE,3758
36
36
  cloudnetpy/instruments/campbell_scientific.py,sha256=2WHfBKQjtRSl0AqvtPeX7G8Hdi3Dn0WbvoAppFOMbA8,5270
37
37
  cloudnetpy/instruments/ceilo.py,sha256=xrI7iYNftKvGZf-3C_ESUNsu-QhXV43iWkDuKp3biZU,9552
38
- cloudnetpy/instruments/ceilometer.py,sha256=P33UXVQl7hLLWZc3NyNfrz6hvTyUAZRIP-g6H5Dpe9Y,11967
38
+ cloudnetpy/instruments/ceilometer.py,sha256=pdmLVljsuciyKpaGxWxJ_f1IrJK-UrkBC0lSeuirLlU,12095
39
39
  cloudnetpy/instruments/cl61d.py,sha256=g6DNBFju3wYhLFl32DKmC8pUup7y-EupXoUU0fuoGGA,1990
40
40
  cloudnetpy/instruments/cloudnet_instrument.py,sha256=RG5HJxGM6p0F-IGyr85fvOizcMmgx48OeD_XeIsrgSU,3367
41
41
  cloudnetpy/instruments/copernicus.py,sha256=nmgqGOjVQFngj7BNbpcuCwA-W3yksvBbqn__iq7MyDk,6469
@@ -100,7 +100,7 @@ cloudnetpy/model_evaluation/tests/unit/test_statistical_methods.py,sha256=Ra3r4V
100
100
  cloudnetpy/model_evaluation/tests/unit/test_tools.py,sha256=Ia_VrLdV2NstX5gbx_3AZTOAlrgLAy_xFZ8fHYVX0xI,3817
101
101
  cloudnetpy/plotting/__init__.py,sha256=lg9Smn4BI0dVBgnDLC3JVJ4GmwoSnO-qoSd4ApvwV6Y,107
102
102
  cloudnetpy/plotting/plot_meta.py,sha256=ZvaKU3eXy1KFxQomnsEu3mCYpwwBYKAYk7oAwOzAGSg,16143
103
- cloudnetpy/plotting/plotting.py,sha256=MoZhO4uKUvNCvlDFnQ6zr81y0NeFLvsvM0MIPF5zeBw,35320
103
+ cloudnetpy/plotting/plotting.py,sha256=5mLDRZKcpgO0V9fUdk_Xf1E8BVQGrVihiBdfifdWWPk,35208
104
104
  cloudnetpy/products/__init__.py,sha256=2hRb5HG9hNrxH1if5laJkLeFeaZCd5W1q3hh4ewsX0E,273
105
105
  cloudnetpy/products/classification.py,sha256=AKb9GCatvhS5KR0c9LfN96nUvzi02175ZCQlvMH1Dws,8077
106
106
  cloudnetpy/products/der.py,sha256=soypE7uSEP4uHUCCQVEhyXsKY6e9mzV9B_2S5GUizqk,12729
@@ -114,8 +114,8 @@ cloudnetpy/products/mie_lu_tables.nc,sha256=It4fYpqJXlqOgL8jeZ-PxGzP08PMrELIDVe5
114
114
  cloudnetpy/products/mwr_tools.py,sha256=rd7UC67O4fsIE5SaHVZ4qWvUJTj41ZGwgQWPwZzOM14,5377
115
115
  cloudnetpy/products/product_tools.py,sha256=01Zc6xV8CSuYcIcLpchFf5POL3_c629-YMNDZJ51udA,10853
116
116
  docs/source/conf.py,sha256=IKiFWw6xhUd8NrCg0q7l596Ck1d61XWeVjIFHVSG9Og,1490
117
- cloudnetpy-1.66.3.dist-info/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
118
- cloudnetpy-1.66.3.dist-info/METADATA,sha256=f7Ll3J-iSnH8OvAHj_BLVC8md7Vwa1czXPI4RHbbb2Q,5784
119
- cloudnetpy-1.66.3.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
120
- cloudnetpy-1.66.3.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
121
- cloudnetpy-1.66.3.dist-info/RECORD,,
117
+ cloudnetpy-1.66.5.dist-info/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
118
+ cloudnetpy-1.66.5.dist-info/METADATA,sha256=Fn9VQMj4YeMVPSsIKg2zuBzgrU4E_YDzXh3pcW6R4k0,5784
119
+ cloudnetpy-1.66.5.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
120
+ cloudnetpy-1.66.5.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
121
+ cloudnetpy-1.66.5.dist-info/RECORD,,