roms-tools 1.5.0__py3-none-any.whl → 1.6.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. roms_tools/_version.py +1 -1
  2. roms_tools/setup/boundary_forcing.py +226 -85
  3. roms_tools/setup/datasets.py +169 -39
  4. roms_tools/setup/fill.py +0 -36
  5. roms_tools/setup/initial_conditions.py +90 -69
  6. roms_tools/setup/regrid.py +43 -98
  7. roms_tools/setup/surface_forcing.py +68 -67
  8. roms_tools/setup/tides.py +60 -45
  9. roms_tools/setup/utils.py +25 -53
  10. roms_tools/tests/test_setup/test_boundary_forcing.py +42 -32
  11. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_ALT_CO2_east/0.0.0 +0 -0
  12. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_ALT_CO2_south/0.0.0 +0 -0
  13. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_ALT_CO2_west/0.0.0 +0 -0
  14. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_east/0.0.0 +0 -0
  15. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_south/0.0.0 +0 -0
  16. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_west/0.0.0 +0 -0
  17. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_ALT_CO2_east/0.0.0 +0 -0
  18. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_ALT_CO2_south/0.0.0 +0 -0
  19. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_ALT_CO2_west/0.0.0 +0 -0
  20. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_east/0.0.0 +0 -0
  21. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_south/0.0.0 +0 -0
  22. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_west/0.0.0 +0 -0
  23. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOC_east/0.0.0 +0 -0
  24. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOC_south/0.0.0 +0 -0
  25. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOC_west/0.0.0 +0 -0
  26. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOCr_east/0.0.0 +0 -0
  27. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOCr_south/0.0.0 +0 -0
  28. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOCr_west/0.0.0 +0 -0
  29. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DON_east/0.0.0 +0 -0
  30. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DON_south/0.0.0 +0 -0
  31. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DON_west/0.0.0 +0 -0
  32. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DONr_east/0.0.0 +0 -0
  33. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DONr_south/0.0.0 +0 -0
  34. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DONr_west/0.0.0 +0 -0
  35. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOP_east/0.0.0 +0 -0
  36. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOP_south/0.0.0 +0 -0
  37. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOP_west/0.0.0 +0 -0
  38. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOPr_east/0.0.0 +0 -0
  39. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOPr_south/0.0.0 +0 -0
  40. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOPr_west/0.0.0 +0 -0
  41. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Fe_east/0.0.0 +0 -0
  42. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Fe_south/0.0.0 +0 -0
  43. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Fe_west/0.0.0 +0 -0
  44. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Lig_east/0.0.0 +0 -0
  45. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Lig_south/0.0.0 +0 -0
  46. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Lig_west/0.0.0 +0 -0
  47. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NH4_east/0.0.0 +0 -0
  48. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NH4_south/0.0.0 +0 -0
  49. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NH4_west/0.0.0 +0 -0
  50. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NO3_east/0.0.0 +0 -0
  51. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NO3_south/0.0.0 +0 -0
  52. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NO3_west/0.0.0 +0 -0
  53. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/O2_east/0.0.0 +0 -0
  54. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/O2_south/0.0.0 +0 -0
  55. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/O2_west/0.0.0 +0 -0
  56. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/PO4_east/0.0.0 +0 -0
  57. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/PO4_south/0.0.0 +0 -0
  58. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/PO4_west/0.0.0 +0 -0
  59. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/SiO3_east/0.0.0 +0 -0
  60. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/SiO3_south/0.0.0 +0 -0
  61. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/SiO3_west/0.0.0 +0 -0
  62. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatC_east/0.0.0 +0 -0
  63. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatC_south/0.0.0 +0 -0
  64. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatC_west/0.0.0 +0 -0
  65. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatChl_east/0.0.0 +0 -0
  66. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatChl_south/0.0.0 +0 -0
  67. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatChl_west/0.0.0 +0 -0
  68. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatFe_east/0.0.0 +0 -0
  69. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatFe_south/0.0.0 +0 -0
  70. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatFe_west/0.0.0 +0 -0
  71. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatP_east/0.0.0 +0 -0
  72. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatP_south/0.0.0 +0 -0
  73. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatP_west/0.0.0 +0 -0
  74. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatSi_east/0.0.0 +0 -0
  75. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatSi_south/0.0.0 +0 -0
  76. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatSi_west/0.0.0 +0 -0
  77. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazC_east/0.0.0 +0 -0
  78. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazC_south/0.0.0 +0 -0
  79. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazC_west/0.0.0 +0 -0
  80. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazChl_east/0.0.0 +0 -0
  81. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazChl_south/0.0.0 +0 -0
  82. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazChl_west/0.0.0 +0 -0
  83. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_east/0.0.0 +0 -0
  84. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_south/0.0.0 +0 -0
  85. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_west/0.0.0 +0 -0
  86. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_east/0.0.0 +0 -0
  87. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_south/0.0.0 +0 -0
  88. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_west/0.0.0 +0 -0
  89. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_east/0.0.0 +0 -0
  90. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_south/0.0.0 +0 -0
  91. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_west/0.0.0 +0 -0
  92. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_east/0.0.0 +0 -0
  93. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_south/0.0.0 +0 -0
  94. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_west/0.0.0 +0 -0
  95. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_east/0.0.0 +0 -0
  96. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_south/0.0.0 +0 -0
  97. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_west/0.0.0 +0 -0
  98. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_east/0.0.0 +0 -0
  99. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_south/0.0.0 +0 -0
  100. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_west/0.0.0 +0 -0
  101. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_east/0.0.0 +0 -0
  102. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_south/0.0.0 +0 -0
  103. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_west/0.0.0 +0 -0
  104. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_east/0.0.0 +0 -0
  105. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_south/0.0.0 +0 -0
  106. roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_west/0.0.0 +0 -0
  107. roms_tools/tests/test_setup/test_data/bgc_surface_forcing.zarr/.zattrs +1 -1
  108. roms_tools/tests/test_setup/test_data/bgc_surface_forcing.zarr/.zmetadata +1 -1
  109. roms_tools/tests/test_setup/test_data/bgc_surface_forcing.zarr/dust/0.0.0 +0 -0
  110. roms_tools/tests/test_setup/test_data/bgc_surface_forcing.zarr/iron/0.0.0 +0 -0
  111. roms_tools/tests/test_setup/test_data/bgc_surface_forcing.zarr/nhy/0.0.0 +0 -0
  112. roms_tools/tests/test_setup/test_data/bgc_surface_forcing.zarr/nox/0.0.0 +0 -0
  113. roms_tools/tests/test_setup/test_data/bgc_surface_forcing.zarr/pco2_air/0.0.0 +0 -0
  114. roms_tools/tests/test_setup/test_data/bgc_surface_forcing.zarr/pco2_air_alt/0.0.0 +0 -0
  115. roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/.zattrs +1 -1
  116. roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/.zmetadata +1 -1
  117. roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/dust/0.0.0 +0 -0
  118. roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/iron/0.0.0 +0 -0
  119. roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/nhy/0.0.0 +0 -0
  120. roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/nox/0.0.0 +0 -0
  121. roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/pco2_air/0.0.0 +0 -0
  122. roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/pco2_air_alt/0.0.0 +0 -0
  123. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/.zmetadata +7 -0
  124. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/abs_time/.zattrs +3 -0
  125. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/salt_east/0.0.0 +0 -0
  126. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/salt_south/0.0.0 +0 -0
  127. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/temp_east/0.0.0 +0 -0
  128. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/temp_south/0.0.0 +0 -0
  129. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/u_east/0.0.0 +0 -0
  130. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/u_north/0.0.0 +0 -0
  131. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/u_south/0.0.0 +0 -0
  132. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/u_west/0.0.0 +0 -0
  133. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/ubar_east/0.0 +0 -0
  134. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/ubar_north/0.0 +0 -0
  135. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/ubar_south/0.0 +0 -0
  136. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/ubar_west/0.0 +0 -0
  137. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_east/0.0.0 +0 -0
  138. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_north/0.0.0 +0 -0
  139. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_south/0.0.0 +0 -0
  140. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_west/0.0.0 +0 -0
  141. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_east/0.0 +0 -0
  142. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_north/0.0 +0 -0
  143. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_south/0.0 +0 -0
  144. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_west/0.0 +0 -0
  145. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/zeta_east/.zattrs +1 -0
  146. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/zeta_east/0.0 +0 -0
  147. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/zeta_north/.zattrs +1 -0
  148. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/zeta_south/.zattrs +1 -0
  149. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/zeta_south/0.0 +0 -0
  150. roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/zeta_west/.zattrs +1 -0
  151. roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/.zattrs +1 -1
  152. roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/.zmetadata +1 -1
  153. roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/Tair/0.0.0 +0 -0
  154. roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/lwrad/0.0.0 +0 -0
  155. roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/qair/0.0.0 +0 -0
  156. roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/rain/0.0.0 +0 -0
  157. roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/swrad/0.0.0 +0 -0
  158. roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/uwnd/0.0.0 +0 -0
  159. roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/vwnd/0.0.0 +0 -0
  160. roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/.zattrs +1 -1
  161. roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/.zmetadata +1 -1
  162. roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/Tair/0.0.0 +0 -0
  163. roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/lwrad/0.0.0 +0 -0
  164. roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/qair/0.0.0 +0 -0
  165. roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/rain/0.0.0 +0 -0
  166. roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/swrad/0.0.0 +0 -0
  167. roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/uwnd/0.0.0 +0 -0
  168. roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/vwnd/0.0.0 +0 -0
  169. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/ALK/0.0.0.0 +0 -0
  170. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/ALK_ALT_CO2/0.0.0.0 +0 -0
  171. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DIC/0.0.0.0 +0 -0
  172. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DIC_ALT_CO2/0.0.0.0 +0 -0
  173. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOC/0.0.0.0 +0 -0
  174. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOCr/0.0.0.0 +0 -0
  175. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DON/0.0.0.0 +0 -0
  176. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DONr/0.0.0.0 +0 -0
  177. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOP/0.0.0.0 +0 -0
  178. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOPr/0.0.0.0 +0 -0
  179. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/Fe/0.0.0.0 +0 -0
  180. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/Lig/0.0.0.0 +0 -0
  181. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/NH4/0.0.0.0 +0 -0
  182. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/NO3/0.0.0.0 +0 -0
  183. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/O2/0.0.0.0 +0 -0
  184. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/PO4/0.0.0.0 +0 -0
  185. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/SiO3/0.0.0.0 +0 -0
  186. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatC/0.0.0.0 +0 -0
  187. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatChl/0.0.0.0 +0 -0
  188. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatFe/0.0.0.0 +0 -0
  189. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatP/0.0.0.0 +0 -0
  190. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatSi/0.0.0.0 +0 -0
  191. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazC/0.0.0.0 +0 -0
  192. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazChl/0.0.0.0 +0 -0
  193. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazFe/0.0.0.0 +0 -0
  194. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazP/0.0.0.0 +0 -0
  195. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/salt/0.0.0.0 +0 -0
  196. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spC/0.0.0.0 +0 -0
  197. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spCaCO3/0.0.0.0 +0 -0
  198. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spChl/0.0.0.0 +0 -0
  199. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spFe/0.0.0.0 +0 -0
  200. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spP/0.0.0.0 +0 -0
  201. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/temp/0.0.0.0 +0 -0
  202. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/u/0.0.0.0 +0 -0
  203. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/ubar/0.0.0 +0 -0
  204. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/v/0.0.0.0 +0 -0
  205. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/vbar/0.0.0 +0 -0
  206. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/zeta/0.0.0 +0 -0
  207. roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/zooC/0.0.0.0 +0 -0
  208. roms_tools/tests/test_setup/test_data/surface_forcing.zarr/.zattrs +1 -1
  209. roms_tools/tests/test_setup/test_data/surface_forcing.zarr/.zmetadata +1 -1
  210. roms_tools/tests/test_setup/test_data/surface_forcing.zarr/Tair/0.0.0 +0 -0
  211. roms_tools/tests/test_setup/test_data/surface_forcing.zarr/lwrad/0.0.0 +0 -0
  212. roms_tools/tests/test_setup/test_data/surface_forcing.zarr/qair/0.0.0 +0 -0
  213. roms_tools/tests/test_setup/test_data/surface_forcing.zarr/rain/0.0.0 +0 -0
  214. roms_tools/tests/test_setup/test_data/surface_forcing.zarr/swrad/0.0.0 +0 -0
  215. roms_tools/tests/test_setup/test_data/surface_forcing.zarr/uwnd/0.0.0 +0 -0
  216. roms_tools/tests/test_setup/test_data/surface_forcing.zarr/vwnd/0.0.0 +0 -0
  217. roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/.zattrs +1 -1
  218. roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/.zmetadata +4 -2
  219. roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/omega/.zattrs +3 -1
  220. roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/pot_Im/0.0.0 +0 -0
  221. roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/pot_Re/0.0.0 +0 -0
  222. roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/ssh_Im/0.0.0 +0 -0
  223. roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/ssh_Re/0.0.0 +0 -0
  224. roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/u_Im/0.0.0 +0 -0
  225. roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/u_Re/0.0.0 +0 -0
  226. roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/v_Im/0.0.0 +0 -0
  227. roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/v_Re/0.0.0 +0 -0
  228. roms_tools/tests/test_setup/test_datasets.py +79 -21
  229. roms_tools/tests/test_setup/test_fill.py +18 -105
  230. roms_tools/tests/test_setup/test_initial_conditions.py +21 -21
  231. roms_tools/tests/test_setup/test_regrid.py +2 -8
  232. roms_tools/tests/test_setup/test_surface_forcing.py +3 -3
  233. roms_tools/tests/test_setup/test_tides.py +1 -1
  234. {roms_tools-1.5.0.dist-info → roms_tools-1.6.0.dist-info}/METADATA +12 -3
  235. {roms_tools-1.5.0.dist-info → roms_tools-1.6.0.dist-info}/RECORD +238 -238
  236. {roms_tools-1.5.0.dist-info → roms_tools-1.6.0.dist-info}/WHEEL +1 -1
  237. {roms_tools-1.5.0.dist-info → roms_tools-1.6.0.dist-info}/LICENSE +0 -0
  238. {roms_tools-1.5.0.dist-info → roms_tools-1.6.0.dist-info}/top_level.txt +0 -0
