WVTransform
Represents the state of the ocean in terms of energetically orthogonal wave and geostrophic (vortex) solutions
Declaration
classdef WVTransform < handleOverview
The WVTransform subclasses encapsulate data representing the state of the ocean at a given instant in time. What makes the WVTransform subclasses special is that the state of the ocean is represented as energetically independent waves and geostrophic motions (vortices). These classes can be queried for any ocean state variable including \(u\), \(v\), \(w\), \(\rho\), \(p\), but also Ertel PV, relative vorticity, or custom defined state variables.
The WVTransform is an abstract class and as such you must instatiate one of the concrete subclasses,
WVTransformConstantStratificationWVTransformHydrostaticWVTransformSingleMode
Topics
- Initialization
waveVortexTransformFromFileInitialize a WVTransform instance from an existing filewaveVortexTransformWithDoubleResolutioncreate a new WVTransform with double resolution
- Domain attributes
- Initial Conditions
addRandomFlowadd randomized flow to the existing stateaddUVEtaadd \((u,v,\eta)\) to the existing valuesinitFromNetCDFFileinitialize the flow from a NetCDF fileinitWithRandomFlowinitialize with a random flow stateinitWithUVEtainitialize with fluid variables \((u,v,\eta)\)initWithUVRhoinitialize with fluid variables \((u,v,\rho)\)- Waves
removeAllremoves all energy from the model
- Energetics
summarizeEnergyContentdisplays a summary of the energy content of the fluidsummarizeModeEnergyList the most energetic modes
- Internal
WVTransforminitialize a WVTransform instanceaddToVariableCacheadd variable to internal cache, in case it is needed againclearVariableCacheOfApAmA0DependentVariablesclear the internal cacheclearVariableCacheOfTimeDependentVariablesclear the internal cache of variables that claim to be time dependentdefaultMethodAnnotationsreturn array of WVAnnotations to annotate the methodsdefaultOperationsreturn array of WVOperation instances initialized by defaultfetchFromVariableCacheretrieve a set of variables from the internal cacheperformOperationcomputes (runs) the operationperformOperationWithNamecomputes (runs) the operation
- Flow components
addFlowComponentadd a flow componentaddPrimaryFlowComponentadd a primary flow component, automatically added to the flowflowComponentWithNameretrieve a WVFlowComponent by nameprimaryFlowComponentWithNameretrieve a WVPrimaryFlowComponent by name
- Utility function
spectralVariableWithResolutioncreate a new variable with different resolution- Metadata
addOperationadd a WVOperationflowComponentNamesretrieve the names of all available variablesforcingNamesretrieve the names of all available variables. This preservesoperationWithNameretrieve a WVOperation by nameprimaryFlowComponentNamesretrieve the names of all available variablesremoveOperationremove an existing WVOperation
- Write to file
concatenateVariablesAlongTimeDimensionConcatenate variables along the time dimensioncreateNetCDFFileForTimeStepOutputOutput theWVTransformto file with variable time dimensionwriteToFileWrite this instance to NetCDF file.
- Operations
- Transformations
convertFromWavenumberToFrequencySummarytransformUVEtaToWaveVortextransform fluid variables \((u,v,\eta)\) to wave-vortex coefficients \((A_+,A_-,A_0)\).transformWaveVortexToUVWEtatransform wave-vortex coefficients \((A_+,A_-,A_0)\) to fluid variables \((u,v,\eta)\).
- Transformations
- Nonlinear flux and energy transfers
energyFluxFromNonlinearFluxconverts nonlinear flux into energy fluxenstrophyFluxFromNonlinearFluxconverts nonlinear flux into enstrophy fluxnonlinearFluxForFlowComponentsreturns the flux of each coefficient as determined by the nonlinear flux operationnonlinearFluxWithGradientMasksreturns the flux of each coefficient as determined by the nonlinear flux operationnonlinearFluxWithMaskreturns the flux of each coefficient as determined by the nonlinear flux
- Developer
propertyAnnotationsForTransformreturn array of CAPropertyAnnotations for the WVTransform
- State Variables
variableAtPositionWithNamePrimary method for accessing the dynamical variables on the at anyvariableWithNamePrimary method for accessing the dynamical variables
- Other
A0geostrophic coefficients at reference time t0 (m)A0_KE_factorA0_PE_factorA0_Psi_factorA0_QGPV_factorA0_TE_factorA0_TZ_factorAmnegative wave coefficients at reference time t0 (m/s)Appositive wave coefficients at reference time t0 (m/s)Apm_TE_factoraddForcingclassDefinedOperationForKnownVariableThis is one of two functions that returns operations for computingflowComponentNameMapflowComponentsforcingforcingNameMapforcingTypeforcingWithNamehasClosurehasForcingWithNamehasMeanPressureDifferencechecks if there is a non-zero mean pressure difference between the top and bottom of the fluidhasPVComponenthasVariableWithNamehasWaveComponentinitForcingFromNetCDFFileforcingGroupName = join( [string(class(self)),”forcing”],”-“);isHydrostaticnFluxedComponentsnonlinearFluxoperationForKnownVariableThis is one of two functions that returns operations for computingoperationNameMapoperationVariableNameMapoptimizedTransformsForFlowComponentreturns optimized transforms that avoid unnecessary computationprimaryFlowComponentNameMapprimaryFlowComponentspropertyAnnotationForKnownVariableThis is one of two functions that returns operations for computingremoveAllForcingremoveForcingrestoreForcingAmplitudesrk4NonlinearFluxrk4NonlinearFluxForFlowComponentssetForcingspatialDimensionNamesspatialFluxForcingspectralAmplitudeForcingspectralDimensionNamesspectralFluxForcingsummarizeDegreesOfFreedomsummarizeFlowComponentssummarizeForcingsummarizeVariablestt0timeDependentVariablesNameMaptotalEnergytotalEnergyOfFlowComponenttotalEnergySpatiallyIntegratedtotalFlowComponenttransformFromSpatialDomainWithFgRequired for transformUVEtaToWaveVortextransformFromSpatialDomainWithGgtransformToSpatialDomainWithFRequired for transformWaveVortexToUVEtatransformToSpatialDomainWithFAllDerivativestransformToSpatialDomainWithGtransformToSpatialDomainWithGAllDerivativesupdateDependentVariablesNameMapvariableCachevariableNamesversionwaveVortexTransformWithResolutionwvCoefficientDependentVariablesNameMap