WVTransformBoussinesq
3D hydrostatic Boussinesq model with arbitrary stratification solved
Overview
in wave-vortex space
Couple of different initialization paths: 1) You want to run this as a prognostic model and therefore want the chebyshev points automatically found for you Init([Lx Ly Lz], [Nx Ny Nz], latitude, rho)
2) You want to run this as a diagnostic model and therefore want to specify the depths and modes yourself Init([Lx Ly Lz], [Nx Ny Nz], latitude, rho, ‘zgrid’, z)
Topics
- Stratification
rho_nm
\(\rho_\textrm{nm}(z)\), no-motion densityN2
\(N^2(z)\), squared buoyancy frequency of the no-motion density, \(N^2\equiv - \frac{g}{\rho_0} \frac{\partial \rho_\textrm{nm}}{\partial z}\)dLnN2
\(\frac{\partial \ln N^2}{\partial z}\), vertical variation of the log of the squared buoyancy frequencyverticalModes
instance of the InternalModes classeffectiveVerticalGridResolution
returns the effective vertical grid resolution in meters- Vertical modes
FMatrix
transformation matrix \(F_g\)FinvMatrix
transformation matrix \(F_g^{-1}\)GMatrix
transformation matrix \(G_g\)GinvMatrix
transformation matrix \(G_g^{-1}\)
- Validation
isDensityInValidRange
checks if the density field is a valid adiabatic re-arrangement of the base state
- Initial conditions
- Waves
addGMSpectrum
add waves following a Garrett-Munk spectrumaddWaveModes
add amplitudes of the given wave modesaddWavesWithFrequencySpectrum
add waves with a specified frequency spectruminitWavesWithFrequencySpectrum
initialize with waves of a specified frequency spectruminitWithAlternativeSpectrum
initialize with an alternative formulation of the GM spectrum in the wavenumber domain.initWithGMSpectrum
initialize the wave field following a Garrett-Munk spectruminitWithWaveModes
initialize with the given wave modesremoveAllWaves
removes all wave from the model, including inertial oscillationssetWaveModes
set amplitudes of the given wave modes
- Geostrophic Motions
initWithGeostrophicStreamfunction
initialize with a geostrophic streamfunctionsetGeostrophicStreamfunction
set a geostrophic streamfunctionaddGeostrophicStreamfunction
add a geostrophic streamfunction to existing geostrophic motionssetGeostrophicModes
set amplitudes of the given geostrophic modesaddGeostrophicModes
add amplitudes of the given geostrophic modesremoveAllGeostrophicMotions
remove all geostrophic motions
- Inertial Oscillations
addInertialMotions
add inertial motions to existing inertial motionsinitWithInertialMotions
initialize with inertial motionsremoveAllInertialMotions
remove all inertial motionssetInertialMotions
set inertial motions
- Mean density anomaly
addMeanDensityAnomaly
add inertial motions to existing inertial motionsinitWithMeanDensityAnomaly
initialize with inertial motionsremoveAllMeanDensityAnomaly
remove all mean density anomaliessetMeanDensityAnomaly
set inertial motions
- Waves
- Operations
- Primary flow components
geostrophicComponent
returns the geostrophic flow componentwaveComponent
returns the internal gravity wave flow componentinertialComponent
returns the inertial oscillation flow componentmdaComponent
returns the mean density anomaly component
- Energetics of flow components
geostrophicEnergy
total energy, geostrophicwaveEnergy
total energy, wavesinertialEnergy
total energy, inertial oscillationsmdaEnergy
total energy, mean density anomaly
- Energetics
geostrophicKineticEnergy
kinetic energy of the geostrophic flowgeostrophicPotentialEnergy
potential energy of the geostrophic flow
- Other
N2Function
WVTransformBoussinesq
First we need to initialize the WVStratifiedFlow.buildInterpolationProjectionOperators
buildInterpolationProjectionOperatorsForGrid
buildVerticalModeProjectionOperators
dLnN2Function
maxFg
maxFw
nK2unique
number of unique squared-wavenumbersrhoFunction
function handlesthrowErrorIfDensityViolation
checks if the proposed coefficients are a valid adiabatic re-arrangement of the base statetransformToSpatialDomainWithFInterp
transformToSpatialDomainWithFg
argumentstransformToSpatialDomainWithFw
transformToSpatialDomainWithGInterp
transformToSpatialDomainWithGg
argumentstransformToSpatialDomainWithGw