Sensitivity analysis with respect to observations in variational data assimilation for parameter estimation

The problem of variational data assimilation for a nonlinear evolution model is formulated as an optimal control problem to find unknown parameters of the model. The observation data, and hence the optimal solution, may contain uncertainties. A response function is considered as a functional of the optimal solution after assimilation. Based on the second-order adjoint techniques, the sensitivity of the response function to the observation data is studied. The gradient of the response function is related to the solution of a nonstandard problem involving the coupled system of direct and adjoint equations. The nonstandard problem is studied, based on the Hessian of the original cost function. An algorithm to compute the gradient of the response function with respect to observations is presented. A numerical example is given for the variational data assimilation problem related to sea surface temperature for the Baltic Sea thermodynamics model.

Abstract. The problem of variational data assimilation for a nonlinear evolution model is formulated as an optimal control problem to find unknown parameters of the model. The observation data, and hence the optimal solution, may contain uncertainties. A response function is considered as a functional of the optimal solution after assimilation. Based on the second-order adjoint techniques, the sensitivity of the response function to the observation data is studied. The gradient of the response function is related to the solution of a nonstandard problem involving the coupled system of direct and adjoint equations. The nonstandard problem is studied, based on the Hessian of the original cost function. An algorithm to compute the gradient of the response function with respect to observations is presented. A numerical example is given for the variational data assimilation problem related to sea surface temperature for the Baltic Sea thermodynamics model.

Introduction
The methods of data assimilation have become an important tool for analysis of complex physical phenomena in various fields of science and technology. These methods allow us to combine mathematical models, data resulting from observations, and a priori information. The problems of variational data assimilation can be formulated as optimal control problems (e.g., Lions, 1968;Le Dimet and Talagrand, 1986) to find unknown model parameters, such as initial and/or boundary conditions, right-hand sides in the model equations (forcing terms), and distributed coefficients, based on minimization of the cost function related to observations. A necessary optimality condition reduces an optimal control problem to an optimality system which involves the model equations, the adjoint problem, and input data functions. The optimal solution depends on the observation data, and for future forecasts it is very important to study the sensitivity of the optimal solution with respect to observation errors (Baker and Daley, 2000).
The necessary optimality condition is related to the gradient of the original cost function; thus, to study the sensitivity of the optimal solution, one should differentiate the optimality system with respect to observations. In this case, we come to the so-called second-order adjoint problem (Le Dimet et al., 2002). The first studies of sensitivity of the response functions after assimilation with the use of second-order adjoint were done by Le Dimet et al. (1997) for variational data assimilation problems aimed at restoration of initial condition, where sensitivity with respect to model parameters was considered. The equations of the forecast sensitivity to observations in a four-dimensional (4D-Var) data assimilation were derived by Daescu (2008). Based on these results, a practical computational approach was given by Cioaca et al. (2013) to quantify the effect of observations in 4D-Var data assimilation.
The issue of sensitivity is related to the statistical properties of the optimal solution (see Gejadze et al., 2008Gejadze et al., , 2011Gejadze et al., , 2013Shutyaev et al., 2012). General sensitivity analysis in Published by Copernicus Publications on behalf of the European Geosciences Union & the American Geophysical Union.

