예제 #1
0
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
예제 #2
0
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)
예제 #3
0
def fixture_grid():
    """
    Load the grid data from the static_earth_relief file.
    """
    return load_static_earth_relief()
예제 #4
0
def fixture_dataarray():
    """
    Load the grid data from the sample earth_relief file.
    """
    return load_static_earth_relief()