1 Introduction

Wave spectra information is necessary for the design of marine structures, the management of harbour operations and the setup of boundary conditions for numerical wave models such as SWAN (Deltares 2014). The maritime and offshore engineering industry use the JONSWAP spectra for vessel and structure design through hydromechanic numerical models such as ANSYS Aqwa (www.ansys.com), while coastal engineers apply the JONSWAP spectra to control wave generation in flumes. The spectral information is generally obtained through the use of theoretical models. Because the shape of the ocean wave power spectra allows mean, extreme and rogue waves to be determined (required for designing marine, coastal and naval structures), the means of selecting the shape parameters for these models is still under investigation (Osborne and Ponce de León 2017; Ponce de León et al. 2018).

Several researchers have adapted one-dimensional wave spectrum models to local wave conditions, such as Dattatri et al. (1977), who analysed wave data from the west coast of India to improve a theoretical wave spectrum. The JONSWAP spectrum is the model most used for engineering applications. This model is considered universal because of its idealised fetch-limited conditions and its applicability for variable wind regimes in deep water during storms and hurricanes (Hasselmann et al. 1973; Chakrabarti 2005).

The JONSWAP spectra can be formulated using shape parameters through the alpha coefficient, known as the scale parameter, and the gamma coefficient, known as the peak enhancement factor. The alpha and gamma parameters can also be calculated through the dimensionless relations of the peak frequency. However, the scatter in the values of alpha and gamma shape parameters is wide, and as a result an accurate correlation with the dimensionless fetch cannot be produced (Holthuijsen 2010).

For practical applications, the JONSWAP model gives a well-measured swell spectrum, particularly in the high-frequency range (Lucas and Guedes Soares 2015). This model is still used for several engineering and research projects, where alpha and gamma parameters are considered for the spectra estimation (Pascoal et al. 2017; Calini and Schober 2017; Cifuentes and Kim 2017; Zhang et al. 2018), although, there is no practical way to determine alpha and gamma parameters efficiently.

Several studies suggest a constant value for gamma (γ = 1) and a free alpha value should be considered (Ochi and Hubble 1976; Boukhanovsky et al. 2007; Boukhanovsky and Guedes Soares 2009). Sanil Kumar and Ashok Kumar (2008) carried out a multi-regression analysis of in situ wave data collected by buoys at different depths and locations along the coast of India. They evaluated the JONSWAP, Donelan and Scott spectra and compared them against the measured wave spectra, pointing out that the theoretical spectra over- or underestimate the spectral peak energy. As a result, they proposed two equations to determine the alpha and gamma parameters for an enhanced local JONSWAP spectra model.

Wang (2014) determined the wave crest distribution of nonlinear waves in shallow waters through the JONSWAP spectra. His work used a constant gamma value, γ = 3.3, for all the cases tested. Dong et al. (2014) investigated the effect of the bottom slope on the nonlinear transformations of irregular waves generated by the JONSWAP spectra. However, the authors did not show the spectra parameters nor which JONSWAP equation they used. It is therefore impossible to compare their results with other studies which used representative climate variations. Later, Breivik et al. (2016) published a new approximation of the Stokes drift velocity profile, using a constant gamma value of 3.3 to calculate the JONSWAP spectra.

Wijaya and Van Groesen (2016) analysed radar images to estimate significant wave height (Hs). In order to synthesise the radar images, they applied the JONSWAP spectra to generate free surface data for setting sea states, although they only evaluated the peak enhancement factor coefficient (γ). Montazeri et al. (2016) estimated sea and swell waves using shipboard measurements, testing several gamma coefficients to determine unimodal wind, sea and swell spectra through the JONSWAP spectra.

In the model developed by Mackay (2016), related to unimodal and bimodal ocean wave spectra, the author highlighted several disadvantages in proposals suggested earlier to estimate the spectra shapes (Mackay 2011). The two limitations mentioned are that a spectrum fit is a time-consuming operation that requires complex optimisation routines, and that the accuracy of the parameterisation could have a weak correlation, leading the algorithm to fail during the process of optimisation. He also showed that the method proposed in 2011 might not be accurate in identifying variations of the spectral shape, and recommended using another method to partition the spectra.

