1 Introduction

Ocean wave models can be classified as phase-resolved or phase-averaged. A phase-resolved model aims to describe each individual wave crest and trough—for example, the first principles, fully nonlinear, free-boundary problem for potential flow, or asymptotic approximations thereof (Boussinesq, KdV, Zakharov, nonlinear Schrödinger, etc.) are all phase-resolved models. On the other hand, phase-averaged models (such as CSY, Alber, and Hasselmann equations) aim to describe a stochastic sea state on a macroscopic and/or coarse-grained level. In that sense, any phase-averaged model is a statistical model of waves, and typically uses some additional assumptions to come up with closed equations for a phase-averaged representation. Phase-resolved models can be very accurate in terms of hydrodynamics. However, they still have to be initialized, and any prediction with them ultimately is as good as the initial conditions used. Since the vast majority of data available for real-world ocean waves is phase-averaged (typically power spectra/autocorrelations), the crisp exactness of ideal hydrodynamics is out of reach anyway when modelling the ocean. On the other hand, phase-averaged models have the advantage of being designed with real-world data in mind. They are well suited for the large space and time scales required in ocean engineering, and are known to provide valuable insights for the qualitative behaviour of stochastic wavefields. Phase-resolved simulations can also be used in conjunction with data to study stochastic sea states in a Monte Carlo sense, i.e., when used with a large population of initial conditions (realizations of the sea state) generated from phase-averaged measurements (Fig. 1). This is more accurate, but also much more computationally expensive than phase-averaged models—and thus reserved for validation or cases of special interest. Typically, a measured power spectrum (itself a phase-averaged representation of the sea surface elevation) is used to generate a population of initial conditions on a finite computational domain of size L through the random-phase approximation.

In this work, we study the convergence for the random-phase approximation in terms of qualitative behaviour, i.e., whether it correctly captures the presence or not of modulation instability in the original problem. We work in a regime where it is known that both modulation instability and its absence are possible [1,2,3, 24, 31, 51].

1.1 Phase-Averaged Models and the Modulation Instability

In 1962, Nobel-prize winner K. Hasselmann published what is now known as the Hasselmann equation, a phase-averaged equation describing the energy transfer between various wavenumbers [35]. The starting point of [35] is a stochastic sea state, where both the background and perturbations are gaussian and homogeneous random processes. Both gaussianity and homogeneity are widely considered to be fundamental features of deep-water gravity waves [46]; this is largely consistent with empirical observation, and is furthermore supported intuitively by an informal application of the Central Limit Theorem. Today many state of the art approaches still use the Hasselmann equation, or similar moment equations (often collectively called “wave kinetic equations”, WKE) to study different aspects of real-world ocean waves, including long-distance propagation [36, 37, 52], extreme events [26,27,28] etc. Moreover, it has inspired a number of rigorous mathematical studies not necessarily closely tied to real-world ocean waves. These include the well-posedness theory of generalized wave kinetic equations [30], wave turbulence [15, 16, 53], as well as the rigorous investigation of the closure conditions involved in the derivation of the WKE [21,22,23].

A few years after the introduction of Hasselmann’s equation, what is now called modulation instability (MI) entered the picture, in the study of the nonlinear Schrödinger equation (NLS) as an approximate model for ocean waves [7, 56] (groups working on different problems were also encountering aspects of the MI around the same time, see [57] for a historical overview). The presence of MI in focusing dispersive waves means that plane waves are inherently unstable. It is now known that the MI is a pretty universal feature of focusing, dispersive waves [12, 14]. Moreover, [12, 14] point out that the MI can be seen as the tendency of inhomogeneities to initially grow, and subsequently settle in a particular pattern. It is natural to ask whether stochastic wavefields with sufficiently narrow power spectra behave like plane waves in that respect. The fact that ocean waves are in many cases narrowband makes this a very natural question.

A first attempt to investigate how the MI might show up in a phase-averaged moment equation (analogous to Hasselmann’s equation) was made by Longuet-Higgins [42]. In that work Davey-Stewartson dynamics were used and it was found that the MI for a plane wave would indeed shows up in the moment equations. The investigation for a wavefield with a narrow but realistic power spectrum (not a delta-function) was first performed in [1]. A sufficient condition for exponential growth of small inhomogeneities was derived, in the form of a nonlinear system of equations depending on the power spectrum (what I. E. Alber called “the integral stability eigenvalue relation” [1]). We will call this kind of instability of a stochastic sea state generalized modulation instability (gMI), as opposed to the classical MI (MI) which is the growth of inhomogeneities around a plane wave only. It turns out that the MI can be seen as a special case of the gMI for a delta-function power spectrum (which practically amounts to a plane wave) [4]. The notable feature of Alber’s analysis is that sufficiently narrow and intense spectra can be seen to be unstable (meaning that inhomogeneities would spontaneously grow), while sufficiently broad and low-intensity spectra are expected to be stable (meaning that inhomogeneities do not grow; in fact later it was proved that inhomogeneities disperse in the stable case [3]). The quantitative resolution of the stability condition proved to require the development of novel numerical and analytical techniques, and took several decades to mature [2, 3, 31, 51] – more on that below.

The possibility of realistic sea states for which gMI is present (i.e. homogeneity is not stable) has profound consequences in the modelling of ocean waves. This was first articulated in the seminal paper [17], where a second moment equation is derived for water waves with an assumption of gaussianity only – not homogeneity. This is called the CSY equation, and it is a broadband, 2-dimensional two-space moment equation, derived from the Zakharov equation using only a gaussian closure. It is the most accurate moment equation for water waves in the literature. Assuming homogeneity is a robust feature of the sea state, then one can go to sixth order effects for the homogeneous wavefield, and essentially reproduce Hasselmann’s equation [17]. When a narrowband approximation is used in [17], it is found that the question of whether homogeneity is preserved can be investigated quantitatively, and Alber’s condition is essentially recovered. Crucially, if homogeneity is not stable, then the effects of the gMI are second order. In [2] this point was further strengthened: assuming that the initial sea state in the CSY equation consists of an O(1) homogeneous part and an o(1) inhomogeneous part, a CSY stability condition was derived, controlling whether the inhomogeneous part grows exponentially or not. This was done without any narrowband approximation, and it yields the broadband, 2-dimensional counterpart of Alber’s “stability relation”.

So [1, 2, 17] collectively present a fundamental dichotomy: starting with the a priori assumptions of gaussianity and quasi-homogeneity of a given sea state (meaning the initial presence of a small inhomogeneity), an Alber-type stability condition for that particular sea state can be produced. If it is found to be stable, then homogeneity is robust, the inhomogeneity is going to disperse, and one can safely go to higher-order effects in order to derive homogeneous kinetic wave equations - as in, e.g., [35, 38]. In that sense the Alber stability of the sea state is a compatibility condition, allowing the self-consistent use of homogeneity.

