def depth_sw_interface_Glover1959(x, Q, K, rho_f, rho_s):

    """
    Calculate depth of the fresh-salt water interface in a coastal aquifer, following Glover (1959).
    """

    gamma = (rho_s - rho_f) / rho_f

    y2 = 2 * Q / (gamma * K) * x + Q**2 / (gamma**2 * K**2)

    depth = y2**0.5

    return depth