advection.closure

Energy-balance closure methods and diagnostics.

This module is deliberately kept separate from the direct advection accounting in advection.advection and advection.advect_detect. Closure forcing (Twine et al. 2000) and physical advection accounting (Wang et al. 2024; Moderow et al. 2021) are two fundamentally different responses to eddy-covariance under-closure and must not be conflated:

  • Advection accounting adds the measured advective fluxes (HA_T, HA_Q, VAT) to the budget — it explains where the missing energy went. This is the physically correct treatment in the oasis regime and is what this library exists to do (see advection.compute_advection_fluxes() and advection.apply_advection_correction()).

  • Closure forcing rescales the measured turbulent fluxes so the budget shuts by construction. It is a pragmatic post-processing convention, not a physical correction, and it is wrong in the oasis case — see the caveat on bowen_ratio_closure().

The two are offered here side by side so a user can compute either, but the synthesis recommendation (CLAUDE.md) stands: prefer adding measured advective fluxes; do not force Bowen-ratio closure when ``LE > (Rn - G)``.

WPL assumption

Every LE consumed or produced here is assumed to be already WPL (Webb-Pearman-Leuning 1980) density-corrected. WPL is a mandatory, separate pre-processing step for open-path LE/CO2 — not an advection or closure correction — and this library does not apply it. See advection.advection.wpl_latent_heat_flux() (a convenience helper; prefer EddyPro / established processing) and the package README.

Sign / storage conventions (CLAUDE.md)

  • Surface energy balance with storage: Rn - G - J = H + LE.

  • Available energy: Rn - G - J (J = air heat storage, Wang Eq. 11; default 0). S is used as the storage symbol in the closure-forcing signatures below to match the Twine et al. (2000) presentation; it plays the same role as J.

  • Closure residual: Residual = Rn - G - J - H - LE (positive ⇒ available energy exceeds the turbulent sum, the usual under-closure gap). This is the CLAUDE.md convention and is the negative of the legacy 'residual' diagnostic returned by advection.compute_advection_fluxes(), which uses (H + LE) - (Rn - G); the sign difference is intentional and documented.

  • Energy Balance Ratio: EBR = sum(H + LE) / sum(Rn - G - J).

References

Twine, T. E., et al. (2000), Correcting eddy-covariance flux underestimates over a grassland, Agric. For. Meteorol. 103, 279-300 — the Bowen-ratio and residual closure methods. Wilson, K., et al. (2002), Energy balance closure at FLUXNET sites, Agric. For. Meteorol. 113, 223-243 — the closure-slope regression diagnostic. Wang et al. (2024); Moderow et al. (2021) — advection accounting and the OUT-positive sign convention.

Functions

bowen_ratio_closure(Rn, G, H, LE[, S, ...])

Force energy-balance closure by Bowen-ratio-preserving rescaling.

closure_slope(H, LE, Rn, G[, J, force_origin])

Closure-slope diagnostic via ordinary least-squares regression.

energy_balance_ratio(H, LE, Rn, G[, J])

Compute the Energy Balance Ratio (EBR) over a series.

energy_balance_residual(Rn, G, H, LE[, J])

Compute the energy-balance closure residual (a diagnostic, not a flux).

residual_le_closure(Rn, G, H[, S])

Force closure by assigning the entire residual to latent heat (LE).