If the spectrum is found to be unstable however, then any inhomogeneity (which in the field could be due to wave breaking, gusts of wind, localized extreme events, presence of ships etc) will be spontaneously amplified, and this is a leading order effect. Thus homogeneity cannot be consistently used as a permanent structural feature of an unstable sea state: the homogeneous sea state is basically an unstable equilibrium. These sea states where gMI is present have to be studied with different methods, and are expected to behave very differently from the stable ones. This pumping of energy in inhomogeneities for unstable spectra has been reproduced in many works, including [6, 24, 25, 33, 44, 48, 49, 51]. In the presence of gMI, large localized extreme events emerge which clearly break homogeneity. It is worth noting that working out the fundamental scalings of the gMI can give a qualitative description of these localized extreme events; see Figure 1 for a comparison of asymptotic analysis of the Alber equation [4] with state of the art Monte Carlo results [20].

The remaining question is the quantitative resolution of the stability condition: when is a given power spectrum expected to be stable or unstable? The papers [2, 3, 31, 51] all investigate the onset of gMI for JONSWAP parametric spectra. The relevant parametrization here is in \(\alpha ,\) a parameter directly affecting the severity of the sea state, and \(\gamma ,\) a parameter primarily affecting how narrow the spectrum is. In practice, more severe sea states (storms) also tend to have narrower spectra – i.e. both \(\alpha \) and \(\gamma \) tend to increase or decrease together. While different techniques (and in some cases different equations) are used, the findings are broadly in agreement: the vast majority of realistic ocean wave spectra are stable, but the most extreme sea states on record cross over to the unstable region. On one hand, this is consistent with the widespread success of homogeneous approaches and the absence of MI-like effects in mild and moderate seas [27, 41]. On the other hand, it is consistent with large, dangerous rare events requiring a separate investigation [39, 46, 47]. It is worth noting that investigation of non-parametric spectra [5] is also possible, and yields similar results.

Fig. 1
figure 1

Left: inhomogeneity produced by the unstable modes of the Alber equation for a JONSWAP spectrum [4]. Right: average profile of extreme events for a JONSWAP spectrum; Monte Carlo simulation using modified NLS dynamics (image provided by T. Grafke) [20]

1.2 Onset of Instability and Monte Carlo Setup

Understanding these unstable sea states is crucial for several reasons: on one hand, it is likely that they play a key role in real-world oceanic rogue waves; on the other hand, they represent a mathematical regime that is very poorly understood, and in fact, most of the time we simply assume them away. Because of the instability of homogeneity, any phase-averaged model that assumes permanent homogeneity cannot be used as a first-principles model. For that, we should use Monte Carlo simulations of the underlying phase-resolved problem.

That is, we have to use phase-averaged data (power spectra) to create a large number of realizations of the sea surface elevation. These initial realizations will be evolved in time over a finite computational (or experimental) domain of length L. Very often periodic boundary conditions are used (although different kinds of boundary conditions also exist in the literature, e.g., non-reflective absorbing, etc). It is standard practice to do this with the random-phase approximation [40, 46], basically a superposition of plane waves with random phases and amplitudes consistent with the power spectrum.

Let us assume nonlinear Schrödinger (NLS) dynamics governing the evolution in time of a complex wave envelope u(xt). The original physical problem is typically framed in infinite space [43]

$$\begin{aligned} i \partial _t U + \frac{p}{2} \Delta U + \frac{q}{2} |U|^2U=0, \quad x\in \mathbb {R}, \quad \mathop {\sup }\limits _{x\in \mathbb {R}}|U(x,t)|< \infty , \end{aligned}$$
(1)

with initial data \(U_0(x)\) being a realization of a homogeneous random process with power spectrum S(k). On the other hand, the truncated problem that we can readily simulate is the periodized NLS

$$\begin{aligned} \begin{array}{c} i \partial _t u + \frac{p}{2} \Delta u + \frac{q}{2} |u|^2u=0, \qquad x\in \left[ -\frac{L}{2},\frac{L}{2}\right] , \\ u\left( -\frac{L}{2},t\right) =u\left( \frac{L}{2},t\right) , \qquad \partial _x u\left( -\frac{L}{2},t\right) =\partial _x u\left( \frac{L}{2},t\right) , \end{array} \end{aligned}$$
(2)

with initial data of the form \(u_0(x)=\sum A_j e^{2\pi i (k_jx+\phi _j)}\) where the \(\phi _j\) are i.i.d. random variables uniformly distributed in [0, 1).

The main question that we address in this paper is the following:

  • Under what conditions can we guarantee that the presence or not of gMI in the original problem (1) is accurately captured in the periodized problem (2)?

We answer this question by deriving a periodized Alber equation for the truncated problem, along with its stability relation which contains explicitly the lengthscale L. Then, we can see that the instability condition for the truncated problem converges to that of the original problem if appropriate scalings are used (roughly speaking as long as L is large enough and O(L) plane waves are used—see Theorem 2.1). More specifically, we find a way to create realizations of the sea state that leads to the correct stability condition. To highlight the role of L in the qualitative behaviour of the solution, we investigate its role in the fully nonlinear MI in Sect. 5.

Recent theoretical breakthroughs suggest that different preparation of the initial phase-resolved sea state may lead to completely different regimes [16, 23]. Thus, the preparation of the initial data deserves more detailed attention. This is already underway on the engineering side, where initialization and calibration are now starting to be seen as an iterative workflow in the context of high-quality data [34] rather than a standard formula.

2 Main Results

Theorem 2.1

(Periodized Alber equation) Let S(k) be a smooth power spectrum with \(\mathop {supp} S(k) \subseteq [0,k_{max}],\) and consider Eq. (2) with stochastic initial data \(u(x,0)=u_0(x)\) where

$$\begin{aligned} u_0(x) = \sum \limits _{j=1}^{M} A_j e^{2\pi i \left( \frac{jx}{L} + \phi _j\right) }, ~ A_j = \sqrt{ \frac{1}{L} S\left( \frac{j}{L}\right) } , \qquad \phi _j \sim \text{ i.i.d. } U(0,1), ~ M=k_{max}\cdot L. \end{aligned}$$
(3)

The Alber equation for the evolution in time of inhomogeneity \(\rho (x,y,t)\) of this problem is

$$\begin{aligned} \begin{array}{c} i\partial _t \rho + \frac{p}{2} \left( \Delta _x - \Delta _y\right) \rho +q \left[ \Gamma (x-y)+\rho (x,y,t)\right] \left[ \rho (x,x,t) - \rho (y,y,t) \right] =0, \\ \quad x,y \in \left[ \frac{L}{2},\frac{L}{2}\right] , \end{array} \end{aligned}$$

equipped with periodic boundary conditions, where

$$\begin{aligned} \Gamma (x) = \sum \limits _{n} \frac{1}{L} S\left( \frac{n}{L}\right) e^{2\pi i \frac{xn}{L}}, \end{aligned}$$

and the linear instability condition for this problem is

$$\begin{aligned} \exists \xi \in \mathbb {Z} \qquad \exists \omega \in \{ z\in \mathbb {C}: {\text {Re}}(z)>0\} \qquad \qquad \widetilde{h}_{L}(\xi ,\omega )=1, \end{aligned}$$
(4)

where

$$\begin{aligned} \widetilde{h}_{L}(\xi ,\omega )=\frac{iq}{L} \sum \limits _{k\in \mathbb {Z}} \frac{ S\left( \frac{k-\xi }{L}\right) - S\left( \frac{k}{L}\right) }{ \omega +ip\frac{2\pi ^2 \xi (2k-\xi )}{L^2} }. \end{aligned}$$
(5)

