WVTransformConstantStratification
Wave-vortex transformation that assumes constant stratification
Declaration
classdef WVTransformConstantStratification < WVTransformOverview
To initialization an instance of the WVTransformConstantStratification class you must specific the stratification and latitude, otherwise defaults will be assumed for you.
N0 = 3*2*pi/3600;
wvt = WVTransformConstantStratification([100e3, 100e3, 1300],[64, 64, 65], N0=N0,latitude=30);
Topics
- Initialization
WVTransformConstantStratificationinitialze a wave-vortex transform with constant stratificationspeedTestInitialize a WVTransformConstantStratification instance from an existing file
- 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
- Operations
- Primary flow components
geostrophicComponentreturns the geostrophic flow componentwaveComponentreturns the internal gravity wave flow componentinertialComponentreturns the inertial oscillation flow componentmdaComponentreturns the mean density anomaly component
- Energetics of flow components
geostrophicEnergytotal energy, geostrophicwaveEnergytotal energy, wavesinertialEnergytotal energy, inertial oscillationsmdaEnergytotal energy, mean density anomaly
- Energetics
geostrophicKineticEnergykinetic energy of the geostrophic flowgeostrophicPotentialEnergypotential energy of the geostrophic flow
- Other
CosineTransformBackMatrixDiscrete Cosine Transform (DCT-I) matrixCosineTransformForwardMatrixDiscrete Cosine Transform (DCT-I) matrixN0N2AtDepthN2FunctionPlaceParticlesOnIsopycnalMAS 1/10/18 - added intext (‘int’ or ‘both’) to give option of using int vs. int+ext fields for rho_primeRhoBarAtDepthSineTransformBackMatrixCosineTransformBackMatrix Discrete Cosine Transform (DCT-I) matrixSineTransformForwardMatrixCosineTransformForwardMatrix Discrete Cosine Transform (DCT-I) matrixbuildVerticalModeProjectionOperatorsWe renormalization the transformation matrices to directlydLnN2FunctionmaxFgmaxFwrhoFunctionfunction handlesthrowErrorIfDensityViolationchecks if the proposed coefficients are a valid adiabatic re-arrangement of the base statetransformFromSpatialDomainWithFtransformFromSpatialDomainWithG