430
V. Shutyaev et al.: Sensitivity in variational data assimilation variational data assimilation with respect to observations for a nonlinear dynamic model was given by Shutyaev et al. (2017) to control the initial-value function. The dynamic formulation of the problem is important because it shows different implementation options (Gejadze et al., 2018). This paper is based on the results of Shutyaev et al. (2017) and presents the sensitivity analysis with respect to observations in variational data assimilation aimed at restoration of unknown parameters of a dynamic model. We should mention the importance of the parameter estimation problem itself. A precise determination of the initial condition is very important in view of forecasting; however, the use of variational data assimilation is not limited to operational forecasting. In many domains (e.g., hydrology) the uncertainty in the parameters is more crucial than the uncertainty in the initial condition (e.g., White at al., 2003). In some problems the quantity of interest can be represented directly by the estimated parameters as controls. For example, in Agoshkov et al. (2015) the sea surface heat flux is estimated in order to understand its spatial and temporal variability. The problems of parameter estimation are common inverse problems considered in geophysics and in engineering applications (see Alifanov et al., 1996;Sun, 1994;Zhu and Navon, 1999;Storch et al., 2007). In the last years, interest in the parameter estimation using 4D-Var is rising (Bocquet, 2012;Schirber at al., 2013;Yuepeng et al., 2018;Agoshkov and Sheloput, 2017).
We consider a dynamic formulation of the variational data assimilation problem for parameter estimation in a continuous form, but the presented sensitivity analysis formulas with respect to observations do not follow from our previous results for the initial condition problem  and constitute a novelty of this paper. Of course, the initial condition function may also be considered as a parameter; however, in our dynamic formulation we have two equations for the model: one equation for describing an evolution of the model operator (involving model parameters such as righthand sides, coefficients, boundary conditions, etc.) and another equation is considered as an initial condition. This paper is organized as follows. In Sect. 2, we give the statement of the variational data assimilation problem for a nonlinear evolution model to estimate the model parameters. In Sect. 3, sensitivity of the response function after assimilation with respect to observations is studied, and its gradient is related to the solution of a nonstandard problem. In Sect. 4 we derive an operator equation involving the Hessian to study the solvability of the nonstandard problem, and give an algorithm to compute the gradient of the response function. A proof-of-concept analytic example with a simple model is given in Sect. 5 to demonstrate how the sensitivity analysis algorithm works. Section 6 presents an application of the theory to the data assimilation problem for a sea thermodynamics model. Numerical examples are given in Sect. 7 for the Baltic Sea dynamics model. The main results are discussed in Sect. 8.

Statement of the problem
We consider the mathematical model of a physical process that is described by the evolution problem where the initial state u belongs to a Hilbert space X, ϕ = ϕ(t) is the unknown function belonging to Y = L 2 (0, T ; X) with the norm ϕ Y = (ϕ, ϕ) is a Hilbert space (space of control parameters, or control space), and f ∈ Y . Suppose that for a given u ∈ X, f ∈ Y , and λ ∈ Y p , there exists a unique solution ϕ ∈ Y to Eq. (1) with ∂ϕ ∂t ∈ Y . The function λ is an unknown model parameter. Let us introduce the cost function where λ b ∈ Y p is a prior (background) function, ϕ obs ∈ Y obs is a prescribed function (observational data), Y obs is a Hilbert space (observation space), C : Y → Y obs is a linear bounded observation operator, and V 1 : Y p → Y p and V 2 : Y obs → Y obs are symmetric positive definite bounded operators. Let us consider the following data assimilation problem with the aim to estimate the parameter λ: for a given u ∈ X, and f ∈ Y , find λ ∈ Y p and ϕ ∈ Y such that they satisfy Eq. (1), and on the set of solutions to Eq. (1), the functional J (λ) takes the minimum value, i.e., We suppose that the solution of Eq. (3) exists. Let us note that the solvability of the parameter estimation problems (or identifiability) has been addressed, e.g., in Chavent (1983) and Navon (1998). To derive the optimality system, we assume the solution ϕ and the operator F (ϕ, λ) in Eqs. (1)-(2) are regular enough, and for v ∈ Y p find the gradient of the functional J with respect to λ: where φ is the solution to the problem: Here F ϕ (ϕ, λ) : Y → Y, F λ (ϕ, λ) : Y p → Y are the Fréchet derivatives of F (Marchuk et al., 1996) with respect to ϕ and λ, correspondingly, and C * is the adjoint operator to C defined by (Cϕ, ψ) Y obs = (ϕ, C * ψ) Y , ϕ ∈ Y, ψ ∈ Y obs . Let us consider the adjoint operator (F ϕ (ϕ, λ)) * : Y → Y and introduce the adjoint problem: Then Eq. (4) with Eqs. (5) and (6) gives where (F λ (ϕ, λ)) * : Y → Y p is the adjoint operator to F λ (ϕ, λ). Therefore, the gradient of J is defined by From Eqs. (4)- (7) we get the optimality system (the necessary optimality conditions; Lions, 1968): We assume that the system (Eqs. 8-10) has a unique solution. The system (Eqs. 8-10) may be considered as a generalized model A(U ) = 0 with the state variable U = (ϕ, ϕ * , λ), and it contains information about observations. In what follows we study the problem of the sensitivity of functionals of the optimal solution to the observation data.
If the observation operator C is nonlinear, i.e., Cϕ = C(ϕ), then the right-hand side of the adjoint equation (Eq. 9) contains (C ϕ ) * instead of C * and all the analysis presented below is similar.