@@ -1,110 +1,18 @@
1
1
  import pytest
2
- from roms_tools.setup.datasets import (
3
- GLORYSDataset,
4
- ERA5Dataset,
5
- CESMBGCDataset,
6
- CESMBGCSurfaceForcingDataset,
7
- TPXODataset,
8
- )
9
- from roms_tools.setup.download import download_test_data
10
2
  from roms_tools.setup.fill import LateralFill
11
- from roms_tools.setup.utils import extrapolate_deepest_to_bottom
12
- from datetime import datetime
13
3
  import numpy as np
14
4
  import xarray as xr
15
5
 
16
6
 
17
- @pytest.fixture()
18
- def era5_data(request, use_dask):
19
- fname = download_test_data("ERA5_regional_test_data.nc")
20
- data = ERA5Dataset(
21
- filename=fname,
22
- start_time=datetime(2020, 1, 31),
23
- end_time=datetime(2020, 2, 2),
24
- use_dask=use_dask,
25
- )
26
-
27
- return data
28
-
29
-
30
- @pytest.fixture()
31
- def glorys_data(request, use_dask):
32
- # the following GLORYS data has a wide enough domain
33
- # to have different masks for tracers vs. velocities
34
- fname = download_test_data("GLORYS_test_data.nc")
35
-
36
- data = GLORYSDataset(
37
- filename=fname,
38
- start_time=datetime(2012, 1, 1),
39
- end_time=datetime(2013, 1, 1),
40
- use_dask=use_dask,
41
- )
42
-
43
- ds = data.ds.isel(depth=[0, 10, 30])
44
- object.__setattr__(data, "ds", ds)
45
-
46
- # extrapolate deepest value to bottom so all levels can use the same surface mask
47
- for var in data.var_names:
48
- if var != "zeta":
49
- data.ds[data.var_names[var]] = extrapolate_deepest_to_bottom(
50
- data.ds[data.var_names[var]], data.dim_names["depth"]
51
- )
52
-
53
- return data
54
-
55
-
56
- @pytest.fixture()
57
- def tpxo_data(request, use_dask):
58
- fname = download_test_data("TPXO_regional_test_data.nc")
59
-
60
- data = TPXODataset(
61
- filename=fname,
62
- use_dask=use_dask,
63
- )
64
-
65
- return data
66
-
67
-
68
- @pytest.fixture()
69
- def cesm_bgc_data(request, use_dask):
70
- fname = download_test_data("CESM_BGC_2012.nc")
71
-
72
- data = CESMBGCDataset(
73
- filename=fname,
74
- start_time=datetime(2012, 1, 1),
75
- end_time=datetime(2013, 1, 1),
76
- climatology=False,
77
- use_dask=use_dask,
78
- )
79
-
80
- # extrapolate deepest value to bottom so all levels can use the same surface mask
81
- for var in data.var_names:
82
- data.ds[data.var_names[var]] = extrapolate_deepest_to_bottom(
83
- data.ds[data.var_names[var]], data.dim_names["depth"]
84
- )
85
-
86
- return data
87
-
88
-
89
- @pytest.fixture()
90
- def cesm_surface_bgc_data(request, use_dask):
91
- fname = download_test_data("CESM_BGC_SURFACE_2012.nc")
92
-
93
- data = CESMBGCSurfaceForcingDataset(
94
- filename=fname,
95
- start_time=datetime(2012, 1, 1),
96
- end_time=datetime(2013, 1, 1),
97
- climatology=False,
98
- use_dask=use_dask,
99
- )
100
- data.post_process()
101
-
102
- return data
103
-
104
-
105
7
  @pytest.mark.parametrize(
106
8
  "data_fixture",
107
- ["era5_data", "glorys_data", "tpxo_data", "cesm_bgc_data", "cesm_surface_bgc_data"],
9
+ [
10
+ "era5_data",
11
+ "glorys_data",
12
+ "tpxo_data",
13
+ "coarsened_cesm_bgc_data",
14
+ "cesm_surface_bgc_data",
15
+ ],
108
16
  )
