-
Notifications
You must be signed in to change notification settings - Fork 7
/
dtopotools_module.html
1154 lines (1068 loc) · 99.1 KB
/
dtopotools_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
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!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>dtopotools module for moving topography — 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" />
<link rel="next" title="geoclaw.util module of utility functions" href="geoclaw_util_module.html" />
<link rel="prev" title="topotools module for working with topography data" href="topotools_module.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="right" >
<a href="geoclaw_util_module.html" title="geoclaw.util module of utility functions"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="topotools_module.html" title="topotools module for working with topography data"
accesskey="P">previous</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-1"><a href="geoclaw.html" >GeoClaw Description and Detailed Contents</a> »</li>
<li class="nav-item nav-item-2"><a href="topotools.html" accesskey="U">Python tools for working with topo and dtopo</a> »</li>
<li class="nav-item nav-item-this"><a href="">dtopotools module for moving topography</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="dtopotools-module-for-moving-topography">
<span id="dtopotools-module"></span><h1>dtopotools module for moving topography<a class="headerlink" href="#dtopotools-module-for-moving-topography" title="Permalink to this heading">¶</a></h1>
<p>See also <a class="reference internal" href="okada.html#okada"><span class="std std-ref">Earthquake sources: Fault slip and the Okada model</span></a> for a discussion of the subfault parameters required
for the Okada model of seafloor deformation resulting from slip on a
specified fault plane.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Starting in Version 5.5.0, the subfault parameter <cite>rise_time</cite>
now refers to the total rise time of a subfault, while <cite>rise_time_starting</cite>
is the rise time up to the break in the piecewise quadratic
function defining the rise. By default <cite>rise_time_ending</cite> is set equal to
<cite>rise_time_starting</cite>. See the module function <cite>rise_fraction</cite> below
for more description. (In earlier versions, <cite>rise_time</cite> read in from csv
files, for example, was erroneously interpreted as <cite>rise_time_starting</cite>
is now.)</p>
</div>
<p>The notebook <a class="reference external" href="http://www.clawpack.org/gallery/_static/notebooks/geoclaw/dtopotools_examples.html">dtopotools_examples.ipynb</a>
illustrates how to use some of the tools.</p>
<p>The notebook <a class="reference external" href="http://www.clawpack.org/gallery/_static/notebooks/geoclaw/Okada.html">Okada.ipynb</a>
illustrates the Okada model using some of these tools.</p>
<p>The file <cite>$CLAW/geoclaw/tests/test_dtopotools.py</cite> contains some tests of these
tools. Looking at these test routines may also give some ideas on
how to use them.</p>
<section id="module-clawpack.geoclaw.dtopotools">
<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.dtopotools" title="Permalink to this heading">¶</a></h2>
<p>GeoClaw dtopotools Module <cite>$CLAW/geoclaw/src/python/geoclaw/dtopotools.py</cite></p>
<p>Module provides several functions for dealing with changes to topography
(usually due to earthquakes) including reading sub-fault specifications,
writing out dtopo files, and calculating Okada based deformations.</p>
<dl class="field-list simple">
<dt class="field-odd">Classes<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p>DTopography</p></li>
<li><p>SubFault</p></li>
<li><p>Fault</p></li>
<li><p>UCSBFault</p></li>
<li><p>CSVFault</p></li>
<li><p>SiftFault</p></li>
<li><p>SegmentedPlaneFault</p></li>
<li><p>Fault1d</p></li>
<li><p>SubFault1d</p></li>
<li><p>DTopography1d</p></li>
</ul>
</dd>
<dt class="field-even">Functions<span class="colon">:</span></dt>
<dd class="field-even"><ul class="simple">
<li><p>plot_dz_contours</p></li>
<li><p>plot_dz_colors</p></li>
<li><p>Mw</p></li>
<li><p>strike_direction</p></li>
<li><p>rise_fraction</p></li>
</ul>
</dd>
</dl>
<dl class="py class">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.CSVFault">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">CSVFault</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">subfaults</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">input_units</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coordinate_specification</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.CSVFault" title="Permalink to this definition">¶</a></dt>
<dd><p>Fault subclass for reading in CSV formatted files</p>
<p>Assumes that the first row gives the column headings</p>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.CSVFault.read">
<span class="sig-name descname"><span class="pre">read</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">input_units</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coordinate_specification</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'top</span> <span class="pre">center'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rupture_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'static'</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">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.CSVFault.read" title="Permalink to this definition">¶</a></dt>
<dd><p>Read in subfault specification at <em>path</em>.</p>
<p>Creates a list of subfaults from the subfault specification file at
<em>path</em>.</p>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.DTopography">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">DTopography</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</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">dtopo_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.DTopography" title="Permalink to this definition">¶</a></dt>
<dd><p>Basic object representing moving topography</p>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.DTopography.dZ_at_t">
<span class="sig-name descname"><span class="pre">dZ_at_t</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">t</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.DTopography.dZ_at_t" title="Permalink to this definition">¶</a></dt>
<dd><p>Interpolate dZ to specified time t and return deformation.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.DTopography.dZ_max">
<span class="sig-name descname"><span class="pre">dZ_max</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.DTopography.dZ_max" title="Permalink to this definition">¶</a></dt>
<dd><p>Return max(abs(dZ)) over all dz in self.dZ, the maximum
surface deformation for this dtopo.
DEPRECATE? – it’s now a 1-liner</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.DTopography.plot_dZ_colors">
<span class="sig-name descname"><span class="pre">plot_dZ_colors</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">t</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">axes</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">cmax_dZ</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">dZ_interval</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">colorbar_ticksize</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">colorbar_labelsize</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fig_kwargs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.DTopography.plot_dZ_colors" title="Permalink to this definition">¶</a></dt>
<dd><p>Interpolate self.dZ to specified time t and then call module function
plot_dZ_colors.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.DTopography.plot_dZ_contours">
<span class="sig-name descname"><span class="pre">plot_dZ_contours</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">t</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dZ_interval</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">axes</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">fig_kwargs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.DTopography.plot_dZ_contours" title="Permalink to this definition">¶</a></dt>
<dd><p>Interpolate self.dZ to specified time t and then call module function
plot_dZ_contours.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.DTopography.read">
<span class="sig-name descname"><span class="pre">read</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</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">dtopo_type</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">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.DTopography.read" title="Permalink to this definition">¶</a></dt>
<dd><p>Read in a dtopo file and use to set attributes of this object.</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><em>path</em> (path) - Path to existing dtopo file to read in.</p></li>
<li><dl class="simple">
<dt><em>dtopo_type</em> (int) - Type of topography file to read. Default is 3</dt><dd><p>if not specified or apparent from file extension.</p>
</dd>
</dl>
</li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.DTopography.write">
<span class="sig-name descname"><span class="pre">write</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</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">dtopo_type</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">dZ_format</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'%.3f'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.DTopography.write" title="Permalink to this definition">¶</a></dt>
<dd><p>Write out subfault resulting dtopo to file at <em>path</em>.</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><em>path</em> (path) - Path to the output file to written to.</p></li>
<li><p><em>dtopo_type</em> (int) - Type of topography file to write out. Default 3.</p></li>
<li><p><em>dZ_format</em> (str) - format for dZ values printed. Default ‘%.3f’</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.DTopography1d">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">DTopography1d</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</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">dtopo_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.DTopography1d" title="Permalink to this definition">¶</a></dt>
<dd><p>Basic object representing moving topography in 1d</p>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.DTopography1d.dZ_at_t">
<span class="sig-name descname"><span class="pre">dZ_at_t</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">t</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.DTopography1d.dZ_at_t" title="Permalink to this definition">¶</a></dt>
<dd><p>Interpolate dZ to specified time t and return deformation.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.DTopography1d.dZ_cellave_at_t">
<span class="sig-name descname"><span class="pre">dZ_cellave_at_t</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">t</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">celledges</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.DTopography1d.dZ_cellave_at_t" title="Permalink to this definition">¶</a></dt>
<dd><p>Interpolate dZ to specified time t and return deformation.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.DTopography1d.read">
<span class="sig-name descname"><span class="pre">read</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</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">dtopo_type</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">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.DTopography1d.read" title="Permalink to this definition">¶</a></dt>
<dd><p>Read in a dtopo file and use to set attributes of this object.</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><em>path</em> (path) - Path to existing dtopo file to read in.</p></li>
<li><dl class="simple">
<dt><em>dtopo_type</em> (int) - Type of topography file to read. Default is 3</dt><dd><p>if not specified or apparent from file extension.</p>
</dd>
</dl>
</li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.DTopography1d.write">
<span class="sig-name descname"><span class="pre">write</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</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">dtopo_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.DTopography1d.write" title="Permalink to this definition">¶</a></dt>
<dd><p>Write out subfault resulting dtopo to file at <em>path</em>.</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><em>path</em> (path) - Path to the output file to written to.</p></li>
<li><p><em>dtopo_type</em> (int) - Type of topography file to write out. Default
is 3.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.Fault">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">Fault</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">subfaults</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">input_units</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coordinate_specification</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.Fault" title="Permalink to this definition">¶</a></dt>
<dd><p>Base Fault class</p>
<p>A class describing a fault possibly composed of subfaults.</p>
<dl class="field-list simple">
<dt class="field-odd">Properties<span class="colon">:</span></dt>
<dd class="field-odd"><p></p></dd>
<dt class="field-even">Initialization<span class="colon">:</span></dt>
<dd class="field-even"><p></p></dd>
<dt class="field-odd">Examples<span class="colon">:</span></dt>
<dd class="field-odd"><p></p></dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.Fault.Mo">
<span class="sig-name descname"><span class="pre">Mo</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.Fault.Mo" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate the seismic moment for a fault composed of subfaults,
in units N-m.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.Fault.Mw">
<span class="sig-name descname"><span class="pre">Mw</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.Fault.Mw" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate the moment magnitude for a fault composed of subfaults.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.Fault.containing_rect">
<span class="sig-name descname"><span class="pre">containing_rect</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.Fault.containing_rect" title="Permalink to this definition">¶</a></dt>
<dd><p>Find containing rectangle of fault in x-y plane.</p>
<p>Returns tuple of x-limits and y-limits.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.Fault.create_dtopo_xy">
<span class="sig-name descname"><span class="pre">create_dtopo_xy</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rect</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">dx</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.016666666666666666</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">buffer_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.5</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.Fault.create_dtopo_xy" title="Permalink to this definition">¶</a></dt>
<dd><p>Create coordinate arrays containing fault with a buffer.</p>
<dl class="field-list simple">
<dt class="field-odd">Input<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><dl class="simple">
<dt><em>rect</em> - if None, use self.containing_rect</dt><dd><p>Otherwise a list [x1,x2,y1,y2]</p>
</dd>
</dl>
</li>
<li><p><em>dx</em> (int) - Spatial resolution. Defaults to 1” resolution.</p></li>
<li><p><em>buffer_size</em> (float) - Buffer distance around edge of fault in
degrees, defaults to 0.5 degrees.</p></li>
</ul>
</dd>
<dt class="field-even">Output<span class="colon">:</span></dt>
<dd class="field-even"><ul class="simple">
<li><p><em>x,y</em> 1-dimensional arrays that cover the desired rect.
They start at (x1,y1) and may go a bit beyond (x2,y2) depending on dx</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.Fault.create_dtopography">
<span class="sig-name descname"><span class="pre">create_dtopography</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">times</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">[0.0,</span> <span class="pre">1.0]</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">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.Fault.create_dtopography" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute change in topography and construct a dtopography object.</p>
<p>Use subfaults’ <cite>okada</cite> routine and add all
deformations together.</p>
<p>Raises a ValueError exception if the <em>rupture_type</em> is an unknown type.</p>
<p>returns a :class`DTopography` object.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.Fault.plot_subfaults">
<span class="sig-name descname"><span class="pre">plot_subfaults</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">axes</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">plot_centerline</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">slip_color</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cmap_slip</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">cmin_slip</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">cmax_slip</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">slip_time</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">plot_rake</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">xylim</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">plot_box</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">colorbar_shrink</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</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">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">colorbar_labelsize</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">colorbar_ticksize</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.Fault.plot_subfaults" title="Permalink to this definition">¶</a></dt>
<dd><p>Plot each subfault projected onto the surface.</p>
<p><em>axes</em> can be passed in to specify the <em>matplotlib.axes.AxesSubplot</em>
on which to add this plot. If <em>axes == None</em>, a new figure window
will be opened. The <em>axes</em> on which it is plotted is the return
value of this call.</p>
<p>If <em>plot_centerline == True</em>, plot a line from the centroid to the
top center of each subfault to show what direction is up-dip.</p>
<p>If <em>slip_color == True</em> then use the color map <em>cmap_slip</em>
(which defaults to <em>matplotlib.cm.jet</em>) to color the subplots based
on the magnitude of slip, scaled between <em>cmin_slip</em> and <em>cmax_slip</em>.
(If these are <em>None</em> then scaled automatically based on range of slip.)
If <em>slip_time == None</em> then colors are based on the final slip.
For dynamic faults, <em>slip_time</em> can be set to a time and the
dynamic timing of each subfault will be used to compute and
plot the slip at this time.</p>
<p>If <em>plot_rake == True</em>, plot a line from the centroid pointing in
the direction of the rake (the direction in which the top block is
moving relative to the lower block. The distance it moves is given
by the <em>slip</em>.)</p>
<p><em>xylim</em> can be set to a list or tuple of length 4 of the form
[x1,x2,y1,y2] to specify the x- and y-axis limits.</p>
<p>If <em>plot_box == True</em>, a box will be drawn around each subfault.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.Fault.plot_subfaults_depth">
<span class="sig-name descname"><span class="pre">plot_subfaults_depth</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">axes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.Fault.plot_subfaults_depth" title="Permalink to this definition">¶</a></dt>
<dd><p>Plot the depth of each subfault vs. x and vs. y in a second plot.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.Fault.read">
<span class="sig-name descname"><span class="pre">read</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">column_map</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coordinate_specification</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'centroid'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rupture_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'static'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">skiprows</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delimiter</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">input_units</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">defaults</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.Fault.read" title="Permalink to this definition">¶</a></dt>
<dd><p>Read in subfault specification at <em>path</em>.</p>
<p>Creates a list of subfaults from the subfault specification file at
<em>path</em>.</p>
<dl class="field-list">
<dt class="field-odd">Inputs<span class="colon">:</span></dt>
<dd class="field-odd"><ul>
<li><p><em>path</em> (str) file to read in, should contain subfaults, one per line</p></li>
<li><p><em>column_map</em> (dict) specifies mapping from parameter to the column
of the input file that contains values for this parameter, e.g.</p>
<blockquote>
<div><p>column_map = {“latitude”:0, “longitude”:1, “depth”:2, “slip”:3,
“rake”:4, “strike”:5, “dip”:6}</p>
</div></blockquote>
</li>
<li><p><em>coordinate_specification</em> (str) specifies the location on each
subfault that corresponds to the (longitude,latitude) and depth
of the subfault. See the documentation for
<em>SubFault.calculate_geometry</em>.</p></li>
<li><p><em>rupture_type</em> (str) either “static” or “kinematic”</p></li>
<li><p><em>skiprows</em> (int) number of header lines to skip before data</p></li>
<li><p><em>delimiter</em> (str) e.g. ‘,’ for csv files</p></li>
<li><dl class="simple">
<dt><em>input_units</em> (dict) indicating units for length, width, slip, depth,</dt><dd><p>and for rigidity mu as specified in file. These
will be converted to “standard units”.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><em>defaults</em> (dict) default values for all subfaults, for values not</dt><dd><p>included in subfault file on each line.</p>
</dd>
</dl>
</li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.Fault.set_dynamic_slip">
<span class="sig-name descname"><span class="pre">set_dynamic_slip</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">t</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.Fault.set_dynamic_slip" title="Permalink to this definition">¶</a></dt>
<dd><p>Set <em>slip_at_dynamic_t</em> attribute of all subfaults to slip at the
requested time <em>t</em>.</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><em>t</em> (float) -</p></li>
</ul>
</dd>
</dl>
<p>Raises a ValueError exception if this object’s rupture_type attribute
is set to static.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.Fault.write">
<span class="sig-name descname"><span class="pre">write</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">style</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">column_list</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">output_units</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delimiter</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'</span>  <span class="pre">'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.Fault.write" title="Permalink to this definition">¶</a></dt>
<dd><p>Write subfault format file with one line for each subfault.
Can either specify a <em>style</em> that determines the columns,
or a <em>column_list</em>. Must specify one but not both. See below for
details.</p>
<dl>
<dt>Inputs:</dt><dd><ul>
<li><p><em>path</em> (str) file to write to.</p></li>
<li><p><em>style</em> (str) to write in a style that matches standard styles
adopted by various groups. One of the following:</p>
<blockquote>
<div><ul class="simple">
<li><p>“usgs” (Not implemented)</p></li>
<li><p>“noaa sift” (Not implemented)</p></li>
<li><p>“ucsb” (Not implemented)</p></li>
</ul>
</div></blockquote>
</li>
<li><p><em>column_list</em> (list) specifies what order the parameters should
be written in the output file, e.g.</p>
<blockquote>
<div><p>column_list = [‘longitude’,’latitude’,’length’,’width’,
‘depth’,’strike’,’rake’,’dip’,’slip’]</p>
</div></blockquote>
</li>
<li><p><em>output_units</em> (dict) specifies units to convert to before writing.
Defaults to “standard units”.</p></li>
<li><p><em>delimiter</em> (str) specifies delimiter between columns, e.g.
“,” to create a csv file. Defaults to “ “.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.Fault1d">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">Fault1d</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">subfaults</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">input_units</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coordinate_specification</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.Fault1d" title="Permalink to this definition">¶</a></dt>
<dd><p>Base Fault1d class</p>
<p>A class describing a 1d fault possibly composed of subfaults.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.Mw">
<span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">Mw</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">Mo</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">units</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'N-m'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.Mw" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate moment magnitude based on seismic moment Mo.
Follows USGS recommended definition from</p>
<blockquote>
<div><p><a class="reference external" href="http://earthquake.usgs.gov/aboutus/docs/020204mag_policy.php">http://earthquake.usgs.gov/aboutus/docs/020204mag_policy.php</a></p>
</div></blockquote>
<p>The SubFault and Fault classes each have a function Mo to compute
the seismic moment for a single subfault or collection respectively.</p>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SiftFault">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">SiftFault</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sift_slip</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">longitude_shift</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SiftFault" title="Permalink to this definition">¶</a></dt>
<dd><p>Define a fault by specifying the slip on a subset of the SIFT unit sources.
The database is read in by load_sift_unit_sources.
See <a class="reference external" href="http://www.pmel.noaa.gov/pubs/PDF/gica2937/gica2937.pdf">http://www.pmel.noaa.gov/pubs/PDF/gica2937/gica2937.pdf</a>
for a discussion of these unit sources, although the database used
is more recent than what is reported in that paper and uses different
notation for the subfault names.
The subfault database used was downloaded from</p>
<blockquote>
<div><p><a class="reference external" href="http://sift.pmel.noaa.gov/ComMIT/compressed/info_sz.dat">http://sift.pmel.noaa.gov/ComMIT/compressed/info_sz.dat</a></p>
</div></blockquote>
<p>Example:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">sift_slip</span> <span class="o">=</span> <span class="p">{</span><span class="s1">'acsza1'</span><span class="p">:</span><span class="mi">2</span><span class="p">,</span> <span class="s1">'acszb1'</span><span class="p">:</span><span class="mi">3</span><span class="p">}</span>
<span class="gp">>>> </span><span class="n">fault</span> <span class="o">=</span> <span class="n">SiftFault</span><span class="p">(</span><span class="n">sift_slip</span><span class="p">)</span>
</pre></div>
</div>
<p>results in a fault with two specified subfaults with slip of 2 and 3 meters.</p>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SiftFault.set_subfaults">
<span class="sig-name descname"><span class="pre">set_subfaults</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sift_slip</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SiftFault.set_subfaults" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt><em>sift_slip</em> (dict) is a dictionary with key = name of unit source</dt><dd><p>and value = magnitude of slip to assign (in meters).</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">SubFault</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault" title="Permalink to this definition">¶</a></dt>
<dd><p>Basic sub-fault specification.</p>
<p>Locate fault plane in 3D space
Note that the coodinate specification is in reference to the fault</p>
<dl class="field-list simple">
<dt class="field-odd">Coordinates of Fault Plane<span class="colon">:</span></dt>
<dd class="field-odd"><p></p></dd>
</dl>
<p>The attributes <em>centers</em> and <em>corners</em> are described by the figure below.</p>
<dl>
<dt><em>centers[0,1,2]</em> refer to the points labeled 0,1,2 below.</dt><dd><p>In particular the centroid is given by <em>centers[1]</em>.
Each will be a tuple <em>(x, y, depth)</em>.</p>
</dd>
<dt><em>corners[0,1,2,3]</em> refer to the points labeled a,b,c,d resp. below.</dt><dd><p>Each will be a tuple <em>(x, y, depth)</em>.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Top</span> <span class="n">edge</span> <span class="n">Bottom</span> <span class="n">edge</span>
<span class="n">a</span> <span class="o">-----------</span> <span class="n">b</span> <span class="o">^</span>
<span class="o">|</span> <span class="o">|</span> <span class="o">|</span> <span class="o">^</span>
<span class="o">|</span> <span class="o">|</span> <span class="o">|</span> <span class="o">|</span>
<span class="o">|</span> <span class="o">|</span> <span class="o">|</span> <span class="o">|</span> <span class="n">along</span><span class="o">-</span><span class="n">strike</span> <span class="n">direction</span>
<span class="o">|</span> <span class="o">|</span> <span class="o">|</span> <span class="o">|</span>
<span class="mi">0</span><span class="o">------</span><span class="mi">1</span><span class="o">------</span><span class="mi">2</span> <span class="o">|</span> <span class="n">length</span> <span class="o">|</span>
<span class="o">|</span> <span class="o">|</span> <span class="o">|</span>
<span class="o">|</span> <span class="o">|</span> <span class="o">|</span>
<span class="o">|</span> <span class="o">|</span> <span class="o">|</span>
<span class="o">|</span> <span class="o">|</span> <span class="o">|</span>
<span class="n">d</span> <span class="o">-----------</span> <span class="n">c</span> <span class="n">v</span>
<span class="o"><-------------></span>
<span class="n">width</span>
<span class="o"><--</span> <span class="n">up</span> <span class="n">dip</span> <span class="n">direction</span>
</pre></div>
</div>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.Mo">
<span class="sig-name descname"><span class="pre">Mo</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.Mo" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate the seismic moment for a single subfault</p>
<p>Returns in units of N-m and assumes mu is in Pascals.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.calculate_geometry">
<span class="sig-name descname"><span class="pre">calculate_geometry</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.calculate_geometry" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate the fault geometry.</p>
<p>Routine calculates the class attributes <em>corners</em> and
<em>centers</em> which are the corners of the fault plane and
points along the centerline respecitvely in 3D space.</p>
<p><strong>Note:</strong> <em>self.coordinate_specification</em> specifies the location on each
subfault that corresponds to the (longitude,latitude) and depth
of the subfault.
Currently must be one of these strings:</p>
<blockquote>
<div><ul class="simple">
<li><p>“bottom center”: (longitude,latitude) and depth at bottom center</p></li>
<li><p>“top center”: (longitude,latitude) and depth at top center</p></li>
<li><p>“centroid”: (longitude,latitude) and depth at centroid of plane</p></li>
<li><dl class="simple">
<dt>“noaa sift”: (longitude,latitude) at bottom center, depth at top, </dt><dd><p>This mixed convention is used by the NOAA SIFT
database and “unit sources”, see:
<a class="reference external" href="http://nctr.pmel.noaa.gov/propagation-database.html">http://nctr.pmel.noaa.gov/propagation-database.html</a></p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>“top upstrike corner”: (longitude,latitude) and depth at </dt><dd><p>corner of fault that is both updip and upstrike.</p>
</dd>
</dl>
</li>
</ul>
</div></blockquote>
<p>The Okada model is expressed assuming (longitude,latitude) and depth
are at the bottom center of the fault plane, so values must be
shifted or other specifications.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.calculate_geometry_triangles">
<span class="sig-name descname"><span class="pre">calculate_geometry_triangles</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.calculate_geometry_triangles" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate geometry for triangular subfaults</p>
<ul class="simple">
<li><p>Uses <em>corners</em> to calculate <em>centers</em>, <em>longitude</em>, <em>latitude</em>,
<em>depth</em>, <em>strike</em>, <em>dip</em>, <em>length</em>, <em>width</em>.</p></li>
<li><p>sets <em>coordinate_specification</em> as “triangular”</p></li>
<li><p>Note that calculate_geometry() computes
long/lat/strike/dip/length/width to calculate centers/corners</p></li>
</ul>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.centers">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">centers</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.centers" title="Permalink to this definition">¶</a></dt>
<dd><p>Coordinates along the center-line of the fault plane.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.convert_to_standard_units">
<span class="sig-name descname"><span class="pre">convert_to_standard_units</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">input_units</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">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.convert_to_standard_units" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert parameters from the units used for input into the standard
units used in this module.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.coordinate_specification">
<span class="sig-name descname"><span class="pre">coordinate_specification</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.coordinate_specification" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies where the latitude, longitude and depth are measured from.</p>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.corners">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">corners</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.corners" title="Permalink to this definition">¶</a></dt>
<dd><p>Coordinates of the corners of the fault plane.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.depth">
<span class="sig-name descname"><span class="pre">depth</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.depth" title="Permalink to this definition">¶</a></dt>
<dd><p>Depth of subfault based on <em>coordinate_specification</em> in meters.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.dip">
<span class="sig-name descname"><span class="pre">dip</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.dip" title="Permalink to this definition">¶</a></dt>
<dd><p>Subfault’s angle of dip</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.dynamic_slip">
<span class="sig-name descname"><span class="pre">dynamic_slip</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">t</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.dynamic_slip" title="Permalink to this definition">¶</a></dt>
<dd><p>For a dynamic fault, compute the slip at time t.
Assumes the following attributes are set:</p>
<blockquote>
<div><ul class="simple">
<li><p><em>rupture_time</em></p></li>
<li><p><em>rise_time</em></p></li>
<li><p><em>rise_time_starting</em>: optional, defaults to <em>rise_time/2</em></p></li>
<li><p><em>rise_shape</em>: optional, defaults to <em>quadratic</em></p></li>
</ul>
</div></blockquote>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.gauss_pts">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">gauss_pts</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.gauss_pts" title="Permalink to this definition">¶</a></dt>
<dd><p>Coordinates along the center-line of the fault plane.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.latitude">
<span class="sig-name descname"><span class="pre">latitude</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.latitude" title="Permalink to this definition">¶</a></dt>
<dd><p>Latitutde of the subfault based on <em>coordinate_specification</em>.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.length">
<span class="sig-name descname"><span class="pre">length</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.length" title="Permalink to this definition">¶</a></dt>
<dd><p>Length of subfault in meters.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.longitude">
<span class="sig-name descname"><span class="pre">longitude</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.longitude" title="Permalink to this definition">¶</a></dt>
<dd><p>Longitude of the subfault based on <em>coordinate_specification</em>.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.mu">
<span class="sig-name descname"><span class="pre">mu</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.mu" title="Permalink to this definition">¶</a></dt>
<dd><p>Rigidity (== shear modulus) in Pascals.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.okada">
<span class="sig-name descname"><span class="pre">okada</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.okada" title="Permalink to this definition">¶</a></dt>
<dd><p>Apply Okada to this subfault and return a DTopography object.</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>x,y are 1d arrays</p></li>
</ul>
</dd>
<dt class="field-even">Output<span class="colon">:</span></dt>
<dd class="field-even"><ul class="simple">
<li><dl class="simple">
<dt>DTopography object with dZ array of shape (1,len(x),len(y))</dt><dd><p>with single static displacement and times = [0.].</p>
</dd>
</dl>
</li>
</ul>
</dd>
</dl>
<p>Currently only calculates the vertical displacement.</p>
<p>Okada model is a mapping from several fault parameters
to a surface deformation.
See Okada 1985 <a class="reference internal" href="biblio.html#okada85" id="id1"><span>[Okada85]</span></a>, or Okada 1992, Bull. Seism. Soc. Am.</p>
<p>okadamap function riginally written in Python by Dave George for
Clawpack 4.6 okada.py routine, with some routines adapted
from fortran routines written by Xiaoming Wang.</p>
<p>Rewritten and made more flexible by Randy LeVeque</p>
<p><strong>Note:</strong> <em>self.coordinate_specification</em> (str) specifies the location on
each subfault that corresponds to the (longitude,latitude) and depth
subfault.</p>
<p>See the documentation for <em>SubFault.calculate_geometry</em> for dicussion of the
possible values <em>self.coordinate_specification</em> can take.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.rake">
<span class="sig-name descname"><span class="pre">rake</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.rake" title="Permalink to this definition">¶</a></dt>
<dd><p>Rake of subfault movement in degrees.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.rise_shape">
<span class="sig-name descname"><span class="pre">rise_shape</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.rise_shape" title="Permalink to this definition">¶</a></dt>
<dd><p>Shape of rise, ‘linear’ or ‘quadratic’ (piecewise)</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.rise_time">
<span class="sig-name descname"><span class="pre">rise_time</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.rise_time" title="Permalink to this definition">¶</a></dt>
<dd><p>Total rise time of subfault (sec)</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.rise_time_starting">
<span class="sig-name descname"><span class="pre">rise_time_starting</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.rise_time_starting" title="Permalink to this definition">¶</a></dt>
<dd><p>Optional time of first part of rise, before break in pw smooth rise</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.rupture_time">
<span class="sig-name descname"><span class="pre">rupture_time</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.rupture_time" title="Permalink to this definition">¶</a></dt>
<dd><p>Time subfault starts to rupture (sec)</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.rupture_type">
<span class="sig-name descname"><span class="pre">rupture_type</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.rupture_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Either ‘static’ or ‘kinematic’</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.set_corners">
<span class="sig-name descname"><span class="pre">set_corners</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">corners</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">projection_zone</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.set_corners" title="Permalink to this definition">¶</a></dt>
<dd><p>Set three corners for a triangular fault.
:Inputs:</p>
<ul class="simple">
<li><p><em>corners</em> should be iterable of length 3.</p></li>
<li><p><em>rake</em> should be between -180. and 180.</p></li>
</ul>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.slip">
<span class="sig-name descname"><span class="pre">slip</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.slip" title="Permalink to this definition">¶</a></dt>
<dd><p>Slip on subfault in strike direction in meters.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.strike">
<span class="sig-name descname"><span class="pre">strike</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.strike" title="Permalink to this definition">¶</a></dt>
<dd><p>Strike direction of subfault in degrees.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault.width">
<span class="sig-name descname"><span class="pre">width</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault.width" title="Permalink to this definition">¶</a></dt>
<dd><p>Width of subfault in meters.</p>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault1d">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">SubFault1d</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">strike</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">length</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1000000.0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault1d" title="Permalink to this definition">¶</a></dt>
<dd><dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault1d.coordinate_specification">
<span class="sig-name descname"><span class="pre">coordinate_specification</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault1d.coordinate_specification" title="Permalink to this definition">¶</a></dt>
<dd><p>location of x0: ‘top center’, ‘centroid’, or ‘bottom center’</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault1d.latitude">
<span class="sig-name descname"><span class="pre">latitude</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault1d.latitude" title="Permalink to this definition">¶</a></dt>
<dd><p>latitude where placed on sphere to use 2d routines</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault1d.length">
<span class="sig-name descname"><span class="pre">length</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault1d.length" title="Permalink to this definition">¶</a></dt>
<dd><p>length (m) in strike direction orthogonal to x</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault1d.longitude">
<span class="sig-name descname"><span class="pre">longitude</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault1d.longitude" title="Permalink to this definition">¶</a></dt>
<dd><p>longitude at location specified by coordinate_specification</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault1d.rake">
<span class="sig-name descname"><span class="pre">rake</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault1d.rake" title="Permalink to this definition">¶</a></dt>
<dd><p>rake=90 ==> top at right if strike=0, at left if strike=180</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubFault1d.strike">
<span class="sig-name descname"><span class="pre">strike</span></span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubFault1d.strike" title="Permalink to this definition">¶</a></dt>
<dd><p>rake=90, so top at right if strike=0, at left if strike=180</p>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubdividedPlaneFault">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">SubdividedPlaneFault</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">base_subfault</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">nstrike</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ndip</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">slip_function</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">Mo</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubdividedPlaneFault" title="Permalink to this definition">¶</a></dt>
<dd><p>Define a fault by starting with a single fault plane (specified as
<em>base_subfault</em> of class <em>SubFault</em>) and subdividing the fault plane
into a rectangular array of <em>nstrike</em> by <em>ndip</em> equally sized subfaults.</p>
<p>By default,the slip on each subfault will be initialized to
<em>base_subfault.slip</em> so that the slip is uniform over the original plane
and the seismic moment is independent of the number of subdivisions.</p>
<p>Alternatively, the slip distribution can be specified by providing a
function <em>slip_distribution</em>, which should be a function of <em>(xi,eta)</em>
with each variable ranging from 0 to 1. <em>xi</em> varies from 0 at the top
of the fault to 1 at the bottom in the down-dip direction.
<em>eta</em> varies from one edge of the fault to the other moving in the
strike direction. This function will be evaluated at the centroid of
each subfault to set the slip.</p>
<p>Can also specify a desired seismic moment Mo in which case the slips will
be rescaled at the end so the total seismic moment is Mo. In this case
the <em>slip_distribution</em> function only indicates the relative slip
between subfaults.</p>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.SubdividedPlaneFault.subdivide">
<span class="sig-name descname"><span class="pre">subdivide</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">nstrike</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ndip</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">slip_function</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">Mo</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.SubdividedPlaneFault.subdivide" title="Permalink to this definition">¶</a></dt>
<dd><p>Subdivide the fault plane into nstrike * ndip subfaults.</p>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.TensorProductFault">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">TensorProductFault</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fault_plane</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">slip_along_strike</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">slip_down_dip</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">nstrike</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ndip</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">Mo</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.TensorProductFault" title="Permalink to this definition">¶</a></dt>
<dd><p>Define a fault by starting with a single fault plane (specified as
<em>fault_plane</em> of class <em>SubFault</em>) and subdividing the fault plane
into a rectangular array of <em>nstrike</em> by <em>ndip</em> equally sized subfaults.</p>
<p>Then define the slip on each subfault via
two one-dimensional functions <em>slip_along_strike</em> and
<em>slip_down_dip</em> that specify the slip as a function of fractional
distance in the along-strike and down-dip direction respectively
(i.e. the argument of each goes from 0 to 1).</p>
<p>Setting either to None defaults to constant function 1.</p>
<p>The slip is set by evaluating the tensor product at the centroid of
each subfault.</p>
<p>Can specify a desired seismic moment Mo in which case the slips will
be rescaled at the end.</p>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.UCSBFault">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">UCSBFault</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</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="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.UCSBFault" title="Permalink to this definition">¶</a></dt>
<dd><p>Fault subclass for reading in subfault format models from UCSB</p>
<p>Read in subfault format models produced by Chen Ji’s group at UCSB,
downloadable from:</p>
<blockquote>
<div><p><a class="reference external" href="http://www.geol.ucsb.edu/faculty/ji/big_earthquakes/home.html">http://www.geol.ucsb.edu/faculty/ji/big_earthquakes/home.html</a></p>
</div></blockquote>
<dl class="py method">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.UCSBFault.read">
<span class="sig-name descname"><span class="pre">read</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rupture_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'static'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.UCSBFault.read" title="Permalink to this definition">¶</a></dt>
<dd><p>Read in subfault specification at <em>path</em>.</p>
<p>Creates a list of subfaults from the subfault specification file at
<em>path</em>.</p>
<p>Subfault format contains info for dynamic rupture, so can specify
rupture_type = ‘static’ or ‘kinematic’ (or ‘dynamic’ for backward
compatibility).</p>
</dd></dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.plot_dZ_colors">
<span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">plot_dZ_colors</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dZ</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">axes</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">cmax_dZ</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">dZ_interval</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">add_colorbar</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">verbose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">colorbar_labelsize</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">colorbar_ticksize</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fig_kwargs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.plot_dZ_colors" title="Permalink to this definition">¶</a></dt>
<dd><p>Plot sea floor deformation dZ as colormap with contours</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.plot_dZ_contours">
<span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">plot_dZ_contours</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dZ</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">axes</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">dZ_interval</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.5</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">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fig_kwargs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.plot_dZ_contours" title="Permalink to this definition">¶</a></dt>
<dd><p>For plotting seafloor deformation dZ</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.rise_fraction">
<span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">rise_fraction</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">t</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rupture_time</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rise_time</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rise_time_starting</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">rise_shape</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'quadratic'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.rise_fraction" title="Permalink to this definition">¶</a></dt>
<dd><p>A continuous piecewise quadratic or linear function of t that is</p>
<blockquote>
<div><ul class="simple">
<li><p>0 for t <= rupture_time,</p></li>
<li><p>1 for t >= rupture_time + rise_time</p></li>
</ul>
</div></blockquote>
<dl class="field-list simple">
<dt class="field-odd">Inputs<span class="colon">:</span></dt>
<dd class="field-odd"><p></p></dd>
</dl>
<ul class="simple">
<li><p><em>t</em> (scalar, list, or np.array): times at which to evaluate the
rise function.</p></li>
<li><p><em>rupture_time</em> (float): time (seconds) when rupture starts.</p></li>
<li><p><em>rise_time</em> (float): duration of rupture (seconds).</p></li>
<li><p><em>rise_time_starting</em> (float or None): If None, it is internally set to
<cite>rise_time/2</cite>.</p></li>
<li><p><em>rise_shape</em> (str):
If <cite>rise_shape == “quadratic”</cite>, the rise time function is piecewise quadratic,
continuously differentiable, with maximum slope at
<cite>t = rupture_time + rise_time_starting</cite>
and zero slope at <cite>t = rupture_time</cite> and <cite>t = rupture_time + rise_time</cite>.
If <cite>rise_shape == “linear”</cite>, the rise time function is piecewise linear,
with value 0.5 at
<cite>t = rupture_time + rise_time_starting</cite>.</p></li>
</ul>
<dl class="field-list simple">
<dt class="field-odd">Outputs<span class="colon">:</span></dt>
<dd class="field-odd"><p></p></dd>
</dl>
<p><em>rf</em> (float or np.array): The rise time function evaluated at <cite>t</cite>.
If the input is a list or tuple of times, returns a numpy array.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="clawpack.geoclaw.dtopotools.strike_direction">
<span class="sig-prename descclassname"><span class="pre">clawpack.geoclaw.dtopotools.</span></span><span class="sig-name descname"><span class="pre">strike_direction</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#clawpack.geoclaw.dtopotools.strike_direction" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate strike direction between two points.
Actually calculates “initial bearing” from (x1,y1) in direction
towards (x2,y2), following
<a class="reference external" href="http://www.movable-type.co.uk/scripts/latlong.html">http://www.movable-type.co.uk/scripts/latlong.html</a></p>
</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="#">dtopotools module for moving topography</a><ul>
<li><a class="reference internal" href="#module-clawpack.geoclaw.dtopotools">Documentation auto-generated from the module docstrings</a><ul>
<li><a class="reference internal" href="#clawpack.geoclaw.dtopotools.CSVFault"><code class="docutils literal notranslate"><span class="pre">CSVFault</span></code></a><ul>
<li><a class="reference internal" href="#clawpack.geoclaw.dtopotools.CSVFault.read"><code class="docutils literal notranslate"><span class="pre">CSVFault.read()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#clawpack.geoclaw.dtopotools.DTopography"><code class="docutils literal notranslate"><span class="pre">DTopography</span></code></a><ul>
<li><a class="reference internal" href="#clawpack.geoclaw.dtopotools.DTopography.dZ_at_t"><code class="docutils literal notranslate"><span class="pre">DTopography.dZ_at_t()</span></code></a></li>
<li><a class="reference internal" href="#clawpack.geoclaw.dtopotools.DTopography.dZ_max"><code class="docutils literal notranslate"><span class="pre">DTopography.dZ_max()</span></code></a></li>
<li><a class="reference internal" href="#clawpack.geoclaw.dtopotools.DTopography.plot_dZ_colors"><code class="docutils literal notranslate"><span class="pre">DTopography.plot_dZ_colors()</span></code></a></li>
<li><a class="reference internal" href="#clawpack.geoclaw.dtopotools.DTopography.plot_dZ_contours"><code class="docutils literal notranslate"><span class="pre">DTopography.plot_dZ_contours()</span></code></a></li>
<li><a class="reference internal" href="#clawpack.geoclaw.dtopotools.DTopography.read"><code class="docutils literal notranslate"><span class="pre">DTopography.read()</span></code></a></li>
<li><a class="reference internal" href="#clawpack.geoclaw.dtopotools.DTopography.write"><code class="docutils literal notranslate"><span class="pre">DTopography.write()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#clawpack.geoclaw.dtopotools.DTopography1d"><code class="docutils literal notranslate"><span class="pre">DTopography1d</span></code></a><ul>
<li><a class="reference internal" href="#clawpack.geoclaw.dtopotools.DTopography1d.dZ_at_t"><code class="docutils literal notranslate"><span class="pre">DTopography1d.dZ_at_t()</span></code></a></li>
<li><a class="reference internal" href="#clawpack.geoclaw.dtopotools.DTopography1d.dZ_cellave_at_t"><code class="docutils literal notranslate"><span class="pre">DTopography1d.dZ_cellave_at_t()</span></code></a></li>
<li><a class="reference internal" href="#clawpack.geoclaw.dtopotools.DTopography1d.read"><code class="docutils literal notranslate"><span class="pre">DTopography1d.read()</span></code></a></li>