pvtend.decompose_omega

pvtend.decompose_omega(omega_total: ndarray, omega_adiabatic: ndarray, lat: ndarray, lon: ndarray, plevs_pa: ndarray, u_div: ndarray | None = None, v_div: ndarray | None = None) dict[str, ndarray][source]

Full adiabatic/diabatic omega decomposition with divergent wind recovery.

Given total omega and its QG (adiabatic) component, this function:

  1. Computes the diabatic residual: ω_diabatic = ω_total ω_adiabatic.

  2. Solves independently for both diabatic and adiabatic velocity potentials via Poisson equation on each pressure level.

  3. Recovers the divergent wind for each component as the gradient of its respective velocity potential.

Parameters:
  • omega_total – Total vertical velocity [Pa/s], shape (nlev, nlat, nlon).

  • omega_adiabatic – QG omega (adiabatic component) [Pa/s], shape (nlev, nlat, nlon).

  • lat – Latitude [degrees], ascending, shape (nlat,).

  • lon – Longitude [degrees], shape (nlon,).

  • plevs_pa – Pressure levels [Pa], ascending, shape (nlev,).

  • u_div – Total divergent u-component [m/s] (optional), shape (nlev, nlat, nlon). No longer used for adiabatic residual computation but accepted for API compatibility.

  • v_div – Total divergent v-component [m/s] (optional), shape (nlev, nlat, nlon). No longer used for adiabatic residual computation but accepted for API compatibility.

Returns:

  • "omega_diabatic": Diabatic omega residual.

  • "chi_diabatic": Diabatic velocity potential.

  • "u_div_diabatic": Diabatic divergent u-component.

  • "v_div_diabatic": Diabatic divergent v-component.

  • "chi_adiabatic": Adiabatic velocity potential.

  • "u_div_adiabatic": Adiabatic divergent u-component.

  • "v_div_adiabatic": Adiabatic divergent v-component.

Return type:

Dictionary containing