Heuristic models and optimisation methods were integrated to simulate wave spectra. A support vector regression (SVM) and a model tree (MT), known as data-driven methods, were applied by Sakhare and Deo (2009) to estimate the wave spectra for short-term sea states. According to the results of Sakhare and Deo, the correlation coefficient between the observed (measured) spectra and the modelled (SVM and MT) spectra was less than 0.78. A hybrid genetic algorithm–adaptive network-based fuzzy inference system (GA-ANFIS) model was developed by Zanaganeh et al. (2009) to obtain the wave parameters in Lake Michigan through the JONSWAP spectra. The study presented scatter diagrams for the validation of the modelled wave parameters against the measured data, but it did not prove that the shape of the modelled spectra accurately fits the in situ spectra.

Aranuvachapun (1987) performed Monte Carlo simulations to assess the JONSWAP spectral model and its parameters. The study reported that increasing the degrees of freedom and filtering raw data will improve the modelled spectra. However, the author mentioned that the wave spectra simulated by Monte Carlo are independent of the geophysical factors, a statement that differs from what Rueda Bayona (2017) found in the nonlinear effects of bathymetry and sea states on the alpha and gamma parameters of JONSWAP spectra.

In the aforementioned literature, the authors did not include a sensitivity test for alpha and gamma, nor did they address the relevance of water depth or climate variability. There is no evidence of the validation of the shape of the modelled spectra by the application of the GA-ANFIS model. As a result, they applied spectra models based on assumptions that probably modify the numerical results. Also, the scattered values of alpha and gamma obtained in the literature require the development of an efficient and flexible method to set the parameters of the JONSWAP spectra for different sea states or water depth.

To overcome these deficiencies and limitations, this research presents a heuristic model which can identify the JONSWAP spectra parameters (alpha and gamma) for extreme and normal sea states at any water depth. The proposed model uses wave data (in situ or modelled) to calculate the parameters of JONSWAP spectra through genetic algorithms (GA).

2 Materials and methods

2.1 The genetic algorithm

The heuristic model proposed considers a genetic algorithm (GA) which is an optimisation technique, based on principles of genetics and natural selection (Holland 1975). The traditional GA begins with the selection of a chromosome or vector of values to be optimised. If the vector dataset has Nvar variables (an Nvar-dimensional optimisation problem) given by p1, p2, …,pNvar, then, the chromosome is written as an Nvar element row vector (Haupt and Haupt 2004), see Eq. 1.

$$ chromosome=\left[x,y\right]=\left[\alpha, \gamma \right] $$
(1)

where Nvar = 2. Each chromosome has a cost, found during the function evaluation (Eq. 2), f, in p1, p2, pNvar:

$$ Cost=f(chromosome)=f\left({p}_1,{p}_2,...,{p}_{N_{\mathrm{var}}}\right) $$
(2)

The GA minimises the cost function ΔHs, which is the minimum difference between the artificial significant wave height, \( \hat{H}s \), calculated from the JONSWAP spectra, and the in situ significant wave height Hs (instrumental or modelled); the in situ is known as the target. The application of the heuristic method uses a pseudo-code structure, presented in Fig. 1. This method allows the performance of the GA model to be verified, as indicated in the bottom left rhomboid of Fig. 1, and allows the quality of the modelled results against in situ data to be verified, as suggested in the central rhomboid of the flow diagram.

Fig. 1
figure 1

Flowchart of the proposed heuristic method for determining the alpha and gamma parameters for the JONSWAP wave spectra

We can rewrite the cost function as follows (Eq. 3):

$$ \min \left(\varDelta H{s}_{(n.m)}\right)=\hat{H}{s}_{\left(1,m\right)}-H{s}_{\left(n,1\right)} $$
(3)

The matrix operation for finding the minimum difference is (Eq. 4):

