def test_bathymetry_greenwich(): """Check elevation that includes 0 """ coords = [[0, 0, 4876], [6, 0, -76], [-10, 0, 5454]] for lat, lon, z in coords: etopo = get_bathymetry(lat, lon, resolution="5min") assert "bathymetry" in etopo, "Missing bathymetry from get_bathymetry" assert ma.allclose(etopo["bathymetry"], [z]), \ "For ({},{}) expected {}".format(lat, lon, z)
def test_bathymetry_track(): """Check the elevation for a track """ lat = [10, 10, 15, 12] lon = [30, -30, -38, 222] z = [-366, 5192, 5036, 4995] etopo = get_bathymetry(lat, lon, resolution="5min") assert "bathymetry" in etopo, "Missing bathymetry from get_bathymetry" assert ma.allclose(etopo["bathymetry"], z), "Unexpected value"
def test_bathymetry_point(): """Check the elevation of single locations """ coords = [[10, 30, -366], [10, -30, 5192], [15, -38, 5036], [12, 222, 4995]] for lat, lon, z in coords: etopo = get_bathymetry(lat, lon, resolution="5min") assert "bathymetry" in etopo, "Missing bathymetry from get_bathymetry" assert ma.allclose(etopo["bathymetry"], [z]), \ "For ({},{}) expected {}".format(lat, lon, z)