def fixture_grid(): """ Load the grid data from the static_earth_relief file and set value(s) to NaN and inf. """ grid = load_static_earth_relief() grid[3:6, 3:5] = np.nan grid[6:8, 2:4] = np.inf return grid
def test_load_static_earth_relief(): """ Check that @static_earth_relief.nc loads without errors. """ data = load_static_earth_relief() assert data.dims == ("lat", "lon") assert data.shape == (14, 8) assert data.min() == 190 assert data.max() == 981 assert data.median() == 467 assert isinstance(data, xr.DataArray)
def fixture_grid(): """ Load the grid data from the static_earth_relief file. """ return load_static_earth_relief()
def fixture_dataarray(): """ Load the grid data from the sample earth_relief file. """ return load_static_earth_relief()