6th Diva user workshopTheory and 2-D version
C. Troupin ([email protected]), M. Ouberdous,A. Barth & J.-M. Beckers
GeoHydrodynamics and Environment Research,University of Liège, Belgiumhttp:// modb.oce.ulg.ac.be/
Roumaillac, October 8–12, 2012
Roumaillac (France), October 8–12, 2012 Diva workshop
Diva: interpolation (gridding) of in situ data
[J.W. Gregory (1916), Cyrenaica, The Geography Journal, 47 (5), 321-342]
Roumaillac (France), October 8–12, 2012 Diva workshop
Diva: interpolation (gridding) of in situ data
Roumaillac (France), October 8–12, 2012 Diva workshop
What is Diva?
DataInterpolatingVariationalAnalysis
What is Diva?a method to produce gridded fielda set of scripts and Fortran programs
What is not Diva?a plotting toola black-boxa numerical model
! gridding and plotting are different tasks
Roumaillac (France), October 8–12, 2012 Diva workshop
DIVA: Data-Interpolating Variational Analysis
Nd data points di • → gridded field
di
ϕ(xj , yj)
Formulation: minimize cost function J [ϕ]
min J [ϕ] =
NXi=1
µi [di − ϕ(xi, yi)]2
data�analysis mis�t
+
ZD
`∇∇ϕ : ∇∇ϕ+ α1∇ϕ ·∇ϕ+ α0ϕ
2´ dD �eld regularity
Roumaillac (France), October 8–12, 2012 Diva workshop
DIVA: Data-Interpolating Variational Analysis
Nd data points di • → gridded field
di
ϕ(xj , yj)
Formulation: minimize cost function J [ϕ]
min J [ϕ] =
NXi=1
µi [di − ϕ(xi, yi)]2
data�analysis mis�t
+
ZD
`∇∇ϕ : ∇∇ϕ+ α1∇ϕ ·∇ϕ+ α0ϕ
2´ dD �eld regularity
Roumaillac (France), October 8–12, 2012 Diva workshop
Four ways to use Diva
1 Command line (batch processing)2 Ocean Data View3 Diva-on-web4 Matlab package
Roumaillac (France), October 8–12, 2012 Diva workshop
Four ways to use Diva
1 Command line (batch processing)
2 Ocean Data View
3 Diva-on-web
4 Matlab package
[R. Schlitzer (2009), Ocean Data View User’s Guide, Version 4.2]
Roumaillac (France), October 8–12, 2012 Diva workshop
Four ways to use Diva
1 Command line (batch processing)2 Ocean Data View3 Diva-on-web4 Matlab package
http:// gher-diva.phys.ulg.ac.be/ web-vis/ diva.html
Roumaillac (France), October 8–12, 2012 Diva workshop
Four ways to use Diva
1 Command line (batch processing)
2 Ocean Data View
3 Diva-on-web
4 Matlab package
Package available athttp:// modb.oce.ulg.ac.be/ mediawiki/ upload/ divaformatlab.zip
Requires executables of Diva (mesh and analysis)
Roumaillac (France), October 8–12, 2012 Diva workshop
A little bit of history
Code development (1990-1996):
Variational Inverse Method (VIM) (Brasseur, 1991, JMS, JGR)cross-validation (Brankart and Brasseur, 1996, JAOT)error computation (Brankart and Brasseur, 1998, JMS;Rixen et al., 2000, OM)
2D-analysis (2006-2007):
set of bash scripts (divamesh, divacalc, . . . )Fortran executablesparameters optimization toolsMatlab/Octave scripts for plotting
3D-analysis (2007-2008):
superposition of 2D layersautomated treatment and optimizationstability constraint (Ouberdous et al.)advanced error computation (Troupin et al., 2012, OM)
Roumaillac (France), October 8–12, 2012 Diva workshop
A little bit of history
4D-analysis (2008-2009):
start from ODV spreadsheetdetrending (with J. Carstensen, DMU)NetCDF 4-D climatology files
Web tools On-line analysis (Barth et al., 2010, Adv. Geosci.)http:// gher-diva.phys.ulg.ac.be/ web-vis/ diva.htmlClimatology viewer:http:// gher-diva.phys.ulg.ac.be/ web-vis/ clim.html
2010 (on-going)transition to Fortran95multivariate approachdata transformation tools4-D graphical interfaceimplementation of source/decay terms. . .
General: user-driven developments
Roumaillac (France), October 8–12, 2012 Diva workshop
A simple example with a few points
Zero background
influence around data pointvariable radius of influencedistance between datapointsseparation by obstaclesconfidence inmeasurements
Roumaillac (France), October 8–12, 2012 Diva workshop
A simple example with a few points
Square domain, data at center
+1
−5 0 5−5
0
5
0
0.2
0.4
0.6
0.8
1influence around data pointvariable radius of influencedistance between datapointsseparation by obstaclesconfidence inmeasurements
Roumaillac (France), October 8–12, 2012 Diva workshop
A simple example with a few points
Square domain, data at center
+1
−5 0 5−5
0
5
0
0.2
0.4
0.6
0.8
1influence around data pointvariable radius of influencedistance between datapointsseparation by obstaclesconfidence inmeasurements
Roumaillac (France), October 8–12, 2012 Diva workshop
A simple example with a few points
Two symmetric data points
−1 +1
−5 0 5−5
0
5
−1
−0.5
0
0.5
1influence around data pointvariable radius of influencedistance between datapointsseparation by obstaclesconfidence inmeasurements
Roumaillac (France), October 8–12, 2012 Diva workshop
A simple example with a few points
Two symmetric data points
−1 +1
−5 0 5−5
0
5
−1
−0.5
0
0.5
1influence around data pointvariable radius of influencedistance between datapointsseparation by obstaclesconfidence inmeasurements
Roumaillac (France), October 8–12, 2012 Diva workshop
A simple example with a few points
Two symmetric data points
−1 +1
−5 0 5−5
0
5
−1
−0.5
0
0.5
1influence around data pointvariable radius of influencedistance between datapointsseparation by obstaclesconfidence inmeasurements
Roumaillac (France), October 8–12, 2012 Diva workshop
A simple example with a few points
Physical barrier
−1 +1
−5 0 5−5
0
5
−1
−0.5
0
0.5
1influence around data pointvariable radius of influencedistance between datapointsseparation by obstaclesconfidence inmeasurements
Roumaillac (France), October 8–12, 2012 Diva workshop
A simple example with a few points
Data at center
+1
−5 0 5−5
0
5
0
0.2
0.4
0.6
0.8
1influence around data pointvariable radius of influencedistance between datapointsseparation by obstaclesconfidence inmeasurements
Roumaillac (France), October 8–12, 2012 Diva workshop
Analysis parameters are related to data
Non-dimensional version:
L = length scale → ∇̃ = L∇ (1)
→ D = L2D̃ (2)
Roumaillac (France), October 8–12, 2012 Diva workshop
Analysis parameters are related to data
Non-dimensional version:
L = length scale → ∇̃ = L∇ (1)
→ D = L2D̃ (2)
J̃ [ϕ] =
NXi=1
µiL2[di − ϕ(xi, yi)]
2
+
ZD̃
“∇̃∇̃ϕ : ∇̃∇̃ϕ+ α1L
2∇̃ϕ · ∇̃ϕ+ α0L4ϕ2”
dD̃
Roumaillac (France), October 8–12, 2012 Diva workshop
Analysis parameters are related to data
Non-dimensional version:
L = length scale → ∇̃ = L∇ (1)
→ D = L2D̃ (2)
J̃ [ϕ] =
NXi=1
µiL2[di − ϕ(xi, yi)]
2
+
ZD̃
“∇̃∇̃ϕ : ∇̃∇̃ϕ+ α1L
2∇̃ϕ · ∇̃ϕ+ α0L4ϕ2”
dD̃
α0 →L for which data-analysis misfit ' regularity term: α0L4 = 1
α1 → influence of gradients: α1L2 = 2ξ, ξ = 1
µiL2 →weight on data: µiL
2 = 4πsignal
noisei
Roumaillac (France), October 8–12, 2012 Diva workshop
Analysis parameters are related to data
Non-dimensional version:
L = length scale → ∇̃ = L∇ (1)
→ D = L2D̃ (2)
J̃ [ϕ] =
NXi=1
µiL2[di − ϕ(xi, yi)]
2
+
ZD̃
“∇̃∇̃ϕ : ∇̃∇̃ϕ+ α1L
2∇̃ϕ · ∇̃ϕ+ α0L4ϕ2”
dD̃
α0 →L for which data-analysis misfit ' regularity term: α0L4 = 1
α1 → influence of gradients: α1L2 = 2ξ, ξ = 1
µiL2 →weight on data: µiL
2 = 4πsignal
noisei
Roumaillac (France), October 8–12, 2012 Diva workshop
Analysis parameters are related to data
Non-dimensional version:
L = length scale → ∇̃ = L∇ (1)
→ D = L2D̃ (2)
J̃ [ϕ] =
NXi=1
µiL2[di − ϕ(xi, yi)]
2
+
ZD̃
“∇̃∇̃ϕ : ∇̃∇̃ϕ+ α1L
2∇̃ϕ · ∇̃ϕ+ α0L4ϕ2”
dD̃
α0 →L for which data-analysis misfit ' regularity term: α0L4 = 1
α1 → influence of gradients: α1L2 = 2ξ, ξ = 1
µiL2 →weight on data: µiL
2 = 4πsignal
noisei
Roumaillac (France), October 8–12, 2012 Diva workshop
Analysis parameters are related to data
Non-dimensional version:
L = length scale → ∇̃ = L∇ (1)
→ D = L2D̃ (2)
J̃ [ϕ] =
NXi=1
µiL2[di − ϕ(xi, yi)]
2
+
ZD̃
“∇̃∇̃ϕ : ∇̃∇̃ϕ+ α1L
2∇̃ϕ · ∇̃ϕ+ α0L4ϕ2”
dD̃
Coefficients α0, α1 and µi related to
1 Correlation length L
2 Signal-to-noise λ
3 Observational noise standard deviation ε2i
Roumaillac (France), October 8–12, 2012 Diva workshop
Main analysis parameters
Correlation length L:
Measure of the influence of datapoints
Estimated by a least-square fit ofthe covariance function
Signal-to-noise ratio λ:
Measure of the confidence indata
Estimated with GeneralizedCross Validation techniques
0 100 2000
0.03
0.06
0.09
0.12
Distance (km)
Cov
aria
nce
data covariancedata used for fittingfitted curve
0.01 0.1 1 9.19 32.42 100
0.6653
0.6764
0.6964
0.7525
λ
Θ
GCVRandom CVCV
Roumaillac (France), October 8–12, 2012 Diva workshop
Parameters: smoothness vs. data influence
Data
0o 2oE 4oE 6oE 8oE 10oE 12oE 36oN
38oN
40oN
42oN
44oN
° C
12
13
14
15
16
17
Over-smoothed field
0o 2oE 4oE 6oE 8oE 10oE 12oE 36oN
38oN
40oN
42oN
44oN
L = 0.3°
λ = 0.01
° C
12
13
14
15
16
17
Roumaillac (France), October 8–12, 2012 Diva workshop
Parameters: smoothness vs. data influence
Data
0o 2oE 4oE 6oE 8oE 10oE 12oE 36oN
38oN
40oN
42oN
44oN
° C
12
13
14
15
16
17
Too strong influence of data
0o 2oE 4oE 6oE 8oE 10oE 12oE 36oN
38oN
40oN
42oN
44oN
L = 1°
λ = 300
° C
12
13
14
15
16
17
Roumaillac (France), October 8–12, 2012 Diva workshop
Parameters: smoothness vs. data influence
Data
0o 2oE 4oE 6oE 8oE 10oE 12oE 36oN
38oN
40oN
42oN
44oN
° C
12
13
14
15
16
17
Good balance
0o 2oE 4oE 6oE 8oE 10oE 12oE 36oN
38oN
40oN
42oN
44oN
L = 2°
λ = 1
° C
12
13
14
15
16
17
Roumaillac (France), October 8–12, 2012 Diva workshop
Minimization with a finite-element method
Field regularity→plate bending problem→ finite-element solver
3oW 0o 3oE 6oE 9oE 12oE
51oN
54oN
57oN
60oN
5oE 10oE 15oE 20oE 25oE
54oN
56oN
58oN
60oN
62oN
64oN
14oE 16oE 18oE 40oN
41oN
42oN
43oN
44oN
45oN
Advantages:
boundaries taken into account
numerical cost (almost independent on data number)
no a posteriori masking
Roumaillac (France), October 8–12, 2012 Diva workshop
Minimization with a finite-element method
Triangular FE only covers sea: J [ϕ] =
NeXe=1
Je(ϕe) (3)
In each element: ϕe(re) = qeT s(re) with
8<:s → shape functionsq → connectorsre → position
(4)(4) in (3) + variational principle
Je(qe) = qeT Keqe − 2qe
T ge +
NdeXi=1
µidi (5)
where
Ke → local stiffness matrixg → vector depending on local data
Roumaillac (France), October 8–12, 2012 Diva workshop
Minimization with a finite-element method
On the whole domain: J(q) = qT Kq− 2qT g +
NdXi=1
µidi (3)
Minimum: q = K−1g (4)
q = K−1 g (5)
Stiffness matrix
Connectors (new unknowns)
Charge vector
Mapping of data on FEM→ transfer operator T2 → g = T2(r)d
Solution at any location→ transfer operator T1 → ϕ(r) = T1(r)q
Results obtained at any location→ ϕ = T1(r)K−1T2(r)d
Roumaillac (France), October 8–12, 2012 Diva workshop