WVDiagnostics
Produces diagnostics and figures from WVModel output
Overview
This is a collection of diagnostic tools for analyzing model output
Topics
- Initialization
WVDiagnosticsInitializes the WVDiagnostics object, loads the wave-vortex transform and diagnostics files.
- Diagnostics Generation
create1DMirrorFluxesCreate 1D mirror flux diagnostics and write them to the diagnostics NetCDF.create2DMirrorFluxesCompute 2D mirror-flux diagnostics and write them to the diagnostics NetCDF.createDiagnosticsFileCreate a new diagnostics file and compute diagnostics from WVModel output.createReservoirGroupCreate a reservoir group in the diagnostics NetCDF and populate it.
- Figures
- Model Snapshot
plotEnergySpectrumPlot the wave/geostrophic energy spectra at a given time.plotEnstrophySpectrumPlot the enstrophy spectrum at a given time.plotFluidDecompositionMultipanelPlot a multipanel decomposition of the fluid state (wave vs geostrophic).plotFluidStateMultipanelPlot multipanel summary of fluid state and spectraplotPotentialEnergySpectrumPlot the potential energy spectrum
- Energy
plotEnergyFluxOverTimePlot energy fluxes as a function of time.plotEnergyFluxTemporalAveragePlot temporally averaged energy flux diagnostics.plotEnergyFluxes1DPlot 1D energy fluxes as a function of pseudo-wavelength / KE-PE / frequency.plotEnergyOverTimePlot energy for each reservoir over time.plotEnergyTriadFluxOverTimePlot inertial flux for each reservoir over timeplotSourcesSinksForReservoirGroupPlot sources, sinks, and reservoirs diagram for a reservoir group.plotSourcesSinksReservoirsDiagramPlot sources, sinks, and reservoirs diagram.showDampingFluxVsPseudolengthShow Damping Flux Vs Pseudolength.
- Potential Enstrophy
plotEnstrophyFluxOverTimePlot enstrophy fluxes for reservoirs as a function of time.plotEnstrophyFluxTemporalAveragePlot temporally averaged enstrophy flux diagnostics.plotEnstrophyOverTimePlot enstrophy over timeplotEnstrophyTriadFluxOverTimePlot enstrophy triad fluxes over time.
- Ancillary
plotMooringRotarySpectrumPlot rotary spectra from mooring velocity time series.
- Auxiliary functions
logWavelengthAxisProduce tick labels and positions for a log-scaled wavelength x-axis.overlayFrequencyContoursOverlay contours of nondimensional frequency on the current axes.overlayGeostrophicKineticPotentialFractionContoursOverlay contour where geostrophic kinetic fraction equals a given value.overlayGeostrophicKineticPotentialRatioContoursOverlay contours of geostrophic kinetic-to-potential energy ratio.plotPoissonFlowOverContoursPlot Poisson Flow Over Contours.setLogWavelengthXAxisConfigure axis tick labels for a log-scaled wavelength x-axis.showRossbyRadiusYAxisAnnotate the axes with a Rossby radius y-axis label.
- Model Snapshot
- Summaries
createEnstrophyFluxSummaryTableCreate a LaTeX table summarizing enstrophy source/sink fluxes.summarizeSourcesSinksReservoirsSummarize Sources Sinks Reservoirs.
- Diagnostics
- Energy
- Time series, [t 1]
exactEnergyOverTimeExact Energy Over Time.quadraticEnergyOverTimeCompute energy for each reservoir over time.
- Time series, [t 1]
- Energy Fluxes
- General, [j kRadial t]
exactEnergyFluxesReturn the exact energy flux from the forcing terms, [j kRadial t].quadraticEnergyFluxesReturn the energy flux from the forcing terms.quadraticEnergyTriadFluxesReturn the energy flux from the inertial terms, specified as triad components.
- Temporal averages, [j kRadial]
exactEnergyFluxesTemporalAverageTemporally averaged exact energy fluxes.quadraticEnergyFluxesTemporalAverageCompute temporally averaged forcing fluxes.quadraticEnergyTriadFluxesTemporalAverageComputes the temporally averaged quadratic triad fluxes.
- Time series, [t 1]
exactEnergyFluxesOverTimeExact energy fluxes over time.quadraticEnergyFluxesOverTimeCompute forcing fluxes over time.
- Spatial-temporal averages, [1 1]
exactEnergyFluxesSpatialTemporalAverageCompute spatial-temporal average of the exact forcing fluxes.quadraticEnergyFluxesSpatialTemporalAverageCompute spatial-temporal average of forcing fluxes.quadraticEnergyTriadFluxesSpatialTemporalAverageCompute spatial-temporal average of inertial fluxes.
- Temporal averages, 1D axes
quadraticEnergyMirrorTriadFluxes1DQuadratic Energy Mirror Triad Fluxes1 D.quadraticEnergyMirrorTriadFluxes1D_kepeQuadratic Energy Mirror Triad Fluxes1 D kepe.quadraticEnergyMirrorTriadFluxes1D_omegaQuadratic Energy Mirror Triad Fluxes1 D omega.quadraticEnergyPrimaryTriadFluxesTemporalAverage1DQuadratic Energy Primary Triad Fluxes Temporal Average1 D.quadraticEnergyPrimaryTriadFluxesTemporalAverage1D_kepeQuadratic Energy Primary Triad Fluxes Temporal Average1 D kepe.quadraticEnergyPrimaryTriadFluxesTemporalAverage1D_omegaQuadratic Energy Primary Triad Fluxes Temporal Average1 D omega.
- Temporal averages, 2D axes [sparseJWavenumberAxis sparseKRadialAxis]
quadraticEnergyMirrorTriadFluxes2DQuadratic Energy Mirror Triad Fluxes2 D.quadraticEnergyPrimaryTriadFluxesTemporalAverage2DoutputGrid determines whether or not the fluxes get downsampled to the.
- General, [j kRadial t]
- Potential Enstrophy
- Time series, [t 1]
exactEnstrophyOverTimeExact Enstrophy Over Time.quadraticEnstrophyOverTimeQuadratic Enstrophy Over Time.
- Time series, [t 1]
- Potential Enstrophy Fluxes
- General, [j kRadial t]
exactEnstrophyFluxesReturn the available potential enstrophy flux from the forcing terms, [j kRadial t].quadraticEnstrophyFluxesReturn the enstrophy flux from the forcing terms.quadraticEnstrophyTriadFluxesReturn the enstrophy flux from the forcing terms.
- Temporal averages, [j kRadial]
exactEnstrophyFluxesTemporalAverageCompute temporally averaged enstrophy fluxes.quadraticEnstrophyFluxesTemporalAverageCompute temporally averaged enstrophy fluxes.
- Time series, [t 1]
exactEnstrophyFluxesOverTimeCompute exact enstrophy fluxes over time.quadraticEnergyTriadFluxesOverTimeCompute inertial fluxes over time.quadraticEnstrophyFluxesOverTimeCompute enstrophy fluxes over time.
- Spatial-temporal averages, [1 1]
exactEnstrophyFluxesSpatialTemporalAverageCompute spatial-temporal average of the exact enstrophy fluxes.quadraticEnstrophyFluxesSpatialTemporalAverageCompute spatial-temporal average of the qgpv enstrophy fluxes.
- General, [j kRadial t]
- Flux diagnostics — General
- Fluxes in space, [sparseJWavenumberAxis sparseKRadialAxis]
RescalePoissonFlowFluxForLogSpaceRescale Poisson Flow Flux For Log Space.
- Fluxes in space, [sparseJWavenumberAxis sparseKRadialAxis]
- General — Misc
- Fluxes in space, [sparseJWavenumberAxis sparseKRadialAxis]
cmoceanreturns perceptually-uniform colormaps created by Kristen Thyng.geostrophicGeostrophicWaveEnergyNote that.waveWaveGeostrophicEnergyNote that.waveWaveGeostrophicEnergyForModeNote that.
- Fluxes in space, [sparseJWavenumberAxis sparseKRadialAxis]
- Enstrophy fluxes — Triad interactions
- Fluxes over time, [t 1]
quadraticEnstrophyTriadFluxesOverTimeCompute enstrophy inertial (aka, triad) fluxes over time.
- Fluxes over time, [t 1]
- Energy
- Computing Spectra
crossSpectrumWithFgTransformCross Spectrum With Fg Transform.crossSpectrumWithGgTransformCross Spectrum With Gg Transform.spectrumWithFgTransformSpectrum With Fg Transform.spectrumWithGgTransformSpectrum With Gg Transform.
- Transformations
- Cosine and Sine
CosineTransformBackFast Discrete Inverse Cosine Transform.CosineTransformForwardFast Discrete Cosine Transform (DCT-I).DCT1CosineTransformForwardMatrix Discrete Cosine Transform (DCT-I) matrix.DCT2CosineTransformForwardMatrix_DCT2 Discrete Cosine Transform (DCT-II) matrix.DST1CosineTransformForwardMatrix Discrete Cosine Transform (DCT-I) matrix.DST2SineTransformForwardMatrix_DST2 Discrete Sine Transform (DST-II) matrix.SineTransformBackFast Discrete Inverse Sine Transform.iDCT1CosineTransformBackMatrix Discrete Cosine Transform (DCT-I) matrix.iDCT2InverseCosineTransformMatrix_DCT2 Inverse of forward DCT-II matrix.iDST1CosineTransformBackMatrix Discrete Cosine Transform (DCT-I) matrix.iDST2InverseSineTransformMatrix_DST2 Inverse of forward DST-II matrix.- General
SineTransformForwardFast Discrete Sine Transform (DST-I).
- Axes
sparseJKAxisBinMatricesBin matrices for sparseKRadialAxis and sparseJWavenumberAxissparseJWavenumberAxisSparse JWavenumber Axis.sparseKRadialAxisSparse KRadial Axis.sparseKePeAxisSparse kenetic-potential energy ratio Axis.sparseOmegaAxisSparse Omega Axis.sparsePseudoRadialAxisCreate Sparse Pseudo-Radial Wavenumber Axis and Bin Assignments.transformToKePeAxisTransform To Ke Pe Axis.transformToOmegaAxistransforms in the from (j,kRadial) to omegaAxis.transformToPseudoRadialWavenumbertransforms in the from (j,kRadial) to kPseudoRadial.transformToPseudoRadialWavenumberA0transforms in the from (j,kRadial) to kPseudoRadial.transformToPseudoRadialWavenumberApmtransforms Ap/Am modes in the from (j,kRadial) to kPseudoRadial.
- Cosine and Sine
- Utilities
cramerireturns perceptually-uniform scientific colormaps created.
- Internal
- Support functions for createReservoirGroup
addTriadFluxesForReservoirGroupAtTimeAdd Triad Fluxes For Reservoir Group At Time.filterEnergyForSourcesSinksReservoirsThis function returns values assuming three reservoirs: geo, wave, and.fluxesForReservoirGroupFluxes For Reservoir Group.variablesForReservoirGroupVariables For Reservoir Group.
- Support functions for createReservoirGroup
- Developer
classDefinedPropertyAnnotationsreturn array of WVPropertyAnnotation initialized by default
- Units
escaleenergy scaling (numeric value)escale_unitsenergy units (string value)flux_scaleenergy flux scaling (numeric value)flux_scale_unitsenergy flux units (string value)setEnergyUnitsSet the time and energy scaling and units for plotting and output.tscaletime axis scaling (numeric value)tscale_unitstime axis units (string value)z_flux_scalepotential enstrophy flux scaling (numeric value)z_flux_scale_unitspotential enstrophy flux units (string value)zscalepotential enstrophy scaling (numeric value)zscale_unitspotential enstrophy units (string value)
- Dependent property getter
t_diagGet time vector from the diagnostics file
- Other
Lr2Lr2_pmPoissonFlowFromFluxWe will treat the first dimension as `x’ and the secondPoissonFlowFromFluxDCTIWe will treat the first dimension as `x’ and the secondPoissonFlowFromFluxType1We will treat the first dimension as `x’ and the secondPoissonFlowFromFluxWithAxesWe will treat the first dimension as `x’ and the secondareEnergyReservoirsCompleteareTriadComponentsCompletediagfileNetCDFFile instance for the diagnostics filediagnosticsHasExplicitAntialiasingdiagpathpath to the diagnostics filefancyNameForNamefilterFluxesForReservoirforcingNamesgeo_hke_jkgeo_pe_jkiTimeiTimeChangedjjWavenumberkPseudoRadialkRadialkePeAxisomegaAxisomega_jkplotPoissonFlowOverPcolorpseudoRadialBinningchoose an algorithm for pseudoRadialBinningsymmetricTintMapColormap going from color -> tinted white -> colort_wvversionLocate folder containing this class filewvaapathpath to a WVTransform with explicit anti-aliasingwvfileNetCDFFile instance for the WaveVortexModel outputwvpathpath to the WaveVortexModel outputwvtWVTransform instance, set to the current iTimewvt_aa