WVTransformHydrostatic
A class for disentangling hydrostatic waves and vortices in variable stratification
Declaration
classdef WVTransformHydrostatic < WVTransformOverview
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
WVTransformHydrostaticcreate a wave-vortex transform for variable stratification
- Primary flow components
geostrophicComponentreturns the geostrophic flow componentwaveComponentreturns the internal gravity wave flow componentinertialComponentreturns the inertial oscillation flow componentmdaComponentreturns 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 frequencyverticalModesinstance of the InternalModes classeffectiveVerticalGridResolutionreturns the effective vertical grid resolution in meters- Vertical modes
FMatrixtransformation matrix \(F_g\)FinvMatrixtransformation matrix \(F_g^{-1}\)GMatrixtransformation matrix \(G_g\)GinvMatrixtransformation matrix \(G_g^{-1}\)
- Validation
isDensityInValidRangechecks if the density field is a valid adiabatic re-arrangement of the base state
- Initial conditions
- Waves
addGMSpectrumadd waves following a Garrett-Munk spectrumaddWaveModesadd amplitudes of the given wave modesaddWavesWithFrequencySpectrumadd waves with a specified frequency spectruminitWavesWithFrequencySpectruminitialize with waves of a specified frequency spectruminitWithAlternativeSpectruminitialize with an alternative formulation of the GM spectrum in the wavenumber domain.initWithGMSpectruminitialize the wave field following a Garrett-Munk spectruminitWithWaveModesinitialize with the given wave modesremoveAllWavesremoves all wave from the model, including inertial oscillationssetWaveModesset amplitudes of the given wave modes
- Geostrophic Motions
initWithGeostrophicStreamfunctioninitialize with a geostrophic streamfunctionsetGeostrophicStreamfunctionset a geostrophic streamfunctionaddGeostrophicStreamfunctionadd a geostrophic streamfunction to existing geostrophic motionssetGeostrophicModesset amplitudes of the given geostrophic modesaddGeostrophicModesadd amplitudes of the given geostrophic modesremoveAllGeostrophicMotionsremove all geostrophic motions
- Inertial Oscillations
addInertialMotionsadd inertial motions to existing inertial motionsinitWithInertialMotionsinitialize with inertial motionsremoveAllInertialMotionsremove all inertial motionssetInertialMotionsset inertial motions
- Mean density anomaly
addMeanDensityAnomalyadd inertial motions to existing inertial motionsinitWithMeanDensityAnomalyinitialize with inertial motionsremoveAllMeanDensityAnomalyremove all mean density anomaliessetMeanDensityAnomalyset inertial motions
- Waves
- Energetics of flow components
geostrophicEnergytotal energy, geostrophicwaveEnergytotal energy, wavesinertialEnergytotal energy, inertial oscillationsmdaEnergytotal energy, mean density anomaly
- Operations
- Energetics
geostrophicKineticEnergykinetic energy of the geostrophic flowgeostrophicPotentialEnergypotential energy of the geostrophic flow
- Other
N2FunctiondLnN2FunctionmaxFgmaxFwrhoFunctionfunction handlesthrowErrorIfDensityViolationchecks if the proposed coefficients are a valid adiabatic re-arrangement of the base state