WVForcing
Add forcing or dissipation to a wave-vortex transform.
Declaration
classdef WVForcing < handleOverview
WVForcing is the base class for forcing and closure objects
attached to a WVTransform. Use one of the supplied subclasses or
subclass this interface to implement a custom forcing. Each instance
belongs to the transform supplied at construction and is registered by
its unique name through WVTransform.addForcing.
Forcing is applied in three stages. Physical-space forcing contributes
tendencies to \((u,v,\eta)\) for hydrostatic flow or
\((u,v,w,\eta)\) for nonhydrostatic flow. Those tendencies are projected
into wave-vortex space before spectral forcing contributes directly to
\((F_+,F_-,F_0)\). Spectral-amplitude forcing may then update Ap, Am,
and A0 directly. Potential-vorticity variants contribute only to the
zero-frequency tendency or amplitude.
A custom subclass declares one or more stages with forcingType and
overrides the corresponding evaluation methods. Spatial forcing is
evaluated before projection, spectral forcing is evaluated after
projection, and spectral-amplitude forcing is evaluated last. Within
each stage, smaller priority values are evaluated first.
WVTransform.addForcing registers forcing objects, orders compatible
contributions by priority, and exposes their energy transfers through
the transform diagnostics.
Topics
- Create the forcing
WVForcingInitialize the base state for a forcing subclass.
- Inspect forcing configuration
wvtTransform to which this forcing belongs.nameused to register this forcing with its transform.forcingTypeEvaluation stages implemented by this forcing.isClosureWhether this forcing is a small-scale closure.priorityOrder within a forcing stage, from 0 first to 255 last.
Developer Topics
These items document internal implementation details and are not part of the primary public API.
- Implement forcing evaluation
addHydrostaticSpatialForcingAdd hydrostatic physical-space tendencies.addNonhydrostaticSpatialForcingAdd nonhydrostatic physical-space tendencies.addPotentialVorticitySpatialForcingAdd a physical-space QGPV tendency.addPotentialVorticitySpectralForcingAdd a spectral QGPV tendency.addSpectralForcingAdd wave-vortex coefficient tendencies in spectral space.setPotentialVorticitySpectralAmplitudeRestore selected QG coefficients after a model step.setPotentialVorticitySpectralForcingModify QGPV tendencies for a spectral-amplitude constraint.setSpectralAmplitudeRestore selected wave-vortex coefficients after a model step.setSpectralForcingModify tendencies for a spectral-amplitude constraint.spatialFluxTypesReturn the physical-space forcing types.spectralAmplitudeTypesReturn the spectral-amplitude forcing types.spectralFluxTypesReturn the spectral-tendency forcing types.
- Convert forcing resolution
forcingWithResolutionOfTransformRebuild a forcing for a compatible transform resolution.
- Forcing persistence
forcingFromGroupRestore a concrete forcing from a NetCDF group.
- Forcing internals
didGetRemovedFromTransformRelease resources when a forcing is removed from its transform.portableImplementationContractDescribe availability of the paired portable C++ implementation.