Sensitivity of functionals after assimilation
In geophysical applications the observation data cannot be measured precisely; therefore, it is important to be able to estimate the impact of uncertainties in observations on the outputs of the model after assimilation.
Let us introduce a response function G(ϕ, λ), which is supposed to be a real-valued function and can be considered as a functional on Y × Y p . We are interested in the sensitivity of G with respect to ϕ obs , with ϕ and λ obtained from the optimality system (Eqs. 8-10). By definition, the sensitivity is defined by the gradient of G with respect to ϕ obs : If δϕ obs is a perturbation on ϕ obs , we get from the optimality system: where δϕ, δϕ * , and δλ are the Gâteaux derivatives of ϕ, ϕ * , and λ in the direction δϕ obs (for example, δϕ = ∂ϕ ∂ϕ obs δϕ obs ). To compute the gradient ∇ ϕ obs G(ϕ, λ), let us introduce three adjoint variables P 1 ∈ Y , P 2 ∈ Y , and P 3 ∈ Y p . By taking the inner product of Eq. (12) by P 1 , Eq. (13) by P 2 , and of Eq. (14) by P 3 and adding them, Then, using integration by parts and adjoint operators, we get 432 V. Shutyaev et al.: Sensitivity in variational data assimilation Here we put Thus, if P 1 , P 2 , and P 3 are the solutions of the following system of equations and due to Eq. (15) the gradient of G is given by We get a coupled system of two differential equations (Eqs. 17 and 18) of the first order with respect to time, and Eq. (19). To study this nonstandard problem (Eqs. 17-19), we reduce it to a single operator equation involving the Hessian of the original cost function.

Operator equation via Hessian and response function gradient
Let us denote the auxiliary variable v = P 3 and rewrite the nonstandard problem  in an equivalent form: Here we have three unknowns: v ∈ Y p , P 1 , and P 2 ∈ Y . Let us write Eqs. (21)-(23) in the form of an operator equation for v. We define the operator H, which acts on w belonging to Y p , by the successive solution of the following problems: Here λ, ϕ, and ϕ * are the solutions of the optimality system (Eqs. 8-10). Then Eqs. (21)-(23) are equivalent to the following equation in Y p : with the right-hand side F defined by where φ * is the solution to the adjoint problem:  (Vainberg, 1964), i.e., for every F there exists a unique Therefore, under the assumption that J (λ) is positive definite on the optimal solution, the nonstandard problem (Eqs. 17-19) has a unique solution P 1 , P 2 ∈ Y , and P 3 ∈ Y p .
Based on the above consideration, we can formulate the following algorithm to compute the gradient of the response function G: and put 3. Solve the direct problem 4. Compute the gradient of the response function as Equation (32) allows us to estimate the sensitivity of the functionals related to the optimal solution after assimilation, with respect to observation data.
Remark 1. In the above consideration, to show the solvability, we have assumed that the direct and adjoint tangent linear problems of the form Remark 2. The analysis presented above is based on the hypothesis that the initial state of the system under observation is known, and that it is only model parameters (boundary conditions, forcing terms, distributed coefficients, etc.) that are to be determined from the observations. Often, a more realistic situation would be one where the assimilation is intended to determine both the initial conditions of the system and, in addition, model parameters (Dee, 2005;Smith et al., 2013). The sensitivity analysis can be applied as well to such a situation. To consider the joint state and parameter estimation problem, we should use the results both of this paper and of the previous one . In this case we need to introduce an additional term related to the initial condition into the cost function (Eq. 2) to find simultaneously u and λ. The optimality system (Eqs. 8-10) will be supplemented by an additional equation related to the gradient of the cost function with respect to u. The Hessian in this case is a 2 × 2 operator matrix, acting on the augmented vector U = (u, λ) T , and all the derivations are made similarly, being, however, more cumbersome and lengthy.
Below we give a proof-of-concept analytic example to show how the algorithm (Eqs. 30-32) works. Then, as an application, we consider a variational data assimilation problem for a sea thermodynamics model.

