def METHOD_NAME():
    """
    Check that the accessor fallbacks to the default registration and gtype
    when the grid source file (i.e., grid.encoding["source"]) doesn't exist.
    """
    # Load the 05m earth relief grid, which is stored as tiles
    grid = load_earth_relief(
        resolution="05m", region=[0, 5, -5, 5], registration="pixel"
    )
    # Registration and gtype are correct
    assert grid.gmt.registration == 1
    assert grid.gmt.gtype == 1
    # The source grid file is defined but doesn't exist
    assert grid.encoding["source"].endswith(".nc")
    assert not Path(grid.encoding["source"]).exists()
    # For a sliced grid, fallback to default registration and gtype,
    # because the source grid file doesn't exist.
    sliced_grid = grid[1:3, 1:3]
    assert sliced_grid.gmt.registration == 0
    assert sliced_grid.gmt.gtype == 0
    # Still possible to manually set registration and gtype
    sliced_grid.gmt.registration = 1
    sliced_grid.gmt.gtype = 1
    assert sliced_grid.gmt.registration == 1
    assert sliced_grid.gmt.gtype == 1