disdrodb 0.3.0__py3-none-any.whl → 0.5.0__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.
- disdrodb/__init__.py +2 -0
- disdrodb/_config.py +1 -0
- disdrodb/_version.py +2 -2
- disdrodb/accessor/__init__.py +1 -0
- disdrodb/accessor/methods.py +1 -0
- disdrodb/api/checks.py +2 -4
- disdrodb/api/io.py +224 -24
- disdrodb/api/path.py +2 -4
- disdrodb/cli/disdrodb_check_metadata_archive.py +1 -0
- disdrodb/cli/disdrodb_check_products_options.py +1 -0
- disdrodb/cli/disdrodb_create_summary.py +6 -6
- disdrodb/cli/disdrodb_create_summary_station.py +2 -2
- disdrodb/cli/disdrodb_data_archive_directory.py +1 -0
- disdrodb/cli/disdrodb_download_archive.py +5 -6
- disdrodb/cli/disdrodb_download_metadata_archive.py +1 -0
- disdrodb/cli/disdrodb_download_station.py +2 -3
- disdrodb/cli/disdrodb_initialize_station.py +3 -3
- disdrodb/cli/disdrodb_metadata_archive_directory.py +1 -0
- disdrodb/cli/disdrodb_open_data_archive.py +1 -2
- disdrodb/cli/disdrodb_open_logs_directory.py +2 -3
- disdrodb/cli/disdrodb_open_metadata_archive.py +1 -2
- disdrodb/cli/disdrodb_open_metadata_directory.py +2 -3
- disdrodb/cli/disdrodb_open_product_directory.py +1 -2
- disdrodb/cli/disdrodb_open_readers_directory.py +1 -0
- disdrodb/cli/disdrodb_run.py +6 -6
- disdrodb/cli/disdrodb_run_l0.py +6 -6
- disdrodb/cli/disdrodb_run_l0_station.py +3 -3
- disdrodb/cli/disdrodb_run_l0a.py +6 -6
- disdrodb/cli/disdrodb_run_l0a_station.py +3 -3
- disdrodb/cli/disdrodb_run_l0b.py +6 -6
- disdrodb/cli/disdrodb_run_l0b_station.py +3 -3
- disdrodb/cli/disdrodb_run_l0c.py +6 -6
- disdrodb/cli/disdrodb_run_l0c_station.py +3 -3
- disdrodb/cli/disdrodb_run_l1.py +6 -6
- disdrodb/cli/disdrodb_run_l1_station.py +3 -3
- disdrodb/cli/disdrodb_run_l2e.py +6 -6
- disdrodb/cli/disdrodb_run_l2e_station.py +3 -3
- disdrodb/cli/disdrodb_run_l2m.py +6 -6
- disdrodb/cli/disdrodb_run_l2m_station.py +3 -3
- disdrodb/cli/disdrodb_run_station.py +3 -3
- disdrodb/cli/disdrodb_upload_archive.py +6 -7
- disdrodb/cli/disdrodb_upload_station.py +3 -4
- disdrodb/configs.py +7 -8
- disdrodb/constants.py +1 -0
- disdrodb/data_transfer/download_data.py +8 -8
- disdrodb/data_transfer/upload_data.py +6 -8
- disdrodb/data_transfer/zenodo.py +1 -1
- disdrodb/fall_velocity/__init__.py +1 -0
- disdrodb/fall_velocity/graupel.py +1 -0
- disdrodb/fall_velocity/hail.py +1 -0
- disdrodb/fall_velocity/rain.py +1 -0
- disdrodb/issue/checks.py +1 -0
- disdrodb/issue/reader.py +1 -0
- disdrodb/issue/writer.py +1 -2
- disdrodb/l0/__init__.py +1 -0
- disdrodb/l0/check_configs.py +21 -23
- disdrodb/l0/check_standards.py +0 -1
- disdrodb/l0/configs/LPM/l0a_encodings.yml +17 -17
- disdrodb/l0/configs/LPM/l0b_cf_attrs.yml +55 -55
- disdrodb/l0/configs/LPM/l0b_encodings.yml +17 -17
- disdrodb/l0/configs/LPM/raw_data_format.yml +17 -17
- disdrodb/l0/configs/LPM_V0/l0a_encodings.yml +2 -2
- disdrodb/l0/configs/LPM_V0/l0b_cf_attrs.yml +2 -2
- disdrodb/l0/configs/LPM_V0/l0b_encodings.yml +2 -2
- disdrodb/l0/configs/LPM_V0/raw_data_format.yml +2 -2
- disdrodb/l0/l0_reader.py +1 -0
- disdrodb/l0/l0a_processing.py +5 -5
- disdrodb/l0/l0b_nc_processing.py +1 -2
- disdrodb/l0/l0b_processing.py +1 -13
- disdrodb/l0/l0c_processing.py +2 -1
- disdrodb/l0/readers/LPM/ARM/ARM_LPM.py +1 -0
- disdrodb/l0/readers/LPM/AUSTRALIA/MELBOURNE_2007_LPM.py +17 -17
- disdrodb/l0/readers/LPM/BRAZIL/CHUVA_LPM.py +17 -17
- disdrodb/l0/readers/LPM/BRAZIL/GOAMAZON_LPM.py +17 -17
- disdrodb/l0/readers/LPM/GERMANY/DWD.py +55 -52
- disdrodb/l0/readers/LPM/ITALY/GID_LPM.py +18 -17
- disdrodb/l0/readers/LPM/ITALY/GID_LPM_AQ.py +277 -0
- disdrodb/l0/readers/LPM/ITALY/GID_LPM_PI.py +18 -17
- disdrodb/l0/readers/LPM/ITALY/GID_LPM_T.py +18 -17
- disdrodb/l0/readers/LPM/ITALY/GID_LPM_W.py +18 -18
- disdrodb/l0/readers/LPM/KIT/CHWALA.py +18 -17
- disdrodb/l0/readers/LPM/NETHERLANDS/DELFT_RWANDA_LPM_NC.py +17 -17
- disdrodb/l0/readers/LPM/NORWAY/HAUKELISETER_LPM.py +18 -17
- disdrodb/l0/readers/LPM/NORWAY/NMBU_LPM.py +18 -17
- disdrodb/l0/readers/LPM/SLOVENIA/ARSO.py +18 -17
- disdrodb/l0/readers/LPM/SLOVENIA/UL.py +18 -17
- disdrodb/l0/readers/LPM/SWITZERLAND/INNERERIZ_LPM.py +18 -17
- disdrodb/l0/readers/LPM/UK/WITHWORTH_LPM.py +18 -17
- disdrodb/l0/readers/LPM/USA/CHARLESTON.py +18 -17
- disdrodb/l0/readers/LPM/USA/DEVEX.py +255 -0
- disdrodb/l0/readers/LPM_V0/BELGIUM/ULIEGE.py +2 -2
- disdrodb/l0/readers/LPM_V0/ITALY/GID_LPM_V0.py +3 -2
- disdrodb/l0/readers/ODM470/OCEAN/OCEANRAIN.py +1 -0
- disdrodb/l0/readers/PARSIVEL/BASQUECOUNTRY/EUSKALMET_OTT.py +1 -0
- disdrodb/l0/readers/PARSIVEL/CHINA/CHONGQING.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/ARCTIC_2021.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/COMMON_2011.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/DAVOS_2009_2011.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/EPFL_2009.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/EPFL_ROOF_2008.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/EPFL_ROOF_2010.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/EPFL_ROOF_2011.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/EPFL_ROOF_2012.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/GENEPI_2007.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/GRAND_ST_BERNARD_2007.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/GRAND_ST_BERNARD_2007_2.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/HPICONET_2010.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/HYMEX_LTE_SOP2.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/HYMEX_LTE_SOP3.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/HYMEX_LTE_SOP4.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/PARADISO_2014.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/PARSIVEL_2007.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/RACLETS_2019.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/RACLETS_2019_WJF.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/RIETHOLZBACH_2011.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/SAMOYLOV_2017.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/SAMOYLOV_2019.py +1 -0
- disdrodb/l0/readers/PARSIVEL/EPFL/UNIL_2022.py +1 -0
- disdrodb/l0/readers/PARSIVEL/SLOVENIA/UL.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/ARM/ARM_PARSIVEL2.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/BASQUECOUNTRY/EUSKALMET_OTT2.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/BELGIUM/ILVO.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/DENMARK/EROSION_nc.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/DENMARK/EROSION_raw.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/FRANCE/ENPC_PARSIVEL2.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/FRANCE/OSUG.py +1 -1
- disdrodb/l0/readers/PARSIVEL2/ITALY/HYDROX.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/MEXICO/OH_IIUNAM_nc.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/NCAR/FARM_PARSIVEL2.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/NCAR/PERILS_MIPS.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/NCAR/PERILS_PIPS.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/NCAR/VORTEX_SE_2016_P1.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/NCAR/VORTEX_SE_2016_PIPS.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/PHILIPPINES/PAGASA.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/SPAIN/GRANADA.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/SWEDEN/SMHI.py +1 -0
- disdrodb/l0/readers/PARSIVEL2/USA/CW3E.py +1 -0
- disdrodb/l0/readers/PWS100/AUSTRIA/HOAL.py +1 -0
- disdrodb/l0/readers/PWS100/FRANCE/ENPC_PWS100.py +1 -0
- disdrodb/l0/readers/PWS100/FRANCE/ENPC_PWS100_SIRTA.py +1 -0
- disdrodb/l0/readers/RD80/NOAA/PSL_RD80.py +1 -0
- disdrodb/l0/readers/SWS250/BELGIUM/KMI.py +1 -0
- disdrodb/l0/readers/template_reader_raw_netcdf_data.py +1 -0
- disdrodb/l0/readers/template_reader_raw_text_data.py +1 -0
- disdrodb/l0/template_tools.py +6 -8
- disdrodb/l1/__init__.py +1 -0
- disdrodb/l1/classification.py +1 -0
- disdrodb/l1/resampling.py +5 -0
- disdrodb/l1_env/routines.py +1 -0
- disdrodb/l2/__init__.py +1 -0
- disdrodb/l2/empirical_dsd.py +1 -0
- disdrodb/l2/processing.py +1 -0
- disdrodb/metadata/checks.py +9 -10
- disdrodb/metadata/download.py +1 -0
- disdrodb/metadata/geolocation.py +2 -1
- disdrodb/metadata/info.py +2 -2
- disdrodb/metadata/search.py +0 -1
- disdrodb/physics/atmosphere.py +1 -0
- disdrodb/physics/water.py +1 -0
- disdrodb/physics/wrappers.py +1 -0
- disdrodb/psd/__init__.py +0 -1
- disdrodb/psd/fitting.py +1 -0
- disdrodb/psd/models.py +1 -0
- disdrodb/routines/__init__.py +1 -0
- disdrodb/routines/l0.py +13 -9
- disdrodb/routines/l1.py +17 -12
- disdrodb/routines/l2.py +4 -5
- disdrodb/routines/options.py +1 -0
- disdrodb/routines/options_validation.py +12 -12
- disdrodb/routines/wrappers.py +33 -33
- disdrodb/scattering/__init__.py +0 -1
- disdrodb/scattering/permittivity.py +1 -0
- disdrodb/scattering/routines.py +3 -3
- disdrodb/summary/routines.py +12 -5
- disdrodb/utils/archiving.py +2 -1
- disdrodb/utils/attrs.py +3 -2
- disdrodb/utils/compression.py +1 -2
- disdrodb/utils/coords.py +45 -0
- disdrodb/utils/dask.py +5 -2
- disdrodb/utils/dataframe.py +4 -3
- disdrodb/utils/decorators.py +2 -1
- disdrodb/utils/directories.py +2 -2
- disdrodb/utils/encoding.py +2 -1
- disdrodb/utils/manipulations.py +1 -0
- disdrodb/utils/pydantic.py +1 -0
- disdrodb/utils/routines.py +1 -0
- disdrodb/utils/time.py +3 -2
- disdrodb/utils/warnings.py +1 -0
- disdrodb/utils/writer.py +4 -0
- disdrodb/utils/xarray.py +1 -0
- disdrodb/viz/plots.py +1 -0
- {disdrodb-0.3.0.dist-info → disdrodb-0.5.0.dist-info}/METADATA +4 -3
- disdrodb-0.5.0.dist-info/RECORD +361 -0
- {disdrodb-0.3.0.dist-info → disdrodb-0.5.0.dist-info}/WHEEL +1 -1
- disdrodb-0.3.0.dist-info/RECORD +0 -358
- {disdrodb-0.3.0.dist-info → disdrodb-0.5.0.dist-info}/entry_points.txt +0 -0
- {disdrodb-0.3.0.dist-info → disdrodb-0.5.0.dist-info}/licenses/LICENSE +0 -0
- {disdrodb-0.3.0.dist-info → disdrodb-0.5.0.dist-info}/top_level.txt +0 -0
|
@@ -110,11 +110,11 @@ total_gross_volume_solid_precipitation:
|
|
|
110
110
|
description: Total (gross) volume of particles classified as solid precipitation
|
|
111
111
|
long_name: Total (gross) volume of particles classified as solid precipitation
|
|
112
112
|
units: ""
|
|
113
|
-
|
|
113
|
+
number_particles_large_pellet:
|
|
114
114
|
description: Number of particles classified as great pellet
|
|
115
115
|
long_name: Number of particles classified as great pellet
|
|
116
116
|
units: ""
|
|
117
|
-
|
|
117
|
+
total_gross_volume_large_pellet:
|
|
118
118
|
description: Total (gross) volume of particles classified as great pellet
|
|
119
119
|
long_name: Total (gross) volume of particles classified as great pellet
|
|
120
120
|
units: ""
|
|
@@ -253,7 +253,7 @@ total_gross_volume_solid_precipitation:
|
|
|
253
253
|
fletcher32: false
|
|
254
254
|
contiguous: false
|
|
255
255
|
chunksizes: 5000
|
|
256
|
-
|
|
256
|
+
number_particles_large_pellet:
|
|
257
257
|
dtype: uint16
|
|
258
258
|
zlib: true
|
|
259
259
|
complevel: 3
|
|
@@ -262,7 +262,7 @@ number_particles_great_pellet:
|
|
|
262
262
|
contiguous: false
|
|
263
263
|
chunksizes: 5000
|
|
264
264
|
_FillValue: 65535
|
|
265
|
-
|
|
265
|
+
total_gross_volume_large_pellet:
|
|
266
266
|
dtype: float32
|
|
267
267
|
zlib: true
|
|
268
268
|
complevel: 3
|
|
@@ -300,7 +300,7 @@ total_gross_volume_solid_precipitation:
|
|
|
300
300
|
- 99999.999
|
|
301
301
|
nan_flags: null
|
|
302
302
|
field_number: "31"
|
|
303
|
-
|
|
303
|
+
number_particles_large_pellet:
|
|
304
304
|
n_digits: 5
|
|
305
305
|
n_characters: 5
|
|
306
306
|
n_decimals: 5
|
|
@@ -310,7 +310,7 @@ number_particles_great_pellet:
|
|
|
310
310
|
- 99999
|
|
311
311
|
nan_flags: null
|
|
312
312
|
field_number: "32"
|
|
313
|
-
|
|
313
|
+
total_gross_volume_large_pellet:
|
|
314
314
|
n_digits: 8
|
|
315
315
|
n_characters: 9
|
|
316
316
|
n_decimals: 5
|
disdrodb/l0/l0_reader.py
CHANGED
disdrodb/l0/l0a_processing.py
CHANGED
|
@@ -18,11 +18,9 @@
|
|
|
18
18
|
|
|
19
19
|
import logging
|
|
20
20
|
import os
|
|
21
|
-
from typing import Union
|
|
22
21
|
|
|
23
22
|
import numpy as np
|
|
24
23
|
import pandas as pd
|
|
25
|
-
import pyarrow.parquet as pq
|
|
26
24
|
|
|
27
25
|
from disdrodb.l0.check_standards import check_l0a_column_names, check_l0a_standards
|
|
28
26
|
from disdrodb.l0.l0b_processing import infer_split_str
|
|
@@ -769,7 +767,7 @@ def concatenate_dataframe(list_df: list, logger=None, verbose: bool = False) ->
|
|
|
769
767
|
|
|
770
768
|
|
|
771
769
|
def read_l0a_dataframe(
|
|
772
|
-
filepaths:
|
|
770
|
+
filepaths: str | list,
|
|
773
771
|
debugging_mode: bool = False,
|
|
774
772
|
) -> pd.DataFrame:
|
|
775
773
|
"""Read DISDRODB L0A Apache Parquet file(s).
|
|
@@ -790,6 +788,8 @@ def read_l0a_dataframe(
|
|
|
790
788
|
L0A Dataframe.
|
|
791
789
|
|
|
792
790
|
"""
|
|
791
|
+
from disdrodb.api.io import open_parquet_files
|
|
792
|
+
|
|
793
793
|
# ----------------------------------------
|
|
794
794
|
# Check filepaths validity
|
|
795
795
|
if not isinstance(filepaths, (list, str)):
|
|
@@ -806,7 +806,7 @@ def read_l0a_dataframe(
|
|
|
806
806
|
|
|
807
807
|
# ---------------------------------------------------
|
|
808
808
|
# Define the list of dataframe
|
|
809
|
-
df =
|
|
809
|
+
df = open_parquet_files(filepaths, use_threads=False)
|
|
810
810
|
|
|
811
811
|
# Reduce rows
|
|
812
812
|
if debugging_mode:
|
|
@@ -832,7 +832,7 @@ def read_l0a_dataframe(
|
|
|
832
832
|
|
|
833
833
|
|
|
834
834
|
def generate_l0a(
|
|
835
|
-
filepaths:
|
|
835
|
+
filepaths: list | str,
|
|
836
836
|
reader,
|
|
837
837
|
sensor_name,
|
|
838
838
|
issue_dict=None,
|
disdrodb/l0/l0b_nc_processing.py
CHANGED
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"""Functions to process DISDRODB raw netCDF files into DISDRODB L0B netCDF files."""
|
|
18
18
|
|
|
19
19
|
import logging
|
|
20
|
-
from typing import Union
|
|
21
20
|
|
|
22
21
|
import numpy as np
|
|
23
22
|
|
|
@@ -534,7 +533,7 @@ def open_raw_netcdf_file(
|
|
|
534
533
|
|
|
535
534
|
|
|
536
535
|
def generate_l0b_from_nc(
|
|
537
|
-
filepaths:
|
|
536
|
+
filepaths: list | str,
|
|
538
537
|
reader,
|
|
539
538
|
sensor_name,
|
|
540
539
|
metadata,
|
disdrodb/l0/l0b_processing.py
CHANGED
|
@@ -40,6 +40,7 @@ from disdrodb.utils.attrs import (
|
|
|
40
40
|
set_coordinate_attributes,
|
|
41
41
|
set_disdrodb_attrs,
|
|
42
42
|
)
|
|
43
|
+
from disdrodb.utils.coords import add_dataset_crs_coords
|
|
43
44
|
from disdrodb.utils.encoding import set_encodings
|
|
44
45
|
from disdrodb.utils.logger import log_info
|
|
45
46
|
from disdrodb.utils.time import ensure_sorted_by_time
|
|
@@ -391,19 +392,6 @@ def set_variable_attributes(ds: xr.Dataset, sensor_name: str) -> xr.Dataset:
|
|
|
391
392
|
return ds
|
|
392
393
|
|
|
393
394
|
|
|
394
|
-
def add_dataset_crs_coords(ds):
|
|
395
|
-
"""Add the CRS coordinate to the xr.Dataset."""
|
|
396
|
-
# TODO: define CF-compliant CRS !
|
|
397
|
-
# - CF compliant
|
|
398
|
-
# - wkt
|
|
399
|
-
# - add grid_mapping name
|
|
400
|
-
# -->
|
|
401
|
-
# attrs["EPSG"] = 4326
|
|
402
|
-
# attrs["proj4_string"] = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
|
|
403
|
-
ds = ds.assign_coords({"crs": ["WGS84"]})
|
|
404
|
-
return ds
|
|
405
|
-
|
|
406
|
-
|
|
407
395
|
####--------------------------------------------------------------------------.
|
|
408
396
|
#### L0B Raw DataFrame Preprocessing
|
|
409
397
|
|
disdrodb/l0/l0c_processing.py
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
16
|
# -----------------------------------------------------------------------------.
|
|
17
17
|
"""Functions to process DISDRODB L0B files into DISDRODB L0C netCDF files."""
|
|
18
|
+
|
|
18
19
|
import logging
|
|
19
20
|
|
|
20
21
|
import numpy as np
|
|
@@ -50,7 +51,7 @@ def drop_timesteps_with_invalid_sample_interval(ds, measurement_intervals, verbo
|
|
|
50
51
|
# Log information for each invalid timestep
|
|
51
52
|
invalid_timesteps = pd.to_datetime(timesteps[indices_invalid_sample_interval]).strftime("%Y-%m-%d %H:%M:%S")
|
|
52
53
|
invalid_sample_intervals = sample_interval[indices_invalid_sample_interval]
|
|
53
|
-
for tt, ss in zip(invalid_timesteps, invalid_sample_intervals):
|
|
54
|
+
for tt, ss in zip(invalid_timesteps, invalid_sample_intervals, strict=True):
|
|
54
55
|
msg = f"Unexpected sampling interval ({ss} s) at {tt}. The measurement has been dropped."
|
|
55
56
|
log_warning(logger=logger, msg=msg, verbose=verbose)
|
|
56
57
|
# Remove timesteps with invalid sample intervals
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
# -----------------------------------------------------------------------------.
|
|
18
18
|
"""Reader for ARM Thies LPM sensor."""
|
|
19
|
+
|
|
19
20
|
from disdrodb.l0.l0_reader import is_documented_by, reader_generic_docstring
|
|
20
21
|
from disdrodb.l0.l0b_nc_processing import open_raw_netcdf_file, replace_custom_nan_flags, standardize_raw_dataset
|
|
21
22
|
|
|
@@ -176,23 +176,23 @@ def reader(
|
|
|
176
176
|
"number_particles_no_hydrometeor",
|
|
177
177
|
"number_particles_no_hydrometeor_internal_data",
|
|
178
178
|
"number_particles_unknown_classification",
|
|
179
|
-
"
|
|
180
|
-
"
|
|
181
|
-
"
|
|
182
|
-
"
|
|
183
|
-
"
|
|
184
|
-
"
|
|
185
|
-
"
|
|
186
|
-
"
|
|
187
|
-
"
|
|
188
|
-
"
|
|
189
|
-
"
|
|
190
|
-
"
|
|
191
|
-
"
|
|
192
|
-
"
|
|
193
|
-
"
|
|
194
|
-
"
|
|
195
|
-
"
|
|
179
|
+
"total_gross_volume_unknown_classification",
|
|
180
|
+
"number_particles_hail",
|
|
181
|
+
"total_gross_volume_hail",
|
|
182
|
+
"number_particles_solid_precipitation",
|
|
183
|
+
"total_gross_volume_solid_precipitation",
|
|
184
|
+
"number_particles_large_pellet",
|
|
185
|
+
"total_gross_volume_large_pellet",
|
|
186
|
+
"number_particles_small_pellet",
|
|
187
|
+
"total_gross_volume_small_pellet",
|
|
188
|
+
"number_particles_snowgrain",
|
|
189
|
+
"total_gross_volume_snowgrain",
|
|
190
|
+
"number_particles_rain",
|
|
191
|
+
"total_gross_volume_rain",
|
|
192
|
+
"number_particles_small_rain",
|
|
193
|
+
"total_gross_volume_small_rain",
|
|
194
|
+
"number_particles_drizzle",
|
|
195
|
+
"total_gross_volume_drizzle",
|
|
196
196
|
"number_particles_class_9",
|
|
197
197
|
"number_particles_class_9_internal_data",
|
|
198
198
|
"TO_BE_FURTHER_PROCESSED",
|
|
@@ -135,23 +135,23 @@ def reader(
|
|
|
135
135
|
"number_particles_no_hydrometeor",
|
|
136
136
|
"number_particles_no_hydrometeor_internal_data",
|
|
137
137
|
"number_particles_unknown_classification",
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
138
|
+
"total_gross_volume_unknown_classification",
|
|
139
|
+
"number_particles_hail",
|
|
140
|
+
"total_gross_volume_hail",
|
|
141
|
+
"number_particles_solid_precipitation",
|
|
142
|
+
"total_gross_volume_solid_precipitation",
|
|
143
|
+
"number_particles_large_pellet",
|
|
144
|
+
"total_gross_volume_large_pellet",
|
|
145
|
+
"number_particles_small_pellet",
|
|
146
|
+
"total_gross_volume_small_pellet",
|
|
147
|
+
"number_particles_snowgrain",
|
|
148
|
+
"total_gross_volume_snowgrain",
|
|
149
|
+
"number_particles_rain",
|
|
150
|
+
"total_gross_volume_rain",
|
|
151
|
+
"number_particles_small_rain",
|
|
152
|
+
"total_gross_volume_small_rain",
|
|
153
|
+
"number_particles_drizzle",
|
|
154
|
+
"total_gross_volume_drizzle",
|
|
155
155
|
"number_particles_class_9",
|
|
156
156
|
"number_particles_class_9_internal_data",
|
|
157
157
|
"raw_drop_number",
|
|
@@ -135,23 +135,23 @@ def reader(
|
|
|
135
135
|
"number_particles_no_hydrometeor",
|
|
136
136
|
"number_particles_no_hydrometeor_internal_data",
|
|
137
137
|
"number_particles_unknown_classification",
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
138
|
+
"total_gross_volume_unknown_classification",
|
|
139
|
+
"number_particles_hail",
|
|
140
|
+
"total_gross_volume_hail",
|
|
141
|
+
"number_particles_solid_precipitation",
|
|
142
|
+
"total_gross_volume_solid_precipitation",
|
|
143
|
+
"number_particles_large_pellet",
|
|
144
|
+
"total_gross_volume_large_pellet",
|
|
145
|
+
"number_particles_small_pellet",
|
|
146
|
+
"total_gross_volume_small_pellet",
|
|
147
|
+
"number_particles_snowgrain",
|
|
148
|
+
"total_gross_volume_snowgrain",
|
|
149
|
+
"number_particles_rain",
|
|
150
|
+
"total_gross_volume_rain",
|
|
151
|
+
"number_particles_small_rain",
|
|
152
|
+
"total_gross_volume_small_rain",
|
|
153
|
+
"number_particles_drizzle",
|
|
154
|
+
"total_gross_volume_drizzle",
|
|
155
155
|
"number_particles_class_9",
|
|
156
156
|
"number_particles_class_9_internal_data",
|
|
157
157
|
"raw_drop_number",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
16
|
# -----------------------------------------------------------------------------.
|
|
17
17
|
"""DISDRODB reader for DWD stations."""
|
|
18
|
+
|
|
18
19
|
import glob
|
|
19
20
|
import os
|
|
20
21
|
from pathlib import Path
|
|
@@ -83,23 +84,23 @@ COLUMNS = [
|
|
|
83
84
|
"number_particles_no_hydrometeor",
|
|
84
85
|
"number_particles_no_hydrometeor_internal_data",
|
|
85
86
|
"number_particles_unknown_classification",
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
87
|
+
"total_gross_volume_unknown_classification",
|
|
88
|
+
"number_particles_hail",
|
|
89
|
+
"total_gross_volume_hail",
|
|
90
|
+
"number_particles_solid_precipitation",
|
|
91
|
+
"total_gross_volume_solid_precipitation",
|
|
92
|
+
"number_particles_large_pellet",
|
|
93
|
+
"total_gross_volume_large_pellet",
|
|
94
|
+
"number_particles_small_pellet",
|
|
95
|
+
"total_gross_volume_small_pellet",
|
|
96
|
+
"number_particles_snowgrain",
|
|
97
|
+
"total_gross_volume_snowgrain",
|
|
98
|
+
"number_particles_rain",
|
|
99
|
+
"total_gross_volume_rain",
|
|
100
|
+
"number_particles_small_rain",
|
|
101
|
+
"total_gross_volume_small_rain",
|
|
102
|
+
"number_particles_drizzle",
|
|
103
|
+
"total_gross_volume_drizzle",
|
|
103
104
|
"number_particles_class_9",
|
|
104
105
|
"number_particles_class_9_internal_data",
|
|
105
106
|
"raw_drop_number",
|
|
@@ -178,7 +179,9 @@ def retrieve_synop_filepaths(df, filepath):
|
|
|
178
179
|
ymd = d.strftime("%Y%m%d")
|
|
179
180
|
fname_pattern = f"synop10min_{station_id}_{ymd}*1.0days.dat"
|
|
180
181
|
glob_pattern = os.path.join(synop_base_dir, y, m, fname_pattern)
|
|
181
|
-
|
|
182
|
+
files = glob.glob(glob_pattern)
|
|
183
|
+
if len(files) >= 1:
|
|
184
|
+
synop_filepaths.append(*files)
|
|
182
185
|
return synop_filepaths
|
|
183
186
|
|
|
184
187
|
|
|
@@ -416,23 +419,23 @@ def parse_format_v2(df):
|
|
|
416
419
|
"number_particles_no_hydrometeor",
|
|
417
420
|
"number_particles_no_hydrometeor_internal_data",
|
|
418
421
|
"number_particles_unknown_classification",
|
|
419
|
-
"
|
|
420
|
-
"
|
|
421
|
-
"
|
|
422
|
-
"
|
|
423
|
-
"
|
|
424
|
-
"
|
|
425
|
-
"
|
|
426
|
-
"
|
|
427
|
-
"
|
|
428
|
-
"
|
|
429
|
-
"
|
|
430
|
-
"
|
|
431
|
-
"
|
|
432
|
-
"
|
|
433
|
-
"
|
|
434
|
-
"
|
|
435
|
-
"
|
|
422
|
+
"total_gross_volume_unknown_classification",
|
|
423
|
+
"number_particles_hail",
|
|
424
|
+
"total_gross_volume_hail",
|
|
425
|
+
"number_particles_solid_precipitation",
|
|
426
|
+
"total_gross_volume_solid_precipitation",
|
|
427
|
+
"number_particles_large_pellet",
|
|
428
|
+
"total_gross_volume_large_pellet",
|
|
429
|
+
"number_particles_small_pellet",
|
|
430
|
+
"total_gross_volume_small_pellet",
|
|
431
|
+
"number_particles_snowgrain",
|
|
432
|
+
"total_gross_volume_snowgrain",
|
|
433
|
+
"number_particles_rain",
|
|
434
|
+
"total_gross_volume_rain",
|
|
435
|
+
"number_particles_small_rain",
|
|
436
|
+
"total_gross_volume_small_rain",
|
|
437
|
+
"number_particles_drizzle",
|
|
438
|
+
"total_gross_volume_drizzle",
|
|
436
439
|
"number_particles_class_9",
|
|
437
440
|
"number_particles_class_9_internal_data",
|
|
438
441
|
"raw_drop_number",
|
|
@@ -536,23 +539,23 @@ def parse_format_v3(df):
|
|
|
536
539
|
# "number_particles_no_hydrometeor",
|
|
537
540
|
# "number_particles_no_hydrometeor_internal_data",
|
|
538
541
|
# "number_particles_unknown_classification",
|
|
539
|
-
# "
|
|
540
|
-
# "
|
|
541
|
-
# "
|
|
542
|
-
# "
|
|
543
|
-
# "
|
|
544
|
-
# "
|
|
545
|
-
# "
|
|
546
|
-
# "
|
|
547
|
-
# "
|
|
548
|
-
# "
|
|
549
|
-
# "
|
|
550
|
-
# "
|
|
551
|
-
# "
|
|
552
|
-
# "
|
|
553
|
-
# "
|
|
554
|
-
# "
|
|
555
|
-
# "
|
|
542
|
+
# "total_gross_volume_unknown_classification",
|
|
543
|
+
# "number_particles_hail",
|
|
544
|
+
# "total_gross_volume_hail",
|
|
545
|
+
# "number_particles_solid_precipitation",
|
|
546
|
+
# "total_gross_volume_solid_precipitation",
|
|
547
|
+
# "number_particles_large_pellet",
|
|
548
|
+
# "total_gross_volume_large_pellet",
|
|
549
|
+
# "number_particles_small_pellet",
|
|
550
|
+
# "total_gross_volume_small_pellet",
|
|
551
|
+
# "number_particles_snowgrain",
|
|
552
|
+
# "total_gross_volume_snowgrain",
|
|
553
|
+
# "number_particles_rain",
|
|
554
|
+
# "total_gross_volume_rain",
|
|
555
|
+
# "number_particles_small_rain",
|
|
556
|
+
# "total_gross_volume_small_rain",
|
|
557
|
+
# "number_particles_drizzle",
|
|
558
|
+
# "total_gross_volume_drizzle",
|
|
556
559
|
# "number_particles_class_9",
|
|
557
560
|
# "number_particles_class_9_internal_data",
|
|
558
561
|
"raw_drop_number",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
16
|
# -----------------------------------------------------------------------------.
|
|
17
17
|
"""DISDRODB reader for GID LPM sensors not measuring wind."""
|
|
18
|
+
|
|
18
19
|
import os
|
|
19
20
|
|
|
20
21
|
import numpy as np
|
|
@@ -160,23 +161,23 @@ def reader(
|
|
|
160
161
|
"number_particles_no_hydrometeor",
|
|
161
162
|
"number_particles_no_hydrometeor_internal_data",
|
|
162
163
|
"number_particles_unknown_classification",
|
|
163
|
-
"
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
"
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
"
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
"
|
|
176
|
-
"
|
|
177
|
-
"
|
|
178
|
-
"
|
|
179
|
-
"
|
|
164
|
+
"total_gross_volume_unknown_classification",
|
|
165
|
+
"number_particles_hail",
|
|
166
|
+
"total_gross_volume_hail",
|
|
167
|
+
"number_particles_solid_precipitation",
|
|
168
|
+
"total_gross_volume_solid_precipitation",
|
|
169
|
+
"number_particles_large_pellet",
|
|
170
|
+
"total_gross_volume_large_pellet",
|
|
171
|
+
"number_particles_small_pellet",
|
|
172
|
+
"total_gross_volume_small_pellet",
|
|
173
|
+
"number_particles_snowgrain",
|
|
174
|
+
"total_gross_volume_snowgrain",
|
|
175
|
+
"number_particles_rain",
|
|
176
|
+
"total_gross_volume_rain",
|
|
177
|
+
"number_particles_small_rain",
|
|
178
|
+
"total_gross_volume_small_rain",
|
|
179
|
+
"number_particles_drizzle",
|
|
180
|
+
"total_gross_volume_drizzle",
|
|
180
181
|
"number_particles_class_9",
|
|
181
182
|
"number_particles_class_9_internal_data",
|
|
182
183
|
"raw_drop_number",
|