Proof-of-concept analytic example
Let us consider a simple evolution problem for the ordinary differential equation where u ∈ R; a, λ ∈ R; g = g(t) ≥ 0. Here, in the notations of Sect. 2, we have X = R, Y = L 2 (0, T ), and F (ϕ, λ) = −aϕ + λg. Let us formulate the data assimilation problem to find the parameter λ if we have observation data for ϕ at the end of the time interval t = T . We need to minimize the cost function where J (v) = 1 2 ϕ| t = T − ϕ obs 2 , and ϕ is the solution to Eq. (33) with λ = v. Thus, here we have Y p = R, V 1 = 0, V 2 = 1, and Cϕ = ϕ| t=T . In this case, the optimality system 434 V. Shutyaev et al.: Sensitivity in variational data assimilation (Eqs. 8-10) has the form: It is easy to see that the problem of data assimilation (Eqs. 33-34) has a unique solution Indeed, if λ has the form (Eq. 38), the solution of the problem (Eq. 33) satisfies ϕ| t=T = ϕ obs , and the functional J from Eq. (34) attains its minimal value J = 0. In this case ϕ * = 0, and the optimality system (Eqs. 35-37) is satisfied. Let us consider the response function in the form Let a = 0. After assimilation, taking into account the solution of the problem (Eq. 33), we have where λ opt is given by Eq. (38). Then, by differentiation of G with respect to ϕ obs we have the gradient Let us now apply the algorithm (Eqs. 30-32) to compute the gradient of the function G. Since ∂G ∂ϕ = 1, and (F ϕ (ϕ, λ)) * = −a, then on the first step of the algorithm, we solve the problem (Eq. 30) and get the solution Taking into account that ∂G/∂λ = 0 and (F ϕ (ϕ, λ)) * φ * = (g, φ * ), we get F = (g, φ * ), i.e., On the second step of the algorithm, one needs to solve the equation Hv = F with the Hessian H defined by Eqs. (24)-(26). Since all the second-order derivatives of F (ϕ, λ) equal zero, then it is easily seen that H in this case is the operator of multiplication by the scalar where ψ(t) is the solution of the problem (Eq. 33) with u = 0, and λ = 1. Then, after the second step of the algorithm we get On the third step of the algorithm, we need to solve the problem (Eq. 31). Since F λ (ϕ, λ) = g, the solution of this problem has the form P 2 (t) = vψ(t). Finally, using Eq. (32), we get the gradient of G with respect to ϕ obs : Moreover, since ϕ 1 = ψ(T ), then from Eqs. (46) and (43) we have Thus, the gradient obtained by the algorithm (Eqs. 30-32) exactly coincides with the value of the gradient obtained in Eq. (41) by direct differentiation, which is the expected result.

