<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Bowl slosh
Exact solution to shallow water wave equations in a bowl.  Cross-section plot is used to compare solution to exact solution.
Create topo file and data files
Step1:  Run code in serial mode (will work, even if code is compiled with MPI)
Step2:  Or, run code in parallel mode (command may need to be customized, depending your on MPI installation.)
Step3:  Create PNG files for web-browser viewing, or animation.
Step4:  View PNG files in browser, using URL above, or create an animation of all PNG files, using code below.
Step5:  Plot figure 0, showing the entire solution.  To see detailed plotting parameters, see file make_plots.py.
Step6:  Then plot figures 10 and 11 to compare the solution in the two refined regions.
<ASSISTANT_TASK:>
Python Code:
%run make_topo.py
%run make_data.py
Explanation: Bowl slosh
Exact solution to shallow water wave equations in a bowl.  Cross-section plot is used to compare solution to exact solution.
Create topo file and data files
End of explanation
!slosh  
Explanation: Run code in serial mode (will work, even if code is compiled with MPI)
End of explanation
#!mpirun -n 4 slosh
Explanation: Or, run code in parallel mode (command may need to be customized, depending your on MPI installation.)
End of explanation
%run make_plots.py
Explanation: Create PNG files for web-browser viewing, or animation.
End of explanation
%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,
Explanation: View PNG files in browser, using URL above, or create an animation of all PNG files, using code below.
End of explanation
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)
Explanation: Plot figure 0, showing the entire solution.  To see detailed plotting parameters, see file make_plots.py.
End of explanation
figno = 1
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)
Explanation: Then plot figures 10 and 11 to compare the solution in the two refined regions.
End of explanation
<END_TASK>