109
17
  def test_lateral_fill_no_nans(data_fixture, request):
110
18
  data = request.getfixturevalue(data_fixture)
@@ -128,18 +36,23 @@ def test_lateral_fill_no_nans(data_fixture, request):
128
36
  assert not filled.isnull().any()
129
37
 
130
38
 
131
- def test_lateral_fill_correct_order_of_magnitude(cesm_bgc_data):
39
+ def test_lateral_fill_correct_order_of_magnitude(coarsened_cesm_bgc_data):
132
40
 
133
41
  lateral_fill = LateralFill(
134
- cesm_bgc_data.ds["mask"],
135
- [cesm_bgc_data.dim_names["latitude"], cesm_bgc_data.dim_names["longitude"]],
42
+ coarsened_cesm_bgc_data.ds["mask"],
43
+ [
44
+ coarsened_cesm_bgc_data.dim_names["latitude"],
45
+ coarsened_cesm_bgc_data.dim_names["longitude"],
46
+ ],
136
47
  )
137
48
 
138
- ALK = cesm_bgc_data.ds["ALK"]
49
+ ALK = coarsened_cesm_bgc_data.ds["ALK"]
139
50
 
140
51
  # zero out alkalinity field in all depth levels but the uppermost
141
- ALK = xr.where(cesm_bgc_data.ds.ALK.depth > 25, 0, cesm_bgc_data.ds.ALK)
142
- ALK = ALK.where(cesm_bgc_data.ds.mask)
52
+ ALK = xr.where(
53
+ coarsened_cesm_bgc_data.ds.ALK.depth > 25, 0, coarsened_cesm_bgc_data.ds.ALK
54
+ )
55
+ ALK = ALK.where(coarsened_cesm_bgc_data.ds.mask)
143
56
 
