scieee AI-readable full text Open interactive document viewer

Assessment and validation of bathymetric inversion techniques using synthetic waves

Luque Lozano, Pau

Abstract

Bathymetric inversion using video images is a new and promising technique in order to monitor beach morphology. In this TFG, a Boussinesq model called FunWave and a linear wave propagation routine will be used to create synthetic wave propagation over different bathymetries. Two bathymetric inversion methodologies will be subsequently applied to retrieve the bathymetry, comparing their results and analysing their sensitivity to different aspects, in order to understand and improve their performance.

Full text

Assessment and validation of bathymetric inversion techniques using synthetic waves Thesis submitted for the Bacherlor’s Degrees in Engineering Physics Telecommunications Technologies and Services Engineering presented by Pau Luque Lozano directed by Daniel Calvete Manrique Francesca Ribas Prats Gonzalo Simarro Grande February, 2019 Summary Bathymetric inversion using video images is a new and promising technique in order to monitor beach morphology. In this TFG, a Boussinesq model called FUNWAVE and a linear wave propagation routine will be used to create synthetic wave propagation over different bathymetries. Two bathymetric inversion methodologies, cBathy and uBathy, will be subsequently applied to retrieve the bathymetry, comparing their results and analysing their sensitivity to different aspects, in order to understand and improve their performance. Keywords Bathymetry, bathymetric inversion, cBathy, uBathy, FUNWAVE. 1 Index 1 Introduction 3 2 Wave propagation modelling 5 2.1 Linear model: Airy waves . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Nonlinear model: FUNWAVE . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2.1 Equations ................................ 6 2.2.2 Domain, boundary conditions and wavemaker . . . . . . . . . . . . 7 2.2.3 Modifications introduced on FUNWAVE . . . . . . . . . . . . . . . 8 2.2.4 Shoalingtests.............................. 8 2.3 Study cases and Model setup . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.3.1 Bathymetries .............................. 10 2.3.2 Waveconditions............................. 14 2.3.3 Numerical implementation . . . . . . . . . . . . . . . . . . . . . . . 16 2.3.4 FUNWAVE model setup . . . . . . . . . . . . . . . . . . . . . . . . 17 2.4 Results...................................... 20 3 Inversion Algorithms 25 3.1 cBathy ..................................... 25 3.1.1 Methodology .............................. 25 3.1.2 Modifications implemented on cBathy . . . . . . . . . . . . . . . . . 28 3.1.3 Parametertuning............................ 33 3.1.4 Proposals for further changes on cBathy . . . . . . . . . . . . . . . 36 3.1.5 Kalmanfiltering............................. 39 3.2 uBathy...................................... 39 3.2.1 Orthogonality check . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.2.2 EOF decomposition process . . . . . . . . . . . . . . . . . . . . . . 46 3.2.3 Wavenumber extraction . . . . . . . . . . . . . . . . . . . . . . . . 48 4 Results 50 4.1 Methodology .................................. 50 4.2 Results...................................... 51 4.3 Discussion.................................... 56 5 Conclusions, Outcomes and Future Work 60 2 1 . Introduction The coast is one of the most important areas of the planet, due to its environmental, touristic, commercial, logistic and demographic importance. The beaches and the nearshore waters that form it are quite dynamical, undergoing multiple and complex changes. The states that characterize the phenomena of those systems are related to their distribution of depth, which is called the bathymetry (Wright and Short [1984]). In fact, their evolution and their behaviour are dependent depend on it (Coco et al. [2007]). Therefore, the bathymetry is a required input for predictions, coastal management decisions and scientific investigations upon those systems. The usual method to measure the bathymetry involves in place surveying using direct contact or a ship-mounted sonar (echo sounding). More recently, other types of vehicles and technologies, such as jet-skis (Dugan et al. [2001], echo sounding), amphibious buggies (Birkemeier and Mason [1984], direct contact) and aircraft (Irish and Lillycrop [1999], LIDAR), have been used. There have been also attempts to use air-born or space-born colorimetry to obtain the bathymetry (Lyzenga et al. [2006]) (works only in very clear waters). However, all these methods are expensive and time-consuming, resulting in low spatiotemporal resolutions: it is usual to perform just one survey per year, and only measuring some transects out of the actual nearshore area. To overcome this, a series of alternative methods have been proposed, using remote observations to provide spatially denser and more frequent bathymetries, with a lower cost. There was an initial attempt during WW1 and WW2 (Williams [1947]), using images of beaches (obtained from aircraft) to guess the bathymetry of enemy-held coasts. They were based on the evolution of the water-line with the tides, and the dependence of the wavelength and the phase speed of waves with depth for near waters, given by the Airy dispersion equation in the small amplitude limit. h=1 karctanh w2 gk !(1.1) Here, his the water depth, kis the wavenumber of the waves, ωstands for the waves angular frequency and gsymbolizes the gravity acceleration. This method has been called bathymetry inversion, The performance of these initial attempts was very very limited. However, new sensing apparatus, mainly video cameras (Lippmann and Holman [1989]) and X-band radar (Grilli [1998]), have provided a huge advancement in the remote sensing techniques for bathymetry inversion in the recent decades. This instruments, placed in 3 the land near to beach shores, are used to monitor the wave characteristics in an almost continuous operation. The main characteristics used to obtain the bathymetry from wave recordings are the wave breaking and dissipation patterns (van Dongeren et al. [2008]) and the already mentioned bathymetry inversion. A lot of different algorithms have been created based on this approach. Some of them have tried to extend the method using nonlinear extensions of the dispersion equation (Cat´alan and Haller [2008], Flampouris et al. [2011]), but the main approach consists in using the Airy dispersion relation. In order to obtain frequency and wavenumber from images, there are also different methods: 3D-FFT (Trizna [2001]), Fourier and dispersion relation fittings (Senet et al. [2008]), and spectral cross-correlations (Holman et al. [2013]). There is a more exhaustive description in Holman and Haller [2013]. However, the errors from all this methods are too big to be useful. Therefore, the measurement of bathymetry by means of remote sensing is still an open field. One of the most recent and popular bathymetry inversion algorithms is cBathy (Holman et al. [2013], Rutten et al. [2017]). Nowadays, the progress in the field seems oriented to either improving cBathy or finding new inversion algorithms. However, to test such inversion algorithms, it is important to use a set of videos with different wave and bathymetry conditions. In order to study the performance of bathymetry inversion algorithms, they must be performed over cases with known depth. The only way to decide freely which conditions to test is to generate synthetic bathymetries and obtain the propagation of waves over them by means of a numerical simulation. Using different bathymetries may manifest the problems these algorithms can encounter so that they and the proposed solutions can be subsequently analyzed. The goal of this work is double. On one hand, to use two models of wave propagation and adapt them to generate videos that can be used to study and test dispersion equation based bathymetric inversion algorithms. To simulate the wave propagation over the desired bathymetries, both linear and nonlinear Boussinesq-type equations are used. On the other hand, to analyze and improve a well-known algorithm, cBathy, and compare it to a new algorithm developed by the directors of this project, uBathy (Simarro et al., manuscript in review), by means of the synthetic wave videos generated. Also, the videos and subsequent inversions conducted are used to find which is the best video spatiotemporal resolution. 4 2 . Wave propagation modelling 2.1 Linear model: Airy waves The first model used to simulate the propagation of waves over the given bathymetries is based on the linear water wave propagation equations, i.e., assuming waves whose amplitude is infinitesimal (or very small compared to the depths over which they propagate). In this case the superposition principle holds, meaning that all possible scenarios can be written exactly as a linear combination of monochromatic waves. The mathematical form of a monochromatic wave is η=Acos ωt +φ(x, y),(2.1) where ηstands for water free surface elevation, Ais the amplitude of the wave, ωrefers to its angular frequency (constant), xand yrepresent the cross-shore and alongshore positions respectively, and φ(x, y) is the spatial phase of the wave. To completely determine the wave, the values for φ(x, y) need to be computed. The wave-vector, ~ k, is defined as the opposite of the gradient of the spatial phase. Its modulus, the wavenumber k, is related to water depth hthrough the angular frequency ω, as stated by the dispersion equation (Equation 1.1). The wavenumber changes from point to point, but since frequency is constant, it depends directly upon the local depth. Therefore, as the frequency and the bathymetry are known (test inputs), the wavenumber can be computed from the transcendental dispersion equation with a standard root-finding Newton routine. Then, if the orientation of the wave-vector through the domain is also determined, the spatial phase can be obtained by means of integration. This can be solved assuming an alongshore-uniform bathymetry, i. e., that depth does not change in the alongshore direction. In that case, the alongshore component of the wave-vector is constant, and since it is determined at the offshore boundary, where waves are forced, the whole wave-vector and therefore the spatial phase can be obtained (Derivation 2.1). 5 ~ k=−~ ∇φ(x, y)→~ ∇×~ k=~ 0→∂ky ∂x =∂kx ∂y alongshore uniform →n0 = ∂kx/∂y =∂ky/∂x, 0 = ∂ky/∂y o→ky= cte. kx(x) = qk2(h)−k2 y=qk2(x)−k2 y φ(x, y) = −φ0−Zy 0 kydy −Zx 0 kx(x)dx =−φ0−kyy−Zx 0 kx(x)dx, Here, kxand kycorrespond to the cross-shore and the alongshore components of the wave-vector, and φ0is the reference of phase (the one present in the wave at the origin of coordinates at time zero). The alongshore component of the wave-vector kycan be obtained at the offshore boundary of the domain, using the angle of incidence of the input wave and the wavenumber derived from the local depth. Derivation 2.1: Determination of the spatial phase for the linear wave model, under the assumption of alongshore uniform bathymetry. 2.2 Nonlinear model: FUNWAVE The other model used to simulate wave propagation over the given bathymetries is FUNWAVETVD 3.0, one of the versions of FUNWAVE, a Boussinesq model written in FORTRAN. 2.2.1 Equations The Boussinesq equations are useful to model the evolution of waves from deep to shallow water over coasts. The mass and momentum conservation equations are reduced from a 3D problem to a 2D one by truncating the Taylor expansion of the vertical profile of velocity. Then, this expansion is averaged over depth (z-derivatives are substituted by horizontal ones, under the assumption of incompressible fluid and vertical or zero vorticity). Originally, the expansion used both a dispersion parameter and a nonlinearity 6 parameter, but there are also recent versions that only consider the dispersion parameter (these are referred to as “fully-nonlinear” since there is no limitation on the non-linearity of the waves). Once the average has been performed, the equations can be rewritten to use either the mean magnitude over the water column (Peregrine [1972]) or its value at a specific intermediate point of the column (Nwogu [1993]), which is the option chosen by FUNWAVE. In the case of FUNWAVE-TVD, the equations implemented are those presented by Chen [2006], adding the use of a time and space locally depending reference level, presented by Kennedy et al. [2001]. The equations compute the evolution of the free surface and the horizontal velocity (at a given fraction of local depth). This fraction is a free parameter of the equations, which is usually set by comparing the phase speed versus depth and the amplitude versus depth relations of the equations with those predicted by the Airy theory, and then tuning the parameter to minimize the error to both relations simultaneously (Simarro et al. [2013]). Regarding the numerical scheme, FUNWAVE-TVD 3.0 uses an adaptive time step based on a third order Runge-Kutta method and the Courant–Friedrichs–Lewy (CFL) condition. Spatial derivatives are discretized using a combination of finite volume and finite difference methods. Wave breaking is modelled by either using a modification in the eddy viscosity term or by changing from Boussinesq to another set of equations that capture this effect, when conditions for the breaking are met (the second option is the used by default). 2.2.2 Domain, boundary conditions and wavemaker FUNWAVE-TVD uses a rectangular domain with a variable amount of equispaced points that build up a rectangular mesh. Attenuation sponge layers can be added at the four boundaries, having an exponential attenuation profile and a selectable thickness s. The recommended thickness for attenuation sponges is of the order of the wavelengths present in the domain (around one or two of them). There are also other types of sponges available, but they are not used in this work for they are meant to mitigate the noise that the attenuation sponges introduce in long term simulations, and the videos generated for inversion only span a few minutes (including warm up). Additionally, periodic boundary conditions can be applied to lateral boundaries. Emerging earth barriers can be used to provide boundary conditions too (this can be set by specifying negative depths). To propagate waves into the domain, FUNWAVE-TVD uses a forcing based on the Wei et al. [1999] two-way internal wavemaker. According to Wei et al. [1999], provided that the domain incorporates sponges to avoid reflections over the domain limits, the wavemaker has to be placed inside the domain itself. The way to force the wave movement 7 is to add a source term over the equations. The authors of FUNWAVE chose a thick-line source, that allows to introduce monochromatic waves of a given period, amplitude and angle of incidence to the domain. Different monochromatic terms can also be combined to mimic more complex conditions, as components of the desired spectrum of the input. The wavemaker needs to be configured to be effective in generating the desired waves. Specifically, its thickness has to be at least of the order of a wavelength fraction (around one quarter of it). 2.2.3 Modifications introduced on FUNWAVE There were a couple of issues regarding FUNWAVE that required a modification of the source code. The first one involved the output times: FUNWAVE allows the user to define the time interval desired between outputs of the variables. However, it does not adjust the time step in order to obtain a solution at exactly those times. Instead, it sets the time step fulfilling the CFL condition over the domain and, when the time of an output has been surpassed, it prints the new state of the variables. However, the present study requires the outputs to be recorded at specific times, because they are used to compute discrete Fourier transforms (DFT) inside the cBathy inversion routine. For this reason, FUNWAVE code has been altered, forcing the time step to end in the times when outputs are requested, if the required time step is smaller than the specified by the CFL condition. The other modification is related to the waves introduced in the domain. FUNWAVE provides an option that allows to specify the components of the input waves, as a list of monochromatic terms amplitudes and angles of incidence. However, it sets their phase to a random value internally. The source term generation routine was changed to accept also a list of user-defined phases. In this way, the cases where there is a superposition of monochromatic waves can be simulated with repeatability, in order to study the influence of some parameters. 2.2.4 Shoaling tests To test if the FUNWAVE solver is working properly, a case with known solution has been simulated and the results have been compared to it. For shoaling waves, the easiest case is the small amplitude limit, that results in Airy waves, for which amplitude and phase speed can be directly written as functions of depth. However, the FUNWAVE equations do not exactly produce Airy waves, even in the small amplitude limit. As explained in Subsection 2.2.1, they are tuned to produce am- 8 Figure 2.5: Bathymetry for the baseline case (left) and the structures case (right). The colour code corresponds to bed elevation, in meters. ID T [s] f [Hz] A [m] θ[o]φ0[o] 1 7.945 0.125 0.250 -16.6 39.0 2 12.000 0.083 0.150 +0.0 0.0 3 5.022 0.199 0.050 +26.1 108.7 Table 2.3: Characteristic of the monochromatic waves used. T stands for wave period, f is its frequency, A symbolizes its amplitude, θrepresents its orientation and φ0its phase at time zero. The values shown correspond to the properties of the waves where they enter the domain (for the linear model, the offshore boundary, for the FUNWAVE model, the wavemaker). 15 The real wave conditions one can observe in a beach span multiple amplitudes. To test the limit of small amplitude and to study the dependence of nonlinear effects with amplitude, FUNWAVE simulations are also conducted with smaller amplitudes, specifically, with the amplitudes described in Table 2.3 multiplied by ×0.4 and ×0.1, together with the ×1.0 case. This only affects FUNWAVE simulations, since linear equations are based on infinitesimal amplitude waves (in this case, the amplitudes from Table 2.3 define only the relative amplitudes for the polychromatic cases). It is important to note that the characteristics of the waves are referred to their value at the seamost side of the domain. This is, waves are meant to come from open sea, and in the simulations their state is defined at the point they enter the domain. 2.3.3 Numerical implementation Simulation results are obtained with a grid size of 1 m both in cross-shore and alongshore (spatial resolution of 1.0 ppm), and their output is printed each 0.25 s ( sampling frequency of 4.00 Hz). However, it is important to see how the inversion performance changes with the spatial and temporal resolutions considered. To do so, the resulting images are decimated to consider also cases with 0.5 ppm, 0.25 ppm and 0.1 ppm (where ppm stants for pixels per metre, so they corresponding to 2 m, 4 m and 10 m distances between consecutive pixel centres), and sampling frequencies of 2.00 Hz, 1.00 Hz and 0.50 Hz (corresponding to sampling periods of 0.5 s, 1.00 s and 2.00 s, respectively). To decouple the dependence of results with spatiotemporal resolution from their dependence with amplitude, the spatiotemporal variations are only studied in the linear model simulations. For FUNWAVE simulated cases, the spatial resolution is set to 0.25 ppm and the sampling frequency is fixed at 2 Hz. Finally, the video temporal span is set to 150 s, at the request of uBathy developers. To check this does not affect cBathy, consider that the windowing produced by 150 s of observation transforms the spectra of the monochromatic components, which are Dirac deltas, into the Fourier transform of a square pulse (hereinafter, a sinc). The bandwidth of a sinc can be regarded as the bandwidth of its main lobe, which is about 1/Tobs, in this case, about 1/150 = 0.0067 Hz. According to Rayleigh criterion, to resolve them, they need to be spaced more than this width. The spacing between components with ID 1 and ID 2 is 0.125 Hz - 0.083 Hz = 0.042 Hz >0.0067 Hz, the spacing between components with ID 1 and ID 3 is 0.199 Hz - 0.125 Hz = 0.074 Hz >0.0067 Hz, and the spacing between components with ID 2 and ID 3 is 0.199 Hz - 0.083 Hz = 0.116 Hz >0.0067 Hz. Therefore, a video duration of 150 s is enough for cBathy. 16 2.3.4 FUNWAVE model setup The FUNWAVE simulation domain used consists in a rectangle of 672 m in cross-shore and 480 m in alongshore (Figure 2.6). The area used for bathymetry extraction (hereinafter called the video zone) measures 300 m in cross-shore and 200 m in alongshore. However, some extra space is needed for the seawards boundary (where the wavemaker is placed), the lateral boundaries (which should emulate the continuity of the coast) and the coastal boundary (where most of the dissipation or reflection of waves occur). Figure 2.6: Diagram showing the regions of the domain and their size. 1. Seaward boundary. At least one wavelength width sponge is needed. The wavemaker needs to span another quarter of wavelength. At 8 m of depth, the wavelengths corresponding to the frequencies used are around 100 m, 65 m and 35 m. The worst case is 100 m, which means extra 125 m, although 150 m are used to left some space between the sponge and the wavemeker. However, in order to ensure that the wavemaker influence does not show in the video zone, 100 m are added between them, resulting in a total width of 250 m. Since the wavemaker needs to operate at a constant depth, the baseline bathymetry was clamped at the level it presents during the 100 m between the video zone limit and the wavemaker start (8 m, as described in Subsection 2.3.1). 17 2. Lateral boundaries. In order to avoid the effects from the lateral borders, some space at the sides of the video zone is left. Two options have been tested for the lateral boundary conditions: attenuation sponges with a reflective wall, and periodic boundary conditions. Since the attenuation sponges require at least one wavelength width (100 m) to ensure enough attenuation is provided, 140 m are added to each side. To apply the periodic boundary conditions, the alongshore wavelength must be a submultiple of the alongshore domain size. Thereby, the orientation of the incoming offshore waves has been computed to match the 480 m alongshore length. Attenuation sponges have been proved inadequate for this case, because the laterals attenuation distorts wavefronts, just as diffraction through a hole (Figure 2.7). On the contrary, periodic boundary conditions with no attenuation seem to work properly. 3. Coastal boundary. The first option that has been used to define boundary conditions in this side of the domain consists in keeping the natural evolution of the bathymetry described, resulting in a planar beach emerged from water. However, this setup produces a strong reflection (Figure 2.8). In order to mitigate it, a sponge is added after the video zone, with a thickness, s, of 100 m or 200 m. The bathymetry is changed near the coast, by bringing it to a constant value before the depth becomes negative. A logarithmic splice of the form “Alog 10Ax + 10C−C+L” (modelling a two slope joint) is used to this effect. The splice starts 15 m before the video zone ends, and gradually changes its elevation gradient until the constant value of depth desired, L, is reached. The tested values for the clipping depths are 0.3 m and 0.03 m. Results are pretty similar in the four cases (i. e. changing sand L) (see Figure 2.9), and therefore the computationally cheapest case (L= 0.3 m, s= 100 m) is implemented for the inversion tests. However, reflections are not completely removed, though they become smaller. This has motivated the development of new strategies to cope with reflections over the coastline in the inversion algorithms. The bathymetry inversion algorithms need 150 s of video, but 200 s of simulation are added for the simulated system to warm up. Therefore, the total simulation time is 350 s. All the simulations used to test the boundaries have been conducted using 1 m of grid size, both in cross-shore and alongshore directions. This has kept computation times into a reasonable order of magnitude. To check that this is enough, a couple of simulations using 0.5 m of grid size have been conducted. Visual inspection confirms that the results are similar enough for the purposes of this work. To speed up simulation times, the model is parallelized. The way FUNWAVE incorporates it is by subdividing the computation domain into smaller ones. To do so, it needs the number of points in the subdivided direction to be a multiple of the number of cores 18 Figure 2.7: Free surface maps showing the effect of sponges and reflective walls as lateral boundary conditions. The left image shows some circular waves that appear due to the attenuation of the main plane wave wavefronts at the lateral boundaries. The right image shows a snap for a later time instant. Notice how the wavefronts are not straight lines as expected, due to the interaction with the circular waves. The images are build as explained in Section 2.4. The lateral and the offshore margins of the domain are depicted too, beside the video zone. Figure 2.8: Free surface maps showing the reflections caused by the emerged land coastal boundary conditions. The contrast between crests and valleys is quite small due to reflections. The form of the reflected wave is barely visible, but it may be observed if the image is looked from some distance. The lateral margins are depicted too, beside the video zone. 19 0 100 200 300 400 500 600 700 800 900 1000 time (s) 10 -10 10 -8 10 -6 10 -4 10 -2 10 0 RMS difference (m) L=0.3m, s=200m L=0.03m, s=100m L=0.03m, s=200m emerging land Figure 2.9: Temporal evolution of the RMS difference in free surface height among the domain, compared to the 0.3 m clipped 100 m thickness sponge case. The horizontal axis corresponds to simulation time in seconds, and the vertical axis is the RMS difference between pixel’s free surface elevation. The case of emerging coast is also displayed. used. Since systems used have up to 24 cores, it was ensured that both sides of the domain have a number of points multiple of 24 (this leads to a slightly longer coastal zone after the video zone, as can be seen in Figure 2.6). To implement all the conditions for each simulation while allowing to change these parameters in a fast way, a routine combining Bash scripting and Python have been developed. It gets the information from the input file (where the positions of the wavemaker, the size of domain parts, the thickness of the sponges, the input wave spectrum and the clipping depth are described), computes the inputs necessary (changing limits to match a number of grid points suitable for parallellization and computing the bathymetry according to the analytic expressions and the clippings), and feeds them to FUNWAVE. 2.4 Results Finally, free surface height resulting from simulations are used to build images, by means of a linear transformation to 128 grayscale levels. The following pages contain some examples of the images built. Figure 2.10 shows the three monochromatic waves used in this work, alone and combined. Notice how the crests of the waves get closer near the coast, as the depth becomes smaller. In some pictures it is also possible to see how the crests become more intense, indicating a bigger amplitude due to shoaling. The cases that use 20 the bathymetry with structures show the refraction of the incoming waves when they pass over the undulations and the bump, resulting in bent wavefronts. The different amplitude cases considered are depicted in Figure 2.11. The difference between crests and valleys is more definite for bigger amplitudes. Finally, Figure 2.12 depicts the different spatial resolutions used for inversion. 21 Figure 2.10: Images resulting from the simulations. The top row corresponds to cases with the baseline bathymetry, and the bottom row to cases with a bathymetry with structures. The wave of each column correspond to ID 1, 2, 3, and the combination of them three. All the simulations have been done with FUNWAVE. The resolution is 1.00 ppm, and the amplitude factor is x1.0. The coast is up. 22 Figure 2.11: Resulting images for waves with ID 1, for different amplitude factors. From left to right, linear model simulated, FUNWAVE simulated with amplitude x0.1, FUNWAVE simulated with amplitude x0.4 and FUNWAVE simulated with amplitude x1.0. The spatial resolution is 1.00 ppm. Baseline bathymetry has been used. The coast is up. 23 Figure 2.12: Resulting images for waves with ID 1, with different spatial resolutions. Respectively, these are 1.0 ppm, 0.5 ppm, 0.25 ppm and 0.10 ppm. They have been simulated with the FUNWAVE model (amplitude x1.0, baseline bathymetry). The coast is up. 24 cross-shore and alongshore (simulations come from a rectangular grid, and real data would come from a single camera, too). Therefore, the wavenumber pre-estimation routine has been modified to take real transects, in order to have better estimates. To toggle between the two algorithms for transect making, a boolean variable has been added, that indicates if the data comes from a rectangular grid. Also, notice that some extra outliers can appear due to phase wrapping: the angle of a complex number is multivalued, it may result in the same complex phase if 2π is added several times to it. Depending on the absolute phases of the eigenvector, the jumps of the angles can appear at any place. To solve this, the phase array has been normalized by the phase of the closest data point to the tile centre. In this way, angle jumps are displaced away from the tile centre. If the tile is smaller than a wavelength, angle jumps will not appear. The normalization is completely harmless, since the phase array contains the values for spatial phase differences between pixels, and these can be referred to any origin (there is one degree of freedom, in the form of a global phase). Also, remember that the phase array is an eigenvector (multiplying it by any complex number still makes it an eigenvector). Another change to the pre-estimation routine has been to clip the return values. In the original code, when the pre-estimated wavenumber is out of the limit of deep and shallow water (in this case, defined by the minimum depth allowed in the bathymetry), cBathy returns an arbitrary value (the wavenumber corresponding to a frequency of 0.3 Hz and 3 m of depth). When the main routine receives a value out of the shallow and deep water bounds, it surrenders and skips the estimation of a wavenumber for that band at that tile. The return value for the out-of-bounds cases has been changed, now its value is clipped to the shallow and deep water limit (plus a small epsilon to ensure that they still remain inside the interval at comparison time). Thus, the wavenumber pre-estimate is moved to the nearest plausible value, and the fitting is attempted. 6. Bound for wave-vector direction. In the original cBathy code, there was a filter to the angle of the estimated wave-vector. If the estimated wave-vector represented a wave coming from the coast, the result was neglected and it did not provide an estimate for the wavenumber. That condition has been removed, because in the fitting routine one can not control if the resulting wave-vector will be pointing towards or from the coast (they both may be the best result for the optimization), and the resulting wavenumber, which is the interesting parameter, would be the same. 7. Depth fitting weights. CBathy also uses weighted residuals when fitting the 31 estimated pairs of frequency-wavenumber to the dispersion equation. The weights used are a combination of a function decaying with distance to tile centre (the same used in the wavenumber estimation), the coefficient of determination of the wavevector fit (indicating how good was that estimate), the relative eigenvalue of the phase array (eigenvalue divided to the mean of the CSM eigenvalues, indicating how representative is that phase array), the inverse of depth sensitivity to errors in wavenumber, and the inverse of the wavenumber. The depth sensitivity to errors in wavenumber can be computed as described in Derivation 3.1. ∆h≃dh dk∆k→ ∆h h≃ k h dh dk ∆k k→sens ≡ k h dh dk dh dk =−1 k2arctanh w2 gk !−1 k2 w2 gk 1−w2 gk 2 sens = k h dh dk = 1 + w2 gk 1−w2 gk 2 1 arctanh w2 gk  γ≡w2 gk →sens = 1 arctanh (γ)arctanh (γ) + γ 1−γ2 arctanh (γ) + γ 1−γ2=d dγ γarctanh (γ) sens = 1 arctanh (γ) d dγ γarctanh (γ) Derivation 3.1: Depth sensitivity to wavenumber errors, expressed as cBathy routines use it. The original cBathy code uses this alternative expression, but it divides by tanh(γ) instead of arctanh (γ). However, the resulting weights are similar (in fact the one using tanh(γ) is more restrictive), as can be seen in Figure 3.1. Unfortunately, the authors do not left an explanation about this decision, and so the theoretical arctanh (γ) is the one used. 32 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 sens. weight atanh( ) tanh( ) Figure 3.1: Comparison of resulting sensitivity weights (1/sens). 3.1.3 Parameter tuning In order to run cBathy and obtain useful results, it is crucial to tune a series of parameters. The most important ones are: i) the resolution of the frequency bands used in the CSM averaging (hereafter dfB) because it determines the resolution obtained in wave frequency estimation and also because it defines the scale of the interval over which the spectrum is averaged; ii) the resolution of the spectrum returned by the DFT (hereafter df) since once the width of bands have been defined it determines how many samples will be averaged, that need to be high enough to ensure that statistics of the averaging work properly; iii) the scaling of the tile size, because it determines how many pixels are used to compute the CSM, and therefore controls directly the quality of the phase vector obtained; iv) the level of noise relative to the signal level (hereinafter nra), because the synthetic data generated is too clean to allow a characterization of the wave frequencies by averaging the spectrum. Instead of relying on default parameters, or to try to guess a good value for them manually, a set of routines are designed to find proper values for the important parameters automatically. However, an algorithm to tune the scaling of the tile size could not be developed, and thus this parameter is still set manually. Therefore, the proposed algorithm finds correct values for dfB,df and nra. In order to study their effects in the determination of waves, a small tile around the centre of the domain is selected, and its associated coherence computed. Then, the effects of these three parameters on the coherence are analyzed. To do so, a proper value for each parameter is found manually, and then two of them are kept constant while the third is changed. 33 If dfB and df are set to proper values, and nra is set to 0, a noisy function that touches 1 almost at each band can be observed. The problem happens to be having data which is too clean: the lack of noise produces an always coherent spectrum. If noise is added to this data, the coherence plot starts to bend towards zero. The bands containing frequencies of waves present in the video keep a higher value. Adding even more noise makes the peak narrower, while it descends until all the coherence ends lying in the same level, at the noise floor (Figure 3.2). On the contrary, data coming from a real beach (the demo that cBathy authors attach to the code), presents a well defined peak even when nra is set at 0, and goes to noise floor for higher values. This reinforces the idea that data coming from real sources has an inherent amount of noise within. The question is if all the natural videos present enough levels of noise, or if their data needs to be contaminated with more noise in order to be used for bathymetric inversion. 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Bands (Hz) 0 0.2 0.4 0.6 0.8 1 coh2 Figure 3.2: Coherence dependence with noise nra (warmer colour: less noise, colder colour: more noise). If nra and df are kept constant within a proper value, and dfB is changed (i. e., modifying in how many bands we divide the zone of interest of the spectrum), for small dfB the coherence presents fast and strong variations with frequency. As dfB becomes bigger, the oscillations become smaller in size, and curl around a noise level that becomes smaller with wider bands. Finally, the peak starts to decrease, too (Figure 3.3). in Figure 3.3. If dfB and nra are kept fixed, and df changes from a high resolution (small df) towards a low one, the coherence function remains the same at first, but eventually it starts to tremble, and then it changes its shape completely, widening the peak and eventually ending in the case of almost constant line at coherence equal to 1 (Figure 3.4). This behaviour suggests that a high resolution value of df can be kept while dfB and nra are tuned to provide the best coherence possible, and then adjust it in order use the smallest amount of samples that keeps the coherence function almost unchanged compared to that resulting from using higher resolutions (the limit is found using a threshold on the norm 34 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Bands (Hz) 0 0.2 0.4 0.6 0.8 1 coh2 Figure 3.3: Coherence dependence with band width dfB (warmer colour: narrower bands, colder colour: wider bands). of coherence changes). 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Bands (Hz) 0 0.2 0.4 0.6 0.8 1 coh2 Figure 3.4: Coherence dependence with DFT resolution df (warmer colour: more resolution, colder colour: less resolution). The tests of dfB and nra are based on characterize the suitability of the coherence obtained. To do so a combination of three different metrics is used. One is the maximum value of the coherence (the higher the coherence, the best the results of the inversion). The second is the difference between the maximum and a reference value, intended to characterize the noise level, and it is computed as a certain quantile of data (something between the median and the 95% percentile). The third one is the ratio between a magnitude characterizing the neighbourhood of the maximum (the minimum of its nearest neighbours, to characterize if the maximum corresponds only a spark or if it really has a peak shape) and another magnitude representing the rest of points (coherence average). These three metrics must be combined so that if one one of them is bad, then that parameter value will not be chosen. The way to combine them is to normalize them between zero and one and multiply them together to get the combined metric. Since they three change rapidly, they are first low-pass filtered. This procedure results in coherence functions that seem reliable in order to identify wave presence. The resulting well-shaped coherence is also used to preselect bands, for the case cBathy is told to use them. 35 100 200 300 400 500 cross-shore (m) 0 200 400 600 800 1000 alongshore (m) Modified code 0 5 10 15 20 25 30 35 40 100 200 300 400 500 cross-shore (m) 0 200 400 600 800 1000 alongshore (m) Original code 0 5 10 15 20 25 30 35 40 Figure 3.5: Comparison of the bathymetric inversion errors for the cBathy demo case. coast is to the left of the images, the colorbar is in relative error [%]. Since the effect of dfB and nra overt the coherence are coupled, their tests are iterated alternatively. This is, the test starts with some predefined values (with a high value for df so it does not affect the other tests), and changes dfB to find the value that maximizes the combined metric. Then dfB is fixed, and nra is tuned to generate also a maximum of the combined metric. This process is repeated some times (between 5 and 10) to allow both parameters to converge to their proper values. Finally, once these two parameters are selected, df is changed until the coherence starts to change more than a given threshold. In this way, proper values for the three frequential parameters are obtained. The demo case that cBathy authors provide with the code has been inverted using the original routines and also using the routines that incorporate the internal modifications implemented on cBathy and also the external parameter tuning. Results, shown in Figure 3.5, clearly prove that the modified code improves the performance significantly. 3.1.4 Proposals for further changes on cBathy The most important modification that could be implemented on cBathy if more time was available are the following: 1. Continuous coherence. The essential problem about using bands is that although they reduce the noise present in the spectra, they also worsen the resolution in the frequency domain, so that the frequencies estimated may differ from the real ones. However, other methods can be applied to reduce the noise present in the coherence. 36 For example: 2. Correlations with amplitude. cBathy uses phase correlation to find coherent bands and to extract the phase vector. However, the usual spectral correlation involving amplitudes might be used instead. In order to average it through the band, all spectrum amplitudes should be considered to produce a coherence that is between zero and one. The usual way would be to normalize the spectra individually (as when one computes the angle between two vectors). Gm(f) = Fsm(t)(f) =Gm(f)·ej∠Gm(f) CSMm,n,b =Pfl∈bandbGm(fl)Gn(fl) qPfl∈bandbGm(fb) 2qPfl∈bandbGn(fb) 2 A couple of tests have been run using it. The resulting coherence is a bit more noisy but also presents peaks that protrude more over the noise floor. However, the inversion itself fails. More tests need to be run, and their results studied. (a) Welch’s method. The temporal signal would be split in smaller pieces and the DFT of each fragment would be computed separately. Then an average using the different realizations would be performed. This could be done for phase correlation CSMphase m,n,b =1 L L X l=1 Gl m(f)Gl n(f) or for the spectral correlation involving amplitudes. CSMm,n,b =PL l=1 Gl m(f)Gl n(f) qPL l=1Gl m(f) 2qPL f=1Gl n(f) 2 where CSMphase m,n,b represents a cross-spectral matrix using phase correlation, CSMm,n,b symbolizes a cross-spectral matrix using correlations that include amplitude, Lis the number of fragments in which the temporal signals are split, and lis the index that lists fragments. Notice that using fragments that span smaller time intervals would result in a rectangular windowing that would provoke wider sincs. Therefore, wave peaks could mask smaller signals that lie near. However, the frequencies could be determined with more precision because the resolution of the spectrum would be that of the pixel DFT. 37 (b) Coherence filtering. Instead of filtering the CSM by averaging along bands, it could be smoothed by means of a sliding window (convolution). Due to the width of the filter response, the effects of one frequency might affect other ones, but since the resolution would be that of the pixel DFT, the precision would be improved. These new ways of computing coherence would present a new problem. Selecting the most coherent frequencies would not be as easy as picking those with the biggest value of the coherence, since in this way only frequencies around biggest peak in the coherence would be selected. Therefore, a new algorithm peak finding algorithm would be needed. 3. Wave-vector fitting improvement. The global phase of the phase array is set so that the data point closest to the centre of the tile has a phase term of 1 (see Subsection 3.1.2). Thereby the expression of the wave spatial phase term can be rewritten as; exp −j~ k·~r +φ0→exp j−~ k·(~r −~rcc)(3.7) Where ~rcc are the coordinates of closest point to the tile center (whose phase is set to one). In this way, the fitting could be performed using two parameters, i. e., without φ0. Another interesting change that could be done is to consider the possibility of wave reflection. Then, instead of fitting one exponential, two of them should be used, with different amplitudes, and different angles of the wave-vector (but the same wavenumber). θi[m] = −kcos(αi)(xm−xcc)−ksin(αi)(ym−ycc) + φcc,i (3.8) θr[m] = −kcos(αr)(xm−xcc)−ksin(αr)(ym−ycc) + φcc,r (3.9) This means an optimization with six parameters, with a constraint arising from the condition that the global phase is a free parameter. v[m] = 1 1 + ρ2+ 2ρcos (θr−θi)ejθi[m]+ρejθr[m](3.10) 1 1 + ρ2+ 2ρcos φcc,r −φcc,iejφcc,i +ρejφcc,r = 1 (3.11) Where mrepresents the index of the pixel inside the tile, θiand θrare the angles of the modelled incident and reflected waves’ spatial phases, xcc and ycc are the 38 coordinates of the point whose phase is set to one (constraint), and k,αi,φcc,i,ρ,αr and φcc,r the parameters to optimize in order to fit the modelled phase. 3.1.5 Kalman filtering All the explanation presented regarding cBathy has only regarded the single inversion process, this is, obtaining a bathymetry using just one video. However, cBathy consists in a three steps process, where the last part is fusing data from different single inversions to get a better estimate. It achieves that by using a Kalman filter over successive depth estimates. In fact, the authors of cBathy point out that this is the most important point to the performance and success of cBathy. The single video inversion process has been improved, but it is mandatory to wrap this single video inversion process with Kalman filtering routine in the future. However, in order to implement a Kalman filter, a model to describe the degradation of estimates is needed (it is beach dependent), and there are few directives in the literature on how to build such an estimate. 3.2 uBathy UBathy is a bathymetric inversion method which is being developed by the directors of this project. It also uses Airy dispersion equation to find local depth using frequencies and wavenumbers of the monochromatic components present in a video of the coastal waves. In order to decouple the wave signal into its components, uBathy uses empirical orthogonal functions (EOFs). The signal under study is modelled as shown by Equation 3.1. The form of the spatial phase φ(~r) is φc(~r) = −φ0−Z~r ~ 0 ~ kc·~ dr (3.12) The objective of the decoupling process is to obtain the each component phase separately, in order to have information to estimate all the frequencies and wavenumbers. To do so, uBathy relies on the orthogonality between sinusoids of different repetition periods, using EOFs. EOF decomposition allows to obtain a set of orthogonal temporal functions wc(t) and a set of orthogonal spatial functions vc(~r) which can be used to rewrite the spatiotemporal decoupled signal q(~r, t) as shown in Equation 3.13. 39 q(~r, t) = X c uc(t)vc(~r) (3.13) The signal under study can present the same functional form if the cosine of each monochromatic component is split. EOF uses. sc(~r, t) = Ac(~r) cos φc(~r)cos (2πfct)−Ac(~r) sin φc(~r)sin (2πfct) However, this equation presents two inconveniences. The first one is that each monochromatic wave present in the inversion domain is retrieved twice, and the computations for each of them are repeated. The second inconvenience is that the phase variations from the spatial term can not be retrieved, since in the data is not possible to distinguish between the amplitude and the cosine. To avoid this situation, the signal is represented in the complex plane, using phasors. To this effect, the temporal Hilbert transform of the signal (ˆsc(~r, t) is computed, and used to build the corresponding analytic signal (asc). ˆsc(~r, t) = Ac(~r) cos φc(~r)sin (2πfct) + sin φc(~r)cos (2πfct) (3.14) asc(~r, t)≡sc(~r, t) + jˆsc(~r, t) = Ac(~r) exp (j2πfct) exp jφc(~r)(3.15) The analytic signal still preserves the form needed by EOF decomposition, but presents only one spatiotemporal function pair for each monochromatic tone. It also allows to obtain spatial phases, by computing the angle of the spatial function obtained by EOF decomposition. 3.2.1 Orthogonality check However, in order to ensure that the results of the decomposition are the wave terms expected by Equation 3.15, the different temporal functions and spatial functions need to be orthogonal. The lack of orthogonality can arise by the fact that spatial terms are not monochromatic, but changing wavelength locally. It can also be caused by the windowing of the signal (finite observation time and spatial scope) or by its discretization (sampling). It is even possible that the signal contains two monochromatic components with the same frequency, but for the moment this case will not be considered. 40 Then, the eigenvectors of this matrix are extracted. Following Derivation 3.3, it can be assumed that the vc[m] are orthonormal. Therefore, the last line of Equation 3.21 shows directly the eigendecomposition of the covariance matrix (Equations 3.22 and 3.23 rewrite it to show it more visually). λc=MN (Arms c)2(3.22) C=X c λcvcvcH(3.23) The eigenvectors (called empirical orthogonal functions or modes) can be interpreted as a set of linear transformations over the pixels’ temporal series, in such a way that the resulting temporal series (principal components) have a covariance matrix which is diagonal (it is equivalent to say that each pixel temporal series is a linear combination of the principal components defined by the eigenvectors). The variances of that matrix correspond to the eigenvalues of the extracted eigenvectors. They can be interpreted as the variance that each of the eigenvectors contributes with to the total variance. The principal components can be obtained by applying these linear combinations to the set of original temporal series. This is equivalent to compute the inner product of the total spatiotemporal signal over each mode. wc[n] = 1 λchvc, s(~rm, t)i=X m vc[m]s(~rm, t) = =1 λcX mX γ vc[m]√MN Arms γvγ[m]wγ[n] = =1 λcX γ √MN Arms γwγ[n] X m vc[m]vγ[m]!hvc1, vc2i=δc1,c2(Der. 3.3) −−−−−−−−−−−−−−−→ hvc1, vc2i=δc1,c2(Der. 3.3) −−−−−−−−−−−−−−−→ 1 λc √MN A0 cwc[n] = wc[n] (3.24) Once the EOF decomposition process has been presented, it is mandatory to state that the covariance matrix and the inner products described by Equation 3.24 do not need to be computed. There is an specific matrix decomposition, the singular value decomposition (SVD), that directly decouples the demeaned data matrix into three matrices W,Λ and Vthat contain, respectively, the temporal phase terms by columns, the eigenvalues in the diagonal, and the spatial terms by columns. This factorization is of the form: Ym,n =s(~rm, n) 47 Y=VΛWH There are algorithms that compute it quite fast, saving time and memory and obtaining more accuracy, compared to the covariance matrix direct computation. As a final remark about decoupling, it is interesting to note that the EOF decomposition also provides some rejection to noise and interference, cause it may extract them as another pair of spatial and temporal vectors. The results conducted over real coastal data seem to support this hypothesis. 3.2.3 Wavenumber extraction Once the measured signal has been decoupled, the monochromatic temporal and spatial phases are used to extract frequencies and wavenumbers. The temporal phase terms are just constant frequency 1D oscillations. The literature is full with estimators for that type of functions, and thus the frequency extraction does not present any problem. On the contrary, the spatial phase term is a 2D oscillation with a varying wave-vector. A local estimation for the wavenumber is needed, and this requires a subtler approach. From now on vc[m] redefined to contain only phase information (by dividing each sample by its amplitude). The original approach to wavenumber estimation consists in a linear fitting over the phase angle. For each sample of the spatial phase, a neighbourhood of a certain userdefined radius is selected. Then, all the samples inside the neighbourhood are referred to the phase of the central sample, to avoid angle jumps inside the neighbourhood (see Figure 3.8). ˆv[q] = angle v[q]v[m],q∈neighbourhood of ~rm Using the angles of the normalized phases inside the neighbourhood, a polynomial can be fitted, in order to mimic the Taylor expansion of the spatial phase around the neighbourhood centre. The wave-number is formed by taking the coefficients of the linear terms. vc[m] = θc−Z~r ~ 0 ~ kc·~ dr ≃θc−kx[m]xm−ky[m]ym+ox2 m, xmym, y2 m 48 Figure 3.8: Result of the phase normalization. where coordinates are referred to the neighbourhood centre. The wavenumber obtained is used to find a characteristic wavelength, which in turn is used to redefine the size of the neighbourhood, repeating the process to get a better estimate (the first neighbourhood may be too big and contain angle jumps). However, this method of wavenumber extraction fails if consider reflection is considered. Until this point, is has been assumed that all the monochromatic waves which build up the signal under study have different frequencies. But if a reflected wave appears, this is no longer true. In this case, the EOF decomposition cannot distinguish between the incident and the reflected waves, since they are not orthogonal. Then, the returned spatial phase will be a superposition of them. Therefore, its angle will no longer provide wave phase information directly, preventing the use of linear fittings. However, a nonlinear fitting can be conducted over the sum of the two complex exponentials, as follows: θc,i[m] = −kccos(αc,i)xm−kcsin(αc,i)ym+θc,i (3.25) θc,r[m] = −kccos(αc,r)xm−kcsin(αc,r)ym+θc,r (3.26) v[m] = 1 1 + ρ2+ 2ρcos (θr−θi)ejθi[m]+ρejθr[m](3.27) 1 1 + ρ2+ 2ρcos φcc,r −φcc,iejφcc,i +ρejφcc,r = 1 (3.28) This alternative method has been implemented successfully, allowing to retrieve the wavenumber even in presence of strong reflections. 49 4 . Results 4.1 Methodology The videos of waves corresponding to cases described in section 2.3 have been inverted using cBathy and uBathy. Since the exact bathymetries are known, the absolute value of the difference between the inverted and the exact bathymetry can be defined (hereinafter absolute error), and also its value relative to the local exact depth (hereinafter relative error). abs =|hinv −hex| rel =abs hex Here, abs is the absolute error, rel is the relative error, hinv is the inverted depth and hex is the exact depth. The inversion relative errors can be computed and displayed using a colour code. An example of the inversion results is shown in Figure 4.1. All the inversion relative errors have been computed and depicted, saturated to 10% of pixel depth error in order to present a common scale that allows to compare different images and presenting an easier characterization of the results. They are presented in the Section 4.2. Also, for each of the inversions performed, the obtained errors can be sorted by magnitude, defining percentiles (the n-th error percentile is the value that separates the n% smallest errors and the remaining (100 −n)%), and quartiles (the first quartile, Q1, corresponds to the percentile 25, the second quartile, Q2, also known as the median, corresponds to the percentile 50, and the third quartile, Q3, corresponds to the percentile 75). The percentiles can be used to characterize how the errors of each inversion are distributed, and also can be used to clip the data in order to neglect outliers. The root mean square error clipped to the percentile 95 has been defined as RMS95 =s1 MX m abs where RMS95 is the root mean square error clipped to the percentile 95, mis an index listing the points of pixels of each image (points where the bathymetry has been inverted), and M is the number of pixels. For each inversion performed, the quartiles of the absolute 50 Figure 4.1: Results of one of the inversions. The bathymetry used is the one with structures, the wave case is the polychromatic one, with amplitude factor of x0.1. The video used for the inversion has a sampling frequency of 2.0 Hz and a spatial resolution of 0.25 ppm. The inversion was performed using cBathy. The figure shows, from left to right, the original bed elevation in metres, the inverted bed elevation in metres and the resulting relative error in % (bed elevation is defined as the opposite of depth). The horizontal axis is alongshore in metres, and the vertical one represents cross-shore in metres. The coast is up. error and its RMS95 error have been computed. These quantities are presented in Section 4.3. 4.2 Results The results of the inversions have been ordered according to the evolution of the parameters studied. The evolution with spatial resolution is quite clear for cBathy. The results are similar for bigger resolutions, (0.50 ppm and 0.25 ppm), although they seem a bit better for the case of 0.25 ppm. Using a low resolution video (0.1 ppm) causes greater errors in the inversion, specially onshore (Table 4.1). Regarding the sampling frequency used in the videos, cBathy presents two different behaviours (Table 4.1). For the monochromatic cases, and near the coast for the polychromatic cases, results worsen with lower sampling frequency, specially under 1 Hz. However, offshore errors seem to diminish with smaller sampling frequency. Therefore, the optimum resolutions for cBathy are near 0.25 ppm and 2.0 Hz, although this inversion method can work with a reduced performance with other resolutions. These values reassure the resolutions suggested by Holman and Haller [2013]. 51 The same evolution with spatial resolution is observed in the uBathy results (Table 4.2). However, when using high resolution and low sampling frequency video, uBathy fitting routines are unable to find wavenumber for most or any of the points, resulting in a generalized failure of the inversion. UBathy results are quite robust to changes in the sampling frequency, with the exception the cases where it fails (Table 4.2). Then, the optimum resolutions for uBathy are also 0.25 ppm and 2.0 Hz. However, uBathy can work with almost the same performance with other resolutions. The dependence with the bathymetry type is also clear. Errors are quite noticeable over the bumps and undulations of the cases with structures (Table 4.3). UBathy presents some small error undulations offshore, probably caused by reflections and the associated fitting. CBathy presents two extra zones of error next to the bumps, the cause for which is unknown. Both cBathy and uBathy get worse results with bigger amplitudes (Table 4.3). There is a big change between the linear modelled case and the FUNWAVE modelled one. Then, between FUNWAVE modelled cases, the effect seems to worsen faster for bigger amplitudes (this is, the change is subtler between x0.1 and x0.4 than between x0.4 and x1.0). The more affected areas are those closer to the coast. For the biggest wave amplitudes tested (x1.0), cBathy gets better results offshore, while uBathy is capable to get also some good results near the coast (Table 4.3, cases with structures in the bathymetry). Then, these inversion algorithms are capable to obtain acceptable results with waves whose amplitude is at most near 15 cm for a polychromatic wave field (the sum of the composing monochromatic waves amplitudes in the x0.4 cases) and at least 25 cm for a monochromatic wave field. The complexity of the wave field is indeed a determining factor for the amplitudes involved. 52 case\sampling frequency 4.00 Hz 2.00 Hz 1.00 Hz 0.50 Hz linear, baseline, monochromatic, 0.10 ppm linear, baseline, monochromatic, 0.25 ppm linear, baseline, monochromatic, 0.50 ppm linear, baseline, polychromatic, 0.10 ppm linear, baseline, polychromatic, 0.25 ppm linear, baseline, polychromatic, 0.50 ppm relative error colorbar [%] Table 4.1: Effects of the temporal resolution over depth error [%]. cBathy results. Legend: m - monochromatic, p - polychromatic, b - baseline, s - structures, l - linear, f - FUNWAVE. 53 case\sampling frequency 4.00 Hz 2.00 Hz 1.00 Hz 0.50 Hz linear, baseline, monochromatic, 0.10 ppm linear, baseline, monochromatic, 0.25 ppm linear, baseline, monochromatic, 0.50 ppm x linear, baseline, polychromatic, 0.10 ppm linear, baseline, polychromatic, 0.25 ppm linear, baseline, polychromatic, 0.50 ppm x relative error colorbar [%] Table 4.2: Effects of the temporal resolution over depth error [%]. uBathy results. Legend: m - monochromatic, p - polychromatic, b - baseline, s - structures, l - linear, f - FUNWAVE. 54 cBathy relative error [%] uBathy relative error [%] case\bathymetry baseline structures baseline structures funwave, monochromatic, 0.5 Hz, 0.25 ppm, x0.1 funwave, polychromatic, 0.5 Hz, 0.25 ppm, x0.1 funwave, monochromatic, 0.5 Hz, 0.25 ppm, x0.4 funwave, polychromatic, 0.5 Hz, 0.25 ppm, x0.4 funwave, monochromatic, 0.5 Hz, 0.25 ppm, x1.0 funwave, polychromatic, 0.5 Hz, 0.25 ppm, x1.0 relative error colorbar [%] Table 4.3: Effects of the bathymetry type over depth error [%]. cBathy results. Legend: m - monochromatic, p - polychromatic, b - baseline, s - structures, l - linear, f - FUNWAVE. 55 4.3 Discussion In general, uBathy presents better results than cBathy, specially for the linear cases (it is quite noticeable for the linear polychromatic ones). CBathy seems to get stronger but more localized error zones, while uBathy results present milder but more outspread errors. Another interesting fact is that the errors they present use to mimic the shape of the waves used for the inversion, specially for the polychromatic cases (see the bottom rows of Tables 4.1 and 4.2, corresponding to polychromatic waves). If uBathy and the modified cBathy were to be used in real conditions, the complexity of the incoming waves (this is, if the inversion case is monochromatic or polychromatic) and the amplitude of those waves will limit the cases where they can be used. The inversion can be skipped if the case is a monochromatic wave of great amplitude, or if the case is a polychromatic wave with composing amplitudes bigger than 15 cm (if the waves are monochromatic or not is easy to check using the video images, and the amplitude can be obtained from a buoy placed near the inversion domain). A great improvement would be to always perform the inversions, but adding a Kalman filter to mix their results. The information about the waves type and amplitude can be used in the weights used by the filter. Moreover, uBathy can be used in the cases of smaller amplitude, and cBathy in the cases of bigger ones, in order to obtain the best results. Finally, in order to quantify the general distribution of errors present in the inversions, the quartiles and the mean of pixels depth absolute error have been computed and plotted (Table 4.4 and Figure 4.3). The plots for the case of relative errors are also shown (Figure 4.2). The RMS95 can be used to compare the results obtained in this work with those from previous studies. The RMS95 obtained by uBathy in the linear cases is almost 10 cm. The RMS95 obtained by cBathy in the linear cases is between 10 cm and 20 cm approximately. For the cases with non-infinitesimal amplitude, the RMS95 errors depend strongly on the amplitude and the complexity of the incoming waves and on the bathymetry type, presenting a great variability. For both cBathy and uBathy, the RMS95 is somewhere between 10 cm and 40 cm. These errors are of the same order than those obtained by Holman et al. [2013] (RMS of 51 cm and 56 cm, original cBathy) and Rutten et al. [2017] (RMS between 34 cm and 1 m depending on depth, original cBathy), generally somehow smaller. It has to be noted that their studies used real data, but they applied a Kalman filter to the single bathymetry estimates. The errors stated correspond to those present in the filtered bathymetries. Taking into account the degree of improvement that the modified cBathy single video inversions present over the original cBathy (Figure 3.5), and also that the Kalman filter produces bathymetries whose errors are quite smaller than those coming from a single video, seems plausible to think that since our RMS errors 56 G. Wei, J.T. Kirby, and A. Sinha. Generation of waves in boussinesq models using a source function method. Coastal Engineering, 36:271–299, 1999. G. Simarro. Energy balance, wave shoaling and celerity in boussinesq-type wave propagation models. Ocean Model, 72:74–79, 2013. J. Yu and D.N. Slinn. Effect of wave-current interaction on rip currents. J. Geophys. Res., 108(C3), 2003. doi: 10.1029/2001JC001105. 63