%% 
%% Copyright 2007, 2008, 2009 Elsevier Ltd
%% 
%% This file is part of the 'Elsarticle Bundle'.
%% ---------------------------------------------
%% 
%% It may be distributed under the conditions of the LaTeX Project Public
%% License, either version 1.2 of this license or (at your option) any
%% later version.  The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.2 or later is part of all distributions of LaTeX
%% version 1999/12/01 or later.
%% 
%% The list of all files belonging to the 'Elsarticle Bundle' is
%% given in the file `manifest.txt'.
%% 
%% Template article for Elsevier's document class `elsarticle'
%% with harvard style bibliographic references
%% SP 2008/03/01

\documentclass[preprint,12pt,authoryear]{elsarticle}

%% Use the option review to obtain double line spacing
%% \documentclass[authoryear,preprint,review,12pt]{elsarticle}

%% Use the options 1p,twocolumn; 3p; 3p,twocolumn; 5p; or 5p,twocolumn
%% for a journal layout:
%% \documentclass[final,1p,times,authoryear]{elsarticle}
%% \documentclass[final,1p,times,twocolumn,authoryear]{elsarticle}
%% \documentclass[final,3p,times,authoryear]{elsarticle}
%% \documentclass[final,3p,times,twocolumn,authoryear]{elsarticle}
%% \documentclass[final,5p,times,authoryear]{elsarticle}
%% \documentclass[final,5p,times,twocolumn,authoryear]{elsarticle}

%% For including figures, graphicx.sty has been loaded in
%% elsarticle.cls. If you prefer to use the old commands
%% please give \usepackage{epsfig}

%% The amssymb package provides various useful mathematical symbols
\usepackage{amssymb}
\usepackage{multimedia}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{multimedia}
\usepackage{graphics}
\usepackage{bbm}
\usepackage{pstricks}
\usepackage{amsthm}
 \usepackage{graphics}
 \usepackage{pgf}
 \usepackage{wrapfig} 
 \usepackage{mathtools} 
