[][src]Function shallow_water::nhswps::source::source

pub fn source(
    state: &State,
    sqs: ArrayViewMut3<'_, f64>,
    sds: ArrayViewMut3<'_, f64>,
    sgs: ArrayViewMut3<'_, f64>
)

Gets the nonlinear source terms for linearised PV, divergence and acceleration divergence --- all in spectral space. These are returned in sqs, sds and sgs respectively.

Note that (sds,sgs) only include the nonlinear terms for a semi-implicit treatment, closely analogous to that described in the appendix of Mohebalhojeh & Dritschel (2004).

The spectral fields qs, ds and gs are all spectrally truncated. Note: u, v & zeta obtained by main_invert, and z obtained by psolve (which calls vertical) before calling this routine are all spectrally truncated.