cloudnetpy 1.61.6__py3-none-any.whl → 1.61.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.
@@ -65,6 +65,9 @@ def copernicus2nc(
65
65
  ) as temp_file:
66
66
  nc_filename = temp_file.name
67
67
  valid_filenames = utils.get_sorted_filenames(raw_files, ".nc")
68
+ valid_filenames = utils.get_files_with_variables(
69
+ valid_filenames, ["time", "ZED_HC"]
70
+ )
68
71
  valid_filenames = utils.get_files_with_common_range(valid_filenames)
69
72
  variables = list(keymap.keys())
70
73
  concat_lib.concatenate_files(
@@ -64,6 +64,9 @@ def galileo2nc(
64
64
  ) as temp_file:
65
65
  nc_filename = temp_file.name
66
66
  valid_filenames = utils.get_sorted_filenames(raw_files, ".nc")
67
+ valid_filenames = utils.get_files_with_variables(
68
+ valid_filenames, ["time", "ZED_HC"]
69
+ )
67
70
  valid_filenames = utils.get_files_with_common_range(valid_filenames)
68
71
  variables = list(keymap.keys())
69
72
  concat_lib.concatenate_files(
cloudnetpy/utils.py CHANGED
@@ -972,6 +972,19 @@ def get_files_with_common_range(filenames: list) -> list:
972
972
  return [file for i, file in enumerate(filenames) if n_range[i] == most_common]
973
973
 
974
974
 
975
+ def get_files_with_variables(filenames: list, variables: list[str]) -> list:
976
+ """Returns files where all variables exist."""
977
+ valid_files = []
978
+ for file in filenames:
979
+ with netCDF4.Dataset(file) as nc:
980
+ for variable in variables:
981
+ if variable not in nc.variables:
982
+ break
983
+ else:
984
+ valid_files.append(file)
985
+ return valid_files
986
+
987
+
975
988
  def is_all_masked(array: np.ndarray) -> bool:
976
989
  """Tests if all values are masked."""
977
990
  return ma.isMaskedArray(array) and hasattr(array, "mask") and array.mask.all()
cloudnetpy/version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  MAJOR = 1
2
2
  MINOR = 61
3
- PATCH = 6
3
+ PATCH = 7
4
4
  __version__ = f"{MAJOR}.{MINOR}.{PATCH}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cloudnetpy
3
- Version: 1.61.6
3
+ Version: 1.61.7
4
4
  Summary: Python package for Cloudnet processing
5
5
  Author: Simo Tukiainen
6
6
  License: MIT License
@@ -7,8 +7,8 @@ cloudnetpy/exceptions.py,sha256=wrI0bZTwmS5C_cqOmvlJ8XJSEFyzuD1eD4voGJc_Gjg,1584
7
7
  cloudnetpy/metadata.py,sha256=v_VDo2vbdTxB0zIsfP69IcrwSKiRlLpsGdq6JPI4CoA,5306
8
8
  cloudnetpy/output.py,sha256=WoVTNuxni0DUr163vZ-_mDr1brXhY15XSlGMrq9Aoqw,14700
9
9
  cloudnetpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- cloudnetpy/utils.py,sha256=0TlHm71YtSrKXBsRKctitnhQrvZPE-ulEVeAQW-oK58,27398
11
- cloudnetpy/version.py,sha256=EsOOkDhmmN4gMdVOGcAyBa9FEtyJpkC4FPZ6YnoxVgA,72
10
+ cloudnetpy/utils.py,sha256=DuUbtGJJTwEwrDxx6aLkos4qL-Lrdchnzjx4gv5dZiU,27814
11
+ cloudnetpy/version.py,sha256=kTFWe1O0uMTPg6LtGazqdKp2KOo0w7j9KaWIUOArJx4,72
12
12
  cloudnetpy/categorize/__init__.py,sha256=gP5q3Vis1y9u9OWgA_idlbjfWXYN_S0IBSWdwBhL_uU,69
13
13
  cloudnetpy/categorize/atmos.py,sha256=fWW8ye_8HZASRAiYwURFKWzcGOYIA2RKeVxCq0lVOuM,12389
14
14
  cloudnetpy/categorize/atmos_utils.py,sha256=wndpwJxc2-QnNTkV8tc8I11Vs_WkNz9sVMX1fuGgUC4,3777
@@ -32,8 +32,8 @@ cloudnetpy/instruments/ceilo.py,sha256=56zhNSx5cyqV9ToeDUhXzwOUQK32oa9Vng2VsPXLs
32
32
  cloudnetpy/instruments/ceilometer.py,sha256=-aPEZs_r0Gxeu53PHeWAkZMB2BUdauS47tkL7RFxo6k,12078
33
33
  cloudnetpy/instruments/cl61d.py,sha256=ycJGvUqNU2KHhECbrSehtWRnvg1vKFHhvMeQpjpdCI4,1989
34
34
  cloudnetpy/instruments/cloudnet_instrument.py,sha256=RG5HJxGM6p0F-IGyr85fvOizcMmgx48OeD_XeIsrgSU,3367
35
- cloudnetpy/instruments/copernicus.py,sha256=AT0AtMhGSKzPWEqXsfAda6zeaw4g0Jr5dqIyfeu4FP0,6327
36
- cloudnetpy/instruments/galileo.py,sha256=FyFYh1JhWed1d6yvpsv3rdBzHUTjkfOPw5HEQz4Wssw,4545
35
+ cloudnetpy/instruments/copernicus.py,sha256=fpTulQ4IQQmr_u6ykBOTI4J_ZtfjyUhFUmM4qrwdl_Q,6467
36
+ cloudnetpy/instruments/galileo.py,sha256=r3ly7ZgzlRhCqqX-oKtkE6Ed8zJuHY9zPqNMSzW7X_A,4685
37
37
  cloudnetpy/instruments/hatpro.py,sha256=QD7Gn607Q2ASAlSJbY8Fu37TOOHTR1VrAPVfy8ehylg,8513
38
38
  cloudnetpy/instruments/instruments.py,sha256=jG5TYnZ8bdCZXnI303ZsaJBEdSKaIjKMbkGtnq6kQX0,3261
39
39
  cloudnetpy/instruments/lufft.py,sha256=nozeiMRMz7I6q_FwmlxDGhWeJlqTuNh6ru39-M4K3BI,3629
@@ -108,8 +108,8 @@ cloudnetpy/products/mie_lu_tables.nc,sha256=It4fYpqJXlqOgL8jeZ-PxGzP08PMrELIDVe5
108
108
  cloudnetpy/products/mwr_tools.py,sha256=RuzokxxqXlTGk7XAOrif_FDPUJdf0j_wJgNq-7a_nK8,4684
109
109
  cloudnetpy/products/product_tools.py,sha256=rhx_Ru9FLlQqCNM-awoiHx18-Aq1eBwL9LiUaQoJs6k,10412
110
110
  docs/source/conf.py,sha256=IKiFWw6xhUd8NrCg0q7l596Ck1d61XWeVjIFHVSG9Og,1490
111
- cloudnetpy-1.61.6.dist-info/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
112
- cloudnetpy-1.61.6.dist-info/METADATA,sha256=0LfEZSv2s7N1rWbBerVyMlCKhFGupgn6KqjvJvZxDa4,5784
113
- cloudnetpy-1.61.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
114
- cloudnetpy-1.61.6.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
115
- cloudnetpy-1.61.6.dist-info/RECORD,,
111
+ cloudnetpy-1.61.7.dist-info/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
112
+ cloudnetpy-1.61.7.dist-info/METADATA,sha256=FcyxQIL3n-BVcQGqXwfpT51ahxWRkCEfcuADunGOQ6U,5784
113
+ cloudnetpy-1.61.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
114
+ cloudnetpy-1.61.7.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
115
+ cloudnetpy-1.61.7.dist-info/RECORD,,