ocean-metrics 0.1.0__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 (357) hide show
  1. ocean_metrics-0.1.0/LICENSE +201 -0
  2. ocean_metrics-0.1.0/MANIFEST.in +13 -0
  3. ocean_metrics-0.1.0/PKG-INFO +165 -0
  4. ocean_metrics-0.1.0/README.md +63 -0
  5. ocean_metrics-0.1.0/ocean_metrics/__init__.py +176 -0
  6. ocean_metrics-0.1.0/ocean_metrics/_display.py +115 -0
  7. ocean_metrics-0.1.0/ocean_metrics/_docs.py +148 -0
  8. ocean_metrics-0.1.0/ocean_metrics/_overlay.py +185 -0
  9. ocean_metrics-0.1.0/ocean_metrics/_stacklevel.py +51 -0
  10. ocean_metrics-0.1.0/ocean_metrics/align.py +3940 -0
  11. ocean_metrics-0.1.0/ocean_metrics/build.py +5687 -0
  12. ocean_metrics-0.1.0/ocean_metrics/cache.py +801 -0
  13. ocean_metrics-0.1.0/ocean_metrics/casts.py +379 -0
  14. ocean_metrics-0.1.0/ocean_metrics/catalog.py +1892 -0
  15. ocean_metrics-0.1.0/ocean_metrics/catalogs/README.md +11 -0
  16. ocean_metrics-0.1.0/ocean_metrics/catalogs/coastwatch.yaml +1362 -0
  17. ocean_metrics-0.1.0/ocean_metrics/catalogs/copernicus.yaml +2243 -0
  18. ocean_metrics-0.1.0/ocean_metrics/catalogs/glodap.yaml +73 -0
  19. ocean_metrics-0.1.0/ocean_metrics/catalogs/modis_aqua.yaml +16616 -0
  20. ocean_metrics-0.1.0/ocean_metrics/catalogs/oceansoda.yaml +80 -0
  21. ocean_metrics-0.1.0/ocean_metrics/catalogs/ooi_papa.yaml +2742 -0
  22. ocean_metrics-0.1.0/ocean_metrics/catalogs/whots.yaml +21356 -0
  23. ocean_metrics-0.1.0/ocean_metrics/catalogs/woa.yaml +3232 -0
  24. ocean_metrics-0.1.0/ocean_metrics/cf.py +92 -0
  25. ocean_metrics-0.1.0/ocean_metrics/colormaps.py +782 -0
  26. ocean_metrics-0.1.0/ocean_metrics/combine.py +220 -0
  27. ocean_metrics-0.1.0/ocean_metrics/comparison.py +16061 -0
  28. ocean_metrics-0.1.0/ocean_metrics/config.py +633 -0
  29. ocean_metrics-0.1.0/ocean_metrics/depth_convention.py +871 -0
  30. ocean_metrics-0.1.0/ocean_metrics/detide.py +594 -0
  31. ocean_metrics-0.1.0/ocean_metrics/extrema.py +1251 -0
  32. ocean_metrics-0.1.0/ocean_metrics/field.py +3128 -0
  33. ocean_metrics-0.1.0/ocean_metrics/horizontal.py +135 -0
  34. ocean_metrics-0.1.0/ocean_metrics/input_integrity.py +1424 -0
  35. ocean_metrics-0.1.0/ocean_metrics/internal_tides.py +120 -0
  36. ocean_metrics-0.1.0/ocean_metrics/metrics.py +625 -0
  37. ocean_metrics-0.1.0/ocean_metrics/mld.py +361 -0
  38. ocean_metrics-0.1.0/ocean_metrics/obs/__init__.py +6 -0
  39. ocean_metrics-0.1.0/ocean_metrics/obs/modis.py +256 -0
  40. ocean_metrics-0.1.0/ocean_metrics/operators.py +2810 -0
  41. ocean_metrics-0.1.0/ocean_metrics/outputs.py +114 -0
  42. ocean_metrics-0.1.0/ocean_metrics/pairs.py +785 -0
  43. ocean_metrics-0.1.0/ocean_metrics/pick.py +221 -0
  44. ocean_metrics-0.1.0/ocean_metrics/plot/__init__.py +13 -0
  45. ocean_metrics-0.1.0/ocean_metrics/plot/_colorbar.py +337 -0
  46. ocean_metrics-0.1.0/ocean_metrics/plot/_facets.py +345 -0
  47. ocean_metrics-0.1.0/ocean_metrics/plot/_geo_labels.py +85 -0
  48. ocean_metrics-0.1.0/ocean_metrics/plot/_numbers.py +52 -0
  49. ocean_metrics-0.1.0/ocean_metrics/plot/_statistic.py +103 -0
  50. ocean_metrics-0.1.0/ocean_metrics/plot/_taylor.py +254 -0
  51. ocean_metrics-0.1.0/ocean_metrics/plot/_titles.py +137 -0
  52. ocean_metrics-0.1.0/ocean_metrics/plot/_weighting.py +94 -0
  53. ocean_metrics-0.1.0/ocean_metrics/plot/coastline.py +127 -0
  54. ocean_metrics-0.1.0/ocean_metrics/plot/holoviews_renderer.py +8792 -0
  55. ocean_metrics-0.1.0/ocean_metrics/plot/locations.py +770 -0
  56. ocean_metrics-0.1.0/ocean_metrics/plot/map_contours.py +300 -0
  57. ocean_metrics-0.1.0/ocean_metrics/plot/map_locations.py +897 -0
  58. ocean_metrics-0.1.0/ocean_metrics/plot/map_metrics.py +890 -0
  59. ocean_metrics-0.1.0/ocean_metrics/plot/matplotlib_renderer.py +11087 -0
  60. ocean_metrics-0.1.0/ocean_metrics/plot/metrics_series.py +490 -0
  61. ocean_metrics-0.1.0/ocean_metrics/plot/portrait.py +318 -0
  62. ocean_metrics-0.1.0/ocean_metrics/plot/profile.py +970 -0
  63. ocean_metrics-0.1.0/ocean_metrics/plot/proj_check.py +90 -0
  64. ocean_metrics-0.1.0/ocean_metrics/plot/registry.py +98 -0
  65. ocean_metrics-0.1.0/ocean_metrics/plot/section.py +1505 -0
  66. ocean_metrics-0.1.0/ocean_metrics/plot/series.py +1843 -0
  67. ocean_metrics-0.1.0/ocean_metrics/plot/spec.py +349 -0
  68. ocean_metrics-0.1.0/ocean_metrics/plot/style.py +490 -0
  69. ocean_metrics-0.1.0/ocean_metrics/plot/summary.py +2345 -0
  70. ocean_metrics-0.1.0/ocean_metrics/plot/time_depth.py +215 -0
  71. ocean_metrics-0.1.0/ocean_metrics/plot/typography.py +914 -0
  72. ocean_metrics-0.1.0/ocean_metrics/plot/xy.py +1077 -0
  73. ocean_metrics-0.1.0/ocean_metrics/qc.py +963 -0
  74. ocean_metrics-0.1.0/ocean_metrics/readers.py +175 -0
  75. ocean_metrics-0.1.0/ocean_metrics/river_inputs.py +1605 -0
  76. ocean_metrics-0.1.0/ocean_metrics/roms.py +2171 -0
  77. ocean_metrics-0.1.0/ocean_metrics/run_health.py +2485 -0
  78. ocean_metrics-0.1.0/ocean_metrics/scripts/__init__.py +5 -0
  79. ocean_metrics-0.1.0/ocean_metrics/sources.py +916 -0
  80. ocean_metrics-0.1.0/ocean_metrics/suites/__init__.py +14 -0
  81. ocean_metrics-0.1.0/ocean_metrics/suites/cover.py +755 -0
  82. ocean_metrics-0.1.0/ocean_metrics/suites/new.py +807 -0
  83. ocean_metrics-0.1.0/ocean_metrics/suites/pages.py +2958 -0
  84. ocean_metrics-0.1.0/ocean_metrics/suites/report.py +914 -0
  85. ocean_metrics-0.1.0/ocean_metrics/suites/run.py +1843 -0
  86. ocean_metrics-0.1.0/ocean_metrics/suites/templates/final-report.yaml +597 -0
  87. ocean_metrics-0.1.0/ocean_metrics/suites/templates/input-check.yaml +448 -0
  88. ocean_metrics-0.1.0/ocean_metrics/suites/templates/mid-run-check.yaml +358 -0
  89. ocean_metrics-0.1.0/ocean_metrics/suites/templates/model-comparison.yaml +523 -0
  90. ocean_metrics-0.1.0/ocean_metrics/table.py +1413 -0
  91. ocean_metrics-0.1.0/ocean_metrics/tabular.py +1531 -0
  92. ocean_metrics-0.1.0/ocean_metrics/tides.py +352 -0
  93. ocean_metrics-0.1.0/ocean_metrics/time_zone.py +720 -0
  94. ocean_metrics-0.1.0/ocean_metrics/transect.py +1457 -0
  95. ocean_metrics-0.1.0/ocean_metrics/units.py +976 -0
  96. ocean_metrics-0.1.0/ocean_metrics/vars.py +188 -0
  97. ocean_metrics-0.1.0/ocean_metrics/vertical.py +286 -0
  98. ocean_metrics-0.1.0/ocean_metrics/vocab/README.md +143 -0
  99. ocean_metrics-0.1.0/ocean_metrics/vocab/units.txt +42 -0
  100. ocean_metrics-0.1.0/ocean_metrics/vocab/vocabulary.yaml +431 -0
  101. ocean_metrics-0.1.0/ocean_metrics/vocabulary.py +1243 -0
  102. ocean_metrics-0.1.0/ocean_metrics/xy.py +788 -0
  103. ocean_metrics-0.1.0/ocean_metrics.egg-info/PKG-INFO +165 -0
  104. ocean_metrics-0.1.0/ocean_metrics.egg-info/SOURCES.txt +355 -0
  105. ocean_metrics-0.1.0/ocean_metrics.egg-info/dependency_links.txt +1 -0
  106. ocean_metrics-0.1.0/ocean_metrics.egg-info/entry_points.txt +3 -0
  107. ocean_metrics-0.1.0/ocean_metrics.egg-info/requires.txt +77 -0
  108. ocean_metrics-0.1.0/ocean_metrics.egg-info/scm_file_list.json +420 -0
  109. ocean_metrics-0.1.0/ocean_metrics.egg-info/scm_version.json +8 -0
  110. ocean_metrics-0.1.0/ocean_metrics.egg-info/top_level.txt +1 -0
  111. ocean_metrics-0.1.0/pyproject.toml +320 -0
  112. ocean_metrics-0.1.0/setup.cfg +4 -0
  113. ocean_metrics-0.1.0/tests/__init__.py +0 -0
  114. ocean_metrics-0.1.0/tests/_baseline_tl_check.py +594 -0
  115. ocean_metrics-0.1.0/tests/_projection.py +13 -0
  116. ocean_metrics-0.1.0/tests/_suite_fixture.py +1498 -0
  117. ocean_metrics-0.1.0/tests/_tidal_roms.py +132 -0
  118. ocean_metrics-0.1.0/tests/conftest.py +283 -0
  119. ocean_metrics-0.1.0/tests/test_aggregate_chain.py +375 -0
  120. ocean_metrics-0.1.0/tests/test_aggregate_chain_specs.py +272 -0
  121. ocean_metrics-0.1.0/tests/test_aggregate_fan.py +418 -0
  122. ocean_metrics-0.1.0/tests/test_align_climatology_survival.py +104 -0
  123. ocean_metrics-0.1.0/tests/test_antimeridian.py +963 -0
  124. ocean_metrics-0.1.0/tests/test_availability_probe.py +293 -0
  125. ocean_metrics-0.1.0/tests/test_average.py +483 -0
  126. ocean_metrics-0.1.0/tests/test_average_time_overlap.py +84 -0
  127. ocean_metrics-0.1.0/tests/test_axis_match.py +347 -0
  128. ocean_metrics-0.1.0/tests/test_boundary_transect.py +269 -0
  129. ocean_metrics-0.1.0/tests/test_box_select.py +357 -0
  130. ocean_metrics-0.1.0/tests/test_build_helpers.py +2984 -0
  131. ocean_metrics-0.1.0/tests/test_build_subchunk.py +242 -0
  132. ocean_metrics-0.1.0/tests/test_cache.py +643 -0
  133. ocean_metrics-0.1.0/tests/test_cache_definition_key.py +559 -0
  134. ocean_metrics-0.1.0/tests/test_cache_definition_plumbing.py +325 -0
  135. ocean_metrics-0.1.0/tests/test_calculator_plumbing.py +322 -0
  136. ocean_metrics-0.1.0/tests/test_casts.py +276 -0
  137. ocean_metrics-0.1.0/tests/test_catalog.py +1598 -0
  138. ocean_metrics-0.1.0/tests/test_cf.py +58 -0
  139. ocean_metrics-0.1.0/tests/test_chunk_warning.py +58 -0
  140. ocean_metrics-0.1.0/tests/test_climatology_follows_month.py +511 -0
  141. ocean_metrics-0.1.0/tests/test_coastline.py +99 -0
  142. ocean_metrics-0.1.0/tests/test_collapsed_time_record_crop.py +245 -0
  143. ocean_metrics-0.1.0/tests/test_color_limits.py +915 -0
  144. ocean_metrics-0.1.0/tests/test_colorbar_clipping.py +694 -0
  145. ocean_metrics-0.1.0/tests/test_colorbar_holoviews.py +657 -0
  146. ocean_metrics-0.1.0/tests/test_colorbar_static.py +495 -0
  147. ocean_metrics-0.1.0/tests/test_colorbar_ticks.py +156 -0
  148. ocean_metrics-0.1.0/tests/test_colormaps.py +380 -0
  149. ocean_metrics-0.1.0/tests/test_colormaps_forcing.py +36 -0
  150. ocean_metrics-0.1.0/tests/test_column_request.py +171 -0
  151. ocean_metrics-0.1.0/tests/test_combine.py +241 -0
  152. ocean_metrics-0.1.0/tests/test_compare_disjoint_time_reduced.py +195 -0
  153. ocean_metrics-0.1.0/tests/test_compare_from_pairs.py +1171 -0
  154. ocean_metrics-0.1.0/tests/test_compare_horizontal_aggregate_crop.py +348 -0
  155. ocean_metrics-0.1.0/tests/test_compare_lone_variable.py +87 -0
  156. ocean_metrics-0.1.0/tests/test_compare_overlap_skip.py +192 -0
  157. ocean_metrics-0.1.0/tests/test_compare_pair_errors.py +205 -0
  158. ocean_metrics-0.1.0/tests/test_compare_selects.py +565 -0
  159. ocean_metrics-0.1.0/tests/test_compare_skip_missing_masked_cell.py +84 -0
  160. ocean_metrics-0.1.0/tests/test_compare_times.py +1246 -0
  161. ocean_metrics-0.1.0/tests/test_compare_warning_summary.py +318 -0
  162. ocean_metrics-0.1.0/tests/test_comparison.py +666 -0
  163. ocean_metrics-0.1.0/tests/test_contour_pairing.py +325 -0
  164. ocean_metrics-0.1.0/tests/test_cross_section.py +527 -0
  165. ocean_metrics-0.1.0/tests/test_daily_mean_pruning.py +157 -0
  166. ocean_metrics-0.1.0/tests/test_depth_average.py +333 -0
  167. ocean_metrics-0.1.0/tests/test_depth_convention.py +1355 -0
  168. ocean_metrics-0.1.0/tests/test_depth_convention_compare.py +999 -0
  169. ocean_metrics-0.1.0/tests/test_detide.py +329 -0
  170. ocean_metrics-0.1.0/tests/test_detide_end_to_end.py +187 -0
  171. ocean_metrics-0.1.0/tests/test_detide_gaps.py +349 -0
  172. ocean_metrics-0.1.0/tests/test_detide_plumbing.py +206 -0
  173. ocean_metrics-0.1.0/tests/test_display.py +96 -0
  174. ocean_metrics-0.1.0/tests/test_docs_examples.py +453 -0
  175. ocean_metrics-0.1.0/tests/test_ensure_catalog.py +249 -0
  176. ocean_metrics-0.1.0/tests/test_erddap_qc_columns.py +173 -0
  177. ocean_metrics-0.1.0/tests/test_extrema.py +1256 -0
  178. ocean_metrics-0.1.0/tests/test_facet.py +1076 -0
  179. ocean_metrics-0.1.0/tests/test_fan_shared_read.py +352 -0
  180. ocean_metrics-0.1.0/tests/test_field_grid_defaults.py +402 -0
  181. ocean_metrics-0.1.0/tests/test_field_locations_overlay.py +515 -0
  182. ocean_metrics-0.1.0/tests/test_field_map_grid.py +562 -0
  183. ocean_metrics-0.1.0/tests/test_field_series.py +1235 -0
  184. ocean_metrics-0.1.0/tests/test_field_time_depth.py +993 -0
  185. ocean_metrics-0.1.0/tests/test_field_time_depth_request.py +268 -0
  186. ocean_metrics-0.1.0/tests/test_field_unreduced_vertical.py +256 -0
  187. ocean_metrics-0.1.0/tests/test_find_variable_mld.py +477 -0
  188. ocean_metrics-0.1.0/tests/test_forcing_catalog.py +1674 -0
  189. ocean_metrics-0.1.0/tests/test_forcing_restoring_names.py +89 -0
  190. ocean_metrics-0.1.0/tests/test_geo_labels.py +91 -0
  191. ocean_metrics-0.1.0/tests/test_grid_panels.py +939 -0
  192. ocean_metrics-0.1.0/tests/test_horizontal_gradient.py +355 -0
  193. ocean_metrics-0.1.0/tests/test_input_health.py +732 -0
  194. ocean_metrics-0.1.0/tests/test_install_hints.py +28 -0
  195. ocean_metrics-0.1.0/tests/test_internal_tides.py +101 -0
  196. ocean_metrics-0.1.0/tests/test_isopycnal.py +369 -0
  197. ocean_metrics-0.1.0/tests/test_latest.py +229 -0
  198. ocean_metrics-0.1.0/tests/test_layout_measures_without_painting.py +75 -0
  199. ocean_metrics-0.1.0/tests/test_level_labels.py +502 -0
  200. ocean_metrics-0.1.0/tests/test_load_by_time.py +267 -0
  201. ocean_metrics-0.1.0/tests/test_location_annotate.py +256 -0
  202. ocean_metrics-0.1.0/tests/test_location_annotate_holoviews.py +221 -0
  203. ocean_metrics-0.1.0/tests/test_location_legend_labels.py +653 -0
  204. ocean_metrics-0.1.0/tests/test_locations.py +659 -0
  205. ocean_metrics-0.1.0/tests/test_locations_selects.py +221 -0
  206. ocean_metrics-0.1.0/tests/test_map_contours_api.py +322 -0
  207. ocean_metrics-0.1.0/tests/test_map_contours_holoviews.py +89 -0
  208. ocean_metrics-0.1.0/tests/test_map_contours_static.py +76 -0
  209. ocean_metrics-0.1.0/tests/test_map_label_fit.py +247 -0
  210. ocean_metrics-0.1.0/tests/test_map_locations.py +612 -0
  211. ocean_metrics-0.1.0/tests/test_map_metrics.py +1034 -0
  212. ocean_metrics-0.1.0/tests/test_map_true_shape.py +284 -0
  213. ocean_metrics-0.1.0/tests/test_metric_colors.py +112 -0
  214. ocean_metrics-0.1.0/tests/test_metrics_chunking.py +71 -0
  215. ocean_metrics-0.1.0/tests/test_metrics_registry.py +245 -0
  216. ocean_metrics-0.1.0/tests/test_metrics_series.py +379 -0
  217. ocean_metrics-0.1.0/tests/test_min_coverage_plumbing.py +50 -0
  218. ocean_metrics-0.1.0/tests/test_mld.py +424 -0
  219. ocean_metrics-0.1.0/tests/test_mld_definitions.py +845 -0
  220. ocean_metrics-0.1.0/tests/test_modis_names.py +186 -0
  221. ocean_metrics-0.1.0/tests/test_movie.py +1158 -0
  222. ocean_metrics-0.1.0/tests/test_n_eff.py +624 -0
  223. ocean_metrics-0.1.0/tests/test_nearest_many.py +98 -0
  224. ocean_metrics-0.1.0/tests/test_open_reference.py +707 -0
  225. ocean_metrics-0.1.0/tests/test_operators.py +1832 -0
  226. ocean_metrics-0.1.0/tests/test_overlap_point_extent.py +230 -0
  227. ocean_metrics-0.1.0/tests/test_package.py +23 -0
  228. ocean_metrics-0.1.0/tests/test_pair_spec.py +844 -0
  229. ocean_metrics-0.1.0/tests/test_pairs_derive.py +1069 -0
  230. ocean_metrics-0.1.0/tests/test_pick.py +191 -0
  231. ocean_metrics-0.1.0/tests/test_plot_report_fixes.py +622 -0
  232. ocean_metrics-0.1.0/tests/test_point_column_materialize.py +216 -0
  233. ocean_metrics-0.1.0/tests/test_pool.py +327 -0
  234. ocean_metrics-0.1.0/tests/test_pooling.py +520 -0
  235. ocean_metrics-0.1.0/tests/test_portrait.py +583 -0
  236. ocean_metrics-0.1.0/tests/test_prepare_one_cell_roms.py +71 -0
  237. ocean_metrics-0.1.0/tests/test_prepare_ordering.py +228 -0
  238. ocean_metrics-0.1.0/tests/test_profile_climatology_time_targets.py +246 -0
  239. ocean_metrics-0.1.0/tests/test_profile_compare_depths.py +301 -0
  240. ocean_metrics-0.1.0/tests/test_profile_comparison.py +166 -0
  241. ocean_metrics-0.1.0/tests/test_profile_depth_matching.py +137 -0
  242. ocean_metrics-0.1.0/tests/test_profile_drift_position.py +126 -0
  243. ocean_metrics-0.1.0/tests/test_profile_featuretype.py +266 -0
  244. ocean_metrics-0.1.0/tests/test_profile_free_surface.py +357 -0
  245. ocean_metrics-0.1.0/tests/test_profile_literal_depths.py +320 -0
  246. ocean_metrics-0.1.0/tests/test_profile_point_window.py +184 -0
  247. ocean_metrics-0.1.0/tests/test_profile_renderers.py +2375 -0
  248. ocean_metrics-0.1.0/tests/test_profile_single_depth.py +197 -0
  249. ocean_metrics-0.1.0/tests/test_profile_time_interp.py +240 -0
  250. ocean_metrics-0.1.0/tests/test_proj_check.py +82 -0
  251. ocean_metrics-0.1.0/tests/test_qc.py +864 -0
  252. ocean_metrics-0.1.0/tests/test_readers.py +139 -0
  253. ocean_metrics-0.1.0/tests/test_refresh_segments.py +319 -0
  254. ocean_metrics-0.1.0/tests/test_regrid_memo.py +133 -0
  255. ocean_metrics-0.1.0/tests/test_regrid_target.py +351 -0
  256. ocean_metrics-0.1.0/tests/test_regrid_weights_cache.py +145 -0
  257. ocean_metrics-0.1.0/tests/test_relabel.py +244 -0
  258. ocean_metrics-0.1.0/tests/test_renderers.py +2353 -0
  259. ocean_metrics-0.1.0/tests/test_resample_empty_bins.py +67 -0
  260. ocean_metrics-0.1.0/tests/test_resolution.py +224 -0
  261. ocean_metrics-0.1.0/tests/test_river_inputs.py +715 -0
  262. ocean_metrics-0.1.0/tests/test_roms.py +79 -0
  263. ocean_metrics-0.1.0/tests/test_roms_chunking.py +94 -0
  264. ocean_metrics-0.1.0/tests/test_roms_classic_depth.py +376 -0
  265. ocean_metrics-0.1.0/tests/test_roms_classic_detect.py +265 -0
  266. ocean_metrics-0.1.0/tests/test_roms_classic_e2e.py +362 -0
  267. ocean_metrics-0.1.0/tests/test_roms_column_chunks.py +389 -0
  268. ocean_metrics-0.1.0/tests/test_roms_grid_names.py +332 -0
  269. ocean_metrics-0.1.0/tests/test_roms_one_cell_probe.py +204 -0
  270. ocean_metrics-0.1.0/tests/test_roms_store_grid.py +574 -0
  271. ocean_metrics-0.1.0/tests/test_roms_velocity.py +907 -0
  272. ocean_metrics-0.1.0/tests/test_row_colorbar_side.py +114 -0
  273. ocean_metrics-0.1.0/tests/test_run_health.py +696 -0
  274. ocean_metrics-0.1.0/tests/test_section.py +1369 -0
  275. ocean_metrics-0.1.0/tests/test_section_casts_holoviews.py +706 -0
  276. ocean_metrics-0.1.0/tests/test_section_casts_seafloor.py +740 -0
  277. ocean_metrics-0.1.0/tests/test_section_casts_static.py +698 -0
  278. ocean_metrics-0.1.0/tests/test_section_comparison.py +1257 -0
  279. ocean_metrics-0.1.0/tests/test_section_contours.py +773 -0
  280. ocean_metrics-0.1.0/tests/test_section_contours_holoviews.py +880 -0
  281. ocean_metrics-0.1.0/tests/test_section_contours_static.py +705 -0
  282. ocean_metrics-0.1.0/tests/test_section_x_axis.py +654 -0
  283. ocean_metrics-0.1.0/tests/test_select_aggregate_pair_spec.py +506 -0
  284. ocean_metrics-0.1.0/tests/test_series.py +1816 -0
  285. ocean_metrics-0.1.0/tests/test_series_renderers.py +2044 -0
  286. ocean_metrics-0.1.0/tests/test_skill_maps.py +253 -0
  287. ocean_metrics-0.1.0/tests/test_slab_section.py +852 -0
  288. ocean_metrics-0.1.0/tests/test_smoke_test_mode.py +356 -0
  289. ocean_metrics-0.1.0/tests/test_source_label.py +157 -0
  290. ocean_metrics-0.1.0/tests/test_sources.py +533 -0
  291. ocean_metrics-0.1.0/tests/test_sources_truncation_memo.py +150 -0
  292. ocean_metrics-0.1.0/tests/test_spatial_mean.py +262 -0
  293. ocean_metrics-0.1.0/tests/test_spread.py +379 -0
  294. ocean_metrics-0.1.0/tests/test_station_compare_depth.py +234 -0
  295. ocean_metrics-0.1.0/tests/test_station_record_past_model.py +295 -0
  296. ocean_metrics-0.1.0/tests/test_statistic_rendering.py +478 -0
  297. ocean_metrics-0.1.0/tests/test_statistic_units.py +228 -0
  298. ocean_metrics-0.1.0/tests/test_subset_to_time.py +276 -0
  299. ocean_metrics-0.1.0/tests/test_subset_to_time_slice.py +213 -0
  300. ocean_metrics-0.1.0/tests/test_subtract_mean.py +250 -0
  301. ocean_metrics-0.1.0/tests/test_subtract_mean_plumbing.py +152 -0
  302. ocean_metrics-0.1.0/tests/test_suite_files.py +274 -0
  303. ocean_metrics-0.1.0/tests/test_suite_health_pages.py +536 -0
  304. ocean_metrics-0.1.0/tests/test_suite_new.py +723 -0
  305. ocean_metrics-0.1.0/tests/test_suite_smoke_fixture.py +468 -0
  306. ocean_metrics-0.1.0/tests/test_suites_cover.py +320 -0
  307. ocean_metrics-0.1.0/tests/test_suites_layout.py +1446 -0
  308. ocean_metrics-0.1.0/tests/test_suites_pages.py +2595 -0
  309. ocean_metrics-0.1.0/tests/test_suites_report.py +743 -0
  310. ocean_metrics-0.1.0/tests/test_suites_run.py +2471 -0
  311. ocean_metrics-0.1.0/tests/test_suites_run_guardrails.py +1501 -0
  312. ocean_metrics-0.1.0/tests/test_suites_summary_pages.py +561 -0
  313. ocean_metrics-0.1.0/tests/test_suites_summary_pool.py +77 -0
  314. ocean_metrics-0.1.0/tests/test_summary_arrows.py +482 -0
  315. ocean_metrics-0.1.0/tests/test_summary_depth_key.py +123 -0
  316. ocean_metrics-0.1.0/tests/test_summary_groups.py +136 -0
  317. ocean_metrics-0.1.0/tests/test_summary_labels.py +417 -0
  318. ocean_metrics-0.1.0/tests/test_summary_normalize.py +776 -0
  319. ocean_metrics-0.1.0/tests/test_summary_style.py +1052 -0
  320. ocean_metrics-0.1.0/tests/test_summary_undefined_metrics.py +164 -0
  321. ocean_metrics-0.1.0/tests/test_surface_and_layers.py +786 -0
  322. ocean_metrics-0.1.0/tests/test_table.py +949 -0
  323. ocean_metrics-0.1.0/tests/test_table_read_options.py +1042 -0
  324. ocean_metrics-0.1.0/tests/test_tabular.py +935 -0
  325. ocean_metrics-0.1.0/tests/test_tidal_depth_matching.py +1004 -0
  326. ocean_metrics-0.1.0/tests/test_tidal_forcing_catalog.py +116 -0
  327. ocean_metrics-0.1.0/tests/test_tides.py +202 -0
  328. ocean_metrics-0.1.0/tests/test_tides_e2e.py +138 -0
  329. ocean_metrics-0.1.0/tests/test_time_depth_match.py +180 -0
  330. ocean_metrics-0.1.0/tests/test_time_first_crop.py +636 -0
  331. ocean_metrics-0.1.0/tests/test_time_gaps.py +412 -0
  332. ocean_metrics-0.1.0/tests/test_time_matching_fixes.py +337 -0
  333. ocean_metrics-0.1.0/tests/test_time_zone.py +1156 -0
  334. ocean_metrics-0.1.0/tests/test_times_pooling.py +492 -0
  335. ocean_metrics-0.1.0/tests/test_transect.py +273 -0
  336. ocean_metrics-0.1.0/tests/test_transect_compare.py +531 -0
  337. ocean_metrics-0.1.0/tests/test_transect_pair_spec.py +275 -0
  338. ocean_metrics-0.1.0/tests/test_transect_path_coords.py +380 -0
  339. ocean_metrics-0.1.0/tests/test_transect_paths.py +514 -0
  340. ocean_metrics-0.1.0/tests/test_tsp_compare_depths.py +454 -0
  341. ocean_metrics-0.1.0/tests/test_tsp_end_to_end.py +468 -0
  342. ocean_metrics-0.1.0/tests/test_tsp_singleton_time_over_time.py +209 -0
  343. ocean_metrics-0.1.0/tests/test_typography.py +1098 -0
  344. ocean_metrics-0.1.0/tests/test_units.py +722 -0
  345. ocean_metrics-0.1.0/tests/test_units_display.py +369 -0
  346. ocean_metrics-0.1.0/tests/test_untiled_frame.py +538 -0
  347. ocean_metrics-0.1.0/tests/test_variable_colors.py +152 -0
  348. ocean_metrics-0.1.0/tests/test_vertical_calculators.py +468 -0
  349. ocean_metrics-0.1.0/tests/test_vertical_match.py +274 -0
  350. ocean_metrics-0.1.0/tests/test_vocabulary.py +1384 -0
  351. ocean_metrics-0.1.0/tests/test_vocabulary_file.py +369 -0
  352. ocean_metrics-0.1.0/tests/test_warning_fixes.py +327 -0
  353. ocean_metrics-0.1.0/tests/test_whots_profile_end_to_end.py +157 -0
  354. ocean_metrics-0.1.0/tests/test_woa_monthly.py +284 -0
  355. ocean_metrics-0.1.0/tests/test_xy.py +874 -0
  356. ocean_metrics-0.1.0/tests/test_xy_holoviews.py +942 -0
  357. ocean_metrics-0.1.0/tests/test_xy_renderers.py +1482 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 [C]-Worthy LLC.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,13 @@
