Optimisation of Parameters in a German Bight Circulation Model by 4DVAR Assimilation of Current and Water Level Observations

Uncertain parameters in a 3D barotropic circulation model of the German Bight are estimated with a variational optimisation approach. Surface current measurements from a high frequency (HF) radar are used in combination with acoustic Doppler current profiler (ADCP) and tide gauge observations as input for a 4DVAR assimilation scheme. The required cost function gradients are estimated using an adjoint model code. The focus of the study is on systematic errors of the model with the control vector including parameters of the bathymetry, bottom roughness, open boundary forcing, meteorological forcing as well as the turbulence model. The model uses the same bathymetry, open boundary forcing, and metereological forcing as the operational model run at the Federal Maritime and Hydrographic Agency (BSH). The baroclinic BSH model is used as a reference to put the performance of the optimised model into perspective. It is shown that the optimised model has better agreement with HF radar data and tide gauge observations both within the fortnight training period and the test period 1 month later. Current profile measurements taken at two platforms indicate that both models have comparable error magnitudes at those locations. The optimised model was also compared with independent drifter data. In this case, drifter simulations based on the BSH model and the respective operational drift model including some surface wave effects were used as a reference. Again, these comparison showed very similar results overall, with some larger errors of the tuned model in very shallow areas, where no observations were used for the tuning and surface wave effects, which are only explicitly considered in the BSH model, play a more important role. The tuned model seems to be slightly more dissipative than the BSH model with more energy entering through the western boundary and less energy leaving toward the north. It also became evident that the 4DVAR cost function minimisation process is complicated by momentum advection, which leads to non-differentiable dependencies of the model with respect to the control vector. It turned out that the omission of momentum advection in the adjoint code still leads to robust estimates of descent directions.

Uncertain parameters in a 3D barotropic circulation model of the German Bight are estimated with a variational optimisation approach. Surface current measurements from a high frequency (HF) radar are used in combination with acoustic Doppler current profiler (ADCP) and tide gauge observations as input for a 4DVAR assimilation scheme. The required cost function gradients are estimated using an adjoint model code. The focus of the study is on systematic errors of the model with the control vector including parameters of the bathymetry, bottom roughness, open boundary forcing, meteorological forcing as well as the turbulence model. The model uses the same bathymetry, open boundary forcing, and metereological forcing as the operational model run at the Federal Maritime and Hydrographic Agency (BSH). The baroclinic BSH model is used as a reference to put the performance of the optimised model into perspective. It is shown that the optimised model has better agreement with HF radar data and tide gauge observations both within the fortnight training period and the test period 1 month later. Current profile measurements taken at two platforms indicate that both models have comparable error magnitudes at those locations. The optimised model was also compared with independent drifter data. In this case, drifter simulations based on the BSH model and the respective operational drift model including some surface wave effects were used as a reference. Again, these comparison showed very similar results overall, with some larger errors of the tuned model in very shallow areas, where no observations were used for the tuning and surface wave effects, which are only explicitly considered in the BSH model, play a more important role. The tuned model seems to be slightly more dissipative than the BSH model with more energy entering through the western boundary and less energy leaving toward the north. It also became evident that the 4DVAR cost function minimisation process is complicated by momentum advection, which leads to non-differentiable dependencies of the model with respect to the control vector. It turned out that the omission of momentum advection in the adjoint code still leads to robust estimates of descent directions.

