This one dimensional test problem consists of a flat ocean floor, linear continental slope, flat continental shelf, and a solid wall reflecting boundary.
It is designed to illustrate how a tsunami wave is modified as it moves from the deep ocean onto the continental shelf, and the manner in which some of the energy can be trapped on the shelf and bounce back and forth.
Note: For more about shoaling of tsunami waves on continental shelves, and the manner in which the width of the continental slope affects the transmission and reflection, see the recent paper:
Additional examples from this paper, and Jupyter notebooks, can be found in this GitHub repository.
%pylab inline
Check that the CLAW environment variable is set. (It must be set in the Unix shell before starting the notebook server).
try:
import clawpack
location = clawpack.__file__.replace('clawpack/__init__.pyc','')
print("Using Clawpack from ",location)
except:
print("*** Problem importing Clawpack -- check if environment variable set")
Import some modules needed below...
from clawpack.clawutil import nbtools
from IPython.display import FileLink
from clawpack.visclaw import animation_tools
from IPython.display import HTML
def show_anim(anim):
html_version = HTML(anim.to_jshtml())
#html_version = HTML(anim.to_html5_video())
return html_version
nbtools.make_exe(new=True)
nbtools.make_htmls()
The module setrun.py contains all the default parameters. See the README.html file for a link to setrun.py if you want to inspect this.
A few of the parameters will be redefined below for each example.
import setrun
rundata = setrun.setrun() # initialize most run-time variables for clawpack
The cells below set the following parameters:
The initial data is a hump of water with zero velocity everywhere. Note that the intial hump splits into left-going and right-going waves. The left-going wave leaves the domain (since "non-reflecting" boundary conditions are used at the left boundary).
The right-going wave hits the continental slope, where some of the wave energy is reflected and some is transmitted onto the shelf. The transmitted wave reflects off the coastline (a vertical wall in this model). The reflected wave hits the slope again and is partly transmitted out to the ocean, and partly reflected back towards shore. Depending on the relative depths and steepness of the slope, quite a bit of energy may be trapped on the shelf and bounce back and forth for some time.
Note that the wave propagates more slowly on the shelf than in the deep ocean. In the shallow water equations the wave propagation speed is $\sqrt{gh}$ where $g = 9.81 m/s^2$ is the gravitational acceleration and $h$ is the water depth. The wave form also gets compressed as it moves onto the shelf because of the slower wave speed.
The width of the slope is 1 m, so essentially a step discontinuity:
rundata.probdata.Bocean = -4000.
rundata.probdata.Bshelf = -400.
rundata.probdata.width = 1.
rundata.probdata.start = -30.e3 # 30 kilometers offshore
rundata.write()
outdir,plotdir = nbtools.make_output_and_plots(verbose=False)
anim = animation_tools.animate_from_plotdir(plotdir);
show_anim(anim)
The width of the slope is 1 m, so essentially a step discontinuity.
In this example the shelf is shallower than before. Note that the wave on the shelf travels slower than in Example 1, and is more compressed and higher amplitude.
rundata.probdata.Bocean = -4000.
rundata.probdata.Bshelf = -50.
rundata.probdata.width = 1.
rundata.probdata.start = -30.e3
rundata.write()
outdir,plotdir = nbtools.make_output_and_plots(verbose=False)
anim = animation_tools.animate_from_plotdir(plotdir);
show_anim(anim)
In this example, there is a wide continental slope instead of a step discontinuity. Note that there is much less reflection of energy at the slope in this case, and less energy trapped on the shelf.
rundata.probdata.Bocean = -4000.
rundata.probdata.Bshelf = -100.
rundata.probdata.width = 100.e3
rundata.probdata.start = -130.e3
rundata.write()
outdir,plotdir = nbtools.make_output_and_plots(verbose=False)
anim = animation_tools.animate_from_plotdir(plotdir, figno=2);
show_anim(anim)
Experiment with adjusting the parameters below and execute the cell to produce a new animation.
Note:
rundata.probdata.Bocean = -2000.
rundata.probdata.Bshelf = -1000.
rundata.probdata.width = 10.e3
rundata.probdata.start = -40.e3
rundata.write()
outdir,plotdir = nbtools.make_output_and_plots(label='new', verbose=True)
anim = animation_tools.animate_from_plotdir(plotdir, figno=2);
show_anim(anim)