$$ \varDelta H{s}_{(n.m)}=\left[\begin{array}{ccc}\hat{H}{s}_{\left(1,1\right)}& \cdots & \hat{H}{s}_{\left(1,m\right)}\\ {}\vdots & \ddots & \vdots \\ {}\hat{H}{s}_{\left(n,1\right)}& \cdots & \hat{H}{s}_{\left(n,m\right)}\end{array}\right]-\left[\begin{array}{c}H{s}_{\left(1,1\right)}\\ {}\vdots \\ {}H{s}_{\left(n,1\right)}\end{array}\right]=\left[\begin{array}{ccc}\varDelta H{s}_{\left(1,1\right)}& \cdots & \varDelta H{s}_{\left(1,m\right)}\\ {}\vdots & \ddots & \vdots \\ {}\varDelta H{s}_{\left(n,1\right)}& \cdots & \varDelta H{s}_{\left(n,m\right)}\end{array}\right] $$
(4)

where n = length of the data vector and m = length of chromosome population. \( \hat{H}s \) is determined using the JONSWAP spectra (Eq. 5) and (Eq. 6) (Holthuijsen 2010).

$$ \hat{H}s=4.004\sqrt{m_0} $$
(5)
$$ S{\left(\omega \right)}_{JONSWAP}={\int}_0^{\infty}\alpha {g}^2{\omega}^{-5}{e}^{-1.25{\left(\frac{\omega }{\omega_p}\right)}^{-4}}{\gamma}^{\delta } d\omega ={m}_0 $$
(6)

where

