disdrodb 0.1.1__tar.gz → 0.1.2__tar.gz

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 (256) hide show
  1. {disdrodb-0.1.1/disdrodb.egg-info → disdrodb-0.1.2}/PKG-INFO +1 -1
  2. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/_version.py +2 -2
  3. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/data_transfer/download_data.py +145 -14
  4. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/LPM/bins_diameter.yml +3 -3
  5. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PARSIVEL2/l0a_encodings.yml +4 -0
  6. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PARSIVEL2/l0b_cf_attrs.yml +16 -0
  7. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PARSIVEL2/l0b_encodings.yml +41 -0
  8. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PARSIVEL2/raw_data_format.yml +40 -0
  9. disdrodb-0.1.2/disdrodb/l0/manuals/SWS250.pdf +0 -0
  10. disdrodb-0.1.2/disdrodb/l0/manuals/VPF730.pdf +0 -0
  11. disdrodb-0.1.2/disdrodb/l0/manuals/VPF750.pdf +0 -0
  12. disdrodb-0.1.2/disdrodb/l0/readers/PARSIVEL/GPM/PIERS.py +107 -0
  13. disdrodb-0.1.2/disdrodb/l0/readers/PARSIVEL/JAPAN/JMA.py +125 -0
  14. disdrodb-0.1.2/disdrodb/l0/readers/PARSIVEL2/NCAR/FARM_PARSIVEL2.py +138 -0
  15. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/NCAR/VORTEX_SE_2016_PIPS.py +9 -0
  16. disdrodb-0.1.2/disdrodb/l0/readers/PARSIVEL2/NETHERLANDS/DELFT_NC.py +67 -0
  17. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/RD80/NOAA/PSL_RD80.py +31 -14
  18. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l1/encoding_attrs.py +9 -2
  19. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l1/routines.py +8 -7
  20. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/dataframe.py +2 -2
  21. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/directories.py +14 -2
  22. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/xarray.py +83 -0
  23. {disdrodb-0.1.1 → disdrodb-0.1.2/disdrodb.egg-info}/PKG-INFO +1 -1
  24. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb.egg-info/SOURCES.txt +8 -1
  25. {disdrodb-0.1.1 → disdrodb-0.1.2}/.codebeatignore +0 -0
  26. {disdrodb-0.1.1 → disdrodb-0.1.2}/.coveragerc +0 -0
  27. {disdrodb-0.1.1 → disdrodb-0.1.2}/.gitignore +0 -0
  28. {disdrodb-0.1.1 → disdrodb-0.1.2}/.pre-commit-config.yaml +0 -0
  29. {disdrodb-0.1.1 → disdrodb-0.1.2}/.readthedocs.yaml +0 -0
  30. {disdrodb-0.1.1 → disdrodb-0.1.2}/AUTHORS.md +0 -0
  31. {disdrodb-0.1.1 → disdrodb-0.1.2}/CHANGELOG.md +0 -0
  32. {disdrodb-0.1.1 → disdrodb-0.1.2}/CODE_OF_CONDUCT.md +0 -0
  33. {disdrodb-0.1.1 → disdrodb-0.1.2}/CONTRIBUTING.rst +0 -0
  34. {disdrodb-0.1.1 → disdrodb-0.1.2}/LICENSE +0 -0
  35. {disdrodb-0.1.1 → disdrodb-0.1.2}/MANIFEST.in +0 -0
  36. {disdrodb-0.1.1 → disdrodb-0.1.2}/Makefile +0 -0
  37. {disdrodb-0.1.1 → disdrodb-0.1.2}/README.md +0 -0
  38. {disdrodb-0.1.1 → disdrodb-0.1.2}/SECURITY.md +0 -0
  39. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/__init__.py +0 -0
  40. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/_config.py +0 -0
  41. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/api/__init__.py +0 -0
  42. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/api/checks.py +0 -0
  43. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/api/configs.py +0 -0
  44. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/api/create_directories.py +0 -0
  45. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/api/info.py +0 -0
  46. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/api/io.py +0 -0
  47. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/api/path.py +0 -0
  48. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/api/search.py +0 -0
  49. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_check_metadata_archive.py +0 -0
  50. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_data_archive_directory.py +0 -0
  51. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_download_archive.py +0 -0
  52. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_download_metadata_archive.py +0 -0
  53. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_download_station.py +0 -0
  54. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_initialize_station.py +0 -0
  55. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_metadata_archive_directory.py +0 -0
  56. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_open_data_archive.py +0 -0
  57. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_open_logs_directory.py +0 -0
  58. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_open_metadata_archive.py +0 -0
  59. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_open_metadata_directory.py +0 -0
  60. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_open_product_directory.py +0 -0
  61. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_open_readers_directory.py +0 -0
  62. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_run_l0.py +0 -0
  63. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_run_l0_station.py +0 -0
  64. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_run_l0a.py +0 -0
  65. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_run_l0a_station.py +0 -0
  66. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_run_l0b.py +0 -0
  67. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_run_l0b_station.py +0 -0
  68. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_run_l0c.py +0 -0
  69. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_run_l0c_station.py +0 -0
  70. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_run_l1.py +0 -0
  71. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_run_l1_station.py +0 -0
  72. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_run_l2e.py +0 -0
  73. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_run_l2e_station.py +0 -0
  74. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_run_l2m.py +0 -0
  75. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_run_l2m_station.py +0 -0
  76. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_upload_archive.py +0 -0
  77. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/cli/disdrodb_upload_station.py +0 -0
  78. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/configs.py +0 -0
  79. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/data_transfer/__init__.py +0 -0
  80. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/data_transfer/upload_data.py +0 -0
  81. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/data_transfer/zenodo.py +0 -0
  82. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/docs.py +0 -0
  83. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/issue/__init__.py +0 -0
  84. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/issue/checks.py +0 -0
  85. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/issue/reader.py +0 -0
  86. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/issue/writer.py +0 -0
  87. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/__init__.py +0 -0
  88. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/check_configs.py +0 -0
  89. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/check_standards.py +0 -0
  90. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/LPM/bins_velocity.yml +0 -0
  91. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/LPM/l0a_encodings.yml +0 -0
  92. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/LPM/l0b_cf_attrs.yml +0 -0
  93. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/LPM/l0b_encodings.yml +0 -0
  94. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/LPM/raw_data_format.yml +0 -0
  95. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PARSIVEL/bins_diameter.yml +0 -0
  96. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PARSIVEL/bins_velocity.yml +0 -0
  97. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PARSIVEL/l0a_encodings.yml +0 -0
  98. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PARSIVEL/l0b_cf_attrs.yml +0 -0
  99. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PARSIVEL/l0b_encodings.yml +0 -0
  100. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PARSIVEL/raw_data_format.yml +0 -0
  101. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PARSIVEL2/bins_diameter.yml +0 -0
  102. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PARSIVEL2/bins_velocity.yml +0 -0
  103. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PWS100/bins_diameter.yml +0 -0
  104. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PWS100/bins_velocity.yml +0 -0
  105. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PWS100/l0a_encodings.yml +0 -0
  106. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PWS100/l0b_cf_attrs.yml +0 -0
  107. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PWS100/l0b_encodings.yml +0 -0
  108. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/PWS100/raw_data_format.yml +0 -0
  109. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/RD80/bins_diameter.yml +0 -0
  110. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/RD80/bins_velocity.yml +0 -0
  111. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/RD80/l0a_encodings.yml +0 -0
  112. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/RD80/l0b_cf_attrs.yml +0 -0
  113. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/RD80/l0b_encodings.yml +0 -0
  114. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/configs/RD80/raw_data_format.yml +0 -0
  115. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/l0_reader.py +0 -0
  116. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/l0a_processing.py +0 -0
  117. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/l0b_nc_processing.py +0 -0
  118. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/l0b_processing.py +0 -0
  119. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/l0c_processing.py +0 -0
  120. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/manuals/LPM.pdf +0 -0
  121. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/manuals/ODM470.pdf +0 -0
  122. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/manuals/PARSIVEL.pdf +0 -0
  123. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/manuals/PARSIVEL2.pdf +0 -0
  124. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/manuals/PWS100.pdf +0 -0
  125. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/manuals/RD80.pdf +0 -0
  126. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/LPM/ARM/ARM_LPM.py +0 -0
  127. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/LPM/AUSTRALIA/MELBOURNE_2007_LPM.py +0 -0
  128. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/LPM/BRAZIL/CHUVA_LPM.py +0 -0
  129. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/LPM/BRAZIL/GOAMAZON_LPM.py +0 -0
  130. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/LPM/ITALY/GID_LPM.py +0 -0
  131. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/LPM/ITALY/GID_LPM_W.py +0 -0
  132. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/LPM/KIT/CHWALA.py +0 -0
  133. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/LPM/SLOVENIA/ARSO.py +0 -0
  134. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/LPM/SLOVENIA/CRNI_VRH.py +0 -0
  135. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/LPM/UK/DIVEN.py +0 -0
  136. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/AUSTRALIA/MELBOURNE_2007_PARSIVEL.py +0 -0
  137. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/CHINA/CHONGQING.py +0 -0
  138. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/ARCTIC_2021.py +0 -0
  139. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/COMMON_2011.py +0 -0
  140. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/DAVOS_2009_2011.py +0 -0
  141. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/EPFL_2009.py +0 -0
  142. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/EPFL_ROOF_2008.py +0 -0
  143. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/EPFL_ROOF_2010.py +0 -0
  144. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/EPFL_ROOF_2011.py +0 -0
  145. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/EPFL_ROOF_2012.py +0 -0
  146. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/GENEPI_2007.py +0 -0
  147. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/GRAND_ST_BERNARD_2007.py +0 -0
  148. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/GRAND_ST_BERNARD_2007_2.py +0 -0
  149. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/HPICONET_2010.py +0 -0
  150. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/HYMEX_LTE_SOP2.py +0 -0
  151. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/HYMEX_LTE_SOP3.py +0 -0
  152. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/HYMEX_LTE_SOP4.py +0 -0
  153. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/LOCARNO_2018.py +0 -0
  154. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/LOCARNO_2019.py +0 -0
  155. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/PARADISO_2014.py +0 -0
  156. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/PARSIVEL_2007.py +0 -0
  157. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/PLATO_2019.py +0 -0
  158. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/RACLETS_2019.py +0 -0
  159. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/RACLETS_2019_WJF.py +0 -0
  160. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/RIETHOLZBACH_2011.py +0 -0
  161. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/SAMOYLOV_2017.py +0 -0
  162. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/SAMOYLOV_2019.py +0 -0
  163. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/EPFL/UNIL_2022.py +0 -0
  164. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/GPM/IFLOODS.py +0 -0
  165. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/GPM/LPVEX.py +0 -0
  166. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/GPM/MC3E.py +0 -0
  167. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/NCAR/CCOPE_2015.py +0 -0
  168. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/NCAR/OWLES_MIPS.py +0 -0
  169. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/NCAR/PECAN_MOBILE.py +0 -0
  170. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/NCAR/PLOWS_MIPS.py +0 -0
  171. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/NCAR/VORTEX2_2009.py +0 -0
  172. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/NCAR/VORTEX2_2010.py +0 -0
  173. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/NCAR/VORTEX2_2010_UF.py +0 -0
  174. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL/SLOVENIA/UL_FGG.py +0 -0
  175. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/ARM/ARM_PARSIVEL2.py +0 -0
  176. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/BRAZIL/CHUVA_PARSIVEL2.py +0 -0
  177. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/BRAZIL/GOAMAZON_PARSIVEL2.py +0 -0
  178. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/DENMARK/EROSION_nc.py +0 -0
  179. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/FRANCE/ENPC_PARSIVEL2.py +0 -0
  180. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/FRANCE/SIRTA_PARSIVEL2.py +0 -0
  181. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/GPM/GCPEX.py +0 -0
  182. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/GPM/NSSTC.py +0 -0
  183. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/ITALY/GID_PARSIVEL2.py +0 -0
  184. {disdrodb-0.1.1/disdrodb/l0/readers/PARSIVEL → disdrodb-0.1.2/disdrodb/l0/readers/PARSIVEL2}/KIT/BURKINA_FASO.py +0 -0
  185. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/MEXICO/OH_IIUNAM_nc.py +0 -0
  186. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/NCAR/PECAN_FP3.py +0 -0
  187. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/NCAR/PECAN_MIPS.py +0 -0
  188. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/NCAR/RELAMPAGO_PARSIVEL2.py +0 -0
  189. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/NCAR/SNOWIE_PJ.py +0 -0
  190. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/NCAR/SNOWIE_SB.py +0 -0
  191. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/NCAR/VORTEX_SE_2016_P1.py +0 -0
  192. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/NCAR/VORTEX_SE_2016_P2.py +0 -0
  193. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PARSIVEL2/NETHERLANDS/DELFT.py +0 -0
  194. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/PWS100/FRANCE/ENPC_PWS100.py +0 -0
  195. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/RD80/BRAZIL/CHUVA_RD80.py +0 -0
  196. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/RD80/BRAZIL/GOAMAZON_RD80.py +0 -0
  197. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/RD80/NCAR/CINDY_2011_RD80.py +0 -0
  198. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/RD80/NCAR/RELAMPAGO_RD80.py +0 -0
  199. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/__init__.py +0 -0
  200. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/template_reader_raw_netcdf_data.py +0 -0
  201. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/readers/template_reader_raw_text_data.py +0 -0
  202. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/routines.py +0 -0
  203. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/standards.py +0 -0
  204. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l0/template_tools.py +0 -0
  205. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l1/__init__.py +0 -0
  206. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l1/beard_model.py +0 -0
  207. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l1/fall_velocity.py +0 -0
  208. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l1/filters.py +0 -0
  209. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l1/processing.py +0 -0
  210. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l1/resampling.py +0 -0
  211. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l1_env/__init__.py +0 -0
  212. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l1_env/routines.py +0 -0
  213. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l2/__init__.py +0 -0
  214. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l2/empirical_dsd.py +0 -0
  215. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l2/event.py +0 -0
  216. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l2/processing.py +0 -0
  217. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l2/processing_options.py +0 -0
  218. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/l2/routines.py +0 -0
  219. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/metadata/__init__.py +0 -0
  220. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/metadata/checks.py +0 -0
  221. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/metadata/download.py +0 -0
  222. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/metadata/geolocation.py +0 -0
  223. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/metadata/info.py +0 -0
  224. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/metadata/manipulation.py +0 -0
  225. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/metadata/reader.py +0 -0
  226. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/metadata/search.py +0 -0
  227. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/metadata/standards.py +0 -0
  228. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/metadata/writer.py +0 -0
  229. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/psd/__init__.py +0 -0
  230. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/psd/fitting.py +0 -0
  231. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/psd/models.py +0 -0
  232. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/routines.py +0 -0
  233. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/scattering/__init__.py +0 -0
  234. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/scattering/axis_ratio.py +0 -0
  235. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/scattering/routines.py +0 -0
  236. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/__init__.py +0 -0
  237. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/attrs.py +0 -0
  238. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/cli.py +0 -0
  239. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/compression.py +0 -0
  240. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/dask.py +0 -0
  241. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/decorators.py +0 -0
  242. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/encoding.py +0 -0
  243. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/list.py +0 -0
  244. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/logger.py +0 -0
  245. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/time.py +0 -0
  246. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/warnings.py +0 -0
  247. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/writer.py +0 -0
  248. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/utils/yaml.py +0 -0
  249. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/viz/__init__.py +0 -0
  250. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb/viz/plots.py +0 -0
  251. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb.egg-info/dependency_links.txt +0 -0
  252. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb.egg-info/entry_points.txt +0 -0
  253. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb.egg-info/requires.txt +0 -0
  254. {disdrodb-0.1.1 → disdrodb-0.1.2}/disdrodb.egg-info/top_level.txt +0 -0
  255. {disdrodb-0.1.1 → disdrodb-0.1.2}/pyproject.toml +0 -0
  256. {disdrodb-0.1.1 → disdrodb-0.1.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: disdrodb
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: disdrodb provides tools to download, standardize, share and analyze global disdrometer data.
5
5
  Author: Gionata Ghiggi
6
6
  Project-URL: homepage, https://github.com/ltelab/disdrodb
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.1.1'
21
- __version_tuple__ = version_tuple = (0, 1, 1)
20
+ __version__ = version = '0.1.2'
21
+ __version_tuple__ = version_tuple = (0, 1, 2)
@@ -21,6 +21,8 @@
21
21
  import logging
22
22
  import os
23
23
  import shutil
24
+ import subprocess
25
+ import urllib.parse
24
26
  from typing import Optional, Union
25
27
 
26
28
  import click
@@ -213,7 +215,7 @@ def download_station(
213
215
  check_exists=True,
214
216
  )
215
217
  # Download data
216
- _download_station_data(metadata_filepath, data_archive_dir=data_archive_dir, force=force)
218
+ download_station_data(metadata_filepath, data_archive_dir=data_archive_dir, force=force)
217
219
 
218
220
 
219
221
  def _is_valid_disdrodb_data_url(disdrodb_data_url):
@@ -228,13 +230,25 @@ def _extract_station_files(zip_filepath, station_dir):
228
230
  os.remove(zip_filepath)
229
231
 
230
232
 
231
- def _download_station_data(metadata_filepath: str, data_archive_dir: str, force: bool = False) -> None:
233
+ def check_consistent_station_name(metadata_filepath, station_name):
234
+ """Check consistent station_name between YAML file name and metadata key."""
235
+ # Check consistent station name
236
+ expected_station_name = os.path.basename(metadata_filepath).replace(".yml", "")
237
+ if station_name and str(station_name) != str(expected_station_name):
238
+ raise ValueError(f"Inconsistent station_name values in the {metadata_filepath} file. Download aborted.")
239
+ return station_name
240
+
241
+
242
+ def download_station_data(metadata_filepath: str, data_archive_dir: str, force: bool = False) -> None:
232
243
  """Download and unzip the station data .
233
244
 
234
245
  Parameters
235
246
  ----------
236
247
  metadata_filepaths : str
237
248
  Metadata file path.
249
+ data_archive_dir : str (optional)
250
+ DISDRODB Data Archive directory. Format: ``<...>/DISDRODB``.
251
+ If ``None`` (the default), the disdrodb config variable ``data_archive_dir`` is used.
238
252
  force : bool, optional
239
253
  If ``True``, delete existing files and redownload it. The default value is ``False``.
240
254
 
@@ -247,7 +261,7 @@ def _download_station_data(metadata_filepath: str, data_archive_dir: str, force:
247
261
  campaign_name = metadata_dict["campaign_name"]
248
262
  station_name = metadata_dict["station_name"]
249
263
  station_name = check_consistent_station_name(metadata_filepath, station_name)
250
- # Define the destination local filepath path
264
+ # Define the path to the station RAW data directory
251
265
  station_dir = define_station_dir(
252
266
  data_archive_dir=data_archive_dir,
253
267
  data_source=data_source,
@@ -259,19 +273,136 @@ def _download_station_data(metadata_filepath: str, data_archive_dir: str, force:
259
273
  disdrodb_data_url = metadata_dict.get("disdrodb_data_url", None)
260
274
  if not _is_valid_disdrodb_data_url(disdrodb_data_url):
261
275
  raise ValueError(f"Invalid disdrodb_data_url '{disdrodb_data_url}' for station {station_name}")
262
- # Download file
263
- zip_filepath = _download_file_from_url(disdrodb_data_url, dst_dir=station_dir, force=force)
264
- # Extract the stations files from the downloaded station.zip file
265
- _extract_station_files(zip_filepath, station_dir=station_dir)
266
276
 
277
+ # Download files
278
+ # - Option 1: Zip file from Zenodo containing all station raw data
279
+ if disdrodb_data_url.startswith("https://zenodo.org/"):
280
+ download_zenodo_zip_file(url=disdrodb_data_url, dst_dir=station_dir, force=force)
281
+ # - Option 2: Recursive download from a web server via HTTP or HTTPS.
282
+ elif disdrodb_data_url.startswith("http"):
283
+ download_web_server_data(url=disdrodb_data_url, dst_dir=station_dir, force=force, verbose=True)
284
+ else:
285
+ raise NotImplementedError(f"Open a GitHub Issue to enable the download of data from {disdrodb_data_url}.")
267
286
 
268
- def check_consistent_station_name(metadata_filepath, station_name):
269
- """Check consistent station_name between YAML file name and metadata key."""
270
- # Check consistent station name
271
- expected_station_name = os.path.basename(metadata_filepath).replace(".yml", "")
272
- if station_name and str(station_name) != str(expected_station_name):
273
- raise ValueError(f"Inconsistent station_name values in the {metadata_filepath} file. Download aborted.")
274
- return station_name
287
+
288
+ ####-----------------------------------------------------------------------------------------.
289
+ #### Download from Web Server via HTTP or HTTPS
290
+
291
+
292
+ def download_web_server_data(url: str, dst_dir: str, force=True, verbose=True) -> None:
293
+ """Download data from a web server via HTTP or HTTPS.
294
+
295
+ Use the system's wget command to recursively download all files and subdirectories
296
+ under the given HTTPS “directory” URL. Works on both Windows and Linux, provided
297
+ that wget is installed and on the PATH.
298
+
299
+ 1. Ensure wget is available.
300
+ 2. Normalize URL to end with '/'.
301
+ 3. Compute cut-dirs so that only the last segment of the path remains locally.
302
+ 4. Build and run the wget command.
303
+
304
+ Example:
305
+ download_with_wget("https://ruisdael.citg.tudelft.nl/parsivel/PAR001_Cabauw/2021/202101/")
306
+ # → Creates a local folder "202101/" with all files and subfolders.
307
+ """
308
+ # 1. Ensure wget exists
309
+ ensure_wget_available()
310
+
311
+ # 2. Normalize URL
312
+ url = ensure_trailing_slash(url)
313
+
314
+ # 3. Compute cut-dirs so that only the last URL segment remains locally
315
+ cut_dirs = compute_cut_dirs(url)
316
+
317
+ # 4. Create destination directory if needed
318
+ os.makedirs(dst_dir, exist_ok=True)
319
+
320
+ # 5. Build wget command
321
+ cmd = build_webserver_wget_command(url, cut_dirs=cut_dirs, dst_dir=dst_dir, force=force, verbose=verbose)
322
+
323
+ # 6. Run wget command
324
+ try:
325
+ subprocess.run(cmd, check=True)
326
+ except subprocess.CalledProcessError as e:
327
+ raise subprocess.CalledProcessError(
328
+ returncode=e.returncode,
329
+ cmd=e.cmd,
330
+ output=e.output,
331
+ stderr=e.stderr,
332
+ )
333
+
334
+
335
+ def ensure_wget_available() -> None:
336
+ """Raise FileNotFoundError if 'wget' is not on the system PATH."""
337
+ if shutil.which("wget") is None:
338
+ raise FileNotFoundError("The WGET software was not found. Please install WGET or add it to PATH.")
339
+
340
+
341
+ def ensure_trailing_slash(url: str) -> str:
342
+ """Return `url` guaranteed to end with a slash."""
343
+ return url if url.endswith("/") else url.rstrip("/") + "/"
344
+
345
+
346
+ def compute_cut_dirs(url: str) -> int:
347
+ """Compute the wget cut_dirs value to download directly in `dst_dir`.
348
+
349
+ Given a URL ending with '/', compute the total number of path segments.
350
+ By returning len(segments), we strip away all of them—so that files
351
+ within that final directory land directly in `dst_dir` without creating
352
+ an extra subfolder.
353
+ """
354
+ parsed = urllib.parse.urlparse(url)
355
+ path = parsed.path.strip("/") # remove leading/trailing '/'
356
+ segments = path.split("/") if path else []
357
+ return len(segments)
358
+
359
+
360
+ def build_webserver_wget_command(url: str, cut_dirs: int, dst_dir: str, force: bool, verbose: bool) -> list[str]:
361
+ """Construct the wget command list for subprocess.run.
362
+
363
+ Notes
364
+ -----
365
+ The following wget arguments are used
366
+ - -q : quiet mode (no detailed progress)
367
+ - -r : recursive
368
+ - -np : no parent
369
+ - -nH : no host directories
370
+ - --timestamping: download missing files or when remote version is newer
371
+ - --cut-dirs : strip all but the last path segment from the remote path
372
+ - -P dst_dir : download into `dst_dir`
373
+ - url
374
+ """
375
+ cmd = ["wget"]
376
+ if verbose:
377
+ cmd.append("-q")
378
+ cmd += [
379
+ "-r",
380
+ "-np",
381
+ "-nH",
382
+ f"--cut-dirs={cut_dirs}",
383
+ ]
384
+ if force:
385
+ cmd.append("--timestamping") # -N
386
+
387
+ # Define source and destination directory
388
+ cmd += [
389
+ "-P",
390
+ dst_dir,
391
+ url,
392
+ ]
393
+ return cmd
394
+
395
+
396
+ ####--------------------------------------------------------------------.
397
+ #### Download from Zenodo
398
+
399
+
400
+ def download_zenodo_zip_file(url, dst_dir, force):
401
+ """Download zip file from zenodo and extract station raw data."""
402
+ # Download zip file
403
+ zip_filepath = _download_file_from_url(url, dst_dir=dst_dir, force=force)
404
+ # Extract the stations files from the downloaded station.zip file
405
+ _extract_station_files(zip_filepath, station_dir=dst_dir)
275
406
 
276
407
 
277
408
  def _download_file_from_url(url: str, dst_dir: str, force: bool = False) -> str:
@@ -20,7 +20,7 @@ center:
20
20
  18: 6.75
21
21
  19: 7.25
22
22
  20: 7.75
23
- 21: 54
23
+ 21: 9
24
24
  bounds:
25
25
  0:
26
26
  - 0.125
@@ -87,7 +87,7 @@ bounds:
87
87
  - 8.0
88
88
  21:
89
89
  - 8.0
90
- - 100
90
+ - 10.0
91
91
  width:
92
92
  0: 0.125
93
93
  1: 0.125
@@ -110,4 +110,4 @@ width:
110
110
  18: 0.5
111
111
  19: 0.5
112
112
  20: 0.5
113
- 21: 92
113
+ 21: 2
@@ -37,3 +37,7 @@ list_particles: "str"
37
37
  raw_drop_concentration: "str"
38
38
  raw_drop_average_velocity: "str"
39
39
  raw_drop_number: "str"
40
+ air_temperature: "float32"
41
+ relative_humidity: "float32"
42
+ wind_speed: "float32"
43
+ wind_direction: "float32"
@@ -158,3 +158,19 @@ raw_drop_number:
158
158
  description: Drop counts per diameter and velocity class
159
159
  long_name: Raw drop number
160
160
  units: ""
161
+ air_temperature:
162
+ description: "Air temperature in degrees Celsius (C)"
163
+ long_name: Air temperature
164
+ units: "C"
165
+ relative_humidity:
166
+ description: "Relative humidity in percent (%)"
167
+ long_name: Relative humidity
168
+ units: "%"
169
+ wind_speed:
170
+ description: "Wind speed in m/s"
171
+ long_name: Wind speed
172
+ units: "m/s"
173
+ wind_direction:
174
+ description: "Wind direction in degrees (0-360)"
175
+ long_name: Wind direction
176
+ units: "degrees"
@@ -331,3 +331,44 @@ raw_drop_number:
331
331
  - 5000
332
332
  - 32
333
333
  - 32
334
+ air_temperature:
335
+ dtype: uint16
336
+ scale_factor: 0.1
337
+ add_offset: -99.9
338
+ zlib: true
339
+ complevel: 3
340
+ shuffle: true
341
+ fletcher32: false
342
+ contiguous: false
343
+ _FillValue: 65535
344
+ chunksizes: 5000
345
+ relative_humidity:
346
+ dtype: uint16
347
+ scale_factor: 0.01
348
+ zlib: true
349
+ complevel: 3
350
+ shuffle: true
351
+ fletcher32: false
352
+ contiguous: false
353
+ _FillValue: 65535
354
+ chunksizes: 5000
355
+ wind_speed:
356
+ dtype: uint16
357
+ scale_factor: 0.1
358
+ add_offset: -99.9
359
+ zlib: true
360
+ complevel: 3
361
+ shuffle: true
362
+ fletcher32: false
363
+ contiguous: false
364
+ _FillValue: 65535
365
+ chunksizes: 5000
366
+ wind_direction:
367
+ dtype: uint16
368
+ zlib: true
369
+ complevel: 3
370
+ shuffle: true
371
+ fletcher32: false
372
+ contiguous: false
373
+ _FillValue: 65535
374
+ chunksizes: 5000
@@ -379,3 +379,43 @@ raw_drop_number:
379
379
  - diameter_bin_center
380
380
  n_values: 1024
381
381
  field_number: "93"
382
+ air_temperature:
383
+ n_digits: 4
384
+ n_characters: 5
385
+ n_decimals: 1
386
+ n_naturals: 2
387
+ data_range:
388
+ - -40
389
+ - 70
390
+ nan_flags: 99999
391
+ field_number: "521"
392
+ relative_humidity:
393
+ n_digits: 5
394
+ n_characters: 5
395
+ n_decimals: 0
396
+ n_naturals: 5
397
+ data_range:
398
+ - 0
399
+ - 99999
400
+ nan_flags: 99999
401
+ field_number: "522"
402
+ wind_speed:
403
+ n_digits: 3
404
+ n_characters: 4
405
+ n_decimals: 1
406
+ n_naturals: 2
407
+ data_range:
408
+ - 0
409
+ - 60
410
+ nan_flags: null
411
+ field_number: "523"
412
+ wind_direction:
413
+ n_digits: 3
414
+ n_characters: 3
415
+ n_decimals: 0
416
+ n_naturals: 3
417
+ data_range:
418
+ - 0
419
+ - 360
420
+ nan_flags: 999
421
+ field_number: "524"
@@ -0,0 +1,107 @@
1
+ #!/usr/bin/env python3
2
+ # -----------------------------------------------------------------------------.
3
+ # Copyright (c) 2021-2023 DISDRODB developers
4
+ #
5
+ # This program is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+ #
10
+ # This program is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU General Public License
16
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ # -----------------------------------------------------------------------------.
18
+ import pandas as pd
19
+
20
+ from disdrodb.l0.l0_reader import is_documented_by, reader_generic_docstring
21
+ from disdrodb.l0.l0a_processing import read_raw_text_file
22
+
23
+
24
+ @is_documented_by(reader_generic_docstring)
25
+ def reader(
26
+ filepath,
27
+ logger=None,
28
+ ):
29
+ """Reader."""
30
+ ##------------------------------------------------------------------------.
31
+ #### Define column names
32
+ column_names = ["time", "TO_BE_SPLITTED"]
33
+
34
+ ##------------------------------------------------------------------------.
35
+ #### Define reader options
36
+ reader_kwargs = {}
37
+ # - Define delimiter
38
+ reader_kwargs["delimiter"] = ";"
39
+ # - Skip first row as columns names
40
+ reader_kwargs["header"] = None
41
+ # Skip first row as columns names
42
+ reader_kwargs["header"] = None
43
+ reader_kwargs["skiprows"] = 0
44
+ # - Skip file with encoding errors
45
+ reader_kwargs["encoding_errors"] = "ignore"
46
+ # - Avoid first column to become df index !!!
47
+ reader_kwargs["index_col"] = False
48
+ # - Define behaviour when encountering bad lines
49
+ reader_kwargs["on_bad_lines"] = "skip"
50
+ # - Define reader engine
51
+ # - C engine is faster
52
+ # - Python engine is more feature-complete
53
+ reader_kwargs["engine"] = "python"
54
+ # - Define on-the-fly decompression of on-disk data
55
+ # - Available: gzip, bz2, zip
56
+ reader_kwargs["compression"] = "infer"
57
+ # - Strings to recognize as NA/NaN and replace with standard NA flags
58
+ # - Already included: '#N/A', '#N/A N/A', '#NA', '-1.#IND', '-1.#QNAN',
59
+ # '-NaN', '-nan', '1.#IND', '1.#QNAN', '<NA>', 'N/A',
60
+ # 'NA', 'NULL', 'NaN', 'n/a', 'nan', 'null'
61
+ reader_kwargs["na_values"] = ["na", "", "error", "NA", "-.-"]
62
+
63
+ ##------------------------------------------------------------------------.
64
+ #### Read the data
65
+ df = read_raw_text_file(
66
+ filepath=filepath,
67
+ column_names=column_names,
68
+ reader_kwargs=reader_kwargs,
69
+ logger=logger,
70
+ )
71
+
72
+ ##------------------------------------------------------------------------.
73
+ #### Adapt the dataframe to adhere to DISDRODB L0 standards
74
+ # Convert time column to datetime
75
+ df_time = pd.to_datetime(df["time"], format="%Y%m%d%H%M%S", errors="coerce")
76
+
77
+ # Split the 'TO_BE_SPLITTED' column
78
+ df = df["TO_BE_SPLITTED"].str.split(",", expand=True, n=9)
79
+
80
+ # Assign column names
81
+ columns_names = [
82
+ "station_name",
83
+ "sensor_status",
84
+ "sensor_temperature",
85
+ "number_particles",
86
+ "rainfall_rate_32bit",
87
+ "reflectivity_16bit",
88
+ "mor_visibility",
89
+ "weather_code_synop_4680",
90
+ "weather_code_synop_4677",
91
+ "raw_drop_number",
92
+ ]
93
+ df.columns = columns_names
94
+
95
+ # Add the time column
96
+ df["time"] = df_time
97
+
98
+ # Drop columns not agreeing with DISDRODB L0 standards
99
+ df = df.drop(columns=["station_name"])
100
+
101
+ # Drop rows with invalid values
102
+ # --> Ensure that weather_code_synop_4677 has length 2
103
+ # --> If a previous column is missing it will have 000
104
+ df = df[df["weather_code_synop_4677"].str.len() == 2]
105
+
106
+ # Return the dataframe adhering to DISDRODB L0 standards
107
+ return df
@@ -0,0 +1,125 @@
1
+ #!/usr/bin/env python3
2
+ # -----------------------------------------------------------------------------.
3
+ # Copyright (c) 2021-2023 DISDRODB developers
4
+ #
5
+ # This program is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+ #
10
+ # This program is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU General Public License
16
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ # -----------------------------------------------------------------------------.
18
+ import pandas as pd
19
+
20
+ from disdrodb.l0.l0_reader import is_documented_by, reader_generic_docstring
21
+ from disdrodb.l0.l0a_processing import read_raw_text_file
22
+
23
+
24
+ @is_documented_by(reader_generic_docstring)
25
+ def reader(
26
+ filepath,
27
+ logger=None,
28
+ ):
29
+ """Reader."""
30
+ ##------------------------------------------------------------------------.
31
+ #### Define column names
32
+ column_names = ["TO_SPLIT"]
33
+
34
+ ##------------------------------------------------------------------------.
35
+ #### Define reader options
36
+ reader_kwargs = {}
37
+
38
+ # - Define delimiter
39
+ reader_kwargs["delimiter"] = "\\n"
40
+
41
+ # - Skip first row as columns names
42
+ reader_kwargs["header"] = None
43
+
44
+ # - Skip header
45
+ reader_kwargs["skiprows"] = 0
46
+
47
+ # - Define encoding
48
+ reader_kwargs["encoding"] = "ISO-8859-1"
49
+
50
+ # - Avoid first column to become df index !!!
51
+ reader_kwargs["index_col"] = False
52
+
53
+ # - Define behaviour when encountering bad lines
54
+ reader_kwargs["on_bad_lines"] = "skip"
55
+
56
+ # - Define reader engine
57
+ # - C engine is faster
58
+ # - Python engine is more feature-complete
59
+ reader_kwargs["engine"] = "python"
60
+
61
+ # - Define on-the-fly decompression of on-disk data
62
+ # - Available: gzip, bz2, zip
63
+ # reader_kwargs['compression'] = 'xz'
64
+
65
+ # - Strings to recognize as NA/NaN and replace with standard NA flags
66
+ # - Already included: '#N/A', '#N/A N/A', '#NA', '-1.#IND', '-1.#QNAN',
67
+ # '-NaN', '-nan', '1.#IND', '1.#QNAN', '<NA>', 'N/A',
68
+ # 'NA', 'NULL', 'NaN', 'n/a', 'nan', 'null'
69
+ reader_kwargs["na_values"] = ["na", "error", "-.-", " NA"]
70
+
71
+ ##------------------------------------------------------------------------.
72
+ #### Read the data
73
+ df = read_raw_text_file(
74
+ filepath=filepath,
75
+ column_names=column_names,
76
+ reader_kwargs=reader_kwargs,
77
+ logger=logger,
78
+ )
79
+
80
+ ##------------------------------------------------------------------------.
81
+ #### Adapt the dataframe to adhere to DISDRODB L0 standards
82
+ # Remove rows with less than 97 characters (empty spectrum --> 97 characters)
83
+ df = df[df["TO_SPLIT"].str.len() >= 97]
84
+
85
+ # Split into columns and assign name
86
+ df = df["TO_SPLIT"].str.split(";", expand=True, n=14)
87
+ columns = [
88
+ "date",
89
+ "time",
90
+ "rainfall_rate_32bit",
91
+ "rainfall_accumulated_32bit",
92
+ "weather_code_synop_4680",
93
+ "weather_code_metar_4678",
94
+ "weather_code_nws",
95
+ "reflectivity_32bit",
96
+ "mor_visibility",
97
+ "laser_amplitude",
98
+ "number_particles",
99
+ "sensor_temperature",
100
+ "sensor_heating_current",
101
+ "sensor_battery_voltage",
102
+ "raw_drop_number",
103
+ ]
104
+ df.columns = columns
105
+
106
+ # Add datetime time column
107
+ df["time"] = df["date"] + "-" + df["time"]
108
+ df["time"] = pd.to_datetime(df["time"], format="%Y/%m/%d-%H:%M:%S", errors="coerce")
109
+ df = df.drop(columns=["date"])
110
+
111
+ # Preprocess the raw spectrum
112
+ # - The '<SPECTRUM>ZERO</SPECTRUM>' indicates no drops detected
113
+ # --> "" generates an array of zeros in L0B processing
114
+ df["raw_drop_number"] = df["raw_drop_number"].str.replace("<SPECTRUM>ZERO</SPECTRUM>", "")
115
+
116
+ # Remove <SPECTRUM> and </SPECTRUM>" acronyms from the raw_drop_number field
117
+ df["raw_drop_number"] = df["raw_drop_number"].str.replace("<SPECTRUM>", "")
118
+ df["raw_drop_number"] = df["raw_drop_number"].str.replace("</SPECTRUM>", "")
119
+
120
+ # Add 0 before every , if , not preceded by a digit
121
+ # Example: ',,1,,' --> '0,0,1,0,'
122
+ df["raw_drop_number"] = df["raw_drop_number"].str.replace(r"(?<!\d);", "0;", regex=True)
123
+
124
+ # Return the dataframe adhering to DISDRODB L0 standards
125
+ return df