roms-tools 1.4.0__py3-none-any.whl → 1.4.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 (250) hide show
  1. ci/environment.yml +1 -8
  2. roms_tools/_version.py +1 -1
  3. roms_tools/setup/boundary_forcing.py +77 -70
  4. roms_tools/setup/datasets.py +38 -59
  5. roms_tools/setup/download.py +3 -6
  6. roms_tools/setup/fill.py +8 -16
  7. roms_tools/setup/grid.py +147 -102
  8. roms_tools/setup/initial_conditions.py +43 -36
  9. roms_tools/setup/mixins.py +10 -14
  10. roms_tools/setup/surface_forcing.py +35 -33
  11. roms_tools/setup/tides.py +37 -41
  12. roms_tools/setup/topography.py +36 -18
  13. roms_tools/setup/utils.py +19 -40
  14. roms_tools/setup/vertical_coordinate.py +4 -6
  15. roms_tools/tests/test_setup/test_boundary_forcing.py +6 -13
  16. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_ALT_CO2_east/0.0.0 +0 -0
  17. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_ALT_CO2_north/0.0.0 +0 -0
  18. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_ALT_CO2_south/0.0.0 +0 -0
  19. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_ALT_CO2_west/0.0.0 +0 -0
  20. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_east/0.0.0 +0 -0
  21. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_north/0.0.0 +0 -0
  22. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_south/0.0.0 +0 -0
  23. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_west/0.0.0 +0 -0
  24. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_ALT_CO2_east/0.0.0 +0 -0
  25. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_ALT_CO2_north/0.0.0 +0 -0
  26. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_ALT_CO2_south/0.0.0 +0 -0
  27. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_ALT_CO2_west/0.0.0 +0 -0
  28. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_east/0.0.0 +0 -0
  29. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_north/0.0.0 +0 -0
  30. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_south/0.0.0 +0 -0
  31. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_west/0.0.0 +0 -0
  32. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOC_east/0.0.0 +0 -0
  33. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOC_north/0.0.0 +0 -0
  34. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOC_south/0.0.0 +0 -0
  35. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOC_west/0.0.0 +0 -0
  36. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOCr_east/0.0.0 +0 -0
  37. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOCr_north/0.0.0 +0 -0
  38. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOCr_south/0.0.0 +0 -0
  39. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOCr_west/0.0.0 +0 -0
  40. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DON_east/0.0.0 +0 -0
  41. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DON_north/0.0.0 +0 -0
  42. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DON_south/0.0.0 +0 -0
  43. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DON_west/0.0.0 +0 -0
  44. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DONr_east/0.0.0 +0 -0
  45. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DONr_north/0.0.0 +0 -0
  46. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DONr_south/0.0.0 +0 -0
  47. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DONr_west/0.0.0 +0 -0
  48. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOP_east/0.0.0 +0 -0
  49. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOP_north/0.0.0 +0 -0
  50. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOP_south/0.0.0 +0 -0
  51. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOP_west/0.0.0 +0 -0
  52. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOPr_east/0.0.0 +0 -0
  53. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOPr_north/0.0.0 +0 -0
  54. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOPr_south/0.0.0 +0 -0
  55. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOPr_west/0.0.0 +0 -0
  56. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Fe_east/0.0.0 +0 -0
  57. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Fe_north/0.0.0 +0 -0
  58. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Fe_south/0.0.0 +0 -0
  59. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Fe_west/0.0.0 +0 -0
  60. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Lig_east/0.0.0 +0 -0
  61. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Lig_north/0.0.0 +0 -0
  62. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Lig_south/0.0.0 +0 -0
  63. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Lig_west/0.0.0 +0 -0
  64. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NH4_east/0.0.0 +0 -0
  65. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NH4_north/0.0.0 +0 -0
  66. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NH4_south/0.0.0 +0 -0
  67. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NH4_west/0.0.0 +0 -0
  68. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NO3_east/0.0.0 +0 -0
  69. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NO3_north/0.0.0 +0 -0
  70. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NO3_south/0.0.0 +0 -0
  71. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NO3_west/0.0.0 +0 -0
  72. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/O2_east/0.0.0 +0 -0
  73. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/O2_north/0.0.0 +0 -0
  74. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/O2_south/0.0.0 +0 -0
  75. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/O2_west/0.0.0 +0 -0
  76. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/PO4_east/0.0.0 +0 -0
  77. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/PO4_north/0.0.0 +0 -0
  78. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/PO4_south/0.0.0 +0 -0
  79. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/PO4_west/0.0.0 +0 -0
  80. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/SiO3_east/0.0.0 +0 -0
  81. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/SiO3_north/0.0.0 +0 -0
  82. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/SiO3_south/0.0.0 +0 -0
  83. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/SiO3_west/0.0.0 +0 -0
  84. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatC_east/0.0.0 +0 -0
  85. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatC_north/0.0.0 +0 -0
  86. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatC_south/0.0.0 +0 -0
  87. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatC_west/0.0.0 +0 -0
  88. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatChl_east/0.0.0 +0 -0
  89. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatChl_north/0.0.0 +0 -0
  90. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatChl_south/0.0.0 +0 -0
  91. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatChl_west/0.0.0 +0 -0
  92. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatFe_east/0.0.0 +0 -0
  93. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatFe_north/0.0.0 +0 -0
  94. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatFe_south/0.0.0 +0 -0
  95. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatFe_west/0.0.0 +0 -0
  96. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatP_east/0.0.0 +0 -0
  97. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatP_north/0.0.0 +0 -0
  98. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatP_south/0.0.0 +0 -0
  99. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatP_west/0.0.0 +0 -0
  100. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatSi_east/0.0.0 +0 -0
  101. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatSi_north/0.0.0 +0 -0
  102. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatSi_south/0.0.0 +0 -0
  103. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatSi_west/0.0.0 +0 -0
  104. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazC_east/0.0.0 +0 -0
  105. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazC_north/0.0.0 +0 -0
  106. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazC_south/0.0.0 +0 -0
  107. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazC_west/0.0.0 +0 -0
  108. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazChl_east/0.0.0 +0 -0
  109. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazChl_north/0.0.0 +0 -0
  110. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazChl_south/0.0.0 +0 -0
  111. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazChl_west/0.0.0 +0 -0
  112. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_east/0.0.0 +0 -0
  113. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_north/0.0.0 +0 -0
  114. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_south/0.0.0 +0 -0
  115. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_west/0.0.0 +0 -0
  116. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_east/0.0.0 +0 -0
  117. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_north/0.0.0 +0 -0
  118. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_south/0.0.0 +0 -0
  119. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_west/0.0.0 +0 -0
  120. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_east/0.0.0 +0 -0
  121. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_north/0.0.0 +0 -0
  122. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_south/0.0.0 +0 -0
  123. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_west/0.0.0 +0 -0
  124. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_east/0.0.0 +0 -0
  125. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_north/0.0.0 +0 -0
  126. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_south/0.0.0 +0 -0
  127. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_west/0.0.0 +0 -0
  128. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_east/0.0.0 +0 -0
  129. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_north/0.0.0 +0 -0
  130. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_south/0.0.0 +0 -0
  131. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_west/0.0.0 +0 -0
  132. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_east/0.0.0 +0 -0
  133. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_north/0.0.0 +0 -0
  134. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_south/0.0.0 +0 -0
  135. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_west/0.0.0 +0 -0
  136. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_east/0.0.0 +0 -0
  137. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_north/0.0.0 +0 -0
  138. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_south/0.0.0 +0 -0
  139. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_west/0.0.0 +0 -0
  140. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_east/0.0.0 +0 -0
  141. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_north/0.0.0 +0 -0
  142. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_south/0.0.0 +0 -0
  143. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_west/0.0.0 +0 -0
  144. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/salt_east/0.0.0 +0 -0
  145. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/salt_north/0.0.0 +0 -0
  146. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/salt_south/0.0.0 +0 -0
  147. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/salt_west/0.0.0 +0 -0
  148. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/temp_east/0.0.0 +0 -0
  149. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/temp_north/0.0.0 +0 -0
  150. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/temp_south/0.0.0 +0 -0
  151. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/temp_west/0.0.0 +0 -0
  152. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/u_east/0.0.0 +0 -0
  153. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/u_north/0.0.0 +0 -0
  154. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/u_west/0.0.0 +0 -0
  155. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/ubar_east/0.0 +0 -0
  156. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/ubar_north/0.0 +0 -0
  157. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/ubar_west/0.0 +0 -0
  158. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_east/0.0.0 +0 -0
  159. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_north/0.0.0 +0 -0
  160. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_south/0.0.0 +0 -0
  161. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_west/0.0.0 +0 -0
  162. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_east/0.0 +0 -0
  163. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_north/0.0 +0 -0
  164. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_south/0.0 +0 -0
  165. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_west/0.0 +0 -0
  166. roms_tools/tests/test_setup/test_data/grid.zarr/.zattrs +1 -1
  167. roms_tools/tests/test_setup/test_data/grid.zarr/.zmetadata +1 -1
  168. roms_tools/tests/test_setup/test_data/grid.zarr/angle/0.0 +0 -0
  169. roms_tools/tests/test_setup/test_data/grid.zarr/angle_coarse/0.0 +0 -0
  170. roms_tools/tests/test_setup/test_data/grid.zarr/f/0.0 +0 -0
  171. roms_tools/tests/test_setup/test_data/grid.zarr/h/0.0 +0 -0
  172. roms_tools/tests/test_setup/test_data/grid.zarr/lat_coarse/0.0 +0 -0
  173. roms_tools/tests/test_setup/test_data/grid.zarr/lat_rho/0.0 +0 -0
  174. roms_tools/tests/test_setup/test_data/grid.zarr/lat_u/0.0 +0 -0
  175. roms_tools/tests/test_setup/test_data/grid.zarr/lat_v/0.0 +0 -0
  176. roms_tools/tests/test_setup/test_data/grid.zarr/lon_u/0.0 +0 -0
  177. roms_tools/tests/test_setup/test_data/grid.zarr/pm/0.0 +0 -0
  178. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/.zattrs +1 -1
  179. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/.zmetadata +1 -1
  180. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/angle/0.0 +0 -0
  181. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/angle_coarse/0.0 +0 -0
  182. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/f/0.0 +0 -0
  183. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/h/0.0 +0 -0
  184. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/lat_coarse/0.0 +0 -0
  185. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/lat_rho/0.0 +0 -0
  186. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/lat_u/0.0 +0 -0
  187. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/lat_v/0.0 +0 -0
  188. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/lon_coarse/0.0 +0 -0
  189. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/lon_rho/0.0 +0 -0
  190. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/lon_u/0.0 +0 -0
  191. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/lon_v/0.0 +0 -0
  192. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/pm/0.0 +0 -0
  193. roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/pn/0.0 +0 -0
  194. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/ALK/0.0.0.0 +0 -0
  195. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/ALK_ALT_CO2/0.0.0.0 +0 -0
  196. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DIC/0.0.0.0 +0 -0
  197. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DIC_ALT_CO2/0.0.0.0 +0 -0
  198. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOC/0.0.0.0 +0 -0
  199. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOCr/0.0.0.0 +0 -0
  200. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DON/0.0.0.0 +0 -0
  201. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DONr/0.0.0.0 +0 -0
  202. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOP/0.0.0.0 +0 -0
  203. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOPr/0.0.0.0 +0 -0
  204. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/Fe/0.0.0.0 +0 -0
  205. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/Lig/0.0.0.0 +0 -0
  206. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/NH4/0.0.0.0 +0 -0
  207. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/NO3/0.0.0.0 +0 -0
  208. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/O2/0.0.0.0 +0 -0
  209. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/PO4/0.0.0.0 +0 -0
  210. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/SiO3/0.0.0.0 +0 -0
  211. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatC/0.0.0.0 +0 -0
  212. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatChl/0.0.0.0 +0 -0
  213. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatFe/0.0.0.0 +0 -0
  214. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatP/0.0.0.0 +0 -0
  215. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatSi/0.0.0.0 +0 -0
  216. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazC/0.0.0.0 +0 -0
  217. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazChl/0.0.0.0 +0 -0
  218. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazFe/0.0.0.0 +0 -0
  219. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazP/0.0.0.0 +0 -0
  220. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/salt/0.0.0.0 +0 -0
  221. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spC/0.0.0.0 +0 -0
  222. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spCaCO3/0.0.0.0 +0 -0
  223. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spChl/0.0.0.0 +0 -0
  224. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spFe/0.0.0.0 +0 -0
  225. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spP/0.0.0.0 +0 -0
  226. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/temp/0.0.0.0 +0 -0
  227. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/u/0.0.0.0 +0 -0
  228. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/ubar/0.0.0 +0 -0
  229. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/v/0.0.0.0 +0 -0
  230. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/vbar/0.0.0 +0 -0
  231. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/zooC/0.0.0.0 +0 -0
  232. roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/u_Im/0.0.0 +0 -0
  233. roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/u_Re/0.0.0 +0 -0
  234. roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/v_Im/0.0.0 +0 -0
  235. roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/v_Re/0.0.0 +0 -0
  236. roms_tools/tests/test_setup/test_datasets.py +8 -18
  237. roms_tools/tests/test_setup/test_grid.py +58 -2
  238. roms_tools/tests/test_setup/test_initial_conditions.py +4 -7
  239. roms_tools/tests/test_setup/test_surface_forcing.py +58 -58
  240. roms_tools/tests/test_setup/test_tides.py +6 -10
  241. roms_tools/tests/test_setup/test_topography.py +38 -0
  242. roms_tools/tests/test_setup/test_vertical_coordinate.py +2 -6
  243. roms_tools/tests/test_utils.py +30 -0
  244. roms_tools/utils.py +45 -10
  245. roms_tools-1.4.2.dist-info/LICENSE +201 -0
  246. {roms_tools-1.4.0.dist-info → roms_tools-1.4.2.dist-info}/METADATA +3 -1
  247. {roms_tools-1.4.0.dist-info → roms_tools-1.4.2.dist-info}/RECORD +249 -249
  248. {roms_tools-1.4.0.dist-info → roms_tools-1.4.2.dist-info}/WHEEL +1 -1
  249. roms_tools-1.4.0.dist-info/LICENSE +0 -674
  250. {roms_tools-1.4.0.dist-info → roms_tools-1.4.2.dist-info}/top_level.txt +0 -0
