disdrodb 0.1.0__py3-none-any.whl → 0.1.2__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.
Files changed (77) hide show
  1. disdrodb/__init__.py +1 -1
  2. disdrodb/_version.py +2 -2
  3. disdrodb/api/io.py +12 -2
  4. disdrodb/data_transfer/download_data.py +145 -14
  5. disdrodb/l0/check_standards.py +15 -10
  6. disdrodb/l0/configs/LPM/bins_diameter.yml +3 -3
  7. disdrodb/l0/configs/LPM/l0a_encodings.yml +4 -4
  8. disdrodb/l0/configs/LPM/l0b_cf_attrs.yml +22 -6
  9. disdrodb/l0/configs/LPM/l0b_encodings.yml +41 -0
  10. disdrodb/l0/configs/LPM/raw_data_format.yml +40 -0
  11. disdrodb/l0/configs/PARSIVEL/l0b_cf_attrs.yml +1 -1
  12. disdrodb/l0/configs/PARSIVEL/raw_data_format.yml +1 -1
  13. disdrodb/l0/configs/PARSIVEL2/l0a_encodings.yml +4 -0
  14. disdrodb/l0/configs/PARSIVEL2/l0b_cf_attrs.yml +20 -4
  15. disdrodb/l0/configs/PARSIVEL2/l0b_encodings.yml +41 -0
  16. disdrodb/l0/configs/PARSIVEL2/raw_data_format.yml +50 -10
  17. disdrodb/l0/configs/PWS100/bins_diameter.yml +173 -0
  18. disdrodb/l0/configs/PWS100/bins_velocity.yml +173 -0
  19. disdrodb/l0/configs/PWS100/l0a_encodings.yml +19 -0
  20. disdrodb/l0/configs/PWS100/l0b_cf_attrs.yml +76 -0
  21. disdrodb/l0/configs/PWS100/l0b_encodings.yml +176 -0
  22. disdrodb/l0/configs/PWS100/raw_data_format.yml +182 -0
  23. disdrodb/l0/configs/RD80/raw_data_format.yml +2 -6
  24. disdrodb/l0/l0b_nc_processing.py +1 -1
  25. disdrodb/l0/l0b_processing.py +12 -10
  26. disdrodb/l0/manuals/SWS250.pdf +0 -0
  27. disdrodb/l0/manuals/VPF730.pdf +0 -0
  28. disdrodb/l0/manuals/VPF750.pdf +0 -0
  29. disdrodb/l0/readers/LPM/AUSTRALIA/MELBOURNE_2007_LPM.py +23 -13
  30. disdrodb/l0/readers/LPM/BRAZIL/CHUVA_LPM.py +3 -3
  31. disdrodb/l0/readers/LPM/BRAZIL/GOAMAZON_LPM.py +5 -3
  32. disdrodb/l0/readers/LPM/ITALY/GID_LPM.py +36 -20
  33. disdrodb/l0/readers/LPM/ITALY/GID_LPM_W.py +210 -0
  34. disdrodb/l0/readers/LPM/KIT/CHWALA.py +225 -0
  35. disdrodb/l0/readers/LPM/SLOVENIA/ARSO.py +197 -0
  36. disdrodb/l0/readers/LPM/SLOVENIA/CRNI_VRH.py +197 -0
  37. disdrodb/l0/readers/PARSIVEL/GPM/PIERS.py +107 -0
  38. disdrodb/l0/readers/PARSIVEL/JAPAN/JMA.py +125 -0
  39. disdrodb/l0/readers/PARSIVEL/NCAR/PECAN_MOBILE.py +1 -1
  40. disdrodb/l0/readers/PARSIVEL/NCAR/VORTEX2_2009.py +1 -1
  41. disdrodb/l0/readers/PARSIVEL/SLOVENIA/UL_FGG.py +121 -0
  42. disdrodb/l0/readers/PARSIVEL2/FRANCE/ENPC_PARSIVEL2.py +189 -0
  43. disdrodb/l0/readers/PARSIVEL2/KIT/BURKINA_FASO.py +133 -0
  44. disdrodb/l0/readers/PARSIVEL2/NCAR/FARM_PARSIVEL2.py +138 -0
  45. disdrodb/l0/readers/PARSIVEL2/NCAR/PECAN_FP3.py +1 -1
  46. disdrodb/l0/readers/PARSIVEL2/NCAR/VORTEX_SE_2016_P2.py +1 -1
  47. disdrodb/l0/readers/PARSIVEL2/NCAR/VORTEX_SE_2016_PIPS.py +9 -0
  48. disdrodb/l0/readers/PARSIVEL2/NETHERLANDS/DELFT_NC.py +67 -0
  49. disdrodb/l0/readers/PWS100/FRANCE/ENPC_PWS100.py +150 -0
  50. disdrodb/l0/readers/RD80/NOAA/PSL_RD80.py +291 -0
  51. disdrodb/l0/readers/template_reader_raw_netcdf_data.py +1 -1
  52. disdrodb/l0/standards.py +7 -4
  53. disdrodb/l0/template_tools.py +2 -2
  54. disdrodb/l1/encoding_attrs.py +30 -8
  55. disdrodb/l1/processing.py +6 -4
  56. disdrodb/l1/resampling.py +1 -1
  57. disdrodb/l1/routines.py +9 -7
  58. disdrodb/l2/empirical_dsd.py +100 -2
  59. disdrodb/l2/event.py +3 -3
  60. disdrodb/l2/processing.py +21 -12
  61. disdrodb/l2/processing_options.py +7 -7
  62. disdrodb/l2/routines.py +3 -3
  63. disdrodb/metadata/checks.py +15 -6
  64. disdrodb/metadata/manipulation.py +2 -2
  65. disdrodb/metadata/standards.py +83 -79
  66. disdrodb/metadata/writer.py +2 -2
  67. disdrodb/routines.py +246 -10
  68. disdrodb/scattering/routines.py +1 -1
  69. disdrodb/utils/dataframe.py +342 -0
  70. disdrodb/utils/directories.py +14 -2
  71. disdrodb/utils/xarray.py +83 -0
  72. {disdrodb-0.1.0.dist-info → disdrodb-0.1.2.dist-info}/METADATA +34 -61
  73. {disdrodb-0.1.0.dist-info → disdrodb-0.1.2.dist-info}/RECORD +77 -54
  74. {disdrodb-0.1.0.dist-info → disdrodb-0.1.2.dist-info}/WHEEL +1 -1
  75. {disdrodb-0.1.0.dist-info → disdrodb-0.1.2.dist-info}/entry_points.txt +3 -3
  76. {disdrodb-0.1.0.dist-info → disdrodb-0.1.2.dist-info}/licenses/LICENSE +0 -0
  77. {disdrodb-0.1.0.dist-info → disdrodb-0.1.2.dist-info}/top_level.txt +0 -0
