def METHOD_NAME():
    grid = RasterModelGrid((3, 4), xy_spacing=(4, 3))
    z = [[3.0, 3.0, 3.0, 3.0], [3.0, 3.0, 0.0, 0.0], [3.0, 0.0, 0.0, 0.0]]
    grad_at_active_d8 = grid.calc_grad_at_d8(z)[grid.active_d8]
    assert_array_equal(
        grad_at_active_d8[: len(grid.active_links)],
        grid.calc_grad_at_link(z)[grid.active_links],
    )
    assert_array_equal(
        grad_at_active_d8[len(grid.active_links) :],
        grid.calc_grad_at_diagonal(z)[grid.active_diagonals],
    )