pvtend.project_field
- pvtend.project_field(field2d: ndarray, basis: OrthogonalBasisFields, *, apply_smoothing: bool = False, smoothing_deg: float = 3.0, smoothing_method: str = 'gaussian', grid_spacing: float = 1.5) Dict[str, object][source]
Project a tendency field onto the orthogonal basis.
- Parameters:
field2d – 2D tendency field in SI units.
basis – Orthogonal basis container (6 bases).
apply_smoothing – Smooth tendency before projection.
smoothing_deg – Smoothing FWHM (degrees). Default 3.0°.
smoothing_method – ‘gaussian’ or ‘fourier’.
grid_spacing – Grid spacing in degrees.
- Returns:
Dict with coefficients (beta, ax, ay, gamma1, gamma2, sigma) in physical units, raw coefficients, component fields (int, prop, def1, def2, lap), residual, reconstruction, and RMSE.
- Sign convention:
ax, ay, gamma1, gamma2 are negated relative to the raw inner product:
coeff = -<A, Phi> / <Phi, Phi>. This makes positive ax → eastward propagation, positive gamma1 → AWB tendency. Each returned component field (int, prop, def1, def2, lap) represents its additive contribution to dq/dt. The reconstruction is the sum of all five:recon = int + prop + def1 + def2 + lap.