Data assimilation problem for a sea thermodynamics model
Consider the sea thermodynamics problem in the form (Marchuk et al., 1987): where T = T (x, y, z, t) is an unknown temperature function, t ∈ (t 0 , t 1 ), (x, y, z) ∈ D = × (0, H ), ⊂ R 2 , H = H (x, y) is the function of the bottom relief, Q = Q(x, y, t) is the total heat flux, U = (u, v, w), a T = diag((a T ) ii ), (a T ) 11 = (a T ) 22 = µ T , (a T ) 33 = ν T , and f T = f T (x, y, z, t) are given functions. The boundary of the domain ≡ ∂D is represented as a union of four disjoint parts S , w,op , w,c , and H , where S = (the unperturbed sea surface), w,op is the liquid (open) part of vertical lateral boundary, w,c is the solid part of the vertical lateral boundary, H is the sea bottom, U (−) n = (|U n | − U n )/2, and U n is the normal component of U . The other notations and a detailed description of the problem statement can be found in Agoshkov et al. (2008).
Equation (48) can be written in the form of an operator equation: where the equality is understood in the weak sense, namely, in this case L, F, and B are defined by the following relations: and the functions a T , Q T , f T , and Q are such that Eq. (50) makes sense. The properties of the operator L were studied by Agoshkov et al. (2008). Due to Eq. (50), Eq. (49) is considered in Y * = L 2 (t 0 , t 1 ; (W 1 2 (D)) * ), and the operator B : L 2 ( × (t 0 , t 1 )) → Y * maps the function Q ∈ L 2 ( × (t 0 , t 1 )) into the function BQ ∈ Y * such that (BQ, T ) = Q T z=0 d , ∀ T ∈ W 1 2 (D). Therefore, BQ is a linear and bounded functional on L 2 (0, T ; W 1 2 (D)). Consider the data assimilation problem for the sea surface temperature (see Agoshkov et al., 2008). Suppose that the function Q ∈ L 2 ( × (t 0 , t 1 )) is unknown in Eq. (48). Let T obs (x, y, t) also be the function on ≡ ∪∂ obtained for t ∈ (t 0 , t 1 ) by processing the observation data, and this function in its physical sense is an approximation to the surface temperature function on , i.e., to T z = 0 . We suppose that T obs ∈ L 2 ( × (t 0 , t 1 )), but the function T obs may not possess greater smoothness and hence it cannot be used for the boundary condition on S . We admit the case when T obs is defined only on some subset of × (t 0 , t 1 ) and denote the indicator (characteristic) function of this set by m 0 . For definiteness sake, we assume that T obs is zero outside this subset.
Consider the data assimilation problem for the surface temperature in the following form: find T and Q such that where and Q (0) = Q (0) (x, y, t) is a given function, and α = const > 0.
For α > 0 this variational data assimilation problem has a unique solution. The existence of the optimal solution follows from the classic results of the theory of optimal control problems (Lions, 1968), because it is easy to show that the solution to Eq. (48) continuously depends on the flux Q (a priori estimates are valid in the corresponding functional spaces), the functional J is weakly lower semi-continuous, and the space of admissible controls L 2 ( × (t 0 , t 1 )) is weakly compact.
For α = 0 the problem does not always have a solution, but, as was shown by Agoshkov et al. (2008), there is unique and dense solvability, and it allows one to construct a sequence of regularized solutions minimizing the functional, which is related to a sequence of coefficients α n , with α n → 0 when n → ∞.
The optimality system determining the solution of the formulated variational data assimilation problem according to the necessary condition grad J = 0 has the form: where L * is the operator adjoint to L.
Here the boundary-value function Q plays the role of λ from Sect. 2, ϕ = T , the operator F has the form F (T , Q) = 436 V. Shutyaev et al.: Sensitivity in variational data assimilation −LT + BQ, and F T = −L, F Q = B. Since the operator F (T , Q) is bilinear in this case, the Hessian H acting on some ψ ∈ L 2 ( × (t 0 , t 1 )) is defined by the successive solution of the following problems: To illustrate the above-presented theory, we consider the problem of sensitivity of functionals of the optimal solution Q to the observations T obs . Let us introduce the following functional (response function): where k(x, y, t) is a weight function related to the temperature field on the sea surface z = 0. For example, if we are interested in the mean temperature of a specific region of the sea ω for z = 0 in the interval t −τ ≤ t ≤ t, then as k we take the function where mes ω denotes the area of the region ω. Thus, Eq. (59) is written in the form: Equation (61) represents the mean temperature averaged over the time interval t − τ ≤ t ≤ t for a given region ω. The functionals of this type are of most interest in the theory of climate change (Marchuk, 1995;Marchuk et al., 1996).
In our notations, Eq. (59) may be written as We are interested in the sensitivity of the functional G(T ), obtained for T after data assimilation, with respect to the observation function T obs .
By definition, the sensitivity is given by the gradient of G with respect to T obs : Since ∂G ∂T = Bk, then, according to the theory presented in Sect. 4, to compute the gradient (Eq. 62) we need to perform the following steps: 1. For k defined by Eq. (60) solve the adjoint problem and put = B * φ * .