disdrodb/routines.py CHANGED
@@ -180,7 +180,40 @@ def run_l0a_station(
180
180
  data_archive_dir: Optional[str] = None,
181
181
  metadata_archive_dir: Optional[str] = None,
182
182
  ):
183
- """Run the L0A processing of a station calling the disdrodb_l0a_station in the terminal."""
183
+ """
184
+ Run the L0A processing of a station by invoking the disdrodb_run_l0a_station command in the terminal.
185
+
186
+ Parameters
187
+ ----------
188
+ data_source : str
189
+ The name of the data source.
190
+ campaign_name : str
191
+ The name of the campaign.
192
+ station_name : str
193
+ The name of the station.
194
+ force : bool, optional
195
+ If ``True``, overwrite existing data in destination directories.
196
+ The default value is ``False``.
197
+ verbose : bool, optional
198
+ If ``True``, print detailed processing information to the terminal.
199
+ The default value is ``False``.
200
+ debugging_mode : bool, optional
201
+ If ``True``, reduce the amount of data to process for debugging.
202
+ The default value is ``False``.
203
+ parallel : bool, optional
204
+ If ``True``, process files in multiple processes simultaneously.
205
+ The default value is ``True``.
206
+ data_archive_dir
207
+ The directory path where the local DISDRODB Data Archive is located.
208
+ The directory path must end with ``<...>/DISDRODB``.
209
+ If ``None``, it uses the ``data_archive_dir`` path specified
210
+ in the DISDRODB active configuration.
211
+ metadata_archive_dir
212
+ The directory path where the DISDRODB Metadata Archive is located.
213
+ The directory path must end with ``<...>/DISDRODB-METADATA/DISDRODB``.
214
+ If ``None``, it uses the ``metadata_archive_dir`` path specified
215
+ in the DISDRODB active configuration.
216
+ """
184
217
  # Define command
