CliMA / ClimaOcean.jl

🌎 Framework for realistic regional-to-global ocean simulations, and coupled ocean + sea-ice simulations based on Oceananigans and ClimaSeaIce. Basis for the ocean and sea-ice component of CliMA's Earth system model.
https://clima.github.io/ClimaOceanDocumentation/dev/
MIT License
32 stars 9 forks source link

Tests for bathymetry utilities #141

Open glwagner opened 2 months ago

glwagner commented 2 months ago

There are few tests for bathymetry utilities. Here are a few that we need:

  1. Unit tests that ensure the functions run without an error, also testing conditions like: a. remove_basins!(z, Inf) does nothing b. remove_basins(z, 2.1) throws an error (for example --- other inputs might be tested) c. interpolate_bathymetry_in_passes doesn't do anything when we are not refining the bathymetry d. The argument minimum_depth works
  2. Test with synthetic bathymetry to ensure that remove_basins! correctly removes the specified number of basins
  3. Test that interpolation for multiple passes works correctly, either using a synthetic example or using a regression test

Those come to the top of my head.

Originally posted by @glwagner in https://github.com/CliMA/ClimaOcean.jl/issues/140#issuecomment-2290024722

glwagner commented 2 months ago

cc @simone-silvestri

francispoulin commented 2 months ago

I learned yesterday that in regards to bathymetry, there is something called in-paint. Does this need a test?

simone-silvestri commented 2 months ago

That is the remove_basins! feature that removes all connected regions but the largest. BTW there is an issue with the new bathymetry. The generate_bathymetry example fails on main with https://buildkite.com/clima/climaocean-examples/builds/240#01915522-a196-4bb4-91ab-66198dbc76ed

glwagner commented 2 months ago

It does seem like we need tests!

glwagner commented 2 months ago

That is the remove_basins! feature that removes all connected regions but the largest. BTW there is an issue with the new bathymetry. The generate_bathymetry example fails on main with https://buildkite.com/clima/climaocean-examples/builds/240#01915522-a196-4bb4-91ab-66198dbc76ed

143 claimed to fix this particularly issue and was merged, but we still don't have tests so cannot close this issue.