Solve the direct problem
4. Compute the gradient of the response function as dG dT obs = m 0 P 2 z = 0 .
Equation (65) allows us to estimate the sensitivity of the functionals related to the mean temperature after data assimilation, with respect to the observations on the sea surface.

Numerical example for the Baltic Sea dynamics model
The numerical experiments have been performed using the three-dimensional numerical model of the Baltic Sea hydrothermodynamics developed at the Institute of Numerical Mathematics, Russian Academy of Sciences on the base of the splitting method (Zalesny et al., 2017) and supplied with the assimilation procedure (Agoshkov et al., 2008) for the surface temperature T obs with the aim to reconstruct the heat fluxes Q.
The object of simulation is the Baltic Sea water area. The parameters of the considered domain and its geographic coordinates can be described in the following way: the σ -grid is 336 × 394 × 25 (latitude, longitude, and depth, respectively). The first point of the "grid C" (Zalesny et al., 2017) has the coordinates 9.406 • E and 53.64 • N. The mesh sizes in x and y are constant and equal to 0.0625 and 0.03125 degrees, respectively. The time step is t = 5 min. The initial condition for the whole model, including T 0 , was chosen in the following way: the model was started running with zero initial conditions and ran with atmospheric forcing obtained from reanalysis of about 20 years, and after that the result of calculation was taken as an initial condition for further running of the model. The assimilation procedure worked only during some time windows. To start the assimilation procedure for the heat flux estimation, the initial condition was taken as a model forecast for the previous time interval.
The Baltic Sea daily-averaged nighttime surfacetemperature data were used for T obs . These are the data of the Danish Meteorological Institute based on measurements of radiometers (AVHRR, AATSR, and AMSRE) and spectroradiometers (SEVIRI and MODIS) (Karagali, 2012). Data interpolation algorithms were used (Zakharova et al., 2013) to convert observations on computational grid of the numerical model of the Baltic Sea thermodynamics. For each time step the heat flux was determined at each surface point; therefore, the number of scalar parameters to be determined were equal to the number of scalar observations.
The mean climatic flux obtained from the NCEP (National Centers for Environmental Prediction) reanalysis was taken for Q (0) . We need to mention that Q (0) has a physical meaning here, it is not only an initial guess but also a parameter calculated from atmospheric data and taken in the model for temperature boundary condition on the sea surface when the model runs without the assimilation procedure.
Using the hydro-thermodynamics model mentioned above, which is supplied with the assimilation procedure for the surface temperature T obs , we have performed calculations for the Baltic Sea area where the assimilation algorithm worked only at certain time moments t 0 ; in this case t 1 = t 0 + t.
The aim of the experiment was the numerical study of the sensitivity of functionals of the optimal solution Q to observation errors in the interval (t 0 , t 1 ).
Implementing the assimilation procedure, we considered a system of the form in Eqs. (53)-(55), where Eqs. (53)-(54) mean the finite-dimensional analogues of the corresponding problems (Agoshkov et al., 2008). For the statement of a data assimilation problem we introduce the cost function (Eq. 52) with a regularization parameter α, which weights the squared difference |Q − Q (0) | 2 . Since in all numerical experiments α was chosen very small, the impact of the first term in the functional was also small, and therefore Q was different from Q (0) .
We use here the SI units, namely K (kelvin) is used for temperature, m s −1 for velocities, and mK s −1 for the heat flux Q. The parameter α is defined as s 2 m −2 to give both terms in Eq. (52) the same dimension. It is easily seen that in this case the units of the gradient dG dT obs from Eq. (65) are defined as m −2 s −1 .
Let us present some results of numerical experiments. The calculation results for t 0 = 50 h (600 time steps for the model) are presented in Fig. 1 showing the gradient of the functional G(T ) defined by Eq. (61) and related to the mean  temperature after data assimilation, with respect to the observations on the sea surface, according to Eqs. (63)-(65). Here ω = , τ = t, t = t 1 , and α = 10 −5 s 2 m −2 .
We can see the sub-areas (in red) in which the functional G(T ) is most sensitive to errors in the observations during assimilation. The largest values of the gradient of G(T ) correspond to the points x, y lying near the regions with a small depth (cf. sea topography, Fig. 2). One explanation of this phenomenon may be the fact that in the areas with depths of about 50 m, rapid convection occurs in the upper mixed layer. With the assimilation of the surface temperature, information is transmitted faster to shallower depths, which in turn contributes to a higher sensitivity to data in these places, in contrast to deeper regions.
Remark 3. We use the discretize-then-optimize approach, and for numerical experiments all the presented equations are understood in a discrete form, as finite-dimensional analogues of the corresponding problems, obtained after approximation. This allows us to consider model equations as a perfect model, with no approximation errors. Therefore, the accuracy of the sensitivity estimates given by Eqs. (63)-(65) are determined by the accuracy of solving the Hessian equation Hχ = (step 2 of the algorithm). Due to Eqs. (56)-(58), this equation is equivalent to a linear data assimilation problem, and an approximate solution to the minimization problem is obtained by an iterative procedure.
The above studies allow us to solve the problem of the definition of sea sub-areas in which the functional of the optimal solution is most sensitive to errors in the observations during variational data assimilation, when the error values are not a priori known.

