def METHOD_NAME():
    r"""Test velocity calculation under the following conditions:
    r = 1  # tidal range in m
    T = 4.0e4  # tidal period in s
    n = 0.01  # roughness, s/m^1/3
    chi = 1  # scale velocity, m/s
    h_m = 0.25    # water depth at mean sea level, m
    Under these conditions, the key factors are:
    inundation rate (I) =
    $I = [r/2 − max(−r/2, min(z, r/2))]/(T/2)$
    $= (0.5 - max(-0.25, min(-0.25, 0.5))) / 20,000$
    $= (0.5 - (-0.25)) / 20,000 = 3.75\times 10^{-5}$ m/s
    Domain, L: 300 m, 1D
    Analytical solution for water surface height, ebb tide:
        $\eta = (IL^2/D) ((x/L) - (1/2) (x/L)^2)$
    Solution for x-directed velocity. Note that in this case $I$ and $h$ are
    uniform, so
        $u h = I x$  # output = input
        $u(x) = I x / h$
    Water depth $h$ is calculated as the average of high-tide and low-tide
    depth. Because low-tide depth is zero,
        $h = (0.25 + r/2) / 2 = 0.375$ m
    In a grid with 5 columns, $x$ is effectively 100, 200, and 300 m, with the
    adjacent open boundary node at 350 m. So the velocity in m/s should be:
        0.01, 0.02, 0.03
    """
    grid = RasterModelGrid((3, 5), xy_spacing=100.0)
    z = grid.add_zeros("topographic__elevation", at="node")
    z[:] = -0.25
    grid.set_closed_boundaries_at_grid_edges(False, True, True, True)
    tfc = TidalFlowCalculator(grid, tidal_period=4.0e4)
    tfc.run_one_step()
    assert_array_almost_equal(
        grid.at_link["ebb_tide_flow__velocity"][10:13], [0.01, 0.02, 0.03]
    )
    assert_array_almost_equal(
        grid.at_link["flood_tide_flow__velocity"][10:13], [-0.01, -0.02, -0.03]
    )