$$ \delta ={e}^{-\frac{{\left(\omega -{\omega}_p\right)}^2}{2{\sigma}_{\left(a,b\right)}^2{\omega}_p^2}}\kern1em \&\kern1em {\sigma}_{\left(a,b\right)}=\Big\{{\displaystyle \begin{array}{l}{\sigma}_{a=0.07}\kern1em when,\omega \le {\omega}_p\\ {}{\sigma}_{a=0.09}\kern1.12em when,\omega >{\omega}_p\end{array}} $$

The JONSWAP spectra parameters consider the Earth’s gravity constant, g = 9.81 m/s2, the zero-order spectral moment m0, an energy scale coefficient α, a δvariable that describes the width of the region near to the peak, a peak enhancement coefficient γ, a the peak enhancement factor γδ to control the peak of energy density, shape parameters σ(a, b), the angular frequencies ω and peak frequency ωpin rad/s and the shape parameters σ(a, b) shown above.

The wave height depends on the potential energy of the spectrum. Therefore, the minimisation of the cost function requires a comparison between the peak energy Ep and \( \hat{H}s \); the increments of Hs must be associated positively with the spectral peak. Hence, it was necessary to correlate these two variables (Ep vs. Hs) for every artificial dataset generated by a chromosome. When in situ wave spectra data is available, the heuristic procedure is organised in three main steps, as seen in Fig. 2.

Fig. 2
figure 2

Application of the proposed genetic algorithm with in situ wave spectra used for validation

In step 1, the user defines the number of chromosomes for the first generation through a random matrix of alpha and gamma values (Fig. 2). Then, the GA evaluates the JONSWAP spectra, locates the peak energy and calculates the artificial \( \hat{H}s \) through the zero-order spectral moment. Then, the GA crosses over the first generation of chromosomes and re-evaluates the JONSWAP spectra, to calculate the crossed \( \hat{H}s \) and locate the spectral peak energy. Step 2 is the analysis of the correlation between Hs and peak energy (Ep) to verify their physical relation (Fig. 2). Then, the GA verifies if the correlation is equal to, or higher than, 0.8 and selects the chromosome that generated the highest correlation (Ep vs. \( \hat{H}s \)). If the correlation restriction is fulfilled, then the GA selects the respective chromosome and minimises the cost function ΔHs. Step 3 is the final part of the GA, validating the artificial wave spectra against the in situ (measured or modelled) wave spectra (Fig. 2). As a result, the GA selects the lowest ΔHs as the best solution and mutates the associated alpha parameter by dividing it by a random vector with values between 100 and 100,000. Finally, the GA calculates the ΔSω in a way similar to the calculation of the ΔHs, and selects the lowest ΔSω as the best solution. The GA also compares the artificial JONSWAP spectra curve (Sω _ J) against the in situ spectral curve (Sω _ raw), shown in the central rhomboid of the flow diagram (Fig. 1), to verify whether the mutated chromosome correctly simulates the in situ wave spectra.

3 Results and discussion

In this research, in situ wave time series were used to validate numerical results, using the proposed genetic algorithm. The GA performance was also evaluated to find the optimal solution, considering the number of chromosomes and computational time.

3.1 Model setup

Applying the pseudo-code structure of the GA (Fig. 1), using available wave spectra (Fig. 2), we analysed a wave time series measured by an acoustic Doppler current profiler (ADCP) with acoustic surface tracking (AST) at 11.038° N 74.943° W (Fig. 3), at 8-m water depth. The ADCP was installed on the seafloor, configured to 10 min of recording time, at 2 Hz, at hourly intervals, for five and a half months.

Fig. 3
figure 3

Location of the ADCP in the projected coordinate Magna-Sirgas (Bogota zone)

A numerical method must be efficient in the computational time needed to run the model. The computational time depends on the number of targets and chromosomes. The population size test evaluates the efficiency of an algorithm to find a robust solution for a feasible region, minimising computational time. The population size test to evaluate the GA performance in this work comprised determining the minimum number of chromosomes needed to solve the cost function.

For the feasible domain selected, alpha ranged between 0 and 0.1 and gamma between 1 and 10. We used a laptop with Intel Core i5-4200U CPU with a 2.30-GHz processor, 4 GB of RAM and Win8.1 64 bits to test the GA in Matlab. The experiment had 1, 5, 10, 50, 100, 200 and 400 chromosomes for step 1, and generated 1, 5, 10, 50, 100, 200 and 400 alphas for the mutation in step 3 (Fig. 2). The results of the population size test showed that the best solution was found with five (5) chromosomes for generation and crossover (step 1), and 120 alphas for the mutation (step 3).

In the present research, changing the number of chromosomes for the GA, according to the correlation results, is suggested. The variability and shape of the in situ spectra can be simulated with less or more chromosomes, depending on the nonlinear behaviour of the wave time series associated to quadruplets and triads wave-wave interactions (Holthuijsen 2010), or wind effects during storms (Osborne et al. 2019); these nonlinearities may be handled through numerical approaches, such as the nonlinear Fourier analysis (Osborne 2010). This study identified that between 5 and 400 chromosomes are required for generation and crossover, and 5 to 400 alphas for mutation, to find the best solution efficiently. The higher the number of chromosomes, the longer the computational time.

3.2 Heuristic modelling

The results of the minimisation of the cost function ΔHs (step 2) are plotted in Fig. 4, where the GA found the first alpha and gamma combinations (chromosomes) to simulate every Hs jth through the \( \hat{H}s \)jth (central rhomboid of flow diagram, Fig. 1). The results show that the GA modelled the Hs with a linear correlation of 0.87. Considering the scatter of the alpha and gamma parameters (Fig. 4), the gamma is seen to behave randomly along the time series. As a result, this research proposes to mutate the alpha parameter only to find the optimal solution.

Fig. 4
figure 4

Comparison of the in situ significant wave height (Hs), measured in 2015, against the modelled Hs after step 1 (generation and crossover) and step 2 (minimisation of ΔHs). a Target vs. artificial Hs (r2 = 0.87, p value = 0). b Residual ΔHs. c Hourly alpha coefficients. d Hourly gamma coefficients

In step 3, the GA mutated the alpha parameter, and the lowest ΔSω was selected as the best solution. As a result, the GA compared the artificial JONSWAP spectra curve (Sω _ J) with the in situ spectral curve (Sω _ raw) to validate the GA results (Fig. 5).

Fig. 5
figure 5

Comparison of the in situ significant wave height (Hs) measured in 2015 against the modelled \( \hat{H}s \) after step 1 (generation and crossover) and step 2 (minimisation of ΔHs). aHs. b Peak of each Sωjth. c Residual of the peaks. d Hourly alpha coefficients. e hourly gamma coefficients

We selected data from 15 days in June 2015 (Fig. 5) to validate the results of the GA after the mutation (step 3). Figure 5a shows the evolution of Hs for June 1–15, where the normal event presents an Hs of about 0.5–1 m, and an extreme event presents an Hs of 1.5–2.5 m; this wave classification takes into consideration the wave climate analysis reported for the study area (Urbano-Latorre et al. 2013; Rivillas-Ospina et al. 2017; Rueda Bayona 2017). The differences between the peak of the spectra Sω _ rawjth and the artificial spectra Sω _ Jjth show that the residual increases as the spectral energy rises (Fig. 5b). In order to reduce the observed errors in Fig. 5b without filtering the raw input data (Hs), the users could increase the number of chromosomes for generation and crossover (step 2).

Next, we compared the spectra curves and the linear correlation between the peaks of each Sωjth (Fig. 6) for the 15 days in June. The residual for June 4 at 05:00 h was close to 0, and the residuals for June 11 at 12:00 h and 13 at 14:00 h were the highest. Hence, we plotted these spectra (Sωjth) to verify if the residual affected the shape of the artificial spectra Sω _ Jjth.

Fig. 6
figure 6

Validation of the GA results for three Sω _ Jjth and three Sω _ rawjth. a June 4 at 05:00 h. b June 11 at 11:50 h. c June 13 at 14:00 h. d Validation of all jth versus Sω _ Jjth for June 1 to June 15

Figure 6a shows the curve of the raw and simulated spectra for the minimum residual ΔSωjth during a normal wave event. Figures 6 b and c show the spectra curve for the maximum residual mentioned above. From the spectra curves, this study recommends increasing the value of the alpha for mutation until the artificial spectra Sω _ Jjth simulates the raw spectra Sω _ rawjth properly; the best shape of the curve will depend on the requirements of the user.

To consolidate the validation of the numerical results of the GA, Fig. 6c shows the linear correlation between Sω _ Jjth and Sω _ rawjth. The determination coefficient of 0.95 and the p value close to 0 ensure that the GA found the specific alpha and gamma values that correctly simulate the wave spectra (Fig. 6d).

The peak energy (Ep) of the spectra is the most probable wave height of the dataset; therefore, the comparison between Sω _ Jjth and Sω _ rawjth (Fig. 6d) is correct for identifying the wave height with the highest frequency of occurrence (Hp) and its associated peak period (Tp). The Hp value is important in the design of structures which face extreme wave load conditions, as it gives the highest wave height. However, other research and engineering applications use the significant wave height (Hs) to identify the mean wave height of the data.

As some GA solutions showed ΔHs of over 0.5 m (Fig. 4b), this study performed a new mutation process to enhance the solution of the heuristic model; the new mutation changes the gamma value of the chromosome until the \( \hat{H}s \) is similar to the raw Hs, with a maximum ΔHs of 0.8 m to flexibilise the margin error of the solution. The increment of the error threshold (flexibilisation) allows the GA to expand the solution space of the mutated chromosome, to inspect any nearby solution that could have been ignored during the generation and crossover processes (Fig. 4b).

The results of the mutation process applied (Fig. 7) to the three Sω _ Jjth (Fig. 6) showed a change in the modelled wave spectra to fit the \( \hat{H}s \). It was observed that gamma decreased in different ratios for the three spectra (Fig. 7), which proves the nonlinear relation of the Hs, alpha and gamma, described in Rueda Bayona (2017). The JONSWAP spectra must reduce the gamma parameter to simulate the raw Hs, excluding raw spectra peaks (outliers). Using raw spectra data without previous data filtering of free surface records in the time domain may generate spurious results. Filtering the free surface time series could remove significant information, such as high-frequency wave records. Therefore, tuning the JONSWAP spectra by the mutation of gamma may be a means of filtering peaks of the spectra that affect the Hs estimation through the zero-order spectral moment (m0).

Fig. 7
figure 7

Validation of the new mutation process through the comparison of three Sω _ Jjth and three Sω _ rawjth. a June 4 at 05:00 h. b June 11 at 11:50 h. c June 13 at 14:00 h

In order to compare the simulation of the raw spectra against statistical software, the alpha and gamma parameters were calculated through the parametric equations developed by Hasselmann et al. (1973) and integrated by the WAFO Matlab toolbox (WAFO 2011). Then, the Hs and Tp (Table 1) of the raw wave spectra (Figs. 6 and 7) were used to calculate the alpha and gamma parameters through the parametric equations mentioned above.

Table 1 Raw wave parameters for three dates of the modelled JONSWAP spectra with the GA and WAFO toolbox

Applying the parametric equations of Hasselmann et al. (1973), Fig. 8 shows the modelled wave spectra and the calculated alpha and gamma for each date. The results show that the parametric approach overestimates the raw wave spectra and the modelled JONSWAP spectra by the GA (Fig. 6).

Fig. 8
figure 8

Modelling of the JONSWAP spectra using the parametric equations of Hasselmann et al. (1973). a June 4 at 05:00 h. b June 11 at 11:50 h. c June 13 at 14:00 h

In addition, it was seen that the use of the parametric equations for Hs 0.59 m and Tp 6.74 s gave values of 3.8475 × 1023 for gamma and − 0.0128 for alpha. For Hs 0.67 m and Tp 7.42 s, the values of 1.15 × 1032 for gamma and − 0.0149 for alpha were found. Given the negative alpha values obtained, it is suggested that the Hasselmann et al. (1973) gamma and alpha equations exceeded the range of feasible values when Hs values were close to 0.6 m and Tp higher than 6 s, simulating an inverted JONSWAP spectra curve.

Considering that a normal wave event and an extreme wave event will have different JONSWAP parameters (Fig. 5a), we used the alpha and gamma generated by the GA (Fig. 5c, d) to define the representative JONSWAP spectra coefficients for each wave state through probability distributions (Fig. 9). Additionally, we calculated the probabilities of the gamma and alpha parameters for normal wave events (Fig. 9a, b) and extreme events (Fig. 9c, d) using the most probable Hs value. After fitting the probability distributions, it was found that lognormal distributions best fit the alpha and gamma values in normal conditions. Normal distributions represent the alpha and gamma values in extreme conditions.

Fig. 9
figure 9

Probability distribution for the alpha and gamma coefficients in normal and extreme wave events, modelled by the GA. a, b June 3 to 5. c, d June 13 to 14

We extracted the validated spectrum for each wave event, according to the normal and extreme wave event classification (Fig. 5). The resulting probability plots for the gamma parameters show that the increase of the spectral energy concentrates the gamma values in the second quartile (50%), with tails associated to a normal distribution (Fig. 9a, c). The probability plots of the alpha parameters (Fig. 9b, d) show positively skewed distributions, showing that for probabilities of over 50%, the alpha value increases its variance.

The non-normality of the probability plots (positively skewed) shows that the nonlinearity of the wave spectra evolution during the wave event influenced the variance of the alpha parameter (Fig. 9b, d). To validate the in situ spectra (Sω _ rawjth) evolution using the modelled spectra (Sω _ Jjth), we recommend the mutation of the alpha parameter, because this parameter can effectively modify the spectral energy of the artificial spectra.

Table 2 shows the alpha and gamma parameters of the JONSWAP spectra for normal and extreme events. The results show the precision of the alpha parameter for the optimal simulation of the raw spectra (Sω _ rawjth).

Table 2 Probability results for the second quartile (50%) of alpha and gamma distributions

The proposed method depends directly on the input data, then, when raw spectra (Sω _ raw) data is available for validation according to step 3 (central rhomboid of Fig. 1, the lowest panel of Fig. 2), it is important to set up the wave sensor (ADCP) properly, to record in situ wave spectra. Otherwise, the GA cannot find a feasible solution when comparing the artificial JONSWAP spectra curve (Sω _ J) against a spurious in situ spectral curve (Sω _ raw). Indeed, a limitation of the method would be the requirement of trained personnel to successfully perform the validation process (step 3).

This study assessed the ability of the GA to model the raw spectra in the time and frequency domain, but the work of Aranuvachapun (1987) only showed the numerical results in the frequency domain which makes it difficult to check the accuracy of the model for every time step. The Aranuvachapun study (1987) clearly differs from the proposed GA method because it cannot control the alpha and gamma parameters, nor connect the numerical results with the geophysical characteristics associated to the raw spectra data.

The Monte Carlo simulation performed by Aranuvachapun (1987) is based on a pure, random search (stochastic algorithm), unlike the genetic algorithm, where some rules of evolution and mutation govern the optimisation process. As a result, genetic algorithms allow trends and interactions between the JONSWAP spectra parameters to be identified (Rueda Bayona 2017), avoiding the necessity of an abstract random process and allows the effects of geophysical characteristics of the study area to be inferred.

In contrast with Aranuvachapun (1987), the numerical results of the proposed GA were associated to the expected sea states in the study area, where the significant wave heights may be represented by a unimodal spectral curve with spectral energy density below the 20 m2/Hz (Rueda Bayona 2017). The present study also attempts to state a clear procedure which is easy to follow, to ease the applicability of the proposed GA method.

Finally, this research gathered statistical and numerical techniques for adapting the JONSWAP spectra model to specific places, regardless of water depth and dominant wave climate state. The proposed model used the following steps before the GA implementation:

  1. 1.

    Determination of the wave climate to give the wave event classification

  2. 2.

    Assessment of the GA population

  3. 3.

    Verification of the physical results through correlation of \( \hat{H}s \) (artificial data) and peak energy (Ep)

  4. 4.

    Selection of the initial spectra coefficients (alpha and gamma) according to the r2 between \( \hat{H}s \) and Hs (target data)

  5. 5.

    Validation of the in situ wave spectra (Sω _ rawjth) through r2 and graph analysis after the mutation

  6. 6.

    Selection of the alpha and gamma parameters through the probability distributions

  7. 7.

    Optional step: to reduceΔHs, for the gamma parameters to specific solutions, the modeller could add a new mutation process of the modelled wave spectra

4 Conclusions

A heuristic model based on genetic algorithms was proposed to identify the alpha and gamma parameters of the JONSWAP spectra. ADCP was used to measure hourly wave parameters for five and a half months to validate the numerical results of the GA against in situ data. A population test was also used to assess the performance of the GA in identifying the most efficient number of chromosomes. The effectiveness of the GA was evaluated considering the physical relation between peak energy (Ep) and significant wave height (Hs), and the correlation between the in situ (Sω _ rawjth) and simulated spectra (Sω _ Jjth).

From the probability analysis, it is possible to select the representative values of alpha and gamma parameters for normal and extreme wave conditions. The probability results indicate that alpha and gamma values in normal conditions can be represented by a lognormal function, while in extreme conditions, a normal distribution better fits the alpha and gamma values.

The accuracy needed to obtain the alpha and gamma values of the JONSWAP spectra can be handled and solved successfully with GA. In this and other studies, the sensitivity of alpha and gamma parameters shows the nonlinear effects of these spectra parameters over the modelled behaviour of Hs and Tp. Applying parametric equations, such as that developed by Hasselmann et al. (1973), has numerical restrictions because of the limitation of the statistical techniques. Considering the natural behaviour of in situ raw datasets, heuristic models, such as GA, are seen as an alternative method to calculate the coefficient parameters, and solve the restrictions of the parametric equations.

In conclusion, the proposed genetic algorithm is offered as an innovative tool to determine the spectra parameters for the JONSWAP model, regardless of water depth and whether the periods are short- or long-term. The model proposed is seen as an alternative method to support engineering and scientific activities that require wave spectra information.