disdrodb 0.0.21__py3-none-any.whl → 0.1.1__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 (279) hide show
  1. disdrodb/__init__.py +132 -15
  2. disdrodb/_config.py +4 -2
  3. disdrodb/_version.py +9 -4
  4. disdrodb/api/checks.py +264 -237
  5. disdrodb/api/configs.py +4 -8
  6. disdrodb/api/create_directories.py +235 -290
  7. disdrodb/api/info.py +217 -26
  8. disdrodb/api/io.py +306 -270
  9. disdrodb/api/path.py +597 -173
  10. disdrodb/api/search.py +486 -0
  11. disdrodb/{metadata/scripts → cli}/disdrodb_check_metadata_archive.py +12 -7
  12. disdrodb/{utils/pandas.py → cli/disdrodb_data_archive_directory.py} +9 -18
  13. disdrodb/cli/disdrodb_download_archive.py +86 -0
  14. disdrodb/cli/disdrodb_download_metadata_archive.py +53 -0
  15. disdrodb/cli/disdrodb_download_station.py +84 -0
  16. disdrodb/{api/scripts → cli}/disdrodb_initialize_station.py +22 -10
  17. disdrodb/cli/disdrodb_metadata_archive_directory.py +32 -0
  18. disdrodb/{data_transfer/scripts/disdrodb_download_station.py → cli/disdrodb_open_data_archive.py} +22 -22
  19. disdrodb/cli/disdrodb_open_logs_directory.py +69 -0
  20. disdrodb/{data_transfer/scripts/disdrodb_upload_station.py → cli/disdrodb_open_metadata_archive.py} +22 -24
  21. disdrodb/cli/disdrodb_open_metadata_directory.py +71 -0
  22. disdrodb/cli/disdrodb_open_product_directory.py +74 -0
  23. disdrodb/cli/disdrodb_open_readers_directory.py +32 -0
  24. disdrodb/{l0/scripts → cli}/disdrodb_run_l0.py +38 -31
  25. disdrodb/{l0/scripts → cli}/disdrodb_run_l0_station.py +32 -30
  26. disdrodb/{l0/scripts → cli}/disdrodb_run_l0a.py +30 -21
  27. disdrodb/{l0/scripts → cli}/disdrodb_run_l0a_station.py +24 -33
  28. disdrodb/{l0/scripts → cli}/disdrodb_run_l0b.py +30 -21
  29. disdrodb/{l0/scripts → cli}/disdrodb_run_l0b_station.py +25 -34
  30. disdrodb/cli/disdrodb_run_l0c.py +130 -0
  31. disdrodb/cli/disdrodb_run_l0c_station.py +129 -0
  32. disdrodb/cli/disdrodb_run_l1.py +122 -0
  33. disdrodb/cli/disdrodb_run_l1_station.py +121 -0
  34. disdrodb/cli/disdrodb_run_l2e.py +122 -0
  35. disdrodb/cli/disdrodb_run_l2e_station.py +122 -0
  36. disdrodb/cli/disdrodb_run_l2m.py +122 -0
  37. disdrodb/cli/disdrodb_run_l2m_station.py +122 -0
  38. disdrodb/cli/disdrodb_upload_archive.py +105 -0
  39. disdrodb/cli/disdrodb_upload_station.py +98 -0
  40. disdrodb/configs.py +90 -25
  41. disdrodb/data_transfer/__init__.py +22 -0
  42. disdrodb/data_transfer/download_data.py +87 -90
  43. disdrodb/data_transfer/upload_data.py +64 -37
  44. disdrodb/data_transfer/zenodo.py +15 -18
  45. disdrodb/docs.py +1 -1
  46. disdrodb/issue/__init__.py +17 -4
  47. disdrodb/issue/checks.py +10 -23
  48. disdrodb/issue/reader.py +9 -12
  49. disdrodb/issue/writer.py +14 -17
  50. disdrodb/l0/__init__.py +17 -26
  51. disdrodb/l0/check_configs.py +35 -23
  52. disdrodb/l0/check_standards.py +46 -51
  53. disdrodb/l0/configs/{Thies_LPM → LPM}/bins_diameter.yml +44 -44
  54. disdrodb/l0/configs/{Thies_LPM → LPM}/bins_velocity.yml +40 -40
  55. disdrodb/l0/configs/LPM/l0a_encodings.yml +80 -0
  56. disdrodb/l0/configs/{Thies_LPM → LPM}/l0b_cf_attrs.yml +84 -65
  57. disdrodb/l0/configs/{Thies_LPM → LPM}/l0b_encodings.yml +50 -9
  58. disdrodb/l0/configs/{Thies_LPM → LPM}/raw_data_format.yml +285 -245
  59. disdrodb/l0/configs/{OTT_Parsivel → PARSIVEL}/bins_diameter.yml +66 -66
  60. disdrodb/l0/configs/{OTT_Parsivel → PARSIVEL}/bins_velocity.yml +64 -64
  61. disdrodb/l0/configs/PARSIVEL/l0a_encodings.yml +32 -0
  62. disdrodb/l0/configs/{OTT_Parsivel → PARSIVEL}/l0b_cf_attrs.yml +23 -21
  63. disdrodb/l0/configs/{OTT_Parsivel → PARSIVEL}/l0b_encodings.yml +17 -17
  64. disdrodb/l0/configs/{OTT_Parsivel → PARSIVEL}/raw_data_format.yml +77 -77
  65. disdrodb/l0/configs/{OTT_Parsivel2 → PARSIVEL2}/bins_diameter.yml +64 -64
  66. disdrodb/l0/configs/{OTT_Parsivel2 → PARSIVEL2}/bins_velocity.yml +64 -64
  67. disdrodb/l0/configs/PARSIVEL2/l0a_encodings.yml +39 -0
  68. disdrodb/l0/configs/{OTT_Parsivel2 → PARSIVEL2}/l0b_cf_attrs.yml +28 -26
  69. disdrodb/l0/configs/{OTT_Parsivel2 → PARSIVEL2}/l0b_encodings.yml +20 -20
  70. disdrodb/l0/configs/{OTT_Parsivel2 → PARSIVEL2}/raw_data_format.yml +107 -107
  71. disdrodb/l0/configs/PWS100/bins_diameter.yml +173 -0
  72. disdrodb/l0/configs/PWS100/bins_velocity.yml +173 -0
  73. disdrodb/l0/configs/PWS100/l0a_encodings.yml +19 -0
  74. disdrodb/l0/configs/PWS100/l0b_cf_attrs.yml +76 -0
  75. disdrodb/l0/configs/PWS100/l0b_encodings.yml +176 -0
  76. disdrodb/l0/configs/PWS100/raw_data_format.yml +182 -0
  77. disdrodb/l0/configs/{RD_80 → RD80}/bins_diameter.yml +40 -40
  78. disdrodb/l0/configs/RD80/l0a_encodings.yml +16 -0
  79. disdrodb/l0/configs/{RD_80 → RD80}/l0b_cf_attrs.yml +3 -3
  80. disdrodb/l0/configs/RD80/l0b_encodings.yml +135 -0
  81. disdrodb/l0/configs/{RD_80 → RD80}/raw_data_format.yml +46 -50
  82. disdrodb/l0/l0_reader.py +216 -340
  83. disdrodb/l0/l0a_processing.py +237 -208
  84. disdrodb/l0/l0b_nc_processing.py +227 -80
  85. disdrodb/l0/l0b_processing.py +96 -174
  86. disdrodb/l0/l0c_processing.py +627 -0
  87. disdrodb/l0/readers/{ARM → LPM/ARM}/ARM_LPM.py +36 -58
  88. disdrodb/l0/readers/LPM/AUSTRALIA/MELBOURNE_2007_LPM.py +236 -0
  89. disdrodb/l0/readers/LPM/BRAZIL/CHUVA_LPM.py +185 -0
  90. disdrodb/l0/readers/LPM/BRAZIL/GOAMAZON_LPM.py +185 -0
  91. disdrodb/l0/readers/LPM/ITALY/GID_LPM.py +195 -0
  92. disdrodb/l0/readers/LPM/ITALY/GID_LPM_W.py +210 -0
  93. disdrodb/l0/readers/{BRAZIL/GOAMAZON_LPM.py → LPM/KIT/CHWALA.py} +97 -76
  94. disdrodb/l0/readers/LPM/SLOVENIA/ARSO.py +197 -0
  95. disdrodb/l0/readers/LPM/SLOVENIA/CRNI_VRH.py +197 -0
  96. disdrodb/l0/readers/{UK → LPM/UK}/DIVEN.py +14 -35
  97. disdrodb/l0/readers/PARSIVEL/AUSTRALIA/MELBOURNE_2007_PARSIVEL.py +157 -0
  98. disdrodb/l0/readers/PARSIVEL/CHINA/CHONGQING.py +113 -0
  99. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/ARCTIC_2021.py +40 -57
  100. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/COMMON_2011.py +37 -54
  101. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/DAVOS_2009_2011.py +34 -51
  102. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/EPFL_2009.py +34 -51
  103. disdrodb/l0/readers/{EPFL/PARADISO_2014.py → PARSIVEL/EPFL/EPFL_ROOF_2008.py} +38 -50
  104. disdrodb/l0/readers/PARSIVEL/EPFL/EPFL_ROOF_2010.py +105 -0
  105. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/EPFL_ROOF_2011.py +34 -51
  106. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/EPFL_ROOF_2012.py +33 -51
  107. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/GENEPI_2007.py +25 -44
  108. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/GRAND_ST_BERNARD_2007.py +25 -44
  109. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/GRAND_ST_BERNARD_2007_2.py +25 -44
  110. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/HPICONET_2010.py +34 -51
  111. disdrodb/l0/readers/{EPFL/EPFL_ROOF_2010.py → PARSIVEL/EPFL/HYMEX_LTE_SOP2.py} +37 -50
  112. disdrodb/l0/readers/PARSIVEL/EPFL/HYMEX_LTE_SOP3.py +111 -0
  113. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/HYMEX_LTE_SOP4.py +36 -54
  114. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/LOCARNO_2018.py +34 -52
  115. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/LOCARNO_2019.py +38 -56
  116. disdrodb/l0/readers/PARSIVEL/EPFL/PARADISO_2014.py +105 -0
  117. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/PARSIVEL_2007.py +27 -45
  118. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/PLATO_2019.py +24 -44
  119. disdrodb/l0/readers/PARSIVEL/EPFL/RACLETS_2019.py +140 -0
  120. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/RACLETS_2019_WJF.py +41 -59
  121. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/RIETHOLZBACH_2011.py +34 -51
  122. disdrodb/l0/readers/PARSIVEL/EPFL/SAMOYLOV_2017.py +117 -0
  123. disdrodb/l0/readers/PARSIVEL/EPFL/SAMOYLOV_2019.py +137 -0
  124. disdrodb/l0/readers/{EPFL → PARSIVEL/EPFL}/UNIL_2022.py +42 -55
  125. disdrodb/l0/readers/PARSIVEL/GPM/IFLOODS.py +104 -0
  126. disdrodb/l0/readers/{GPM → PARSIVEL/GPM}/LPVEX.py +29 -48
  127. disdrodb/l0/readers/PARSIVEL/GPM/MC3E.py +184 -0
  128. disdrodb/l0/readers/PARSIVEL/KIT/BURKINA_FASO.py +133 -0
  129. disdrodb/l0/readers/PARSIVEL/NCAR/CCOPE_2015.py +113 -0
  130. disdrodb/l0/readers/{NCAR/VORTEX_SE_2016_P1.py → PARSIVEL/NCAR/OWLES_MIPS.py} +46 -72
  131. disdrodb/l0/readers/PARSIVEL/NCAR/PECAN_MOBILE.py +125 -0
  132. disdrodb/l0/readers/{NCAR/OWLES_MIPS.py → PARSIVEL/NCAR/PLOWS_MIPS.py} +45 -64
  133. disdrodb/l0/readers/PARSIVEL/NCAR/VORTEX2_2009.py +114 -0
  134. disdrodb/l0/readers/PARSIVEL/NCAR/VORTEX2_2010.py +176 -0
  135. disdrodb/l0/readers/PARSIVEL/NCAR/VORTEX2_2010_UF.py +183 -0
  136. disdrodb/l0/readers/PARSIVEL/SLOVENIA/UL_FGG.py +121 -0
  137. disdrodb/l0/readers/{ARM/ARM_LD.py → PARSIVEL2/ARM/ARM_PARSIVEL2.py} +27 -50
  138. disdrodb/l0/readers/PARSIVEL2/BRAZIL/CHUVA_PARSIVEL2.py +163 -0
  139. disdrodb/l0/readers/PARSIVEL2/BRAZIL/GOAMAZON_PARSIVEL2.py +163 -0
  140. disdrodb/l0/readers/{DENMARK → PARSIVEL2/DENMARK}/EROSION_nc.py +14 -35
  141. disdrodb/l0/readers/PARSIVEL2/FRANCE/ENPC_PARSIVEL2.py +189 -0
  142. disdrodb/l0/readers/PARSIVEL2/FRANCE/SIRTA_PARSIVEL2.py +119 -0
  143. disdrodb/l0/readers/PARSIVEL2/GPM/GCPEX.py +104 -0
  144. disdrodb/l0/readers/PARSIVEL2/GPM/NSSTC.py +176 -0
  145. disdrodb/l0/readers/PARSIVEL2/ITALY/GID_PARSIVEL2.py +32 -0
  146. disdrodb/l0/readers/PARSIVEL2/MEXICO/OH_IIUNAM_nc.py +56 -0
  147. disdrodb/l0/readers/PARSIVEL2/NCAR/PECAN_FP3.py +120 -0
  148. disdrodb/l0/readers/{NCAR → PARSIVEL2/NCAR}/PECAN_MIPS.py +45 -64
  149. disdrodb/l0/readers/PARSIVEL2/NCAR/RELAMPAGO_PARSIVEL2.py +181 -0
  150. disdrodb/l0/readers/PARSIVEL2/NCAR/SNOWIE_PJ.py +160 -0
  151. disdrodb/l0/readers/PARSIVEL2/NCAR/SNOWIE_SB.py +160 -0
  152. disdrodb/l0/readers/{NCAR/PLOWS_MIPS.py → PARSIVEL2/NCAR/VORTEX_SE_2016_P1.py} +49 -66
  153. disdrodb/l0/readers/PARSIVEL2/NCAR/VORTEX_SE_2016_P2.py +118 -0
  154. disdrodb/l0/readers/PARSIVEL2/NCAR/VORTEX_SE_2016_PIPS.py +152 -0
  155. disdrodb/l0/readers/PARSIVEL2/NETHERLANDS/DELFT.py +166 -0
  156. disdrodb/l0/readers/PWS100/FRANCE/ENPC_PWS100.py +150 -0
  157. disdrodb/l0/readers/{NCAR/RELAMPAGO_RD80.py → RD80/BRAZIL/CHUVA_RD80.py} +36 -60
  158. disdrodb/l0/readers/{BRAZIL → RD80/BRAZIL}/GOAMAZON_RD80.py +36 -55
  159. disdrodb/l0/readers/{NCAR → RD80/NCAR}/CINDY_2011_RD80.py +35 -54
  160. disdrodb/l0/readers/{BRAZIL/CHUVA_RD80.py → RD80/NCAR/RELAMPAGO_RD80.py} +40 -54
  161. disdrodb/l0/readers/RD80/NOAA/PSL_RD80.py +274 -0
  162. disdrodb/l0/readers/template_reader_raw_netcdf_data.py +62 -0
  163. disdrodb/l0/readers/{reader_template.py → template_reader_raw_text_data.py} +20 -44
  164. disdrodb/l0/routines.py +885 -581
  165. disdrodb/l0/standards.py +77 -238
  166. disdrodb/l0/template_tools.py +105 -110
  167. disdrodb/l1/__init__.py +17 -0
  168. disdrodb/l1/beard_model.py +716 -0
  169. disdrodb/l1/encoding_attrs.py +635 -0
  170. disdrodb/l1/fall_velocity.py +260 -0
  171. disdrodb/l1/filters.py +192 -0
  172. disdrodb/l1/processing.py +202 -0
  173. disdrodb/l1/resampling.py +236 -0
  174. disdrodb/l1/routines.py +358 -0
  175. disdrodb/l1_env/__init__.py +17 -0
  176. disdrodb/l1_env/routines.py +38 -0
  177. disdrodb/l2/__init__.py +17 -0
  178. disdrodb/l2/empirical_dsd.py +1833 -0
  179. disdrodb/l2/event.py +388 -0
  180. disdrodb/l2/processing.py +528 -0
  181. disdrodb/l2/processing_options.py +213 -0
  182. disdrodb/l2/routines.py +868 -0
  183. disdrodb/metadata/__init__.py +9 -2
  184. disdrodb/metadata/checks.py +180 -124
  185. disdrodb/metadata/download.py +81 -0
  186. disdrodb/metadata/geolocation.py +146 -0
  187. disdrodb/metadata/info.py +20 -13
  188. disdrodb/metadata/manipulation.py +3 -3
  189. disdrodb/metadata/reader.py +59 -8
  190. disdrodb/metadata/search.py +77 -144
  191. disdrodb/metadata/standards.py +83 -80
  192. disdrodb/metadata/writer.py +10 -16
  193. disdrodb/psd/__init__.py +38 -0
  194. disdrodb/psd/fitting.py +2146 -0
  195. disdrodb/psd/models.py +774 -0
  196. disdrodb/routines.py +1412 -0
  197. disdrodb/scattering/__init__.py +28 -0
  198. disdrodb/scattering/axis_ratio.py +344 -0
  199. disdrodb/scattering/routines.py +456 -0
  200. disdrodb/utils/__init__.py +17 -0
  201. disdrodb/utils/attrs.py +208 -0
  202. disdrodb/utils/cli.py +269 -0
  203. disdrodb/utils/compression.py +60 -42
  204. disdrodb/utils/dask.py +62 -0
  205. disdrodb/utils/dataframe.py +342 -0
  206. disdrodb/utils/decorators.py +110 -0
  207. disdrodb/utils/directories.py +107 -46
  208. disdrodb/utils/encoding.py +127 -0
  209. disdrodb/utils/list.py +29 -0
  210. disdrodb/utils/logger.py +168 -46
  211. disdrodb/utils/time.py +657 -0
  212. disdrodb/utils/warnings.py +30 -0
  213. disdrodb/utils/writer.py +57 -0
  214. disdrodb/utils/xarray.py +138 -47
  215. disdrodb/utils/yaml.py +0 -1
  216. disdrodb/viz/__init__.py +17 -0
  217. disdrodb/viz/plots.py +17 -0
  218. disdrodb-0.1.1.dist-info/METADATA +294 -0
  219. disdrodb-0.1.1.dist-info/RECORD +232 -0
  220. {disdrodb-0.0.21.dist-info → disdrodb-0.1.1.dist-info}/WHEEL +1 -1
  221. disdrodb-0.1.1.dist-info/entry_points.txt +30 -0
  222. disdrodb/data_transfer/scripts/disdrodb_download_archive.py +0 -53
  223. disdrodb/data_transfer/scripts/disdrodb_upload_archive.py +0 -57
  224. disdrodb/l0/configs/OTT_Parsivel/l0a_encodings.yml +0 -32
  225. disdrodb/l0/configs/OTT_Parsivel2/l0a_encodings.yml +0 -39
  226. disdrodb/l0/configs/RD_80/l0a_encodings.yml +0 -16
  227. disdrodb/l0/configs/RD_80/l0b_encodings.yml +0 -135
  228. disdrodb/l0/configs/Thies_LPM/l0a_encodings.yml +0 -80
  229. disdrodb/l0/io.py +0 -257
  230. disdrodb/l0/l0_processing.py +0 -1091
  231. disdrodb/l0/readers/AUSTRALIA/MELBOURNE_2007_OTT.py +0 -178
  232. disdrodb/l0/readers/AUSTRALIA/MELBOURNE_2007_THIES.py +0 -247
  233. disdrodb/l0/readers/BRAZIL/CHUVA_LPM.py +0 -204
  234. disdrodb/l0/readers/BRAZIL/CHUVA_OTT.py +0 -183
  235. disdrodb/l0/readers/BRAZIL/GOAMAZON_OTT.py +0 -183
  236. disdrodb/l0/readers/CHINA/CHONGQING.py +0 -131
  237. disdrodb/l0/readers/EPFL/EPFL_ROOF_2008.py +0 -128
  238. disdrodb/l0/readers/EPFL/HYMEX_LTE_SOP2.py +0 -127
  239. disdrodb/l0/readers/EPFL/HYMEX_LTE_SOP3.py +0 -129
  240. disdrodb/l0/readers/EPFL/RACLETS_2019.py +0 -158
  241. disdrodb/l0/readers/EPFL/SAMOYLOV_2017.py +0 -136
  242. disdrodb/l0/readers/EPFL/SAMOYLOV_2019.py +0 -158
  243. disdrodb/l0/readers/FRANCE/SIRTA_OTT2.py +0 -138
  244. disdrodb/l0/readers/GPM/GCPEX.py +0 -123
  245. disdrodb/l0/readers/GPM/IFLOODS.py +0 -123
  246. disdrodb/l0/readers/GPM/MC3E.py +0 -123
  247. disdrodb/l0/readers/GPM/NSSTC.py +0 -164
  248. disdrodb/l0/readers/ITALY/GID.py +0 -199
  249. disdrodb/l0/readers/MEXICO/OH_IIUNAM_nc.py +0 -92
  250. disdrodb/l0/readers/NCAR/CCOPE_2015.py +0 -133
  251. disdrodb/l0/readers/NCAR/PECAN_FP3.py +0 -137
  252. disdrodb/l0/readers/NCAR/PECAN_MOBILE.py +0 -144
  253. disdrodb/l0/readers/NCAR/RELAMPAGO_OTT.py +0 -195
  254. disdrodb/l0/readers/NCAR/SNOWIE_PJ.py +0 -172
  255. disdrodb/l0/readers/NCAR/SNOWIE_SB.py +0 -179
  256. disdrodb/l0/readers/NCAR/VORTEX2_2009.py +0 -133
  257. disdrodb/l0/readers/NCAR/VORTEX2_2010.py +0 -188
  258. disdrodb/l0/readers/NCAR/VORTEX2_2010_UF.py +0 -191
  259. disdrodb/l0/readers/NCAR/VORTEX_SE_2016_P2.py +0 -135
  260. disdrodb/l0/readers/NCAR/VORTEX_SE_2016_PIPS.py +0 -170
  261. disdrodb/l0/readers/NETHERLANDS/DELFT.py +0 -187
  262. disdrodb/l0/readers/SPAIN/SBEGUERIA.py +0 -179
  263. disdrodb/l0/scripts/disdrodb_run_l0b_concat.py +0 -93
  264. disdrodb/l0/scripts/disdrodb_run_l0b_concat_station.py +0 -85
  265. disdrodb/utils/netcdf.py +0 -452
  266. disdrodb/utils/scripts.py +0 -102
  267. disdrodb-0.0.21.dist-info/AUTHORS.md +0 -18
  268. disdrodb-0.0.21.dist-info/METADATA +0 -186
  269. disdrodb-0.0.21.dist-info/RECORD +0 -168
  270. disdrodb-0.0.21.dist-info/entry_points.txt +0 -15
  271. /disdrodb/l0/configs/{RD_80 → RD80}/bins_velocity.yml +0 -0
  272. /disdrodb/l0/manuals/{Thies_LPM.pdf → LPM.pdf} +0 -0
  273. /disdrodb/l0/manuals/{ODM_470.pdf → ODM470.pdf} +0 -0
  274. /disdrodb/l0/manuals/{OTT_Parsivel.pdf → PARSIVEL.pdf} +0 -0
  275. /disdrodb/l0/manuals/{OTT_Parsivel2.pdf → PARSIVEL2.pdf} +0 -0
  276. /disdrodb/l0/manuals/{PWS_100.pdf → PWS100.pdf} +0 -0
  277. /disdrodb/l0/manuals/{RD_80.pdf → RD80.pdf} +0 -0
  278. {disdrodb-0.0.21.dist-info → disdrodb-0.1.1.dist-info/licenses}/LICENSE +0 -0
  279. {disdrodb-0.0.21.dist-info → disdrodb-0.1.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env python3
2
+
3
+ # -----------------------------------------------------------------------------.
4
+ # Copyright (c) 2021-2023 DISDRODB developers
5
+ #
6
+ # This program is free software: you can redistribute it and/or modify
7
+ # it under the terms of the GNU General Public License as published by
8
+ # the Free Software Foundation, either version 3 of the License, or
9
+ # (at your option) any later version.
10
+ #
11
+ # This program is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
18
+ # -----------------------------------------------------------------------------.
19
+ """DISDRODB product writers."""
20
+
21
+ import os
22
+
23
+ import xarray as xr
24
+
25
+ from disdrodb.utils.attrs import set_disdrodb_attrs
26
+ from disdrodb.utils.directories import create_directory, remove_if_exists
27
+
28
+
29
+ def write_product(ds: xr.Dataset, filepath: str, product: str, force: bool = False) -> None:
30
+ """Save the xarray dataset into a NetCDF file.
31
+
32
+ Parameters
33
+ ----------
34
+ ds : xarray.Dataset
35
+ Input xarray dataset.
36
+ filepath : str
37
+ Output file path.
38
+ product: str
39
+ DISDRODB product name.
40
+ force : bool, optional
41
+ Whether to overwrite existing data.
42
+ If ``True``, overwrite existing data into destination directories.
43
+ If ``False``, raise an error if there are already data into destination directories. This is the default.
44
+ """
45
+ # Create station directory if does not exist
46
+ create_directory(os.path.dirname(filepath))
47
+
48
+ # Check if the file already exists
49
+ # - If force=True --> Remove it
50
+ # - If force=False --> Raise error
51
+ remove_if_exists(filepath, force=force)
52
+
53
+ # Update attributes
54
+ ds = set_disdrodb_attrs(ds, product=product)
55
+
56
+ # Write netcdf
57
+ ds.to_netcdf(filepath, engine="netcdf4")
disdrodb/utils/xarray.py CHANGED
@@ -16,69 +16,160 @@
16
16
  # You should have received a copy of the GNU General Public License
17
17
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
18
18
  # -----------------------------------------------------------------------------.
19
- """Xarray utility."""
20
-
21
- import pandas as pd
19
+ """Xarray utilities."""
20
+ import numpy as np
22
21
  import xarray as xr
23
22
  from xarray.core import dtypes
24
23
 
25
24
 
26
- def get_dataset_start_end_time(ds: xr.Dataset):
27
- """Retrieves dataset starting and ending time.
25
+ def xr_get_last_valid_idx(da_condition, dim, fill_value=None):
26
+ """
27
+ Get the index of the last True value along a specified dimension in an xarray DataArray.
28
+
29
+ This function finds the last index along the given dimension where the condition is True.
30
+ If all values are False or NaN along that dimension, the function returns ``fill_value``.
28
31
 
29
32
  Parameters
30
33
  ----------
31
- ds : xr.Dataset
32
- Input dataset
34
+ da_condition : xarray.DataArray
35
+ A boolean DataArray where True indicates valid or desired values.
36
+ Should have the dimension specified in `dim`.
37
+ dim : str
38
+ The name of the dimension along which to find the last True index.
39
+ fill_value : int or float
40
+ The fill value when all values are False or NaN along the specified dimension.
41
+ The default value is ``dim_size - 1``.
33
42
 
34
43
  Returns
35
44
  -------
36
- tuple
37
- (starting_time, ending_time)
45
+ last_idx : xarray.DataArray
46
+ An array containing the index of the last True value along the specified dimension.
47
+ If all values are False or NaN, the corresponding entry in `last_idx` will be NaN.
48
+
49
+ Notes
50
+ -----
51
+ The function works by reversing the DataArray along the specified dimension and using
52
+ `argmax` to find the first True value in the reversed array. It then calculates the
53
+ corresponding index in the original array. To handle cases where all values are False
54
+ or NaN (and `argmax` would return 0), the function checks if there is any True value
55
+ along the dimension and assigns NaN to `last_idx` where appropriate.
56
+
57
+ Examples
58
+ --------
59
+ >>> import xarray as xr
60
+ >>> da = xr.DataArray([[False, False, True], [False, False, False]], dims=["time", "my_dimension"])
61
+ >>> last_idx = xr_get_last_valid_idx(da, "my_dimension")
62
+ >>> print(last_idx)
63
+ <xarray.DataArray (time: 2)>
64
+ array([2., nan])
65
+ Dimensions without coordinates: time
66
+
67
+ In this example, for the first time step, the last True index is 2.
68
+ For the second time step, all values are False, so the function returns NaN.
38
69
 
39
70
  """
40
- starting_time = ds["time"].values[0]
41
- ending_time = ds["time"].values[-1]
42
- return (starting_time, ending_time)
71
+ # Check input is a boolean array
72
+ if not np.issubdtype(da_condition.dtype, np.bool_):
73
+ raise ValueError("`da_condition` must be a boolean DataArray.")
74
+
75
+ # Get the size of the 'dim' dimension
76
+ dim_size = da_condition.sizes[dim]
77
+
78
+ # Define default fillvalue
79
+ if fill_value is None:
80
+ fill_value = dim_size - 1
81
+
82
+ # Reverse the mask along 'dim'
83
+ da_condition_reversed = da_condition.isel({dim: slice(None, None, -1)})
43
84
 
85
+ # Check if there is any True value along the dimension for each slice
86
+ has_true = da_condition.any(dim=dim)
44
87
 
45
- def regularize_dataset(ds: xr.Dataset, freq: str, time_dim="time", method=None, fill_value=dtypes.NA):
88
+ # Find the first non-zero index in the reversed array
89
+ last_idx_from_end = da_condition_reversed.argmax(dim=dim)
90
+
91
+ # Calculate the last True index in the original array
92
+ last_idx = xr.where(
93
+ has_true,
94
+ dim_size - last_idx_from_end - 1,
95
+ fill_value,
96
+ )
97
+ return last_idx
98
+
99
+
100
+ def define_dataarray_fill_value(da):
101
+ """Define the fill value for a numerical xarray.DataArray."""
102
+ if np.issubdtype(da.dtype, np.floating):
103
+ return dtypes.NA
104
+ if np.issubdtype(da.dtype, np.integer):
105
+ if "_FillValue" in da.attrs:
106
+ return da.attrs["_FillValue"]
107
+ if "_FillValue" in da.encoding:
108
+ return da.encoding["_FillValue"]
109
+ return np.iinfo(da.dtype).max
110
+ return None
111
+
112
+
113
+ def define_dataarray_fill_value_dictionary(da):
114
+ """Define fill values for numerical variables and coordinates of a xarray.DataArray.
115
+
116
+ Return a dict of fill values:
117
+ - floating → NaN
118
+ - integer → ds[var].attrs["_FillValue"] if present, else np.iinfo(dtype).max
46
119
  """
47
- Regularize a dataset across time dimension with uniform resolution.
120
+ fill_value_dict = {}
121
+ # Add fill value of DataArray
122
+ fill_value_array = define_dataarray_fill_value(da)
123
+ if fill_value_array is not None:
124
+ fill_value_dict[da.name] = fill_value_array
125
+ # Add fill value of coordinates
126
+ fill_value_dict.update(define_dataset_fill_value_dictionary(da.coords))
127
+ # Return fill value dictionary
128
+ return fill_value_dict
48
129
 
49
- Parameters
50
- ----------
51
- ds : xr.Dataset
52
- DESCRIPTION.
53
- time_dim : TYPE, optional
54
- DESCRIPTION. The default is "time".
55
- freq : str
56
- The `freq` string to pass to pd.date_range to define the new time coordinates.
57
- Examples: freq="2min"
58
- time_dim : TYPE, optional
59
- The time dimension in the xr.Dataset. The default is "time".
60
- method : TYPE, optional
61
- Method to use for filling missing timesteps.
62
- If None, fill with fill_value. The default is None.
63
- For other possible methods, see https://docs.xarray.dev/en/stable/generated/xarray.Dataset.reindex.html
64
- fill_value : float, optional
65
- Fill value to fill missing timesteps. The default is dtypes.NA.
66
130
 
67
- Returns
68
- -------
69
- ds_reindexed : xr.Dataset
70
- Regularized dataset.
131
+ def define_dataset_fill_value_dictionary(ds):
132
+ """Define fill values for numerical variables and coordinates of a xarray.Dataset.
71
133
 
134
+ Return a dict of per-variable fill values:
135
+ - floating --> NaN
136
+ - integer --> ds[var].attrs["_FillValue"] if present, else the maximum allowed number.
72
137
  """
73
- start = ds[time_dim].values[0]
74
- end = ds[time_dim].values[-1]
75
- new_time_index = pd.date_range(start=pd.to_datetime(start), end=pd.to_datetime(end), freq=freq)
76
-
77
- # Regularize dataset and fill with NA values
78
- ds_reindexed = ds.reindex(
79
- {"time": new_time_index},
80
- method=method, # do not fill gaps
81
- # tolerance=tolerance, # mismatch in seconds
82
- fill_value=fill_value,
83
- )
84
- return ds_reindexed
138
+ fill_value_dict = {}
139
+ # Retrieve fill values for numerical variables and coordinates
140
+ for var in list(ds.variables):
141
+ array_fill_value = define_dataarray_fill_value(ds[var])
142
+ if array_fill_value is not None:
143
+ fill_value_dict[var] = array_fill_value
144
+ # Return fill value dictionary
145
+ return fill_value_dict
146
+
147
+
148
+ def define_fill_value_dictionary(xr_obj):
149
+ """Define fill values for numerical variables and coordinates of a xarray object.
150
+
151
+ Return a dict of per-variable fill values:
152
+ - floating --> NaN
153
+ - integer --> ds[var].attrs["_FillValue"] if present, else the maximum allowed number.
154
+ """
155
+ if isinstance(xr_obj, xr.Dataset):
156
+ return define_dataset_fill_value_dictionary(xr_obj)
157
+ return define_dataarray_fill_value_dictionary(xr_obj)
158
+
159
+
160
+ ####-----------------------------------------------------------------------------------
161
+ #### Diameter and Velocity Coordinates
162
+
163
+
164
+ def remove_diameter_coordinates(xr_obj):
165
+ """Drop diameter coordinates from xarray object."""
166
+ from disdrodb import DIAMETER_COORDS
167
+
168
+ return xr_obj.drop_vars(DIAMETER_COORDS, errors="ignore")
169
+
170
+
171
+ def remove_velocity_coordinates(xr_obj):
172
+ """Drop velocity coordinates from xarray object."""
173
+ from disdrodb import VELOCITY_COORDS
174
+
175
+ return xr_obj.drop_vars(VELOCITY_COORDS, errors="ignore")
disdrodb/utils/yaml.py CHANGED
@@ -49,4 +49,3 @@ def write_yaml(dictionary, filepath, sort_keys=False):
49
49
  """
50
50
  with open(filepath, "w") as f:
51
51
  yaml.dump(dictionary, f, sort_keys=sort_keys)
52
- return None
@@ -0,0 +1,17 @@
1
+ # -----------------------------------------------------------------------------.
2
+ # Copyright (c) 2021-2023 DISDRODB developers
3
+ #
4
+ # This program is free software: you can redistribute it and/or modify
5
+ # it under the terms of the GNU General Public License as published by
6
+ # the Free Software Foundation, either version 3 of the License, or
7
+ # (at your option) any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License
15
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
+ # -----------------------------------------------------------------------------.
17
+ """DISDRODB Visualization Module."""
disdrodb/viz/plots.py ADDED
@@ -0,0 +1,17 @@
1
+ # -----------------------------------------------------------------------------.
2
+ # Copyright (c) 2021-2023 DISDRODB developers
3
+ #
4
+ # This program is free software: you can redistribute it and/or modify
5
+ # it under the terms of the GNU General Public License as published by
6
+ # the Free Software Foundation, either version 3 of the License, or
7
+ # (at your option) any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License
15
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
+ # -----------------------------------------------------------------------------.
17
+ """DISDRODB Plotting Tools."""
@@ -0,0 +1,294 @@
1
+ Metadata-Version: 2.4
2
+ Name: disdrodb
3
+ Version: 0.1.1
4
+ Summary: disdrodb provides tools to download, standardize, share and analyze global disdrometer data.
5
+ Author: Gionata Ghiggi
6
+ Project-URL: homepage, https://github.com/ltelab/disdrodb
7
+ Project-URL: repository, https://github.com/ltelab/disdrodb
8
+ Project-URL: source, https://github.com/ltelab/disdrodb
9
+ Project-URL: tracker, https://github.com/ltelab/disdrodb/issues
10
+ Project-URL: documentation, https://disdrodb.readthedocs.io
11
+ Project-URL: changelog, https://github.com/ltelab/disdrodb/blob/main/CHANGELOG.md
12
+ Keywords: python,disdrometer,parsivel,drop size distribution
13
+ Classifier: Development Status :: 1 - Planning
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Operating System :: Unix
17
+ Classifier: Operating System :: MacOS :: MacOS X
18
+ Classifier: Operating System :: Microsoft :: Windows
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: click
23
+ Requires-Dist: tqdm
24
+ Requires-Dist: pooch
25
+ Requires-Dist: donfig
26
+ Requires-Dist: requests
27
+ Requires-Dist: PyYAML
28
+ Requires-Dist: trollsift
29
+ Requires-Dist: netCDF4
30
+ Requires-Dist: pyarrow
31
+ Requires-Dist: pandas
32
+ Requires-Dist: numpy
33
+ Requires-Dist: scipy
34
+ Requires-Dist: dask[distributed]
35
+ Requires-Dist: xarray
36
+ Provides-Extra: dev
37
+ Requires-Dist: jupyter; extra == "dev"
38
+ Requires-Dist: pre-commit; extra == "dev"
39
+ Requires-Dist: pytest; extra == "dev"
40
+ Requires-Dist: pydantic>=2.0.0; extra == "dev"
41
+ Requires-Dist: pytest-cov; extra == "dev"
42
+ Requires-Dist: pytest-mock; extra == "dev"
43
+ Requires-Dist: requests-mock; extra == "dev"
44
+ Requires-Dist: setuptools; extra == "dev"
45
+ Requires-Dist: build; extra == "dev"
46
+ Requires-Dist: twine; extra == "dev"
47
+ Requires-Dist: loghub; extra == "dev"
48
+ Dynamic: license-file
49
+
50
+ # 📦 DISDRODB - A package to standardize, process and analyze global disdrometer data
51
+
52
+ | | |
53
+ | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
54
+ | Deployment | [![PyPI](https://badge.fury.io/py/disdrodb.svg?style=flat)](https://pypi.org/project/disdrodb/) [![Conda](https://img.shields.io/conda/vn/conda-forge/disdrodb.svg?logo=conda-forge&logoColor=white&style=flat)](https://anaconda.org/conda-forge/disdrodb) |
55
+ | Activity | [![PyPI Downloads](https://img.shields.io/pypi/dm/disdrodb.svg?label=PyPI%20downloads&style=flat)](https://pypi.org/project/disdrodb/) [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/disdrodb.svg?label=Conda%20downloads&style=flat)](https://anaconda.org/conda-forge/disdrodb) |
56
+ | Python Versions | [![Python Versions](https://img.shields.io/badge/Python-3.10%20%203.11%20%203.12-blue?style=flat)](https://www.python.org/downloads/) |
57
+ | Supported Systems | [![Linux](https://img.shields.io/github/actions/workflow/status/ltelab/disdrodb/.github/workflows/tests.yml?label=Linux&style=flat)](https://github.com/ltelab/disdrodb/actions/workflows/tests.yml) [![macOS](https://img.shields.io/github/actions/workflow/status/ltelab/disdrodb/.github/workflows/tests.yml?label=macOS&style=flat)](https://github.com/ltelab/disdrodb/actions/workflows/tests.yml) [![Windows](https://img.shields.io/github/actions/workflow/status/ltelab/disdrodb/.github/workflows/tests_windows.yml?label=Windows&style=flat)](https://github.com/ltelab/disdrodb/actions/workflows/tests_windows.yml) |
58
+ | Project Status | [![Project Status](https://www.repostatus.org/badges/latest/active.svg?style=flat)](https://www.repostatus.org/#active) |
59
+ | Build Status | [![Tests](https://github.com/ltelab/disdrodb/actions/workflows/tests.yml/badge.svg?style=flat)](https://github.com/ltelab/disdrodb/actions/workflows/tests.yml) [![Lint](https://github.com/ltelab/disdrodb/actions/workflows/lint.yml/badge.svg?style=flat)](https://github.com/ltelab/disdrodb/actions/workflows/lint.yml) [![Docs](https://readthedocs.org/projects/disdrodb/badge/?version=latest&style=flat)](https://disdrodb.readthedocs.io/en/latest/) |
60
+ | Linting | [![Black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat)](https://github.com/psf/black) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&style=flat)](https://github.com/astral-sh/ruff) [![Codespell](https://img.shields.io/badge/Codespell-enabled-brightgreen?style=flat)](https://github.com/codespell-project/codespell) |
61
+ | Code Coverage | [![Coveralls](https://coveralls.io/repos/github/ltelab/disdrodb/badge.svg?branch=main&style=flat)](https://coveralls.io/github/ltelab/disdrodb?branch=main) [![Codecov](https://codecov.io/gh/ltelab/disdrodb/branch/main/graph/badge.svg?style=flat)](https://codecov.io/gh/ltelab/disdrodb) |
62
+ | Code Quality | [![Codefactor](https://www.codefactor.io/repository/github/ltelab/disdrodb/badge?style=flat)](https://www.codefactor.io/repository/github/ltelab/disdrodb) [![Codebeat](https://codebeat.co/badges/14ff831b-f064-4bdd-a2e2-72ffdf28a35a?style=flat)](https://codebeat.co/projects/github-com-ltelab-disdrodb-main) [![Codacy](https://app.codacy.com/project/badge/Grade/d823c50a7ad14268bd347b5aba384623?style=flat)](https://app.codacy.com/gh/ltelab/disdrodb/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [![Codescene](https://codescene.io/projects/36773/status-badges/code-health?style=flat)](https://codescene.io/projects/36773) |
63
+ | License | [![License](https://img.shields.io/github/license/ltelab/disdrodb?style=flat)](https://github.com/ltelab/disdrodb/blob/main/LICENSE) |
64
+ | Community | [![Slack](https://img.shields.io/badge/Slack-disdrodb-green.svg?logo=slack&style=flat)](https://join.slack.com/t/disdrodbworkspace/shared_invite/zt-25l4mvgo7-cfBdXalzlWGd4Pt7H~FqoA) [![GitHub Discussions](https://img.shields.io/badge/GitHub-Discussions-green?logo=github&style=flat)](https://github.com/ltelab/disdrodb/discussions) |
65
+ | Citation | [![DOI](https://zenodo.org/badge/429018433.svg?style=flat)](https://zenodo.org/doi/10.5281/zenodo.7680581) |
66
+
67
+ [**Slack**](https://join.slack.com/t/disdrodbworkspace/shared_invite/zt-25l4mvgo7-cfBdXalzlWGd4Pt7H~FqoA) | [**Documentation**](https://disdrodb.readthedocs.io/en/latest/)
68
+
69
+ DISDRODB is part of an international joint effort to index, collect and homogenize drop size distribution (DSD) data from around the world.
70
+
71
+ The DISDRODB project also aims to establish a global standard for sharing disdrometer observations.
72
+ Built on FAIR data principles and Climate & Forecast (CF) conventions, DISDRODB standards facilitate the processing, analysis and visualization of disdrometer data.
73
+
74
+ ## ℹ️ Software Overview
75
+
76
+ The software enables you to:
77
+
78
+ - Upload raw data of new disdrometer stations to the DISDRODB Decentralized Data Archive
79
+
80
+ - Download the raw disdrometer data from stations included in the DISDRODB Decentralized Data Archive
81
+
82
+ - Convert raw disdrometer data into a standard NetCDF format (DISDRODB L0 product)
83
+
84
+ - Generate standardized, homogenized, and quality-checked disdrometer measurements (DISDRODB L1 product)
85
+
86
+ - Compute empirical and model-based drop size distribution parameters and derive geophysical and polarimetric radar variables of interest (DISDRODB L2 product)
87
+
88
+ Currently, the DISDRODB Working Group is finalizing the development of the L1 and L2 scientific products.
89
+ If you have ideas, algorithms, data, or expertise to share, or you want to contribute to the future DISDRODB products, do not hesitate to get in touch!!!
90
+
91
+ Join the [**DISDRODB Slack Workspace**](https://join.slack.com/t/disdrodbworkspace/shared_invite/zt-25l4mvgo7-cfBdXalzlWGd4Pt7H~FqoA) to meet the DISDRODB Community!
92
+
93
+ ## 🚀 Quick Start
94
+
95
+ Create your own DISDRODB Local Data Archive.
96
+
97
+ ### 📚 Download the DISDRODB Metadata Archive
98
+
99
+ The DISDRODB Metadata Archive is a collection of metadata files that describe the disdrometer stations included in DISDRODB.
100
+
101
+ To download the DISDRODB Metadata Archive, navigate to the desired directory and run:
102
+
103
+ ```bash
104
+ git clone https://github.com/ltelab/DISDRODB-METADATA.git
105
+ ```
106
+
107
+ Or download a static snapshot without using git:
108
+
109
+ ```bash
110
+ disdrodb_download_metadata_archive /path/to/DISDRODB-METADATA
111
+ ```
112
+
113
+ ### 📚 Define the DISDRODB Configuration File
114
+
115
+ The disdrodb software requires to know two directories:
116
+
117
+ - `metadata_archive_dir`: the base of your local DISDRODB Metadata Archive
118
+ - `data_archive_dir`: the base of your local DISDRODB Data Archive
119
+
120
+ On Windows, paths must end with `\DISDRODB`; on macOS/Linux, they must end with `/DISDRODB`.
121
+
122
+ ```python
123
+ import disdrodb
124
+
125
+ metadata_archive_dir = "/<path_to>/DISDRODB-METADATA/DISDRODB"
126
+ data_archive_dir = "/<path_to>/DISDRODB"
127
+ disdrodb.define_configs(
128
+ metadata_archive_dir=metadata_archive_dir, data_archive_dir=data_archive_dir
129
+ )
130
+ ```
131
+
132
+ This creates a `.config_disdrodb.yml` file in your home directory (e.g., `~/.config_disdrodb.yml`).
133
+
134
+ To verify the configuration, open a new Python session and run:
135
+
136
+ ```python
137
+ import disdrodb
138
+
139
+ print("Metadata Archive Directory:", disdrodb.get_metadata_archive_dir())
140
+ print("Data Archive Directory:", disdrodb.get_data_archive_dir())
141
+ ```
142
+
143
+ Or in the shell:
144
+
145
+ ```bash
146
+ disdrodb_metadata_archive_directory
147
+ disdrodb_data_archive_directory
148
+ ```
149
+
150
+ ### 📥 Download the DISDRODB Raw Data Archive
151
+
152
+ To download all data stored into the DISDRODB Decentralized Data Archive,
153
+ you just have to run the following command:
154
+
155
+ ```bash
156
+ disdrodb_download_archive
157
+ ```
158
+
159
+ To download from a specific source (e.g., EPFL):
160
+
161
+ ```bash
162
+ disdrodb_download_archive --data-sources EPFL
163
+ ```
164
+
165
+ Type `disdrodb_download_archive --help` to see further options.
166
+
167
+ To open the local DISDRODB Data Archive directory, type:
168
+
169
+ ```bash
170
+ disdrodb_open_data_archive
171
+ ```
172
+
173
+ ### 💫 Transform Raw Data to Standardized netCDFs
174
+
175
+ If you want to convert all stations raw data into standardized netCDF4 files, run the following command in the terminal:
176
+
177
+ ```bash
178
+ disdrodb_run_l0
179
+ ```
180
+
181
+ Type `disdrodb_run_l0 --help` to see further options.
182
+
183
+ ### 💫 Generate DISDRODB L1 and p2 products
184
+
185
+ To generate DISDRODB L1 and L2 products, run the following commands in the terminal:
186
+
187
+ ```bash
188
+ disdrodb_run_l1
189
+ disdrodb_run_l2e
190
+ disdrodb_run_l2m
191
+ ```
192
+
193
+ ### 💫 Analyze Analysis‐Ready Products
194
+
195
+ The software’s `open_dataset` function **lazily** opens all station files of a given product:
196
+
197
+ ```python
198
+ import disdrodb
199
+
200
+ ds = disdrodb.open_dataset(
201
+ product="L0C",
202
+ data_source="EPFL",
203
+ campaign_name="HYMEX_LTE_SOP3",
204
+ station_name="10",
205
+ )
206
+ ds
207
+ ```
208
+
209
+ This allows you to jump directly into analyzing disdrometer data without worrying about processing steps.
210
+
211
+ ### 💫 Explore the DISDRODB Metadata Archive
212
+
213
+ To explore the DISDRODB Metadata Archive, you can type into the terminal:
214
+
215
+ ```bash
216
+ disdrodb_open_metadata_archive
217
+ ```
218
+
219
+ If you wish to analyze the DISDRODB Metadata Archive information of all stations,
220
+ the `read_metadata_archive` python function returns all stations metadata information into an easy to analyze `pandas.DataFrame`:
221
+
222
+ ```python
223
+ import disdrodb
224
+
225
+ df = disdrodb.read_metadata_archive()
226
+ print(df)
227
+ ```
228
+
229
+ ## 📖 Explore the DISDRODB documentation
230
+
231
+ With this introduction, we just scratched the surface of the disdrodb software capabilities.
232
+ To discover more about the DISDRODB products, the download and processing options, or how to contribute your own data to DISDRODB,
233
+ please read the software documentation available at [https://disdrodb.readthedocs.io/en/latest/](https://disdrodb.readthedocs.io/en/latest/).
234
+
235
+ ## 🛠️ Installation
236
+
237
+ ### conda
238
+
239
+ DISDRODB can be installed via [conda][conda_link] on Linux, Mac, and Windows.
240
+ Install the package by typing the following command in the terminal:
241
+
242
+ ```bash
243
+ conda install disdrodb
244
+ ```
245
+
246
+ In case conda-forge is not set up for your system yet, see the easy to follow instructions on [conda-forge][conda_forge_link].
247
+
248
+ ### pip
249
+
250
+ DISDRODB can be installed also via [pip][pip_link] on Linux, Mac, and Windows.
251
+ On Windows you can install [WinPython][winpy_link] to get Python and pip running.
252
+
253
+ Then, install the DISDRODB package by typing the following command in the terminal:
254
+
255
+ ```bash
256
+ pip install disdrodb
257
+ ```
258
+
259
+ To install the latest development version via pip, see the [documentation][dev_install_link].
260
+
261
+ ## 💭 Feedback and Contributing Guidelines
262
+
263
+ If you aim to contribute your data or discuss the future development of DISDRODB,
264
+ we highly recommend to join the [**DISDRODB Slack Workspace**](https://join.slack.com/t/disdrodbworkspace/shared_invite/zt-25l4mvgo7-cfBdXalzlWGd4Pt7H~FqoA)
265
+
266
+ Feel free to also open a [GitHub Issue](https://github.com/ltelab/disdrodb/issues) or a
267
+ [GitHub Discussion](https://github.com/ltelab/disdrodb/discussions) specific to your questions or ideas.
268
+
269
+ ## ✍️ Contributors
270
+
271
+ - [Gionata Ghiggi](https://people.epfl.ch/gionata.ghiggi)
272
+ - [Kim Candolfi](https://github.com/KimCandolfi)
273
+ - [Régis Longchamp](https://people.epfl.ch/regis.longchamp)
274
+ - [Charlotte Gisèle Weil](https://people.epfl.ch/charlotte.weil)
275
+ - [Jacopo Grazioli](https://people.epfl.ch/jacopo.grazioli)
276
+ - [Alexis Berne](https://people.epfl.ch/alexis.berne?lang=en)
277
+
278
+ ## Citation
279
+
280
+ You can cite the DISDRODB software by:
281
+
282
+ > Gionata Ghiggi, Kim Candolfi, Régis Longchamp, Charlotte Weil, Alexis Berne (2023). ltelab/disdrodb Zenodo. https://doi.org/10.5281/zenodo.7680581
283
+
284
+ If you want to cite a specific version, have a look at the [Zenodo site](https://doi.org/10.5281/zenodo.7680581)
285
+
286
+ ## License
287
+
288
+ The content of this repository is released under the terms of the [GPL 3.0 license](LICENSE).
289
+
290
+ [conda_forge_link]: https://github.com/conda-forge/disdrodb-feedstock#installing-disdrodb
291
+ [conda_link]: https://docs.conda.io/en/latest/miniconda.html
292
+ [dev_install_link]: https://disdrodb.readthedocs.io/en/latest/installation.html#installation-for-contributors
293
+ [pip_link]: https://pypi.org/project/disdrodb
294
+ [winpy_link]: https://winpython.github.io/