144
57
  filled = lateral_fill.apply(ALK.astype(np.float64))
145
58
 
@@ -181,37 +181,37 @@ def test_initial_conditions_plot_save(
181
181
  ):
182
182
  """Test plot and save methods."""
183
183
 
184
- initial_conditions_with_bgc_from_climatology.plot(varname="temp", s=0)
184
+ initial_conditions_with_bgc_from_climatology.plot(var_name="temp", s=0)
185
185
  initial_conditions_with_bgc_from_climatology.plot(
186
- varname="temp", s=0, depth_contours=True
186
+ var_name="temp", s=0, depth_contours=True
187
187
  )
188
188
  initial_conditions_with_bgc_from_climatology.plot(
189
- varname="temp", eta=0, layer_contours=True
189
+ var_name="temp", eta=0, layer_contours=True
190
190
  )
191
191
  initial_conditions_with_bgc_from_climatology.plot(
192
- varname="temp", xi=0, layer_contours=True
192
+ var_name="temp", xi=0, layer_contours=True
193
193
  )
194
- initial_conditions_with_bgc_from_climatology.plot(varname="temp", eta=0)
195
- initial_conditions_with_bgc_from_climatology.plot(varname="temp", xi=0)
196
- initial_conditions_with_bgc_from_climatology.plot(varname="temp", s=0, xi=0)
197
- initial_conditions_with_bgc_from_climatology.plot(varname="temp", eta=0, xi=0)
194
+ initial_conditions_with_bgc_from_climatology.plot(var_name="temp", eta=0)
195
+ initial_conditions_with_bgc_from_climatology.plot(var_name="temp", xi=0)
196
+ initial_conditions_with_bgc_from_climatology.plot(var_name="temp", s=0, xi=0)
197
+ initial_conditions_with_bgc_from_climatology.plot(var_name="temp", eta=0, xi=0)
198
198
  initial_conditions_with_bgc_from_climatology.plot(
199
- varname="u", s=0, layer_contours=True
199
+ var_name="u", s=0, layer_contours=True
200
200
  )
