<jupyter_start><jupyter_text>Chile 2010---Simulation of the 2010 tsunami off of the coast of Chile.   --- Create topo file and data files<jupyter_code>%run make_topo.py
%run make_data.py<jupyter_output><empty_output><jupyter_text>Run code in **serial mode** (will work, even if code is compiled with MPI)<jupyter_code>!chile2010<jupyter_output><empty_output><jupyter_text>---Or, run code in **parallel mode** (command may need to be customized, depending your on MPI installation.)<jupyter_code>#!mpirun -n 4 chile2010<jupyter_output><empty_output><jupyter_text>---Create PNG files for web-browser viewing, or animation.<jupyter_code>%run make_plots.py<jupyter_output><empty_output><jupyter_text>---View PNG files in browser, using URL above, or create an animation of all PNG files, using code below.<jupyter_code>%pylab inline
import glob
from matplotlib import image
from clawpack.visclaw.JSAnimation import IPython_display
from matplotlib import animation

def init():
    im.set_data(image.imread(filenames[0]))
    return im,

def animate(i):
    image_i=image.imread(filenames[i])
    im.set_data(image_i)
    return im,<jupyter_output><empty_output><jupyter_text>---Plot figure 0, showing the entire solution.  To see detailed plotting parameters, see file make_plots.py.<jupyter_code>figno = 0

fname = '_plots/*fig' + str(figno) + '.png'
filenames = sorted(glob.glob(fname))

fig = plt.figure()
im = plt.imshow(image.imread(filenames[0]))

animation.FuncAnimation(fig, animate, init_func=init,
                              frames=len(filenames), interval=500, blit=True)<jupyter_output><empty_output><jupyter_text>---Plot results on realistic topography using **cesiumpy** (requires _cesiumpy_).<jupyter_code>import cesiumpy
ds = cesiumpy.KmlDataSource('_plots/Chile_2010.kmz')
v = cesiumpy.Viewer()
v.dataSources.add(ds)
v<jupyter_output><empty_output><jupyter_text>Alternatively, you can view the results in **Google Earth** (requires Google Earth).<jupyter_code>#!open _plots/Chile_2010.kmz    # requires Google Earth<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11450752062105773, 'fraction_numerical': 0.015526443474041727, 'mean_word_length': 6.01360544217687, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '452441', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 752, 'n_tokens_neox': 707, 'n_words': 166, 'path': 'applications/geoclaw/chile2010/chile2010.ipynb', 'repo_name': 'mjberger/forestclaw', 'size': '2061'}