roms_tools/setup/utils.py CHANGED
@@ -8,8 +8,7 @@ from pathlib import Path
8
8
 
9
9
 
10
10
  def nan_check(field, mask) -> None:
11
- """
12
- Checks for NaN values at wet points in the field.
11
+ """Checks for NaN values at wet points in the field.
13
12
 
14
13
  This function examines the interpolated input field for NaN values at positions indicated as wet points by the mask.
15
14
  If any NaN values are found at these wet points, a ValueError is raised.
@@ -28,7 +27,6 @@ def nan_check(field, mask) -> None:
28
27
  ValueError
29
28
  If the field contains NaN values at any of the wet points indicated by the mask.
30
29
  The error message will explain the potential cause and suggest ensuring the dataset's coverage.
31
-
32
30
  """
33
31
 
34
32
  # Replace values in field with 0 where mask is not 1
@@ -44,8 +42,7 @@ def nan_check(field, mask) -> None:
44
42
 
45
43
 
46
44
  def substitute_nans_by_fillvalue(field, fill_value=0.0) -> xr.DataArray:
47
- """
48
- Replace NaN values in the field with a specified fill value.
45
+ """Replace NaN values in the field with a specified fill value.
49
46
 
50
47
  This function replaces any NaN values in the input field with the provided fill value.
51
48
 
@@ -66,9 +63,7 @@ def substitute_nans_by_fillvalue(field, fill_value=0.0) -> xr.DataArray:
66
63
 
67
64
 
68
65
  def interpolate_from_rho_to_u(field, method="additive"):
69
-
70
- """
71
- Interpolates the given field from rho points to u points.
66
+ """Interpolates the given field from rho points to u points.
72
67
 
73
68
  This function performs an interpolation from the rho grid (cell centers) to the u grid
74
69
  (cell edges in the xi direction). Depending on the chosen method, it either averages
@@ -114,9 +109,7 @@ def interpolate_from_rho_to_u(field, method="additive"):
114
109
 
115
110
 
116
111
  def interpolate_from_rho_to_v(field, method="additive"):
117
-
118
- """
119
- Interpolates the given field from rho points to v points.
112
+ """Interpolates the given field from rho points to v points.
120
113
 
121
114
  This function performs an interpolation from the rho grid (cell centers) to the v grid
122
115
  (cell edges in the eta direction). Depending on the chosen method, it either averages
@@ -164,8 +157,8 @@ def interpolate_from_rho_to_v(field, method="additive"):
164
157
 
165
158
 
166
159
  def extrapolate_deepest_to_bottom(field: xr.DataArray, dim: str) -> xr.DataArray:
167
- """
168
- Extrapolates the deepest non-NaN values to the bottom along the specified dimension using forward fill.
160
+ """Extrapolates the deepest non-NaN values to the bottom along the specified
161
+ dimension using forward fill.
169
162
 
170
163
  This function assumes that the specified dimension is ordered from top to bottom (e.g., a vertical dimension like 'depth').
171
164
  It fills `NaN` values below the deepest valid (non-NaN) entry along the given dimension by carrying forward the last valid value.
@@ -187,7 +180,6 @@ def extrapolate_deepest_to_bottom(field: xr.DataArray, dim: str) -> xr.DataArray
187
180
  A new `xarray.DataArray` with the `NaN` values along the specified dimension
188
181
  filled by forward filling the deepest valid values down to the bottom.
189
182
  The original input data remains unmodified.
190
-
191
183
  """
