-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
502 lines (400 loc) · 14.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
<!DOCTYPE html>
<!--PDF export:
* set screen-resolution to 1024x768
* open index.html in google-chrome
* print to PDF
https://github.com/gnab/remark/issues/50
-->
<html>
<head>
<title>DIVA in Jupyter notebooks</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style type="text/css">
@font-face{
font-family: 'Droid Serif';
src: url('Fonts/DroidSerif.ttf');
}
@font-face{
font-family: 'Droid Serif';
src: url('Fonts/DroidSerif-Bold.ttf');
font-weight: bold;
}
@font-face{
font-family: 'Droid Serif';
src: url('Fonts/DroidSerif-Italic.ttf');
font-style: italic;
}
@font-face{
font-family: 'Droid Serif';
src: url('Fonts/DroidSerif-BoldItalic.ttf');
font-weight: bold;
font-style: italic;
}
@font-face{
font-family: 'Yanone Kaffeesatz';
src: url('Fonts/YanoneKaffeesatz-Regular.ttf');
}
@font-face{
font-family: 'Ubuntu Mono';
src: url('Fonts/UbuntuMono-Regular.ttf');
}
/* @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);*/
body {
font-family: 'Droid Serif';
}
h1, h2, h3 {
font-family: 'Droid Serif';
font-weight: normal;
color: rgb(0,56,201);
}
.titlepage h1 {
font-size: 35px;
}
.center.middle h1 {
color: rgb(0,156,146);
}
.remark-code, .remark-inline-code {
font-family: 'Ubuntu Mono';
}
.titlepage p {
margin: 5px;
}
strong {
color: rgb(204,25,25);
}
img, video {
margin: 5px;
box-shadow: 3px 3px 5px 2px rgba(0,0,0,0.3);
}
img[alt^="logo"] {
height: 60px;
margin: 20px;
}
img[alt*="CDI"] {
width: 100px;
}
img[alt*="Observations:"] {
width: 500px;
float: right;
}
img[alt="Observations: time plot"] {
position: absolute;
top: 180px;
right: 60px;
}
img[alt="Observations: time-profile plot"] {
position: absolute;
top: 205px;
right: 40px;
}
img[alt*="Combine"] {
width: 500px;
float: right;
}
img[alt*="full:"] {
width: 800px;
float: right;
}
img[alt*="right300:"] {
width: 300px;
float: right;
}
img[alt*="right450:"] {
width: 450px;
float: right;
}
img[alt*="right500:"] {
width: 500px;
float: right;
}
img[alt*="WMS_tile"] {
width: 350px;
float: right;
border: 1px solid black;
}
img[alt*="half:"] {
width: 350px;
/*float: right;*/
}
img[alt*="jh:"] {
width: 730px;
/*float: right;*/
}
img[alt*="jl:"] {
width: 430px;
float: right;
}
img[alt*="synetic:"] {
width: 500px;
float: right;
}
/* http://stackoverflow.com/questions/16311164/css-box-shadow-is-so-dark-when-printed*/
@media print {
img, video {
box-shadow: none;
-webkit-box-shadow: none;
}
}
</style>
</head>
<body>
<textarea id="source">
class: center, middle, titlepage
# Introduction to Data-Interpolating Variational Analysis
Alexander Barth, Charles Troupin, Aida Alvera-Azcárate, and Jean-Marie Beckers
Link to these slides:
https://tinyurl.com/DIVAnd-VRE
GHER, University of Liège, Belgium
![logo](Fig/logo_ulg2.svg)
![logo](Fig/GHER.svg)
![logo](Fig/seadatacloud.png)
---
# What is DIVA?
![right300:](Fig/Divand_realistic_example.svg)
* DIVA: Data Interpolating Variational Analysis
* Objective: __derive a gridded climatology from in situ observations__
* The variational inverse methods aim to derive a continuous field which is:
* __close to the observations__ (it should not necessarily pass through all observations because observations have errors)
* "__smooth__"
---
# Draftman spline
* Splines are a type of curve
* Originally developed for ship-building and aircraft design (before computer modelling)
* Draw a smooth curve through a set of points.
* Placing metal weights (called knots or ducks) at the control points
* bending a thin metal or wooden rod (the spline) through the weights.
http://pages.cs.wisc.edu/~deboor/draftspline.html
---
# Cost function
* Formalized via a cost function:
$$
J[\varphi] = \sum\_{j=1}^{N\_d} \mu\_{j}[d\_{j}-\varphi({\mathbf x}\_{j})]^{2} + \|| \varphi- \varphi\_{b} \|| ^{2}
$$
where $d\_{j}$ are the measurements at the location ${\mathbf x}\_j$ and their weights $\mu\_j$, $\varphi\_{b}$ is a background estimate of the field.
The norm in the previous equation has a particular form:
$$
\|| \varphi \|| ^{2} = \int_\Omega \frac{1}{L^4} (\nabla^2 \varphi)^2 + \frac{2}{L^2} (\nabla \varphi)^2 + \varphi^2 \; dx
$$
where $L$ is the correlation length-scale.
---
# Simple example
![right450:](Fig/simple_example.png)
* Two observations at the location (-0.5,0) and (0.5,0)
* Both values are equal to 1 but the relative expected error variances are 0.5 and 1 respectively.
* Correlation-length scale is 0.2
---
# Topography
* decouples basins based on __topography__
<img src="Fig/diva_odv_panama.png" style="width: 600px">
---
# Ocean currents
<!--<img src="Fig/orca_test_divand_adv_point_2d.svg" style="width: 200px: float: right">-->
![right450:](Fig/orca_test_divand_adv_point_2d.svg)
* __ocean currents__ can be taken into account
* Background covariance (left panels) relative to the location marked by a cross and surrounding grid points and background variance (right panels). The upper (lower) panels corresponds to the case without (with) advection constrain.
---
# Error variance estimation
<img src="Fig/cpme.png" style="width: 400px; float: left; margin-right: 40px">
<img src="Fig/scaled_error.png" style="width: 400px; float: left; margin-right: 40px">
* data distribution general uneven
* the expected error of the climatology thus not constant
* where we have more data, a smaller error is expected
* for some application, it is peferable to mask areas where the expected error is high
---
# Outlier
<img src="Fig/DIVAnd_qc0.png" style="width: 350px; float: left">
<img src="Fig/DIVAnd_qc1.png" style="width: 350px; float: left">
<img src="Fig/DIVAnd_qc2.png" style="width: 350px; float: left; margin-right: 40px">
* outliers have generally quite different values than other data points in the vincinity
* analysis represent the mean state smoothed over a certain length-scale
* the residual is the difference between the observations and the analysis
* outliers have often large residuals
---
# Ways to use DIVAnd
![right450:](Fig/example_jupyterhub.png)
* Open source: https://github.com/gher-ulg/DIVAnd.jl
* Integration with __Jupyter notebooks__ (SeaDataCloud Virtual Research Environment)
* DIVA is integrated in __Ocean Data View__
* __REST interface__ in development
* Play with DIVAnd: http://data-assimilation.net/Tools/divand_demo/html/
---
# Example: Chlorophyll-a data product
![right450:](Fig/DIVA_chla.png)
* 6-year running average (previously 10-year running average) analysis
* Developed by AU-BIOS (Denmark), HCMR (Greece), Ifremer (France), NIMRD (Romania), SMHI (Sweden)
* Only the interpolated field in the proximity of the observations is shown
* Interpolated field on the full domain is available
* Used/developped in projects: SeaDataNet/SeaDataCloud, EMODnet Chemistry, EMODnet Physics, EMODnet Biology
* HPC application: HPC Phidias
* Well suited for HPC environements (to statisfy CPU and memory resources)
---
# DIVAnd and DIVA
* DIVA: Fortran tool with shell scripts
* DIVAnd: rewrite of DIVA in __Julia__ (DIVAnd.jl)
* Julia: good trade-off between __efficiency__ of a compiled language and __flexibility__ of a dynamic language
* Facilitate the installation:
* Use __Jupyter notebooks__ fully configured environment for DIVAnd.jl
* __Docker container__ allows one to easily replicate these environments
* *Are you familiar with a programming language? If yes, which?*
---
![full:](Fig/julia-origin.svg)
---
# Jupyter notebooks
![right300:](Fig/example_jupyterhub.png)
* Integrated web environment
* __Computing__
* Interactive
* *Ju*lia, *Py*thon, *R*,...
* __Visualization__
* __Documentation__
* High-quality type setting and equations (Latex)
* Export to HTML and PDF (among others)
* Easy to __share__, on e.g. nbviewer.jupyter.org and github.com
* Facilitate __reproducibility__ and peer-review (of DIVA climatologies in particular)
* Significant community around Jupyter notebooks
* Also involvement of players outside of the scientific community (Google, Microsoft with Azure ML)
* Jupyter notebooks: __single__ user
---
# Jupyter architecture
![](Fig/jupyter.svg)
<!--
# Jupyterhub
* __Multiple users__
* Web-proxy in front of jupyter
* __Authentication__:
* OAuth, LDAP, ...
* __Isolation__:
* Systemd-nspawn (light-weight namespace containers in Linux), Docker containers, ...
-->
---
# Jupyterhub architecture
Jupyterhub: __multiple__ users
![jh:](Fig/jupyterhub.svg)
---
# Jupyter lab
![jl:](Fig/jupyterlab.png)
* Jupyter lab interface: more similar to an Integrated Development Environment (IDE)
* Compatible with the same notebook format
---
# Overview
* Overview of main compenets in the Virtual research environement used during this workshop
<img src="Fig/VRE-overview.svg" width="500px" />
---
# Jupterhub
* __Docker containers__, preinstalled with Julia and various Julia packages:
* Plotting library (PyPlot) and a more specialized library for ocean data
* DIVAnd
* ...
* Julia packages are precompiled
* Transfer files via __WebDAV__ in Julia:
* Using explicit download and upload requests
```julia
# download from NextCloud to Jupyter Hub
get("file_in_nextcloud.nc","file_in_jupyterhub.nc")
# upload from Jupyter Hub to NextCloud
put("file_in_jupyterhub.nc","file_in_nextcloud.nc")
```
<!--
<video autoplay loop>
<source src="Fig/notebook.webm" type='video/webm; codecs="vp8, vorbis"' />
<source src="Fig/notebook.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
</video>
-->
---
class: middle
# Conclusions
* DIVAnd and DIVA are open source and available under the GPL licences
* New approach to generate DIVA climatologies using a cloud computing infrastructure
* Template of jupyter notebooks are be provided which users can adapt
* Improve the __consistency__ between product
* Facilitate __reproducibility__
* Jupyter notebook is not a software specific to SeaDataCloud
* Users might already be familiar with Jupyter notebooks
* But if not, learning to work with Jupyter notebooks can also be useful in other contexts
* Jupyter can easily installed on a local machine
* Jupyterhub:
* Docker allows to provide a __standardized computing environment__ to all users
* The jupyter notebook can be used to fully __document the generation of the climatology__
---
class: middle
# Organization
* Only a subset of the notebooks will be covered
* Notebooks (directory __work/DIVAnd-Workshop/Exercises/__)
* Presentation notebooks (new notebook from scratch)
* 02-Julia-introduction.ipynb
* 06-topography.ipynb
* 09-ODV-data-import.ipynb
* 90-full-analysis.ipynb
* Exercices for the Workshop are the folder __work/DIVAnd-Workshop/Exercises/__
* Solutions are in corresponding files in work/DIVAnd-Workshop/
<!---* Some limiations remain:
* Need a persistent connection, no possibility to reconnect to a running session-->
<!-- https://github.com/jupyter/notebook/issues/1150 -->
</textarea>
<script src="remark-latest.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS_HTML&delayStartupUntil=configured" type="text/javascript"></script>
<!--<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML&delayStartupUntil=configured" type="text/javascript"></script>-->
<!--<script src="mathjax/MathJax.js" type="text/javascript"></script>-->
<script type="text/javascript">
var slideshow = remark.create();
// Setup MathJax
MathJax.Hub.Config({
tex2jax: {
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
inlineMath: [['$','$'], ['\\(','\\)']],
processEscapes: true
},
TeX: { extensions: ["color.js"] }
});
MathJax.Hub.Configured();
</script>
</body>
</html>
<!-- LocalWords: Slideshow nd matlab argo whos Attr Tobs latobs UTC
-->
<!-- LocalWords: lonobs timeobs datenum datevec datestr colorbar nc
-->
<!-- LocalWords: caxis Outliers outliers Bathymetry GEBCO ncdisp pn
-->
<!-- LocalWords: bathymetry ncread lon ndgrid pcolor divand Tmean
-->
<!-- LocalWords: Tanom len moddim interpn isnan repmat po lentime
-->
<!-- LocalWords: clf dpng yyyy png outlier OceanBrowser url rgb px
-->
<!-- LocalWords: Kaffeesatz titlepage img rgba CDI situ Sylvain OGS
-->
<!-- LocalWords: Watelet Troupin Alvera Azcarate Giorgio Santinelli
-->
<!-- LocalWords: Gerrit Hendriksen Alessandra Giorgetti Beckers EPS
-->
<!-- LocalWords: GHER Liège SOCIB Deltares Variational gridded SMHI
-->
<!-- LocalWords: variational NetCDF SeaDataNet EMODNET Metadata SVG
-->
<!-- LocalWords: OPeNDAP Centred WebM revalidation distrib EDMO OGC
-->
<!-- LocalWords: oceanbrowser abarth localhost webm AGPL matplotlib
-->
<!-- LocalWords: WMS WFS src Yanone webkit multi zlib ammonium HDF
-->
<!-- LocalWords: chunked GetMap Azcárate Diviacco Leadbetter Glaves
-->
<!-- LocalWords: doi Jupyter climatologies workflow jl PDF jupyter
-->
<!-- LocalWords: workflows reproducibility Jupyterhub OAuth LDAP jh
-->
<!-- LocalWords: Systemd SeaDataCloud preinstalled PyPlot ZMQ CAS
-->
<!-- LocalWords: DIVAnd precompiled login jupyterhub EUDATs WebDAV
-->
<!-- LocalWords: github nspawn namespace synetic Datasets SDC SDN
-->
<!-- LocalWords: dataset datasets metadata ODV Ju lia Py thon EUDAT
-->
<!-- LocalWords: OpenStack CINECA Lasheras Mourre Joaquín Tintoé
-->
<!-- LocalWords: NODC
-->