Baptiste Mengual
email: baptiste.mengual@bw-cgc.fr

Xavier Bertin
email: xavier.bertin@univ-lr.fr

Florian Place

Marc Pezerat

Thibault Coulombier

Diogo Mendes

André Bustorff Fortunato

Wave-current interactions at the Tagus Estuary Mouth (Portugal) under storm wave conditions

Keywords: Wave-current interactions, storm waves, large estuary mouth, the Tagus Estuary

This study investigates interactions between waves, water levels and currents at the mouth of the second largest estuary in Europe (the Tagus Estuary, Portugal) under storm waves, combining field observations and a three-dimensional fully coupled wave-current modelling system. Tidal-induced water depth variations substantially modulate waves over the ebb shoal. During energetic conditions, low tide levels promote depth-limited wave breaking and energy transfer towards higher harmonics (triad interactions), which reduces wave heights and periods. Furthermore, for a given water level, tidal currents also influence wave propagation and drive strong modulations over shallow regions characterized by cross-channel current gradients. Flood currents change the mean wave direction by about 10-15° and tend to focus the wave energy flux towards coastal regions of the southern margin compared to a run without currents (20 to 30% increase of wave heights), while ebb currents reduce the wave heights. In addition, model results suggest that the saturation level associated with wave and current conditions at shallow locations may be close to the threshold where waves start to dissipate by whitecapping. At the peak of the storm, waves become a main driver of the circulation at the mouth scale, even in the 45-m deep main channel. Wave breaking acceleration over the ebb-shoal locally increases flood currents by 50 to 300% and reduces ebb currents by 20 to 50%.

Introduction

