Vertical modes arise as part of the separable solution to both the internal wave problem and quasigeostrophic theory. The eigenvalue problem (EVP) is treated in many introductory physical oceanography textbooks, (e.g., Cushman‐Roisin & Beckers, ; Gill, ), and the resulting vertical modes describe the vertical structure of the linear solutions for a given density profile. While there are an infinite number of bases that can be used to represent ocean currents and density anomalies satisfying certain boundary conditions, the vertical modes correspond to dynamical solutions of the equations of motion and are therefore both diagnostic and prognostic. For this reason, vertical modes are the standard basis with which to represent the vertical structure of ocean currents, and it would be hard to overstate their usefulness for describing and modeling the ocean.
There are two primary uses for the vertical modes: (1) projecting a given flow field onto the vertical modes to determine its spectrum (a forward transformation) or (2) creating a dynamically consistent linear flow field from a given spectrum (an inverse transformation). For example, projection onto the vertical modes (the forward transformation) was used to construct the Garrett‐Munk internal wave spectrum (Munk, ; Polzin & Lvov, ), analyze regional and global ocean simulations (Buijsman et al., ; Kelly et al., ; Zilberman et al., ), interpret satellite altimetry observations (LaCasce & Wang, ; Zhao, ), and to describe the vertical structure of balanced flow in the ocean (Wortham & Wunsch, ; Wunsch, ). Examples of using the inverse transform are less common but typically involve initializing a full spectrum of internal waves (Sun & Kunze, ; Winters & D'Asaro, ).
This study was motivated by two situations where current techniques for computing vertical modes were found to have significant errors for reasonable computation times. In the first, perhaps less common situation, a numerical model needed to be initialized with a full spectrum of internal waves—a task which requires solving an EVP at each resolved wavenumber in the model. In the second situation, we sought to compare an observed horizontal velocity spectrum of internal waves to the Garrett‐Munk spectrum near a very strong pycnocline. This requires computing vertical modes at high frequencies—which requires appropriately resolving the mode variability near the pycnocline.
There are a number of sources of error that arise in performing either the forward or inverse transformation. These include the following:
- A poorly defined mean density function.
- Measurement noise and uncertainty in the density function and in the case of a forward transform the dynamical variables.
- Aliasing error, due to the location of the grid points of the dynamical variables (relevant only for forward transform).
- Interpolation error, due to the location of (and lack of) data points specifying the density function.
- Numerical truncation error of the modes generated from the vertical EVP.
Whether performing a forward or inverse transformation, these sources of error will compound in some fashion to create error in either the resulting flow field or the resulting spectrum.
The first source of error, a poorly defined mean density function, can result from lack of data or often just uncertainty in what qualifies as a mean (e.g., questions of what time and length scales to average over or even whether averaging is the correct approach for a nonlinear system). Measurement noise and uncertainty in data is a topic unto itself, so the methods here proceed without concern for measurement noise when possible. The aliasing error arises when the grid points are placed such that higher modes project onto the lower modes. This source of error is relatively easily controlled by computing the condition number of the projection matrix, which provides a fairly precise cutoff for the number of resolvable modes. On the rare occasion that a density function can be specified analytically, the interpolation error can be minimized to numerical precision. However, in the usual case where the density is given on some grid with uneven spacing, the density function must be interpolated in between those grid points. Our work suggests that density interpolation error does not dominate the error for most cases. This manuscript is therefore largely concerned with the final source of errors—arising from the numerical representation of the modes in the vertical EVP.
The standard method for solving the vertical EVP is to discretize the problem and construct the matrices using second‐order finite difference matrices (e.g., Cushman‐Roisin & Beckers, ). However, this approach produces unacceptable errors for all but the very lowest modes in the simplest stratifications. This is problematic because numerical algorithms for solving EVPs scale as , where is the number of discretization points in the vertical, so small increases in resolution come at a large computational cost. Instead of using finite difference methods, Kelly () solves the hydrostatic form of the EVP spectrally using Galerkin's method, at a fraction of the computational cost and with much higher accuracy. Dunphy () uses a Chebyshev collocation method to solve the nonhydrostatic case with fixed frequency. Here, we extend the ideas of Kelly () and Dunphy () to the more general nonhydrostatic cases where the EVP must be solved for each frequency in the spectrum or each resolved wavenumber in a numerical model. Our approach solves the EVP spectrally with Chebyshev polynomials to produce high‐quality vertical modes, even with relatively small . The same techniques are then applied to solve for surface quasigeostrophic modes, used to describe the effect of density anomalies at the ocean boundaries.
To illustrate the differences in performance of these two methods, we consider the 10th vertical mode at two different frequencies in a realistic stratification profile. The left panel in Figure shows an example stratification profile taken from the Sargasso Sea during the Latmix 2011 summer field experiments (Shcherbina et al., ). The 10th vertical mode is computed with 512 grid points using both second‐order finite difference methods (blue) and spectral methods (purple). The center panel shows that, at hydrostatic frequencies, finite difference methods perform well. However, the right panel shows the 10th mode at a nonhydrostatic frequency (corresponding to the dashed line in the left panel) for which the finite difference method fails. Generally, we find that finite difference methods with grid points will return about good modes, although this is stratification and grid point location dependent. For many low‐mode low‐frequency studies then, finite difference methods are fully up to the task. However, for nonhydrostatic frequencies or high modes, the methods described below are more suitable.
The left panel shows a stratification profile taken from the Sargasso Sea in the summertime (Shcherbina et al., ). The two vertical lines indicate a nearly hydrostatic frequency (dashed) and nonhydrostatic frequency (dotted). The 10th mode computed using finite difference methods (blue) and spectral methods (purple) is compared at the hydrostatic frequency (center panel) and nonhydrostatic frequency (right panel). Both methods use 512 evenly spaced grid points as input then interpolate to a high‐resolution grid as output.
This paper begins with a derivation of the two most relevant forms of the vertical EVP that arise from the linearized equations of motion in section . This provides the necessary context for orthogonality relations that form the basis of the normalization of the vertical modes, which in turn shows limitations of using certain vertical modes as a basis. Section demonstrates some of the problems associated with finite differencing, while section shows how these can be remedied using spectral methods. Details of the numerical implementation are described in section , and some of the other sources of error are examined in section . Section discusses some best practices and potential pitfalls. Finally, the appendices include the exact analytical solutions for constant and exponential stratification that are employed for unit testing, the WKB (Wentzel‐Kramers‐Brillouin) approximated solution used for the adaptive grid method, and the class inheritance tree of the publicly available Matlab implementation of these methods.
The linearized equations of motion for the fluid velocity , , , on the ‐plane are [Image Omitted. See PDF] [Image Omitted. See PDF] [Image Omitted. See PDF] [Image Omitted. See PDF] [Image Omitted. See PDF] where and are the perturbation pressure and density, respectively. These are defined such that the total pressure and the total density , where . All variables in the equations of motion are functions of , , and , except for which is strictly a function of . The operator is understood to reduce to when applied to univariate functions. We use the usual definition of the buoyancy frequency .
There are three linearly independent solutions to equations , assuming periodic horizontal boundary conditions and a flat bottom: two wave solutions and the geostrophic solution.
The positive frequency wave solution is given by [Image Omitted. See PDF] where the functions and are the eigenfunctions with corresponding eigenvalue , to be discussed in detail below. The frequency is determined through the dispersion relation, [Image Omitted. See PDF] and the negative rotating wave solution is found by flipping the sign on the frequency, . In this notation the phase angle of the wave is given by and is the total horizontal wavenumber. The horizontal phase is given by . The eigenvalue is referred to as the equivalent depth and is related to the wave group velocity, . The value can be replaced in favor of eigenfrequency using the dispersion relation, but equation uses both in order to avoid singularities at and for notational compactness. Applying this solution to equations leads to two coupled equations for the vertical structure functions, [Image Omitted. See PDF] which can be combined into various second‐order EVPs (see section ).
The geostrophic solution is given by [Image Omitted. See PDF] where . The solution can also be written entirely in terms of stream function , where . Satisfying the vertical momentum equation requires that , but unlike the wave solutions, geostrophic solutions already satisfy continuity. For a given wavenumber the geostrophic solution is entirely specified by a vertical profile of any one of the variables, from which all others are immediately deduced. For example, determines , from which is determined by integration—the thermal wind balance. There is no preferred basis for the geostrophic solution.
Although the scalings that lead to equations result in the linear geostrophic solution where , near‐geostrophic theories with a different choice of scalings, such as quasi‐geostrophy (Pedlosky, ), have nonzero vertical velocities and therefore require full continuity, that is, that . As with the wave solution, this requirement combined with results in an EVP, detailed in section .
An eigenbasis constructed with the rigid lid boundary condition ( ) precludes nonzero density anomalies at the surface. One work‐around to this limitation is to further decompose the geostrophic solution into three parts: two parts resulting from the density anomaly at the boundaries and one part from the remaining density anomaly in the interior. Following Lapeyre and Klein (), the idea is then to let [Image Omitted. See PDF] where both the surface and bottom components of the flow are required to have no potential vorticity in the interior, [Image Omitted. See PDF] but account for the density anomaly at the boundaries, for example, [Image Omitted. See PDF]
The resulting modes can be solved for a given wavenumber and are referred to as the surface quasi‐geostrophic (SQG) modes. This methodology has been used to construct the interior velocity field from sea surface height (SSH) and temperature data Wang et al. ().
Smith and Vanneste () formulate a new EVP that results in modes capable of capturing surface density anomalies for quasigeostrophic flows. Taking equation from Smith and Vanneste () and writing it in the present notation, we have [Image Omitted. See PDF] with surface boundary condition , where is a tunable parameter. Importantly, these modes remain orthogonal, unlike the combined set of SQG modes and interior modes described above.
An alternative to both the SQG and the Smith and Vanneste () approaches is to use the internal wave eigenbasis constructed with the free surface boundary condition (detailed below) which also results in orthogonal modes capable of capturing nonzero density anomaly at the ocean surface.
The vertical EVP is formed using the two coupled equations from section for the vertical structure functions, (vertical momentum) and (continuity). In combination with the dispersion relation, one of the eigenfunctions can be eliminated, resulting in various single second‐order EVPs for the vertical structure functions or . The two most practical EVPs to solve are for with constant , [Image Omitted. See PDF] and for with constant , [Image Omitted. See PDF] The near‐geostrophic EVP is found by combining the vertical momentum condition with the continuity condition , which can be treated as the with . Note that this is equivalent to making the hydrostatic approximation (Kelly, ) and removes all dependence on frequency and wavenumber .
For the cases considered here we take the lower boundary condition at to be either free slip, where , or no slip, where . These correspond to and , respectively. These conditions can be seen as the limiting cases of sloped bottom topography (LaCasce, ). The surface boundary condition at is taken to be either a rigid lid with , or a free surface approximated as , where is the linear approximation of the isopycnal displacement. In terms of the vertical modes, the free surface boundary condition becomes . Finally, there are many cases where the density profile does not extend to the full depth of the ocean and no boundary conditions (beyond the EVP itself) should be added.
Solving either EVP yields a set of eigenvalues that can be ordered such that , each with corresponding eigenfunction . This means that solving the results in wave solutions with the same frequency , but different wavenumbers , and similarly solving the results in wave solutions with the same wavenumber and different frequencies . Although we do not implement this numerically, note that rearranging the poses the EVP for fixed group velocity, , with eigenvalue .
The equations for the and are both Sturm‐Liouville problems and share the property that their eigenmodes are orthogonal. Following the procedure in Kelly (), the eigenmodes found with the satisfy [Image Omitted. See PDF] and [Image Omitted. See PDF] while the eigenmodes found with satisfy [Image Omitted. See PDF] and [Image Omitted. See PDF] where and are unspecified constants that depend on the chosen normalization, as discussed below. It is important to note that these orthogonality conditions only apply for a particular choice of or . For example, an eigenmode found using is not orthogonal to an eigenmode found using if .
The most significant difference between the two EVPs is that eigenmodes from the often form a complete basis set for typical ocean stratification profiles, while the eigenmodes from the do not. The is a regular Sturm‐Liouville problem when the weighting function for all , a condition typically met in the ocean. We note that although it is fair to say that stratification with is typical of the world oceans, after examining 30,000 CTD profiles, Kunze () finds that 10% of the data have and a full 30% of the data suggest within 380 m of the bottom. In contrast, the weighting function in the switches sign at turning points , where . Consequently, the norm of an arbitrary function defined on the domain and satisfying the boundary conditions is not guaranteed to be positive using the norm implied by equation , a necessary condition for completeness. Intuitively, this can be seen in Figure , which shows that the high‐frequency modes have no variance beyond the turning points and are therefore incapable of representing arbitrary functions on the domain.
The amplitude of each vertical mode can be scaled by an arbitrary constant, so one must choose a normalization appropriate for the problem being considered. The four most common scenarios are setting the total energy, a horizontal velocity ( ), a vertical velocity ( ), and the SSH of a given wave.
To set the total energy of the internal wave solution in equation , we use the modes from the and therefore use the norm implied by equation , [Image Omitted. See PDF] where we have chosen as the normalization constant in order to keep the vertical modes unitless. Another reasonable choice is to take , but using keeps the norm universal, rather than problem specific. Taking the total energy of the wave, [Image Omitted. See PDF] and then depth integrating and averaging over space and time produces a wave with energy if we set the coefficient in equation .
Setting the maximum initial eastward velocity to can be accomplished by imposing and . The maximum vertical velocity is set using the norm where , but is clearly singular for inertial waves which have no vertical velocity. The SSH is set using the pressure at the surface with and .
To set the total energy of the interior geostrophic solution in equation , we assume the solution uses the typical geostrophic modes from equation with and therefore use the norm implied by equation , [Image Omitted. See PDF] where we have taken . This produces a mode with energy if we let, [Image Omitted. See PDF]
Setting the maximum eastward velocity requires using . The SSH is set using the pressure at the surface by setting and .
Computing the lowest vertical modes with finite differencing methods can be relatively fast and accurate when considering a single wavenumber or frequency. Although one can encounter problems with the higher modes, this can usually be ameliorated by increasing resolution. The primary issues with finite differencing arise when needing to compute many modes across a broad range of frequencies and wavenumbers—the two scenarios that motivated the present study. To compute a complete internal wave frequency spectrum requires solving the at each resolved frequency between the Coriolis frequency and the maximum buoyancy frequency, roughly EVPs. This is especially challenging near the buoyancy frequency, where all oscillations occur in the narrow region where . On the other hand, initializing a numerical model with an internal wave spectrum involves solving the for each resolved wavenumber in the model, which easily requires computations or more.
A prerequisite to initializing a numerical model with a precise internal wave spectrum is that the modes must be computed for each unique horizontal wavenumber resolved by the model using the . If the numerical model has horizontal grid points, approximately unique EVPs must be solved (up to another factor of 2 can be eliminated with isotropic horizontal resolution). Unfortunately, eigenvalue algorithms scale as for by matrices. This means that initialization of an internal wave spectrum scales as and thus, with any reasonable vertical resolution, this will quickly become a rate limiting step to a model run. In practical terms, the computation time of these EVPs takes approximately 1, 10, and 100 s for of 512, 1,024, and 2,048, respectively, on consumer hardware from 2015.
The problem is further exacerbated by the poor performance of finite difference methods. To demonstrate, we compare different numerical methods against an analytical solution. Consider an exponential density profile—the canonical deep ocean stratification profile which has known analytical solutions for both the nonhydrostatic internal modes (Garrett & Munk, ), as well as the SQG modes (LaCasce, ). Using a numerical method to solve the , we can compute the relative error of the numerical solution to the analytical solution. We define the relative error as [Image Omitted. See PDF] where is the true solution evaluated at the grid points and is the numerical approximation. Figure shows the maximum relative error of the eigenmodes , and eigenvalue found by solving the using second‐order finite difference methods for standard exponential stratification with 64 vertical grid points (blue). Details of the numerical implementation of the analytical solutions are given in Appendix .
Reasonable error magnitudes are ; however, the top panel of Figure shows that no modes computed with finite differencing satisfy this condition. The situation is even worse for the case shown in the bottom panel, where even the lowest mode has an error. The blue dotted line in Figure shows that increasing the resolution tenfold for second‐order finite differencing decreases the error by a factor of 100, as would be expected. However, this comes at 1,000 times the computational cost and still barely produces any usable modes.
Relative error as a function of vertical mode number using 64 evenly spaced grid points in exponential stratification N(z)=N0ez/b, where N0=3 cph and b=1,300 m at latitude 33° in a 5,000 m deep ocean for K=0.0 (top panel) and K=2π500m (bottom panel). Shown are two second‐order finite differencing methods with (1) 64 grid points (blue), (2) 631 grid points (blue dotted), and 3 spectral methods using Chebyshev polynomials with coordinates in (3) depth (red), (4) WKB scaled (purple), and (5) density (orange).
The accuracy of finite differencing can be increased by going to higher orders (Fornberg, ), since the truncation error at order scales as . The truncation error of the 10th mode in exponential stratification is shown in the top panel of Figure where the blue (solid, dotted) line shows the (second and sixth)‐order finite difference method converging at its predicted rate. The bottom panel shows that even with 1,024 grid points, there are only eight usable modes for the second‐order finite differencing method, while sixth‐order gives up to 50 modes. However, while increasing the order of the method does provide some gains in accuracy, the most efficient way to proceed is simply to use spectral methods, which promise exponentially decreasing truncation error, rather than the polynomial truncation errors offered by finite differencing. When using an analytical density function (dashed lines, Figure ) rather than gridded data, there is no interpolation error and the spectral methods truncation errors reach a noise floor somewhere between 64 and 128 grid points. Furthermore, the number of usable modes is an order of magnitude higher than even the sixth‐order finite difference method. In practical terms, the second‐order finite difference method is producing about 10 good modes in 100 s, while the spectral methods are producing about 100 good modes in 1 s. The increase in truncation error at higher resolution is likely due to increasingly compounded errors of the eigenvalue solvers.
The top panel shows relative error as a function of resolution for the 10th mode in exponential stratification with K=2π500m. The density function is specified on an evenly spaced grid (solid lines) or passed directly as an analytical function (dashed lines). The bottom panel shows the number of usable modes as a function of resolution, defined as the number of modes with truncation errors less than 10−2. The convergence rates of the second‐order and sixth‐order finite difference methods are found to be (Δz)2.0 and (Δz)5.8, respectively.
Written in matrix form the is [Image Omitted. See PDF] where is the vector representation of the normal mode at grid points in , and . For finite differencing, , where is the differentiation matrix and is the dimensional identity matrix. To use Chebyshev polynomials, we project vector onto a Chebyshev basis using , where is the matrix that transforms a vector from a Chebyshev basis to the coordinate basis. In a practical sense, the columns of are the Chebyshev polynomials. Then the EVP becomes [Image Omitted. See PDF] or simply [Image Omitted. See PDF]
The vector contains the coefficients needed to reconstruct eigenfunctions, and are the second derivatives of the Chebyshev poynomials.
The optimal choice of grid for Chebyshev polynomials is a Gauss‐Lobatto grid (Boyd, ; Canuto et al., ); for example, equation below and thus the eigenmatrices and eigenfunctions are always created on a Gauss‐Lobatto grid for any chosen coordinate. Because the basis functions are continuous functions of , the resulting vertical modes can be interpolated onto any grid at any resolution by evaluating the functions at the points of interest.
It is, however, rarely the case that density is given as an analytical function or that observations are made on a Gauss‐Lobatto grid, which means that typically the density needs to be interpolated on the appropriate grid. Interpolation is performed using B‐splines implemented with the numerical framework described in Early and Sykulski (). The advantage to using B‐splines to represent gridded density data is that it is easy to accommodate arbitrary grids. Despite being a low‐order method, this is generally not a limitation (see section ). In the cases shown in Figure , the algorithms are given the density ( ) on a uniform grid in of 64 points and the resulting modes are returned on the same grid (except where noted for the high‐resolution finite differencing case). This is, of course, suboptimal for the spectral cases which use a Gauss‐Lobatto grid on various coordinates to compute the EVP. When given an analytical function for density, these methods perform even better, as can be seen in Figure .
Despite the potential limitations imposed by interpolating the density with B‐splines onto a Gauss‐Lobatto grid, the red line in Figure shows that the Chebyshev method performs extremely well, even while interpolating from an evenly spaced grid and outputting to the same grid. The first 20 and 14 modes have error less than for the and cases, respectively. However, at higher horizontal resolution (larger wavenumbers ), even the spectral method's errors grow large, because the points at which the functions are evaluated do not sufficiently capture the oscillations of the modes. This can be remedied by using a stretched coordinate, .
In order to find an independent coordinate better suited to capturing the structure of the eigenmodes, we rewrite the EVPs in terms of a generic coordinate and then consider two concrete examples. Taking to be a function of and applying the chain rule leads to [Image Omitted. See PDF] and [Image Omitted. See PDF]
For example, the becomes [Image Omitted. See PDF] where now . The free surface boundary condition in these coordinates becomes , while the normalization conditions are now [Image Omitted. See PDF] and [Image Omitted. See PDF]
A necessary condition for using stretched coordinates is that the function must be strictly monotonic.
For density coordinates , equation can be written as [Image Omitted. See PDF] where . Note that the derivatives of the density are computed on the coordinate then projected onto the coordinate in the EVP. This avoids using inverses of functions that tend towards zero and therefore has greater numerical stability. While the method does well for the high wavenumber case (Figure , lower panel), it performs somewhat poorly with a uniform relative error of for all modes in the low wavenumber (upper panel), as shown by the orange line. Evidently, density coordinates cluster points inefficiently in this case.
A compromise between depth ( ) and density ( ) coordinates is the WKB stretched coordinate, . In this case the EVP becomes [Image Omitted. See PDF] where .
The purple line in Figure shows that the vertical modes computed on WKB coordinates have uniform accuracy of for , outperforming the density coordinate case and also performing nearly as well as density coordinates in the high wavenumber case.
Solving the suffers from the additional challenge that as the frequency increases and the distance between turning points decreases, the grid spacing necessary to capture the mode structure becomes ever smaller. As noted in section , this issue arises when considering internal waves near a pycnocline. An example stratification profile and vertical mode found at a frequency approaching the maximum frequency in the pycnocline is shown in Figure . The relative error as a function of mode for this example is shown in Figure , from which it is clear that even the WKB stretched coordinate that performed so well for the does relatively poorly in this scenario. Sturm‐Liouville theory tells us that the th mode will have zero crossings in the oscillatory region where (Arfken, ). Thus, in order to resolve these oscillations, one would require at least optimally placed points in that region, as well as additional points to capture the variance in the decay regions. Simply increasing resolution of the Chebyshev grid cannot efficiently solve the problem, as grid points will continue to be poorly placed.
The left panel shows a stratification profile with pycnocline taken from Cushman‐Roisin and Beckers (). The vertical dashed line represents a frequency with two turning points in the pycnocline. The right panel shows the fourth vertical F mode at that frequency.
Relative error as a function of vertical mode number using 64 evenly spaced grid points for the frequency and stratification shown in Figure . Shown is the WKB scaled spectral method (purple) as in Figure and also the adaptive grid method (green) that clusters points near the regions of oscillation. Only the first 16 modes are shown.
To resolve this issue, we devise an ad hoc method for clustering points in regions of interest. Our approach is to partition the domain into regions where the modes are hypothesized to be nonzero, formulate the EVP for each region (using WKB stretched coordinates), then couple the equations at the region boundaries. This enables us to assign most of the points to the regions where the solution is assumed to be nonzero, and allocate a few remaining points in the other regions. A comparison of this adaptive method and the standard WKB stretched coordinates is shown in Figure , where the adaptive method is able to capture a few more usable modes than the standard WKB stretched coordinate method with one EVP. The value of this method becomes more pronounced as the maximum frequency is reached. The number of usable modes (error ) drops to zero as the maximum buoyancy frequency is approached when using the single EVP, as shown in Figure . However, using the adaptive grid algorithm, we are able to guarantee a minimum number of usable modes as points cluster around the turning frequencies.
The equation boundaries are established by using the WKB approximated solution to identify the regions where the modes are expected to be nonzero. Specifically, the equation boundaries are the points where WKB solution decays to of its value from the turning point. This is an adjustable tolerance, chosen to be small enough that only a few points are needed to capture the nearly zero function but large enough that the nonzero regions aren't unnecessarily large. The gray vertical lines in Figure show the number of coupled equations being used to solve the EVP. At the lowest frequencies only one equation is used and the method is identical to the WKB stretched coordinate method described in section . As the frequency increases, the algorithm eventually separates into two coupled equations: one for the top boundary and pycnocline and another for the deep region where no mode variance is expected (refer to Figure ). At high enough frequency the region above the pycnocline is decoupled as well, and three coupled EVP problems are solved.
The EVPs are coupled by requiring that the function and its first derivative are continuous at the equation boundaries, following the procedure described in section 22.3 of Boyd (). The “eigenvalue rule‐of‐thumb” as discussed in Boyd () states that roughly modes will be accurate when using Chebyshev polynomials away from boundary layers or critical levels. Solving the EVP with turning points near the maximum buoyancy certainly does not satisfy this criterion, but the rule‐of‐thumb can be modified to use half of the modes with eigenvalues greater than zero. Although we make no attempt at proving the general validity of this modification, the dashed line in Figure indicates that the rule‐of‐thumb generally does well at predicting how many modes are good quality.
The number of usable modes (error <10−2) versus frequency for the stratification in Figure using 64 points. The adaptive grid method and standard WKB method are shown in green and purple, respectively. The dashed green line is the rule‐of‐thumb number of good modes by the adaptive grid method. The two vertical gray lines separate the regions where the adaptive algorithm used 1, 2, or 3 coupled equations.
One of the primary products of this paper is the implementation of these methods as classes in Matlab (see Appendix for more details). Figure shows the flowchart followed by the initialization algorithm for the InternalModes class, described in this section.
The two methods for initializing the classes are both called using
- im = InternalModes(rho,z,zOut,latitude);
where the arguments rho,z are either a gridded density field at locations z or function handle valid in the domain spanned by [min(z) max(z)]. When the function handle is given, the density function is projected onto Chebyshev polynomials. If gridded data are provided, then the density is interpolated using B‐splines. The argument zOut specifies the grid on which all output is given, which need not span the full depth.
After initialization, all classes support setting the upper and lower boundary conditions as well as setting the normalization to any of the choices discussed in section .
The two primary functions for computing internal modes are
- [F,G,h,omega] = im.ModesAtWavenumber(k);
for the and
- [F,G,h,k] = im.ModesAtFrequency(omega);
for the .
The implementation of these methods for finite differencing is straightforward—the EVP is solved either on the gridded input data as given or on a grid that matches the output grid if specified as a function. The differentiation matrices are created using the algorithms described in Fornberg (). However, the spectral implementations require additional choices.
The EVP being solved is [Image Omitted. See PDF] where is a generic stretched coordinate, , , , and are referred to here as coefficient functions.
The algorithm can be separated into the three parts. First, we compute the coefficient functions for each EVP, for example, and for equation . Second, the EVP is solved on the appropriate coordinate with points. Finally, the resulting modes are normalized and projected onto the output grid with an arbitrary number of points.
If the InternalModes class is initialized with a function handle for the density, it is projected onto Chebyshev polynomials which are then used to compute the coefficient functions and, if necessary, the stretched coordinate.
To project onto Chebyshev polynomials, we define a grid with points using [Image Omitted. See PDF] where is an integer index ranging from 0 to . We evaluate the density function on that grid, . The density function is then expanded in a Chebyshev polynomial basis such that [Image Omitted. See PDF] where indicates the th coefficient for Chebyshev polynomial defined on coordinates. The coefficients for the derivative of the function, denoted , are then computed using a recursion formula [Image Omitted. See PDF] where for and otherwise. Because a Gauss‐Lobatto grid was used for the ‐coordinate, the Chebyshev transformation is performed with a rescaled fast Fourier transformation in operations. The differentiation requires only operations, which means that all of the coefficient functions for the EVP can be computed on a relatively fine grid. For example, takes a fraction of a second on consumer hardware from 2015.
The stretched coordinates implemented here are either , , or , where the latter two cases require density to be strictly monotonic. For those two cases if anywhere in the domain, then an error is thrown. For the WKB coordinate, , the integral is computed spectrally using equation .
In the more typical scenario where a user initializes the InternalModes class with gridded data from observations or a numerical model, B‐splines are used to interpolate the data and compute the coefficient functions. The primary advantage to using B‐splines in this scenario is that B‐splines can be created for arbitrary grids without suffering from Runge's phenomena at lower orders. We fit the data to sixth‐order interpolating spline (with five nonzero derivatives) using the methodology and numerical implementation described in Early and Sykulski ().
If the method requires that density remain monotonic (e.g., for WKB and density coordinates), then the B‐spline fits are constrained to be monotonic following Pya and Wood (). If the data are not monotonic, then this implicitly smooths to find the nearest monotonic fit in a least squares sense.
Computing the stretched coordinate and the coefficient functions from the spline interpolant requires derivatives and integrals of the B‐splines, which are relatively straightforward to compute because they are just piecewise polynomials (De Boor, ). The WKB method requires computing the square root of the B‐spline interpolant. The approach taken here is to build a new interpolating spline of the same order that interpolates between the square root of the data points.
All three Chebyshev methods solve their respective EVPs on a Gauss‐Lobatto grid of their respective coordinate, that is, , , or . The Gauss‐Lobatto grid in is defined in the usual way as [Image Omitted. See PDF] where the number of points reflects the size of the EVP and is therefore also an absolute upper bound to the number of modes that may be computed.
Once the Gauss‐Lobatto grid is created, the corresponding value is computed using the bisection method as implemented in Driscoll et al. (). The method is set to terminate with a relative error of .
The coefficient functions in equation are now simply evaluated onto the grid using the interpolant (either a B‐spline or Chebyshev). The Chebyshev polynomials and their derivatives ( , and ) are computed using the standard recursion formulas and then multiplied by the coefficient functions to create eigenvalue matrices. The boundary conditions are implemented by replacing the first and last rows of the matrices and in .
The EVP is then solved using the standard generalized EVP solver. This is typically the rate limiting step in the process, taking operations. The resulting eigenvectors now contain coefficients to the Chebyshev polynomials defined on the stretched coordinate.
The adaptive grid is created by locating regions in the domain where the solution is expected to be small and then allocating fewer points (and therefore fewer Chebyshev polynomials) to those regions. After identifying the turning points where , the WKB solution is used to identify the equation boundaries , the points where . The WKB solution is assumed to work locally in the stratification and is therefore applied at the turning point, , in the direction of decaying variance. The eigenvalue is assumed to be set globally by integration over all oscillatory regions. If equation boundaries are identified, they delineate regions: the “decay” regions, where the solution is anticipated to be small and governed by the decaying exponential and “oscillatory” regions where the solution is expected to dominate and include the oscillatory solution. These decaying and oscillating regions are necessarily alternating.
The regions are coupled using the same technique described in section 22.3 of Boyd () by requiring continuity across boundaries for and . The key benefit to this algorithm is that the decay regions are allocated as few as 6 points each, while oscillatory regions are apportioned the remaining points relative to their WKB length, . While we find that 6 points appear to be sufficient for the decay regions, in practice, we do in fact apportion 1/16th of the total points evenly between the decay regions as a hedge that this ad hoc method will fail for some unforeseen cases.
The adaptive grid algorithms use low‐order interpolation to identify and because high accuracy is not required, and this keeps the number of computations .
The final step is to normalize the resulting eigenvectors and project them onto . Normalization using the two integral conditions can be performed exactly invoking the fact that the integral of each Chebyshev polynomial is exactly known [Image Omitted. See PDF]
We have defined such that it can be summed with a vector of Chebyshev coefficients to produce the integral. In other words, if is a Chebyshev coefficient vector, then is the definite integral. The integrands in equations and are computed pseudospectrally before integrating (by transforming to the spatial domain, multiplying, then transforming back Chebyshev coefficients).
Computing the max U and and max W norm is more problematic because the function extrema do not necessarily lie on the grid points. For the implementation, we simply take the maximum at the resolved grid points, but if higher accuracy is required, one could locate the extrema using the methods in Boyd ().
Finally, the normalized eigenmodes are projected onto the output grid using the slow Chebyshev transforms, [Image Omitted. See PDF]
If a large number of output points are requested, this operation could dominate the total computation time.
The algorithm flowchart for the mode computation is shown in Figure
The two functions for computing the SQG modes are
- psi = im.SurfaceModesAtWavenumber(k);
and
- psi = im.BottomModesAtWavenumber(k);
where k is an array of wavenumbers.
The SQG modes are found from equation using a linear solver after replacing the top and bottom points of the matrix with the boundary conditions. As noted in Tulloch and Smith (), the SQG modes require a high density of grid points near the boundaries, a task well suited to the Gauss‐Lobatto grid in equation . The number of Chebyshev polynomials is chosen so that the Gauss‐Lobatto grid captures at least 10 points over the ‐folding scale. The ‐fold scale for constant stratification (see Appendix ) is , and the distance between the first two points in a Lobatto grid, equation , is [Image Omitted. See PDF] where we have defined as the depth of the domain. Setting , we find that we need [Image Omitted. See PDF] points (and therefore also polynomials) to sufficiently capture the SQG mode. The resulting SQG modes are projected onto the output grid using equation .
In order to ensure that each of the algorithm implementations is correct, the numerically generated eigenmodes and eigenvalues are compared against the analytical solutions for constant stratification and exponential stratification shown in Appendix . The comparison is performed across a range of wavenumbers and frequencies for both surface boundary conditions and all four norms.
The computed SQG modes are also compared against analytical solutions for constant and exponential stratifications, shown in Appendix .
In section we noted five sources of errors that contribute to the total error when computing the forward or inverse transformation, but this manuscript has primarily focused on one source of error: the numerics of accurately representing the vertical modes in the EVP. We now discuss these other sources of error and how they are dealt with in the numerical implementation.
When performing a forward transformation, where a given dynamical field is projected onto the vertical modes, the data grid will determine how many modes are resolvable. As with a Fourier transformation, higher‐frequency modes alias into the lower‐frequency modes. Unlike the Fourier transformation, however, the optimal grid for performing a transformation is not an evenly spaced grid but depends on the stratification profile, and therefore, the EVP being solved. Here we show that there is a relatively easy method for determining the number of resolvable modes for a given grid using the condition number of the resulting matrix.
To show the effect of different grid choices on the forward transformation, we use the analytical solution of the vertical modes in exponential stratification in combination with an imposed spectrum to generate stochastic isopycnal displacement profiles typical of the world oceans. In particular, we use the Garrett‐Munk spectrum, [Image Omitted. See PDF] where is the roll‐off mode, usually set to 3 but possibly as high as 20, is the slope which is usually very nearly , and normalizes sum over to unity. For each stochastically generated set of coefficients, , a profile is created. The profile is then evaluated on three different grids: , , and , where is the grid of Gaussian quadrature points, determined by the roots of a mode one higher than is trying to be used (Boyd, ; Press et al., ). Using the first modes, we then attempt to recover the coefficients using least squares—in practice this is Matlab's mldivide (\) operator. For example, the first coefficients of the evenly spaced grid are determined by [Image Omitted. See PDF] where . The root‐mean‐square error (rmse) is defined as the error in the sum of recovered and missing coefficients [Image Omitted. See PDF]
The top panel shows the root‐mean‐quare error as a function of total modes used to recover the coefficients with an inverse transformation. Vertical dashed lines are the predicted cutoffs for the different grids, based on the matrix condition number at which the modes are no longer resolvable. The condition number as a function of total modes is shown in the bottom panel.
Figure shows the result of trying to recover the mode coefficients, using successively more modes for the three different grids. In all three cases the rmse decreases as modes are added until a dramatic increase occurs, correlating with a similarly dramatic increase in the condition number of the matrix. The quadrature grid, defined as the roots of the mode plus the boundaries, performs best, as expected. Including the boundaries in this definition means that the top and bottom boundary points provide no useful information, and therefore, only modes are recoverable for and for with a rigid lid. This definition is chosen so that the forward and inverse transform for constant stratification coincides with the discrete sine and cosine transform (and their associated grids).
While the condition number of the matrix is clearly controlled by the grid being used, the choice of norm also affects the condition number. Generally speaking, the performs well for transformations with the modes and the with the modes. The exception to this is when the free surface boundary condition is used, the barotropic mode has a substantially different norm and should be rescaled.
Here, we test whether or not the truncation error in the vertical modes is a limitation in recovering the coefficients of the spectrum, . To this end, we created profiles on a quadrature grid with variance distributed using for a range of parameters including white noise (large ), and very smooth (large ), as described above, and recorded how many mode coefficients were recoverable for some error tolerance across all the different numerical methods in this paper. We found that discarding modes with truncation errors exceeding the requested error tolerance of the modes guarantee coefficients recovered with the requested error tolerance. In other words, if one wants relative errors in coefficients of less than , one needs modes with errors less than . The only exception is for very steep spectra (e.g., ), where the coefficients of the higher modes are indistinguishable from zero. The reverse of this is not true—in fact, including modes with truncation errors exceeding the error tolerance can often return coefficients within the bounds of the error tolerance. Evidently, the errors in these ordered, orthogonal bases work systematically in our favor.
Another source of error may arise from interpolation of the density function. This issue is treated separately from a poorly defined or noisy mean density function and therefore assumes that the data given are gridded and without error. For gridded data, our method uses a relatively low order B‐spline to interpolate between grid points which is then evaluated for the coefficient functions where needed. Does this low‐order interpolation method limit the mode recoverability described in the previous section?
To address this question, we compute the vertical modes for exponential stratification from an evenly spaced density function with variable number of grid points. These modes are then used to recover the coefficients , as above, on a high‐resolution quadrature grid. We find that with as few as 16 grid points for the density function, we are able to recover 90 mode coefficients with less than 1% error.
It is often the case that the mean density function, , is not easily defined. Averaging over a mooring time series of density will not necessarily result in a monotonic density function—and averaging often removes the sharp gradients that exist in individual profiles, which may not be desirable. Even output from numerical models can suffer from these same issues, depending on the boundary conditions. Noisy data, where errors in the observed value of stem from instrument errors, also effectively constitute a poorly defined mean. One way to frame these issues is to ask how a misspecified mean density affects our ability to infer the vertical spectrum of a given flow.
First, we note that all methods, as implemented, will proceed without error for noisy data. However, the most notable difference between methods is that the WKB and density coordinate methods use a density function constrained to the nearest monotonic spline fit, as previously described. It is not clear that this implicit smoothing is necessarily “better” than using the unaltered density function with the ‐coordinate method for noisy data. This decision, and how to deal with measurement noise in general, is beyond the scope of this manuscript. Additional smoothing of the density data can be done using many techniques, including the constrained smoothing splines described in Early and Sykulski ().
In order to test the effects of misspecifying a mean density profile, we generate density profiles in exponential stratification that follow the GM spectrum, as above, but we attempt to recover the coefficients using vertical modes computed from a noisy mean density profile. The results are consistent with section . For example, as long as the modes from the noisy profile have errors less than relative to the modes generated from the true profile, the recovered coefficients will have errors less than relative to . The relative error of the vertical modes increases as a function of mode number until eventually the mode errors and therefore coefficient errors reach . Exactly where mode errors reach depends on the details of the noise, or misspecification, of the mean density profile.
While accurately recovering the coefficients of the spectrum becomes impossible with a noisy mean density profile, we are able to accurately infer the spectrum from which was generated by either ensemble averaging over additional synthetic profiles or bin averaging nearby modes. One way to see why this might be true is to note that the coefficient errors never exceed —so although the exact coefficient is incorrect, the magnitude is correct on average. In practice, using modes from the misspecified mean density profile causes variance that should be associated with mode , for example, to be assigned to the variance of nearby modes.
That the spectrum is recoverable despite a noisy mean is consistent with previous analysis methods. In Polzin and Lvov (), internal wave spectra are found using WKB approximated modes and a WKB stretched grid. It is also important to note that computing the spectrum with a misspecified mean density function still requires an orthogonal set of modes, and therefore, fast and accurate mode computation is still helpful.
The spectral methods presented here solve the most relevant forms of the vertical eigenvalue and surface quasigeostrophic mode problems efficiently and accurately. The methods also include an algorithm for computing modes in challenging stratification profiles at high frequencies near turning points. The algorithms are implemented in a publicly available Matlab suite (
Poorly resolved features and discontinuities in the density profile will produce the Gibbs phenomenon, where “ringing” occurs in the vicinity of the discontinuity. In one example, we found that a narrow 5‐m‐wide pycnocline in a 5,000‐m‐deep ocean produced strong spurious oscillations unless the pycnocline was sufficiently well resolved with enough grid points. In another example, we defined an analytical profile with a discontinuity in (the highest derivative used in the EVP) and this also produced the Gibbs phenomenon. Interestingly, in these cases lower‐order finite differencing produced better modes for the same vertical resolution, because these methods implicitly smooth the derivatives. A logical extension of this work would be to apply the “splitting” algorithms in chebfun (Driscoll et al., ) to handle such discontinuities.
Our recommendations for projecting observed or modeled fields onto the modes are as follows:
- When possible, use a quadrature grid for the fields and modes, for example, the function GaussQuadraturePointsForModesAtWavenumber in the InternalModesSpectral class computes the Gauss quadrature points for . This is a relatively expensive operation (it involves solving the EVP) but provides near‐optimal point placement.
- In the usual case where there is no freedom to choose grid points, compute the condition number as a function of mode as described in section and limit the number of modes to a low condition number. Alternatively, if computation time is not a limitation, one can perform the least squares fit of the fields to successively more modes until the coefficients are no longer stable.
Many of the errors described in section may still be a concern but may be quantified with some of the techniques in section , by using the density function and spectrum specific to the problem.
We present analytical solutions for the internal mode eigenvalue problem in three different scenarios: constant stratification, exponential stratification, and the WKB approximated solution for arbitrary stratification. These solutions are used to validate the numerical implementations.
The internal baroclinic modes in constant stratification are given as [Image Omitted. See PDF] [Image Omitted. See PDF] with eigendepth and vertical wavenumber given by [Image Omitted. See PDF] where we have assumed that at the lower boundary . In the case of a rigid lid ( at ), the correction to the vertical wavenumber is . However, if the linearly approximated free surface boundary condition is used, , then is nonzero. The equations for are transcendental and are therefore solved with a numerical root finding algorithm. The equations for are written in a form conducive for finding the desired root.
- For fixed wavenumber, , the vertical wavenumber correction is found by solving [Image Omitted. See PDF] near and the eigendepth is given by [Image Omitted. See PDF]
- For fixed frequency, , the vertical wavenumber correction is found by solving [Image Omitted. See PDF] near and the eigendepth is given by [Image Omitted. See PDF]
Trigonometric | Linear | Hyperbolic | |
‐constant | |||
‐constant | |||
The normalization for these modes is given in the first column of Table .
In the case of the free surface boundary condition, there also exists a barotropic mode ( ), the solution of which changes from trigonometric to hyperbolic at , or where [Image Omitted. See PDF]
In these cases then, the vertical wavenumber reduces to .
-
Trigonometric case, or
The solution is exactly the same as the baroclinic solutions given above in equations and , but now equation is solved when . As a practical matter, it is numerically more stable to solve [Image Omitted. See PDF] for the positive root near . For fixed frequency, equation can be used to find the root near .
-
Linear case, or
The solution is given by [Image Omitted. See PDF] [Image Omitted. See PDF] where .
- Hyperbolic case,
or
The solution is given by
[Image Omitted. See PDF]
[Image Omitted. See PDF]
- For fixed wavenumber, , the vertical wavenumber correction is found by solving [Image Omitted. See PDF] for the root near and the eigendepth is given by [Image Omitted. See PDF]
- For fixed frequency, , the vertical wavenumber correction is found by solving [Image Omitted. See PDF] for the root near and the eigendepth is given by [Image Omitted. See PDF]
Exponential stratification serves as the representation of the ocean stratification away from the poles and continental boundaries. As formulated and first solved in Garrett and Munk (), we take the stratification to be , where is buoyancy frequency and is the thermocline depth (with canonical values of three cycles per hour and 1,300 m).
Letting the stretched coordinate as in section , the becomes [Image Omitted. See PDF] which has solution [Image Omitted. See PDF] where [Image Omitted. See PDF] is chosen to satisfy the lower boundary condition . The Bessel function has a singularity at , so for many choices of and , and the second term needs to be neglected for stable numerical evaluation. The order of the Bessel function is set by the frequency , or, using the dispersion relation wavenumber . The modes are found by taking the derivative [Image Omitted. See PDF]
The discretization into modes is a result of applying the second boundary condition, in this case either a rigid lid or a free surface and then finding the eigenmode speeds that satisfy those conditions. The s are therefore determined by the roots of Bessel functions, for which there is no general closed form solution. The challenge then becomes finding bounds for the roots and writing the equation in a form suitable for a root finding algorithm.
In practice, it is easiest to find the inverse of the s, so we let and then write the root equation, , in terms of parameter function and . Again, stable numerical evaluation requires that we work around the singularity of , so if , then we take [Image Omitted. See PDF] and when we take [Image Omitted. See PDF] where in either case the rigid‐lid condition requires [Image Omitted. See PDF] [Image Omitted. See PDF] and the free surface requires [Image Omitted. See PDF] [Image Omitted. See PDF]
-
‐constant solution
The parameter functions are defined as [Image Omitted. See PDF] [Image Omitted. See PDF] where the scaling factor is chosen from the WKB approximated solution (Desaubies, ),
-
The root equation must be taken to be and [Image Omitted. See PDF](from Desaubies, , equation 2.18); the first modes are found within .
-
otherwise
The root equation must be taken to be and [Image Omitted. See PDF](from Desaubies, equation 2.19); the first modes are found within .
-
‐constant solution
Unlike the ‐constant solution, the order of the Bessel function changes for each root, and therefore, the root equation being used may have to change during evaluation.
The parameter functions are defined as [Image Omitted. See PDF] [Image Omitted. See PDF] where and . Desaubies () provides low‐frequency (lf) and high‐frequency (hf) bounds for the eigenvalues, which we can be written in terms of wavenumber [Image Omitted. See PDF] [Image Omitted. See PDF]
We transition at [Image Omitted. See PDF]
To set the search bounds for the root algorithm, we want [Image Omitted. See PDF] and [Image Omitted. See PDF] so the first modes are found within .
Normalization is performed by direct evaluation of the mode functions for the and and by numerical integration for the and norms.
Desaubies () found the WKB solution for stratification with at most one turning point . Simplified and using the notation of this manuscript, the WKB solution with single turning point is [Image Omitted. See PDF] [Image Omitted. See PDF] where and we have defined [Image Omitted. See PDF] so that it goes to zero at the turning point but is positive everywhere else. The eigenvalue is proportional to the integral of the stratification over the oscillatory region [Image Omitted. See PDF] while normalization coefficient for the is [Image Omitted. See PDF]
It is useful to note that away from the turning point, the Airy function can be approximated as sinusoidal above the turning point and exponentially decaying below the turning point [Image Omitted. See PDF]
In the case of no turning point ( ) the WKB solution is [Image Omitted. See PDF] [Image Omitted. See PDF] [Image Omitted. See PDF] where we have taken in . The eigenvalue is now [Image Omitted. See PDF]
Note that this solution does reduce to the exact solution for constant stratification.
The SQG modes are computed by taking the Fourier transform of in equation and scaling by the Fourier transformed boundary condition such that . Equation then becomes [Image Omitted. See PDF] with surface boundary condition and bottom boundary boundary condition (and vice versa for the bottom boundary modes).
To solve this problem numerically, we project onto a Chebyshev basis where is the vector representation of . The equation for the SQG modes becomes [Image Omitted. See PDF] in the interior with boundary conditions and for the surface mode.
The numerical implementation of equation is validated against the known analytical solutions.
The surface quasigeostrophic modes for constant stratification can be found in Tulloch and Smith (). For the upper boundary this is [Image Omitted. See PDF] and the lower boundary [Image Omitted. See PDF] where . These solutions cannot be evaluated numerically for all wavenumbers and depths because the function may overflow. Instead, we use [Image Omitted. See PDF] and [Image Omitted. See PDF] for reliable numerical evaluation.
The surface SQG modes for exponential stratification are first solved by LaCasce (). Defining the scale , the surface mode is given by [Image Omitted. See PDF] while the bottom mode can be shown to be [Image Omitted. See PDF]
Bessel functions and should not be confused with the wavenumber .
The WKB solution for the SQG mode does not appear to have been previously derived. Assuming a solution of the form and inserting this into equation , we have that [Image Omitted. See PDF]
We then assume a series expansion . combined with the assumption that both and are . The two lowest order equations are therefore [Image Omitted. See PDF] [Image Omitted. See PDF] which has solution [Image Omitted. See PDF]
Applying boundary condition and , the surface mode is [Image Omitted. See PDF] where in the integral from the surface to depth, while , , and .
For constant stratification this reduces to the result in Appendix .
The algorithms in this manuscript are implemented as classes in Matlab in order to take advantage of class‐based inheritance. The class hierarchy is shown in Figure , where InternalModeBase is the abstract superclass which defines the primary interface. A class cluster InternalModes (not part of the hierarchy) is included to provide a single interface from which to initialize all the concrete subclasses.
Fig. C1. Class hierarchy for the Matlab implementation of the algorithms in this manuscript. InternalModesBase is an abstract class.
The primary Spectral class uses depth ( ) coordinates from section to compute the eigenvalue problem, while the DensitySpectral and WKBSpectral subclasses use the stretched coordinates described in sections and , respectively. The AdaptiveSpectral class overrides its superclass when the frequency is high enough, as described in section . The ConstantStratification class implements the analytical solution from Appendices and , while the ExponentialStratification class implements the analytical solution from Appendices and . The WKB class implements the WKB approximated solution from Appendices and and inherits from the Spectral class in order to use the spectrally computed stratification function, . The FiniteDifference class uses finite difference matrices of arbitrary order, on arbitrary grids using the algorithm described in Fornberg ().
All classes available online (
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer
© 2020. This work is published under http://creativecommons.org/licenses/by/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Abstract
The vertical modes of linearized equations of motion are widely used by the oceanographic community in numerous theoretical and observational contexts. However, the standard approach for solving the generalized eigenvalue problem using second‐order finite difference matrices produces errors for all but the few lowest modes, and increasing resolution quickly becomes too slow as the computational complexity of eigenvalue algorithms increases as . Existing methods are therefore inadequate for computing a full spectrum of internal waves, such as needed for initializing a numerical model with a full internal wave spectrum. Here we show that rewriting the eigenvalue problem in stretched coordinates and projecting onto Chebyshev polynomials results in substantially more accurate modes than finite differencing at a fraction of the computational cost. We also compute the surface quasigeostrophic modes using the same methods. All spectral and finite difference algorithms are made available in a suite of Matlab classes that have been validated against known analytical solutions in constant and exponential stratification.
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer
Details
1 NorthWest Research Associates, Redmond, WA, USA
2 Center for Atmosphere Ocean Science, Courant Institute of Mathematical Sciences, New York University, New York, NY, USA