WVTransformHydrostatic
A class for disentangling hydrostatic waves and vortices in variable stratification
Declaration
classdef WVTransformHydrostatic < WVTransform
Overview
To initialization an instance of the WVTransformHydrostatic class you must specific the domain size, the number of grid points and either the density profile or the stratification profile.
N0 = 3*2*pi/3600;
L_gm = 1300;
N2 = @(z) N0*N0*exp(2*z/L_gm);
wvt = WVTransformHydrostatic([100e3, 100e3, 4000],[64, 64, 65], N2=N2,latitude=30);
Topics
- Initialization
WVTransformHydrostatic
create a wave-vortex transform for variable stratification
- 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
- 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
- Energetics of flow components
geostrophicEnergy
total energy, geostrophicwaveEnergy
total energy, wavesinertialEnergy
total energy, inertial oscillationsmdaEnergy
total energy, mean density anomaly
- Operations
- Energetics
geostrophicKineticEnergy
kinetic energy of the geostrophic flowgeostrophicPotentialEnergy
potential energy of the geostrophic flow
- Other
N2Function
dLnN2Function
maxFg
maxFw
rhoFunction
function handlesthrowErrorIfDensityViolation
checks if the proposed coefficients are a valid adiabatic re-arrangement of the base state