Moreover, in the limit \(L\rightarrow \infty ,\) \(\xi \rightarrow \infty ,\) \(\xi /L\rightarrow X\)

$$\begin{aligned} \lim \limits _{L\rightarrow \infty } h_L(LX,\omega )= iq \int \limits _{k=-\infty }^{+\infty } \frac{ S\left( k- \frac{X}{2}\right) - S\left( k+\frac{X}{2}\right) }{ \omega +4\pi ^2 i p k X } dk. \end{aligned}$$
(6)

Corollary 2.2

(Convergence of the instability condition as \(L\rightarrow \infty \)) Under the assumptions of Theorem 2.1, the linear instability condition (4) of the periodized problem converges to the linear instability condition for the infinite line problem [1, 3]

$$\begin{aligned} \exists X\in \mathbb {R} \qquad \exists \omega \in \{ z\in \mathbb {C}: {\text {Re}}(z)>0\} \qquad \qquad iq \int \limits _{k=-\infty }^{+\infty } \frac{ S(k- \frac{X}{2}) - S\left( k+\frac{X}{2}\right) }{ \omega +4\pi ^2 i p k X } dk=1, \end{aligned}$$
(7)

as \(L\rightarrow \infty .\)

Remark 2.3

We do not claim that Eq. (3) is the only way to recover the correct stability condition. Other random-phase-type strategies to create realizations of the sea state are also used in the literature, and it seems likely that they can also be calibrated lead to the same stability condition.

The rest of the paper is organized as follows: Sects. 3.1 and 3.2 go over the derivation of the periodized Alber equation and its stability relation. They are written in an accessible way that helps motivate and frame the proof, which can be found in Sect. 3.3. Methods to check the stability condition are recalled in Sect. 4. We explore the role of L in the MI and gMI in Sect. 5— in particular, it is seen that a short computational domain can completely stabilize the MI as well as the gMI. Ramifications are discussed in Sect. 6.

3 Stability Analysis for Periodized Stochastic Sea States

3.1 Derivation of the Stability Condition

Let us briefly recall the derivation of the Alber equation in the infinite space case. Assuming NLS dynamics for the wave envelope on infinite space (1) and following [1, 3], we can derive the second moment equation

$$\begin{aligned} i\partial _t R + \frac{p}{2} \left( \Delta _x - \Delta _y\right) R +q R(x,y,t) \left[ R(x,x,t) - R(y,y,t) \right] =0 \end{aligned}$$
(8)

for the two-space autocorrelation

$$\begin{aligned} R=R(x,y,t)=E[u(x,t)\overline{u}(y,t)]. \end{aligned}$$
(9)

The standard Gaussian closure

$$\begin{aligned} E[u(x, t) \bar{u}(x, t) u(x, t) \bar{u}(y, t)]=2 E[u(x, t) \bar{u}(y, t)] E[u(x, t) \bar{u}(x, t)] \end{aligned}$$

is used to arrive to Eq. (8), cf. Appendix B of [3] for more details. Moreover, by separating the wavefield into a homogeneous and non-homogeneous part

$$\begin{aligned} R(x,y,t)= \Gamma (x-y)+\rho (x,y,t), \end{aligned}$$
(10)

we derive the standard (infinite space) Alber equation for the evolution of the inhomogeneous part

$$\begin{aligned} i\partial _t \rho + \frac{p}{2} \left( \Delta _x - \Delta _y\right) \rho +q \left[ \Gamma (x-y)+\rho (x,y,t)\right] \left[ \rho (x,x,t) - \rho (y,y,t) \right] =0. \end{aligned}$$
(11)

Observe that if \(\rho =0,\) Eq. (11) is automatically satisfied. In other words, any homogeneous autocorrelation \(R(x,y,t)=\Gamma (x-y)\) is automatically a solution of Eq. (8); the point is to investigate if a particular homogeneous solution is stable under inhomogeneous perturbations (in which case an initially small inhomogeneity \(\rho \) is guaranteed to stay small and even disperses) or unstable (in which case any inhomogeneity is expected to grow rapidly).

Now, let us consider the periodization of the NLS on a torus of length L. Starting from Eq. (2) and performing the same steps as before, the same Alber Eq. (11) can still be derived—now equipped with periodic boundary conditions instead of non-growth at infinity. Moreover, the periodicity of u is inherited by its second moments, and thus, we can express moments in terms of Fourier series on the interval \([-\frac{L}{2},\frac{L}{2}]\)

$$\begin{aligned} \Gamma (y) = \sum \limits _{n\in \mathbb {Z}} P_n e^{2\pi i \frac{ny}{L}}, \qquad \rho (x,y,t) = \sum \limits _{k,l \in \mathbb {Z}} r_{k,l}(t) e^{2\pi i \frac{kx+ly}{L}}. \end{aligned}$$
(12)

For now, we treat the Fourier coefficients \(P_n\) as known. We will revisit their relationship to the continuous power spectrum S(k) in the next subsection. Now, assuming quasi-homogeneity, that is

$$\begin{aligned} \rho (x,y,0)=o(1), \end{aligned}$$
(13)

we linearise around homogeneity (i.e., drop \(O(\rho ^2)\) terms) and express everything in terms of the Fourier coefficients introduced in (12)

$$\begin{aligned} \begin{array}{c} i \sum \limits _{k,l \in \mathbb {Z}} \partial _tr_{k,l}(t) e^{2\pi i \frac{kx+ly}{L}} + \frac{p}{2} \sum \limits _{k,l \in \mathbb {Z}} r_{k,l}(t) \left( (2\pi i \frac{k}{L})^2 - (2\pi i \frac{l}{L})^2\right) e^{2\pi i \frac{kx+ly}{L}}+ \\ +q \left( \sum \limits _{n \in \mathbb {Z}} P_n e^{2\pi i \frac{n(x-y)}{L}}\right) \left( \sum \limits _{k,l \in \mathbb {Z}} r_{k,l}(t) \left[ e^{2\pi i \frac{k+l}{L} x} - e^{2\pi i \frac{k+l}{L} y} \right] \right) =0. \end{array} \end{aligned}$$
(14)

By taking the inner product with \(e^{2\pi i \frac{k'x+l'y}{L}}\) (and suppressing the primes), we obtain

$$\begin{aligned} \partial _tr_{k,l}(t) +i \frac{2\pi ^2 p}{L^2} r_{k,l}(t) (k-l)(k+l) -iq \left[ P_{-l} - P_{k} \right] \sum \limits _{K\in \mathbb {Z}} r_{K,k+l-K}(t) =0. \end{aligned}$$
(15)

Denote for brevity

$$\begin{aligned} \vec {r}(t) := \{ r_{k,l}(t)\}_{k,l\in \mathbb {Z}}; \end{aligned}$$
(16)

now, Eq. (15) is linear and can be summarised as

$$\begin{aligned} \frac{d}{dt} \vec r(t) = A \vec r(t); \end{aligned}$$
(17)