201
- initial_conditions_with_bgc_from_climatology.plot(varname="u", s=0)
202
- initial_conditions_with_bgc_from_climatology.plot(varname="u", eta=0)
203
- initial_conditions_with_bgc_from_climatology.plot(varname="u", xi=0)
201
+ initial_conditions_with_bgc_from_climatology.plot(var_name="u", s=0)
202
+ initial_conditions_with_bgc_from_climatology.plot(var_name="u", eta=0)
203
+ initial_conditions_with_bgc_from_climatology.plot(var_name="u", xi=0)
204
204
  initial_conditions_with_bgc_from_climatology.plot(
205
- varname="v", s=0, layer_contours=True
205
+ var_name="v", s=0, layer_contours=True
206
206
  )
207
- initial_conditions_with_bgc_from_climatology.plot(varname="v", s=0)
208
- initial_conditions_with_bgc_from_climatology.plot(varname="v", eta=0)
209
- initial_conditions_with_bgc_from_climatology.plot(varname="v", xi=0)
210
- initial_conditions_with_bgc_from_climatology.plot(varname="zeta")
211
- initial_conditions_with_bgc_from_climatology.plot(varname="ubar")
212
- initial_conditions_with_bgc_from_climatology.plot(varname="vbar")
213
- initial_conditions_with_bgc_from_climatology.plot(varname="ALK", s=0, xi=0)
214
- initial_conditions_with_bgc_from_climatology.plot(varname="ALK", eta=0, xi=0)
207
+ initial_conditions_with_bgc_from_climatology.plot(var_name="v", s=0)
208
+ initial_conditions_with_bgc_from_climatology.plot(var_name="v", eta=0)
209
+ initial_conditions_with_bgc_from_climatology.plot(var_name="v", xi=0)
210
+ initial_conditions_with_bgc_from_climatology.plot(var_name="zeta")
211
+ initial_conditions_with_bgc_from_climatology.plot(var_name="ubar")
212
+ initial_conditions_with_bgc_from_climatology.plot(var_name="vbar")
213
+ initial_conditions_with_bgc_from_climatology.plot(var_name="ALK", s=0, xi=0)
214
+ initial_conditions_with_bgc_from_climatology.plot(var_name="ALK", eta=0, xi=0)
215
215
 