\usepackage{caption}
\usepackage{subcaption}
%\usepackage{hyperref}



 
 
 
 
 
 \newcommand{\vectornorm}[1]{\left|\left|#1\right|\right|}
 \newcommand{\bo}[1]{\mathbf{#1}}
%\newcommand{\vectornorm}[1]{\left|\left|#1\right|\right|}
\newcommand{\dif}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\diff}[2]{\frac{\partial^2 #1}{\partial {#2}^2}}
\newcommand{\odif}[2]{\frac{d #1}{d #2}} 
\newcommand{\odiff}[2]{\frac{d^2 #1}{d #2^2}}

%% The amsthm package provides extended theorem environments
%% \usepackage{amsthm}

%% The lineno packages adds line numbers. Start line numbering with
%% \begin{linenumbers}, end it with \end{linenumbers}. Or switch it on
%% for the whole article with \linenumbers.
%% \usepackage{lineno}

\journal{Ocean Modellling}

\begin{document}

\begin{frontmatter}

%% Title, authors and addresses

%% use the tnoteref command within \title for footnotes;
%% use the tnotetext command for theassociated footnote;
%% use the fnref command within \author or \address for footnotes;
%% use the fntext command for theassociated footnote;
%% use the corref command within \author for corresponding author footnotes;
%% use the cortext command for theassociated footnote;
%% use the ead command for the email address,
%% and the form \ead[url] for the home page:
%% \title{Title\tnoteref{label1}}
%% \tnotetext[label1]{}
%% \author{Name\corref{cor1}\fnref{label2}}
%% \ead{email address}
%% \ead[url]{home page}
%% \fntext[label2]{}
%% \cortext[cor1]{}
%% \address{Address\fnref{label3}}
%% \fntext[label3]{}

\title{Modeling Surface Currents in the Eastern Levantine Mediterranenan Using Surface Drifters and Satellite Altimetry Data}

%% use optional labels to link authors explicitly to addresses:
%% \author[label1,label2]{}
%% \address[label1]{}
%% \address[label2]{}

\author{Leila Issa, Julien Brajard, Pierre-Marie Poulain, Laurent Mortier, Dan Hayes, Milad Fakhri}

\address{}

\begin{abstract}
%% Text of abstract

\end{abstract}

\begin{keyword}
%% keywords here, in the form: keyword \sep keyword

%% PACS codes here, in the form: \PACS code \sep code

%% MSC codes here, in the form: \MSC code \sep code
%% or \MSC[2008] code \sep code (2000 is the default)

\end{keyword}

\end{frontmatter}

%% \linenumbers

%% main text
\section{Introduction}
\label{}

Recurrent marine pollution like the ones observed near the heavily populated coastal regions of the Eastern Levantine Mediterranean basin is a major threat to the marine environment and halieutic resources. Polluting agents, being transported through currents to either deep waters or to another part of the coast, have not only an immediate local effect, but also a long term, large scale one.
It is clear that a good knowledge of the underlying surface velocity field is necessary to understand the dynamics of this transport process. 
 Geostrophic velocities have been widely used to predict the large mesoscale features of the ocean resolving typically lengths on the order of $100$ km [Refs]. There are however limitations to their usage. They are inaccurate in resolving short temporal and spatial scales of some physical processes, like eddies, which results in blurring these structures. Further errors and inaccuracies occur near the coastal areas (within 20-50 km from land),
where satellite information is degraded; this is due to various factors such as ``land contamination, inaccurate tidal and geophysical
corrections and incorrect removal
of high frequency atmospheric effects at the sea surface. " [Caballero]. 


To improve geostrophic velocities, especially near the coast, several types of data can be combined: specifically in situ observations, [Bouffard et al., 2010; Ruiz et al., 2009] provided by drifters, are useful. Drifters follow the currents and when numerous, they allow for an extensive spatial coverage of the region of interest. They are relatively not very expensive, easily deployable and provide accurate information on their position and other
environmental parameters [Lumpkin and Pazos, 2007]. 
Figure~\ref{fig:cnrs} shows the real-time positions of three drifters launched south of Beirut on August 28 2013, in the context of the ALTIFLOAT* project. We observe that unlike the corresponding positions simulated by the geostrophic field (provided by AVISO), the drifters stay within 10-20 km from the coast. The background field shown in that figure is the geostrophic field, averaged over a period of 6 days. The drifters' data render a more precise image of the surface velocity than the altimetric one, because it includes geostrophic and non-geostrophic components; however, this only possible along the path following their trajectory. These types of data are therefore complementary. In this work, we propose a new algorithm that blends these types of data in an optimal way, in order to estimate the surface velocity field in the 
Eastern Levantine basin, taking into account the wind effect. We hope to shed light on a region not so-well studied in the literature before, that is between Cyprus and the Syrio-Lebanese coast. 
%" not completely reliable when they However, they can be sparse and heterogeneous in space and time, rendering time averages over a mesoscale global grid fraught with possible sampling bias."



From the methodological point of view, combining altimetric and drifters data has been done using statistical approaches, in the presence of extensive data sets. A common approach is to use regression models to combine geostrophic, wind and drifters components, the drifters' velocity component being computed from drifters' positions using a pseudo-Lagrangian approach. With large data sets, this approach produces an unbiased refinement of the geostrophic circulation maps, with better spatial resolution. [Poulain et al. 2012, Mena et al. 2012, Niller 2003, Centurino 2008, Uchida and Imawaki, 2003 ].
Another approach relies on variational assimilation, a method classically used in weather predictions [Courtier, Talagrand, etc...]. 
In the context of bending altimetric and drifters' data, the method was used by [Taillander 2006] (should cite other people as well? look at Taillandier's intro) and it is based on a simple advection model for the drifters' positions, matched to observations via optimisation. The implementation of the method relies on the time-independent approximation of the velocity correction during a time interval shorter than the typical time scale of the mesoscale field. Improvement of the method consists of 
considering  inertial oscillations superimposed on the mesoscale field. This work 
led to the development of the LAVA algorithm [Refs],  initially tested and applied to correct model velocity fields using drifter trajectories [Taillandier et al., 2006b, 2008] and later 
 customised to several other applications such as model assimilation [Chang et al., 2011; Taillandier et al., 2010]. Recently,  [Berta
et al.] applied it to estimate surface currents in the Gulf of Mexico, where they also added a measure of performance consisting of skill scores, that compare 
the separation between observed and hindcast trajectories to the observed absolute dispersion.
From the application point of view, blending drifters and altimetric data has been applied to several basins, including the gulf of Mexico [Berta et al.], the black sea [A. A. Kubryakov and S. V. Stanichny], the North Pacific [Uchida et al.], and the Mediterranean basin [Poulain et al.]  In [Menna et al.], there was a particular attention to the Eastern Mediterranean, but the region of interest to us, which lies between the coasts of Lebanon, Syria and Cyprus, is characterised by sparsity of data. (NEMED?).
%"The second purpose of this paper is to improve the knowledge on the sub-basin circulation and eddy generation in the eastern LSB. The study is mainly focused on the currents trapped on the topographic slope and on the seasonal and interannual varia- bility of specific sub-basin and mesoscale eddies in the period 2009Ð2010."



Our contribution focuses on the methodical aspect, and it can be considered as an "extension" of the variational approach used in [Taillander, 2006], where we 
the velocity used in the advection of the drifters is made of a geostrophic component that is divergence-free, and a component due to the effect of the wind. We 
also provide a time-continuous correction by: (i) assimilating a whole trajectory of drifters at once and (ii) using a moving time window where observations are correlated. We show that our method (i) improves the estimation of an eddy between the Lebanese coast and Cyprus, and (ii) predicts real drifters trajectories along the Lebanese coast. 
%This particular coastal region of the Eastern Levantine Mediterranean is of interest, not studied in the literature.  




%One of the particularities of the Levantine bassin is an ensemble of 'tourbillons",? where?



This manuscript is organised as follows. We begin in Section 2. by describing the data sets used in the method and the validation process. In Section 3., we  provide a thorough description of the method including the definition of parameters involved, the model, and the optimisation procedure. We validate the method by conducting a twin experiment and a set of sensitivity analysis in Section 4., followed by two real experiments in Section 5., one in a coastal configuration  and another in an eddy.  
% le tourbillon au sud de Chypre et le tourbillon de Shikmona ˆ peu prs ˆ la mme latitude ˆ lÕouest de la c™te du Liban. Cet ensemble, parfois aussi appelŽ complexe tourbillonaire de Shikmona 12, est une structure permanente au sud de Chypre avec une variabilitŽ saisonnire. CÕest sur cet ensemble et sur son lien avec la topographie, notamment le mont sous-marin ƒratosthne sur lequel nous nous pencherons en particulier dans cette Žtude, comme dÕaprs la figure En effet, les monts sous-marins sont considŽrŽs comme une des causes des Žvolutions marines de mŽso-Žchelle.13. Dans le cas du mont ƒratosthne, il est possible que son influence sur la masse dÕeau environnante soit augmentŽe par son intŽraction avec les tourbillons quasi-permanents du complexe de Shikmona 14. La circulation dans le secteur du mont ƒratosthne est dominŽe par un anticyclone correspondant au tourbillon de Chypre. Here say that coastal configuration ??











\begin{figure}[htbp]
\begin{center}
\includegraphics[scale=0.7]{./fig/RealvsSimulatedTraj.pdf}
\vspace{-30mm}
\caption{CNRS drifters deployed in the context of the ALTIFLOAT project starting Aug 28 2013 (shown in  $-$x) , versus  trajectories simulated with AVISO (shown in $--$).  The velocity field shown is the  AVISO field, averaged over 6 days.}
\label{fig:cnrs}
\end{center}
\end{figure}



\section{Data}
All the data detailed in this section were extracted for two target period : first from 25 August 2009 to 3 September 2009, and second from 28 August 2013 to 4 September 2013.
\subsection {Altimetry data}
Geostrophic surface velocity fields used as a background in the study were produced by Ssalt/\textit{Duacs} and distributed by \textit{Aviso}. Altimetric mission used were  Saral, Cryosat-2, Jason-1\&2. The geostrophic absolute velocity fields were deduced from Maps of Absolute Dynamic Topography (MADT) using the regional Mediteranean Sea product.

Data were mapped daily at a resolution of 1/8$^o$. Data were linearly interpolated every hour at the advection model time step.

\subsection{\label{sec:drifters}Drifters data}
Drifters were deployed at the two target periods (2 drifters were selected for the first period in 2009 and 3 in the seconde period in 2013). Table~\ref{tab:drifters} present a summary of the 5 drifters used in this study. Drifter models were SVP with a drog at a depth of 15m. Drifter positions were fileterd with a low-pass filter in order to remove high-frequency current component especially inertial currents. The final time series were sampled every 6h. A more complete description of the drifters and the data processing procedure can be found in~\citet{poulain2009}.
\begin{table}
\centering
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
Project & Deploy Date & Lat & Lon & Last Date & Lat & Lon \\
\hline
NEMED & 29 Jul. 2009 & 31.90 & 34.42 & 28 Oct. 2009 & 34.1 & 31.77 \\
\hline
NEMED & 03 Aug. 2009 & 32.59 & 32.63 & 26 Dec. 2009 & 32.92 & 34.28 \\
\hline
Altifloat & 27 Aug. 2013 & 33.28 & 34.95 & 22 Sep. 2013 & 36.77 & 35.94 \\
\hline
Altifloat & 27 Aug. 2013 & 33.28 & 34.98 & 04 Sep. 2013 & 34.13 & 35.64 \\
\hline
Altifloat & 27. Aug. 2013 & 33.28 & 35.03 & 17 Sep. 2013 & 34.88 & 35.88 \\
\hline
\end{tabular}
\caption{\label{tab:drifters} List of drifters used to illustrate the methodology presented in this study, 
2 drifters deployed in 2009 (results were detailed in section~\ref{sec:cyprus}) and 
3 drifter were deployed in 2013 (results were detailed in sections~\ref{sec:lebanon})}
\end{table}

\subsection{Wind Data}
ECMW ERA-Interim wind products~\citep{Dee2011} were extracted in order to estimate wind-driven currents. Wind velocities closest to the surface (10 m) were extracted at a resolution of 1/8$^o$ at the same grid point as the \textit{Aviso} data. The data were resampled on a hourly time step.

Wind velocities were used to estimate wind-driven effect on drifter velocity.
The eulerian velocity field being used to estimate drifter succesive positions is the sum of the geostrophic velocity and the wind induced velocity given by the formula~\citep{poulain2009}:
\begin{equation}
\mathbf{U_{wind}} = 0.01exp(-28^oi)\times \mathbf{U_{10}}
\end{equation}
where $\mathbf{U_{wind}} = u_{wind}+iv_{wind}$ is the velocity induced by the wind and $ \mathbf{U_{10}} = u_{10}+iv_{10}$ is the wind velocity above the surface (10m) expressed as complex numbers.

\subsection {Model data}
Model data of surface velocity fields were used to calibrate the assimilation method presented in section~\ref{sec:method}. The model selected was the CYCOFOS-CYCOM high resolution model~\citep{zodiatis2003} that covers the North-East Levantin Bassin 
(31$^o$ 30â€™E - 36$^o$ 13â€™E  and 33$^o$ 30â€™N â€“ 36$^o$ 55â€™N). The model forecast were used without assimilation and were reinteroplated on a 1.8$^o$ grid point with an time step of one hour. The model forecast used for calibration purpose on September 2013.
%Wind + Dan


\section{\label{sec:method}Method}

%%%%%%%%%%%%%%%%
\subsection{Statement of the problem}

We consider $N_f$ Lagrangian drifters released at time $t=0$ at various locations. These drifters provide their positions every $\Delta t$, over a period $[0,T_f]$.
Our objective is to determine an estimate of the two-dimensional Eulerian surface velocity field  \begin{equation}\notag
\mathbf{u}(x,y,t)=(u(x,y,t),v(x,y,t)) 
\end{equation}
characterized by a typical length scale $R$, given observations of the drifters' positions 
\begin{equation}
\bo{r}^{obs}_i(n\Delta t), \,\,\, i=1,2, \cdots, N_f, \,\,\, n=1, 2, \cdots N, \,\,\, \text{where}\,\,\, N \Delta t= T_f.
\end{equation}
The velocity shall be estimated on a specified grid with resolution of $1/8^{\circ}$ in both longitude and latitude, and in the time frame $[0, T_f].$ 

The estimation is done following a variational assimilation approach [Refs], whereby the first guessed velocity, or background $\bo{u_b}$, is corrected by matching the observations with a model that simulates the drifters' trajectories. This correction is obtained using a sliding time window of size $T_w$, where we assume $\Delta t<T_w \leq T_L,$ and where $T_L$ is the Lagrangian time scale associated with the drifters in the concerned region. The background field is considered to be the sum of a geostrophic component (provided by altimetry) on which we impose a divergence free constraint, and a velocity component due to the wind [Refs]. The details of this procedure are given in Section 3.3.




\subsection{Linearized model for Lagrangian data}

The position of a specific drifter $\mathbf{r}(t)=(x(t),y(t))$ is the solution of the non-linear advection equation
\begin{equation} \label{advection}
 \odif{\mathbf{r}}{t}=\mathbf{u}(\mathbf{r}(t),t), \,\,\,\,\bo{r}(0)=\bo{r}_0, \mathbf{u}(x,y,0)=\bo{u}_0.
 \end{equation}
This equation is integrated numerically, for example, using an Euler scheme. Since the drifters positions do not coincide with the Eulerian velocity's grid points, a spatial interpolation of $\mathbf{u}$ to these positions is needed. 


The observation operator, denoted it schematically by  $\bo{r}=\mathcal{M} (\bo{u}, \bo{r}),$ consists then of numerical advection and interpolation, and it is given by  
\begin{equation} \label{euler_advection}
\bo{r}(k\delta t)=\bo{r}((k-1)\delta t)+\delta t \, interp(\bo{u}((k-1)\delta t), \bo{r}((k-1)\delta t)), \,\,\,\,\, k=1,2, \cdots
\end{equation}
%Let us denote by $\bo{r}_k = (x_k ,y_k)$ the position of the drifter at time $t_k=k\delta t$ , $\mathbf{u}_k$ the Eulerian velocity at position $\mathbf{r}_k$ and time $t_k$, and
where $\delta t$ the time step of the scheme, typically a fraction of $\Delta t$. We choose bilinear interpolation 
\begin{align}
interp(\mathbf{u}, (x , y )) &= \mathbf{u}_1 + (\mathbf{u}_2 -\mathbf{u}_1 )\frac{(x - x_1)}{\Delta x} + (\mathbf{u}_3 -\mathbf{u}_1 )\frac{(y -y_1 )}{ \Delta y} \\ \notag
&+ (\mathbf{u}_1-\mathbf{u}_2-\mathbf{u}_3 + \mathbf{u}_4 )\frac{(x-x_1 )(y -y_1 )}{\Delta x \, \Delta y}, 
\end{align}
where
\begin{align} \notag
\mathbf{u}_1 &= \mathbf{u} (x_1 , y_1 ), \\  \notag
\mathbf{u}_2 &= \mathbf{u} (x_1 + 1, y_1 ), \\ \notag
\mathbf{u}_3 &=\mathbf{u}(x_1 , y_1 + 1), \\  \notag
 \mathbf{u}_4 &= \mathbf{u}(x_1 + 1, y_1 + 1). \notag
\end{align}
Here, $x_1=\left \lfloor{x}\right \rfloor $ is the floor function and $(x_1, y_1), (x_1 + 1, y_1), (x_1, y_1 + 1)$ and $(x_1 + 1, y_1 + 1)$ are the grid points which are nearest to $(x, y)$. 



%This has the advantage that the cost function becomes quadratical; it has a unique minimum and this minimum is assumed to be close to that of the full non-quadratical cost function (below). 

Using the incremental approach [Refs], the nonlinear observation operator $\mathcal{M}$ is linearized around a reference state. In a specific time window, we consider time independent perturbations $\delta \bo{u}$ on top of the background velocity field, that is
\begin{align}\label{totalR}
\bo{r}&=\bo{r^b}+\delta \bo{r} \\ \notag
\bo{u}&=\bo{u^b}+\delta \bo{u}. 
\end{align}
The linearized equations become 
\begin{align} \label{REquations}
&\bo{r^b}(k\delta t)=\bo{r^b}((k-1)\delta t)+\delta t \, interp\bigl(   \bo{u^b}((k-1)\delta t)), \bo{r^b}((k-1)\delta t     \bigr) ,\,\,\,\,\, \text{background}  \\  \notag
&\bo{\delta r}(k\delta t) = \bo{\delta r}((k-1)\delta t) + \delta t \, \{ interp(\bo{\delta u},\bo{r^b}((k-1)\delta t)) \\ \notag 
&+ \bo{\delta r}((k-1)\delta t) \cdot \partial _{(x,y)} interp \bigl(\bo{u^b}((k-1)\delta t),\bo{r^b}((k-1)\delta t)\bigr)\},  \,\,\, \text{tangent} 
\end{align}
where the drifters' positions are initialized with observations, and where $k=1,2,3, \cdots    \left \lfloor{T_w/\delta t}\right \rfloor .$ 
Here, $ \partial _{(x,y)} interp$ is the derivative of the interpolation function with respect to $(x,y)$. 


The background velocity used in the advection of the drifters is the aggregate of a geostrophic component $\bo{u}_{geo}$ provided by altimetry and a component driven by the wind $\bo{u}_{wind}$, which is parametrized by two parameters as described in PPM. So we have  
\[\bo{u}^b=\bo{u}_{geo}+\bo{u}_{wind}
\]
The data for both velocities are provided daily as described in the Data Section. This means that an interpolation in time of these velocities may be needed.



%\subsection{Discussion on the choice of $\delta t$ }
%The observations $\bo{r}^{obs}$ are available to us for each $\Delta t$, that is we have $\bo{r}^{obs}(i \Delta t), \,\,  i=0,1,2, \cdots $. Let us denote by $\Delta x$ the typical distance traveled by a buoys during $\Delta t$ and let $\Delta s$ denote the spatial resolution of the correction $\delta \bo{u}$. We have two scenarios: 
%\begin{enumerate}[(i)]
%\item If $\Delta s >> \Delta x$, then we can take $\delta t \sim \Delta t$ (that should simplify equation \eqref{Evolve}) 
%\item If $\Delta s << \Delta x$, we need to iterate many $\delta t$ to arrive at an observation. We take $N \delta t=\Delta t$
%\end{enumerate}

\subsection{Algorithm for assimilation}

We perform sequences of optimizations, where we minimize the following objective function with respect to the time independent correction $\delta \bo{u},$ in a specific time window $[0,T_w].$
\begin{equation}
\mathcal{J}(\delta \bo{u})=  \sum _{i=1}^{N_f} \sum_{m=1}^{\left \lfloor{T_w/\Delta t}\right \rfloor} \vectornorm{\bo{r}^{\,b}_{i}(\bo{u^b})+\delta \bo{r}_i(\delta \bo{u}) -\bo{r}_i^{\,obs}(m\Delta t) }^2 +\alpha_1 \vectornorm{ \bo{\delta u} }^2_{\bo{B}} +\alpha_2 \,div (\bo{u}_{geo}) 
\end{equation}

The first component of the objective function quantifies the misfit between the model 
obtained by iterations of \eqref{REquations}, and observations $\bo{r}^{\,obs}(m\Delta t)$. 
We highlight the dependence of $\bo{r}^b$ on the background velocity only, whereas $\bo{\delta r}$ depends on both background and correction.
The second component states that the corrected field is required to stay close to the background velocity. 
Here, the $B$-norm is defined as $\vectornorm{\psi}^2_{\bo{B}} \equiv \psi^T \mathbf{B}^{-1} \psi,$ where $\bo{B}$ is the error covariance matrix.  This term serves the dual purpose of regularization and information spreading or smoothing. To obtain $\bo{B}$, we use the diffusion filter method of [Weaver and Courtier, 2001], where a priori information on the typical length scale $R$ of the Eulerian velocity can be inserted.
The parameter $\alpha_1$ represents the relative weight of this regularization term with respect to the other terms.
The last component is a constraint on the geostrophic part of the velocity, required to stay divergence free. We note here that the total velocity may have a divergent component due to the wind. 


Inside a time window $[0, T_w]$, we assimilate a whole trajectory of drifters, which gives a constant correction in time $\bo{\delta u}.$ We refine the method by reconstructing a smooth time dependent velocity inside $[0, T_f]$: we achieve this by sliding the window by a time shift $\sigma$ to obtain corrections $\bo{\delta u}_k$ in a window $[k\sigma, k\sigma +T_w], \, \, k=0, 1, 2 \cdots$. The reconstructed velocity is then obtained as \[\bo{u}_{corrected}(t_i)=\bo{u^{b}}(t_i)+\sum_{k=0}^{N^i_w} w_k \bo{\delta u}_k.\]  A correction at a specific instant $t_i$ only takes into accounts $N^i_w$ windows sliding through $t_i$. The weight given to correction $\bo{\delta u}_k$ is defined as \[w_k=\frac{1}{\vectornorm{t_i-tc_k}},\] where $tc_k$ is the centre of window $k,$ which means that it is inversely proportional to the ``distance" between time $t_i$ and the window's position.
%Here $i=1,2, \cdots T_f/\delta t$

We end this section by pointing out that we implement the algorithm described above in YAO, [Refs.]
a numerical tool very well adapted to variational assimilation problems that simplifies the computation and implementation of the adjoint needed in the optimization. 





\section{Twin Experiment}
In the twin experiment approach, the observations are simulated using a known velocity field, the ``true" velocity $\bo{u}_{true}.$ In this context, we are able to assess the validity of our approach by comparing the corrected, $\bo{u}_{corrected}$, and true fields. This is based on the time-dependent RMS error 
\begin{equation} \label {RMSError}
error (u, t)=\bigg(    \frac{\sum_{i,j} |\bo{u}_{true} (i,j,t)-\bo{u} (i,j,t)|^2}{\sum_{i,j} |\bo{u}_{true} (i,j,t)|^2 } \bigg),
\end{equation}
where $\bo{u}$ could be $\bo{u}_b$, giving the error before assimilation or $\bo{u}_{corrected}$, giving the error after assimilation. We shall also compare the trajectories of the drifters obtained by simulation with the corrected velocity field and the observed trajectories. 



The configuration of our twin experiment is the following: we put ourselves in the same context as that of the real experiment conducted by the CNRS (refer to data section above), where the drifters are launched south of Beirut starting the end of August 2013. As shown in Fig.~\ref{fig:synth},  we deploy ``synthetic'' drifters in the region located  between 33.7 $^{\circ}$ and 34.25 $^{\circ}$ North and 34.9 $^{\circ}$ E and the coast. This is the same box in which the computation of the RMS error \eqref{RMSError} is done. The initial positions of the drifters shown in red coincide with the positions of the CNRS drifters on September first 2013.  The drifters' positions are simulated using a velocity field $\bo{u}_{true}$ obtained from the dynamic model described in (Refer to data section). The experiment starts on September first  2013, and lasts for a duration of $T_f=3$ days. In principle, nothing forbids us of conducting longer experiments, but in this coastal region, the drifters hit land after 3 days, as shown in Fig.~\ref{fig:synth}.
 The background velocity field is composed of the geostrophic component obtained from AVISO and the wind component as described in the method section. Starting September first 2013, these fields are interpolated to $\delta t$. The parameter $R$ is chosen to be $20$km, [Refs]. 
 
 
Using the relative RMS error before and after assimilation as a measure, we first study the sensitivity of our method to the number of drifters $N_f$, time sampling $\Delta t,$ the window size $T_w$ and to the moving parameter $\sigma.$ (Figures~\ref{fig:wsize},\ref{fig:mwin},\ref{fig:numb}).
\begin{figure}[htbp]
\begin{center}
\includegraphics[scale=0.5]{./fig/RegionErroronAviso.pdf}
\vspace{-30mm}
\caption{Region of RMS error computation for the twin experiment. Observations generated by model starting on Sept 1st 2013, for 3 days, are shown on top of averaged background field. The red locations correspond to CNRS drifters locations.}
\label{fig:synth}
\end{center}
\end{figure}
We first show the effect of the window size $T_w.$ On one hand, this parameter has to be within the Lagrangian time scale $T_L,$ which is estimated to $1-3$ days in this region, according to [Refs], but it also cannot be too large because we consider corrections that are time independent in each window. In Fig.~\ref{fig:wsize}, we show the results corresponding to various window sizes (fixing $N_f=14$ and $\Delta_t=2$ hs), by displaying the relative RMS error (computed in the aforementioned box), before and after the correction. We first see that the error curve (after correction) tends to increase generally as time goes by. This is due to this special coastal configuration where the first three drifters hit the shore after $48$ hs and also to the effect of the spatial filter, correcting the region behind the initial positions of the drifters. We then observe that the optimal window size for this configuration is $24$ hs, which is within the range mentioned above. The error in this case is reduced by almost a half from the original one. Finally, we mention that with window sizes close to three days, the algorithm becomes ill conditioned, which is expected due to the fact that the correction is fixed in a specific window, as mentioned before. 
\begin{figure}[htbp]
\begin{center}
\includegraphics[scale=0.4]{./fig/Wins_optshift_dt1_f14_tf72.pdf}
\vspace{-30mm}
\caption{The effect of the window size. Error before correction is shown with a solid line. Errors after are shown with symbols for several window sizes. Here $N_f=14$ and $\Delta t=2$ hs}
\label{fig:wsize}
\end{center}
\end{figure}
We then show the effect of shifting the window by varying the parameter $\sigma.$ The window size here is fixed to $T_{w}=24$ hs, time sampling to $\Delta t=2$ hs, and $N_f=14.$ We start with $\sigma=0$, which amounts to doing separate corrections, then slide every $\sigma=12, 8, 6$ hs. In Fig.~\ref{fig:mwin}, we show the results by displaying the relative RMS error before and after the correction. 
We observe that if the corrections are done separately, the correction is not smooth; in fact smaller values of $\sigma$ yield not only smoother, but better corrections. 
\begin{figure}[htbp]
\begin{center}
\includegraphics[scale=0.4]{./fig/Shifts_win24_dt1_f14_tf72.pdf}
\vspace{-25mm}
\caption{The effect of the moving window: smaller shifts $\sigma$ yield smoother and better corrections. Here $N_f=14$ and $\Delta t=2$ hs.
 }
\label{fig:mwin}
\end{center}
\end{figure}
The effect of the number of drifters is shown next in Fig.~\ref{fig:numb}. Respecting coverage, we start with $N_f=14$ drifters (positioned as shown in Fig.~\ref{fig:synth}), then reduce to $N_f=10,6,3.$ Naturally more drifters yield a better correction but we notice that even with three drifters, the error is still reduced by $20\%$ and much more so close to the beginning of the experiment. If we took only the drifters that do not hit the coast before 3 days, we get a more averaged error curve as shown in the dashed curve in Fig.~\ref{fig:numb}. Finally, we show the effect of the time sampling parameter $\Delta t$ of the observations in Fig.~\ref{fig:time}. Curves after correction correspond to $\Delta t=6, 4$ and $2$ hours and as we see from the figure, the difference between these cases is not too large. The realistic scenario of  $\Delta t=6$ hs still yields a good correction.
\begin{figure}[htbp]
\begin{center}
\includegraphics[scale=0.4]{./fig/Nfs_win24_dt1_tf72_nofail.pdf}
\vspace{-30mm}
\caption{The effect of the number of drifters. More drifters yield better corrections but corrections are possible with only 3 drifters. The dashed line shows the effect of just taking drifters that do not hit the shore before the end of the experiment. Here $T_w=24$ hs and $\Delta t=2$ hs.}
\label{fig:numb}
\end{center}
\end{figure}

\begin{figure}[htbp]
\begin{center}
\includegraphics[scale=0.4]{./fig/Dts_win24_f14_tf72.pdf}
\vspace{-30mm}
\caption{The effect of the time sampling}
\label{fig:time}
\end{center}
\end{figure}

As an additional assessment of our method, we show the trajectories of the drifters reconstructed with the corrected velocity field on top of the actual observations, for the same experiment described above with the following parameters: a window of size $T_w=24$ hs, a shift of $\sigma=6$ hs, $N_f=14$ and $\Delta t=2$ hs. The left side of Fig.~\ref{fig:lerror} shows the point-wise $L_2$ error between the background and true fields in the region of interest, averaged over the duration of the experiment. The right side shows this error after correction as well as the agreement between the positions of the drifters simulated with the corrected field and the actual observations. Finally, the correction in terms of direction is shown in Fig.~\ref{fig:cerror}.  where we display the cosine of the angle between the background and true field (averaged) on the left side versus the  cosine of the angle between the corrected and true fields on the right. Note that a cosine of one indicates a strong correlation in direction between the two fields. 


\begin{figure}[htdp]
%\centering
\begin{subfigure}{0.55\textwidth}
 % \entering
  \includegraphics[width=1.3\linewidth]{./fig/Before_L2pointw_win24_MEAN_color.pdf}
%  \caption{Pressure drop.}
%  \label{bla}
\end{subfigure}%
\hspace{-10mm}
\begin{subfigure}{0.55\textwidth}
 % \centering
  \includegraphics[width=1.3\linewidth]{./fig/After_L2pointw_win24_MEAN_color.pdf}
%  \caption{Mass flowrate.}
%  \label{blo}
\end{subfigure}
\vspace{-30mm}
\caption{Averaged point-wise $L_2$ error before (left) and after (right) correction. In the right frame, drifters' positions obtained by simulation with corrected field (magenta) versus actual observations(black) are shown on top of the error.}
\label{fig:lerror}
\end{figure}


\begin{figure}[htdp]
%\centering
\begin{subfigure}{0.55\textwidth}
 % \entering
  \includegraphics[width=1.2\linewidth]{./fig/Before_CORRANGLEpointw_win24_MEAN_color.pdf}
%  \caption{Pressure drop.}
%  \label{bla}
\end{subfigure}%
\hspace{-10mm}
\begin{subfigure}{0.55\textwidth}
 % \centering
  \includegraphics[width=1.2\linewidth]{./fig/After_CORRANGLEpointw_win24_MEAN_color.pdf}
%  \caption{Mass flowrate.}
%  \label{blo}
\end{subfigure}
\vspace{-30mm}
\caption{Averaged correction in terms of direction. Left: $\cos{(\bo{u}_{b},\bo{u}_{true})}$, right: $\cos{(\bo{u}_{corrected},\bo{u}_{true})}.$ }
\label{fig:cerror}
\end{figure}




\section{Experiments with Real Data}







The methodology described in section~\ref{sec:method} was applied to two case studies : one along the lebanese coast and one in an eddy south-east of Cyprus.
\subsection{\label{sec:lebanon}Improvement of velocity field near the coast}

Three drifters were launched on August 28 2013 from the South of Beirut, at the positions shown in circles in In Fig.~\ref{fig:leb1}, they provide their position very $\Delta t= 6$ hs and stay within 20 km of the coast for the duration of the experiment. 
The experiment considered here lasts for six days (a time frame where the three drifters are still spatially close before two of them hit the shore). The window size is $T_w=24$ hs. The smoothing parameter $\sigma=6$ hs. 
Fig.~\ref{fig:leb1}, shows the trajectories simulated with corrected field on top of the observed ones, 
in good agreement, even for small scale structures near the coast.

As expected, the velocity field is modified in the neighbourhood of the drifters trajectories. It can be noticed that the main effect of the correction is to increase the velocity parallel to the coast, and decrease the velocity normal to the coast. The backgroung field was determined using altimetric data and is expected to have significant bias close to the coast~\citep{bouffard2008}, and the consequence is the corrected is able to correct some of these bias.

To validate more quantitatively the corrected velocities, another sensitivity study were considered. Only two drifters (the easternmost magenta drifter and the westernmost black drifter) were assimilated in order to correct the velocity field. The third drifter is used only to validate the corrected field by comparing its actual trajectory with the simulated trajectory using the velocity field.

Figure~\ref{fig:lebzoom} shows the results of this experiment. The real difter trajectory (empty circle with thin line) was compared to the simulated trajectory using either the background field (bold cyan line) or the corrected field (bold green line). It can be noticed that the trajectory was greatly improved using the corrected field. It shows that the corrected field can be used to simulate realistic trajectories in the neighbourhood of the assimilation positions, even in a coastal region. It can be a decisive point for application such as pollutant transport estimation.


%lebanese drifters
\begin{figure}[htbp]
\begin{center}
\includegraphics[scale=0.5]{./fig/ReconstructedCNRSExp_6days_average.pdf}
\vspace{-30mm}
\caption{\label{fig:leb1} Prediction of the positions of 3 CNRS Drifters, launched on August 28 2013. $T_f=6$ days.  $T_w=24$ hs and $\sigma=6$ hs. Positions of drifters simulated with corrected field (cross markers) are shown on top of observed positions (circle markers). Corrected field is shown in red whereas background field is shown in blue. }
\end{center}

\end{figure}


\begin{figure}[htbp]
\begin{center}
\includegraphics[scale=0.5]{./fig/ReconstructedCNRSExp_bmtogreen_2days_average_zoom.pdf}
\vspace{-30mm}
\caption{\label{fig:lebzoom} Prediction of the position of the green drifter using the observed black and magenta drifters. $T_f=2$ days.  $T_w=24$ hs and $\sigma=6$ hs. Position of the green drifter simulated with corrected field is shown in $-\tiny{\square}$ green, on top of observed position shown in light green $-o$. Compare to the position of the drifter obtained with background field only, shown in cyan. Corrected field is shown in red whereas background field is shown in blue.}
\end{center}

\end{figure}



\subsection{\label{sec:cyprus}Improvement of velocity field in an eddy}
In the context of the Nemed deployment (see section ~\ref{sec:drifters}), we selected two drifters trajectories from 25 August 2009 to 3 September 2009. Assimilating the successive positions of the drifters every six hours, the AVISO velocity field was corrected.

In this experiment the window size $T_w$ was chosen to be 72 hours as the velocity field was more stable in this case than in coastal areas. The shifting of the time window was of 18 hours.

In Fig.~\ref{fig:eddy-velocity}, the trajectory of the drifters were represented in gray, the mean AVISO surface geostrophic velocity field in blue and the mean corrected geostrophic field in red. 

The real trajectory of the drifters and the simulated trajectory using the total corrected field (sum of corrected field in red and the wind-indeuced velocity) are very close. 
The mean position error (expressed in arc length) is $8.6\times 10^{-3}$ degrees with a maximum of $0.06$ degrees. The real trajectory and simulated trajectory would be indescernible in Fig.~\ref{fig:eddy-velocity}. 



\begin{figure}[h]
\centering
\includegraphics[scale =0.6]{./fig/Eddy_velocity.png}
\caption{\label{fig:eddy-velocity} Corrected surface velocity field (in red) compared to AVISO background field (in blue). The assimilated drifter trajectories are represented in gray. The North-West coast in the figure is Cyprus.}
\end{figure}

In this case, it can be seen that the drifter trajectories were situated in an eddy. The AVISO field is produced by an interpolation method which tends to overestimate the spatial extent of the eddy and underestimate the intensity. In order to estimate the effect of the assimilation on the eddy characterics, we computed the Okubo-Weiss parameter~\citep{isern2004} on the mean velocity fields before correction (background) and after correction. Eddies are characterized by a negative Okubo-Weiss parameter, the value of the parameter is an indicator of the intensity of the eddy. Results are shown in Fig.~\ref{fig:okubo-weiss}. As exected, it can be noticed that the Okubo-Weiss parameter had greater absolute values and a slighlty smaller spatial extent which indicated a improvement of the Aviso processing bias. This results constitutes a validation of the assimilation method presented in this paper showing that eddies were better resolved after assimilating drifter trajectories.

\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{./fig/okubo_weiss_aviso.png}
\includegraphics[scale=0.5]{./fig/okubo_weiss_analyse.png}
\caption{\label{fig:okubo-weiss} Okubo-Weiss parameter calculated on background field (upper panel) and corrected field (lower panel). The negativity of this parameter characterised eddies, and the absolute value corresponds to the intensity of the eddy. It can be noticed that eddy is smaller in size and more intense after the correction process.}
\end{figure}

\section{Acknowledgement}
The altimeter products were produced by Ssalto/Duacs and distributed by Aviso, with support from Cnes (http://www.aviso.altimetry.fr/duacs/).

Wind data were produced by ECMWF and downloaded from (http://apps.ecmwf.int/datasets/data/interim-full-daily/).

This work was funded by the ENVI-MED program in the framework of the Altifloat project.
\textcolor{red}{Laurent, Pierre-Marie, Milad, des choses Ã  ajouter pour Cana et les drifters ?}


%% The Appendices part is started with the command \appendix;
%% appendix sections are then done as normal sections
%% \appendix

%% \section{}
%% \label{}

%% If you have bibdatabase file and want bibtex to generate the
%% bibitems, please use
%%
\section{Bibliography}

  \bibliographystyle{elsarticle-harv} 
  \bibliography{mybib.bib}

%% else use the following coding to input the bibitems directly in the
%% TeX file.

%\begin{thebibliography}{00}

%% \bibitem[Author(year)]{label}
%% Text of bibliographic item

%\bibitem[ ()]{}

%\end{thebibliography}
\end{document}

\endinput
%%
%% End of file `elsarticle-template-harv.tex'.