Conclusions
In this paper we have considered numerical algorithms to study the sensitivity of functionals of the optimal solution of the variational data assimilation problem aimed at the reconstruction of unknown parameters of the model. The optimal solution obtained as a result of assimilation depends on the observations that may contain uncertainties. Computing the gradient of the functionals with respect to observations reduces to the solution of a nonstandard problem which is a coupled system involving direct and adjoint equations with mutually dependent variables. Solvability of the nonstandard problem is related to the properties of the Hessian of the original cost function. An algorithm developed to compute the gradient of the response function is based on the second-order adjoint techniques. A numerical example for the variational data assimilation problem related to sea surface temperature for the Baltic Sea thermodynamics model demonstrates the result of the gradient computation of the response function associated with the mean surface temperature. The presented algorithm may be used to determine the sea sub-areas in which the functionals of the optimal solution are most sensitive to errors in the observations during variational data assimilation.

Data availability. The
Baltic Sea daily-averaged surface-temperature data (Copernicus product ID ST_BAL_SST_L4_REP_OBSERVATIONS_010_016) can be found at the Copernicus Marine Environment Monitoring Service website (http://marine.copernicus.eu/services-portfolio/ access-to-products/).
Competing interests. The authors declare that they have no conflict of interest.
Special issue statement. This article is part of the special issue "Numerical modeling, predictability and data assimilation in weather, ocean and climate: A special issue honoring the legacy of Anna Trevisan ". It is a result of A Symposium Honoring the Legacy of Anna Trevisan -Bologna, Italy, 17-20 October 2017.