in other words, the growth of |r(t)| in time can be inferred by the eigenvalues of the matrix A. This can provide a powerful black-box method (see [2] for a similar approach in the CSY equation), but would not allow us, e.g., to show convergence as \(L\rightarrow \infty .\) Thus, we will proceed to work with the Laplace transform as in [3].

To help understand better what affects the eigenvalues, first of all, we bring Eq. (15) to mild form

$$\begin{aligned} r_{k,l}(t){} & {} = e^{-ip\frac{2\pi ^2(k+l)(k-l)}{L^2} t} r_{k,l}(0) + \int \limits _{\tau =0}^t e^{-ip\frac{2\pi ^2(k+l)(k-l)}{L^2} (t-\tau )} iq\nonumber \\{} & {} \quad \left[ P_{-l} - P_{k} \right] \sum \limits _{K\in \mathbb {Z}} r_{K,k+l-K}(\tau ) d\tau , \end{aligned}$$
(18)

and proceed to define

$$\begin{aligned} f(\xi ,t)=\sum \limits _{K\in \mathbb {Z}} r_{K,\xi -K}(t), \qquad \xi \in \mathbb {Z}; \end{aligned}$$
(19)

this corresponds to the \(\xi \)’th Fourier coefficients of the inhomogeneous part of the position density \(|u(x,t)|^2\). (The point is that \(f(\xi ,t)\) really drives the problem, in the sense that if we now \(f(\xi ,t)\) then \(r_{k,l}(t)\) can be computed by substitution in Eq. (18).)

Now set

$$\begin{aligned} k+l=\xi \implies l=\xi -k, \qquad k-l=2k-\xi ; \end{aligned}$$

thus, Eq. (18) becomes

$$\begin{aligned} r_{k,\xi -k}(t){} & {} = e^{-ip\frac{2\pi ^2 \xi (2k-\xi )}{L^2} t} r_{k,\xi -k}(0) + \int \limits _{\tau =0}^t e^{-ip\frac{2\pi ^2\xi (2k-\xi )}{L^2} (t-\tau )} iq \nonumber \\{} & {} \quad \left[ P_{k-\xi } - P_{k} \right] \sum \limits _{K\in \mathbb {Z}} r_{K,\xi -K}(\tau ) d\tau . \end{aligned}$$
(20)

By summing Eq. (20) in k, it follows that:

$$\begin{aligned} f(\xi ,t) = \phi _L(\xi ,t) + \int \limits _{\tau =0}^t h_L(\xi ,t-\tau ) f(\xi ,\tau ) d\tau , \end{aligned}$$
(21)

where

$$\begin{aligned} \phi _L(\xi ,t){} & {} =\sum \limits _k e^{-ip\frac{2\pi ^2 \xi (2k-\xi )}{L^2} t} r_{k,\xi -k}(0), \qquad h_L(\xi ,t-\tau )\nonumber \\{} & {} = \sum \limits _k e^{-ip\frac{2\pi ^2\xi (2k-\xi )}{L^2} (t-\tau )} iq \left( P_{k-\xi } - P_{k} \right) . \end{aligned}$$
(22)

This is a simplified form of (15) in the sense that we have one discrete variable \(\xi \) in the new unknown function f instead of two, kl in the old variable \(\vec r\), while we still can recover the full \(\vec r(t)\) through

$$\begin{aligned} r_{k,l}(t) = e^{-ip\frac{2\pi ^2(k+l)(k-l)}{L^2} t} r_{k,l}(0) + \int \limits _{\tau =0}^t e^{-ip\frac{2\pi ^2(k+l)(k-l)}{L^2} (t-\tau )} iq \left[ P_{-l} - P_{k} \right] f(k+l,\tau ) d\tau \end{aligned}$$
(23)

(in particular, if f(t) does not grow exponentially, neither does \(\vec r(t)\)).

By Laplace transform Eq. (21) becomes

$$\begin{aligned} \widetilde{f}(\xi ,\omega ) = \widetilde{\phi }_L(\xi ,\omega )+ \widetilde{h}_L(\xi ,\omega )\widetilde{f}(\xi ,\omega ) \implies \widetilde{f}(\xi ,\omega ) = \frac{\widetilde{\phi }_L(\xi ,\omega )}{1-\widetilde{h}_L(\xi ,\omega )}. \end{aligned}$$
(24)

Thus, the existence of poles in the right half plane

$$\begin{aligned} \exists \omega ^* \,\,: {\text {Re}}(\omega ^*)>0 \,\, \text{ and } \widetilde{h}_L(\xi ,\omega ^*)=1 \end{aligned}$$

means that \(f(\xi ,t)\) exhibits exponential growth. In terms of working out explicitly the function \(\widetilde{h}_L,\) observe that for any \(\omega \) with \({\text {Re}}\omega >0\), we have

$$\begin{aligned} \begin{array}{c} \widetilde{h}_L(\xi ,\omega ) =\displaystyle \int \limits _{t=0}^\infty e^{-\omega t} \left[ \sum \limits _{k\in \mathbb {Z}} e^{-ip\frac{2\pi ^2\xi (2k-\xi )}{L^2} t} iq \left( P_{k-\xi } - P_{k} \right) \right] dt= iq \sum \limits _{k\in \mathbb {Z}} \frac{ P_{k-\xi } - P_{k} }{ \omega +ip\frac{2\pi ^2\xi (2k-\xi )}{L^2} }, \end{array} \end{aligned}$$
(25)

and similarly

$$\begin{aligned} \widetilde{\phi }_L(\xi ,\omega ) = \sum \limits _{k\in \mathbb {Z}} \frac{r_{k,\xi -k}(0)}{\omega + ip\frac{2\pi ^2\xi (2k-\xi )}{L^2}}, \end{aligned}$$
(26)

so that finally

$$\begin{aligned} \begin{array}{c} \widetilde{f}(\xi ,\omega ) =\frac{ \sum \limits _{k\in \mathbb {Z}} \frac{r_{k,\xi -k}(0)}{\omega + ip\frac{2\pi ^2\xi (2k-\xi )}{L^2}} }{ 1- iq \sum \limits _{k\in \mathbb {Z}} \frac{ P_{k-\xi } - P_{k} }{ \omega +ip\frac{2\pi ^2\xi (2k-\xi )}{L^2} } }. \end{array} \end{aligned}$$
(27)

3.2 Discretizing Continuous Power Spectra

In the previous subsection, we took the Fourier coefficients \(P_n\) for granted. Here, we consider how they are related to the original continuous power spectrum S(k). Given a spectrum S(k), a standard (periodic) realization of the envelope corresponding to it can be generated through

$$\begin{aligned} u_0(x) = \sum \limits _{j=1}^{M} A_j e^{2\pi i ({k_jx} + \phi _j) }, \qquad A_j = \sqrt{ \,\delta k\, S(k_j) } , \qquad \phi _j \sim U(0,1), \qquad k_j = j \cdot \delta k, \end{aligned}$$
(28)

so that \(A_j^2\approx \displaystyle \int \nolimits _{k_{j-1}}^{k_j} S(k)dk\) [46]. Observe that, in general, there is some flexibility in the wavenumber discretization

$$\begin{aligned} k_j = j\cdot \delta k, \quad j=1,2,\dots ,M, \qquad \delta k = \frac{m}{L}, \qquad m,M \in \mathbb {N}. \end{aligned}$$
(29)