Inlets and estuaries concentrate many socio-economic and environmental issues such as the maintenance of navigation channels, the stability of adjacent coasts and the flooding of low-lying areas under extreme events, or the water quality and hydrologic characteristics which are crucial for the biodiversity. These natural systems are generally subject to the overlap of several forcings like waves, tide, wind and river discharge, which interact over complex bathymetries characterized by the presence of channels and shoals. Understanding the impact of wave-current interactions (WCI) in these environments is crucial to provide accurate predictions of waves, which largely influence or contribute to storm surges and coastal inundation (e.g. [START_REF] Bertin | The contribution of short-waves in storm surges: Two case studies in the Bay of Biscay[END_REF][START_REF] Fortunato | A numerical study of the February 15, 1941 storm in the Tagus estuary[END_REF], navigation hazards (e.g. [START_REF] Zippel | Surface wave breaking over sheared currents: Observations from the M outh of the C olumbia R iver[END_REF], water quality and nutrient exchanges (e.g. [START_REF] Delpey | Effects of waves on coastal water dispersion in a small estuarine bay[END_REF][START_REF] Chen | Effects of wave-current interaction on the Pearl River Estuary during Typhoon Hato[END_REF], or sediment transport and morphodynamics (e.g. [START_REF] Bertin | Morphodynamic Modeling of the Ancão Inlet, South Portugal[END_REF][START_REF] Dodet | Wave-current interactions in a wave-dominated tidal inlet[END_REF][START_REF] Fortunato | Sediment dynamics and morphological evolution in the Tagus Estuary inlet[END_REF]. WCI have been widely studied for several decades using various approaches including analytical solutions [START_REF] Phillips | The dynamics of the upper ocean[END_REF], field observations (e.g. [START_REF] Wolf | Some observations of wave-current interaction[END_REF][START_REF] Wargula | Wave-driven along-channel subtidal flows in a well-mixed ocean inlet[END_REF][START_REF] Zippel | Surface wave breaking over sheared currents: Observations from the M outh of the C olumbia R iver[END_REF], laboratory experiments (e.g. [START_REF] Chawla | Monochromatic and random wave breaking at blocking points[END_REF], phaseresolving models (e.g. [START_REF] Chen | Characteristics of wave breaking and blocking by spatially varying opposing currents[END_REF], or numerical modelling systems coupling a circulation model with a spectral wave model (e.g. [START_REF] Bertin | Morphodynamic Modeling of the Ancão Inlet, South Portugal[END_REF][START_REF] Olabarrieta | Wave-current interaction in Willapa Bay[END_REF][START_REF] Dodet | Wave-current interactions in a wave-dominated tidal inlet[END_REF][START_REF] Akan | On the dynamics of the Mouth of the Columbia River: Results from a three-dimensional fully coupled wavecurrent interaction model[END_REF]. Such modelling systems constitute valuable tools to discriminate and analyze separately the hydrodynamic effect of different physical processes, with less expensive computational times than phase-resolving models. Therefore, phase-averaged spectral wave models have been largely used to investigate WCI. While many modeling studies were performed by investigating separately the respective effects of waves on the mean circulation 5, while key points provided by this study regarding wave-current interactions are discussed in Section 6. Finally, the main conclusions are summarized in Section 7.

Study area and field campaign

Description of the study site

The Tagus Estuary, located on the west coast of Portugal, is the second largest estuary in Europe with a surface area of around 320 km 2 . This estuary is bordered by a metropolitan area of about 2 million inhabitants and combines many socio-economic challenges such as water quality, the presence of low-lying zones or the stability of the urbanised southern margin. The Atlantic Ocean is connected to a shallow tide-dominated basin through a 45 m-deep, 10 km-long and 2 km-wide tidal inlet cut into the bedrock (Figure 1). The continental shelf width is about 40 km in front of the TEM. The TEM is a semi-diurnal meso-tidal environment characterised by tidal ranges varying from 0.55 m to 3.86 m at the coast [START_REF] Guerreiro | Evolution of the hydrodynamics of the Tagus estuary (Portugal) in the 21st century[END_REF], and by a strong dominance of the ebb with currents reaching up to 2.5 m/s [START_REF] Fortunato | On the effect of tidal flats on the hydrodynamics of the Tagus estuary[END_REF]. The average discharge of the Tagus River is 336 m 3 /s, but can reach 2000 to 4000 m 3 /s in the winter [START_REF] Costa | River flow influence on the fish community of the Tagus estuary (Portugal)[END_REF][START_REF] Rodrigues | Assessment of a three-dimensional baroclinic circulation model of the Tagus estuary (Portugal)[END_REF], and even occasionally exceeds 10000 m 3 /s [START_REF] Salgueiro | Flood magnitudes in the Tagus River (Iberian Peninsula) and its stochastic relationship with daily North Atlantic Oscillation since mid-19th Century[END_REF]. The estuary is generally well-mixed given the low average river flow, but it can become partially mixed and even stratified when the river flow intensifies, in particular during neap tides [START_REF] Neves | Dynamics and hydrology of the Tagus estuary: results from in situ observations[END_REF][START_REF] Rodrigues | Assessment of a three-dimensional baroclinic circulation model of the Tagus estuary (Portugal)[END_REF]. The wave regime is dominated by long-period swells generated in the North Atlantic Ocean. During the winter, offshore mean wave conditions correspond to significant wave heights of 2.5 m, peak periods of 12.1 s and a mean wave direction of 305° [START_REF] Dodet | Wave climate variability in the North-East Atlantic Ocean over the last six decades[END_REF][START_REF] Mendes | Deep-water spectral wave steepness offshore mainland Portugal[END_REF]. Due to the Roca Cape to the northwest, the estuary mouth is partly sheltered from waves originating from the prevailing northwest direction but is fully exposed to waves coming from the southwest and the west, which can reach significant heights of 10 m during extreme storms [START_REF] Fortunato | A numerical study of the February 15, 1941 storm in the Tagus estuary[END_REF]. At the mouth, complex bed morphologies are found over ebb shoals, like the Bugio Bank (Figure 1b), with bed sediments mainly composed of marine medium sands [START_REF] Freire | Sedimentary characterization of Tagus estuarine beaches (Portugal)[END_REF]. For the past eight decades, the morphology of the TEM has been experiencing a significant evolution, in particular a strong erosion of the ebb shoal and the adjoining beaches [START_REF] Fortunato | Sediment dynamics and morphological evolution in the Tagus Estuary inlet[END_REF]. the SCHISM-WWM configuration, with its bathymetry, the locations of measuring stations (white stars), the computational grid, and isobaths (contours every 2 m from 0 to 14 m).

Field campaign and data processing

Three RBR™ pressure sensors and one 600 kHz Nortek ADCP (Acoustic Doppler Current Profiler) mounted with a pressure sensor were deployed at the TEM during one week (from the 16 th to 24 th November, 2019), during which offshore wave heights (Hm0) and peak periods (Tp) reached 6 m and 20 s, respectively (Figure 2). From offshore to nearshore locations (Figure 1b), sensors PS_offshore 38.645),38.67) and PS_Torrao (-9.247; 38.668) were respectively deployed at mean water depths of 10.6 m, 5.9 m and 3 m (Figure 1b). PS_offshore and PS_bank were fixed to anchors directly deployed on the seabed whereas PS_Torrao was fixed on a pillar, at 1.65 m above the seabed. The station PS_Torrao is located at the beach of the neighbourhood of Segundo Torrão, frequently subject to damages and inundations during storms. Continuous pressure measurements were made at a sampling frequency of 2 Hz. The ADCP (-9.26; 38.673; mean water depth of 10.24 m), was set in an upward-looking position with 0.50 m-thick cells, providing average current profiles every 30 minutes and 20-minute bursts of pressure measurements every hour (at 2 Hz). Unfortunately, ADCP measurements are only available over the first 1.5 days of the field campaign, due to a malicious act. To compute wave bulk parameters, pressure time series recorded at PS_offshore, PS_bank and PS_Torrao were split into 1 hour-long bursts, corrected from atmospheric pressure and tidal oscillations. The tidal signal was removed by applying a low-pass filter with a 1-hour window and pressure was converted to water depth under a hydrostatic assumption. Power density spectra associated to frequencies f were computed by applying a Fast Fourier Transform and by considering 10 Hanning-windowed segments (with an overlap of 50%), which results in 17 equivalent degrees of freedom with a frequency resolution of 0.003 Hz. Note that the number of equivalent degrees of freedom was estimated from the power spectral density, and was then reduced by 10% (specific to the case with 10 segments) according to the procedure described by [START_REF] Elgar | Bias of effective degrees of freedom of a spectrum[END_REF]. Then, the elevation spectra were reconstructed using the Transfer Function Method based on the linear wave theory (TFM; e.g. [START_REF] Bishop | Measuring waves with pressure transducers[END_REF] at the three stations, PS_offshore, PS_bank and PS_Torrao. The TFM involves wave numbers, computed from the linear dispersion relation, which is affected by the presence of ambient currents. The current effect was considered in the calculation of the wave number using currents simulated by the numerical model at each pressure sensor location, with a similar strategy as de [START_REF] De Wit | Characterizing Wave Shape Evolution on an Ebb-Tidal Shoal[END_REF]. The procedure is described in Appendix A. To avoid noise amplification, the TFM method requires the definition of an upper cut-off frequency, fmax, which was set to 0.3 Hz for all pressure sensors (in agreement with [START_REF] Inch | Observations of nearshore infragravity wave dynamics under high energy swell and wind-wave conditions[END_REF]. From each spectrum, wave parameters can be computed using the i-th moments, mi, as follows

𝑚𝑚 𝑖𝑖 = ∫ 𝑓𝑓 𝑖𝑖 𝐸𝐸(𝑓𝑓) 𝑓𝑓 𝑚𝑚𝑚𝑚𝑚𝑚 𝑓𝑓 𝑚𝑚𝑚𝑚𝑚𝑚

𝑑𝑑𝑓𝑓

(1) The integration of the spectral energy in Eq. ( 1) requires the definition of a lower cut-off frequency, fmin, in order to separate the energy band associated with short waves from the one of infragravity waves. According to the literature, fmin can be expressed as a function of the peak frequency, fp, which corresponds to the frequency where the maximum energy is found in the gravity band (e.g. [START_REF] Roelvink | Bar-generating cross-shore flow mechanisms on a beach[END_REF][START_REF] Oh | On the Separation Period Discriminating Gravity and Infragravity Waves off Gyeongpo Beach, Korea[END_REF]. Following [START_REF] Roelvink | Bar-generating cross-shore flow mechanisms on a beach[END_REF], who defined this lower cut-off frequency as half the peak frequency, fmin is computed here as 𝑓𝑓 𝑚𝑚𝑖𝑖𝑚𝑚 = max { 0.036 𝐻𝐻𝐻𝐻; min{0.5 × 𝑓𝑓 𝑝𝑝 ; 0.05 𝐻𝐻𝐻𝐻}} (2) In Eq. ( 2), fp is firstly computed between 0.04 and 0.3 Hz, and then updated according to the new fmin estimate. Although a fixed cut-off frequency is employed in most studies, an adaptive approach was required here as the incident peak period ranged from 6 and 20 s during the studied period. Finally, the significant wave height, Hm0, and the mean wave period, Tm02, are computed as follows 𝐻𝐻 𝑚𝑚0 = 4�𝑚𝑚 0

(3)

𝑇𝑇 𝑚𝑚02 = � 𝑚𝑚 0 𝑚𝑚 2 (4)
J o u r n a l P r e -p r o o f

Journal Pre-proof

In order to integrate bulk wave parameters within the same band and ensure consistent comparisons between sensors, fmin series computed at PS_offshore were applied to PS_bank and PS_Torrao.

The numerical modelling system

The modelling system is based on the full coupling, at the source code level, between the thirdgeneration spectral wave model Wind Wave Model of Roland et al. (2012, hereafter WWM), and the hydrodynamic core based on the Semi-Implicit Cross-scale Hydroscience Integrated System Model (hereafter SCHISM) of [START_REF] Zhang | Seamless cross-scale modeling with SCHISM[END_REF]. Both models share the same unstructured grid and domain decomposition.

3.1. Spectral wave model -WWM WWM simulates surface gravity waves generation, propagation and dissipation by solving the wave action equation (Komen et al., 1994) that reads:

𝜕𝜕𝜕𝜕 𝜕𝜕𝜕𝜕 + ∇ 𝒙𝒙 . (𝒙𝒙̇𝑁𝑁) + 𝜕𝜕(𝜎𝜎̇𝜕𝜕) 𝜕𝜕𝜎𝜎 + 𝜕𝜕�𝜃𝜃 ̇𝜕𝜕� 𝜕𝜕𝜃𝜃 = 1 𝜎𝜎 (𝑆𝑆 𝑖𝑖𝑚𝑚 + 𝑆𝑆 𝑚𝑚𝑛𝑛4 + 𝑆𝑆 𝑚𝑚𝑛𝑛3 + 𝑆𝑆 𝑑𝑑𝑑𝑑 + 𝑆𝑆 𝑏𝑏𝑏𝑏 + 𝑆𝑆 𝑏𝑏𝑓𝑓 )
(5) where t is the time, 𝜎𝜎 is the relative wave frequency (=2𝜋𝜋𝑓𝑓, with 𝑓𝑓 the wave frequency), 𝜃𝜃 is the wave direction, N is the wave action (= 𝐸𝐸(𝜎𝜎,𝜃𝜃) 𝜎𝜎 , 𝐸𝐸(𝜎𝜎, 𝜃𝜃) being the discrete variance density of the sea level elevation), ∇ 𝒙𝒙 is the horizontal gradient operator, and 𝒙𝒙̇, 𝜎𝜎̇, and 𝜃𝜃 ̇ are the propagation velocities in space, frequency and direction, respectively. WWM accounts for water depths and currents fields obtained from SCHISM, with 𝒙𝒙̇= 𝑪𝑪 𝒈𝒈 + 𝒖𝒖 � in Eq. ( 5), 𝑪𝑪 𝒈𝒈 being the wave group velocity vector (=𝑐𝑐 𝑔𝑔 (cos 𝜃𝜃 , sin 𝜃𝜃), with 𝑐𝑐 𝑔𝑔 the wave group velocity computed from the linear wave theory). The advection velocities in the different phase spaces include the effect of a "wave-weighted" current field 𝒖𝒖 � = (𝑢𝑢 �, 𝑣𝑣 �) that is computed according to [START_REF] Kirby | Surface waves on vertically sheared flows: approximate dispersion relations[END_REF], which enables to consider the circulation over a surface layer where waves are assumed to be kinematically active. The right-hand side of Eq. ( 5) details all the source terms, which correspond to the wind input (𝑆𝑆 𝑖𝑖𝑚𝑚 ), the nonlinear interaction in deep and shallow water (𝑆𝑆 𝑚𝑚𝑛𝑛4 and 𝑆𝑆 𝑚𝑚𝑛𝑛3 , respectively), the energy dissipation due to whitecapping (𝑆𝑆 𝑑𝑑𝑑𝑑 ), depth-limited breaking (𝑆𝑆 𝑏𝑏𝑏𝑏 ) and bottom friction (𝑆𝑆 𝑏𝑏𝑓𝑓 ). The nonlinear energy transfer in deep water (quads), 𝑆𝑆 𝑚𝑚𝑛𝑛4 , is approximated using the Discrete Interaction Approximation following [START_REF] Hasselmann | Computations and parameterizations of the nonlinear energy transfer in a gravity-wave specturm. Part II: Parameterizations of the nonlinear energy transfer for application in wave models[END_REF]. The nonlinear energy transfer in shallow water (triads), 𝑆𝑆 𝑚𝑚𝑛𝑛3 , has been prescribed following the Lump Triad Approximation introduced by [START_REF] Eldeberky | Nonlinear transformation of wave spectra in the nearshore[END_REF]equation 7.25), using a parameter 𝛼𝛼 adjusted to 0.35, which is consistent with the range of values proposed by the author. Both terms linked to wind input (𝑆𝑆 𝑖𝑖𝑚𝑚 ) and dissipation due to whitecapping (𝑆𝑆 𝑑𝑑𝑑𝑑 ) follow [START_REF] Ardhuin | Semiempirical Dissipation Source Functions for Ocean Waves. Part I: Definition, Calibration, and Validation[END_REF]. The 𝑆𝑆 𝑑𝑑𝑑𝑑 term is defined as (𝜎𝜎) 2 (max{𝐵𝐵(𝜎𝜎, 𝜃𝜃) -𝐵𝐵 𝑏𝑏 (𝜎𝜎) ; 0} 2 )𝑁𝑁(𝜎𝜎, 𝜃𝜃) + 𝑆𝑆 𝑏𝑏𝑏𝑏,𝑐𝑐𝑐𝑐 + 𝑆𝑆 𝜕𝜕𝑐𝑐𝑏𝑏𝑏𝑏 (6) where 𝐶𝐶 𝑑𝑑𝑑𝑑 𝑑𝑑𝑠𝑠𝜕𝜕 is a nondimensional constant of 2×10 -4 , 𝐵𝐵 𝑏𝑏 (𝜎𝜎) is a threshold, and 𝐵𝐵(𝜎𝜎, 𝜃𝜃) is the nondimensional energy level at each frequency and direction, also called saturation, which is defined as

𝑆𝑆 𝑑𝑑𝑑𝑑 (𝜎𝜎, 𝜃𝜃) = 𝜎𝜎 𝐶𝐶 𝑑𝑑𝑑𝑑 𝑑𝑑𝑚𝑚𝑠𝑠 𝐵𝐵 𝑟𝑟
𝐵𝐵(𝜎𝜎, 𝜃𝜃) = ∫ 𝑘𝑘 3 𝜃𝜃+∆ 𝜃𝜃 𝜃𝜃-∆ 𝜃𝜃 𝑐𝑐𝑐𝑐𝑠𝑠 𝑑𝑑 𝐵𝐵 (𝜃𝜃 -𝜃𝜃′)𝐸𝐸(𝜎𝜎, 𝜃𝜃′) 𝐶𝐶 𝑔𝑔 2𝜋𝜋 𝑑𝑑𝜃𝜃′ (
7) with k the mean wave number, and sB a constant set to 2. In [START_REF] Ardhuin | Semiempirical Dissipation Source Functions for Ocean Waves. Part I: Definition, Calibration, and Validation[END_REF], the threshold for the saturation Br is a constant (9×10 -4 ). A directional width, ∆ 𝜃𝜃 = 80°, is introduced in the saturation computation in order to account for different dissipation rates in the different directions. In Eq. ( 6), the term Sturb refers to wave-turbulence interactions [START_REF] Ardhuin | On the Interaction of Surface Waves and Upper Ocean Turbulence[END_REF] and Sbk,cu is a cumulative breaking term that represents the smoothing of small waves by big breakers [START_REF] Ardhuin | Observation and Estimation of Lagrangian, Stokes, and Eulerian Currents Induced by Wind and Waves at the Sea Surface[END_REF]. However, the sensitivity of model results to the 𝑆𝑆 𝑑𝑑𝑑𝑑 term will be further discussed by testing an alternative formulation. More specifically, the latter was modified in order to mimic observations showing pronounced energy dissipation in the high frequency part of spectra when waves faced intense and opposed currents. A dependency of the saturation Br threshold on the frequency, f, is introduced such as 𝐵𝐵 𝑏𝑏 (𝜎𝜎) = (𝐵𝐵 𝑏𝑏,𝐿𝐿𝐿𝐿 -𝐵𝐵 𝑏𝑏,𝐻𝐻𝐿𝐿 ) × 𝑒𝑒 𝐶𝐶 𝑏𝑏𝑟𝑟 .(𝑓𝑓 𝑐𝑐𝑟𝑟 -𝑓𝑓) + 𝐵𝐵 𝑏𝑏,𝐻𝐻𝐿𝐿 (8) In Eq. ( 8), Br,LF is the reference saturation threshold of 9×10 -4 proposed by [START_REF] Ardhuin | Semiempirical Dissipation Source Functions for Ocean Waves. Part I: Definition, Calibration, and Validation[END_REF], which is, in this case, associated with low frequencies. It is assumed that for frequencies larger than fcr, Br decreases exponentially, at a rate controlled by the parameter Cbr, towards a reduced value, Br,HF, associated with high frequencies (HF). This modification has been introduced as model/data comparison revealed a local underestimation of dissipation by whitecapping in the model, which will be discussed later. Values of fcr, Cbr, and Br,HF tested to assess the model sensitivity to the dissipation by whitecapping are detailed in section 3.4. The energy dissipation due to depth-limited wave breaking, Sbr, is computed according to the model of [START_REF] Baldock | Cross-shore hydrodynamics within an unsaturated surf zone[END_REF], as corrected by [START_REF] Janssen | A note on wave energy dissipation over steep beaches[END_REF], and by using the breaking index formulation of [START_REF] Ruessink | Calibration and verification of a parametric wave model on barred beaches[END_REF], which is a function of the dimensionless depth kp.h, kp being the peak wave number and h the water depth.

Lastly, the wave dissipation by bottom friction, Sbf, is computed in agreement with the empirical model of [START_REF] Hasselmann | Measurements of wind-wave growth and swell decay during the Joint North Sea Wave Project (JONSWAP)[END_REF] based on the JONSWAP experiments, with a dissipation coefficient of 0.038 m 2 .s -3 , which is adequate for swell waves.

3.2. Hydrodynamic model -SCHISM SCHISM, which evolved from SELFE [START_REF] Zhang | SELFE: A semi-implicit Eulerian-Lagrangian finite-element model for cross-scale ocean circulation[END_REF], solves the 3D Reynoldsaveraged Navier-Stokes equations under hydrostatic and Boussinesq assumptions on unstructured grids. SCHISM uses an Eulerian-Lagrangian Method combined to semi-implicit schemes to treat the advection term in momentum equations, which relaxes the numerical stability constraints and allows using large time steps (CFL numbers larger than one). Wave force terms are included in the momentum equations in order to account for 3D wave-induced circulations. Wave forces are computed following the vortex-force (VF) formalism as described by [START_REF] Bennis | On the coupling of wave and three-dimensional circulation models: Choice of theoretical framework, practical implementation and adiabatic tests[END_REF]. The VF implementation in SCHISM is described in [START_REF] Guérin | Impacts of wave-induced circulation in the surf zone on wave setup[END_REF]. Wave-induced breaking momentum is concentrated in the two upper layers below the surface, as proposed by [START_REF] Bennis | On the coupling of wave and three-dimensional circulation models: Choice of theoretical framework, practical implementation and adiabatic tests[END_REF]. Regarding turbulence, the model uses a closure based on the Generic Length Scale (GLS) turbulence model of [START_REF] Umlauf | A generic length-scale equation for geophysical turbulence models[END_REF], in a 𝑘𝑘 -𝜀𝜀 configuration [START_REF] Rodi | Turbulence Models and Their Application in Hydraulics[END_REF]. At the boundaries, the turbulent kinetic energy (TKE) and the mixing length (l) are specified as Dirichlet boundary conditions, and account for wave-enhanced turbulence. At the surface, the TKE is defined by accounting for both wind stress [START_REF] Pond | Introductory Dynamical Oceanography[END_REF] and vertical mixing due to wave breaking [START_REF] Moghimi | A direct comparison of a depthdependent Radiation stress formulation and a Vortex force formulation within a threedimensional coastal ocean model[END_REF]. According to [START_REF] Feddersen | Scaling surf zone turbulence[END_REF], 15% of the energy dissipated by wave breaking is effectively transformed into TKE. The length scale associated with the surface wave-enhanced turbulence is defined as a function of a surface roughness set to 0.6×Hm0 [START_REF] Terray | Estimates of kinetic energy dissipation under breaking waves[END_REF]. The wind stress is also used as a boundary condition for the internal Reynolds stress at the surface. At the bottom, the Reynolds stress is prescribed through a bottom stress that combines the effects of waves and currents [START_REF] Soulsby | Dynamics of marine sands: a manual for practical applications[END_REF], assuming a roughness length 𝐻𝐻 0 of 5 × 10 -4 m, which was the best compromise to reproduce vertical profiles of currents at the ADCP location (Section 4.2).

The Tagus Estuary configuration

The unstructured grid used for the Tagus Estuary is characterized by a spatial resolution varying from 500 m at its offshore open boundary to 25 m over shallow parts of the Bugio Bank and along adjacent beaches within surf zones (Figure 1). For the vertical discretization, 21 S-levels are considered with a refinement in upper and lower parts of the water column (𝜃𝜃 𝑏𝑏 = 1 and 𝜃𝜃 𝑓𝑓 = 3 in the formulation of [START_REF] Song | A Semi-implicit Ocean Circulation Model Using a Generalized Topography-Following Coordinate System[END_REF]). Both hydrodynamic and wave models use the same time step, here set to 10 s.

The tidal forcing is computed considering 21 constituents from the global tide model FES2014 [START_REF] Lyard | FES2014 global ocean tide atlas: design and performance[END_REF], linearly interpolated along the open boundary. The atmospheric forcing originates from the Climate Forecast System Reanalysis (CFSR; [START_REF] Saha | The NCEP Climate Forecast System Version 2[END_REF] with temporal and spatial resolutions of 3 hours and 0.2°, respectively. CFSR winds and atmospheric pressure series were compared against observations at the Nazaré Buoy (longitude=-9.54; latitude=39.51; depth=2000 m; location on Figure 1a). The accuracy of atmospheric reanalyses is characterized with the root mean square discrepancy (RMSD), the normalized RMSD (NRMSD), and the bias (BIAS). The wind speed is on average well predicted with a normalized root mean square discrepancy (hereinafter NRMSD) of 21.6%. Given weak river runoffs during our field campaign (average of 80 m 3 /s; maximum of 146 m 3 /s; source: https://snirh.apambiente.pt/), river discharge and baroclinic effects associated with temperature and salinity were neglected in numerical simulations. The spectral wave forcing originates from a 2-rank structured and nested configuration of the WaveWatchIII (WWIII) spectral wave model, forced by CFSR winds described above. The WWIII configuration is based on the TEST471 [START_REF] Ardhuin | Semiempirical Dissipation Source Functions for Ocean Waves. Part I: Definition, Calibration, and Validation[END_REF]WW3DG, 2019). The first rank covers the North Atlantic with a 20-km resolution. The second rank, forced at its open boundaries by the first one, encompasses the entire estuary bay with a 500 m resolution, in order to reproduce wave refraction around the Roca Cape (Figure 1). Both WWIII ranks use a spectral discretization of 36 frequencies (0.036 to 1 Hz) and 48 directions. At the Nazaré Buoy, significant wave heights and peak periods computed from WWIII show a very good agreement with the observations, with NRMSD of 8% and 13%, respectively (Figure 2). Finally, spectra from the second WWIII rank are interpolated along the open boundary of the SCHISM-WWM grid, and WWM is run by considering 24 frequencies ranging from 0.036 and 0.4 Hz, and 24 directions.

Numerical experiment

Wave transformations and wave-current interactions have been investigated through a set of 6 simulations. The reference simulation, Ref, considers a full coupling between hydrodynamic and wave models and includes all the physics of waves (i.e. all source terms), as described in section 3.1. To investigate the tidal modulation of waves obtained from Ref, two simulations are considered in the following analysis: Run 2 only includes variations of tide levels without current effects on waves, and Run 3 does not account for the effect of both water level oscillations and currents on waves. In order to evaluate the importance of wave-induced circulations in Ref, wave forces were ignored in the hydrodynamic model SCHISM in the simulation Run 4. Further simulations are dedicated to sensitivity analyses. First, while a constant saturation threshold Br is assumed in the whitecapping dissipation term in Ref (9×10 -4 , as suggested by [START_REF] Ardhuin | Semiempirical Dissipation Source Functions for Ocean Waves. Part I: Definition, Calibration, and Validation[END_REF]), an adaptive saturation threshold is considered in another simulation, Run 5, assuming an exponential decrease towards high frequencies (Cbr=30) from Br,LF=9×10 -4 to Br,HF=9×10 -5 beyond the frequency fcr=0.2 Hz (Eq. 8). Moreover, the implication of triad wave interactions on wave transformations was quantified by turning off the Snl3 term (Eq. 5) in simulation Run 6. Model configurations for the 6 numerical simulations are summarized in Table 1.

Simulation

Wave conditions and model validation at sensor locations

The model validation is described here for the reference simulation, Ref (see Section 3.4), in terms of water levels, wave bulk parameters and depth-dependent currents. A more thorough analysis of model results is then provided in section 5.

4.1. Water levels and wave bulk parameters Water levels are well reproduced by the model at PS_offshore, PS_bank and PS_Torrao, with NRMSD (RMSD normalized by the mean tidal range) of 3%, 4%, and 2.5%, respectively. At PS_offshore (Figure 3), measured significant wave heights, Hm0, vary between 0.5 and 1.5 m during the first half of the period ("calm" period) and then increase substantially during stormy conditions and reach 3.65 m. Wave heights are generally well reproduced by the model with a NRMSD of 15%. Nevertheless, the model tends to slightly overestimate Hm0 during "calm periods" (< 1.5 m), and peaks occurring at low tide under energetic wave conditions (> 2 m) are not reproduced. Mean wave periods, Tm02, obtained from pressure measurements range between 5 and 8 s during calm periods and between 8 and 10 s during the storm. Tm02 periods are well reproduced overall by the model with a NRMSD of 14%, despite a persistent bias of 0.7 s over the period. The discrete peak period, Tp, reaches up to 20 s during the storm and is well reproduced by the model with a NRMSD of 20% and a weak positive bias of 0.5 s. In more details, this larger error compared to other bulk parameters is mostly due to the presence of a bimodal sea state on the 17 th November where the local wind sea is underestimated by the model. If this period is discarded, the NRSMD drops to 12%. At PS_bank (Figure 4), measured wave heights range between 0.5 and 0.8 m during the calm period, and between 0.8 and 1.8 m during energetic conditions. Wave heights are strongly tidallymodulated, with a minimum at low tide and fluctuations ranging from 0.25 m to 1 m. Modelled Hm0 are reproduced with a NRMSD of 14%, with a good ability to capture tidal modulations, despite a slight but persistent underestimation on flood during energetic conditions. Tidal-induced modulations of measured Tm02 are also substantial (around +/-1.5 s) with values ranging between 5 and 10 s. Modelled Tm02 are well reproduced with a NRMSD of 10%, in spite of weaker tidalinduced fluctuations leading to both under-and over-estimations throughout the period.

Currents

At 1 meter above the bed, both zonal (U) and meridional (V) components of currents data from the ADCP are well reproduced by the model with NRMSD values of 25% and 32%, respectively (Figure 6b,c). Maximum currents occur during the flood and the ebb, with average magnitudes of 0.54 m/s and 0.67 m/s, respectively. The current flows towards the east-northeast during the flood and reverses during the ebb towards the west-southwest. At 8 m above the bed, the current direction is similar but its magnitude is around 30% higher (Figure 6d,e). Like near the seabed, the current is about 25% higher on ebb than on flood, with average values of 0.9 m/s and 0.7 m/s, respectively. At the surface, the model tends to overestimate the duration of maximum current phase associated with the flood for both components, resulting in a generally weaker agreement with observations (NRMSD of about 35%). Focusing on vertical profiles of currents at mid-flood and mid-ebb times (Figure 7), the agreement between observations and model results is generally good. NRMSD values range between 4.6% and 20.3% at mid-flood, and between 2.4% and 7.3% at mid-ebb. Although no measurements were available during this period, the comparison between our reference run and a simulation without wave forces suggests important differences during energetic wave conditions (from the 19 th of November at 22:50), with flood currents increased by 30% close to the surface.

Analysis of wave-tide-current interactions

The wave modulations caused by the tide are assessed through a comparison between Ref (reference physical setting and full coupling between SCHISM and WWM), Run 2 (no currents in WWM), and Run 3 (no elevations and no currents in WWM). Regarding model predictions from the reference run Ref, two simulations are included hereafter in order to discuss the importance of wave energy dissipation caused by whitecapping (Run 5 with an adaptive saturation threshold Br in Eq. 8), and of wave triad interactions (Run 6 without triads).

Impact of water level variations on short waves

5.1.1. Wave heights At PS_offshore, both observed and modelled wave heights only exhibit a very limited tidal modulation by water levels during calm periods because of its large water depth (10 m), as highlighted by the similarity between results obtained from Run 2 and Run 3 (Figure 3b).

At the shallower station PS_bank, the tidal signature on Hm0 is different, with, to first order, a positive correlation between Hm0 and the water depth. Focusing on high tide (HT) and low tide (LT) situations, when currents are the weakest, data provide evidence for larger Hm0 (+54%) during HT (Figure 4). Including water level variations without currents in the wave model (Run 2) enables to reproduce this modulation of Hm0 between LT and HT, which is completely missed otherwise (Run 3). In addition, similarities between model results from Ref and Run 2 on Figure 4 suggest that wave modulations are mostly controlled by changes in water levels, with only minor effects of currents. In Ref, Hm0 at HT are 58% higher than at LT. At PS_Torrao, similar patterns can be observed for Hm0 with even more pronounced trends: observed and modelled (simulation Run 2 without current effects) Hm0 at HT are 157% and 92% higher than at LT, respectively. However, as highlighted by the differences between Run 2 and Ref results, a substantial part of the modulation is due to currents at this location. In Ref, Hm0 at HT are 130% higher than at LT, which is closer to the observed ratio. This behaviour will be further examined in section 5.2. The distributions of wave heights provided by the model (Ref) throughout the period of interest are illustrated along a section crossing the Bugio Bank roughly in the alignment of measurement stations (Figure 8). The major role played by water level changes on depth-limited wave breaking and subsequent Hm0 modulations is clearly highlighted. During the energetic period, Hm0 at HT suffers a substantial decrease of 30% at the southwest edge of the ebb delta when the water depth is about 4 m (around X=3000 m on subplots (a) and (c) of Figure 8). At LT, the breaking point is shifted a few hundred metres offshore (i.e. towards PS_offshore) and the Hm0 decrease is very pronounced over the same region and reaches up to 75%. Therefore, the height of waves propagating over the Bugio Bank at HT is on average 50% higher than at LT. In addition, Hm0 at LT never exceeds 0.75 m at the coast. 5.1.2. Wave periods Coherently with Hm0 variations, observed wave periods do not exhibit significant tidal modulations at PS_offshore during calm periods (Figure 3c,d). Only small Tm02 differences correlated with tidal levels are highlighted by the model during the energetic period. Modelled Tm02 at HT are between 5 and 10% higher than at LT in Run 2 accounting for tide elevations, which is not the case in Run 3. At PS_bank, a pronounced tidal modulation of wave periods is observed. Focusing on HT/LT differences, measured Tm02 are on average 18% larger at HT (Figure 4c). By accounting for water level changes in WWM (Run 2), the model is able to reproduce a part of the tidal modulation with Tm02 at HT around 7% higher than at LT. At PS_Torrao, the sensor was generally not submerged at LT, making it difficult to highlight clear trends compared to the HT situation based on observations. However, coherently with PS_bank, measured Tm02 are on average 8% higher at HT (Figure 5c). Modelled Tm02 at HT are only 3% higher than at LT in Run 2. During the energetic period (between the 20 th and the 22 nd November), measured wave periods Tm02 decrease from PS_offshore to PS_bank (or PS_Torrao). Model results highlight that this trend can only be reproduced by considering triad wave interactions, which result in nonlinear energy transfers from low to high frequencies. Indeed, triad wave interactions are usually identified as a

J o u r n a l P r e -p r o o f

Journal Pre-proof key mechanism for energy transfers between wave frequencies in the nearshore region, that may cause substantial changes in wave characteristics (e.g. [START_REF] Elgar | Observations of bispectra of shoaling surface gravity waves[END_REF][START_REF] Beji | Experimental investigation of wave propagation over a bar[END_REF][START_REF] Herbers | Spectral Energy Balance of Breaking Waves within the Surf Zone[END_REF]Rusu and Soares, 2011;[START_REF] Cavaleri | Wave modelling in coastal and inner seas[END_REF]. Tm02 computed from run Run 6, that ignores triads, are almost similar at the three sensor locations and display a strong positive bias compared to the observations (not illustrated here). Focusing on a LT situation during the energetic period (the 20 th November at 3 pm), the wave spectrum derived from bottom pressure observation at PS_offshore provides evidence for this type of energy transfer with successive peaks obtained at fp (peak frequency) and 2×fp (Figure 9a). While Ref mimics the spectrum shape with the different energy peaks, Run 6 misses this trend and strongly overestimates Tm02 (by 70%). At PS_bank, the energy remains concentrated in the frequency band lower than 0.1 Hz in Run 6 with a Tm02 of 14.4 s, whereas the energy becomes more distributed over frequencies in data and Ref with Tm02 values of 5.7 s and 6.7 s, respectively (Figure 9b). Note that energy is also transferred to the third harmonic in observations (3×fp), which is not reproduced by the model in simulation Ref. This is further discussed in section 6.1. Focusing on successive mid-flood (MF) and mid-ebb (ME) situations for equivalent water depths enables to assess the influence of currents on wave heights and periods at the shallower locations. At PS_bank, observations do not provide evidence for a clear effect of currents on Hm0 and Tm02 when comparing successive MF and ME situations (Figure 4). At PS_Torrao, observations reveal that at MF, on average, Hm0 are 78% higher, and Tm02 are 11% lower than at ME (Figure 5). In simulation Ref, Hm0 and Tm02 at MF are 31% higher and 7% lower than at ME, respectively, thus in agreement with observations. Neglecting currents in Run 2 leads to similar Hm0 and Tm02 between MF and ME, and to substantial underestimations by 15-25% of maximum Hm0 occurring over tidal cycles during the energetic period. Wave spectra obtained from observations and simulations Ref and Run 2 at PS_Torrao clearly highlight the substantial underestimation of the wave energy in the model when currents are neglected, in particular during the flood (Figure 10a). Therefore, substantial current-induced modulations of wave parameters are superimposed on those controlled by water level changes. To understand the processes responsible for these current-induced modulations, spatial fields of wave heights and directions were compared between simulations Run 2 (without currents) and Ref (with currents) during two successive MF and ME situations characterized by similar offshore wave conditions (Figure 11). In Ref, flood currents enhance refraction and induce a clockwise rotation of waves of 10-15° in comparison with the simulation Run 2, over the region between PS_bank and PS_Torrao (Figure 11g). Consequently, more wave energy is focused towards PS_Torrao, with wave heights in Ref 19% higher than in Run 2 at mid-flood (Figure 11c,e). Note that this energy focusing reaches its maximum at the end of the flood, with waves heights 25 to 30% higher in the simulation accounting for currents (Ref). In contrast, ebb currents induce a counterclockwise rotation of waves of 10° (differences between Ref and Run 2 on Figure 11h), and reduce the wave energy reaching the region around PS_Torrao. Thus, Hm0 computed from Ref at PS_Torrao is 16% lower than in Run 2 at ME (Figure 11d,f). At a broader extent, circulations affect wave characteristics at the mouth scale, in particular Hm0, with different effects depending on the location (current exposure, water depth, sheltered areas and wave dissipation level). Figure 12 illustrates that the Hm0 decrease occurring between MF and ME is not specific to the station PS_Torrao but concerns large areas of the TEM. Indeed, over the eastern part of the bank, Hm0 is generally 10 to 40% lower during the ebb. To our knowledge, such a modulation of waves due to current effects on their propagation has never been described at the mouth of a large estuary. This aspect is further discussed in section 6.2. Besides, Hm0 at ME are not smaller than at MF over the entire mouth. In deeper areas like in the main channel, opposed currents during the ebb promote shoaling without increasing wave steepness enough to induce dissipation by whitecapping. As a result, Hm0 during ME are about 20-25% higher than during MF over these regions, which corroborates previous findings at the TEM (Rusu et al., 2011) or for other inlet systems (e.g. [START_REF] Elias | Validation of a coupled wave-flow model in a high-energy setting: The mouth of the Columbia River[END_REF][START_REF] Dodet | Wave-current interactions in a wave-dominated tidal inlet[END_REF][START_REF] Jia | Wave-current interaction in a river and wave dominant estuary: A seasonal contrast[END_REF][START_REF] Akan | On the dynamics of the Mouth of the Columbia River: Results from a three-dimensional fully coupled wavecurrent interaction model[END_REF]. In addition, as already reported in other studies (e.g. [START_REF] Olabarrieta | Wave-current interaction in Willapa Bay[END_REF][START_REF] Dodet | Wave-current interactions in a wave-dominated tidal inlet[END_REF][START_REF] Akan | On the dynamics of the Mouth of the Columbia River: Results from a three-dimensional fully coupled wavecurrent interaction model[END_REF], our results suggest that the strong wave focusing effect of the ebb jet in the main channel induces a redirection of wave energy from adjacent regions, where wave heights thus appear reduced during the ebb. Note that previous studies dedicated to interactions between waves and large-scale currents highlighted that pronounced wave height modulations could be induced by currents in jet area through reflection, refraction or trapping phenomena depending on their orientation with respect to wave directions (e.g. cases of the Agulhas current or the Gulf Steam; see [START_REF] Irvine | Extreme waves in the Agulhas-A case study in wave-current interaction[END_REF], Holthuijsen andTolman (1991), Kudryavtsev et al. (1995), Lavrenov (1998)). In particular, when currents are opposed to waves direction, trapping effect can lead to a J o u r n a l P r e -p r o o f Journal Pre-proof substantial focusing of wave energy in the jet region (mostly resulting from refraction of waves by currents). By using a third-generation spectral wave model, [START_REF] Holthuijsen | Effects of the Gulf Stream on ocean waves[END_REF] highlighted this phenomenon in the Gulf Stream region. Over the deep channel area, model results during the energetic peak of the period show that ebb currents tend to induce an anticlockwise rotation of wave directions (by a few degrees) to the west of the Bugio Bank (comparison between Hm0 fields of simulations Ref and Run 2 without current effects on waves; not illustrated here). This slight refraction of waves at the main channel entrance focuses wave energy in the jet area during the ebb. 13). During flood, currents computed from simulation Run 4, that does not include wave-induced forcing, are weak and oriented northward for water depths higher than 7 m at the south of the mouth (Figure 13a). Over the Bugio Bank, they progressively rotate towards the northeast according to the coastline orientation and reach their maximum, around 0.8 m/s, in the secondary flood channel in which the ADCP and PS_bank are located. Flood currents enter the main channel flowing towards the north-east with maximum velocities of 0.6 m/s. In Ref, when wave-induced circulations are considered, a noticeable change in the current direction is obtained over most of the estuary mouth, with a mean flow oriented according to the average wave direction, i.e. towards the north-east (Figure 13b). Specific circulations caused by waves can be noticed. Pronounced currents (around 0.6 m/s) develop in the shallow region located between PS_offshore and the southwestern border of the Bugio Bank, which corresponds to the offshore extension of the ebb delta. The model analysis of wave force terms involved in the momentum balance enabled to identify the wave breaking-induced acceleration (WBA) as the main contributor of these waveinduced currents. Indeed, during energetic conditions, the surf zone extends offshore and WBA induces this specific wave-induced circulation. Furthermore, a littoral drift is clearly visible along the Caparica Coast (adjacent beach of the southern margin, Figure 1b), which flows towards the northwest due to the obliquity of waves coming from the southwest (refraction over the Bugio Bank). In the secondary channel and over the southern part of the Bugio Bank, flood currents are significantly increased (+60% on average; Figure 13c) by WBA whereas, simultaneously, the entering flow in the main channel is reduced by 20%. During the ebb, waves coming from the southwest tend to deviate the tidal stream from the main channel southward. Thus, a counterclockwise circulation is generated around the ebb delta in simulation Ref (Figure 13e), that is not found in Run 4 (Figure 13d) where currents remain mainly oriented towards the south-southwest. The circulation influenced by waves in Ref exhibits an onshore orientation to the south of the Bugio Bank, and then turns towards the south-east along the 7-m isobath. Over the Bugio Bank, WBA substantially reduces the magnitude of ebb currents, in particular in the secondary channel (-20% on average, up to -50%; Figure 13f). In order to compensate for the influence of this opposed wave-induced circulation, the ebb tidal jet intensifies in the main channel (+20%). It should be reminded that MF and ME situations presented on figure 13 are characterized by intense tidal flows and energetic wave conditions. When Hm0 at PS_offshore becomes lower than 1 m, the contribution of waves to circulations vanishes because waves are too small to break on the ebb shoal (not illustrated). During HT and LT tidal levels, when tidal currents are weak, the entire mouth circulation can be driven by waves. During the storm peak, wave-induced circulation described a band extending from PS_offshore to the ADCP station, with currents ranging from 0.5 and 0.9 m/s (not illustrated here). At the ADCP station, the relevance of wave-induced circulations during energetic conditions is clearly highlighted, with substantial or even dominant contributions to currents between LT and MF levels (Figure 6). Indeed, the wave-induced circulation is more intense at LT over the southern border of the Bugio Bank, due to reduced water depths which promote wave breaking. Lastly, as recently highlighted at the mouth of other inlets (e.g. [START_REF] Akan | On the dynamics of the Mouth of the Columbia River: Results from a three-dimensional fully coupled wavecurrent interaction model[END_REF], wave-induced circulations in turn influence wave fields at the TEM (not illustrated here). In particular, waves tend to reinforce the ebb stream in the main channel, which promotes wave steepening and results in larger Hm0 (+10%). 3b). The model fails to reproduce this Hm0 increase during low tide levels associated with energetic conditions, even when currents are considered. At PS_offshore, located at a mean water depth of 10.6 m, changes in water levels between high tide and low tide can only explain small variations of Hm0 due to shoaling (around 3%). During this type of energetic conditions, satellite images show complex interference wave patterns over the offshore extension of the Bugio Bank (Figure 14), where PS_offshore is located. These observations suggest that wave propagation becomes complex over this region and may result from combined refraction and diffraction processes, which would tend to concentrate the wave energy at some locations, thereby increasing wave heights. The fact that the model fails to reproduce increased Hm0 at low tide could be explained by the fact that diffraction is not considered here. The comparison between observed and modelled PSD at low tide (Figure 9) showed triad interactions promote substantial energy transfers from the spectral peak to higher harmonics. However, in more details, energy is accurately transferred to the second (2×fp) but not to the third (3×fp) harmonic. This problem is inherent to the Lumped Triad Approximation of [START_REF] Eldeberky | Nonlinear transformation of wave spectra in the nearshore[END_REF] [START_REF] Booij | A distributed collinear triad approximation in SWAN[END_REF] and could partly explain why the model slightly underestimates the tidal modulation of Tm02. Moreover, the performance of the LTA is not optimal on complex bathymetries, such as in barred beaches [START_REF] Mendes | Infragravity wave energy changes on a dissipative barred beach: A numerical study[END_REF], and more research is needed to adequately account for triads in phase-averaged wave models. The model also underestimates the energy reduction associated with high frequencies during ebb. In addition, the tidal modulation of Tm02 at PS_bank or PS_Torrao, which generally shows that Tm02 increases during the ebb, is weaker than in the observations,. As ebb currents over the ebb delta can reach 1 m/s, we hypothesize that the drop of wave energy in the high frequency part of wave spectra observed along the coast during the ebb (e.g. Figure 10) is due to dissipation by whitecapping, as proposed in previous studies (e.g. [START_REF] Van Der Westhuysen | Nonlinear saturation-based whitecapping dissipation in SWAN for deep and shallow water[END_REF][START_REF] Ardhuin | Semiempirical Dissipation Source Functions for Ocean Waves. Part I: Definition, Calibration, and Validation[END_REF][START_REF] Van Der Westhuysen | Spectral modeling of wave dissipation on negative current gradients[END_REF][START_REF] Dodet | Wave-current interactions in a wave-dominated tidal inlet[END_REF]. In an additional simulation (Run 5), an adaptive saturation threshold Br was considered in the original formulation of [START_REF] Ardhuin | Semiempirical Dissipation Source Functions for Ocean Waves. Part I: Definition, Calibration, and Validation[END_REF], assuming an exponential decrease of the latter for f>0.2 Hz (HF). As illustrated on Figure 10b, the reduced Br values for HF result in sharper reductions of the wave energy during the ebb at PS_Torrao, in agreement with observations. Therefore, it may mean that, based on the original formulation that considers a constant Br, the saturation level is close but just below this threshold above which the whitecapping is activated (i.e. critical steepening). Since other studies provided evidence for overestimations of wave energy associated with high frequencies under moderate to intense current conditions (e.g. [START_REF] Bennis | Numerical modelling of three-dimensional wave-current interactions in complex environment: Application to Alderney Race[END_REF], specific attention should be paid to the whitecapping dissipation in future studies. In future research, more attention should be paid to non-linear interactions occurring when waves face intense countercurrents. Countercurrents promote wave steepening and subsequent dissipation by breaking, but also induce resonant interactions that strongly affect the non-linear evolution of waves, which results in substantial energy transfers and frequency downshift (e.g. [START_REF] Shugan | An analytical model of the evolution of a Stokes wave and its two Benjamin-Feir sidebands on nonuniform unidirectional current[END_REF]. Therefore, in addition to the possible inadequate formulation of the saturation threshold for whitecapping discussed above, the fact that these resonant interactions are not represented in spectral wave models could locally explain the discrepancies between wave spectra modelled and derived from field observations. In addition, the wave action equation solved by spectral wave models is not fully valid in areas such as the TEM, since it was derived for waves propagating in "slowly varying media" [START_REF] Bretherton | Wavetrains in inhomogeneous moving media[END_REF]. Hence, other approaches should probably be used to investigate these processes in detail.

Impact of waves on currents

J o u r n a l P r e -p r o o f

Journal Pre-proof 6.2. New insights on wave-current interactions Despite the potential limitation of the model regarding energy dissipation by whitecapping (section 6.1), a substantial part of wave modulations was identified to be driven by current-induced refraction over some regions of the TEM characterized by weak local circulations (including PS_Torrao). According to model results, this effect of currents on the propagation of waves locally contributes to 20-30% of the tidal modulation of wave heights, while tidal ranges were medium, suggesting larger values under spring tides. Flood currents enhance refraction and induce a clockwise rotation of waves by 10-15°, thereby focusing more wave energy towards the southern margin of the mouth, while ebb currents produce an opposite effect by reducing the energy reaching the coast. To our knowledge, such an effect of currents on the tidal modulation of waves has never been described before. In addition to well-known current effects on waves propagation and dissipation (e.g. review of [START_REF] Wolf | Some observations of wave-current interaction[END_REF], recent knowledge on wave-current interactions at the mouth of inlet systems mainly concerned wave focusing (e.g. [START_REF] Olabarrieta | Wave-current interaction in Willapa Bay[END_REF][START_REF] Dodet | Wave-current interactions in a wave-dominated tidal inlet[END_REF][START_REF] Akan | On the dynamics of the Mouth of the Columbia River: Results from a three-dimensional fully coupled wavecurrent interaction model[END_REF] and steepening due to opposing currents during the ebb (e.g. Rusu et al., 2011 ;[START_REF] Elias | Validation of a coupled wave-flow model in a high-energy setting: The mouth of the Columbia River[END_REF][START_REF] Dodet | Wave-current interactions in a wave-dominated tidal inlet[END_REF][START_REF] Jia | Wave-current interaction in a river and wave dominant estuary: A seasonal contrast[END_REF][START_REF] Akan | On the dynamics of the Mouth of the Columbia River: Results from a three-dimensional fully coupled wavecurrent interaction model[END_REF], and subsequent dissipation by whitecapping (e.g. [START_REF] Van Der Westhuysen | Spectral modeling of wave dissipation on negative current gradients[END_REF]. This study highlights that wave modulations due to current-induced refraction, a process previously identified between islands or on the inner shelf (e.g. Hopkins et al., 2006;[START_REF] Ardhuin | Numerical Wave Modeling in Conditions with Strong Currents: Dissipation, Refraction, and Relative Wind[END_REF], can also be relevant at the mouth of large estuaries. Besides, the literature on wave-induced circulations is mostly restricted to small and medium-size inlet systems (e.g. [START_REF] Bertin | Morphodynamic Modeling of the Ancão Inlet, South Portugal[END_REF][START_REF] Olabarrieta | Wave-current interaction in Willapa Bay[END_REF][START_REF] Wargula | Wave-driven along-channel subtidal flows in a well-mixed ocean inlet[END_REF][START_REF] Chen | Hydrodynamic and sediment transport modeling of New River Inlet (NC) under the interaction of tides and waves[END_REF][START_REF] Akan | On the dynamics of the Mouth of the Columbia River: Results from a three-dimensional fully coupled wavecurrent interaction model[END_REF], while their contribution in case of large estuaries remains mostly unexplored. Yet, [START_REF] Fortunato | A numerical study of the February 15, 1941 storm in the Tagus estuary[END_REF] showed that onshore directed waves forces resulting from wave breaking over the Tagus Ebb Delta could generate wave-induced setup reaching tens of centimeters inside the estuary during extreme events (1941 storm with offshore significant wave heights of 14 m). The present study further revealed that storm waves can also substantially impact the mean circulation, even at the scale of a wide and deep estuary mouth. Qualitatively, some similarities can be underlined with smaller inlet systems regarding circulation patterns (e.g. [START_REF] Olabarrieta | Wave-current interaction in Willapa Bay[END_REF][START_REF] Orescanin | Observations of wave effects on inlet circulation[END_REF][START_REF] Chen | Hydrodynamic and sediment transport modeling of New River Inlet (NC) under the interaction of tides and waves[END_REF][START_REF] Akan | On the dynamics of the Mouth of the Columbia River: Results from a three-dimensional fully coupled wavecurrent interaction model[END_REF], although the impact of short wave breaking is more pronounced in this study, especially in secondary channels (locally increased by a factor 3). In addition, according to [START_REF] Fortunato | A numerical study of the February 15, 1941 storm in the Tagus estuary[END_REF], the return period of the storm waves considered in this study is less than one year, with several occurrences during each winter. By considering extreme events with return periods of 10 years (offshore significant wave height Hs ≈ 10 m) or 100 years (Hs ≈ 15 m), we could expect that wave-induced circulations would substantially intensify and become fully dominant.

Conclusions and perspectives

Interactions between waves, currents and water levels have been assessed at the mouth of the Tagus Estuary (the second largest estuary in Europe) during storm wave conditions, by combining field observations and the application of a 3D fully-coupled wave-current modelling system. Three pressure sensors and one ADCP were deployed across the ebb delta at water depths ranging from 3 to 11 m. Wave-current interactions were firstly investigated at measurement stations, which enabled to ensure the model validity in terms of both waves and currents. Series of numerical simulations were performed over the entire estuary mouth in order to discriminate the effects of water levels and currents on wave fields on the one hand, and the influence of waves on circulations at different tidal phases on the other hand. The main conclusions and perspectives from this work are:

• As already reported at the mouth of other inlet systems, the combination between bathymetric features associated with the shallow ebb delta region and the mesotidal forcing plays a key role in the modulation of waves. During energetic conditions, low tide levels promote depth-limited wave breaking over the ebb shoal, which results in reduced wave heights shoreward (by 50% to more than 100% depending on the location). • Triad wave interactions associated with wave non-linearity developing by shallow water depth promote energy transfers from the spectral peaks to higher harmonics and thereby explain the observed decrease of the mean wave period Tm02 as the water depth is reduced.

In more details, the LTA approach used in this study fails to transfer energy to the third harmonic, which partly explains why the model underestimates the drop of Tm02 at low tide. More advanced approaches for triad modelling (e.g. [START_REF] Salmon | A consistent collinear triad approximation for operational wave models[END_REF] will have to be considered to see if they better predict energy transfers with complex sea states as in the TEM. • At the mouth, current-induced refraction appears as a major process explaining a substantial part of the modulation of wave heights (20-30%), never described in case of a large estuary. Flood currents change the mean wave direction by 10-15° and tend to concentrate the wave energy towards coastal regions of the southern margin, while an opposite effect is induced by ebb currents. On the contrary, in the deep main channel, ebb currents opposed to wave direction focus the wave energy through refraction and promote wave shoaling (Hm0 increased by 20%). • Regarding the current effect on wave dissipation over some regions of the ebb shoal, model-data comparison suggests that the saturation level is close but just below the threshold above which whitecapping starts to occur and that further developments are needed to better model wave dissipation in such conditions. • During energetic conditions, wave breaking-induced acceleration occurring over the ebb shoal substantially influences both the orientation and the magnitude of circulations at the estuary mouth and along adjacent coasts. Wave forces enhance (resp. reduce) tidal currents by 50 to 300% over the ebb shoal during the flood (resp. the ebb), leading to a relative decrease (resp. increase) of 25% of the tidal flow in the deep main channel. However, due to a malicious act, no current measurements were available under energetic wave conditions and these findings presently rely on modeling results. Although very challenging, future field campaigns will have to be carried out at the mouth of large estuary mouths under storm waves. • The influence of waves on circulations in turn affects wave fields, e.g. enhanced Hm0

increase at the main channel entrance during the ebb, demonstrating the complexity of interactions between waves and currents, and the interest of considering a fully coupled wave-current model. This study highlighted that complex interactions between waves and tidal currents can occur at the mouth of a large estuary, including substantial modulations of waves heights caused by currentinduced refraction and intense wave-induced circulations. Further research should be dedicated to extreme wave events, which appear challenging for both data acquisitions and numerical modelling. Pressure measurements from the ADCP have been processed by considering 20-minute-long bursts, corrected from atmospheric pressure and detrended. The effect of tidal currents on the reconstitution of elevation spectra is investigated through comparisons on wave bulk parameters Hm0 and Tm02 (see more details on their computation in section 2.2), as illustrated on Figure A1. The current effect becomes substantial during the flood and the ebb, when currents reach their maximum. As expected, flood currents tend to reduce Hm0 and increase Tm02, while ebb currents have opposite effects. Consistent corrections are obtained by considering currents from the ADCP or from the model, which underlines the relevance of the latter regarding hydrodynamics. Given their substantial impact on the modulation of mean wave parameters, tidal currents are included in the processing of pressure measurements at all stations, with a similar procedure than the one used by de [START_REF] De Wit | Characterizing Wave Shape Evolution on an Ebb-Tidal Shoal[END_REF]. Indeed, tidal currents provided by the model are used at the other measuring stations where current measurements are unfortunately not available, given its ability in describing tidal-induced circulations at the Tagus Estuary Mouth.

Figure 1 .

 1 Figure 1. (a) Bathymetric contours (blue isobaths) associated with the large-scale rank of the wave model WaveWatchIII (WWIII), on which is superimposed the extent and the bathymetry of the second WWIII rank (Rank 2), forced by the large-scale rank along its open boundary. On (a), the brown contour delimits the SCHISM-WWM unstructured grid forced at its open boundary (dotted line) by wave spectra from Rank 2. (b) Zoom over the TEM for

Figure 2 .

 2 Figure 2. Comparisons between observed (black dots) and modelled wave parameters (thick solid line) at the Nazaré Buoy (see location on Figure 1a): (a) significant wave height Hm0, (b) mean wave period Tm02, and (c) mean wave direction Mwd. Model predictions are computed with the WaveWatchIII model (Rank 1).

Figure 3 .

 3 Figure 3. Comparisons of sea surface elevation (a), significant wave height Hm0 (b), mean wave period Tm02 (c) and wave peak period Tp (d) at PS_offshore station (see location on Figure 1b) between data and model results from simulations Ref, Run 2 (no currents) and Run 3 (no elevations and no currents). RMSD, NRMSD and BIAS values indicated on each subplot refer to simulation Ref.

Figure 4 .

 4 Figure 4. Comparisons of sea surface elevation (a), significant wave height Hm0 (b), and mean wave period Tm02 (c) at PS_bank station (see location on Figure 1b) between data and model results from simulations Ref, Run 2 (no currents) and Run 3 (no elevations and no currents). RMSD, NRMSD and BIAS values indicated on each subplot refer to simulation Ref.

Figure 5 .

 5 Figure 5. Comparisons of sea surface elevation (a), significant wave height Hm0 (b), and mean wave period Tm02 (c) at PS_Torrao station (see location on Figure 1b) between data and model results from simulations Ref, Run 2 (no currents) and Run 3 (no elevations and no currents). RMSD, NRMSD and BIAS values indicated on each subplot refer to simulation Ref. Thicker vertical ticks refer to specific dates used in the following analyses.

Figure 6 .Figure 7 .

 67 Figure 6. Comparisons of ADCP data and model results from simulations Ref and Run 4 (no wave forces in SCHISM) in terms of sea surface elevation (a; around mean sea level), and zonal (U) and meridional (V) components of currents at 1 m above the bed (on b and c, respectively) and 8 m above the bed (on d and e, respectively). Statistical parameters RMSD, NRMSD and BIAS refer to the Ref accuracy with respect to observations.

Figure 8 .

 8 Figure 8. (a) Spatio-temporal variations of significant wave heights, Hm0 (m), computed from simulation Ref along a section crossing the Bugio Bank and fitting the sensor positions (black circles) and the mean direction of waves, as shown on (b). On (a) temporal variations of sea surface elevation are superimposed (white dashed line; top abscissa axis). The bathymetry along the section is illustrated on (c).

Figure 9 .

 9 Figure 9. Power spectral density (PSD) as a function of normalized frequency (by fp,data=0.058 Hz) obtained from pressure measurements, and simulations Ref and Run 6 at PS_offshore (a) and PS_bank (b) during a low tide situationoccurring at the storm peak (the 20 th of November at 3:10pm). On (a), the error bar refers to the 95% interval of confidence of the PSD[START_REF] Bendat | Random Data Analysis and Measurement Procedures[END_REF]).

Figure 10 .

 10 Figure 10. Power spectral density (PSD) obtained from pressure measurements, and simulations Ref, Run 2 (no currents) and Run 5 (adaptive whitecapping) at PS_Torrao during successive mid-flood (a) and mid-ebb (b) situations, the 21 st of November at 6:21 and 12:56, respectively (see the corresponding thick vertical ticks on Figure 5).

Figure 11 .

 11 Figure 11. Spatial distributions of depth-averaged currents, dav, at successive mid-flood (a) and mid-ebb (b) situations during the storm peak and the corresponding fields of significant wave height, Hm0, from simulations (1) Ref (with currents) and (2) Run 2 (without currents) at mid-flood, (on (c) and (e), respectively), and at mid-ebb, (on (d) and (f), respectively) (see the corresponding thick vertical ticks associated with these specific dates on Figure 5). Changes in the mean wave direction between Run 2 and Ref (1-2) are illustrated at mid-flood and mid-ebb on (g) and (h), respectively.

Figure 13 .

 13 Figure 13. Spatial distributions of depth-averaged currents, dav in m/s, at successive mid-flood (MF) and mid-ebb (ME) situations during the storm peak, obtained from simulations (1) Run 4 [no wave forces in SCHISM] (on (a) and (d), respectively) and (2) Ref (on (b) and (e), respectively). The increasing/decreasing trends of dav between Run 4 and Ref at MF and ME ([2-1]/1) are illustrated on (c) and (f), respectively.

1 .

 1 Model predictive skills and limitations After the arrival of the large swell on the 20/11 (Hm0 larger than 2 m with Tp over 20 s), wave heights measured at PS_offshore increase by +35% at low tide in comparison with the high tide situation (see low tides of the 20/11 at 3pm and the 21/11 at 3h30am on Figure

Figure 14 .

 14 Figure14. Satellite image (Sentinel mission) at the Tagus Estuary Mouth, the 18 th April of 2018, with a zoom provided over the region where the sensor PS_offshore is located (dashed white lines depict some wave crests). On this date, offshore conditions at the Nazaré Buoy (location on Figure1a) were energetic and close to those associated with the

Figure

  Figure A1. (a) Water elevations measured at the ADCP station (see location on Figure 1b). Temporal series of Hm0 (b) and Tm02 (c) obtained without current effect (solid line), or by including measured (dashed line) or modelled (dashed-dotted line) currents in the wave dispersion relation, with the corresponding zonal (U) and meridional (V) components of currents illustrated on (d) and (e), respectively.

Table 1 .

 1 Model configurations for the 6 numerical simulations.

		Current effect	Water level	Wave	Adaptive	Wave
		on waves?	effect on	forces?	whitecapping	triads
			waves?		threshold?	(𝑺𝑺 𝒏𝒏𝒏𝒏𝒏𝒏 )?
	Ref	Yes	Yes	Yes	No	Yes
	Run 2	No	Yes	Yes	No	Yes
	Run 3	No	No	Yes	No	Yes
	Run 4	Yes	Yes	No	No	Yes
	Run 5	Yes	Yes	Yes	Yes	Yes
	Run 6	Yes	Yes	Yes	No	No

Acknowledgments

This study was funded by the Fondation de France and Fondation Edouard et Geneviève Buffard.

Authors greatly acknowledge other contributors involved in the collaborative project "Nouveaux Commanditaires Science", including Livio Riboli-Sasco (project mediator; Atelier des Jours à Venir), João Cão (Center for Philosophy of Sciences, University of Lisbon) and Tatiana Arquizan (Canto do Curió Cultural Association, Lisbon), who initiated and managed the project in collaboration with local populations. Inhabitants from Segundo Torrão and Cova do Vapor are deeply thanked for their support on the field, especially the fisherman Toni Graça who provided a boat and his site experience during field campaigns. Bathymetric data were obtained under the COSMO Programme -Coastal Monitoring Programme of Continental Portugal, of the Portuguese Environment Agency, co-funded by the Operational Program for Sustainability and Efficiency in the Use of Resources (POSEUR). These data were downloaded on April 2019 from https://cosmo.apambiente.pt. Lastly, XB, ABF and DM were supported by the INLEX project, funded by the French ANR and the Portuguese FCT (project 40791ZC).

Appendix A. Solving the wave dispersion relation with current effect

Energy density spectra (PSD) obtained from pressure measurements by applying Fast Fourier Transforms need to be converted in elevation spectra E(f). A Transfer Function Method based on the linear wave theory (e.g. [START_REF] Bishop | Measuring waves with pressure transducers[END_REF]) is used at each frequency f such as

J o u r n a l P r e -p r o o f

Journal Pre-proof

where hsensor is the sensor height above the bottom, h is the water depth, and k is the wave number computed from the linear wave theory. The dispersion relation from the linear wave theory reads

3) where 𝜎𝜎 is the relative angular frequency. In the presence of intense currents, k can be substantially modulated and thus requires a correction to ensure the relevance of elevation spectra. First, the wave number k has to be computed without current-wave interaction. The logarithmic matching method of [START_REF] Guo | Simple and explicit solution of wave dispersion equation[END_REF] has been applied to Eq. (A.3) as follows

where 𝜔𝜔 is the absolute angular frequency (=2𝜋𝜋𝑓𝑓; in rad/s), g is the gravitational acceleration, and 𝛽𝛽 is a shape parameter set at 2.4908. According to [START_REF] Sanchez | wavenumber.m. MATLAB Central File Exchange[END_REF], a wave number accounting for the current, 𝑘𝑘 𝑐𝑐𝑐𝑐𝑏𝑏,0 , can be computed as 𝑘𝑘 𝑐𝑐𝑐𝑐𝑏𝑏,0 = 0.3𝑘𝑘 + 0.7(𝜔𝜔-𝑏𝑏𝑘𝑘) 2 𝑔𝑔 tanh(𝑏𝑏ℎ) (A.6) where U is the current velocity in the wave direction. Finally, a Newton-Raphson iterative method (10 iterations considered here; Eq. A.7) is applied to improve the accuracy of the final solution by defining the initial k value, 𝑘𝑘 𝑖𝑖=0 , as 𝑘𝑘 𝑐𝑐𝑐𝑐𝑏𝑏,0 .

Declaration of interests

The authors declare that they have no known competng fnancial interests or personal relatonships ☒ that could have appeared to influence the work reported in this paper.

The authors declare the following fnancial interests/personal relatonships which may be considered ☐ as potental competng interests:


Jen-Cheng Hou

Aileen Mcgonigal

Fabrice Bartolomei

Monique Thonnat

A SELF-SUPERVISED PRE-TRAINING FRAMEWORK FOR VISION-BASED SEIZURE CLASSIFICATION

Keywords: Seizure Video Analysis, Self-Supervised Learning, Computer Vision, Deep Learning

Seizure events feature temporary abnormalities in muscle control or movements. They are usually caused by excessive neuronal activities in the brain, and are called epileptic seizures (ES). Nevertheless, not all seizures are epileptic in origin. Some are caused by psychological reasons, and such type of seizures are called psychogenic non-epileptic seizures (PNES). We propose a method to classify ES and PNES based on clinical signs in the seizure videos. In particular, inspired by BERT, we propose a Transformer-based framework that pre-trains on large unlabeled clinical videos, and then we fine-tune the pre-trained model for seizure classification with a minimum modification. We conduct a leave-one-subjectout (LOSO) validation on our dataset. The F1-score and accuracy are 0.82 and 0.75, respectively. To our knowledge, the proposed approach is the first attempt to use large unannotated data and learn useful representations for downstream tasks in the field of video based seizure analysis.

INTRODUCTION

Epilepsy is one of the most prevalent neurological disorders, affecting nearly 1% of the population worldwide. It is characterized by recurrent seizures, which are caused by abnormal, excessive neuronal activity in the brain [START_REF] Fisher | Epileptic seizures and epilepsy: Definitions proposed by the international league against epilepsy (ILAE) and the international bureau for epilepsy (IBE)[END_REF]. Nevertheless, not all seizures are epileptic in origin. Some are caused by psychological reasons, and such type of seizures are called psychogenic non-epileptic seizures (PNES), which are not associated with an epileptic discharge. To determine if a seizure is caused by epileptic discharges, Video-EEG monitoring is used to check the existence of simultaneous culprit brain EEG rhythms during the seizure. Despite the different cause of epileptic seizures (ES) and PNES, these two types of seizure could be similar in terms of the semiology, i.e. the clinical signs. Even for experienced neurologists, it could be challenging sometimes for them to correctly distinguish them. In addition, the evaluation could be subject to interobserver variability. Hence, a computer-aided diagnosis is naturally considered as a way to improve the quality of the assessment. Deep learning is a promising approach to analyze seizure videos given its ability to tackle different complex problems, such as computer vision [START_REF] Voulodimos | Deep learning for computer vision: A brief review[END_REF], speech recognition [START_REF] Nassif | Speech recognition using deep neural networks: A systematic review[END_REF], and natural language processing (NLP) [START_REF] Torfi | Natural language processing advancements by deep learning: A survey[END_REF]. Nevertheless, deep learning usually requires a large volume of annotated data for training, and in medical domains, large labeled data is usually costly to get. Inspired by BERT [START_REF] Devlin | BERT: Pre-training of deep bidirectional transformers for language understanding[END_REF], a self-supervised learning (SSL) framework using large unlabeled data to learn useful features for downstream tasks, we investigate if such paradigm can be applied into vision-based seizure analysis. Specifically, we collect voluminous unlabeled data for pretraining a Transformer model [START_REF] Vaswani | Attention is all you need[END_REF], and fine-tune the pretrained model for seizure classification (ES v.s. PNES). The unlabeled data for pre-training are clinical videos without labels, and we call them as "contextual videos". The contextual videos are recorded in the EEG-Video monitoring unit, as like the labeled seizure videos. They contain daily behaviors of patients and possibly other associated people in the unit. The videos are expected to provide visual information of the context where seizures are recorded. Such data is easily accessible and thus suitable for SSL-based pre-training. We pre-train the encoder of Transformer with a denoising objective, where the input video is corrupted and the model aims to recover the visual features of the original frame sequence. The learning objective is inspired by BART [START_REF] Lewis | BART: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension[END_REF], a denoising sequence-to-sequence model for NLP. In our study, after pretrained on the contextual videos, the model is fine-tuned for classification, where the input video is not corrupted. To our knowledge, the proposed approach is the first attempt to use large unannotated data for learning useful representations for downstream tasks in the field of video based seizure analysis. We consider it an inevitable trend for medical applications, as large-scale annotations for medical data are usually difficult to obtain.

RELATED WORK

Although the incentive to use deep learning for seizure video analysis given its capability in computer vision is natural, studies on the topic are still very limited compared to those using EEG signals. Karácsony et al. [START_REF] Karacsony | A deep learning architecture for epileptic seizure classification based on object and action recognition[END_REF] use pre-trained spatiotemporal features along with a long short-term memory (LSTM) classifier to distinguish temporal lobe epilepsy (TLE) and frontal lobe epilepsy (FLE). Ahmedt-Aristizabal et. al. [START_REF] Ahmedt-Aristizabal | A hierarchical multimodal system for motion analysis in patients with epilepsy[END_REF][START_REF] Ahmedt-Aristizabal | Deep motion analysis for epileptic seizure classification[END_REF] propose multi-modal approaches to classify patients with mesial temporal lobe (MTLE) and extra-temporal lobe (ETLE) epilepsy, with a focus on facial expressions and pose dynamics. The approaches are based on convolutional neural networks (CNN) and LSTM. Achilles et. al [START_REF] Achilles | Convolutional neural networks for real-time epileptic seizure detection[END_REF] use CNN to analyze infrared and depth videos for epilepsy classification, however the method does not leverage temporal consistency. To distinguish ES from PNES, Ahmedt-Aristizabal et. al. [START_REF] Ahmedt-Aristizabal | Understanding patients' behavior: Visionbased analysis of seizure disorders[END_REF] and Hou et al. [START_REF] Hou | A multi-stream approach for seizure classification with knowledge distillation[END_REF] feed both appearance and keypoints (e.g. joint locations) into neural nets. Nevertheless, with the inclusion of joint information, the performance may be vulnerable to conditions where joint estimation are poorly performed, which is not rare due to the frequent occlusion occurred in seizure videos. In this study, we attempt to use only appearance for comparable results on the same task. Recent research utilizing large data via pre-training Transformer for medical applications are mainly related to visionand-language (VL) learning. Moon et al. [START_REF] Moon | Multi-modal understanding and generation for medical images and text via vision-language pre-training[END_REF] pre-trains a Transformer-based model on aligned X-ray images and associated reports for learning joint VL representations in the medical domain. The downstream tasks include both comprehension and generation tasks. Li et al. [START_REF] Li | A comparison of pretrained vision-and-language models for multimodal representation learning across medical images and reports[END_REF] and Monajatipoor et al. [START_REF] Monajatipoor | Berthop: An effective vision-and-language model for chest x-ray disease diagnosis[END_REF] use off-the-shelf pre-trained VL models, whose VL data for pre-training are not medical ones, to directly learn multimodal representation on radiographs and associated reports. Our work introduces the Transformer-based pre-training paradigm into vision-based seizure analysis, and we consider it a promising way to benefit from large unannotated data in the field.

APPROACH

Data collection

The contextual video dataset

Here we introduce the clinical videos used for pre-training. Each patient stays one week in the epilepsy monitoring units (EMUs) of Marseille University Hospital where both Video and EEG monitoring are performed. So there are hundreds of hours of video recordings for each patient. If seizures occurs during the session, the medical staff will identify and extract the video segments afterward, and then save them in the database of the hospital. As for parts where no seizure events are involved, these recordings will be erased weeks later, because they could be bulky for storage yet not informative in terms of medical viewpoints. Nevertheless, in terms of deep learning, these 'meaningless' seizure-free videos might be useful. The reason is that they can provide the visual information of the surroundings/environments of how seizures are captured. In addition, Table 1. Some statistics of our seizure video dataset.

we can have a large quantity of them, and the mainstream deep learning/machine learning models usually favors big data. Given that, we intentionally collected more than 1000 hours seizure-free videos, and we call them as 'contextual videos' in this research. The behavior in these contextual videos can be as diverse and natural as those in daily routines, such as eating, sleeping, chatting with their families, and interaction with clinicians. The recording conditions include both daytime and night. Some selected samples are shown in Fig. 1.

The seizure video dataset

Our seizure videos consist of ES and PNES. After segmenting out each seizure for a new video clip, we saved the new clip as its original format. We then converted the trimmed clips into image sequences for each clip at a frame rate of 25 frames per second, while keeping the resolution unchanged. We resize the aspect ratio until the frames were fed into the developed models. Table . 1 shows some statistics of our seizure video dataset.

Pre-training and fine-tuning the model

Inspired by BART [START_REF] Lewis | BART: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension[END_REF], another Transformer-based SSL model for NLP, which corrupts input text with an arbitrary noising function and makes Transformer to reconstruct the original text, we include this concept of denoising objective into our model in the pre-training phase, as shown in Fig. 2. From the contextual video dataset D c , for each video V c ∈ D c , we have ordered image sequence as V c = (m 1 c , . . . , m K c ). Two noising functions are applied on V c . We change the sequence ordering by permuting V c , and then randomly mask out some frames, resulting in a noised version of V c , denoted as V c . The pre-training objective is to regress the Transformer output of each frame in V c to the visual features of V c . The L2 regression loss is formulated as:

L(θ) = E vc∼Dc K i=1 h θ ( v c (i) ) -r(v (i) c ) 2 2 ( 1
)
Where θ is the trainable parameters of the Transformer, and its output is expressed as h θ . We take ResNet-152 [START_REF] He | Deep residual learning for image recognition[END_REF] as our CNN backbone to generate visual features. The ResNet-152 is pre-trained on ImageNet [START_REF] Deng | ImageNet: A Large-Scale Hierarchical Image Database[END_REF], and we remove the last classification layer to generate a 2048-d feature. We denote it as r as the function for frame descriptor. After pre-training the Transformer on the contextual video dataset D c with the defined objective loss as equation 1, we add a fully-connected layer (FC) on top of our pre-trained Transformer for classification, as shown in Fig. 3. Then finetune the whole model on the target dataset D s , which contains seizure videos for seizure type classification. For each seizure video V s ∈ D s , we have an uncorrupted image sequence as input to Transformer as V s = (m 1 s , . . . , m N s ), with the corresponding binary seizure type labels y s ∈ L. In the fine-tuning phase, the seizure classification task is optimized based on the standard binary cross-entropy loss as

L CE = E vs∼Ds (y s • log(Sof tmax(F C(h θ (v s ))))+ (1 -y s ) • log(1 -Sof tmax(F C(h θ (v s )))))
(2)

EXPERIMENTATION

In this section, we give the details of the implementation of the experimentation.

Dataset and pre-processing

Specification of the Transformer

Regarding the specification of the Transformer used in this work, the number of attention head h is 8. Model dimension d model is set as 1024. The maximum position is set as 256.

The number of encoder layer is 6. The number of total trainable parameters is about 78M.

Training details

We pre-train the Transformer for 60 epochs. The initial learning rate is 0.01, with a linearly decreased scheduler. Weight decay for pre-training is set as 0.0001. The pre-training process takes 670 gpu-hours (roughly 14 hours on 48 V100 gpus across 6 nodes). We adopt AdamW [START_REF] Loshchilov | Decoupled weight decay regularization[END_REF] as the optimizer.

As for fine-tuning the Transformer, we train it for 50 epochs. Batch size is 16. Except for setting the initial learning rate as 0.005, other training settings are the same as those in the pre-training phase. We test the whole videos by temporally averaging the predictive results. A dropout rate of 0.5 in the final classifier layer is set. In addition, to mitigate the imbalanced dataset, a class weight (reciprocal of the number of video clips per class) is added in the cross entropy loss.

The implementation of the Transformer model is based on the Huggingface library [START_REF] Wolf | Huggingface's transformers: State-of-the-art natural language processing[END_REF].

Experimental results

We perform a leave-one-subject-out (LOSO) validation. The F1-score and the accuracy are 0.82 and 0.75, respectively. As shown in Table 2, our results are comparable to other state-ofthe-art seizure classification tasks on distinguishing ES from PNES. In particular, the dataset used in [START_REF] Hou | A multi-stream approach for seizure classification with knowledge distillation[END_REF] is the subset of the one used in this study. We gain a performance boost while including more seizure videos. This indicates our proposed Transformer-based pre-training approach can learn robust and generalizable features for the downstream task. The videowise confusion matrix is shown in Table 3. Confusion matrix of the video-wise classification results by leave-one-subject-out validation.

CONCLUSION

In this study, we propose a Transformer-based self-supervised pre-training framework for learning features suitable for the downstream task, i.e. classifying ES and PNES videos. The paradigm aligns with the research direction of self-supervised pre-training that takes advantage of large unannotated data and learns useful representations from it for downstream tasks. This may be especially favored for medical applications where data annotations are usually costly. In our work, a Transformer-based model is pre-trained on a large volume of contextual videos with denoising pre-training objectives. By simply fine-tuning the pre-trained model with a minimum model modification, the experimental classification results can compete with methods from other state-of-the-art works for the same task. To our knowledge, this is the first deep learning work exploiting large unlabeled data for facilitating vision-based seizure analysis. We hope our study can inspire the research community regarding seizure video analysis to rethink how we can benefit from large unannotated data.

Fig. 1 .

 1 Fig. 1. The contextual videos used for pre-training cover the daily behaviors of patients in the Video-EEG monitoring unit, except for the onset seizure events. They include (a) eating food, (b) interaction with their family, (c) sleeping, (d) using laptops/smartphones, (e) being checked by the clinical staff. The empty settings are possibly recorded if the patients leave the room, like (f). Night conditions are also included. Type ES PNES Number of patients 52 29 Number of seizures 235 48 Average seizure duration [sec] 45.4 52.9 Min. seizure duration [sec] 7.5 12.1 Max. seizure duration [sec] 150.2 119.4

Fig. 2 .

 2 Fig.2. SSL-based pretraining on contextual videos: The input sequence is the "noised" version of the target sequence, where random frames are masked out and permutation is applied. We pretrain the encoder of Transformer to reconstruct the corresponding visual features.

Fig. 3 .

 3 Fig. 3. Finetuning phase for seizure type classification: In the fine-tuning phase, an uncorrupted seizure video sequence is fed into the pretrained model. A classification head, i.e. fully-connected layer, is added on top of the pretrained model for the classification task.

Fig. 4 .

 4 Fig. 4. Patients in image frames are detected and cropped before feeding into the pre-trained Transformer model for the downstream seizure classification task.

Table 3 .

 3

	Method			Patients	Performance
				/Videos
	A.-Aristizaba et	35/50	Accuracy (Landmark-
	al. (2019) [12]		based/Region-based):
					0.68/0.79
	Hou	et	al.	34/61	F1-score: 0.76
	(2021) [13]			Accuracy: 0.72
	Ours			81/283	F1-score: 0.82
					Accuracy: 0.75

Table 2 .

 2 Comparison of deep learning-based seizure classification task on distinguishing ES from PNES. The number of patients and seizure videos in our study are the largest among the related works. Our experimental results are shown to be comparable to those works.

		(predicted)	(predicted)
		ES	PNES
	(true)
	ES	181	54
	(true)
	PNES	15	33

ACKNOWLEDGEMENTS

This work was granted access to the HPC resources of IDRIS under the allocation 2020-AD011011721R1 made by GENCI.