-
Notifications
You must be signed in to change notification settings - Fork 7
/
fgmax_tools_module.html
292 lines (271 loc) · 17.1 KB
/
fgmax_tools_module.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>fgmax_tools module for working with fgmax grids — Clawpack 5.11.x documentation</title>
<link rel="stylesheet" href="_static/base.css" type="text/css" />
<link rel="stylesheet" href="_static/layout.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/flasky.css" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="shortcut icon" href="_static/clawicon.ico"/>
<link rel="author" title="About these documents" href="about.html" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
</head><body>
<div id="main-wrapper" class="sphinx">
<div id="header-wrapper">
<section id="header">
<!-- <h1><a href="http://clawpack.org/">Clawpack</a></h1> -->
<h1><a href="http://clawpack.org/">Clawpack-5</a></h1>
<nav>
<ul>
<li>
<a href="contents.html">Docs</a>
</li>
<li>
<a href="installing.html">Install</a>
</li>
<li>
<a class="" href="http://clawpack.org/gallery/index.html">Gallery</a>
</li>
<li>
<a href="about.html">Citation</a>
</li>
<li>
<a class="active" href="http://github.com/clawpack">GitHub</a>
</li>
<li>
<a class="" href="community.html">Community</a>
</li>
<li>
<a class="" href="developers.html">Contribute</a>
</li>
</ul>
</nav>
</section>
<div class="decoration"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="contents.html">Clawpack 5.11.x documentation</a> »</li>
<li class="nav-item nav-item-this"><a href="">fgmax_tools module for working with fgmax grids</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="fgmax-tools-module-for-working-with-fgmax-grids">
<span id="fgmax-tools-module"></span><h1>fgmax_tools module for working with fgmax grids<a class="headerlink" href="#fgmax-tools-module-for-working-with-fgmax-grids" title="Permalink to this heading">¶</a></h1>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<ul class="simple">
<li><p><a class="reference internal" href="fgmax.html#fgmax"><span class="std std-ref">Fixed grid monitoring (fgmax)</span></a></p></li>
</ul>
</div>
<section id="module-clawpack.geoclaw.fgmax_tools">
<span id="documentation-auto-generated-from-the-module-docstrings"></span><h2>Documentation auto-generated from the module docstrings<a class="headerlink" href="#module-clawpack.geoclaw.fgmax_tools" title="Permalink to this heading">¶</a></h2>
<p>fgmax_tools module: $CLAW/geoclaw/src/python/geoclaw/fgmax_tools.py</p>
<p>Tools to specify an fgmax grid for keeping track of maximum flow depth, etc.
and to read in the fgmax output after doing a GeoClaw run.</p>
<dl class="py class">
<dt class="sig sig-object py" id="clawpack.geoclaw.fgmax_tools.FGmaxGrid">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.fgmax_tools.</span></span><span class="sig-name descname"><span class="pre">FGmaxGrid</span></span><a class="headerlink" href="#clawpack.geoclaw.fgmax_tools.FGmaxGrid" title="Permalink to this definition">¶</a></dt>
<dd><p>New class introduced in 5.2.1 to keep store information both about the
fgmax input data and the output generated by a GeoClaw run.</p>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.fgmax_tools.FGmaxGrid.bounding_box">
<span class="sig-name descname"><span class="pre">bounding_box</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.fgmax_tools.FGmaxGrid.bounding_box" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the bounding box of the grid as a list [x1,x2,y1,y2]</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.fgmax_tools.FGmaxGrid.interp_dz">
<span class="sig-name descname"><span class="pre">interp_dz</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dtopo_path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dtopo_type</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.fgmax_tools.FGmaxGrid.interp_dz" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute approximate values of deformation dz on X,Y grid using
a specified dtopo file.
Also calculates B0 = B - dz, attempting to recover the pre-event
topography from the GeoClaw run topography stored in B.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.fgmax_tools.FGmaxGrid.ps4_to_arrays">
<span class="sig-name descname"><span class="pre">ps4_to_arrays</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.fgmax_tools.FGmaxGrid.ps4_to_arrays" title="Permalink to this definition">¶</a></dt>
<dd><p>for point_style==4, convert lists of fgmax values into masked arrays
based on the topo_style==3 file self.xy_fname that was used to specify
the fgmax points in the GeoClaw run.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.fgmax_tools.FGmaxGrid.read_fgmax_grids_data">
<span class="sig-name descname"><span class="pre">read_fgmax_grids_data</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fgno</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data_file</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'fgmax_grids.data'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.fgmax_tools.FGmaxGrid.read_fgmax_grids_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Read input info for fgmax grid number fgno from the data file
fgmax_grids.data, which should have been created by setrun.py.
This file now contains info about all fgmax grids.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.fgmax_tools.FGmaxGrid.read_output">
<span class="sig-name descname"><span class="pre">read_output</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fgno</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">outdir</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">indexing</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'ij'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.fgmax_tools.FGmaxGrid.read_output" title="Permalink to this definition">¶</a></dt>
<dd><p>Read the GeoClaw results on the fgmax grid numbered <em>fgno</em>.</p>
<dl class="simple">
<dt>indexing=’ij’ gives backward compatibility.</dt><dd><p>X[i,j],Y[i,j] corresponds to point x[i],y[j]</p>
</dd>
</dl>
<p>Alternatively, can set indexing==’xy’ so that X,Y and other
arrays have same layout as topo arrays:</p>
<aside class="system-message">
<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">/Users/rjl/clawpack_src/clawpack_master/geoclaw/src/python/geoclaw/fgmax_tools.py:docstring of clawpack.geoclaw.fgmax_tools.FGmaxGrid.read_output</span>, line 8)</p>
<p>Unexpected indentation.</p>
</aside>
<blockquote>
<div><p>X[j,i],Y[j,i] corresponds to point x[i],y[j]</p>
</div></blockquote>
<aside class="system-message">
<p class="system-message-title">System Message: WARNING/2 (<span class="docutils literal">/Users/rjl/clawpack_src/clawpack_master/geoclaw/src/python/geoclaw/fgmax_tools.py:docstring of clawpack.geoclaw.fgmax_tools.FGmaxGrid</span>, line 1)</p>
<p>Block quote ends without a blank line; unexpected unindent.</p>
</aside>
<p>This is useful if you want to save the fgmax results in same format as
topofiles, using topotools.Topography.write().</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.fgmax_tools.FGmaxGrid.write_to_fgmax_data">
<span class="sig-name descname"><span class="pre">write_to_fgmax_data</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fid</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.fgmax_tools.FGmaxGrid.write_to_fgmax_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Write the fgmax grid data to the file specified by <cite>fid</cite>, normally
the <cite>fgmax_grids.data</cite> file that is read in by the GeoClaw Fortran code.</p>
</dd></dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="clawpack.geoclaw.fgmax_tools.adjust_fgmax_1d">
<span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.fgmax_tools.</span></span><span class="sig-name descname"><span class="pre">adjust_fgmax_1d</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x1_desired</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x2_desired</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x1_domain</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dx</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.fgmax_tools.adjust_fgmax_1d" title="Permalink to this definition">¶</a></dt>
<dd><p>Adjust the upper and lower limits of a grid so that equally spaced
grid points with spacing <cite>dx</cite> lie exactly at cell centers, so that
no interpolation is needed for fgmax values. Note that parameter
names refer to <cite>x</cite> limits, but works equally well for <cite>y</cite> values.</p>
<dl class="field-list simple">
<dt class="field-odd">Input<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p>x1_desired, x2_desired: approximate desired limits of fgmax grid</p></li>
<li><p>x1_domain: lower edge of computational domain</p></li>
<li><p>dx: Mesh spacing on fine grid that fgmax grid should conform to</p></li>
</ul>
</dd>
<dt class="field-even">Output<span class="colon">:</span></dt>
<dd class="field-even"><ul class="simple">
<li><p>x1_new, x2_new: limits to set so (x2-x1) is integer multiple
of dx and points are at cell centers of computational grid</p></li>
<li><p>npoints: number of points to specify, so that
<cite>linspace(x1_new, x2_new, npoints) gives points with spacing `dx</cite>.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p><a href="http://clawpack.org/">
<img class="logo" src= "_static/clawlogo.jpg" alt="Logo"/>
</a>
<h2>Version 5.11.x</h2>
</p>
<div>
<h3><a href="contents.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">fgmax_tools module for working with fgmax grids</a><ul>
<li><a class="reference internal" href="#module-clawpack.geoclaw.fgmax_tools">Documentation auto-generated from the module docstrings</a><ul>
<li><a class="reference internal" href="#clawpack.geoclaw.fgmax_tools.FGmaxGrid"><code class="docutils literal notranslate"><span class="pre">FGmaxGrid</span></code></a><ul>
<li><a class="reference internal" href="#clawpack.geoclaw.fgmax_tools.FGmaxGrid.bounding_box"><code class="docutils literal notranslate"><span class="pre">FGmaxGrid.bounding_box()</span></code></a></li>
<li><a class="reference internal" href="#clawpack.geoclaw.fgmax_tools.FGmaxGrid.interp_dz"><code class="docutils literal notranslate"><span class="pre">FGmaxGrid.interp_dz()</span></code></a></li>
<li><a class="reference internal" href="#clawpack.geoclaw.fgmax_tools.FGmaxGrid.ps4_to_arrays"><code class="docutils literal notranslate"><span class="pre">FGmaxGrid.ps4_to_arrays()</span></code></a></li>
<li><a class="reference internal" href="#clawpack.geoclaw.fgmax_tools.FGmaxGrid.read_fgmax_grids_data"><code class="docutils literal notranslate"><span class="pre">FGmaxGrid.read_fgmax_grids_data()</span></code></a></li>
<li><a class="reference internal" href="#clawpack.geoclaw.fgmax_tools.FGmaxGrid.read_output"><code class="docutils literal notranslate"><span class="pre">FGmaxGrid.read_output()</span></code></a></li>
<li><a class="reference internal" href="#clawpack.geoclaw.fgmax_tools.FGmaxGrid.write_to_fgmax_data"><code class="docutils literal notranslate"><span class="pre">FGmaxGrid.write_to_fgmax_data()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#clawpack.geoclaw.fgmax_tools.adjust_fgmax_1d"><code class="docutils literal notranslate"><span class="pre">adjust_fgmax_1d()</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div><h3>Related Topics</h3>
<ul>
<li><a href="contents.html">Documentation overview</a><ul>
</ul></li>
</ul>
<div class="widget navlinks">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/fgmax_tools_module.rst.txt"
rel="nofollow"
target="_blank">Source .rst</a></li>
<li><a href="https://github.com/clawpack/doc/blob/dev/doc/fgmax_tools_module.rst"
rel="nofollow"
target="_blank">Source on GitHub</a></li>
<li><a href="https://github.com/clawpack/doc/commits/dev/doc/fgmax_tools_module.rst"
rel="nofollow"
target="_blank">History</a></li>
<li><a href="https://github.com/clawpack/doc/edit/dev/doc/fgmax_tools_module.rst"
rel="nofollow"
target="_blank">Suggest Edits</a></li>
<li><a href="https://github.com/clawpack/doc/issues/new/choose"
rel="nofollow"
target="_blank">Raise an Issue</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<h4>Latest Version</h4>
<ul>
<li><a href="./dev/fgmax_tools_module.html">dev</a></li>
<li><a href="fgmax_tools_module.html">v5.11.x</a></li>
</ul>
<h4>Older Versions</h4>
<ul>
<li><a href="./v5.10.x/fgmax_tools_module.html">v5.10.x</a></li>
<li><a href="./v5.7.x/fgmax_tools_module.html">v5.7.x</a></li>
<li><a href="./v5.8.x/fgmax_tools_module.html">v5.8.x</a></li>
<li><a href="./v5.9.x/fgmax_tools_module.html">v5.9.x</a></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
© Copyright CC-BY 2024, The Clawpack Development Team.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-44811544-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>