Now, the autocorrelation of the random-phase process (28) is

$$\begin{aligned} \Gamma (x-y)= & {} E[u(x)\overline{u}(y)] = \sum \limits _{j,j'=1}^M E[ A_j \bar{A}_{j'} e^{2\pi i[k_jx-k_{j'}y+\phi _j-\phi _{j'}]}] \\= & {} \sum \limits _{j,j'=1}^M A_j \bar{A}_{j'} e^{2\pi i[k_jx-k_{j'}y]} E[ e^{2\pi i (\phi _j-\phi _{j'} ) } ] = \\= & {} \sum \limits _{j,j'=1}^M A_j \bar{A}_{j'} e^{2\pi i[k_jx-k_{j'}y]} \delta _{j,j'} = \sum \limits _{j=1}^M |A_j|^2 e^{2\pi i k_j(x-y)}. \end{aligned}$$

Therefore

$$\begin{aligned} \begin{array}{cc} P_n =&{} \frac{1}{L} \displaystyle \int \limits _{y=-\frac{L}{2}}^{\frac{L}{2}} e^{-2\pi i \frac{ny}{L}} \sum \limits _{j=1}^M |A_j|^2 e^{2\pi i k_jy} dy \\ =&{} \frac{1}{L} \sum \limits _{j} |A_j|^2 \displaystyle \int \limits _{y=-\frac{L}{2}}^{\frac{L}{2}} e^{2\pi i (k_j-\frac{n}{L})y} dy = \sum \limits _{j} |A_j|^2 \delta _{k_j,\frac{n}{L}} = \\ = &{} \sum \limits _{j} \frac{m}{L} P(j\delta k) \delta _{j\delta k,\frac{n}{L}} = \left\{ \begin{array}{cl} \frac{m}{L} P\left( \frac{n}{L}\right) , &{} n=mj \text{ for } \text{ some } j \\ 0, &{} n \mod m \ne 0. \end{array} \right. \end{array} \end{aligned}$$
(30)

Now, let us go back to the parameters mM :  the parameter M controls how many distinct frequencies/wavenumbers are used, while m controls how close these wavenumbers are taken. Thus, the largest wavenumber included is

$$\begin{aligned} k_{max} = M\cdot \delta k = \frac{Mm}{L}. \end{aligned}$$

Since we are interested in gravity waves, it is reasonable to select a fixed maximum wavenumber, e.g., \(k_{max}\approx 10.\) Thus, if \(k_{max}=O(1)\) and \(L\gg 1,\) this leads to

$$\begin{aligned} M\cdot m = O(L), \end{aligned}$$
(31)

which in principle could allow for different wavenumber discretization strategies. Now, if we return to the choice

$$\begin{aligned} m=1, \qquad M=k_{max} \cdot L, \end{aligned}$$
(32)

that was made in the statement of Theorem 2.1, Eq. (30) implies that

$$\begin{aligned} \begin{array}{c} P_n = \frac{1}{L} S\left( \frac{n}{L}\right) . \end{array} \end{aligned}$$
(33)

3.3 Proof of Theorem 2.1

In Sect. 3.1, the expression for \(\widetilde{h}_L(\xi ,\omega )\) was derived in terms of the Fourier coefficients \(P_n,\) cf. Eq. (25). In Sect. 3.2, it was shown how the scaling of Eq. (3) for the initial data leads to the Fourier coefficients \(P_n,\) cf. Eq. (33). Combining Eqs. (25) and (33) leads to Eq. (5).

Now, observe that with the change of variables \(k'=2k - \xi \) (which means that \(k' \in 2\mathbb {Z} - \xi ,\) \(k=\frac{k'+\xi }{2},\) \(k-\xi =\frac{k'-\xi }{2}\)), we have

$$\begin{aligned} \begin{array}{c} \displaystyle \widetilde{h}_L(\xi ,\omega ) = \frac{iq}{L} \sum \limits _{k\in \mathbb {Z}} \frac{ S\left( \frac{k-\xi }{L}\right) - S\left( \frac{k}{L}\right) }{ \omega +ip\frac{k2\pi ^2 \xi (2k-\xi )}{L^2} }= \frac{iq}{2} \sum \limits _{k'\in 2\mathbb {Z}-\xi } \frac{ S\left( \frac{k'-\xi }{2L}\right) - S\left( \frac{k'+\xi }{2L}\right) }{ \omega +4\pi ^2 i p \frac{k'}{2L} \frac{\xi }{L} } \frac{2}{L}. \end{array} \end{aligned}$$
(34)

Now denote \(X\in \mathbb {R}\) a fixed number independent from L and take the joint limit

$$\begin{aligned} L\rightarrow \infty , \quad \xi \rightarrow \infty \qquad \text{ so } \text{ that } \quad \frac{\xi }{L} \rightarrow X. \end{aligned}$$

In that regime, \(\widetilde{h}_L(\xi ,\omega )\) can be seen as a Riemann sum converging to

$$\begin{aligned} \begin{array}{c} \lim \widetilde{h}_L = \frac{iq}{2} \displaystyle \int \limits _{s=-\infty }^{+\infty } \frac{ S\left( \frac{s}{2}- \frac{X}{2}\right) - S\left( \frac{s}{2}+\frac{X}{2}\right) }{ \omega +4\pi ^2 i p \frac{s}{2} X } ds, \end{array} \end{aligned}$$
(35)

where \(k'/L\rightarrow s\) and \(2/L \rightarrow ds.\) This double-spacing is because \(k'\) in Eq. (34) spans the odd or even numbers only, depending on \(\xi ;\) that is why \(2/L \rightarrow ds.\) Equation (6) follows with the change of variables \(k=s/2\) in Eq. (35).

With regard to the convergence of the Riemann integral in Eq. (35), note that as along as \({\text {Re}}(\omega )\ne 0,\) the denominator does not become zero, and the integrand inherits the smoothness and decay properties of the power spectrum S(k). \(\square \)

4 Resolving the Stability Condition

The instability conditions both for the periodized problem and the infinite line problem (Eqs. (4) and (7), respectively) are of the form

$$\begin{aligned} \exists \xi \qquad \exists \omega \in \{ z\in \mathbb {C}: {\text {Re}}(z)>0\} \qquad \qquad \widetilde{h}(\xi ,\omega )=1 \end{aligned}$$
(36)

for some known function \(\widetilde{h}(\xi ,\omega )\) which is by construction analytic in \(\omega \) as long as \({\text {Re}}(\omega )>0.\) This is a system of two equations (the real and imaginary part of \(\widetilde{h}\)) in three unknowns (\(\xi ,\) \({\text {Re}}(\omega ),\) \({\text {Im}}(\omega )\)) and as such determining the existence or not of solutions is not trivial.

A technique that can be used to determine the existence or not of solutions is based on the argument principle, and was analyzed in detail in [3]. In a nutshell, it is based on the idea that, given a closed subset \(D \subseteq \{ z\in \mathbb {C}: {\text {Re}}(z)>0\}\) with piecewise smooth boundary \(\Gamma =\partial D \subseteq \{ z\in \mathbb {C}: {\text {Re}}(z)>0\},\) the curve \(\widetilde{h}(\xi ,\Gamma ) = \{ \widetilde{h}(\xi ,s) \in \mathbb {C}, \,\, s\in \Gamma \}\) circumscribes \(\widetilde{h}(\xi ,D)=\{ \widetilde{h}(\xi ,s) \in \mathbb {C}, \,\, s\in D\}.\) A natural choice for D is a right semicircle of radius \(R\frac{1}{\epsilon }\) with the strip \(\{ {\text {Re}}(Z)<\epsilon \}\) excluded. As \(\epsilon \rightarrow 0,\) this set exhausts the open right half plane. Therefore, now, we have \(\Gamma \) being a D-shaped contour consisting of the straight line \(\{ \epsilon + is\}_{s=-\frac{1}{\epsilon }}^{\frac{1}{\epsilon }}\) and the arc \(\{\frac{1}{\varepsilon }(cos\theta + i \sin \theta )\}_{\theta =\mathop {arccos} \varepsilon ^2}^{-\mathop {arccos} \epsilon ^2}.\) Computing \(\widetilde{h}(\xi ,s)\) for \(s\in \Gamma \) is straightforward; moreover, for small enough epsilon, the values of \(\widetilde{h}\) on the arc are going to be very close to zero; hence, the nontrivial part is the images of the straight line—this is analogous to Nyquist plots in control theory.

A more elementary technique is just plotting all the values attained on a fine enough grid in the domain D. Finally, when the existence of an unstable mode is detected, plotting the distance \(|\widetilde{h}-1|\) can help locate its approximate location and work locally if necessary. Indeed, a number of numerical choices are required (numerical tolerances, etc), it is often helpful to use several different methods in conjunction.

5 MI and gMI Can Be Completely Suppressed on a Short Interval

In this section, we go over in some more detail the role of L,  the length of the computational domain, in the MI and gMI. We start by recalling in detail the MI for the real line in Sect. 5.1, and for the interval of length L in Sect. 5.2. Then, we investigate numerically the nonlinear phase of the MI in Sect. 5.3. We plot the inhomogeneity (in this case the difference from the plane wave background) and discuss its qualitative behaviour for various values of L. In Sect. 5.4, we investigate numerically the nonlinear evolution of a small inhomogeneity added to a homogeneous background solution which serves as a simple model realization of a sea state with a very narrow spectrum. By plotting the inhomogeneity, we see a picture completely analogous to the MI: a short computational domain L can completely stabilize the problem, i.e., make the inhomogeneity stay small—while on larger computational domains, the inhomogeneity grows by two orders of magnitude. In all cases, the inhomogeneity is numerically zero at the endpoints of the interval, while the background solution satisfies periodic boundary conditions.

Fig. 2
figure 2

Space–time plot of the modulus of the inhomogeneity, \(|\delta _2(x,t)|,\) when propagated on intervals of different length L according to Eqs. (51)–(53). Growth of the inhomogeneity to O(1) is evidence of MI. The bifurcation length \(L_c\) is reported in Eq. (49). Top left: \(L=0.98L_c.\) Top right: \(L=1.3L_c.\) Bottom left: \(L=3L_c.\) Bottom right: \(L=10L_c\)

Table 1 Maximum value of the inhomogeneity \(\mathop {\textrm{max}}\limits _{x,t} |\delta (x,t)|\) for \(x\in [-L/2,L/2]\) and \(t\in [0,10],\) with \(L=NL_c\) (cf. Eq. (49)) and initial inhomogeneity \(\delta _j(x,0)\) (cf. Eq. (52))

5.1 MI on the Real Line

We briefly go through the standard MI calculation on the real line, for Eq. (1). This will prepare the ground for the subsequent analysis on a bounded interval. Equation (1) is known to be well-posed in Zhidkov spaces [29, 58]; this is the natural framework for this discussion. Also, since we are dealing with the focusing NLS, we will assume without loss of generality that \(p,q>0.\) Moreover, Eq. (1) admits the exact solution

$$\begin{aligned} w(x,t):= A e^{iqA^2 t}, \end{aligned}$$
(37)

which is the simplest plane wave solution with amplitude \(A>0\). To study the stability of this plane wave solution one can consider whether small perturbations grow. This leads to the perturbed initial value problem

$$\begin{aligned} \begin{array}{c} i \partial _t u + p \Delta u + q |u|^2u=0, \qquad u(x,0) = A(1+\delta _0(x)) \end{array} \end{aligned}$$
(38)

for some initial perturbation \(\delta _0(x)\) which is small in an appropriate sense, \(\delta _0=o(1)\). Using the substitution

$$\begin{aligned} u(x,t) = A e^{iqA^2 t}(1+\delta (x,t)), \end{aligned}$$
(39)

one readily computes that problem (38) is equivalent to

$$\begin{aligned} \begin{array}{c} i\delta _t + p\Delta \delta + q A^2 (\delta + \bar{\delta }) + q A^2 (\delta + \bar{\delta }) \delta + q A^2 |\delta |^2 (1+\delta ), \qquad \delta (x,0) = \delta _0(x). \end{array} \end{aligned}$$
(40)

Dropping higher order terms, we obtain the linearized problem for the perturbation, namely

$$\begin{aligned} \begin{array}{c} i\delta _t + p\Delta \delta + q A^2 (\delta + \bar{\delta }), \qquad \delta (x,0) = \delta _0(x). \end{array} \end{aligned}$$
(41)

By expanding Eq. (41) into its real and imaginary parts, and denoting

$$\begin{aligned} \delta (x,t) = \alpha (x,t) + i \beta (x,t), \end{aligned}$$
(42)

we eventually obtain the system

$$\begin{aligned} \begin{array}{c} \partial _{tt}\beta + \left( p^2 \Delta \Delta +2pq A^2\Delta \right) \beta =0, \qquad \partial _t \alpha + p\Delta \beta =0. \end{array} \end{aligned}$$
(43)

This now can be solved explicitly with separation of variables, leading to the construction of the modes

$$\begin{aligned} \begin{array}{c} \zeta \in \mathbb {R}, \qquad \beta _\zeta (x,t) = e^{i [\zeta x + \omega (\zeta ) t]} + c.c., \qquad \omega ^2(\zeta ) = \zeta ^2 [p^2 \zeta ^2 - 2pq A^2]. \end{array} \end{aligned}$$
(44)

(Here c.c. stands for complex conjugate.) More general solutions can be formed by superpositions of these modes, \(\beta (x,t) = \int \limits M(\zeta ) \beta _{\zeta }(x,t) d\zeta .\) The instability is due to the fact that

$$\begin{aligned} \begin{array}{l} |\zeta |<A\sqrt{2\frac{q}{p}} \implies \omega (\zeta ) =\pm i |\omega (\zeta )|, \end{array} \end{aligned}$$
(45)

and thus, the corresponding modes \(\beta _\zeta (x,t)\) of Eq. (44) contain an exponentially growing component. Therefore, the solution \(\delta \) of the linearized Eq. (41) generally grows exponentially in time, i.e., the plane wave solution of the NLS is linearly unstable. Moreover, the unstable wavenumbers and their rate of growth follow from this analysis.

In this problem, there are three parameters, pqA. However, by rescaling the problem according to \(\tau = qA^2 \, t,\) \(\chi = A\sqrt{\frac{q}{p}} \, x,\) \(U(\chi ,\tau ) = \frac{1}{A} \, u(x,t),\) the equation is mapped to the “canonical” NLS \(i \partial _{\tau } U + \partial _{\chi \chi } U + |U|^2U=0,\) which has the plane wave solution \(W(\chi ,\tau )=e^{i\tau }.\) That is, the exact values of pqA do not play an important role and the nature of the modulation instability is the same for any \(p,q,A>0.\) This widely understood universality of the MI may have contributed to an implicit expectation that the periodized problem automatically enjoys similar properties.

5.2 MI on an Interval of Length L

Now, let us consider the NLS equation on an interval of length L equipped with periodic boundary conditions, namely (2). The steps described above in Eqs. (37)–(43) were carried out with boundary conditions of boundedness at infinity; however, one readily checks that each step is equally valid with the periodic boundary conditions on \([-L/2,L/2].\) Indeed, the plane wave is still a solution, the algebra leading to (40) is the same, and finally, the linearization and separation of real and imaginary parts are the same. So now, we have to solve the problem

$$\begin{aligned} \begin{array}{c} \partial _{tt}\beta + \left( p^2 \Delta \Delta +2pq A^2\Delta \right) \beta =0, \quad \beta \left( -\frac{L}{2},t\right) =\beta \left( \frac{L}{2},t\right) , \quad \partial _x\beta \left( -\frac{L}{2},t\right) =\partial _x\beta \left( \frac{L}{2},t\right) . \end{array} \end{aligned}$$
(46)

This is the first time that the parameter L really comes into play, and separation of variables now leads to the discrete modes

$$\begin{aligned} \begin{array}{c} \displaystyle \beta _n(x,t) = e^{2\pi i\left( \frac{ n x}{L} +\omega _n t\right) } + c.c., \qquad (2\pi \omega _n)^2 = \left( \frac{2\pi n}{L}\right) ^2 \left[ p^2\left( \frac{2\pi n}{L}\right) ^2 -2pqA^2\right] . \end{array} \end{aligned}$$
(47)

While this is analogous to Eq. (44), there is a very important difference: depending on the values of pqALthere may not be even one unstable mode. Indeed, \(\omega _0=0,\) and for any \(0\ne n \in \mathbb {Z}\), we have

$$\begin{aligned} \omega _n^2<0 \iff L> \frac{2\pi |n|}{A} \sqrt{\frac{p}{2q}}. \end{aligned}$$
(48)

That is, the computational domain L has to be larger than

$$\begin{aligned} L_c:=\frac{2\pi \sqrt{p}}{ A \sqrt{{2q}} }; \end{aligned}$$
(49)

otherwise, the MI is completely suppressed. Observe moreover that the lengthscale \(L_c\) does not depend on the initial inhomogeneity \(\delta _0(x),\) and becomes larger when the nonlinearity becomes weaker (i.e., when \(q,A>0\) decrease). For water waves with typical wavenumber \(k_0\) (equivalently typical wavelength \(\lambda _0=2\pi /k_0\)), the coefficients are \(p=\sqrt{g}/(8k_0^{3/2}),\) \(q=\sqrt{g}k_0^{5/2}/2\) [43] leading to

$$\begin{aligned} L_c = \frac{1}{4\pi \sqrt{2}} \frac{\lambda _0^2}{A}. \end{aligned}$$
(50)

Note that the waves that would be dangerous for ships in the ocean and carry most of the surface wave energy have wavelengths in the hundreds of meters.

Fig. 3
figure 3

Space–time plot of the modulus of the inhomogeneity, \(|\delta (x,t)|,\) when propagated on intervals of different length L according to Eqs. (54)–(58). The reference length \(L_0\) is reported in Eq. (54). Top left: \(L=L_0.\) Top right: \(L=2L_0.\) Bottom left: \(L=3L_0.\) Bottom right: \(L=10L_0\)

5.3 Numerical Investigation of the Fully Nonlinear MI

In what follows we present numerical solutions of the problem

$$\begin{aligned} \begin{array}{c} i \partial _t u + p \Delta u + q |u|^2u=0, \qquad u(x,0)=A(1+\delta _j(x))\\ u\left( -\frac{L}{2},t\right) =u(\frac{L}{2},t), \quad \partial _x u\left( -\frac{L}{2},t\right) =\partial _x u\left( \frac{L}{2},t\right) , \end{array} \end{aligned}$$
(51)

for the initial inhomogeneities

$$\begin{aligned} \begin{array}{c} \delta _1(x) = 0.03 \cdot A \cdot \textrm{sech}(15x) \cos (5x),\qquad \delta _2(x) = 0.03 \cdot A \cdot \textrm{sech}(15x), \\ \delta _3(x) = 0.03 \cdot A \cdot e^{-3x^2},\quad \delta _4(x) = 0.03 \cdot A \cdot e^{-x^4}, \quad \delta _5(x) = 0.06 \cdot A \cdot x\cdot e^{-x^4}, \end{array} \end{aligned}$$
(52)

and \(p=q=A=1.\) The bifurcation length in this case is \(L_c\approx 4.45;\) the solutions are computed for \(L=0.98 L_c,\) \(L=1.3 L_c,\) \(L=3L_c\), and \(L=10 L_c.\) The computation time is \(t\in [0,10].\) The numerical scheme used is a relaxation in time with the second-order finite differences in space, and it satisfies mass and energy conservation on the discrete level [9, 10]. The inhomogeneity \(\delta (x,t)\) for \(t\in [0,10]\) is defined as

$$\begin{aligned} \delta (x,t) := (u(x,t) - Ae^{i q A^2 t})\frac{1}{A}e^{-i q A^2 t} \end{aligned}$$
(53)

consistently with Eq. (39). Numerical results can be found in Fig. 2 as well as in Table 1.

The initial inhomogeneities \(\delta _1\) and \(\delta _2\) are localized \(\textrm{sech}\) bumps, and are quite similar to each other. \(\delta _3\) and \(\delta _4\) are also bumps with different profiles, and \(\delta _5\) is a localised wave. In Table 1, the maximum moduli of the inhomogeneities are recorded when propagated on intervals of different lengths. There is a clear confirmation of the abrupt bifurcation, namely an abrupt change in behaviour from \(L=0.98L_c\) to \(L=1.3L_c.\)

On the larger intervals \(L=3L_c,\) \(L=10L_c,\) coherent structures emerge. These are a sign that the MI has been resolved in a manner qualitatively similar to what would happen on the real line (that is, until the structures reach close to the boundary of the computational domain). These structures all involve localised maxima supported on neighbourhoods of size roughly \(L_c\) each. In the larger domain, the well-known space–time cone [12,13,14] is clearly visible.

The presence of a space–time cone in the nonlinear phase of the MI, reported for a wide array of dispersive problems [12,13,14], which means that there is generically a finite speed of propagation of the boundary between the plane wave region (for \(|x|\gg 1\)) and the “inhomogeneous” region. Moreover, the “inhomogeneous” region seems to settle in a pattern determined by the equation and not by the specific initial condition (see also Figures 1 and A1 of [6]). These patterns that appear within the cone seem to be related to the so-called dispersive shock solutions [11].

Crucially, when the length of the domain becomes \(L<L_c,\) we do not merely see a periodised or slightly off version of the cone, but something completely different: the amplification is small or non-existent and there is no spatial pattern at all; see left graph in Fig. 2. Indeed, for all initial data, when \(L=0.98L_c,\) the inhomogeneity initially disperses rapidly and then slowly grows in homogeneous way over the whole computational domain.

5.4 An Instance of gMI on an Interval of Length L

We set

$$\begin{aligned} L_0=4.4518, \qquad p=q=1 \end{aligned}$$
(54)

and consider an initial condition

$$\begin{aligned} u_0(x) = 0.018 e^{-2\pi i \frac{x}{L_0}} +0.899 + 0.1252 e^{2\pi i \frac{x}{L_0}}. \end{aligned}$$
(55)

This \(u_0\) can be thought of as a perturbation of the plane wave solution (37) at \(t=0,\) and the lengthscale \(L_0\) is numerically close to the \(L_c\) of problem (51) – (53). The goal of this computation is to see whether a phenomenology analogous to what was seen in Sect. 5.3 arises beyond plane wave backgrounds. Thus, the initial condition \(u_0(x)\) plays the role of a realization of a very narrow spectrum.

In this setting, the “homogeneous background solution” u(xt) is the solution of

$$\begin{aligned} \begin{array}{c} i \partial _t u + p \Delta u + q |u|^2u=0, \qquad u(x,0)=u_0(x)\\ u\left( -\frac{L}{2},t\right) =u\left( \frac{L}{2},t\right) , \quad \partial _x u\left( -\frac{L}{2},t\right) =\partial _x u\left( \frac{L}{2},t\right) , \end{array} \end{aligned}$$
(56)

and the inhomogeneously perturbed solution V(xt) is the solution of

$$\begin{aligned} \begin{array}{c} i \partial _t v + p \Delta v + q |v|^2v=0, \qquad v(x,0)=u_0(x) + 0.07 \textrm{sech}(15x) \cos (5x)\\ v\left( -\frac{L}{2},t\right) =v\left( \frac{L}{2},t\right) , \quad \partial _x v\left( -\frac{L}{2},t\right) =\partial _x v\left( \frac{L}{2},t\right) . \end{array} \end{aligned}$$
(57)

The inhomogeneity \(\delta (x,t)\) is thus defined as

$$\begin{aligned} \delta (x,t) = v(x,t) - u(x,t), \end{aligned}$$
(58)

and the main question is whether \(\delta (x,t)\) grows significantly or not for different values of L.

Immediately when we consider background solutions other than plane waves, we observe that the length L and the initial conditions \(u_0,\) \(\delta \) have to be compatible: the homogeneous \(u_0\) has to satisfy periodic BCs on L; hence, in this case, we will consider only integer multiples of \(L_0.\) On the other hand, the localized \(\delta (x,0)\) has to be numerically zero at the ends of the domain, up to satisfactory accuracy. By taking \(L=NL_0,\) for \(N\in \{1,2,3,10\}\) both of these requirements are satisfied. The final time is taken to be \(T=10.3.\)

The numerical scheme used is the same as in Sect. 5.3 (a relaxation in time with the second-order finite differences in space, and it satisfies mass and energy conservation on the discrete level [9, 10]). The time step used is \(dt=4 \cdot 10^{-3}\) and the space mesh size is \(dx=4\cdot 10^{-3}.\) The modulus \(|\delta (x,t)|\) can be found in Fig. 3, and it is clear that for the short enough computational domain \(L=L_0\), the growth of the inhomogeneity is completely suppressed (in particular, the inhomogeneity in the \(L^\infty \) norm is not even doubled). On the other hand, the space–time cone, inside which the inhomogeneity grows by more than an order of magnitude is very clearly visible when \(L=10L_0.\)

To provide some more context, the background solution and the inhomogeneity are plotted in the initial and final time in Figs. 4 and 5. Observe how the background solution qualitatively behaves similarly to the plane wave solution.

Fig. 4
figure 4

Plots of the real part (blue) and imaginary part (red) of the background solution u,  as in Eq. (56), on the interval with length \(L=10L_0.\) Left: for \(t=0.\) Right: for \(t=T\)

Fig. 5
figure 5

Plots of the real part (blue) and imaginary part (red) of the perturbed solution v,  as in Eq. (57), on the interval with length \(L=10L_0.\) Left: for \(t=0.\) Right: for \(t=T\)

6 Conclusions

In this paper, we presented for the first time a construction of the random-phase approximation in the NLS equation that comes with a convergence result: using the scaling of equation (3), for large enough L,  the instability condition of the truncated problem (2) converges to that of the original problem (1).

In the proof, it is clear that Eq. (3) is not the only way to prepare initial data that would have this property. There are other ways to prepare initial data in the literature, e.g., with randomized amplitudes as well as phases of the modes [5], and it is possible that these could also lead to a consistent stability condition. On the other hand, recent results in different regimes [15, 16, 23] highlight that different ways to prepare the initial conditions may lead to genuinely different outcomes.

The importance of using large enough computational domains is well understood for the classical MI. This was further elaborated in Sect. 5, where a lengthscale of \(L_c=O(\lambda _0^2)\) was found to be necessary for the MI to be present even for plane waves. If \(\lambda _0\) is in the hundreds of meters, as in ocean waves, this could mean \(L_c\) hundreds of wavelengths long.

The role of L in the gMI is less well understood. In works where the onset of gMI was actively investigated, it has been reported that long computational domains are needed; indeed, in [51], it was reported that a computational domain of \(15L_c\) was needed for a JONSWAP sea state (where \(L_c\) is the corresponding critical length for the plane wave with the same wavelength and wave height as the peak values for the sea state). Around 130 wavelengths were found to be required in [6], while in [48], the computational domain is about 100 wavelengths. On the other hand, in many papers, the question of the length of computational domain seems to not be addressed in any detail. While more work is needed to conclusively resolve this question for realistic ocean wave spectra, we have demonstrated here (in Sect. 5.3 and Fig. 3) that the capacity of short computational domains to suppress the growth of inhomogeneities extends beyond plane wave backgrounds.

This work was carried out assuming NLS dynamics. This is of course an approximation for ocean waves, but it should be noted that recent rigorous works have shown that the MI for the fully nonlinear water waves problem is accurately captured by the nonlinear Schrödinger equation [8, 45]. Furthermore, the analysis carried out here for the truncated NLS problem can be carried out for the truncated Zakharov problem in the spirit of [2], thus producing a stability relation for the periodized CSY equation (which is two-dimensional and broadband, since it assumes Zakharov dynamics). This would also allow the investigation of crossing seas scenarios, either in fully 2D through the aforementioned CSY equation, or using an Alber system for the interaction of two unidirectional wavetrains at an angle [5, 32]. Crossing seas are very important with regard to real-world marine safety, and much more can be done to investigate them [19, 50, 54]. More broadly, incorporating more physics into the model, such as wind input [4, 55] and vorticity [18] seems to be a very promising direction with regard to real-world ocean waves.