-
Notifications
You must be signed in to change notification settings - Fork 0
/
AgeModel_8cc_source.html
374 lines (372 loc) · 80.1 KB
/
AgeModel_8cc_source.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PISM, A Parallel Ice Sheet Model: src/age/AgeModel.cc Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="browser.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">PISM, A Parallel Ice Sheet Model
 <span id="projectnumber">stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_1f57d3e7ca7cfdc1bded0db8bf931243.html">age</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">AgeModel.cc</div> </div>
</div><!--header-->
<div class="contents">
<a href="AgeModel_8cc.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/* Copyright (C) 2016, 2017, 2019, 2020, 2022, 2023 PISM Authors</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * This file is part of PISM.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * PISM is free software; you can redistribute it and/or modify it under the</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * terms of the GNU General Public License as published by the Free Software</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * Foundation; either version 3 of the License, or (at your option) any later</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * version.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * PISM is distributed in the hope that it will be useful, but WITHOUT ANY</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * details.</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * along with PISM; if not, write to the Free Software</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  </div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include "pism/age/AgeModel.hh"</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "pism/age/AgeColumnSystem.hh"</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include "pism/util/error_handling.hh"</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include "pism/util/io/File.hh"</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <memory></span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  </div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="keyword">namespace </span><a class="code" href="namespacepism.html">pism</a> {</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  </div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="classpism_1_1AgeModelInputs_a92a6c68a44eb45ccf0e9da6a12e7e223.html#a92a6c68a44eb45ccf0e9da6a12e7e223"> 28</a></span> <a class="code" href="classpism_1_1AgeModelInputs_ae30f0853c82b5598754a14bba5779ed0.html#ae30f0853c82b5598754a14bba5779ed0">AgeModelInputs::AgeModelInputs</a>(<span class="keyword">const</span> <a class="code" href="classpism_1_1array_1_1Scalar.html">array::Scalar</a> *thickness,</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="keyword">const</span> <a class="code" href="classpism_1_1array_1_1Array3D.html">array::Array3D</a> *u,</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <span class="keyword">const</span> <a class="code" href="classpism_1_1array_1_1Array3D.html">array::Array3D</a> *v,</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="keyword">const</span> <a class="code" href="classpism_1_1array_1_1Array3D.html">array::Array3D</a> *w)</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  : ice_thickness(thickness), u3(u), v3(v), w3(w) {</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="comment">// empty</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> }</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  </div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classpism_1_1AgeModelInputs_ae30f0853c82b5598754a14bba5779ed0.html#ae30f0853c82b5598754a14bba5779ed0"> 36</a></span> <a class="code" href="classpism_1_1AgeModelInputs_ae30f0853c82b5598754a14bba5779ed0.html#ae30f0853c82b5598754a14bba5779ed0">AgeModelInputs::AgeModelInputs</a>() {</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <a class="code" href="classpism_1_1AgeModelInputs_af5f1d44857820a4f79639c79a5351cd1.html#af5f1d44857820a4f79639c79a5351cd1">ice_thickness</a> = NULL;</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <a class="code" href="classpism_1_1AgeModelInputs_ae789429e9bbccb819916d8fca4ca6e58.html#ae789429e9bbccb819916d8fca4ca6e58">u3</a> = NULL;</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <a class="code" href="classpism_1_1AgeModelInputs_a980bfc1f2bcdd4766afe151bb4f2c0e4.html#a980bfc1f2bcdd4766afe151bb4f2c0e4">v3</a> = NULL;</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <a class="code" href="classpism_1_1AgeModelInputs_a22066b483284f5f23b2fa0ac3c7e97b6.html#a22066b483284f5f23b2fa0ac3c7e97b6">w3</a> = NULL;</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> }</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  </div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="namespacepism_a41f7a488ef733f2b1e3575cadc5e8dc2.html#a41f7a488ef733f2b1e3575cadc5e8dc2"> 43</a></span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="namespacepism_a41f7a488ef733f2b1e3575cadc5e8dc2.html#a41f7a488ef733f2b1e3575cadc5e8dc2">check_input</a>(<span class="keyword">const</span> <a class="code" href="classpism_1_1array_1_1Array.html">array::Array</a> *ptr, <span class="keyword">const</span> <span class="keywordtype">char</span> *name) {</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordflow">if</span> (ptr == NULL) {</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordflow">throw</span> <a class="code" href="classpism_1_1RuntimeError_ad0ed5f05a9a4e3e403a1d62f8d1e4e7d.html#ad0ed5f05a9a4e3e403a1d62f8d1e4e7d">RuntimeError::formatted</a>(<a class="code" href="error__handling_8hh_aa0c260bffe8a4dbd77d48e8feee7c526.html#aa0c260bffe8a4dbd77d48e8feee7c526">PISM_ERROR_LOCATION</a>,</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="stringliteral">"ice age model input %s was not provided"</span>, name);</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  }</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> }</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  </div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classpism_1_1AgeModelInputs_a60ba5a189181171b6835ab7d8a1258f7.html#a60ba5a189181171b6835ab7d8a1258f7"> 50</a></span> <span class="keywordtype">void</span> <a class="code" href="classpism_1_1AgeModelInputs_a60ba5a189181171b6835ab7d8a1258f7.html#a60ba5a189181171b6835ab7d8a1258f7">AgeModelInputs::check</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <a class="code" href="namespacepism_a41f7a488ef733f2b1e3575cadc5e8dc2.html#a41f7a488ef733f2b1e3575cadc5e8dc2">check_input</a>(<a class="code" href="classpism_1_1AgeModelInputs_af5f1d44857820a4f79639c79a5351cd1.html#af5f1d44857820a4f79639c79a5351cd1">ice_thickness</a>, <span class="stringliteral">"ice_thickness"</span>);</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <a class="code" href="namespacepism_a41f7a488ef733f2b1e3575cadc5e8dc2.html#a41f7a488ef733f2b1e3575cadc5e8dc2">check_input</a>(<a class="code" href="classpism_1_1AgeModelInputs_ae789429e9bbccb819916d8fca4ca6e58.html#ae789429e9bbccb819916d8fca4ca6e58">u3</a>, <span class="stringliteral">"u3"</span>);</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <a class="code" href="namespacepism_a41f7a488ef733f2b1e3575cadc5e8dc2.html#a41f7a488ef733f2b1e3575cadc5e8dc2">check_input</a>(<a class="code" href="classpism_1_1AgeModelInputs_a980bfc1f2bcdd4766afe151bb4f2c0e4.html#a980bfc1f2bcdd4766afe151bb4f2c0e4">v3</a>, <span class="stringliteral">"v3"</span>);</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <a class="code" href="namespacepism_a41f7a488ef733f2b1e3575cadc5e8dc2.html#a41f7a488ef733f2b1e3575cadc5e8dc2">check_input</a>(<a class="code" href="classpism_1_1AgeModelInputs_a22066b483284f5f23b2fa0ac3c7e97b6.html#a22066b483284f5f23b2fa0ac3c7e97b6">w3</a>, <span class="stringliteral">"w3"</span>);</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> }</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  </div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classpism_1_1AgeModel_a35942a52ef43e4888b6233be0f2b7223.html#a35942a52ef43e4888b6233be0f2b7223"> 57</a></span> <a class="code" href="classpism_1_1AgeModel_a35942a52ef43e4888b6233be0f2b7223.html#a35942a52ef43e4888b6233be0f2b7223">AgeModel::AgeModel</a>(std::shared_ptr<const Grid> grid,</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  std::shared_ptr<const stressbalance::StressBalance> stress_balance)</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  : <a class="code" href="classpism_1_1Component.html">Component</a>(grid),</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="comment">// FIXME: should be able to use width=1...</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  m_ice_age(m_grid, <span class="stringliteral">"age"</span>, array::<a class="code" href="namespacepism_1_1array_ab49b8ee9a79e7f46ec91fc40efdb7ca3.html#ab49b8ee9a79e7f46ec91fc40efdb7ca3a7aa2276678f0b2cd3f63c15be430372f">WITH_GHOSTS</a>, m_grid->z(), m_config->get_number(<span class="stringliteral">"grid.max_stencil_width"</span>)),</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  m_work(m_grid, <span class="stringliteral">"work_vector"</span>, array::<a class="code" href="namespacepism_1_1array_ab49b8ee9a79e7f46ec91fc40efdb7ca3.html#ab49b8ee9a79e7f46ec91fc40efdb7ca3af672399d2e1a4112ca5d4a4591c30885">WITHOUT_GHOSTS</a>, m_grid->z()),</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  m_stress_balance(stress_balance) {</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  </div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <a class="code" href="classpism_1_1AgeModel_a0a4e7ebc58694d40cfb11373659dae16.html#a0a4e7ebc58694d40cfb11373659dae16">m_ice_age</a>.<a class="code" href="classpism_1_1array_1_1Array_af9eece42153cd03bfc8ba237ae5310c4.html#af9eece42153cd03bfc8ba237ae5310c4">metadata</a>()</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  .<a class="code" href="classpism_1_1VariableMetadata_a5e378cf7077ab00a808ef446a79dc34d.html#a5e378cf7077ab00a808ef446a79dc34d">long_name</a>(<span class="stringliteral">"age of ice"</span>)</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  .<a class="code" href="classpism_1_1VariableMetadata_ae73185be0693a8607b8e0f74558e11e4.html#ae73185be0693a8607b8e0f74558e11e4">units</a>(<span class="stringliteral">"s"</span>);</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  </div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <a class="code" href="classpism_1_1AgeModel_a0a4e7ebc58694d40cfb11373659dae16.html#a0a4e7ebc58694d40cfb11373659dae16">m_ice_age</a>.<a class="code" href="classpism_1_1array_1_1Array_af9eece42153cd03bfc8ba237ae5310c4.html#af9eece42153cd03bfc8ba237ae5310c4">metadata</a>()[<span class="stringliteral">"valid_min"</span>] = {0.0};</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  </div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <a class="code" href="classpism_1_1AgeModel_a5275eded2a708da7169851cc2a80a445.html#a5275eded2a708da7169851cc2a80a445">m_work</a>.<a class="code" href="classpism_1_1array_1_1Array_af9eece42153cd03bfc8ba237ae5310c4.html#af9eece42153cd03bfc8ba237ae5310c4">metadata</a>().<a class="code" href="classpism_1_1VariableMetadata_ae73185be0693a8607b8e0f74558e11e4.html#ae73185be0693a8607b8e0f74558e11e4">units</a>(<span class="stringliteral">"s"</span>);</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> }</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="comment"></span> </div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="comment">/*!</span></div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="comment">Let \f$\tau(t,x,y,z)\f$ be the age of the ice. Denote the three-dimensional</span></div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="comment">velocity field within the ice fluid as \f$(u,v,w)\f$. The age equation</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="comment">is \f$d\tau/dt = 1\f$, that is, ice may move but it gets one year older in one</span></div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment">year. Thus</span></div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="comment"> \f[ \frac{\partial \tau}{\partial t} + u \frac{\partial \tau}{\partial x}</span></div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="comment"> + v \frac{\partial \tau}{\partial y} + w \frac{\partial \tau}{\partial z} = 1 \f]</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="comment">This equation is purely advective and hyperbolic. The right-hand side is "1" as</span></div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="comment">long as age \f$\tau\f$ and time \f$t\f$ are measured in the same units.</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="comment">Because the velocity field is incompressible, \f$\nabla \cdot (u,v,w) = 0\f$,</span></div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="comment">we can rewrite the equation as</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="comment"> \f[ \frac{\partial \tau}{\partial t} + \nabla \left( (u,v,w) \tau \right) = 1 \f]</span></div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="comment">There is a conservative first-order numerical method; see AgeColumnSystem::solveThisColumn().</span></div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="comment"></span> </div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="comment">The boundary condition is that when the ice falls as snow it has age zero.</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="comment">That is, \f$\tau(t,x,y,h(t,x,y)) = 0\f$ in accumulation areas. There is no</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="comment">boundary condition elsewhere on the ice upper surface, as the characteristics</span></div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="comment">go outward in the ablation zone. If the velocity in the bottom cell of ice</span></div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="comment">is upward (\f$w>0\f$) then we also apply a zero age boundary condition,</span></div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="comment">\f$\tau(t,x,y,0) = 0\f$. This is the case where ice freezes on at the base,</span></div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="comment">either grounded basal ice freezing on stored water in till, or marine basal ice.</span></div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="comment">(Note that the water that is frozen-on as ice might be quite "old" in the sense</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="comment">that its most recent time in the atmosphere was long ago; this comment is</span></div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment">relevant to any analysis which relates isotope ratios to modeled age.)</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment"></span> </div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="comment">The numerical method is a conservative form of first-order upwinding, but the</span></div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment">vertical advection term is computed implicitly. Thus there is no CFL-type</span></div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment">stability condition from the vertical velocity; CFL is only for the horizontal</span></div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="comment">velocity. We use a finely-spaced, equally-spaced vertical grid in the</span></div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment">calculation. Note that the columnSystemCtx methods coarse_to_fine() and</span></div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment">fine_to_coarse() interpolate back and forth between this fine grid and</span></div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment">the storage grid. The storage grid may or may not be equally-spaced. See</span></div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="comment">AgeColumnSystem::solve() for the actual method.</span></div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="classpism_1_1AgeModel_afbd21474c2ec641251ebaa77a4dfd6cc.html#afbd21474c2ec641251ebaa77a4dfd6cc"> 108</a></span> <span class="keywordtype">void</span> <a class="code" href="classpism_1_1AgeModel_afbd21474c2ec641251ebaa77a4dfd6cc.html#afbd21474c2ec641251ebaa77a4dfd6cc">AgeModel::update</a>(<span class="keywordtype">double</span> t, <span class="keywordtype">double</span> dt, <span class="keyword">const</span> <a class="code" href="classpism_1_1AgeModelInputs.html">AgeModelInputs</a> &inputs) {</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  </div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="comment">// fix a compiler warning</span></div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  (void) t;</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  </div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  inputs.<a class="code" href="classpism_1_1AgeModelInputs_a60ba5a189181171b6835ab7d8a1258f7.html#a60ba5a189181171b6835ab7d8a1258f7">check</a>();</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  </div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="keyword">const</span> <a class="code" href="classpism_1_1array_1_1Scalar.html">array::Scalar</a> &ice_thickness = *inputs.<a class="code" href="classpism_1_1AgeModelInputs_af5f1d44857820a4f79639c79a5351cd1.html#af5f1d44857820a4f79639c79a5351cd1">ice_thickness</a>;</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  </div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keyword">const</span> <a class="code" href="classpism_1_1array_1_1Array3D.html">array::Array3D</a></div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  &u3 = *inputs.<a class="code" href="classpism_1_1AgeModelInputs_ae789429e9bbccb819916d8fca4ca6e58.html#ae789429e9bbccb819916d8fca4ca6e58">u3</a>,</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  &v3 = *inputs.<a class="code" href="classpism_1_1AgeModelInputs_a980bfc1f2bcdd4766afe151bb4f2c0e4.html#a980bfc1f2bcdd4766afe151bb4f2c0e4">v3</a>,</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  &w3 = *inputs.<a class="code" href="classpism_1_1AgeModelInputs_a22066b483284f5f23b2fa0ac3c7e97b6.html#a22066b483284f5f23b2fa0ac3c7e97b6">w3</a>;</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  </div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <a class="code" href="classpism_1_1AgeColumnSystem.html">AgeColumnSystem</a> system(<a class="code" href="classpism_1_1Component_a745aa37bc1b5da6db5bfc280ecb3c811.html#a745aa37bc1b5da6db5bfc280ecb3c811">m_grid</a>->z(), <span class="stringliteral">"age"</span>,</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <a class="code" href="classpism_1_1Component_a745aa37bc1b5da6db5bfc280ecb3c811.html#a745aa37bc1b5da6db5bfc280ecb3c811">m_grid</a>->dx(), <a class="code" href="classpism_1_1Component_a745aa37bc1b5da6db5bfc280ecb3c811.html#a745aa37bc1b5da6db5bfc280ecb3c811">m_grid</a>->dy(), dt,</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <a class="code" href="classpism_1_1AgeModel_a0a4e7ebc58694d40cfb11373659dae16.html#a0a4e7ebc58694d40cfb11373659dae16">m_ice_age</a>, u3, v3, w3); <span class="comment">// linear system to solve in each column</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  </div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordtype">size_t</span> Mz_fine = system.<a class="code" href="classpism_1_1columnSystemCtx_a28bb508eccee6af0473307b128f5608a.html#a28bb508eccee6af0473307b128f5608a">z</a>().size();</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  std::vector<double> x(Mz_fine); <span class="comment">// space for solution</span></div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  </div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <a class="code" href="classpism_1_1array_1_1AccessScope.html">array::AccessScope</a> list{&ice_thickness, &u3, &v3, &w3, &<a class="code" href="classpism_1_1AgeModel_a0a4e7ebc58694d40cfb11373659dae16.html#a0a4e7ebc58694d40cfb11373659dae16">m_ice_age</a>, &<a class="code" href="classpism_1_1AgeModel_a5275eded2a708da7169851cc2a80a445.html#a5275eded2a708da7169851cc2a80a445">m_work</a>};</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  </div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Mz = <a class="code" href="classpism_1_1Component_a745aa37bc1b5da6db5bfc280ecb3c811.html#a745aa37bc1b5da6db5bfc280ecb3c811">m_grid</a>->Mz();</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  </div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <a class="code" href="classpism_1_1ParallelSection.html">ParallelSection</a> loop(<a class="code" href="classpism_1_1Component_a745aa37bc1b5da6db5bfc280ecb3c811.html#a745aa37bc1b5da6db5bfc280ecb3c811">m_grid</a>->com);</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> p = <a class="code" href="classpism_1_1Component_a745aa37bc1b5da6db5bfc280ecb3c811.html#a745aa37bc1b5da6db5bfc280ecb3c811">m_grid</a>->points(); p; p.next()) {</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> i = p.i(), j = p.j();</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  </div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  system.<a class="code" href="classpism_1_1AgeColumnSystem_a9bd49d15bd1969b73082f895e265d734.html#a9bd49d15bd1969b73082f895e265d734">init</a>(i, j, ice_thickness(i, j));</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  </div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordflow">if</span> (system.<a class="code" href="classpism_1_1columnSystemCtx_accb83857d9990f5b716bd8868cc37523.html#accb83857d9990f5b716bd8868cc37523">ks</a>() == 0) {</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="comment">// if no ice, set the entire column to zero age</span></div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <a class="code" href="classpism_1_1AgeModel_a5275eded2a708da7169851cc2a80a445.html#a5275eded2a708da7169851cc2a80a445">m_work</a>.<a class="code" href="classpism_1_1array_1_1Array3D_a57f6842686575847d4662ebe9a69bca6.html#a57f6842686575847d4662ebe9a69bca6">set_column</a>(i, j, 0.0);</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="comment">// general case: solve advection PDE</span></div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  </div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="comment">// solve the system for this column; call checks that params set</span></div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  system.<a class="code" href="classpism_1_1AgeColumnSystem_ae4c72554404675fc0f564ec401033020.html#ae4c72554404675fc0f564ec401033020">solve</a>(x);</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  </div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="comment">// put solution in array::Array3D</span></div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  system.<a class="code" href="classpism_1_1columnSystemCtx_aeca38a103cb8519056d700c0e94b8aa5.html#aeca38a103cb8519056d700c0e94b8aa5">fine_to_coarse</a>(x, i, j, <a class="code" href="classpism_1_1AgeModel_a5275eded2a708da7169851cc2a80a445.html#a5275eded2a708da7169851cc2a80a445">m_work</a>);</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  </div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <span class="comment">// Ensure that the age of the ice is non-negative.</span></div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="comment">//</span></div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="comment">// FIXME: this is a kludge. We need to ensure that our numerical method has the maximum</span></div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="comment">// principle instead. (We may still need this for correctness, though.)</span></div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keywordtype">double</span> *<a class="code" href="namespacepism_1_1fem_ae2f57ac21774f132ef388b3de9cde364.html#ae2f57ac21774f132ef388b3de9cde364">column</a> = <a class="code" href="classpism_1_1AgeModel_a5275eded2a708da7169851cc2a80a445.html#a5275eded2a708da7169851cc2a80a445">m_work</a>.<a class="code" href="classpism_1_1array_1_1Array3D_ac74ddc5a845ca13d159983b9e7b20791.html#ac74ddc5a845ca13d159983b9e7b20791">get_column</a>(i, j);</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="namespacepism_a7343afff8d353b59dbdec563bd896812.html#a7343afff8d353b59dbdec563bd896812">k</a> = 0; <a class="code" href="namespacepism_a7343afff8d353b59dbdec563bd896812.html#a7343afff8d353b59dbdec563bd896812">k</a> < Mz; ++<a class="code" href="namespacepism_a7343afff8d353b59dbdec563bd896812.html#a7343afff8d353b59dbdec563bd896812">k</a>) {</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="keywordflow">if</span> (<a class="code" href="namespacepism_1_1fem_ae2f57ac21774f132ef388b3de9cde364.html#ae2f57ac21774f132ef388b3de9cde364">column</a>[<a class="code" href="namespacepism_a7343afff8d353b59dbdec563bd896812.html#a7343afff8d353b59dbdec563bd896812">k</a>] < 0.0) {</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <a class="code" href="namespacepism_1_1fem_ae2f57ac21774f132ef388b3de9cde364.html#ae2f57ac21774f132ef388b3de9cde364">column</a>[<a class="code" href="namespacepism_a7343afff8d353b59dbdec563bd896812.html#a7343afff8d353b59dbdec563bd896812">k</a>] = 0.0;</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  }</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  }</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  }</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  }</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  } <span class="keywordflow">catch</span> (...) {</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  loop.<a class="code" href="classpism_1_1ParallelSection_a6b0a6e5e64970af7eadabfebe2b20bd2.html#a6b0a6e5e64970af7eadabfebe2b20bd2">failed</a>();</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  }</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  loop.<a class="code" href="classpism_1_1ParallelSection_ac23296abee1cbcb3c3fd68c7f5ce0835.html#ac23296abee1cbcb3c3fd68c7f5ce0835">check</a>();</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  </div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <a class="code" href="classpism_1_1AgeModel_a0a4e7ebc58694d40cfb11373659dae16.html#a0a4e7ebc58694d40cfb11373659dae16">m_ice_age</a>.<a class="code" href="classpism_1_1array_1_1Array3D_a0ea8b6700f5aab01e913dcbad9de72a5.html#a0ea8b6700f5aab01e913dcbad9de72a5">copy_from</a>(<a class="code" href="classpism_1_1AgeModel_a5275eded2a708da7169851cc2a80a445.html#a5275eded2a708da7169851cc2a80a445">m_work</a>);</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span> }</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  </div>
<div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="classpism_1_1AgeModel_a99bba09ffa5ebf65fd134046ab088215.html#a99bba09ffa5ebf65fd134046ab088215"> 172</a></span> <span class="keyword">const</span> <a class="code" href="classpism_1_1array_1_1Array3D.html">array::Array3D</a> & <a class="code" href="classpism_1_1AgeModel_a99bba09ffa5ebf65fd134046ab088215.html#a99bba09ffa5ebf65fd134046ab088215">AgeModel::age</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="keywordflow">return</span> <a class="code" href="classpism_1_1AgeModel_a0a4e7ebc58694d40cfb11373659dae16.html#a0a4e7ebc58694d40cfb11373659dae16">m_ice_age</a>;</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span> }</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  </div>
<div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="classpism_1_1AgeModel_a92bf232666aca98064f0cc162fbbde62.html#a92bf232666aca98064f0cc162fbbde62"> 176</a></span> <a class="code" href="classpism_1_1MaxTimestep.html">MaxTimestep</a> <a class="code" href="classpism_1_1AgeModel_a92bf232666aca98064f0cc162fbbde62.html#a92bf232666aca98064f0cc162fbbde62">AgeModel::max_timestep_impl</a>(<span class="keywordtype">double</span> <span class="comment">/*t*/</span>)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  </div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keywordflow">if</span> (<a class="code" href="classpism_1_1AgeModel_a4760c33bae01cbff5e411e150bf6e17a.html#a4760c33bae01cbff5e411e150bf6e17a">m_stress_balance</a> == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keywordflow">throw</span> <a class="code" href="classpism_1_1RuntimeError_ad0ed5f05a9a4e3e403a1d62f8d1e4e7d.html#ad0ed5f05a9a4e3e403a1d62f8d1e4e7d">RuntimeError::formatted</a>(<a class="code" href="error__handling_8hh_aa0c260bffe8a4dbd77d48e8feee7c526.html#aa0c260bffe8a4dbd77d48e8feee7c526">PISM_ERROR_LOCATION</a>,</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="stringliteral">"AgeModel: no stress balance provided."</span></div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="stringliteral">" Cannot compute max. time step."</span>);</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  }</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  </div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keywordflow">return</span> <a class="code" href="classpism_1_1MaxTimestep.html">MaxTimestep</a>(<a class="code" href="classpism_1_1AgeModel_a4760c33bae01cbff5e411e150bf6e17a.html#a4760c33bae01cbff5e411e150bf6e17a">m_stress_balance</a>->max_timestep_cfl_3d().dt_max.value(), <span class="stringliteral">"age model"</span>);</div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span> }</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  </div>
<div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="classpism_1_1AgeModel_ae481458c40e7f475459608351fb9b03d.html#ae481458c40e7f475459608351fb9b03d"> 187</a></span> <span class="keywordtype">void</span> <a class="code" href="classpism_1_1AgeModel_ae481458c40e7f475459608351fb9b03d.html#ae481458c40e7f475459608351fb9b03d">AgeModel::init</a>(<span class="keyword">const</span> <a class="code" href="structpism_1_1InputOptions.html">InputOptions</a> &opts) {</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  </div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <a class="code" href="classpism_1_1Component_a29575eba605feccf4403d6b4ff0954a4.html#a29575eba605feccf4403d6b4ff0954a4">m_log</a>->message(2, <span class="stringliteral">"* Initializing the age model...\n"</span>);</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  </div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  </div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keywordtype">double</span> initial_age_years = <a class="code" href="classpism_1_1Component_a28f298fc2133baae8cebf9dedf3b4d84.html#a28f298fc2133baae8cebf9dedf3b4d84">m_config</a>->get_number(<span class="stringliteral">"age.initial_value"</span>, <span class="stringliteral">"years"</span>);</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  </div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordflow">if</span> (opts.<a class="code" href="structpism_1_1InputOptions_a0fe5db51286e55c31b1575dc9ecc5d70.html#a0fe5db51286e55c31b1575dc9ecc5d70">type</a> == <a class="code" href="namespacepism_a56e80801555b7f36f4dd28941739654a.html#a56e80801555b7f36f4dd28941739654aa6aff4b43552f00d5cc331453ff4029bc">INIT_RESTART</a>) {</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <a class="code" href="classpism_1_1File.html">File</a> input_file(<a class="code" href="classpism_1_1Component_a745aa37bc1b5da6db5bfc280ecb3c811.html#a745aa37bc1b5da6db5bfc280ecb3c811">m_grid</a>->com, opts.<a class="code" href="structpism_1_1InputOptions_a2dc298f0e83b951fa1df5eab910639e5.html#a2dc298f0e83b951fa1df5eab910639e5">filename</a>, <a class="code" href="namespacepism_1_1io_a0caba8881b0d36c8cc1eccfa13c0e81f.html#a0caba8881b0d36c8cc1eccfa13c0e81fa308d77197e903bf4f5505b8cb5e377a2">io::PISM_GUESS</a>, <a class="code" href="namespacepism_1_1io_a12c1fd23e92335e2396baab0354b262f.html#a12c1fd23e92335e2396baab0354b262fabb5d91fa1da1214c24d193a75f11f0a2">io::PISM_READONLY</a>);</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  </div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keywordflow">if</span> (input_file.<a class="code" href="classpism_1_1File_a4ec169f0ab9d7858d09f07bffc978f2a.html#a4ec169f0ab9d7858d09f07bffc978f2a">find_variable</a>(<span class="stringliteral">"age"</span>)) {</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <a class="code" href="classpism_1_1AgeModel_a0a4e7ebc58694d40cfb11373659dae16.html#a0a4e7ebc58694d40cfb11373659dae16">m_ice_age</a>.<a class="code" href="classpism_1_1array_1_1Array_a0326efd779d857755513901da9a54992.html#a0326efd779d857755513901da9a54992">read</a>(input_file, opts.<a class="code" href="structpism_1_1InputOptions_ae33c7fb4ca1317444d959bc3e1514ba4.html#ae33c7fb4ca1317444d959bc3e1514ba4">record</a>);</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <a class="code" href="classpism_1_1Component_a29575eba605feccf4403d6b4ff0954a4.html#a29575eba605feccf4403d6b4ff0954a4">m_log</a>->message(2,</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <span class="stringliteral">"PISM WARNING: input file '%s' does not have the 'age' variable.\n"</span></div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="stringliteral">" Setting it to %f years...\n"</span>,</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  opts.<a class="code" href="structpism_1_1InputOptions_a2dc298f0e83b951fa1df5eab910639e5.html#a2dc298f0e83b951fa1df5eab910639e5">filename</a>.c_str(), initial_age_years);</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <a class="code" href="classpism_1_1AgeModel_a0a4e7ebc58694d40cfb11373659dae16.html#a0a4e7ebc58694d40cfb11373659dae16">m_ice_age</a>.<a class="code" href="classpism_1_1array_1_1Array_a9959fcf0124f084e6a2835ed745ce0d1.html#a9959fcf0124f084e6a2835ed745ce0d1">set</a>(<a class="code" href="classpism_1_1Component_a28f298fc2133baae8cebf9dedf3b4d84.html#a28f298fc2133baae8cebf9dedf3b4d84">m_config</a>->get_number(<span class="stringliteral">"age.initial_value"</span>, <span class="stringliteral">"seconds"</span>));</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  }</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <a class="code" href="classpism_1_1Component_a29575eba605feccf4403d6b4ff0954a4.html#a29575eba605feccf4403d6b4ff0954a4">m_log</a>->message(2, <span class="stringliteral">" - setting initial age to %.4f years\n"</span>, initial_age_years);</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <a class="code" href="classpism_1_1AgeModel_a0a4e7ebc58694d40cfb11373659dae16.html#a0a4e7ebc58694d40cfb11373659dae16">m_ice_age</a>.<a class="code" href="classpism_1_1array_1_1Array_a9959fcf0124f084e6a2835ed745ce0d1.html#a9959fcf0124f084e6a2835ed745ce0d1">set</a>(<a class="code" href="classpism_1_1Component_a28f298fc2133baae8cebf9dedf3b4d84.html#a28f298fc2133baae8cebf9dedf3b4d84">m_config</a>->get_number(<span class="stringliteral">"age.initial_value"</span>, <span class="stringliteral">"seconds"</span>));</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  }</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  </div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <a class="code" href="classpism_1_1Component_a7737874c03a58a03498a33dc464d2ee9.html#a7737874c03a58a03498a33dc464d2ee9">regrid</a>(<span class="stringliteral">"Age Model"</span>, <a class="code" href="classpism_1_1AgeModel_a0a4e7ebc58694d40cfb11373659dae16.html#a0a4e7ebc58694d40cfb11373659dae16">m_ice_age</a>, <a class="code" href="classpism_1_1Component_a48f8d0b81b7853d4e3fba0de79ec4a7f.html#a48f8d0b81b7853d4e3fba0de79ec4a7fa27f687170795f16d7eb334423b0bc9de">REGRID_WITHOUT_REGRID_VARS</a>);</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span> }</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  </div>
<div class="line"><a name="l00214"></a><span class="lineno"><a class="line" href="classpism_1_1AgeModel_a06c55a1925b7e2b4497f11b14b81929f.html#a06c55a1925b7e2b4497f11b14b81929f"> 214</a></span> <span class="keywordtype">void</span> <a class="code" href="classpism_1_1AgeModel_a06c55a1925b7e2b4497f11b14b81929f.html#a06c55a1925b7e2b4497f11b14b81929f">AgeModel::define_model_state_impl</a>(<span class="keyword">const</span> <a class="code" href="classpism_1_1File.html">File</a> &output)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <a class="code" href="classpism_1_1AgeModel_a0a4e7ebc58694d40cfb11373659dae16.html#a0a4e7ebc58694d40cfb11373659dae16">m_ice_age</a>.<a class="code" href="classpism_1_1array_1_1Array_a3e1a5859cef073a95e5e0cc5f1cc0fdb.html#a3e1a5859cef073a95e5e0cc5f1cc0fdb">define</a>(output, <a class="code" href="namespacepism_1_1io_a53ffb40793c398e10644fbd2ecda3e77.html#a53ffb40793c398e10644fbd2ecda3e77a6a72c64f82168bec6bf8b648a86648de">io::PISM_DOUBLE</a>);</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span> }</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  </div>
<div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="classpism_1_1AgeModel_ac9123c74eaec3dc86680fd48fbf858f5.html#ac9123c74eaec3dc86680fd48fbf858f5"> 218</a></span> <span class="keywordtype">void</span> <a class="code" href="classpism_1_1AgeModel_ac9123c74eaec3dc86680fd48fbf858f5.html#ac9123c74eaec3dc86680fd48fbf858f5">AgeModel::write_model_state_impl</a>(<span class="keyword">const</span> <a class="code" href="classpism_1_1File.html">File</a> &output)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <a class="code" href="classpism_1_1AgeModel_a0a4e7ebc58694d40cfb11373659dae16.html#a0a4e7ebc58694d40cfb11373659dae16">m_ice_age</a>.<a class="code" href="classpism_1_1array_1_1Array_a4cdaeb827d166a076668d2ab86416793.html#a4cdaeb827d166a076668d2ab86416793">write</a>(output);</div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span> }</div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  </div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span> } <span class="comment">// end of namespace pism</span></div>
<div class="ttc" id="aclasspism_1_1AgeColumnSystem_a9bd49d15bd1969b73082f895e265d734_html_a9bd49d15bd1969b73082f895e265d734"><div class="ttname"><a href="classpism_1_1AgeColumnSystem_a9bd49d15bd1969b73082f895e265d734.html#a9bd49d15bd1969b73082f895e265d734">pism::AgeColumnSystem::init</a></div><div class="ttdeci">void init(int i, int j, double thickness)</div><div class="ttdef"><b>Definition:</b> <a href="AgeColumnSystem_8cc_source.html#l00045">AgeColumnSystem.cc:45</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeColumnSystem_ae4c72554404675fc0f564ec401033020_html_ae4c72554404675fc0f564ec401033020"><div class="ttname"><a href="classpism_1_1AgeColumnSystem_ae4c72554404675fc0f564ec401033020.html#ae4c72554404675fc0f564ec401033020">pism::AgeColumnSystem::solve</a></div><div class="ttdeci">void solve(std::vector< double > &x)</div><div class="ttdoc">First-order upwind scheme with implicit in the vertical: one column solve.</div><div class="ttdef"><b>Definition:</b> <a href="AgeColumnSystem_8cc_source.html#l00068">AgeColumnSystem.cc:68</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeColumnSystem_html"><div class="ttname"><a href="classpism_1_1AgeColumnSystem.html">pism::AgeColumnSystem</a></div><div class="ttdoc">Tridiagonal linear system for vertical column of age (pure advection) problem.</div><div class="ttdef"><b>Definition:</b> <a href="AgeColumnSystem_8hh_source.html#l00028">AgeColumnSystem.hh:28</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModelInputs_a22066b483284f5f23b2fa0ac3c7e97b6_html_a22066b483284f5f23b2fa0ac3c7e97b6"><div class="ttname"><a href="classpism_1_1AgeModelInputs_a22066b483284f5f23b2fa0ac3c7e97b6.html#a22066b483284f5f23b2fa0ac3c7e97b6">pism::AgeModelInputs::w3</a></div><div class="ttdeci">const array::Array3D * w3</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8hh_source.html#l00041">AgeModel.hh:41</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModelInputs_a60ba5a189181171b6835ab7d8a1258f7_html_a60ba5a189181171b6835ab7d8a1258f7"><div class="ttname"><a href="classpism_1_1AgeModelInputs_a60ba5a189181171b6835ab7d8a1258f7.html#a60ba5a189181171b6835ab7d8a1258f7">pism::AgeModelInputs::check</a></div><div class="ttdeci">void check() const</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8cc_source.html#l00050">AgeModel.cc:50</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModelInputs_a980bfc1f2bcdd4766afe151bb4f2c0e4_html_a980bfc1f2bcdd4766afe151bb4f2c0e4"><div class="ttname"><a href="classpism_1_1AgeModelInputs_a980bfc1f2bcdd4766afe151bb4f2c0e4.html#a980bfc1f2bcdd4766afe151bb4f2c0e4">pism::AgeModelInputs::v3</a></div><div class="ttdeci">const array::Array3D * v3</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8hh_source.html#l00040">AgeModel.hh:40</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModelInputs_ae30f0853c82b5598754a14bba5779ed0_html_ae30f0853c82b5598754a14bba5779ed0"><div class="ttname"><a href="classpism_1_1AgeModelInputs_ae30f0853c82b5598754a14bba5779ed0.html#ae30f0853c82b5598754a14bba5779ed0">pism::AgeModelInputs::AgeModelInputs</a></div><div class="ttdeci">AgeModelInputs()</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8cc_source.html#l00036">AgeModel.cc:36</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModelInputs_ae789429e9bbccb819916d8fca4ca6e58_html_ae789429e9bbccb819916d8fca4ca6e58"><div class="ttname"><a href="classpism_1_1AgeModelInputs_ae789429e9bbccb819916d8fca4ca6e58.html#ae789429e9bbccb819916d8fca4ca6e58">pism::AgeModelInputs::u3</a></div><div class="ttdeci">const array::Array3D * u3</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8hh_source.html#l00039">AgeModel.hh:39</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModelInputs_af5f1d44857820a4f79639c79a5351cd1_html_af5f1d44857820a4f79639c79a5351cd1"><div class="ttname"><a href="classpism_1_1AgeModelInputs_af5f1d44857820a4f79639c79a5351cd1.html#af5f1d44857820a4f79639c79a5351cd1">pism::AgeModelInputs::ice_thickness</a></div><div class="ttdeci">const array::Scalar * ice_thickness</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8hh_source.html#l00038">AgeModel.hh:38</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModelInputs_html"><div class="ttname"><a href="classpism_1_1AgeModelInputs.html">pism::AgeModelInputs</a></div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8hh_source.html#l00029">AgeModel.hh:29</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModel_a06c55a1925b7e2b4497f11b14b81929f_html_a06c55a1925b7e2b4497f11b14b81929f"><div class="ttname"><a href="classpism_1_1AgeModel_a06c55a1925b7e2b4497f11b14b81929f.html#a06c55a1925b7e2b4497f11b14b81929f">pism::AgeModel::define_model_state_impl</a></div><div class="ttdeci">void define_model_state_impl(const File &output) const</div><div class="ttdoc">The default (empty implementation).</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8cc_source.html#l00214">AgeModel.cc:214</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModel_a0a4e7ebc58694d40cfb11373659dae16_html_a0a4e7ebc58694d40cfb11373659dae16"><div class="ttname"><a href="classpism_1_1AgeModel_a0a4e7ebc58694d40cfb11373659dae16.html#a0a4e7ebc58694d40cfb11373659dae16">pism::AgeModel::m_ice_age</a></div><div class="ttdeci">array::Array3D m_ice_age</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8hh_source.html#l00059">AgeModel.hh:59</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModel_a35942a52ef43e4888b6233be0f2b7223_html_a35942a52ef43e4888b6233be0f2b7223"><div class="ttname"><a href="classpism_1_1AgeModel_a35942a52ef43e4888b6233be0f2b7223.html#a35942a52ef43e4888b6233be0f2b7223">pism::AgeModel::AgeModel</a></div><div class="ttdeci">AgeModel(std::shared_ptr< const Grid > grid, std::shared_ptr< const stressbalance::StressBalance > stress_balance)</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8cc_source.html#l00057">AgeModel.cc:57</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModel_a4760c33bae01cbff5e411e150bf6e17a_html_a4760c33bae01cbff5e411e150bf6e17a"><div class="ttname"><a href="classpism_1_1AgeModel_a4760c33bae01cbff5e411e150bf6e17a.html#a4760c33bae01cbff5e411e150bf6e17a">pism::AgeModel::m_stress_balance</a></div><div class="ttdeci">std::shared_ptr< const stressbalance::StressBalance > m_stress_balance</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8hh_source.html#l00061">AgeModel.hh:61</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModel_a5275eded2a708da7169851cc2a80a445_html_a5275eded2a708da7169851cc2a80a445"><div class="ttname"><a href="classpism_1_1AgeModel_a5275eded2a708da7169851cc2a80a445.html#a5275eded2a708da7169851cc2a80a445">pism::AgeModel::m_work</a></div><div class="ttdeci">array::Array3D m_work</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8hh_source.html#l00060">AgeModel.hh:60</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModel_a92bf232666aca98064f0cc162fbbde62_html_a92bf232666aca98064f0cc162fbbde62"><div class="ttname"><a href="classpism_1_1AgeModel_a92bf232666aca98064f0cc162fbbde62.html#a92bf232666aca98064f0cc162fbbde62">pism::AgeModel::max_timestep_impl</a></div><div class="ttdeci">MaxTimestep max_timestep_impl(double t) const</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8cc_source.html#l00176">AgeModel.cc:176</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModel_a99bba09ffa5ebf65fd134046ab088215_html_a99bba09ffa5ebf65fd134046ab088215"><div class="ttname"><a href="classpism_1_1AgeModel_a99bba09ffa5ebf65fd134046ab088215.html#a99bba09ffa5ebf65fd134046ab088215">pism::AgeModel::age</a></div><div class="ttdeci">const array::Array3D & age() const</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8cc_source.html#l00172">AgeModel.cc:172</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModel_ac9123c74eaec3dc86680fd48fbf858f5_html_ac9123c74eaec3dc86680fd48fbf858f5"><div class="ttname"><a href="classpism_1_1AgeModel_ac9123c74eaec3dc86680fd48fbf858f5.html#ac9123c74eaec3dc86680fd48fbf858f5">pism::AgeModel::write_model_state_impl</a></div><div class="ttdeci">void write_model_state_impl(const File &output) const</div><div class="ttdoc">The default (empty implementation).</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8cc_source.html#l00218">AgeModel.cc:218</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModel_ae481458c40e7f475459608351fb9b03d_html_ae481458c40e7f475459608351fb9b03d"><div class="ttname"><a href="classpism_1_1AgeModel_ae481458c40e7f475459608351fb9b03d.html#ae481458c40e7f475459608351fb9b03d">pism::AgeModel::init</a></div><div class="ttdeci">void init(const InputOptions &opts)</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8cc_source.html#l00187">AgeModel.cc:187</a></div></div>
<div class="ttc" id="aclasspism_1_1AgeModel_afbd21474c2ec641251ebaa77a4dfd6cc_html_afbd21474c2ec641251ebaa77a4dfd6cc"><div class="ttname"><a href="classpism_1_1AgeModel_afbd21474c2ec641251ebaa77a4dfd6cc.html#afbd21474c2ec641251ebaa77a4dfd6cc">pism::AgeModel::update</a></div><div class="ttdeci">void update(double t, double dt, const AgeModelInputs &inputs)</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8cc_source.html#l00108">AgeModel.cc:108</a></div></div>
<div class="ttc" id="aclasspism_1_1Component_a28f298fc2133baae8cebf9dedf3b4d84_html_a28f298fc2133baae8cebf9dedf3b4d84"><div class="ttname"><a href="classpism_1_1Component_a28f298fc2133baae8cebf9dedf3b4d84.html#a28f298fc2133baae8cebf9dedf3b4d84">pism::Component::m_config</a></div><div class="ttdeci">const Config::ConstPtr m_config</div><div class="ttdoc">configuration database used by this component</div><div class="ttdef"><b>Definition:</b> <a href="Component_8hh_source.html#l00158">Component.hh:158</a></div></div>
<div class="ttc" id="aclasspism_1_1Component_a29575eba605feccf4403d6b4ff0954a4_html_a29575eba605feccf4403d6b4ff0954a4"><div class="ttname"><a href="classpism_1_1Component_a29575eba605feccf4403d6b4ff0954a4.html#a29575eba605feccf4403d6b4ff0954a4">pism::Component::m_log</a></div><div class="ttdeci">const Logger::ConstPtr m_log</div><div class="ttdoc">logger (for easy access)</div><div class="ttdef"><b>Definition:</b> <a href="Component_8hh_source.html#l00162">Component.hh:162</a></div></div>
<div class="ttc" id="aclasspism_1_1Component_a48f8d0b81b7853d4e3fba0de79ec4a7f_html_a48f8d0b81b7853d4e3fba0de79ec4a7fa27f687170795f16d7eb334423b0bc9de"><div class="ttname"><a href="classpism_1_1Component_a48f8d0b81b7853d4e3fba0de79ec4a7f.html#a48f8d0b81b7853d4e3fba0de79ec4a7fa27f687170795f16d7eb334423b0bc9de">pism::Component::REGRID_WITHOUT_REGRID_VARS</a></div><div class="ttdeci">@ REGRID_WITHOUT_REGRID_VARS</div><div class="ttdef"><b>Definition:</b> <a href="Component_8hh_source.html#l00151">Component.hh:151</a></div></div>
<div class="ttc" id="aclasspism_1_1Component_a745aa37bc1b5da6db5bfc280ecb3c811_html_a745aa37bc1b5da6db5bfc280ecb3c811"><div class="ttname"><a href="classpism_1_1Component_a745aa37bc1b5da6db5bfc280ecb3c811.html#a745aa37bc1b5da6db5bfc280ecb3c811">pism::Component::m_grid</a></div><div class="ttdeci">const std::shared_ptr< const Grid > m_grid</div><div class="ttdoc">grid used by this component</div><div class="ttdef"><b>Definition:</b> <a href="Component_8hh_source.html#l00156">Component.hh:156</a></div></div>
<div class="ttc" id="aclasspism_1_1Component_a7737874c03a58a03498a33dc464d2ee9_html_a7737874c03a58a03498a33dc464d2ee9"><div class="ttname"><a href="classpism_1_1Component_a7737874c03a58a03498a33dc464d2ee9.html#a7737874c03a58a03498a33dc464d2ee9">pism::Component::regrid</a></div><div class="ttdeci">void regrid(const std::string &module_name, array::Array &variable, RegriddingFlag flag=NO_REGRID_WITHOUT_REGRID_VARS)</div><div class="ttdef"><b>Definition:</b> <a href="Component_8cc_source.html#l00159">Component.cc:159</a></div></div>
<div class="ttc" id="aclasspism_1_1Component_html"><div class="ttname"><a href="classpism_1_1Component.html">pism::Component</a></div><div class="ttdoc">A class defining a common interface for most PISM sub-models.</div><div class="ttdef"><b>Definition:</b> <a href="Component_8hh_source.html#l00118">Component.hh:118</a></div></div>
<div class="ttc" id="aclasspism_1_1File_a4ec169f0ab9d7858d09f07bffc978f2a_html_a4ec169f0ab9d7858d09f07bffc978f2a"><div class="ttname"><a href="classpism_1_1File_a4ec169f0ab9d7858d09f07bffc978f2a.html#a4ec169f0ab9d7858d09f07bffc978f2a">pism::File::find_variable</a></div><div class="ttdeci">VariableLookupData find_variable(const std::string &short_name, const std::string &std_name) const</div><div class="ttdoc">Find a variable using its standard name and/or short name.</div><div class="ttdef"><b>Definition:</b> <a href="File_8cc_source.html#l00361">File.cc:361</a></div></div>
<div class="ttc" id="aclasspism_1_1File_html"><div class="ttname"><a href="classpism_1_1File.html">pism::File</a></div><div class="ttdoc">High-level PISM I/O class.</div><div class="ttdef"><b>Definition:</b> <a href="File_8hh_source.html#l00055">File.hh:56</a></div></div>
<div class="ttc" id="aclasspism_1_1MaxTimestep_html"><div class="ttname"><a href="classpism_1_1MaxTimestep.html">pism::MaxTimestep</a></div><div class="ttdoc">Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...</div><div class="ttdef"><b>Definition:</b> <a href="MaxTimestep_8hh_source.html#l00031">MaxTimestep.hh:31</a></div></div>
<div class="ttc" id="aclasspism_1_1ParallelSection_a6b0a6e5e64970af7eadabfebe2b20bd2_html_a6b0a6e5e64970af7eadabfebe2b20bd2"><div class="ttname"><a href="classpism_1_1ParallelSection_a6b0a6e5e64970af7eadabfebe2b20bd2.html#a6b0a6e5e64970af7eadabfebe2b20bd2">pism::ParallelSection::failed</a></div><div class="ttdeci">void failed()</div><div class="ttdoc">Indicates a failure of a parallel section.</div><div class="ttdef"><b>Definition:</b> <a href="error__handling_8cc_source.html#l00185">error_handling.cc:185</a></div></div>
<div class="ttc" id="aclasspism_1_1ParallelSection_ac23296abee1cbcb3c3fd68c7f5ce0835_html_ac23296abee1cbcb3c3fd68c7f5ce0835"><div class="ttname"><a href="classpism_1_1ParallelSection_ac23296abee1cbcb3c3fd68c7f5ce0835.html#ac23296abee1cbcb3c3fd68c7f5ce0835">pism::ParallelSection::check</a></div><div class="ttdeci">void check()</div><div class="ttdef"><b>Definition:</b> <a href="error__handling_8cc_source.html#l00201">error_handling.cc:201</a></div></div>
<div class="ttc" id="aclasspism_1_1ParallelSection_html"><div class="ttname"><a href="classpism_1_1ParallelSection.html">pism::ParallelSection</a></div><div class="ttdef"><b>Definition:</b> <a href="error__handling_8hh_source.html#l00069">error_handling.hh:69</a></div></div>
<div class="ttc" id="aclasspism_1_1RuntimeError_ad0ed5f05a9a4e3e403a1d62f8d1e4e7d_html_ad0ed5f05a9a4e3e403a1d62f8d1e4e7d"><div class="ttname"><a href="classpism_1_1RuntimeError_ad0ed5f05a9a4e3e403a1d62f8d1e4e7d.html#ad0ed5f05a9a4e3e403a1d62f8d1e4e7d">pism::RuntimeError::formatted</a></div><div class="ttdeci">static RuntimeError formatted(const ErrorLocation &location, const char format[],...) __attribute__((format(printf</div><div class="ttdoc">build a RuntimeError with a formatted message</div><div class="ttdef"><b>Definition:</b> <a href="error__handling_8cc_source.html#l00047">error_handling.cc:47</a></div></div>
<div class="ttc" id="aclasspism_1_1VariableMetadata_a5e378cf7077ab00a808ef446a79dc34d_html_a5e378cf7077ab00a808ef446a79dc34d"><div class="ttname"><a href="classpism_1_1VariableMetadata_a5e378cf7077ab00a808ef446a79dc34d.html#a5e378cf7077ab00a808ef446a79dc34d">pism::VariableMetadata::long_name</a></div><div class="ttdeci">VariableMetadata & long_name(const std::string &input)</div><div class="ttdef"><b>Definition:</b> <a href="VariableMetadata_8hh_source.html#l00115">VariableMetadata.hh:115</a></div></div>
<div class="ttc" id="aclasspism_1_1VariableMetadata_ae73185be0693a8607b8e0f74558e11e4_html_ae73185be0693a8607b8e0f74558e11e4"><div class="ttname"><a href="classpism_1_1VariableMetadata_ae73185be0693a8607b8e0f74558e11e4.html#ae73185be0693a8607b8e0f74558e11e4">pism::VariableMetadata::units</a></div><div class="ttdeci">VariableMetadata & units(const std::string &input)</div><div class="ttdef"><b>Definition:</b> <a href="VariableMetadata_8hh_source.html#l00123">VariableMetadata.hh:123</a></div></div>
<div class="ttc" id="aclasspism_1_1array_1_1AccessScope_html"><div class="ttname"><a href="classpism_1_1array_1_1AccessScope.html">pism::array::AccessScope</a></div><div class="ttdoc">Makes sure that we call begin_access() and end_access() for all accessed array::Arrays.</div><div class="ttdef"><b>Definition:</b> <a href="Array_8hh_source.html#l00065">Array.hh:65</a></div></div>
<div class="ttc" id="aclasspism_1_1array_1_1Array3D_a0ea8b6700f5aab01e913dcbad9de72a5_html_a0ea8b6700f5aab01e913dcbad9de72a5"><div class="ttname"><a href="classpism_1_1array_1_1Array3D_a0ea8b6700f5aab01e913dcbad9de72a5.html#a0ea8b6700f5aab01e913dcbad9de72a5">pism::array::Array3D::copy_from</a></div><div class="ttdeci">void copy_from(const Array3D &input)</div><div class="ttdef"><b>Definition:</b> <a href="Array3D_8cc_source.html#l00208">Array3D.cc:208</a></div></div>
<div class="ttc" id="aclasspism_1_1array_1_1Array3D_a57f6842686575847d4662ebe9a69bca6_html_a57f6842686575847d4662ebe9a69bca6"><div class="ttname"><a href="classpism_1_1array_1_1Array3D_a57f6842686575847d4662ebe9a69bca6.html#a57f6842686575847d4662ebe9a69bca6">pism::array::Array3D::set_column</a></div><div class="ttdeci">void set_column(int i, int j, double c)</div><div class="ttdoc">Set all values of scalar quantity to given a single value in a particular column.</div><div class="ttdef"><b>Definition:</b> <a href="Array3D_8cc_source.html#l00049">Array3D.cc:49</a></div></div>
<div class="ttc" id="aclasspism_1_1array_1_1Array3D_ac74ddc5a845ca13d159983b9e7b20791_html_ac74ddc5a845ca13d159983b9e7b20791"><div class="ttname"><a href="classpism_1_1array_1_1Array3D_ac74ddc5a845ca13d159983b9e7b20791.html#ac74ddc5a845ca13d159983b9e7b20791">pism::array::Array3D::get_column</a></div><div class="ttdeci">double * get_column(int i, int j)</div><div class="ttdef"><b>Definition:</b> <a href="Array3D_8cc_source.html#l00120">Array3D.cc:120</a></div></div>
<div class="ttc" id="aclasspism_1_1array_1_1Array3D_html"><div class="ttname"><a href="classpism_1_1array_1_1Array3D.html">pism::array::Array3D</a></div><div class="ttdoc">A virtual class collecting methods common to ice and bedrock 3D fields.</div><div class="ttdef"><b>Definition:</b> <a href="Array3D_8hh_source.html#l00033">Array3D.hh:33</a></div></div>
<div class="ttc" id="aclasspism_1_1array_1_1Array_a0326efd779d857755513901da9a54992_html_a0326efd779d857755513901da9a54992"><div class="ttname"><a href="classpism_1_1array_1_1Array_a0326efd779d857755513901da9a54992.html#a0326efd779d857755513901da9a54992">pism::array::Array::read</a></div><div class="ttdeci">void read(const std::string &filename, unsigned int time)</div><div class="ttdef"><b>Definition:</b> <a href="Array_8cc_source.html#l00809">Array.cc:809</a></div></div>
<div class="ttc" id="aclasspism_1_1array_1_1Array_a3e1a5859cef073a95e5e0cc5f1cc0fdb_html_a3e1a5859cef073a95e5e0cc5f1cc0fdb"><div class="ttname"><a href="classpism_1_1array_1_1Array_a3e1a5859cef073a95e5e0cc5f1cc0fdb.html#a3e1a5859cef073a95e5e0cc5f1cc0fdb">pism::array::Array::define</a></div><div class="ttdeci">void define(const File &file, io::Type default_type) const</div><div class="ttdoc">Define variables corresponding to an Array in a file opened using file.</div><div class="ttdef"><b>Definition:</b> <a href="Array_8cc_source.html#l00540">Array.cc:540</a></div></div>
<div class="ttc" id="aclasspism_1_1array_1_1Array_a4cdaeb827d166a076668d2ab86416793_html_a4cdaeb827d166a076668d2ab86416793"><div class="ttname"><a href="classpism_1_1array_1_1Array_a4cdaeb827d166a076668d2ab86416793.html#a4cdaeb827d166a076668d2ab86416793">pism::array::Array::write</a></div><div class="ttdeci">void write(const std::string &filename) const</div><div class="ttdef"><b>Definition:</b> <a href="Array_8cc_source.html#l00800">Array.cc:800</a></div></div>
<div class="ttc" id="aclasspism_1_1array_1_1Array_a9959fcf0124f084e6a2835ed745ce0d1_html_a9959fcf0124f084e6a2835ed745ce0d1"><div class="ttname"><a href="classpism_1_1array_1_1Array_a9959fcf0124f084e6a2835ed745ce0d1.html#a9959fcf0124f084e6a2835ed745ce0d1">pism::array::Array::set</a></div><div class="ttdeci">void set(double c)</div><div class="ttdoc">Result: v[j] <- c for all j.</div><div class="ttdef"><b>Definition:</b> <a href="Array_8cc_source.html#l00707">Array.cc:707</a></div></div>
<div class="ttc" id="aclasspism_1_1array_1_1Array_af9eece42153cd03bfc8ba237ae5310c4_html_af9eece42153cd03bfc8ba237ae5310c4"><div class="ttname"><a href="classpism_1_1array_1_1Array_af9eece42153cd03bfc8ba237ae5310c4.html#af9eece42153cd03bfc8ba237ae5310c4">pism::array::Array::metadata</a></div><div class="ttdeci">SpatialVariableMetadata & metadata(unsigned int N=0)</div><div class="ttdoc">Returns a reference to the SpatialVariableMetadata object containing metadata for the compoment N.</div><div class="ttdef"><b>Definition:</b> <a href="Array_8cc_source.html#l00553">Array.cc:553</a></div></div>
<div class="ttc" id="aclasspism_1_1array_1_1Array_html"><div class="ttname"><a href="classpism_1_1array_1_1Array.html">pism::array::Array</a></div><div class="ttdoc">Abstract class for reading, writing, allocating, and accessing a DA-based PETSc Vec (2D and 3D fields...</div><div class="ttdef"><b>Definition:</b> <a href="Array_8hh_source.html#l00208">Array.hh:208</a></div></div>
<div class="ttc" id="aclasspism_1_1array_1_1Scalar_html"><div class="ttname"><a href="classpism_1_1array_1_1Scalar.html">pism::array::Scalar</a></div><div class="ttdef"><b>Definition:</b> <a href="Scalar_8hh_source.html#l00031">Scalar.hh:31</a></div></div>
<div class="ttc" id="aclasspism_1_1columnSystemCtx_a28bb508eccee6af0473307b128f5608a_html_a28bb508eccee6af0473307b128f5608a"><div class="ttname"><a href="classpism_1_1columnSystemCtx_a28bb508eccee6af0473307b128f5608a.html#a28bb508eccee6af0473307b128f5608a">pism::columnSystemCtx::z</a></div><div class="ttdeci">const std::vector< double > & z() const</div><div class="ttdef"><b>Definition:</b> <a href="ColumnSystem_8cc_source.html#l00283">ColumnSystem.cc:283</a></div></div>
<div class="ttc" id="aclasspism_1_1columnSystemCtx_accb83857d9990f5b716bd8868cc37523_html_accb83857d9990f5b716bd8868cc37523"><div class="ttname"><a href="classpism_1_1columnSystemCtx_accb83857d9990f5b716bd8868cc37523.html#accb83857d9990f5b716bd8868cc37523">pism::columnSystemCtx::ks</a></div><div class="ttdeci">unsigned int ks() const</div><div class="ttdef"><b>Definition:</b> <a href="ColumnSystem_8cc_source.html#l00275">ColumnSystem.cc:275</a></div></div>
<div class="ttc" id="aclasspism_1_1columnSystemCtx_aeca38a103cb8519056d700c0e94b8aa5_html_aeca38a103cb8519056d700c0e94b8aa5"><div class="ttname"><a href="classpism_1_1columnSystemCtx_aeca38a103cb8519056d700c0e94b8aa5.html#aeca38a103cb8519056d700c0e94b8aa5">pism::columnSystemCtx::fine_to_coarse</a></div><div class="ttdeci">void fine_to_coarse(const std::vector< double > &fine, int i, int j, array::Array3D &coarse) const</div><div class="ttdef"><b>Definition:</b> <a href="ColumnSystem_8cc_source.html#l00287">ColumnSystem.cc:287</a></div></div>
<div class="ttc" id="aerror__handling_8hh_aa0c260bffe8a4dbd77d48e8feee7c526_html_aa0c260bffe8a4dbd77d48e8feee7c526"><div class="ttname"><a href="error__handling_8hh_aa0c260bffe8a4dbd77d48e8feee7c526.html#aa0c260bffe8a4dbd77d48e8feee7c526">PISM_ERROR_LOCATION</a></div><div class="ttdeci">#define PISM_ERROR_LOCATION</div><div class="ttdef"><b>Definition:</b> <a href="error__handling_8hh_source.html#l00043">error_handling.hh:43</a></div></div>
<div class="ttc" id="anamespacepism_1_1array_ab49b8ee9a79e7f46ec91fc40efdb7ca3_html_ab49b8ee9a79e7f46ec91fc40efdb7ca3a7aa2276678f0b2cd3f63c15be430372f"><div class="ttname"><a href="namespacepism_1_1array_ab49b8ee9a79e7f46ec91fc40efdb7ca3.html#ab49b8ee9a79e7f46ec91fc40efdb7ca3a7aa2276678f0b2cd3f63c15be430372f">pism::array::WITH_GHOSTS</a></div><div class="ttdeci">@ WITH_GHOSTS</div><div class="ttdef"><b>Definition:</b> <a href="Array_8hh_source.html#l00062">Array.hh:62</a></div></div>
<div class="ttc" id="anamespacepism_1_1array_ab49b8ee9a79e7f46ec91fc40efdb7ca3_html_ab49b8ee9a79e7f46ec91fc40efdb7ca3af672399d2e1a4112ca5d4a4591c30885"><div class="ttname"><a href="namespacepism_1_1array_ab49b8ee9a79e7f46ec91fc40efdb7ca3.html#ab49b8ee9a79e7f46ec91fc40efdb7ca3af672399d2e1a4112ca5d4a4591c30885">pism::array::WITHOUT_GHOSTS</a></div><div class="ttdeci">@ WITHOUT_GHOSTS</div><div class="ttdef"><b>Definition:</b> <a href="Array_8hh_source.html#l00062">Array.hh:62</a></div></div>
<div class="ttc" id="anamespacepism_1_1fem_ae2f57ac21774f132ef388b3de9cde364_html_ae2f57ac21774f132ef388b3de9cde364"><div class="ttname"><a href="namespacepism_1_1fem_ae2f57ac21774f132ef388b3de9cde364.html#ae2f57ac21774f132ef388b3de9cde364">pism::fem::column</a></div><div class="ttdeci">static Vector3 column(const double A[3][3], size_t k)</div><div class="ttdef"><b>Definition:</b> <a href="Element_8cc_source.html#l00051">Element.cc:51</a></div></div>
<div class="ttc" id="anamespacepism_1_1io_a0caba8881b0d36c8cc1eccfa13c0e81f_html_a0caba8881b0d36c8cc1eccfa13c0e81fa308d77197e903bf4f5505b8cb5e377a2"><div class="ttname"><a href="namespacepism_1_1io_a0caba8881b0d36c8cc1eccfa13c0e81f.html#a0caba8881b0d36c8cc1eccfa13c0e81fa308d77197e903bf4f5505b8cb5e377a2">pism::io::PISM_GUESS</a></div><div class="ttdeci">@ PISM_GUESS</div><div class="ttdef"><b>Definition:</b> <a href="IO__Flags_8hh_source.html#l00056">IO_Flags.hh:56</a></div></div>
<div class="ttc" id="anamespacepism_1_1io_a12c1fd23e92335e2396baab0354b262f_html_a12c1fd23e92335e2396baab0354b262fabb5d91fa1da1214c24d193a75f11f0a2"><div class="ttname"><a href="namespacepism_1_1io_a12c1fd23e92335e2396baab0354b262f.html#a12c1fd23e92335e2396baab0354b262fabb5d91fa1da1214c24d193a75f11f0a2">pism::io::PISM_READONLY</a></div><div class="ttdeci">@ PISM_READONLY</div><div class="ttdoc">open an existing file for reading only</div><div class="ttdef"><b>Definition:</b> <a href="IO__Flags_8hh_source.html#l00072">IO_Flags.hh:72</a></div></div>
<div class="ttc" id="anamespacepism_1_1io_a53ffb40793c398e10644fbd2ecda3e77_html_a53ffb40793c398e10644fbd2ecda3e77a6a72c64f82168bec6bf8b648a86648de"><div class="ttname"><a href="namespacepism_1_1io_a53ffb40793c398e10644fbd2ecda3e77.html#a53ffb40793c398e10644fbd2ecda3e77a6a72c64f82168bec6bf8b648a86648de">pism::io::PISM_DOUBLE</a></div><div class="ttdeci">@ PISM_DOUBLE</div><div class="ttdef"><b>Definition:</b> <a href="IO__Flags_8hh_source.html#l00053">IO_Flags.hh:52</a></div></div>
<div class="ttc" id="anamespacepism_a41f7a488ef733f2b1e3575cadc5e8dc2_html_a41f7a488ef733f2b1e3575cadc5e8dc2"><div class="ttname"><a href="namespacepism_a41f7a488ef733f2b1e3575cadc5e8dc2.html#a41f7a488ef733f2b1e3575cadc5e8dc2">pism::check_input</a></div><div class="ttdeci">static void check_input(const array::Array *ptr, const char *name)</div><div class="ttdef"><b>Definition:</b> <a href="AgeModel_8cc_source.html#l00043">AgeModel.cc:43</a></div></div>
<div class="ttc" id="anamespacepism_a56e80801555b7f36f4dd28941739654a_html_a56e80801555b7f36f4dd28941739654aa6aff4b43552f00d5cc331453ff4029bc"><div class="ttname"><a href="namespacepism_a56e80801555b7f36f4dd28941739654a.html#a56e80801555b7f36f4dd28941739654aa6aff4b43552f00d5cc331453ff4029bc">pism::INIT_RESTART</a></div><div class="ttdeci">@ INIT_RESTART</div><div class="ttdef"><b>Definition:</b> <a href="Component_8hh_source.html#l00056">Component.hh:56</a></div></div>
<div class="ttc" id="anamespacepism_a7343afff8d353b59dbdec563bd896812_html_a7343afff8d353b59dbdec563bd896812"><div class="ttname"><a href="namespacepism_a7343afff8d353b59dbdec563bd896812.html#a7343afff8d353b59dbdec563bd896812">pism::k</a></div><div class="ttdeci">static const double k</div><div class="ttdef"><b>Definition:</b> <a href="exactTestP_8cc_source.html#l00042">exactTestP.cc:42</a></div></div>
<div class="ttc" id="anamespacepism_html"><div class="ttname"><a href="namespacepism.html">pism</a></div><div class="ttdef"><b>Definition:</b> <a href="AgeColumnSystem_8cc_source.html#l00023">AgeColumnSystem.cc:23</a></div></div>
<div class="ttc" id="astructpism_1_1InputOptions_a0fe5db51286e55c31b1575dc9ecc5d70_html_a0fe5db51286e55c31b1575dc9ecc5d70"><div class="ttname"><a href="structpism_1_1InputOptions_a0fe5db51286e55c31b1575dc9ecc5d70.html#a0fe5db51286e55c31b1575dc9ecc5d70">pism::InputOptions::type</a></div><div class="ttdeci">InitializationType type</div><div class="ttdoc">initialization type</div><div class="ttdef"><b>Definition:</b> <a href="Component_8hh_source.html#l00061">Component.hh:61</a></div></div>
<div class="ttc" id="astructpism_1_1InputOptions_a2dc298f0e83b951fa1df5eab910639e5_html_a2dc298f0e83b951fa1df5eab910639e5"><div class="ttname"><a href="structpism_1_1InputOptions_a2dc298f0e83b951fa1df5eab910639e5.html#a2dc298f0e83b951fa1df5eab910639e5">pism::InputOptions::filename</a></div><div class="ttdeci">std::string filename</div><div class="ttdoc">name of the input file (if applicable)</div><div class="ttdef"><b>Definition:</b> <a href="Component_8hh_source.html#l00063">Component.hh:63</a></div></div>
<div class="ttc" id="astructpism_1_1InputOptions_ae33c7fb4ca1317444d959bc3e1514ba4_html_ae33c7fb4ca1317444d959bc3e1514ba4"><div class="ttname"><a href="structpism_1_1InputOptions_ae33c7fb4ca1317444d959bc3e1514ba4.html#ae33c7fb4ca1317444d959bc3e1514ba4">pism::InputOptions::record</a></div><div class="ttdeci">unsigned int record</div><div class="ttdoc">index of the record to re-start from</div><div class="ttdef"><b>Definition:</b> <a href="Component_8hh_source.html#l00065">Component.hh:65</a></div></div>
<div class="ttc" id="astructpism_1_1InputOptions_html"><div class="ttname"><a href="structpism_1_1InputOptions.html">pism::InputOptions</a></div><div class="ttdef"><b>Definition:</b> <a href="Component_8hh_source.html#l00058">Component.hh:58</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>