-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvisualisation.html
594 lines (518 loc) · 25.6 KB
/
visualisation.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
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="description" content="Sediment Transport Geological Scale">
<meta name="author" content="Tristan Salles">
<title>SgFm - Sediment Transport @ Geological Scale</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="css/freepage.css" rel="stylesheet" type="text/css">
<!-- Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<!-- Favicon -->
<link rel="icon" type="image/png" href="img/favicon.png" />
<link rel="shortcut icon" href="img/favicon.png" />
<!-- IE8 support for HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" href="http://yandex.st/highlightjs/8.0/styles/solarized_light.min.css">
<script src="http://yandex.st/highlightjs/8.0/highlight.min.js"></script>
<script>
hljs.tabReplace = ' ';
hljs.initHighlightingOnLoad();
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-28324363-2', 'lecode-model.github.io');
ga('send', 'pageview');
</script>
</head>
<body id="page-top" class="overview">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://tristan-salles.github.io/SGFM-website/index.html">SgFm framework</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="dropdown">
<a class="navbar-brand" href="#" data-toggle="dropdown"><span class="glyphicon glyphicon-th-large" style="vertical-align:top; font-size:15px;"></span></a>
<ul class="dropdown-menu">
<li><a href="http://tristan-salles.github.io/SGFM-website/overview.html" data-toggle="modal">
<span style="font-family:Montserrat; font-size:17px; font-weight:normal;">Lecode Overview</a></span></li>
<li><a href="http://tristan-salles.github.io/SGFM-website/installation.html">
<span style="font-family:Montserrat; font-size:17px; font-weight:normal;">Installation Guide</a></span></li>
<li><a href="http://tristan-salles.github.io/SGFM-website/input.html">
<span style="font-family:Montserrat; font-size:17px; font-weight:normal;">XmL Input File</a></span></li>
<li><a href="http://tristan-salles.github.io/SGFM-website/GISinput.html">
<span style="font-family:Montserrat; font-size:17px; font-weight:normal;">GIS Input Generation</a></span></li>
<li><a href="http://tristan-salles.github.io/SGFM-website/visualisation.html">
<span style="font-family:Montserrat; font-size:17px; font-weight:normal;">Visualisation Tips</a></span></li>
<li><a href="http://tristan-salles.github.io/SGFM-website/cookbook.html">
<span style="font-family:Montserrat; font-size:17px; font-weight:normal;">Cookbook Examples</a></span></li>
</ul>
</li>
</ul>
<!--/div>
<!-- Collect the nav links, forms, and other content for toggling -->
<!--div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"-->
<ul class="nav navbar-nav navbar-right">
<li class="hidden">
<a href="#page-top"></a>
</li>
<li class="page-scroll">
<a href="#structure">Structure</a>
</li>
<li class="page-scroll">
<a href="#paraview">Paraview</a>
</li>
<li class="page-scroll">
<a href="#fatiando">Seismic</a>
</li>
<li class="page-scroll">
<a href="#geocell">GeoCellular</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
<header>
<div class="container">
<div class="row">
<div class="col-lg-12">
<img class="img-responsive" src="img/visual.png" alt="">
<div class="intro-text">
<span class="name">Post Processing Tips</span>
<span class="skills">Exploring Lecode Output</span>
</div>
</div>
</div>
</div>
</header>
<section id="structure">
<div class="container">
<div class="row">
<div class="col-lg-12">
<br>
<h2>Lecode output structure</h2>
</div>
</div>
<div class="row">
<div class="col-lg-12 text-left">
<p>
For each <code><outputTime></code> step, <strong>Lecode</strong> generates a series of output files. These files are stored on a local folder which name is defined in the <code><struct-output></code> structure within the <a href="http://lecode-model.github.io/SGFM/input.html" target="_blank">XmL Input</a> file. <br>
The <code><OutputDirectory></code> contains two subfolders: <br>
<br>
<span class="glyphicon glyphicon-ok-sign" style="vertical-align:center; font-size:15px;"></span> <code>runfiles</code> which contains information for checkpointing and restart.<br>
<br>
<span class="glyphicon glyphicon-ok-sign" style="vertical-align:center; font-size:15px;"></span> <code>outputs</code> which contains information about stratigraphy, flow walkers and TIN. <br>
<br>
The <code>outputs</code> directory mostly contains binary <strong>HdF5</strong> files written at each time step and for each processor. For each time step, these <strong>Hdf5</strong> files are bundle within a <strong>XmF</strong> file containing the collection of attributes (both for nodes and cells). On top of the output structure, a <strong>Xdmf</strong> file is used to wrap time-series informations.
<br><br>
To visualise <strong>Lecode</strong> results a visualisation platform able to read these types of files is required. We recommend using <a href="http://www.paraview.org" target="_blank">Paraview</a> or <a href="https://wci.llnl.gov/codes/visit/" target="_blank">Visit</a> .
<br><br>
To start looking at your outputs and the model evolution through time, it is only necessary to load the <code>_series.xdmf</code> files. Depending on the set of parameters defined in your simulation, the following <b>time series</b> files will exist:<br>
<br>
<span class="glyphicon glyphicon-star" style="vertical-align:center; font-size:12px;"></span> <code>Stratal_series.xdmf</code> file containing a combination of the <b>Stratigraphic</b> information (mean grain size, sediment proportion, cell thicknesses, layer time...) over all processors and for all time steps; <br>
<br>
<span class="glyphicon glyphicon-star" style="vertical-align:center; font-size:12px;"></span> <code>TIN_series.xdmf</code> file containing the <b>Triangular Irregular Network</b> grid information for all time steps and the associated flow accumulation dataset;<br>
<br>
<span class="glyphicon glyphicon-star" style="vertical-align:center; font-size:12px;"></span> <code>FW_series.xdmf</code> file containing the <b>Flow Walkers</b> information (flow velocity, stream width and depth ...) over all processors and for all time steps;<br>
<br>
<span class="glyphicon glyphicon-star" style="vertical-align:center; font-size:12px;"></span> <code>Ocean_series.xdmf</code> file representing <b>Sea Level</b> fluctuations (if any) for all time steps.
</p>
</div>
</div>
</div>
<div class="col-lg-12 text-center">
<hr class="star-primary">
</div>
</section>
<section id="paraview">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h2>Using Paraview scripts</h2>
</div>
</div>
<div class="row">
<div class="col-lg-12 text-left">
<p>
To look at simulation results such as time series, <code>XmF</code> and <code>XdmF</code> files we recommend to use <a href="http://www.paraview.org" target="_blank">Paraview</a>.
<strong>ParaView</strong> is an open-source, multi-platform data analysis and visualisation application built on top of <code>VTK</code>.
<br>
<br>
In addition to the built-in filters and functionalities embedded in this visualisation software, we have developed several post-processing scripts based on <code>NumPy</code> and <code>VTK</code> libraries.
<br>
These scripts help to generate additional informations from <code>Lecode</code> simulation (<i>e.g.</i>, consecutive time stepping elevation differences to estimate erosion - deposition surfaces through time, or cumulative thickness computation for specific types of materials).
<br>
<br>
Feel free to contact us if you want to get some of these scripts, we will be happy to share ...<br><br>
</p>
</div>
</div>
<!--div class="videowrapper">
<p>
<iframe width="480" height="360" src="//www.youtube.com/embed/e4S4GL3Elak?rel=0" frameborder="0" allowfullscreen></iframe>
<br>
</p>
</div-->
<div class="row">
<div class="col-xs-8 col-xs-offset-2 text-center">
<div class="js-video [vimeo, widescreen]">
<iframe width="640" height="360" src="//www.youtube.com/embed/e4S4GL3Elak?rel=0" frameborder="0" allowfullscreen></iframe>
<br>
</div>
</div>
</div>
<div class="col-lg-10 col-lg-offset-1 text-center">
<a href="#portfolioModal1" class="portfolio-link" data-toggle="modal">
<div class="caption">
<div class="caption-content">
<span style="color:#2c3e50"><i class="fa fa-eye fa-1x"></i> </span>
<span style="color:#2c3e50; font-family:Montserrat; font-size:17px; font-weight:normal;">Cumulative change of elevation programmable filter example</span>
</div>
</div>
</a>
</div>
</div>
<div class="col-lg-12 text-center">
<hr class="star-primary">
</div>
</section>
<section id="fatiando">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h2><SeismicLine> Plugin</h2>
</div>
</div>
<div class="row">
<div class="col-lg-12 text-left">
<p>
<strong>Lecode Seismic Plugin</strong> makes it possible to extract a given cross section within the modelled stratigraphic record along the main axes of the domain. Two files are generated by <strong>Lecode</strong> in the <code>runfiles</code> output folder.<br>
The first records for each node along the desired seismic line: its position on the stratigraphic layer, its mean grain size and its porosity value. <br>
The second gives the envelop (bottom and top locations) of the stratigraphic record.<br>
<br>
Below we provide a seismic script which shows a really simple example of workflow that can be used to extract the seismic attributes from the model for further processing in a seismic modelling framework such <a href="http://fatiando.readthedocs.org/en/releases/install.html" target="_blank">Fatiando</a> or <a href="http://www.reproducibility.org/wiki/Main_Page" target="_blank">RSF Madagascar</a>.<br>
<br>
</p>
</div>
</div>
<div class="col-lg-10 col-lg-offset-1 text-center">
<a href="#portfolioModal2" class="portfolio-link" data-toggle="modal">
<div class="caption">
<div class="caption-content">
<span style="color:#2c3e50"><i class="fa fa-eye fa-1x"></i> </span>
<span style="color:#2c3e50; font-family:Montserrat; font-size:17px; font-weight:normal;">Click here to see a Seismic script example</span>
</div>
</div>
</a>
</div>
<div class="row">
<div class="col-lg-12 text-left">
<p>
Our future goals are to develop some algorithms based on geophysical forward modelling, uncertainty quantification and inversion to minimise global mismatch between stratigraphic predictions and observations.
</p>
</div>
</div>
<div class="row">
<div class="col-lg-10 col-lg-offset-1 text-center"><br>
<img src="figures/seismic.png" class="img-responsive img-centered" alt=""><br>
</div>
</div>
</div>
<div class="col-lg-12 text-center">
<hr class="star-primary">
</div>
</section>
<section id="geocell">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h2><RMSModel> Plugin</h2>
</div>
</div>
<div class="row">
<div class="col-lg-12 text-left">
<p>
The <strong>RMSModel Plugin</strong> is designed to facilitate the export of <strong>Lecode</strong> outputs into a geo-cellular model. This later can then be used to perform reservoir and fluid flow modelling. <br>
<strong>Lecode</strong> created geo-cellular models have been successfully exported and tested with:
<br><br>
<span class="glyphicon glyphicon-ok-sign" style="vertical-align:center; font-size:15px;"></span> <a href="http://www2.emersonprocess.com/en-us/brands/roxar/pages/roxar.aspx" target="_blank">Roxar</a> RMS geological modelling package and,
<br><br>
<span class="glyphicon glyphicon-ok-sign" style="vertical-align:center; font-size:15px;"></span> <a href="http://www.openflowsuite.com/software/temisflow/" target="_blank">TemisFlow</a> a multi-dimensional basin modelling package from BeicipFranlab.
<br>
<br>
</p>
</div>
</div>
</div>
</section>
<footer class="text-center">
<div class="footer-below">
<div class="container">
<div class="row">
<div class="col-lg-12">
Copyright © 2014 - SgFm Framework
</div>
</div>
</div>
</div>
</footer>
<div class="scroll-top page-scroll visible-xs visble-sm">
<a class="btn btn-primary" href="#page-top">
<i class="fa fa-chevron-up"></i>
</a>
</div>
<!-- Portfolio Modals -->
<div class="portfolio-modal modal fade" id="portfolioModal2" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-content">
<div class="close-modal" data-dismiss="modal">
<div class="lr">
<div class="rl">
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-10 col-lg-offset-1">
<div class="modal-body" align="left">
<pre><code>"""
Transforming Lecode irregularly sampled cross section dataset to a regularly spaced grid.
python lecode_gridding.py -s seismic.csv -e envelop.csv -l 54375 -r 108750 -b -2740 -t -470 -d 5
"""
import sys, math, numpy, getopt
from scipy import interpolate
from numpy import *
from scipy import *
import matplotlib
from fatiando import gridder, utils
from fatiando.vis import mpl
#def main(argv):
# Define font size and type
font = {'family' : 'normal',
'size' : 6}
matplotlib.rc('font', **font)
total = len(sys.argv)
if total == 1:
print 'Some required fields are missing'
print 'Use: python lecode_gridding.py -h for parameter declaration'
sys.exit(2)
elif total > 2 and total < 15:
print 'Some required fields are missing'
print 'Use: python lecode_gridding.py -h for parameter declaration'
sys.exit(2)
try:
opts, args = getopt.getopt(sys.argv[1:],"hs:e:l:r:b:t:d:")
except getopt.GetoptError:
print 'Usage: python lecode_gridding.py -s <seismic> -e <envelop> -l <hmin> -r <hmax> -b <vmin> -t <vmax> -d <dx>'
print '-s : name of the seismic file exported from Lecode simulation'
print '-e : name of the envelop file exported from Lecode simulation'
print '-l : regular grid minimal horizontal value (left)'
print '-r : regular grid maximal horizontal value (right)'
print '-b : regular grid minimal vertical value (bottom)'
print '-t : regular grid maximal vertical value (top)'
print '-d : regular grid spacing'
print 'Note: you need to ensure that the vertical and horizontal are both multiple of the specify spacing'
sys.exit(2)
for opt, arg in opts:
if opt == '-h':
print 'Usage: python lecode_gridding.py -s <seismic> -e <envelop> -l <hmin> -r <hmax> -b <vmin> -t <vmax> -d <dx>'
print '-s : name of the seismic file exported from LECODE simulation'
print '-e : name of the envelop file exported from LECODE simulation'
print '-l : regular grid minimal horizontal value (left)'
print '-r : regular grid maximal horizontal value (right)'
print '-b : regular grid minimal vertical value (bottom)'
print '-t : regular grid maximal vertical value (top)'
print '-d : regular grid spacing'
print 'Note: you need to ensure that the vertical and horizontal are both multiple of the specify spacing'
sys.exit()
elif opt == "-s":
ifile = arg
elif opt == "-e":
ofile = arg
elif opt == "-l":
hmin = float( arg )
elif opt == "-r":
hmax = float( arg )
elif opt == "-b":
vmin = float( arg )
elif opt == "-t":
vmax = float( arg )
elif opt == "-d":
dx = float( arg )
# Open and read file from std, and assign data (horizontal, vertical, mean grain size & porosity)
# columns to an array.
x,y,mgz,poro = loadtxt( ifile, skiprows=0, delimiter=',', unpack = True)
# Extensions
hext = int( ( hmax - hmin ) / dx )
vext = int( ( vmax - vmin ) / dx )
# !!! Be careful the shape is defined as ( ny, nx )
shape = ( int( vext ) + 1, int( hext ) + 1 )
# Interpolation
grdx, grdy, gmgz = gridder.interp( x, y, mgz, shape, area=(hmin, hmax, vmin, vmax) , algorithm='cubic', extrapolate=True)
gx, gy, gporo = gridder.interp( x, y, poro, shape, area=(hmin, hmax, vmin, vmax) , algorithm='cubic', extrapolate=True)
# Open and read file from std, and assign first three (horizontal, low, high) columns to an array.
line,low,high = loadtxt( ofile, skiprows=0, delimiter=',', unpack = True)
xnew = linspace(hmin,hmax,int(rint((hmax-hmin)/dx+1)))
# Create the envelop bottom function
bfunc = interpolate.splrep(line,low,s=0)
envbot = interpolate.splev(xnew,bfunc,der=0)
# Create the envelop top function
tfunc = interpolate.splrep(line,high,s=0)
envtop = interpolate.splev(xnew,tfunc,der=0)
# Mask interpolated regular data using the envelope
k = 0
p = 0
vp = zeros(grdx.size)
vs = zeros(grdx.size)
# Here is a simple example which link porosity to velocity using Dominico formula
for i in nditer(grdx):
if k > hext:
k = 0
if grdy[ p ] < envbot[ k ] :
gmgz[ p ] = nan
gporo[ p ] = nan
vp[ p ] = nan
vs[ p ] = nan
elif grdy[ p ] > envtop[ k ] :
gmgz[ p ] = nan
gporo[ p ] = nan
vp[ p ] = nan
vs[ p ] = nan
else:
vp[ p ] = 1.0 / (0.163 + 0.365 * gporo[ p ] )
vs[ p ] = 1.0 / (0.224 + 0.889 * gporo[ p ] )
k = k + 1
p = p + 1
savetxt('seismic_reg.csv',column_stack((grdx, grdy, gmgz, gporo)), fmt='%g', delimiter=',')
# Plot interpolated values
mpl.figure()
mpl.subplot(5, 1, 1)
mpl.title("Lecode line scattered points and cubic-spline envelop")
mpl.scatter(x, y, c=gmgz, label='points')
mpl.plot(xnew,envbot,c="cyan",linewidth=2.5)
mpl.plot(xnew,envtop,c="magenta",linewidth=2.5)
mpl.colorbar()
mpl.subplot(5, 1, 2)
mpl.title("Density map")
mpl.contourf(grdx, grdy, gmgz, shape, 200)
mpl.colorbar()
mpl.subplot(5, 1, 3)
mpl.title("Net 2 Gross map")
mpl.contourf(grdx, grdy, gporo, shape, 200)
mpl.colorbar()
mpl.axis('scaled')
mpl.plot(x, y, '.k', label='data points', alpha=0.4, ms=4 )
mpl.legend(loc='lower right', numpoints=1)
mpl.subplot(5, 1, 4)
mpl.title("S-wave velocity map")
mpl.contourf(grdx, grdy, vs, shape, 200)
mpl.colorbar()
mpl.subplot(5, 1, 5)
mpl.title("P-wave velocity map")
mpl.contourf(grdx, grdy, vp, shape, 200)
mpl.colorbar()
mpl.show()
</code></pre>
</p>
<button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-times"></i> Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="portfolio-modal modal fade" id="portfolioModal1" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-content">
<div class="close-modal" data-dismiss="modal">
<div class="lr">
<div class="rl">
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-10 col-lg-offset-1">
<div class="modal-body" align="left">
<pre><code>'''
This Paraview Programmable Filter will produce a time series of
cumulative elevation changes for your area (erosion/deposition area).
It could easily be adapted to look at the instantaneous elevation change.
Prior to applying the filter, you will need to use the - Merge Blocks -
filter from Paraview with the Points unchecked in the Properties list.
To use the script you will need to choose - vtkPolyData - in the
Output Data Set Type button.
After applying the filter you will have to use the - Delaunay2D -
filter from Paraview to visualise the cumulative elevation change.
'''
# Import Paraview Numpy Library
from paraview.vtk.dataset_adapter import numpyTovtkDataArray
data = inputs[0]
newPoints = vtk.vtkPoints()
# Offset should correspond to the initial deposit layer
# It will work if you started with an uniform thickness
offset = -10000
# Definition of the current top layer
youngestIndex = max(data.PointData['Layer Index'])
# Find the Points within the stratigraphy corresponding to the
# top layer
youngestLayer = data.PointData['Layer Index'] == youngestIndex
# Find the Points corresponding to the bottom layer
# Note in case you want to look at the instantaneous change
# replace it by youngestIndex - 1
oldestLayer = data.PointData['Layer Index'] == 1
# Define the X coordinates
youngestX = data.Points[:,0][youngestLayer].transpose()
# Define the Y coordinates
youngestY = data.Points[:,1][youngestLayer].transpose()
youngestZ = data.Points[:,2][youngestLayer].transpose()
# Define the Z coordinates
# The cumulative change of elevation will coincide with the
# current topography
oldestZ = data.Points[:,2][oldestLayer].transpose()
# Define the cumulative change of elevation
deltaZ = youngestZ - oldestZ + offset
# Create the VTK array grid
coords = hstack((youngestX, youngestY, youngestZ))
Points = numpyTovtkDataArray(coords,name="Points")
newPoints.SetData(Points)
output.SetPoints(newPoints)
# Add the cumulative elevation change property
output.PointData.append(deltaZ, "deltaZ")
</code></pre>
</p>
<button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-times"></i> Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/jquery-1.10.2.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script src="js/classie.js"></script>
<script src="js/cbpAnimatedHeader.js"></script>
<script src="js/freelancer.js"></script>
</body>
</html>