216
216
  for file_str in ["test_ic", "test_ic.nc"]:
217
217
  # Create a temporary filepath using the tmp_path fixture
@@ -18,16 +18,10 @@ def vertical_regridder(depth_values, layer_depth_rho_values):
18
18
  def __init__(self, ds):
19
19
  self.ds = ds
20
20
 
21
- # Creating minimal mock data for testing
22
- # Depth levels in meters
23
-
24
- # Create mock datasets for DataContainer and Grid
25
- data_ds = xr.Dataset({"depth": (["depth"], depth_values)})
26
21
  target_depth = xr.DataArray(data=layer_depth_rho_values, dims=["s_rho"])
27
- # Instantiate DataContainer and Grid objects with mock datasets
28
- mock_data = DataContainer(data_ds)
22
+ source_depth = xr.DataArray(data=depth_values, dims=["depth"])
29
23
 
30
- return VerticalRegrid(mock_data, target_depth)
24
+ return VerticalRegrid(target_depth, source_depth)
31
25
 
32
26
 
33
27
  @pytest.mark.parametrize(
@@ -516,7 +516,7 @@ def test_surface_forcing_pco2_replication(sfc_forcing_fixture, request):
516
516
  def test_surface_forcing_plot_save(sfc_forcing_fixture, request, tmp_path):
517
517
  """Test plot and save methods."""
518
518
  sfc_forcing = request.getfixturevalue(sfc_forcing_fixture)
519
- sfc_forcing.plot(varname="uwnd", time=0)
519
+ sfc_forcing.plot(var_name="uwnd", time=0)
520
520
 
521
521
  for file_str in ["test_sf", "test_sf.nc"]:
522
522
  # Create a temporary filepath using the tmp_path fixture
@@ -549,7 +549,7 @@ def test_surface_forcing_bgc_plot_save(bgc_surface_forcing, tmp_path):
549
549
  """Test plot and save methods."""
550
550
 
551
551
  # Check the values in the dataset
552
- bgc_surface_forcing.plot(varname="pco2_air", time=0)
552
+ bgc_surface_forcing.plot(var_name="pco2_air", time=0)
553
553
 
554
554
  for file_str in ["test_sf", "test_sf.nc"]:
555
555
  # Create a temporary filepath using the tmp_path fixture
@@ -584,7 +584,7 @@ def test_surface_forcing_bgc_from_clim_plot_save(
584
584
  """Test plot and save methods."""
585
585
 
586
586
  # Check the values in the dataset
587
- bgc_surface_forcing_from_climatology.plot(varname="pco2_air", time=0)
587
+ bgc_surface_forcing_from_climatology.plot(var_name="pco2_air", time=0)
588
588
 
589
589
  for file_str in ["test_sf", "test_sf.nc"]:
590
590
  # Create a temporary filepath using the tmp_path fixture
@@ -174,7 +174,7 @@ def test_tidal_forcing_plot_save(tidal_forcing, tmp_path):
174
174
  computed."""
175
175
  tidal_forcing.ds.load()
176
176
 
177
- tidal_forcing.plot(varname="ssh_Re", ntides=0)
177
+ tidal_forcing.plot(var_name="ssh_Re", ntides=0)
178
178
 
179
179
  for file_str in ["test_tides", "test_tides.nc"]:
180
180
  # Create a temporary filepath using the tmp_path fixture
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: roms-tools
3
- Version: 1.5.0
3
+ Version: 1.6.0
4
4
  Summary: Tools for running and analysing UCLA-ROMS simulations
5
5
  Author-email: Nora Loose <nora.loose@gmail.com>, Thomas Nicholas <tom@cworthy.org>
6
6
  License: Apache-2
@@ -34,6 +34,7 @@ Provides-Extra: dask
34
34
  Requires-Dist: dask; extra == "dask"
35
35
 
36
36
  # ROMS-Tools
37
+ [![Conda version](https://img.shields.io/conda/vn/conda-forge/roms-tools.svg)](https://anaconda.org/conda-forge/roms-tools)
37
38
  [![PyPI version](https://img.shields.io/pypi/v/roms-tools.svg)](https://pypi.org/project/roms-tools/)
38
39
  [![codecov](https://codecov.io/gh/CWorthy-ocean/roms-tools/graph/badge.svg?token=5S1oNu39xE)](https://codecov.io/gh/CWorthy-ocean/roms-tools)
39
40
  [![Documentation Status](https://readthedocs.org/projects/roms-tools/badge/?version=latest)](https://roms-tools.readthedocs.io/en/latest/?badge=latest)
@@ -49,6 +50,14 @@ A suite of python tools for setting up a [ROMS](https://github.com/CESR-lab/ucla
49
50
 
50
51
  ## Installation
51
52
 
53
+ ### Installation from conda forge
54
+
55
+ ```bash
56
+ conda install -c conda-forge roms-tools
57
+ ```
58
+
59
+ This command installs `ROMS-Tools` along with its `dask` dependency.
60
+
52
61
  ### Installation from pip
53
62
 
54
63
  ```bash
@@ -75,7 +84,7 @@ Next, install and activate the following conda environment:
75
84
 
76
85
  ```bash
77
86
  conda env create -f ci/environment.yml
78
- conda activate romstools
87
+ conda activate romstools-test
79
88
  ```
80
89
 
81
90
  Finally, install `ROMS-Tools` in the same environment:
@@ -97,7 +106,7 @@ pip install -e .[dask]
97
106
  Before running the tests, you can activate the conda environment created in the previous section:
98
107
 
99
108
  ```bash
100
- conda activate romstools
109
+ conda activate romstools-test
101
110
  ```
102
111
 
103
112
  Check the installation of `ROMS-Tools` has worked by running the test suite