Example #1
0
def dry_mass_column_divg(u, v, q, radius, dp):
    """Transport term of atmospheric column mass budget.

    E.g. Trenberth 1991, Eq. 9
    """
    u_int = integrate((1. - q)*u, dp, PFULL_STR)
    v_int = integrate((1. - q)*v, dp, PFULL_STR)
    return horiz_divg(u_int, v_int, radius)
Example #2
0
def dry_mass_column_divg_with_adj(u, v, q, ps, radius, dp):
    """Transport term of atmospheric column mass budget with adjustment.

    Based on Trenberth 1991 J. Climate, but in the limit that the mass
    transport term is much larger magnitude than the tendency term.
    """
    u_int = integrate((1 - q)*uv_mass_adjusted(u, q, ps, dp), dp, PFULL_STR)
    v_int = integrate((1 - q)*uv_mass_adjusted(v, q, ps, dp), dp, PFULL_STR)
    return horiz_divg(u_int, v_int, radius)
Example #3
0
def uv_mass_adjustment(uv, q, ps, dp):
    """Correction to subtract from outputted u or v to balance mass budget.

    C.f. Trenberth 1991, J. Climate, equations 9 and 10.
    """
    wvp = int_dp_g(q, dp)
    numer = integrate((1. - q)*uv, dp, PFULL_STR)
    denom = (ps - grav.value * wvp)
    return numer / denom
Example #4
0
def mass_column_divg_spharm(u, v, radius, dp):
    """Horizontal divergence of vertically integrated flow."""
    u_int = integrate(u, dp, PFULL_STR)
    v_int = integrate(v, dp, PFULL_STR)
    return horiz_divg_spharm(u_int, v_int, radius)