185
218
  cmd = " ".join(
186
219
  [
@@ -225,7 +258,43 @@ def run_l0b_station(
225
258
  data_archive_dir: Optional[str] = None,
226
259
  metadata_archive_dir: Optional[str] = None,
227
260
  ):
228
- """Run the L0B processing of a station calling disdrodb_run_l0b_station in the terminal."""
261
+ """
262
+ Run the L0B processing of a station by invoking the disdrodb_run_l0b_station command in the terminal.
263
+
264
+ Parameters
265
+ ----------
266
+ data_archive_dir
267
+ The directory path where the local DISDRODB Data Archive is located.
268
+ The directory path must end with ``<...>/DISDRODB``.
269
+ If ``None``, it uses the ``data_archive_dir`` path specified
270
+ in the DISDRODB active configuration.
271
+ metadata_archive_dir
272
+ The directory path where the DISDRODB Metadata Archive is located.
273
+ The directory path must end with ``<...>/DISDRODB-METADATA/DISDRODB``.
274
+ If ``None``, it uses the ``metadata_archive_dir`` path specified
275
+ in the DISDRODB active configuration.
276
+ data_source : str
277
+ The name of the data source.
278
+ campaign_name : str
279
+ The name of the campaign.
280
+ station_name : str
281
+ The name of the station.
282
+ remove_l0a : bool, optional
283
+ Whether to keep the L0A files after generating L0B netCDF files.
284
+ The default value is ``False``.
285
+ force : bool, optional
286
+ If ``True``, overwrite existing data in destination directories.
287
+ The default value is ``False``.
288
+ verbose : bool, optional
289
+ If ``True``, print detailed processing information to the terminal.
290
+ The default value is ``False``.
291
+ debugging_mode : bool, optional
292
+ If ``True``, reduce the amount of data processed for debugging.
293
+ The default value is ``False``.
294
+ parallel : bool, optional
295
+ If ``True``, process files in multiple processes simultaneously.
296
+ The default value is ``True``.
297
+ """
229
298
  # Define command
230
299
  cmd = " ".join(
231
300
  [
@@ -273,9 +342,43 @@ def run_l0c_station(
273
342
  data_archive_dir: Optional[str] = None,
274
343
  metadata_archive_dir: Optional[str] = None,
275
344
  ):
276
- """Run the L0C processing of a station calling the disdrodb_l0c_station in the terminal."""
277
- # TODO: implement remove_l0b!
345
+ """
346
+ Run the L0C processing of a station by invoking the disdrodb_run_l0c_station command in the terminal.
278
347
 
348
+ Parameters
349
+ ----------
350
+ data_source : str
351
+ The name of the data source.
352
+ campaign_name : str
353
+ The name of the campaign.
354
+ station_name : str
355
+ The name of the station.
356
+ remove_l0b : bool, optional
357
+ Whether to remove the L0B files after generating L0C netCDF files.
358
+ The default value is ``False``.
359
+ force : bool, optional
360
+ If ``True``, overwrite existing data in destination directories.
361
+ The default value is ``False``.
362
+ verbose : bool, optional
363
+ If ``True``, print detailed processing information to the terminal.
364
+ The default value is ``False``.
365
+ debugging_mode : bool, optional
366
+ If ``True``, reduce the amount of data processed for debugging.
367
+ The default value is ``False``.
368
+ parallel : bool, optional
369
+ If ``True``, process files in multiple processes simultaneously.
370
+ The default value is ``True``.
371
+ data_archive_dir
372
+ The directory path where the local DISDRODB Data Archive is located.
373
+ The directory path must end with ``<...>/DISDRODB``.
374
+ If ``None``, it uses the ``data_archive_dir`` path specified
375
+ in the DISDRODB active configuration.
376
+ metadata_archive_dir
377
+ The directory path where the DISDRODB Metadata Archive is located.
378
+ The directory path must end with ``<...>/DISDRODB-METADATA/DISDRODB``.
379
+ If ``None``, it uses the ``metadata_archive_dir`` path specified
380
+ in the DISDRODB active configuration.
381
+ """
279
382
  # Define command
280
383
  cmd = " ".join(
281
384
  [
@@ -321,7 +424,40 @@ def run_l1_station(
321
424
  data_archive_dir: Optional[str] = None,
322
425
  metadata_archive_dir: Optional[str] = None,
323
426
  ):
324
- """Run the L1 processing of a station calling the disdrodb_l1_station in the terminal."""
427
+ """
428
+ Run the L1 processing of a station by invoking the disdrodb_run_l1_station command in the terminal.
429
+
430
+ Parameters
431
+ ----------
432
+ data_source : str
433
+ The name of the data source.
434
+ campaign_name : str
435
+ The name of the campaign.
436
+ station_name : str
437
+ The name of the station.
438
+ force : bool, optional
439
+ If ``True``, overwrite existing data in destination directories.
440
+ The default value is ``False``.
441
+ verbose : bool, optional
442
+ If ``True``, print detailed processing information to the terminal.
443
+ The default value is ``False``.
444
+ debugging_mode : bool, optional
445
+ If ``True``, reduce the amount of data processed for debugging.
446
+ The default value is ``False``.
447
+ parallel : bool, optional
448
+ If ``True``, process files in multiple processes simultaneously.
449
+ The default value is ``True``.
450
+ data_archive_dir
451
+ The directory path where the local DISDRODB Data Archive is located.
452
+ The directory path must end with ``<...>/DISDRODB``.
453
+ If ``None``, it uses the ``data_archive_dir`` path specified
454
+ in the DISDRODB active configuration.
455
+ metadata_archive_dir
456
+ The directory path where the DISDRODB Metadata Archive is located.
457
+ The directory path must end with ``<...>/DISDRODB-METADATA/DISDRODB``.
458
+ If ``None``, it uses the ``metadata_archive_dir`` path specified
459
+ in the DISDRODB active configuration.
460
+ """
325
461
  # Define command
326
462
  cmd = " ".join(
327
463
  [
@@ -364,7 +500,40 @@ def run_l2e_station(
364
500
  data_archive_dir: Optional[str] = None,
365
501
  metadata_archive_dir: Optional[str] = None,
366
502
  ):
367
- """Run the L2E processing of a station calling the disdrodb_l1_station in the terminal."""
503
+ """
504
+ Run the L2E processing of a station by invoking the disdrodb_run_l2e_station command in the terminal.
505
+
506
+ Parameters
507
+ ----------
508
+ data_source : str
509
+ The name of the data source.
510
+ campaign_name : str
511
+ The name of the campaign.
512
+ station_name : str
513
+ The name of the station.
514
+ force : bool, optional
515
+ If ``True``, overwrite existing data in destination directories.
516
+ The default value is ``False``.
517
+ verbose : bool, optional
518
+ If ``True``, print detailed processing information to the terminal.
519
+ The default value is ``False``.
520
+ debugging_mode : bool, optional
521
+ If ``True``, reduce the amount of data processed for debugging.
522
+ The default value is ``False``.
523
+ parallel : bool, optional
524
+ If ``True``, process files in multiple processes simultaneously.
525
+ The default value is ``True``.
526
+ data_archive_dir
527
+ The directory path where the local DISDRODB Data Archive is located.
528
+ The directory path must end with ``<...>/DISDRODB``.
529
+ If ``None``, it uses the ``data_archive_dir`` path specified
530
+ in the DISDRODB active configuration.
531
+ metadata_archive_dir
532
+ The directory path where the DISDRODB Metadata Archive is located.
533
+ The directory path must end with ``<...>/DISDRODB-METADATA/DISDRODB``.
534
+ If ``None``, it uses the ``metadata_archive_dir`` path specified
535
+ in the DISDRODB active configuration.
536
+ """
368
537
  # Define command
369
538
  cmd = " ".join(
370
539
  [
@@ -407,7 +576,40 @@ def run_l2m_station(
407
576
  data_archive_dir: Optional[str] = None,
408
577
  metadata_archive_dir: Optional[str] = None,
409
578
  ):
410
- """Run the L2M processing of a station calling the disdrodb_l2m_station in the terminal."""
579
+ """
580
+ Run the L2M processing of a station by invoking the disdrodb_run_l2m_station command in the terminal.
581
+
582
+ Parameters
583
+ ----------
584
+ data_source : str
585
+ The name of the data source.
586
+ campaign_name : str
587
+ The name of the campaign.
588
+ station_name : str
589
+ The name of the station.
590
+ force : bool, optional
591
+ If ``True``, overwrite existing data in destination directories.
592
+ The default value is ``False``.
593
+ verbose : bool, optional
594
+ If ``True``, print detailed processing information to the terminal.
595
+ The default value is ``False``.
596
+ debugging_mode : bool, optional
597
+ If ``True``, reduce the amount of data processed for debugging.
598
+ The default value is ``False``.
599
+ parallel : bool, optional
600
+ If ``True``, process files in multiple processes simultaneously.
601
+ The default value is ``True``.
602
+ data_archive_dir
603
+ The directory path where the local DISDRODB Data Archive is located.
604
+ The directory path must end with ``<...>/DISDRODB``.
605
+ If ``None``, it uses the ``data_archive_dir`` path specified
606
+ in the DISDRODB active configuration.
607
+ metadata_archive_dir
608
+ The directory path where the DISDRODB Metadata Archive is located.
609
+ The directory path must end with ``<...>/DISDRODB-METADATA/DISDRODB``.
610
+ If ``None``, it uses the ``metadata_archive_dir`` path specified
611
+ in the DISDRODB active configuration.
612
+ """
411
613
  # Define command
412
614
  cmd = " ".join(
413
615
  [
@@ -485,14 +687,18 @@ def run_l0a(
485
687
  By default, the number of process is defined with ``os.cpu_count()``.
486
688
  If ``False``, the files are processed sequentially in a single process.
487
689
  debugging_mode : bool
488
- If ``True``, it reduces the amount of data to process.
489
- For L0A, it processes just the first 3 raw data files.
690
+ If ``True``, it processes just the first 3 raw data files.
490
691
  The default value is ``False``.
491
692
  data_archive_dir : str (optional)
492
693
  The directory path where the DISDRODB Data Archive is located.
493
694
  The directory path must end with ``<...>/DISDRODB``.
494
695
  If ``None``, it uses the ``data_archive_dir`` path specified
495
696
  in the DISDRODB active configuration.
697
+ metadata_archive_dir
698
+ The directory path where the DISDRODB Metadata Archive is located.
699
+ The directory path must end with ``<...>/DISDRODB-METADATA/DISDRODB``.
700
+ If ``None``, it uses the ``metadata_archive_dir`` path specified
701
+ in the DISDRODB active configuration.
496
702
  """
497
703
  # Define products
498
704
  product = "L0A"
@@ -595,6 +801,11 @@ def run_l0b(
595
801
  The directory path must end with ``<...>/DISDRODB``.
596
802
  If ``None``, it uses the ``data_archive_dir`` path specified
597
803
  in the DISDRODB active configuration.
804
+ metadata_archive_dir
805
+ The directory path where the DISDRODB Metadata Archive is located.
806
+ The directory path must end with ``<...>/DISDRODB-METADATA/DISDRODB``.
807
+ If ``None``, it uses the ``metadata_archive_dir`` path specified
808
+ in the DISDRODB active configuration.
598
809
  """
599
810
  # Define products
600
811
  product = "L0B"
@@ -678,7 +889,7 @@ def run_l0c(
678
889
  The default value is ``None``.
679
890
  remove_l0b : bool
680
891
  Whether to remove the L0B files after having produced L0C netCDF files.
681
- The default is False.
892
+ The default value is ``False``.
682
893
  force : bool
683
894
  If ``True``, overwrite existing data into destination directories.
684
895
  If ``False``, raise an error if there are already data into destination directories.
@@ -701,6 +912,11 @@ def run_l0c(
701
912
  The directory path must end with ``<...>/DISDRODB``.
702
913
  If ``None``, it uses the ``data_archive_dir`` path specified
703
914
  in the DISDRODB active configuration.
915
+ metadata_archive_dir
916
+ The directory path where the DISDRODB Metadata Archive is located.
917
+ The directory path must end with ``<...>/DISDRODB-METADATA/DISDRODB``.
918
+ If ``None``, it uses the ``metadata_archive_dir`` path specified
919
+ in the DISDRODB active configuration.
704
920
  """
705
921
  # Define products
706
922
  product = "L0C"
@@ -824,6 +1040,11 @@ def run_l0(
824
1040
  The directory path must end with ``<...>/DISDRODB``.
825
1041
  If ``None``, it uses the ``data_archive_dir`` path specified
826
1042
  in the DISDRODB active configuration.
1043
+ metadata_archive_dir
1044
+ The directory path where the DISDRODB Metadata Archive is located.
1045
+ The directory path must end with ``<...>/DISDRODB-METADATA/DISDRODB``.
1046
+ If ``None``, it uses the ``metadata_archive_dir`` path specified
1047
+ in the DISDRODB active configuration.
827
1048
  """
828
1049
  # Define starting product
829
1050
  if l0c_processing:
@@ -933,6 +1154,11 @@ def run_l1(
933
1154
  The directory path must end with ``<...>/DISDRODB``.
934
1155
  If ``None``, it uses the ``data_archive_dir`` path specified
935
1156
  in the DISDRODB active configuration.
1157
+ metadata_archive_dir
1158
+ The directory path where the DISDRODB Metadata Archive is located.
1159
+ The directory path must end with ``<...>/DISDRODB-METADATA/DISDRODB``.
1160
+ If ``None``, it uses the ``metadata_archive_dir`` path specified
1161
+ in the DISDRODB active configuration.
936
1162
  """
937
1163
  product = "L1"
938
1164
  required_product = get_required_product(product)
@@ -1032,6 +1258,11 @@ def run_l2e(
1032
1258
  The directory path must end with ``<...>/DISDRODB``.
1033
1259
  If ``None``, it uses the ``data_archive_dir`` path specified
1034
1260
  in the DISDRODB active configuration.
1261
+ metadata_archive_dir
1262
+ The directory path where the DISDRODB Metadata Archive is located.
1263
+ The directory path must end with ``<...>/DISDRODB-METADATA/DISDRODB``.
1264
+ If ``None``, it uses the ``metadata_archive_dir`` path specified
1265
+ in the DISDRODB active configuration.
1035
1266
  """
1036
1267
  product = "L2E"
1037
1268
  required_product = get_required_product(product)
@@ -1130,6 +1361,11 @@ def run_l2m(
1130
1361
  The directory path must end with ``<...>/DISDRODB``.
1131
1362
  If ``None``, it uses the ``data_archive_dir`` path specified
1132
1363
  in the DISDRODB active configuration.
1364
+ metadata_archive_dir
1365
+ The directory path where the DISDRODB Metadata Archive is located.
1366
+ The directory path must end with ``<...>/DISDRODB-METADATA/DISDRODB``.
1367
+ If ``None``, it uses the ``metadata_archive_dir`` path specified
1368
+ in the DISDRODB active configuration.
1133
1369
  """
1134
1370
  product = "L2M"
1135
1371
  required_product = get_required_product(product)
@@ -186,7 +186,7 @@ def get_model_radar_parameters(
186
186
  ds,
187
187
  radar_band,
188
188
  canting_angle_std=7,
189
- diameter_max=8,
189
+ diameter_max=10,
190
190
  axis_ratio="Thurai2007",
191
191
  ):
192
192
  """Compute radar parameters from a PSD model.