192
184
  field_interpolated = field.ffill(dim=dim)
193
185
 
@@ -195,8 +187,7 @@ def extrapolate_deepest_to_bottom(field: xr.DataArray, dim: str) -> xr.DataArray
195
187
 
196
188
 
197
189
  def assign_dates_to_climatology(ds: xr.Dataset, time_dim: str) -> xr.Dataset:
198
- """
199
- Assigns climatology dates to the dataset's time dimension.
190
+ """Assigns climatology dates to the dataset's time dimension.
200
191
 
201
192
  This function updates the dataset's time coordinates to reflect climatological dates.
202
193
  It defines fixed day increments for each month and assigns these to the specified time dimension.
@@ -213,7 +204,6 @@ def assign_dates_to_climatology(ds: xr.Dataset, time_dim: str) -> xr.Dataset:
213
204
  -------
214
205
  xr.Dataset
215
206
  The updated xarray Dataset with climatological dates assigned to the specified time dimension.
216
-
217
207
  """
218
208
  # Define the days in each month and convert to timedelta
219
209
  increments = [15, 30, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30]
@@ -229,8 +219,7 @@ def interpolate_from_climatology(
229
219
  time_dim_name: str,
230
220
  time: Union[xr.DataArray, pd.DatetimeIndex],
231
221
  ) -> Union[xr.DataArray, xr.Dataset]:
232
- """
233
- Interpolates the given field temporally based on the specified time points.
222
+ """Interpolates the given field temporally based on the specified time points.
234
223
 
235
224
  If `field` is an xarray.Dataset, this function applies the interpolation to all data variables in the dataset.
236
225
 
@@ -305,8 +294,7 @@ def interpolate_from_climatology(
305
294
 
306
295
 
307
296
  def get_time_type(data_array: xr.DataArray) -> str:
308
- """
309
- Determines the type of time values in the xarray DataArray.
297
+ """Determines the type of time values in the xarray DataArray.
310
298
 
311
299
  Parameters
312
300
  ----------
@@ -354,8 +342,7 @@ def get_time_type(data_array: xr.DataArray) -> str:
354
342
 
355
343
 
356
344
  def convert_cftime_to_datetime(data_array: np.ndarray) -> np.ndarray:
357
- """
358
- Converts cftime datetime objects to numpy datetime64 objects in a numpy ndarray.
345
+ """Converts cftime datetime objects to numpy datetime64 objects in a numpy ndarray.
359
346
 
360
347
  Parameters
361
348
  ----------
@@ -391,8 +378,7 @@ def convert_cftime_to_datetime(data_array: np.ndarray) -> np.ndarray:
391
378
 
392
379
 
393
380
  def get_variable_metadata():
394
- """
395
- Retrieves metadata for commonly used variables in the dataset.
381
+ """Retrieves metadata for commonly used variables in the dataset.
396
382
 
397
383
  This function returns a dictionary containing the metadata for various variables, including long names
398
384
  and units for each variable.
@@ -401,7 +387,6 @@ def get_variable_metadata():
401
387
  -------
402
388
  dict of str: dict
403
389
  Dictionary where keys are variable names and values are dictionaries with "long_name" and "units" keys.
404
-
405
390
  """