1
+ # setuptools_scm ships every git-tracked file; this file does the same job when the
2
+ # sdist is built without git (conda-forge builds from the sdist), and prunes what
3
+ # should not ship. Package data under ocean_metrics/ is picked up via pyproject.toml.
4
+ #
5
+ # The sdist holds only the package, tests, README, LICENSE, pyproject.toml and this file;
6
+ # everything else tracked in git is dev tooling and is left out.
7
+ prune docs
8
+ prune examples
9
+ prune ci
10
+ prune .github
11
+ exclude .pre-commit-config.yaml .readthedocs.yaml .git-blame-ignore-revs .gitignore
12
+ exclude AGENTS.md CLAUDE.md CITATION.cff codecov.yml coverage.toml environment.yml
13
+ recursive-include tests *.py
@@ -0,0 +1,165 @@
1
+ Metadata-Version: 2.4
2
+ Name: ocean-metrics
3
+ Version: 0.1.0
4
+ Summary: Model–data validation for ocean models: align model output with observations, compute skill metrics, and plot the comparison.
5
+ Author-email: Kristen Thyng <kristen.thyng@cworthy.org>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/CWorthy-ocean/ocean-metrics
8
+ Project-URL: Documentation, https://ocean-metrics.readthedocs.io
9
+ Project-URL: Source, https://github.com/CWorthy-ocean/ocean-metrics
10
+ Project-URL: Issues, https://github.com/CWorthy-ocean/ocean-metrics/issues
11
+ Project-URL: Changelog, https://ocean-metrics.readthedocs.io/en/latest/releases.html
12
+ Keywords: ocean,oceanography,ocean model,model validation,model evaluation,model-data comparison,skill assessment,skill metrics,biogeochemistry,ROMS,observations,xarray,intake
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Natural Language :: English
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Operating System :: POSIX :: Linux
18
+ Classifier: Programming Language :: Python
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Topic :: Scientific/Engineering
25
+ Classifier: Topic :: Scientific/Engineering :: Oceanography
26
+ Classifier: Topic :: Scientific/Engineering :: Visualization
27
+ Requires-Python: >=3.12
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ Requires-Dist: numpy
31
+ Requires-Dist: pandas
32
+ Requires-Dist: scipy
33
+ Requires-Dist: xarray
34
+ Requires-Dist: dask
35
+ Requires-Dist: netcdf4
36
+ Requires-Dist: h5netcdf
37
+ Requires-Dist: zarr
38
+ Requires-Dist: fsspec
39
+ Requires-Dist: aiohttp
40
+ Requires-Dist: requests
41
+ Requires-Dist: intake>=2
42
+ Requires-Dist: intake-erddap
43
+ Requires-Dist: cf_pandas
44
+ Requires-Dist: cf_xarray
45
+ Requires-Dist: pint
46
+ Requires-Dist: pint-xarray
47
+ Requires-Dist: pint-pandas
48
+ Requires-Dist: pydantic>=2
49
+ Requires-Dist: pyyaml>=6.0
50
+ Requires-Dist: platformdirs
51
+ Requires-Dist: pooch
52
+ Requires-Dist: matplotlib
53
+ Requires-Dist: pillow
54
+ Requires-Dist: cartopy>=0.26
55
+ Requires-Dist: pyproj
56
+ Requires-Dist: shapely
57
+ Requires-Dist: cmocean
58
+ Requires-Dist: xcmocean
59
+ Requires-Dist: xgcm
60
+ Requires-Dist: xskillscore
61
+ Requires-Dist: gsw
62
+ Requires-Dist: verde
63
+ Requires-Dist: virtualizarr>=2.8.0
64
+ Requires-Dist: kerchunk
65
+ Requires-Dist: obstore
66
+ Requires-Dist: obspec-utils
67
+ Requires-Dist: h5py
68
+ Requires-Dist: fastparquet
69
+ Requires-Dist: ujson
70
+ Provides-Extra: interactive
71
+ Requires-Dist: holoviews; extra == "interactive"
72
+ Requires-Dist: hvplot; extra == "interactive"
73
+ Requires-Dist: bokeh; extra == "interactive"
74
+ Requires-Dist: geoviews; extra == "interactive"
75
+ Requires-Dist: datashader; extra == "interactive"
76
+ Requires-Dist: panel; extra == "interactive"
77
+ Requires-Dist: anywidget; extra == "interactive"
78
+ Provides-Extra: tides
79
+ Requires-Dist: oceans; extra == "tides"
80
+ Provides-Extra: copernicus
81
+ Requires-Dist: copernicusmarine; extra == "copernicus"
82
+ Provides-Extra: all
83
+ Requires-Dist: ocean-metrics[copernicus,interactive,tides]; extra == "all"
84
+ Requires-Dist: psutil; extra == "all"
85
+ Provides-Extra: dev
86
+ Requires-Dist: pytest; extra == "dev"
87
+ Requires-Dist: pytest-cov; extra == "dev"
88
+ Requires-Dist: pytest-xdist; extra == "dev"
89
+ Requires-Dist: pre-commit; extra == "dev"
90
+ Requires-Dist: check-manifest; extra == "dev"
91
+ Requires-Dist: towncrier>=26.9; extra == "dev"
92
+ Requires-Dist: ruff==0.17.5; extra == "dev"
93
+ Requires-Dist: xroms; extra == "dev"
94
+ Provides-Extra: docs
95
+ Requires-Dist: sphinx; extra == "docs"
96
+ Requires-Dist: myst-parser; extra == "docs"
97
+ Requires-Dist: sphinx-book-theme; extra == "docs"
98
+ Requires-Dist: sphinx-design; extra == "docs"
99
+ Requires-Dist: sphinx-copybutton; extra == "docs"
100
+ Requires-Dist: sphinxcontrib-programoutput; extra == "docs"
101
+ Dynamic: license-file
102
+
103
+ # ocean-metrics
104
+
105
+ [![PyPI](https://img.shields.io/pypi/v/ocean-metrics.svg)](https://pypi.org/project/ocean-metrics/)
106
+ [![conda-forge](https://img.shields.io/conda/vn/conda-forge/ocean-metrics.svg)](https://anaconda.org/conda-forge/ocean-metrics)
107
+ [![Docs](https://readthedocs.org/projects/ocean-metrics/badge/?version=latest)](https://ocean-metrics.readthedocs.io/en/latest/)
108
+ [![Tests](https://github.com/CWorthy-ocean/ocean-metrics/actions/workflows/tests.yaml/badge.svg)](https://github.com/CWorthy-ocean/ocean-metrics/actions/workflows/tests.yaml)
109
+ [![codecov](https://codecov.io/gh/CWorthy-ocean/ocean-metrics/branch/main/graph/badge.svg)](https://codecov.io/gh/CWorthy-ocean/ocean-metrics)
110
+ [![Python](https://img.shields.io/pypi/pyversions/ocean-metrics.svg)](https://pypi.org/project/ocean-metrics/)
111
+
112
+ Model–data validation for ocean models. ocean-metrics reads any two sources through
113
+ [intake](https://intake.readthedocs.io) catalogs, labels one the `reference` and one the
114
+ `test`, aligns them in space and time, computes skill metrics, and plots the comparison
115
+ as static or interactive figures. It also checks model runs and their input files, and
116
+ runs whole diagnostic reports from a YAML suite.
117
+
118
+ ## Install
119
+
120
+ ```bash
121
+ conda install -c conda-forge ocean-metrics # recommended: everything, incl. regridding and tides
122
+ pip install "ocean-metrics[all]" # pip: no xesmf regridding or pyfes tides
123
+ ```
124
+
125
+ A grid-to-grid comparison such as the one below regrids with `xesmf`, which only the
126
+ conda install provides.
127
+
128
+ See [installation](https://ocean-metrics.readthedocs.io/en/latest/installation.html) for
129
+ the optional extras and a development setup.
130
+
131
+ ## A first comparison
132
+
133
+ ```python
134
+ import ocean_metrics as om
135
+
136
+ om.find(variable="nitrate") # search every catalog on the search path
137
+ om.describe("woa23_nitrate_month01") # one source's metadata
138
+
139
+ comparison = om.compare(
140
+ reference="woa23_nitrate_month01", # a shipped World Ocean Atlas entry
141
+ test="my_model", # your model output, from your own catalog
142
+ variables="nitrate",
143
+ aggregate={"time": "mean"},
144
+ )
145
+ comparison.plot() # static; renderer="holoviews" for interactive
146
+ comparison.metrics() # a table of scores, one row per comparison
147
+ ```
148
+
149
+ The [quickstart](https://ocean-metrics.readthedocs.io/en/latest/quickstart.html) shows
150
+ how to catalog your own model output in a few lines.
151
+
152
+ ## Documentation
153
+
154
+ **https://ocean-metrics.readthedocs.io**
155
+
156
+ - [Quickstart](https://ocean-metrics.readthedocs.io/en/latest/quickstart.html)
157
+ - [User guide](https://ocean-metrics.readthedocs.io/en/latest/guide/concepts.html):
158
+ catalogs, comparisons, fields, plots, metrics tables, run health, suites, caching
159
+ - [API reference](https://ocean-metrics.readthedocs.io/en/latest/api.html)
160
+ - [Contributing](https://ocean-metrics.readthedocs.io/en/latest/contributing.html)
161
+
162
+ ## License and citation
163
+
164
+ Apache-2.0; see [LICENSE](LICENSE). To cite ocean-metrics, use
165
+ [CITATION.cff](CITATION.cff) (GitHub's "Cite this repository" button).
@@ -0,0 +1,63 @@
1
+ # ocean-metrics
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/ocean-metrics.svg)](https://pypi.org/project/ocean-metrics/)
4
+ [![conda-forge](https://img.shields.io/conda/vn/conda-forge/ocean-metrics.svg)](https://anaconda.org/conda-forge/ocean-metrics)
5
+ [![Docs](https://readthedocs.org/projects/ocean-metrics/badge/?version=latest)](https://ocean-metrics.readthedocs.io/en/latest/)
6
+ [![Tests](https://github.com/CWorthy-ocean/ocean-metrics/actions/workflows/tests.yaml/badge.svg)](https://github.com/CWorthy-ocean/ocean-metrics/actions/workflows/tests.yaml)
7
+ [![codecov](https://codecov.io/gh/CWorthy-ocean/ocean-metrics/branch/main/graph/badge.svg)](https://codecov.io/gh/CWorthy-ocean/ocean-metrics)
8
+ [![Python](https://img.shields.io/pypi/pyversions/ocean-metrics.svg)](https://pypi.org/project/ocean-metrics/)
9
+
10
+ Model–data validation for ocean models. ocean-metrics reads any two sources through
11
+ [intake](https://intake.readthedocs.io) catalogs, labels one the `reference` and one the
12
+ `test`, aligns them in space and time, computes skill metrics, and plots the comparison
13
+ as static or interactive figures. It also checks model runs and their input files, and
14
+ runs whole diagnostic reports from a YAML suite.
15
+
16
+ ## Install
17
+
18
+ ```bash
19
+ conda install -c conda-forge ocean-metrics # recommended: everything, incl. regridding and tides
20
+ pip install "ocean-metrics[all]" # pip: no xesmf regridding or pyfes tides
21
+ ```
22
+
23
+ A grid-to-grid comparison such as the one below regrids with `xesmf`, which only the
24
+ conda install provides.
25
+
26
+ See [installation](https://ocean-metrics.readthedocs.io/en/latest/installation.html) for
27
+ the optional extras and a development setup.
28
+
29
+ ## A first comparison
30
+
31
+ ```python
32
+ import ocean_metrics as om
33
+
34
+ om.find(variable="nitrate") # search every catalog on the search path
35
+ om.describe("woa23_nitrate_month01") # one source's metadata
36
+
37
+ comparison = om.compare(
38
+ reference="woa23_nitrate_month01", # a shipped World Ocean Atlas entry
39
+ test="my_model", # your model output, from your own catalog
40
+ variables="nitrate",
41
+ aggregate={"time": "mean"},
42
+ )
43
+ comparison.plot() # static; renderer="holoviews" for interactive
44
+ comparison.metrics() # a table of scores, one row per comparison
45
+ ```
46
+
47
+ The [quickstart](https://ocean-metrics.readthedocs.io/en/latest/quickstart.html) shows
48
+ how to catalog your own model output in a few lines.
49
+
50
+ ## Documentation
51
+
52
+ **https://ocean-metrics.readthedocs.io**
53
+
54
+ - [Quickstart](https://ocean-metrics.readthedocs.io/en/latest/quickstart.html)
55
+ - [User guide](https://ocean-metrics.readthedocs.io/en/latest/guide/concepts.html):
56
+ catalogs, comparisons, fields, plots, metrics tables, run health, suites, caching
57
+ - [API reference](https://ocean-metrics.readthedocs.io/en/latest/api.html)
58
+ - [Contributing](https://ocean-metrics.readthedocs.io/en/latest/contributing.html)
59
+
60
+ ## License and citation
61
+
62
+ Apache-2.0; see [LICENSE](LICENSE). To cite ocean-metrics, use
63
+ [CITATION.cff](CITATION.cff) (GitHub's "Cite this repository" button).
@@ -0,0 +1,176 @@
1
+ """ocean-metrics: modular model–data validation and analysis for ocean models.
2
+
3
+ Read any two things through intake catalogs, label which is ``reference`` and which is
4
+ ``test``, then align them in space/time, compute skill metrics, and plot — with a
5
+ static⇄interactive switch. Model-agnostic; ROMS specifics live behind
6
+ ``ocean_metrics.roms``.
7
+
8
+ The public API is intentionally small:
9
+
10
+ import ocean_metrics as om
11
+ om.catalogs # discovered catalogs / sources
12
+ om.find(variable=...) # search sources across catalogs
13
+ om.find(variable=...).map() # ... and map where the matches are
14
+ om.find_catalogs(name=...) # search catalogs themselves (existence checks)
15
+ om.map_locations() # map every discovered dataset (metadata only)
16
+ om.describe("glodap") # metadata for one source, or one whole catalog --
17
+ # including which declared variables the vocabulary
18
+ # recognizes (and as what), and which it doesn't
19
+ om.describe("glodap").catalog_path # ... the catalog file it was found in
20
+ om.match_report("glodap") # ... that vocabulary section alone, any time
21
+ om.coord_report("glodap") # ... and which of T/X/Y/Z it recognizes, as what
22
+ om.overlap("his", "glodap") # do these two sources even share space/time? (read-free)
23
+ om.read("glodap") # -> standardized xr.Dataset / pandas.DataFrame
24
+ om.detide(om.read("tide_gauge")) # PL33 low-pass -- subtidal by default
25
+ om.compare(reference=..., test=..., variables=[...],
26
+ aggregate={"time": "mean"}).plot() # no default reduction: say so
27
+ om.compare(..., over="time").plot() # score against time, cell by cell
28
+ om.compare(..., times={"resample": "1MS", "reduce": "mean"}) # one comparison
29
+ # per month, plots or plays as one
30
+ om.compare(..., aggregate={"time": [{"groupby": "month", ...}, "var"]})
31
+ # a list of steps on one axis, in
32
+ # order: seasonal-cycle variance
33
+ om.compare(..., aggregate=[{"time": "mean"}, {"time": [...]}]) # a list of specs:
34
+ # one member per statistic
35
+ om.field(source, variable, select=...) # one source, no reference
36
+ om.field(...).extremum("max").plot() # where the max is, and how it
37
+ # evolves around that snapshot
38
+ om.health("his").figures("integrity") # run diagnostics: blow-ups, drift,
39
+ # restarts (.table(), .problems())
40
+ om.rivers("river_forcing").figures("map") # river-forcing inputs: where, size
41
+ om.input_health(["surface", "bry_south"]).table() # every input file's variables:
42
+ # range, bounds, NaN, copies
43
+ om.TS({"ROMS": roms, "WOA23": woa}).plot() # T against S per source;
44
+ # om.XY: any two variables
45
+ om.summary([set_a, set_b, one_comparison]) # comparisons you already have,
46
+ # pooled onto Taylor + target
47
+ om.table([set_a, set_b], rows="variable", # selected metrics as a paper
48
+ save="skill.tex") # table (.tex/.md/.html/.csv)
49
+ om.plot([eq, band_a, band_b]) # comparisons (or fields) built
50
+ # separately, one figure; a
51
+ # {label: item} dict names rows
52
+ om.map_metrics(mooring_set) # per-station metrics, interpolated
53
+ # onto a map, one panel per metric
54
+ comparison.map_locations() # where a plotted selection sits
55
+
56
+ om.cache.info() # processed intermediates are cached; where, how big
57
+ om.outputs.info() # where figures + metrics get written
58
+
59
+ om.catalog.search_paths() # where catalogs are discovered, in order
60
+ om.catalog.add_search_path("/shared") # register a shared/team catalog dir in code
61
+ """
62
+
63
+ import importlib as _importlib
64
+ import types as _types
65
+ from importlib import metadata as _metadata
66
+
67
+ from ocean_metrics import build, cache, catalog, outputs, qc # noqa: F401
68
+ from ocean_metrics import horizontal as _horizontal # noqa: F401 (registers "horizontal_gradient")
69
+ from ocean_metrics import internal_tides as _internal_tides # noqa: F401 (registers "baroclinic_pressure_flux")
70
+ from ocean_metrics import mld as _mld # noqa: F401 (registers CALCULATORS["mld"])
71
+ from ocean_metrics import tides as _tides # noqa: F401 (registers "tidal_amplitude"/"tidal_phase")
72
+ from ocean_metrics import vertical as _vertical # noqa: F401 (registers "depth_of"/"thickness")
73
+ from ocean_metrics.casts import names as cast_names
74
+ from ocean_metrics.catalog import (
75
+ Overlap,
76
+ catalogs,
77
+ coord_report,
78
+ describe,
79
+ find,
80
+ find_catalogs,
81
+ match_report,
82
+ overlap,
83
+ )
84
+ from ocean_metrics.combine import plot as _plot_items
85
+ from ocean_metrics.comparison import Comparison, ComparisonSet, compare, summary
86
+ from ocean_metrics.comparison import table as _table
87
+ from ocean_metrics.detide import detide
88
+ from ocean_metrics.extrema import Extrema, Extremum
89
+ from ocean_metrics.field import Cross, Field, FieldSet, field
90
+ from ocean_metrics.input_integrity import input_health
91
+ from ocean_metrics.pick import pick_path
92
+ from ocean_metrics.plot.map_locations import map_locations
93
+ from ocean_metrics.plot.map_metrics import map_metrics
94
+ from ocean_metrics.river_inputs import rivers
95
+ from ocean_metrics.run_health import health
96
+ from ocean_metrics.sources import read
97
+ from ocean_metrics.xy import TS, XY
98
+
99
+ try:
100
+ __version__ = _metadata.version("ocean-metrics")
101
+ except _metadata.PackageNotFoundError: # not installed (e.g. run from a bare checkout)
102
+ __version__ = "9999"
103
+
104
+
105
+ # ``om.plot(...)`` draws several comparisons or fields on one figure (see
106
+ # ocean_metrics.combine), but ``ocean_metrics.plot`` is also the plotting subpackage, and
107
+ # a plain ``from ocean_metrics.combine import plot`` here would replace it as a
108
+ # *package attribute*: ``import ocean_metrics.plot.registry as r``, and every
109
+ # ``monkeypatch.setattr("ocean_metrics.plot.registry.render", ...)``, resolve through
110
+ # ``getattr(ocean_metrics, "plot")`` and would land on a function with no submodules.
111
+ # So the subpackage itself is made callable instead -- one object that is both the
112
+ # module (``om.plot.registry`` keeps working) and the function.
113
+ class _CallablePlotPackage(_types.ModuleType):
114
+ def __call__(self, items, *, renderer="matplotlib", **plot_kwargs):
115
+ return _plot_items(items, renderer=renderer, **plot_kwargs)
116
+
117
+ __call__.__doc__ = _plot_items.__doc__
118
+
119
+
120
+ _importlib.import_module("ocean_metrics.plot").__class__ = _CallablePlotPackage
121
+
122
+
123
+ # ``om.table(...)`` builds a metrics table, but ``ocean_metrics.table`` is also the module
124
+ # holding MetricsTable and its writers -- importing that submodule sets it as a package
125
+ # attribute, which would clobber a plain function of the same name (and a lazy first
126
+ # import of it later would do so at a random moment). Same remedy as ``plot`` above:
127
+ # one object that is both the module and the function.
128
+ class _CallableTableModule(_types.ModuleType):
129
+ def __call__(self, comparisons, **kwargs):
130
+ return _table(comparisons, **kwargs)
131
+
132
+ __call__.__doc__ = _table.__doc__
133
+
134
+
135
+ _importlib.import_module("ocean_metrics.table").__class__ = _CallableTableModule
136
+ from ocean_metrics.table import MetricsTable # noqa: E402
137
+
138
+ __all__ = [
139
+ "TS",
140
+ "XY",
141
+ "Comparison",
142
+ "ComparisonSet",
143
+ "Cross",
144
+ "Extrema",
145
+ "Extremum",
146
+ "Field",
147
+ "FieldSet",
148
+ "MetricsTable",
149
+ "Overlap",
150
+ "__version__",
151
+ "cache",
152
+ "cast_names",
153
+ "catalog",
154
+ "catalogs",
155
+ "compare",
156
+ "coord_report",
157
+ "describe",
158
+ "detide",
159
+ "field",
160
+ "find",
161
+ "find_catalogs",
162
+ "health",
163
+ "input_health",
164
+ "map_locations",
165
+ "map_metrics",
166
+ "match_report",
167
+ "outputs",
168
+ "overlap",
169
+ "pick_path",
170
+ "plot",
171
+ "qc",
172
+ "read",
173
+ "rivers",
174
+ "summary",
175
+ "table",
176
+ ]