INTRODUCTION
Although the fundamental processes of ocean dynamics are quite well-understood for most coastal regions, accurate, and reliable predictions of variables relevant for practical applications are still challenging. The situation near the coast is often complex because of the spatial heterogeneity, the dependence on open boundary forcing and the usually short time scales. For example, in shallow, tidal dominated areas like the German Bight numerical models require high resolution information about parameters related to bathymetry or bottom friction, which are hard to measure and therefore often lack accuracy.
Coastal ocean models are affected by both systematic and stochastic error components. For systems with short memory the reduction of systematic errors is of particular interest, because an improvement can be expected on all time scales. The treatment of stochastic errors, e.g., related to atmospheric forcing, can have significant impacts on shorter time scales, and makes sense as a second step, in particular as part of an operational forecast system.
Most uncertain parameters in coastal models, like bottom roughness or momentum diffusion coefficients related to turbulence are very hard to measure directly. These parameters are therefore usually estimated in an indirect way through the measurement of standard prognostic model variables like water levels or current velocities, which are dynamically connected to the uncertain quantities. This results in inversion problems with often strong non-linearities, which require a larger variety of different observations to obtain robust estimates. The relationship between model variables and observed quantities is often not straightforward as well. This is in particular true for surface currents, which are affected by various atmospheric and oceanic processes.
In this study the focus is on the three-dimensional (3-D) circulation of the German Bight and the reduction of systematic errors in a respective numerical model. The German Bight circulation is dominated by tides and is strongly influenced by the bathymetry and bottom friction processes. Overview maps and isobaths are shown in Figure 1. Impacted by wind, waves, and tides, the water masses at the coasts are periodically mixed with the open North Sea waters (during flood) and are partially exported back (during ebb). Westerly winds typically prevail in the North Sea resulting in a mean current pattern with water entering the German Bight from the west and leaving to the North. However, these mean transport directions can actually be reversed in strong easterly wind situations (Stanev E. et al., 2019). Strong tidal currents in tidal inlets connect the near coastal Wadden Sea areas, which are falling dry during ebb, with the open water. The resulting circulation dynamics is characterised by strong non-linearities and high sensitivity to small scale bathymetry features (Sündermann et al., 1999;Stanev et al., 2009). As sediment transport processes are significant in the area, the tracking of bathymetry changes through observations is very challenging and numerical models are affected by respective errors.
Another process that needs some consideration is the potential impact of wind driven surface waves on the circulation. For the North Sea, the importance of wave induced processes for the ocean circulation and sea-level predictions was demonstrated in previous studies (Staneva et al., 2016(Staneva et al., , 2017Schloen et al., 2017). Staneva et al. (2016) and Schloen et al. (2017) studied the impact of the ocean-wave coupling in the near-coastal German Bight region and showed the predictive skills of ocean circulation and sea-level could be significantly enhanced by considering wave-induced processes. In extreme storm surge conditions over the North Sea, due to strong non-linearity of wave-oceantidal interaction, the wave-ocean coupling is considered to be significant for correct model predictions (Cavaleri et al., 2018).
The German Bight is a very busy area with a lot of shipping and offshore activities. In particular, the offshore windfarm sector has grown rapidly over the last decade with about 1,000 turbines installed in coastal German waters. For this reason, there is high demand for reliable information on ocean parameters like currents, which are required for applications such as search and rescue (SAR), modelling of sediment transport processes, or ship operations related to building and maintenance of offshore constructions. Marine litter and transport of pollutants is of growing concern as well. Different types of model simulations are required including short term forecasts for operational applications, scenario simulations for optimised long term planning and process studies.
In the present study uncertain model parameters in a German Bight model are estimated using a combination of HF radar (HFR) surface current data, current profiles measured by Acoustic Doppler Profiler (ADCP) and tide gauge water level measurements. These data are used as input for a variational optimisation scheme (4DVAR), which takes into account nonlinearities of the model and finds optimal solutions using a gradient based iteration scheme. The required gradients are computed using an adjoint model. The approach to use HF radar data in combination with tide gauge data was motivated by the fact that surface current measurements do not necessarily correlate well with vertically integrated volume transports. As the divergence of these transports control water level changes, the sole assimilation of surface current observations can easily deteriorate water level estimates, which are one of the key variables for the German Bight. The simultaneous use of water level measurements, which are available on a routinely basis in most coastal areas, adds independent information on transports in the analysis and helps to avoid this problem.
HFR data acquired in the German Bight have already been used in previous studies for data assimilation as well as for comparisons with models (Port et al., 2011;Baschek et al., 2016). An ensemble based approach to optimise the open boundary forcing was presented in Barth et al. (2010). A similar technique was applied in a subsequent study (Barth et al., 2011) to optimise the wind forcing for a German Bight circulation model. A statistical based approach to improve short term surface current forecast was presented in Stanev et al. (2015). As with most other studies on HF radar assimilation cited above, it is often not easy to put the results into perspective because comparisons with established systems (e.g., operational systems run at forecast centres) are rarely found.
In this study a 4DVAR variational approach is applied for the assimilation of current observations in the German Bight for the first time. The main objectives of the study are as follows: • Reduce systematic model errors based on observations in order to improved estimates of currents and water levels. • Use a combination of surface current measurements as well as current profile and water level observations to provide information on the 3D structure of water transports. • Demonstrate improved model performance based on independent observations • Compare results to a well-established operational reference model To achieve these goals, a 3D numerical coastal circulation model and the respective adjoint were implemented. This implementation will be referred to as IMCO (invertible model for the coastal ocean) in the following. To demonstrate the model improvement, a data set of surface drifter trajectories was used, which was acquired in the month following the 14 day period used for the model tuning. As a reference for the analysis, the operational model run at the Federal Maritime and Hydrographic Agency (BSH) was chosen. The BSH model could not be used for the 4DVAR assimilation directly, because there is no adjoint model code available. The decision to use a variational method is based on our experience that the improvement of models, which are already showing good performance, is hard to achieve with methods that contain a lot of implicit uncertainty and require assumptions about linearity, like the majority of existing ensemble methods. To our knowledge, the present study is the first attempt to apply a 4DVAR approach to a barotropic coastal system with Wadden Sea areas and extremely shallow water.
The strong nonlinearities associated with bottom friction are particularly challenging for the resulting minimisation problem. It is important to say that the 4DVAR setup used in this study is not meant to be run in an operational environment. The treatment of systematic model errors can be done based on a single minimisation exercise using a longer analysis window. This is in contrast to operational assimilation schemes, which try to deal with stochastic model errors repeatedly (typically every 12 or 24 h) and which have to be optimised accordingly. Because of the usually short correlation times of stochastic model errors on coastal scales, the treatment of these errors is a big challenge and it makes sense to put a focus on systematic errors in the first step.
The present study is of more general interest, because the focus on systematic model errors has some general consequences for observation data requirements. In general one can say that the temporal frequency of observation data is less critical for model tuning compared to operational data assimilation. This is of particular relevance for the assessment of current and future satellite data, which often lack temporal resolution, but which can still be of high value for model optimisation. This is in particular the case for coastal regions where high resolution information from satellites can help to treat model errors associated with insufficient representation of spatial heterogeneities (Sanchez-Arcilla et al., 2021).
The paper is structured as follows. In section 2, the model used for the 4DVAR tuning as well as the respective adjoint is introduced. The observations and the BSH model data are described in section 3. Results obtained with the tuning method are presented in section 4 and conclusions are given in section 5.

NUMERICAL MODEL
In the following a brief description is given of the model that is used as a basis for the parameter optimisation exercise. Although the model follows the standard theory, it is important to explain the used parameterisations. In addition, the use of an adjoint model requires that the original model has certain smoothness and stability properties, which not all models have, e.g., concerning the wetting and drying scheme. More details on the numerical treatment of the model equations can be found in Appendix A.
The model used in this study to simulate the 3D circulation in the German Bight is barotropic, i.e., density variations due to temperature or salinity gradients are not treated in a prognostic way. Although the circulation in the German Bight is dominated by tidal and wind forcing as well as the bathymetry (Becker et al., 1992), this is certainly an approximation. Due to river runoff there is stratification in the Weser, Ems, and Elbe estuaries with impacts on the 3D circulation (Stanev E. V. et al., 2019), but these relatively small regions are not the focus of this study. Temperature stratification can occur in the interior of the German Bight during summer as well. However, the possible impact of stratification on the circulation by conditioning of the internal friction is to some extent taken into account in the model tuning process described below by inclusion of a spatially varying background momentum diffusivity and mixing length profiles.
The model is based on the standard Reynolds averaged Navier Stokes equations using the hydrostatic and Boussinesq approximations with the horizontal current components u, v, the surface elevation η, the Coriolis parameter f , the gravitational acceleration g, and the horizontal and vertical momentum diffusion parameters ν h and ν v , respectively. Assuming incompressibility, the current field and the water elevations are connected by the continuity equation given as where U is the two-dimensional (2D) vector of vertically integrated horizontal currents. The vertical current vector component w can be obtained from where the sea floor is at z = 0. As the vertical current component is three to four orders of magnitude smaller than the typical horizontal current speeds in the considered area, vertical momentum advection was neglected and the explicit computation of w as a prognostic variable was not required in the simulation.

Surface, Bottom, and Open Boundary Conditions
As stated before, bottom friction and wind forcing are important factors in the German Bight circulation. In the following we give a brief summary how these processes are parameterised in the model in the form of boundary conditions. The bottom friction is modelled using a standard log-profile boundary layer approach, where the friction velocity u * b is related to the current velocity u(z) at some distance z from the bottom by with Karman constant κ and bottom roughness length scale z 0 . For a given current velocity and bottom roughness the normalised friction force is then computed as τ b = (u * b ) 2 . The bottom roughness z 0 is used as a tuning parameter in the model optimisation.
For the sea surface, the momentum flux from the atmosphere to the ocean is given using a bulk formula of the form with wind drag coefficient λ met (Backhaus, 1976), which is used as a tuning parameter in the model optimisation.
For the open boundaries on the western and northern side of the model domain (see Figure 1B) water levels are prescribed using standard clamped conditions.

Vertical and Horizontal Momentum Diffusion
The used turbulence model is quite simple and based on a parameterised shape of the mixing length profile. The vertical momentum diffusion is then controlled by current shear and an additional background momentum diffusion.
A cubic shape of the vertical mixing length profile was used similar to parameterisations discussed in Umlauf et al. (2005).
where d s and d b are the distances from the surface and the bottom, respectively. The parameters κ b and κ s control the behaviour of the mixing length near the bottom and surface boundary layers and are part of the tuning vector. If the sea floor was an idealised wall one should get κ b = κ with the Karman constant κ ≈ 0.4 according to the law of the wall. With the mixing length given by Equation (7) the vertical momentum diffusion coefficient is estimated as The second term in Equation (8) is supposed to represent additional sources or sinks of turbulence associated with, e.g., the density stratification of the water column or ocean wave breaking. Experiments with both constant and spatially varying β were performed. Even with constant β the formulation in Equation (8) leads to an increase in background momentum diffusion with decreasing water depth. For the horizontal momentum diffusion ν h a constant value was assumed. A large range for this parameter can be found in literature. For the open ocean, the reported order of magnitude is between 10 2 and 10 5 m 2 /s (Apel, 1987). The simulation results turned out to be relatively insensitive to this parameter.

4DVAR and Adjoint Model
Given a vector of control variables α = (α 1 , . . . , α N c ), which are to be optimised, the following cost function is minimised in the 4DVAR approach Here, x i and y i are the model state vector and the observation vector at time step i, H is the observation operator and σ , σ are error standard deviations assumed for the observations and the control vector respectively. This is a nonlinear minimisation problem, which is commonly solved using gradient based iteration methods. Because of the usually high dimensions of the vector α, it is in general not feasible to estimate gradients using straightforward finite differences, as this would require at least N c forward runs with the full nonlinear ocean model for a single step of the optimiser.
To briefly explain the idea of an adjoint model, we just consider one time step in the observation dependent part of the cost function with σ = 1 and we assume that the control vector α is simply the initial state x 0 used for the model run. We then have Denoting the model operations required to transform the initial state x 0 into the model state at time step i as the gradient can be re-written as whereM 1 , . . . ,M i are the linearised model operators. Hence, the gradient can be computed by applying the adjoint model defined asM =M 1M2 . . .M i to the innovation, i.e., the difference between the model and the observations. It is important to note that in this simplified setup the numerical model itself is assumed as error-free, i.e., all potential errors in the model state variables are due to uncertainties in the initial fields. This is usually not realistic and additional uncertain parameters in the model can be added to the state vector with some adjustments of the scheme described above (Ngodock et al., 2017).
In practice, this means that the entire forward model code has to be linearised, transposed and put in reverse order. One additional complication arises from the fact that for every nonlinear term in the forward model, information about the model trajectory is required in the adjoint model. One practical approach is to store the forward model trajectory in a direct access file and then to read this file during execution of the adjoint code in reverse order.
The adjoint model is parallelised using the same domain decomposition as the IMCO forward model, i.e., using a grid of 12 × 12 subdomains.

Treatment of Advection Term
The treatment of the momentum advection term is a challenge, because standard advection schemes like the first order upwind scheme used in this study given as are not differentiable around u = 0. This problem was already discussed in previous studies (Thuburn and Haine, 2001;Liu and Sandu, 2008). Because the analysis window considered in this study contains many tidal cycles, sign changes of currents happen frequently leading to significant noise and instabilities in the adjoint of the advection scheme. The approach taken in this study is to neglect momentum advection in the adjoint code altogether and to include it only in the forward model. Because advection is at least not a dominating term in the momentum balance of the German Bight, this approach still lead to reliable estimates of descent directions for the minimisation method.

Observation Operators
For the parameter optimisation process model variables have to be related to measured quantities, which is not trivial for HF radar surface current observations. These measurements are simulated from the model by a weighted average over the top layers according to with a weighting function w defined as The function w has a maximum at the surface and decreases to zero at water depth ξ . For the depth parameter ξ a value of 2 m+ √ 2 m was used for the simulations. According to Stewart and Joy (1974), the HFR measurements are representative for the upper layer with thickness (2k B ) −1 , where k B is the Bragg wavenumber. For the radar frequencies used in this study the Bragg wavelength is around 13 m and the resulting observed surface layer has about 1 m thickness. For the chosen value of ξ the weighting function Equation (14) drops to half the maximum value at 1 m depths.

Control Vector
In the following the control vector used for the optimisation of the IMCO model is described. The selection of control variables is a critical step, because it reflects assumptions made about the source of model errors. If a significant model error is not explicitely represented in the control vector, this error will either not be corrected at all, or, even worse, other control variables may try to compensate this deficit by un-physical adjustments. The control vector to be optimised in our analysis contains the following components: • The bottom roughness length scale z 0 (see Equation 5). To account for a possible anisotropic behaviour of the bottom friction, separate roughness values z x 0 , z y 0 are considered for the zonal and meridional direction. Both constant and spatially varying maps for these parameters were used. • There are two additional parameters H z 0 , L 1 explained in more detail below, which are supposed to control a possible increase of bottom roughness with decreasing water depth. • The background diffusion parameter β in Equation (8).
Setups with constant and spatially varying parameters were considered. • The water depth H was scaled with a correction factor γ H .
Setups with constant and spatially varying corrections were investigated. • The turbulence length scale parameters κ s , κ b in Equation (7).
These parameters were assumed to be constant in space. • The horizontal diffusion coefficient ν h in Equations (1) and (2). This parameter was assumed to be constant over space. • The wind drag coefficient λ met in Equation (6); this parameter is assumed as constant over space as well. To ensure a smooth correction, a quadratic 1D spline representation with 5 knots was used (Schumaker, 2007). For the tidal part separate adjustments of the M2, K1, O1, S2, and M4 components were performed. The remaining water level component consisting of surge and other tidal constituents was corrected in terms of time lag and amplitude.
The spatial variations of the bottom roughness length, background turbulence and bathymetry corrections were implemented by tensor products of quadratic 1D spline functions with 6 × 10 knots (Schumaker, 2007). In addition, the roughness length scales were multiplyed by a depth dependent function with the function R defined in Equation (22). This results in a growth of z 0 below water depths of H z 0 until a maximum amplification by a factor of 1 + L 4 is applied at water depth of H z 0 /2 and below.

Minimisation Procedure
The dimension of the control vector considered in this study is small enough (∼ 10 3 ) to allow storage of the Hessian matrix of the cost function. Because a direct estimation of second order derivatives is not feasible, a quasi-Newton method was applied, which uses the sequence of gradients provided by the adjoint model to iteratively improve estimates of the Hessian. The Broyden-Fletcher-Goldfarb-Shanno (BFGS) technique used in this study is a classical method, which is discussed in great detail in various publications (e.g., Fletcher, 1986). In addition, the minimisation procedure requires a line search method, which determines how far to proceeds in the search direction to select the next state vector in the iteration. The method applied here uses the Armijo condition to decide whether a step size is acceptable (Wolfe, 1969). We are aware that other numerical approaches exist to minimise the cost function. Variants of the Gauss-Newton method have been discussed in the context of 4DVAR methods in previous work (e.g., Gürol et al., 2014). These methods are specifically designed for least-squares problems and require the tangent linear model in addition to the adjoint model. The approach typically consists of two nested iteration loops, where variants of the Lanczos or conjugate gradient method are used to find approximate solutions of a big linear system in the inner loop. The result is then used as a search direction in the outer loop. These methods provide some interesting capabilities concerning analysis diagnostics (Moore et al., 2018) and are certainly preferable for applications, where storage of the Hessian is prohibitive. This is usually the case in the classical situation, where the initial model fields are part of the control vector. In the dynamical system discussed here the memory is so short that it is not worth to adjust the initial fields. The tidal wave passes through the domain within about 4 h, i.e., after that the system has forgotten about the initial state. To account for this effect observations are not used within the first 6 h of the analysis period.
In general one can say that, due to the strong non-linearities of the model, which are in particular due to the shallow water and the strong influence of bottom friction, the resulting minimisation is a challenge. This is not surprising, because all minimisation approaches mentioned above rely on linear approximations of the cost function, which become less accurate with increasing non-linearity. As a consequence, convergence rates can suffer and stronger dependencies on the initial control vector estimate can be observed. In practice this means that some trial and error is required to find initial estimates, which lead to cost function values as low as possible.

HF Radar Observations
HFR surface current data were acquired by three radar stations in the German Bight (see Figure 1B). The radar is part of the COSYNA system described in more detail in Baschek et al. (2016). The radar systems make use of linear antenna arrays installed near the shoreline with the exact locations summarised in Table 1. The Wellen Radar (WERA)-type radars (Gurgel et al., 1999) operate at frequencies of 10.8-MHz (Büsum and Sylt) and 12.1-MHz (Wangerooge), respectively. Ocean surface currents advecting Bragg resonant surface waves cause a Doppler shift (Barrick, 1978), which can be converted to the underlying current speed toward or away from the radar. More details on the required processing can be found in Gurgel and Schlick (2009). For the considered system the spatial radar resolution is 1.5 km in range and 3 • in azimuth. The working range of the WERAs mainly depends on salinity, sea state, working frequency, and electromagnetic noise. For a table of typical working ranges, see Gurgel and Schlick (2008). The system used here can reach out to about 120 km off the coast in favorable conditions.
The radar system provides measurements with a 9 min averaging window every 20 min. The observations are interpolated to a 2 km cartesian grid. Through a combination of the radial components from the different antenna stations meridional and zonal current components can be derived, however the original radial components were used for the subsequent data assimilation procedure. One advantage of this approach is that information is available for a larger area. Furthermore, the observation error characterisation is easier in this case. Further details of the system can be found in Stanev et al. (2015).

Tide Gauges
Tide gauge data were accessed via the web-interface provided by the Copernicus Marine Environment Monitoring Service (CMEMS). The observation were taken from the respective in situ products for the NorthWest Shelf area (https://marine.copernicus.eu/). These are near real-time (NRT) in situ quality controlled observations, which are hourly updated and distributed within about 24-48 h after acquisition. The data are available as netcdf files and have 10 min temporal resolution. The locations of the three tide gauges are given in Table 1.

Acoustic Doppler Profiler (ADCP)
ADCP current profile measurements taken at the platforms FINO-1 and FINO-3 were used for the study (see Figure 1B). The bottom mounted instruments are operated by the German Federal Maritime and Hydrographic Agency (Herklotz, 2007) and the data were accessed via the web-interface provided at http://fino.bsh.de/. Current speeds and directions are available at different water depths with 2 m spacing. The water depth at the FINO-1 platform is about 30 m and about 22 m at the FINO-3 location. The locations of both platforms are given in Table 1.

Surface Drifters
Nine drifters were deployed at different locations in the German Bight during the FS Heincke cruise HE 445 in May 2015. The raw data are freely accessible (Carrasco and Horstmann, 2017) and are described in more detail in Callies et al. (2017). The drifter positions were estimated via onboard Global Positioning System (GPS) devices and transferred to land via the satellite communication network Iridium. The sampling rate was initially 15 min and later on reduced to 30 min. The trajectories of six drifters used in this study are shown in Figure 2. In this case only the period 29.5-30.6.2015 was considered and the respective initial positions are marked with solid triangles.

Model Data From the Federal Maritime and Hydrographic Agency (BSH)
Apart from measurements, data from the operational model BSHcmod run at BSH were included in the analysis (Dick et al., 2001). These data were used for the open boundary forcing and the wind fields contained in the products were used as meteo forcing. The wind fields originate from the atmospheric COSMO-EU (Consortium for Small-Scale Modelling) model, which is run at the German Meteorological Service (DWD) with a spatial resolution of 7 km. The spatial resolution of the BSHcmod model is about 900 km for the German Bight area and the temporal resolution of the standard output is 15 min (Dick and Kleine, 2007). The available BSH surface current data represent approximately the upper 5 m of the water column except for the Wadden Sea areas, where the top layer thickness is reduced.
Furthermore, the bathymetry information provided with the BSH product was used as a basis for the model runs presented in this study.

Model Tuning With HFR, Tide Gauge, and ADCP Data
The 4DVAR method was applied to data from the fortnight period May 15-May 29, 2015. The idea was to cover at least one neap spring tide cycle in the model tuning process, which is necessary to separate the M2 and S2 tidal components. Wind speeds in zonal and meridional direction for that period are shown in Figure 3. This plot also includes the period May 29-June 29, which is later on used for testing of the tuned model.
The optimisation was carried out with two basic setups of the control vector: • Experiment IMCO_CONS: bottom roughness, background momentum diffusivity, and bathymetry correction are assumed as constant over space.
• Experiment IMCO_VAR: smooth spatial variations of bottom roughness, background momentum diffusivity, and bathymetry correction are permitted.
For the experiment IMCO_CONS the control vector dimension is N c = 88 and for experiment IMCO_VAR it is N c = 376. The total number of components in the observation vector is N obs = 3, 522, 036, i.e., about four orders of magnitude more than the size of the control vector. This refers to the number of observed values, which are actually used within the fortnight period, i.e., excluding missing values. The adjoint model was applied for the estimation of gradients that resulted in descent directions for the BFGS method. The iteration of the minimisation procedure was terminated when no further cost function reductions of practical value could be achieved. The resulting cost function values were J = 10.94 for experiment IMCO_CONS and J = 10.40 for experiment IMCO_VAR. Significant reductions of the gradient norm could be observed in the initial phase of the iteration, but a convergence to zero is not achieved. One important factor in this behaviour is the not-differentiable momentum advection described in section 2.3.1. Using the obtained control vector from experiment IMCO_CONS for another model run with momentum advection switched off resulted in a cost function value of 16.67. This indicates that momentum advection is not negligible in the circulation dynamics of the German Bight.
In the present configuration the IMCO setup is not optimised for execution speed and the forward model requires about 7 min for 1 day of simulation using 144 processors. The adjoint model is slower by approximately a factor of two using the same number of processors. There is some potential for speedup concerning the writing and reading of the model trajectory to disk, which is required for the gradient computation and which is done in 10 s time steps in the present setup. A coarser sampling of the trajectory would introduce some errors into the estimated gradient, but the resulting perturbations in the minimisation procedure maybe acceptable. The present study is about the reduction of systematic model errors, which ideally only has to be done once. For the application of the proposed methodology in an operational framework with the respective treatment of stochastic errors, e.g., related to atmospheric forcing, further optimisation steps concerning execution speed are desirable and will be presented in subsequent studies.
Results for the water levels at the tide gauges HvideSandeKyst, Helgoland, and Cuxhaven are shown in Figure 4. Red crosses correspond to measurements, and the green solid and blue dashed lines refer to the BSH model and the 4DVAR results, respectively. For the Cuxhaven and Helgoland tide gauge observations were missing for some periods. The tidal signal at HvideSandeKyst is interesting, because it has an almost triangle wave shape, which indicates a significant contribution of higher harmonics to the tide. In fact, for an idealised triangle signal with M2 base frequency f M2 , the spectrum of the elevation η is given as i.e., in theory there is an infinite number of higher harmonics involved. Furthermore, some correlation can be found between the water levels at HvideSandeKyst and the meridional component of the wind speed in Figure 3. One can see that both the BSH model and the tuned IMCO model are able to reproduce the tidal shape quite well. The root mean square (RMS) difference with regard to the observations is 0.08 m for the tuned model and hence slightly lower than the respective value of 0.13 m for the BSH model. Again, both models reproduce the observations fairly well. The BSH model has a tendency to overestimate the low tides, which is not seen in the IMCO model. This is the main reason, why the tuned model shows a smaller RMS value of 0.11 m compared to 0.17 m of the BSH model. A similar behaviour is seen at the tide gauge Cuxhaven, but here the BSH model is also slightly overestimating the high tide. This results in RMS value of 0.24 m compared to 0.11 m for the tuned model.
Comparisons with the ADCP measurements at FINO-1 and FINO-3 are shown in Figure 5. The measured zonal and meridional current components are given as black and red crosses, respectively. The corresponding results from the 4DVAR analysis are indicated by blue and green lines. In this case the curves for the BSH model are not shown, but the respective RMS values are added in the plot. For FINO-1 comparisons can be found for 24 m depth (a) and 8 m depth (b). For this location the meridional current component is significantly smaller than the zonal component and at the same time shows a stronger influence of higher harmonics. Overall the IMCO model is able to reproduce the observed current velocities quite well with RMS differences between 0.11 and 0.15 m/s. It appears that the meridional component closer to the surface is a challenge in particular during the second week, where the wind was more northerly and thus pushing water toward the coast. For FINO-1 the BSH model shows overall slightly better results than the tuned model with RMS values around 0.01 m/s smaller than the tuned model. For FINO-3 the zonal and meridional current components displayed in Figure 5 show a much more isotropic behaviour with amplitudes of the same magnitude and a phase shift of ∼180 • . The RMS errors for the tuned model are between 0.08 and 0.13 m/s and thus smaller compared to the situation at FINO-1. The BSH model and the IMCO model show a very similar performance with maximum deviations of 0.01 m/s in terms of RMS errors.
Comparisons of model runs with radial surface current components measured by the Sylt, Büsum, and Wangerooge station are shown in Figure 6. The colours refer to RMS differences computed from the fortnight period used for tuning of the model. The 10, 30, and 4 m isobath are superimposed. Results for the BSH model are shown in the left column and the respective results for the tuned model in the right column. One can see considerable heterogeneities in the spatial distribution of errors for all radar stations. For the Sylt station the errors are the smallest with an average RMS value 0.082 m/s for the BSH model and 0.071 m/s for the tuned model. The strongest improvement is achieved in an area northwest of the island Helgoland. The same area also stands out in the comparisons with the Wangerooge measurements. Also in that case an improvement is achieved by the 4DVAR analysis. The overall biggest correction by the model tuning is found for the Büsum station with an average RMS value of 0.128 m/s reduced to 0.097 m/s. In this case an improvement can be seen for almost the entire area covered by the radar station. For the Wangerooge station the situation is a little bit more complex, because significant errors remain in an area south east of Helgoland as well as in the shallow areas along the 10 m isobath near the Elbe and Weser entances and along the North Frisian islands. Nevertheless, the mean RMS errors is reduced from 0.103 to 0.091 m/s. An overview of the achieved percentage error reduction for the different radial components is given in Figure 7. Rainbow colours indicate an improvement and grey values correspond to a deterioration. These plots confirm the quite heterogeneous distribution of improvements. The best overall improvement is achieved for the Büsum station with large areas showing at least 30% RMS reduction. For the areas in the northern part above 54.5 • latitude where the tuned IMCO model shows slightly higher RMS values than the BSH model, one has to consider that these are regions where the BSH model performs very well with RMS values well below 0.1 m/s and the tuned model is still below that value. This is different for the area south of Helgoland where the BSH model shows higher RMS errors and the 4DVAR is not able to correct these and even shows 5-10% higher errors.

Comparison With Independent HF Radar and Tide Gauge Data
To check whether the 4DVAR scheme is in fact able to correct systematic errors, which exist beyond the tuning period, the tuned IMCO model was compared with tide gauge and HF radar data acquired in June 2015, i.e., the month following the optimisation period. It cannot be excluded alltogether, that the optimisation procedure makes control vector adjustments  due to processes, which are of a more stochastic nature, in particular the metereological forcing and density stratification. The comparison with independent data from a different period can give indications whether this is a significant factor, because these stochastic factors are changing over time. As there was a data gap in the HF radar data in the first half of June 2015, the comparisons were done for the period June 15-June 29, 2015, i.e., exactly 1 month after the tuning period and covering a fortnight period as well. One can see from Figure 3 that the wind conditions during this test period are different compared to the tuning phase showing longer periods with northerly wind directions.
The respective comparison results for the tide gauges and HF radar radial components are summarised in Table 2. The table also contains the respective numbers for the tuning period. One can see that overall the picture in the tuning and testing period is very similar. In all cases the RMS values of the tuned IMCO model are smaller than the respective values of the BSH model. The RMS values are slightly different in the tuning and testing period, but the relative improvement is still of the same order in most cases. The only notable change is seen in the Büsum radial component, where the improvement of about 30% in the tuning period is reduced to about 20% in the testing period.
These results indicate that the optimisation procedure is indeed able to reduce systematic errors in the model, which are independent of stochastic error sources like the metereological forcing. As the wind conditions in the tuning and testing period cover a larger variety of wind directions and speeds, one can also conclude that the optimisation is of more general applicability and not only useful for specific wind situations. However, it is also true that neither tuning nor testing period contain storm events where stronger nonlinear effects (e.g., related to surface waves) may become more significant and should be investigated in a separate study.
It is also important to mention that there is a quite significant difference in sea surface temperatures between the tuning and testing period. According to model data from the German weather service, the temperature at location 8.00 • E54.25 • N increased from 283.9 to 287.8 K between May 15 and June 15, 2015 (midnight temperatures), i.e., by about 4 • . This means that the situation with regard to temperature stratification and stability of the water column is most likely not the same in both periods and hence the obtained estimate of the control vector is applicable to a certain range of stability conditions.

Comparison With Independent Surface Drifter Data
The tuned IMCO model for experiments IMCO_CONS and IMCO_VAR was run for the period May 29 to June 29, 2015 and compared to independent surface drifter data acquired during that period. The time series of drifter positions was used to estimate the zonal and meridional surface current components and these were co-located with the respective model simulations. Concerning the BSH system it is important to say that operational drift forecasts at BSH are not based on the BSHcmod model alone, but current speeds in the upper layer are used as input for a drift model, which takes into account a number of additional factors like Stokes drift. After noticing that a direct comparison of BSHcmod surface velocities with drifter velocities does not achieve the same level of agreement as the IMCO model, output from the BSH drift model was used instead. For the tuned model a weighted average of the upper sigma layers was computed such that the top 1 m is most relevant for the simulated drift velocity. As the drift model output was available in 3 hourly times steps, all comparisons were performed using this sampling frequency. Respective scatter plot resulting from the IMCO simulations are shown in Figures 8A,B for drifter 8, which was sending data between May 30 and June 27, 2015. The colour coding refers to water depth and separate plots are given for the meridional (a) and zonal component (b). The dashed line is the linear regression line. Because of the used sigma coordinates this means that the weights for the sigma layers vary both in time and space. The RMS values of 0.078 and 0.093 m/s indicate a very good match, which is of similar order as the agreement achieved between the tuned model and HF radar surface currents during the tuning period. The RMS value is dominated by the standard deviation and the bias plays a significantly smaller role. Nonetheless, the slope of the regression line indicates that there is a slight relative underestimation of current magnitudes by the IMCO model. Drifter 8 was moving in areas with water depths between about 20 and 40 m and there is no pronounced dependence of the errors on water depth visible. The only effect, that is worth mentioning is a slightly stronger magnitude underestimation of the zonal component for northward currents in deeper water. Figures 8C,D show a respective comparison for the BSH model if the surface velocities are estimated from the top layer of the model. As mentioned before, the thickness of this layer is 5 m for most of the considered area and it does not make sense to consider weighted averages of different layers as done for the IMCO model. One can see that the RMS differences are significantly higher in this case. As before, these errors are mainly due to standard deviation and to a lesser extend caused by bias. Because of the very coarse resolution of the upper boundary layer in the BSH model, the relatively large deviations may not come as a surprise and this is also the reason why operational BSH drift forecasts include a second step, where the above surface currents are used as input for a drift model, which adds additional effects, e.g., Stokes drift associated with surface waves. The respective results from the BSH drift model calculations are shown in Figures 8E,F. One can see that this leads to a significant improvement, with errors, which are very close to the results obtained with the tuned IMCO model. It is interesting to see that a slight underestimation of current magnitudes indicated by the slope of the regression line is present, which is very similar to the behaviour of the IMCO model discussed before. Another similarity is that this effect also seems to be more significant for the zonal component in deeper water.
A summary of the respective RMS differences between BSH drift model and the IMCO_CONS und IMCO_VAR runs are given in Table 3 for all drifters shown in Figure 2. One can see that drifter 8 gives the best performance of the tuned model compared to the BSH drift model. Depending on the drifter and the current component the BSH drifter model gives better results in several cases. In particular, for drifter 1 the IMCO simulations are definitely worse. As seen in Figure 2 drifter 1 was moving around the North Frisian island in very shallow water close to Wadden Sea areas over the entire period. This result indicates that the tuning process in these regions should be further improved. Firstly, more measurements are required in these regions to improve estimates of bottom roughness and turbulence. Secondly, a further stabilisation of the minimisation procedure close to drying is desirable, to avoid the 2 m deepening of the bathymetry applied in this study.
Table 3 furthermore shows that the improvements achieved by spatially variable corrections of bathymetry, bottom roughness, and background diffusion are only moderate. In fact, for some cases the constant corrections of the experiment IMCO_CONS even give slightly better results in the drifter comparisons.
It is also interesting to note that drifter 8, which showed the best agreement with the IMCO simulations was moving in an area with relatively good coverage of all three antenna stations (see Figure 1B). The fact that a considerable amount of observation information was used for the tuning of the model in this area could be an important factor for the good agreement with the drifter 8 data. The good simulation of the drifter velocities by the tuned model in this areas is furthermore a strong indication that HF radar and drifter velocities are very consistent at least for the considered data set. This was also confirmed by direct comparisons of drifter and HF radar data (not shown here). The general question whether the considered surface current data sets are consistent is of course an important point to be considered. Looking at this problem one has to consider at least the following points: • There is so far no real consensus about the role that Stokes drift plays in HF radar measurements (Chavanne, 2018). • The BSHcmod model output has an extremely coarse resolution of the upper boundary layer • The consideration of Stokes drift in the BSH drift model is simplified, because it is so far not based on a numerical spectral wave model, but parametric models for the wave spectrum. Röhrs et al. (2015) showed that the HF radar currents are usually interpreted as Eulerian currents (i.e., not including the Stokes drift), some studies (e.g., Graber et al., 1997) Ohlmann et al. (2007) suggesting that the HF measurements are Eulerian, however the study was inconclusive concerning possible nonlinear perturbations of the wave phase speed measured by the radar. Röhrs et al. (2015) concluded that HF radar essentially measures the Eulerian current and not the Lagrangian current that includes the Stokes drift. The observation that the tuned IMCO model is able to replicate and in some cases supersede the results of the BSH drift model could be an indication that the simplified Stokes correction in the drift model is in fact to some extend compensating deficits associated with the coarse resolution of the BSHcmod boundary layer. Because the situation with regard to Stokes contributions in the HF radar data is not clear as well, this issue requires a more detailed investigation including analysis of 2D wave spectra from a numerical wave model, which is beyond the scope of this study. However, one can say that parameter optimisation based on a variety of different measurements, like presented here, can give valuable hints concerning the role of physical processes and their numerical treatment. In particular the inversion method allows to assess, which physical processes can explain certain features of the observations. One has to emphasise however, that the ability of a model to replicate certain observations is not a proof that the model contains all relevant physical processes. For example, it was shown previously that Stokes drift can definitely play a significant role in drift forecasts (Staneva et al., 2017). The fact that the IMCO model gives good agreement with the drifter data, although it does not include Stokes drift, suggests that wave effects were to some degree integrated into the parameterisations for the upper ocean layer by the 4DVAR optimisation process. Of particular relevance in this context are parameters for the momentum diffusion near the surface and the atmospheric drag coefficient. As pointed out before, a quantification of such effects requires the application of additional tools and data and is not feasible within the present study.

Estimated Control Vector Components
In the first experiment IMCO_CONS a simplified optimisation run was performed, where the roughness length scale z x 0 , z y 0 , the background diffusion ν BG and the bathymetry correction factor γ H were assumed constant over space. The resulting values are summarised in Table 4. With this simplified setup the cost function values are increasing by about 5% from J = 10.40 to J = 10.94.
It is interesting, that the parameter κ b describing the mixing length gradient near the sea floor (see Equation 7) is in fact quite close to the theoretical value of 0.4 to be expected for an idealised wall. The respective value for the sea surface κ S is significantly smaller. The fact that the two values differ is not surprising, because the moving sea surface boundary with additional impacts of ocean surface waves is of a very different nature compared to the stationary sea floor.
The derived estimates for the bottom roughness lengths z x 0 , z y 0 are on a millimeter scale and thus consistent with values reported in previous literature (Ke et al., 1994). Both values are at least of the same order and thus the anisotropy of the bottom friction is not very pronounced. The atmospheric drag coefficient is also of a magnitude similar to values reported in previous studies (Backhaus, 1976). Finally, the bathymetry correction factor γ H indicates an about 5% increase of the mean water depth applied in the optimisation process. The derived corrections for the open boundary forcing are shown in Figure 9. The amplitude correction factors for the five considered tidal components are given in Figure 9A with the left part, up to index number 370, belonging to the western boundary and the remaining part referring to the northern boundary. The indices are ordered from south to north (indices of about 3 h. Here, positive time lags indicate delayed signals as before.
Corrections of the mean surface elevation are shown in Figures 9E,F for experiment IMCO_VAR and IMCO_CONS respectively. In both cases one can see a lowering of the water level along the western boundary and very small adjustments along the northern boundary. This means that the optimisation procedure modifies pressure gradients on a spatial scale of the German Bight, which are in balance with the mean atmospheric forcing, and mean coriolis and frictional forces inside the model domain.
It seems that the tidal wave is accelerated by the deepening of the bathymetry according to the shallow water phase speed and that the boundary forcing is adjusted accordingly. For the remaining elevation signal we see a delay near the coast and an acceleration in the deeper water. Maps of the spatially varying control vector components of experiment IMCO_VAR are shown in Figure 10. The bathymetry corrections indicate increased water depth by between 1.5 and 3.5%. The largest corrections are found in the North Frisian Wadden Sea area and between 55 and 55.5 • N latitude. The smallest corrections are applied in the central German Bight north west of the island Helgoland. It is interesting that the region with strong meridional gradient of the bathymetry coincides with a region where the meridional roughness component ( Figure 10D) shows a stronger decrease from south to north. Both corrections are favorable for transports toward the north in that region. The estimated roughness components for the zonal and meridional direction in Figures 10C,D, respectively vary between ∼1 and 2.5 mm. Both roughness lengths show dipol structures with characteristic length scales between 50 and 100 km. It is interesting that the spatial distributions of z x 0 and z y 0 are significantly different and that areas of high or low values of one component often coincide with areas of larger gradients of the other component.
In Figure 10D there is a small area with high roughness (>2.5 mm) visible in the south western corner of the model domain at the Dutch coast. This location is characterised by very shallow water and by the presence of the open boundary forcing next to it. Obviously the optimisation required a strong dampening of the incoming wave at this location.
As pointed out before, the fact that the tuned model is in good agreement with the observations is not a proof that the parameterisations are physically consistent and meaningful. Concerning the roughness length maps it is definitely possible that the roughness patterns compensate errors, which are actually coming from the open boundary forcing and which are not included in the respective error parameterisation. As the length scale of the roughness patterns is considerably smaller than the length scale of the dominating M2 tide, these corrections could, for example, be related to errors of higher order overtides in the open boundary forcing. The fact that such overtides are present became apparent in the analysis of the Hvide tide gauge data close to the northern open boundary.
The possible ambiguities in the error parameterisations can also give a hint toward requirements concerning the observation system. In our case it is obvious that additional measurements along the open boundary would help to separate possible error sources. In this context it is important to point out that such measurements are of value even if data are only available for a limited time (e.g., as part of dedicated measurement campaigns) or if the temporal sampling is coarse, which is true for many satellite systems.

CONCLUSIONS
A 4DVAR scheme was used to estimate uncertain parameters in a 3D circulation model of the German Bight. The focus of the study was on systematic errors of the model, e.g., bottom roughness, water depth or turbulence parameterisations. A combination of measurements from HF radar, ADCP, and tide gauges was used within a fortnight tuning period. The optimised model was then tested using independent observations acquired within the following month, including a surface drifter data set. To put the results into perspective, the tuned model was compared with model data from the operational system run at BSH.
For this purpose the tuned model uses the same model grid, as well as open boundary forcing and meteo forcing as the operational model.
It was discussed that the procedure is able to reduce systematic errors in the observed quantities, however there is no guarantee that the estimated model parameters are actually closer to their "truth" values. The main problem is that the majority of model parameters is very hard to verify directly and one has to rely on observations, which are connected to the considered parameters in a complicated way. In particular, this means it is possible that there are ambiguities, where the simulation of an observed quantity maybe improved in different ways, i.e., by different combinations of uncertain model parameter adjustments and it is not immediately clear, which of these should be used or disregarded. This situation can be improved by extending the variety of observations in order to reduce the ambiguities in the mapping of model parameters to observed quantities.
It was shown that the optimisation process lead to an overall improved agreement with HF radar and tide gauge measurements both for the tuning period and the test period. For the ADCP observations only minor improvements or even slight deteriorations were found. A direct comparison of drifter data with surface velocities from the BSHcmod showed significantly higher errors compared to the tuned IMCO model. However, very comparable results are achieved, if the BSH drift model is used as a postprocessing step to estimate the surface velocities. Possible reasons for this behaviour were discussed and it seems that the coarse resolution of the upper boundary layer in the BSH model is one important factor. Concerning the role of Stokes drift it was not possible to draw a definite conclusion. It appears that the IMCO parameterisation of the boundary layer can to some extend mimic stoke drift effects, but further investigations are certainly necessary to achieve a better understanding of this issue.
The optimisation lead to an increase of water depth by about 5%. The open boundary forcing was adjusted by the 3DVAR scheme in a way consistent with a slightly increased speed of the tidal wave propagation. The adjustments of the tidal amplitudes along the open boundary indicated a higher tidal dissipation in the tuned model compared to the BSH model.
The study has shown that the use of variational methods for the optimisation of coastal numerical models has big potential if suitable observation data are available. In the presented work a combination of suitable observations and an adequate optimisation procedure lead to simulation improvements with respect to an established operational model, which already showed good performance. For a dynamical consistent correction of the 3D circulation the use of profile information, e.g., from ADCP has a high value, because these data provide information on internal friction processes. It became evident as well, that there are potential ambiguities with respect to error parameterisations, for example with regard to errors in the model interior and errors in the open boundary forcing. The benefit of observational data along the open boundary was emphasised, even in case that such data have limitations with regard to time span or temporal sampling. Furthermore, it appeared that certain ambiguities in the inversion process require the additional use of a numerical wave model, ideally two-way coupled to the circulation model.
The study is of more general interest, because the focus on systematic model errors has general consequences for observation data requirements. The presented analysis has demonstrated that such errors can still be a significant factor in existing operational models and that work on further optimisation is worthwhile. The frequency of observation data is less critical for model tuning compared to operational data assimilation. This is of particular relevance for the assessment of existing and future satellite data, which often lack temporal resolution, but which can still be of high value for model optimisation. The strong spatial heterogeneity of model errors found in this study call for observations with high spatial resolutions, which are also likely to become more accessible through new monitoring systems in the future. The presented study is of particular interest in the context of the ongoing developments of new satellite based surface current measurement techniques. Using spaceborne data the methodology presented in this study could potentially be applied in a larger number of coastal regions around the world (Gommenginger et al., 2019;Rulent et al., 2020).

DATA AVAILABILITY STATEMENT
The HF radar data are available from the server of the Coastal Observing System for Northern and Arctic Seas (COSYNA) via www.cosyna.de. The drifter data are available via PANGAEA (Carrasco and Horstmann, 2017).

AUTHOR CONTRIBUTIONS
JS-S has contributed to the development and implementation of the 4DVAR system. SF contributed to the presentation and discussion of output from the operational CMOD model and the associated drift module. JH contributed to the presentation and discussion of HF radar observation data. JS contributed to the discussion of the results, in particular concerning aspects of the surface wave impact. All authors contributed to the article and approved the submitted version.

FUNDING
The presented work has received funding from the Federal Ministry of Education and Research (BMBF) within the Project OceanCurrents (Nr. 03F0822A) as well as from the European Union's Horizon 2020 research and innovation programme within the projects JERICO-S3 (Grant agreement ID: 871153) and IMMERSE (Grant agreement ID: 821926).