406
391
 
407
392
  d = {
@@ -519,10 +504,8 @@ def get_variable_metadata():
519
504
 
520
505
 
521
506
  def get_boundary_info():
522
-
523
- """
524
- This function provides information about the boundary points for the rho, u, and v
525
- variables on the grid, specifying the indices for the south, east, north, and west
507
+ """This function provides information about the boundary points for the rho, u, and
508
+ v variables on the grid, specifying the indices for the south, east, north, and west
526
509
  boundaries.
527
510
 
528
511
  Returns
@@ -559,8 +542,7 @@ def get_boundary_info():
559
542
 
560
543
 
561
544
  def extract_single_value(data):
562
- """
563
- Extracts a single value from an xarray.DataArray or numpy array.
545
+ """Extracts a single value from an xarray.DataArray or numpy array.
564
546
 
565
547
  Parameters
566
548
  ----------
@@ -589,8 +571,8 @@ def extract_single_value(data):
589
571
 
590
572
 
591
573
  def group_dataset(ds, filepath):
592
- """
593
- Group the dataset into monthly or yearly subsets based on the frequency of the data.
574
+ """Group the dataset into monthly or yearly subsets based on the frequency of the
575
+ data.
594
576
 
595
577
  Parameters
596
578
  ----------
@@ -643,8 +625,7 @@ def group_dataset(ds, filepath):
643
625
 
644
626
 
645
627
  def group_by_month(ds, filepath):
646
- """
647
- Group the dataset by month and generate filenames with 'YYYYMM' format.
628
+ """Group the dataset by month and generate filenames with 'YYYYMM' format.
648
629
 
649
630
  Parameters
650
631
  ----------
@@ -681,8 +662,7 @@ def group_by_month(ds, filepath):
681
662
 
682
663
 
683
664
  def group_by_year(ds, filepath):
684
- """
685
- Group the dataset by year and generate filenames with 'YYYY' format.
665
+ """Group the dataset by year and generate filenames with 'YYYY' format.
686
666
 
687
667
  Parameters
688
668
  ----------
@@ -715,8 +695,7 @@ def group_by_year(ds, filepath):
715
695
 
716
696
 
717
697
  def save_datasets(dataset_list, output_filenames, np_eta=None, np_xi=None):
718
- """
719
- Save the list of datasets to netCDF4 files, with optional spatial partitioning.
698
+ """Save the list of datasets to netCDF4 files, with optional spatial partitioning.
720
699
 
721
700
  Parameters
722
701
  ----------
@@ -3,8 +3,8 @@ import xarray as xr
3
3
 
4
4
 
5
5
  def compute_cs(sigma, theta_s, theta_b):
6
- """
7
- Compute the S-coordinate stretching curves according to Shchepetkin and McWilliams (2009).
6
+ """Compute the S-coordinate stretching curves according to Shchepetkin and
7
+ McWilliams (2009).
8
8
 
9
9
  Parameters
10
10
  ----------
@@ -37,8 +37,7 @@ def compute_cs(sigma, theta_s, theta_b):
37
37
 
38
38
 
39
39
  def sigma_stretch(theta_s, theta_b, N, type):
40
- """
41
- Compute sigma and stretching curves based on the type and parameters.
40
+ """Compute sigma and stretching curves based on the type and parameters.
42
41
 
43
42
  Parameters
44
43
  ----------
@@ -80,8 +79,7 @@ def sigma_stretch(theta_s, theta_b, N, type):
80
79
 
81
80
 
82
81
  def compute_depth(zeta, h, hc, cs, sigma):
83
- """
84
- Compute the depth at different sigma levels.
82
+ """Compute the depth at different sigma levels.
85
83
 
86
84
  Parameters
87
85
  ----------
@@ -8,9 +8,7 @@ from pathlib import Path
8
8
 
9
9
 
10
10
  def test_boundary_forcing_creation(boundary_forcing):
11
- """
12
- Test the creation of the BoundaryForcing object.
13
- """
11
+ """Test the creation of the BoundaryForcing object."""
14
12
 
15
13
  fname = download_test_data("GLORYS_coarse_test_data.nc")
16
14
 
@@ -43,9 +41,7 @@ def test_boundary_forcing_creation(boundary_forcing):
43
41
 
44
42
 
45
43
  def test_boundary_forcing_creation_with_bgc(bgc_boundary_forcing_from_climatology):
46
- """
47
- Test the creation of the BoundaryForcing object.
48
- """
44
+ """Test the creation of the BoundaryForcing object."""
49
45
 
50
46
  fname_bgc = download_test_data("CESM_regional_coarse_test_data_climatology.nc")
51
47
 
@@ -80,9 +76,7 @@ def test_boundary_forcing_creation_with_bgc(bgc_boundary_forcing_from_climatolog
80
76
 
81
77
 
82
78
  def test_boundary_forcing_plot_save(boundary_forcing, tmp_path):
83
- """
84
- Test plot and save methods.
85
- """
79
+ """Test plot and save methods."""
86
80
 
87
81
  boundary_forcing.plot(varname="temp_south", layer_contours=True)
88
82
  boundary_forcing.plot(varname="temp_east", layer_contours=True)
@@ -128,9 +122,7 @@ def test_boundary_forcing_plot_save(boundary_forcing, tmp_path):
128
122
  def test_bgc_boundary_forcing_plot_save(
129
123
  bgc_boundary_forcing_from_climatology, tmp_path
130
124
  ):
131
- """
132
- Test plot and save methods.
133
- """
125
+ """Test plot and save methods."""
134
126
 
135
127
  bgc_boundary_forcing_from_climatology.plot(varname="ALK_south")
136
128
  bgc_boundary_forcing_from_climatology.plot(varname="ALK_east")
@@ -176,7 +168,8 @@ def test_bgc_boundary_forcing_plot_save(
176
168
  ],
177
169
  )
178
170
  def test_roundtrip_yaml(bdry_forcing_fixture, request, tmp_path, use_dask):
179
- """Test that creating a BoundaryForcing object, saving its parameters to yaml file, and re-opening yaml file creates the same object."""
171
+ """Test that creating a BoundaryForcing object, saving its parameters to yaml file,
172
+ and re-opening yaml file creates the same object."""
180
173
 
181
174
  bdry_forcing = request.getfixturevalue(bdry_forcing_fixture)
182
175