Introduction
Introduction Statistics Contact Development Disclaimer Help
tindex.php - cosmo - front and backend for Markov-Chain Monte Carlo inversion o…
git clone git://src.adamsgaard.dk/cosmo
Log
Files
Refs
README
LICENSE
---
tindex.php (15417B)
---
1 <?php
2
3 // reCAPTCHA setup
4 require_once('recaptchalib.php');
5
6 // your secret key
7 $secret = "6LeMrRATAAAAAOdcvVGi6PfR__XGOVoUP7lCqHp1";
8
9 // empty response
10 $response = null;
11
12 // check secret key
13 $reCaptcha = new ReCaptcha($secret);
14
15 // if submitted check response
16 if ($_POST["g-recaptcha-response"]) {
17 $response = $reCaptcha->verifyResponse(
18 $_SERVER["REMOTE_ADDR"],
19 $_POST["g-recaptcha-response"]
20 );
21 }
22
23 // include top of html template
24 include('head.html');
25
26 ?>
27 <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery…
28 <script type="text/javascript" src="js/history-form-prefiller.js…
29 <?php
30
31 if (isset($_GET['wait_id']) && !empty($_GET['wait_id'])) {
32
33 // read status file contents
34 if (!$statusfile = fopen("/home/adc/cosmo/input/status_" . $_GET['wa…
35 echo("Error! Sample data not found.");
36 }
37
38 $status = fgets($statusfile);
39 fclose($statusfile);
40
41 $show_percentage = false;
42 if (strpos($status, '<!--') !== false) {
43 $percentage = preg_replace('/.*<!--/', '', $status);
44 $percentage = preg_replace('/-->/', '', $percentage);
45 $percentage = preg_replace('/ /', '', $percentage);
46 $show_percentage = true;
47 }
48
49 // redirect to results page if computations are complete
50 if (strcmp($status, "Computations complete") == 0) {
51 header("Location: /index.php?results_id=" . $_GET['wait_id']);
52 }
53
54 // refresh the page every 5 seconds while computations are running
55 ?>
56 <meta http-equiv="refresh" content="5" >
57 <?php
58 }
59
60 include('navigation.html');
61 ?>
62 <main>
63 <?php
64 if (isset($_GET['wait_id']) && !empty($_GET['wait_id'])) {
65 ?>
66
67 <div class="container">
68
69 <br><br><br><br>
70 <div class="row center">
71 <h2 class="header col s12 orange-text">Please wait</h2>
72 </div>
73
74 <div class="row center">
75 <h4 class="header col s12">
76 <?php
77 echo $status;
78 ?>
79 </h4>
80 </div>
81
82 <div class="row progress center-align s12">
83 <?php
84 if ($show_percentage) { ?>
85 <div class="determinate"
86 style="width: <?php echo($percentage); ?>%"></div>
87 <?php
88 } else { ?>
89 <div class="indeterminate"></div>
90 <?php } ?>
91 </div>
92
93 <div class="row center valign-wrapper">
94
95 <p class="flow-text">
96 Please wait while the inversion computations are taking place.
97 These may make take several minutes to complete. For long waits …
98 bookmark this page and revisit it later. Please do not resubmit …
99 sample.</p>
100 </div>
101
102 <div class="row center-align">
103 <p class="center-align"> If the computations are queued for more…
104 hours, please contact <a href="mailto:[email protected]…
105 Damsgaard</a>.</p>
106 </div>
107 <br><br><br><br><br><br>
108
109 </div>
110
111 <?php
112 } elseif (isset($_GET['results_id']) && !empty($_GET['results_id'])) {
113 // show plots
114 ?>
115
116 <div class="section no-pad-bot" id="index-banner">
117 <div class="container">
118 <br><br>
119 <!-- page header -->
120 <h2 class="header center orange-text">MCMC inversion results…
121
122 <div class="row">
123 <div class="col s12">
124 <div class="card">
125 <div class="card-image">
126 <?php
127 include('output/' . $_GET['results_id'] . '_Walks.ht…
128 ?>
129 </div>
130 <div class="card-content">
131 <h5 class="blue-text">
132 Results</h5>
133 <p>The table shows the general statistical results…
134 interglacial erosion rate (&epsilon;<sub>int</sub>…
135 glacial erosion rate (&epsilon;<sub>gla</sub>), cl…
136 record threshold value
137 (&delta;<sup>18</sup>O<sub>threshold</sub>), and t…
138 erosion over the last 1 Myr (E), produced the Mark…
139 Monte-Carlo inversion. Results are displayed per w…
140 and on average. The 50th percentiles (also called …
141 quartile) denote the median parameter value. The 2…
142 percentiles (first quartile) marks the value that …
143 the lowest 25% percent of data from the highest 75…
144 The 75th percentiles mark the limit to the upper 2…
145 data. If the 25th, 50th, and 75th percentile value…
146 parameter are close, the parameter is well constra…
147 If a single walker produces values with significant
148 deviation from the others, remove it from the data
149 set. NaN results in total erosion rate mean that t…
150 exceeds values which are possible to constrain.</p>
151 </div>
152 <div class="card-action">
153 <a href="output/<?php
154 echo($_GET['results_id']); ?>_Walks.csv"
155 target="_blank">Link to CSV</a>
156 (right click to save, can be imported to Excel, Matlab…
157 </div>
158 </div>
159 </div>
160
161 <div class="row">
162 <!--<div class="col s12 m8 offset-m2">-->
163 <div class="col s12">
164 <div class="card">
165 <div class="card-image">
166 <img src="output/<?php
167 echo($_GET['results_id']); ?>_Walks-6.png">
168 <!--<span class="card-title blue-text text-darke…
169 Generalized model parameter values</span>-->
170 </div>
171 <div class="card-content">
172 <h5 class="blue-text">
173 Generalized model parameter values</h5>
174 <p>The histograms show the distribution of (a)
175 interglacial erosion rate, (b) glacial erosion rat…
176 timing of last deglaciation, and (d)
177 d<sup>18</sup>O<sub>threshold</sub> levels that pr…
178 the best fit to the supplied TCN concentrations.
179 The vertical axis indicates the number of
180 simulations included in each bin out of the 10,000
181 simulations that followed the MCMC burn-in phase f…
182 MCMC walker. The solid magenta lines denote the m…
183 values (second quartile), while the dashed magenta…
184 denote the lower and upper quartiles (25th and 75th
185 percentiles, respectively). A parameter is well
186 constrained if the histogram has a single, distinc…
187 and relatively close median, lower and upper quart…
188 values. Flat histograms denote that the parameters…
189 well constrained.</p>
190 </div>
191 <div class="card-action">
192 <a href="output/<?php
193 echo($_GET['results_id']); ?>_Walks-6.png"
194 target="_blank">Link to PNG</a>
195 <a href="output/<?php
196 echo($_GET['results_id']); ?>_Walks-6.pdf"
197 target="_blank">Link to PDF</a>
198 <a href="output/<?php
199 echo($_GET['results_id']); ?>_Walks-6.fig"
200 target="_blank">Link to FIG</a>
201 <br>
202 <a href="output/<?php
203 echo($_GET['results_id']); ?>_Walks-eps_int.txt"
204 target="_blank">&epsilon;<sub>int</sub> data</a>
205 <a href="output/<?php
206 echo($_GET['results_id']); ?>_Walks-eps_gla.txt"
207 target="_blank">&epsilon;<sub>gla</sub> data</a>
208 <a href="output/<?php
209 echo($_GET['results_id']); ?>_Walks-t_degla.txt"
210 target="_blank"><i>t</i><sub>degla</sub> data</a>
211 <a href="output/<?php
212 echo($_GET['results_id']); ?>_Walks-d18O_thresho…
213 target="_blank">&delta;<sup>18</sup>O<sub>threshold…
214 </div>
215 </div>
216 </div>
217 </div>
218
219
220 <div class="row">
221 <!--<div class="col s12 m8 offset-m2">-->
222 <div class="col s12">
223 <div class="card">
224 <div class="card-image">
225 <img src="output/<?php
226 echo($_GET['results_id']); ?>_Walks-5.png">
227 <!--
228 <span class="card-title blue-text text-darken-2">
229 Model parameter values per inversion walker</spa…
230 -->
231 </div>
232 <div class="card-content">
233 <h5 class="blue-text">
234 Model parameter values per inversion walker</h…
235 <p>The histograms show the distribution of (a)
236 interglacial erosion rate, (b) glacial erosion rat…
237 timing of last deglaciation, and (d)
238 d<sup>18</sup>O<sub>threshold</sub> levels that pr…
239 the best fit to the supplied TCN concentrations. T…
240 one histogram per model parameter for each MCMC wa…
241 The <!--fraction indicates the number of simulatio…
242 included in--> vertical axis indicates the number …
243 simulations included in each bin out of the 10,000
244 simulations that followed the MCMC burn-in phase.<…
245 </div>
246 <div class="card-action">
247 <a href="output/<?php
248 echo($_GET['results_id']); ?>_Walks-5.png"
249 target="_blank">Link to PNG</a>
250 <a href="output/<?php
251 echo($_GET['results_id']); ?>_Walks-5.pdf"
252 target="_blank">Link to PDF</a>
253 <a href="output/<?php
254 echo($_GET['results_id']); ?>_Walks-5.fig"
255 target="_blank">Link to FIG</a>
256 <br>
257 <?php include('output/' . $_GET['results_id'] . '_Walk…
258 </div>
259 </div>
260 </div>
261 </div>
262
263 <div class="row">
264 <!--<div class="col s12 m8 offset-m2">-->
265 <div class="col s12">
266 <div class="card">
267 <div class="card-image">
268 <img src="output/<?php
269 echo($_GET['results_id']); ?>_Walks-7.png">
270 <!--
271 <span class="card-title blue-text text-darken-2">
272 Erosion history</span>-->
273 </div>
274 <div class="card-content">
275 <h5 class="blue-text">
276 Median-based model of sample history</h5>
277 <p>
278 (a) Two-stage glacial-interglacial model based on …
279 selected climate record and the median
280 &delta;<sup>18</sup>O<sub>threshold</sub> value fr…
281 first figure above. Timing and duration of glacia…
282 interglacial periods are defined by the threshold …
283 that is applied to the climate record.
284
285 (b) Binary exposure history between glaciations
286 characterized by total exposure and interglacials …
287 any exposure.
288
289 (c) Erosion rate through time which alternates bet…
290 interglacial and glacial erosion rate magnitude, b…
291 median values presented above.
292
293 In all three figures the vertical dashed lines den…
294 median age of the last deglaciation.
295
296 </p>
297 </div>
298 <div class="card-action">
299 <a href="output/<?php
300 echo($_GET['results_id']); ?>_Walks-7.png"
301 target="_blank">Link to PNG</a>
302 <a href="output/<?php
303 echo($_GET['results_id']); ?>_Walks-7.pdf"
304 target="_blank">Link to PDF</a>
305 <a href="output/<?php
306 echo($_GET['results_id']); ?>_Walks-7.fig"
307 target="_blank">Link to FIG</a>
308 </div>
309 </div>
310 </div>
311 </div>
312
313 <div class="row">
314 <!--<div class="col s12 m8 offset-m2">-->
315 <div class="col s12">
316 <div class="card">
317 <div class="card-image">
318 <img src="output/<?php
319 echo($_GET['results_id']); ?>_Walks-8.png">
320 <!--
321 <span class="card-title blue-text text-darken-2">
322 Erosion history</span>-->
323 </div>
324 <div class="card-content">
325 <h5 class="blue-text">
326 Exhumation history</h5>
327 <p>
328 Mean (black) and 25 and 75 percentiles (red) of sa…
329 exhumation history. There is one subplot per MCMC …
330 </p>
331 </div>
332 <div class="card-action">
333 <a href="output/<?php
334 echo($_GET['results_id']); ?>_Walks-8.png"
335 target="_blank">Link to PNG</a>
336 <a href="output/<?php
337 echo($_GET['results_id']); ?>_Walks-8.pdf"
338 target="_blank">Link to PDF</a>
339 <a href="output/<?php
340 echo($_GET['results_id']); ?>_Walks-8.fig"
341 target="_blank">Link to FIG</a>
342 </div>
343 </div>
344 </div>
345 </div>
346
347 <div class="row">
348 <div class="col s12">
349 <div class="card">
350 <div class="card-image">
351 <?php
352 include('output/' . $_GET['results_id'] . '_Walks-in…
353 ?>
354 </div>
355 <div class="card-content">
356 <h5 class="blue-text">
357 Input parameters</h5>
358 <p>This table summarizes the supplied input parame…
359 values.</p>
360
361 </div>
362 </div>
363 </div>
364 </div>
365
366
367 <?php
368 } else {
369 ?>
370 <div ng-view>
371 <!-- content is injected here -->
372 </div>
373 <?php } ?>
374
375 </main>
376
377 <?php include('foot.html'); ?>
378
379
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.