begin_html [use: doc/doc.css]
GeoClaw Sample Code
These codes were developed to accompany the paper
{{{
The GeoClaw software for depth-averaged flows with adaptive refinement,
by M.J. Berger, D.L. George, R.J. LeVeque, and K.M. Mandli.
Submitted to a special issue of Advances in Water Management, 2010.
[http://www.amath.washington/edu/~rjl/pubs/awr10 Link to preprint].
}}}
Radially symmetric ocean on a lat-long grid, so it doesn't look circular in the
computational coordinates.
The profile of the ocean is set in function topo of [code: maketopo.py].
These parameters are specified in [code:setrun.py].
Plots of results
After running this code and creating plots via "make .plots", you should be
able to view the plots in [link: _plots/_PlotIndex.html].
Plots for the figures shown in the paper have been computed and are visible
here:
- Test case 1: [link: _plots_220/_PlotIndex.html]
- Test case 2: [link: _plots_260/_PlotIndex.html]
Fortran files
- [code: Makefile]
- Determines which version of fortran files
are used when compiling the code with make and specifies where output and
plots should be directed. Type "make .help" at the Unix prompt for options.
For the plots in the paper, use
[code: Makefile_220] for Test 1 or [code: Makefile_260] for Test 2.
- [code: setprob.f]
-
Sets the angle where the island is situated (220 or 260 for the tests in the
paper).
Python files
- [code: maketopo.py]
- Used to create topo file and qinit data file.
- [code: setrun.py]
- This file contains a function that
specifies what run-time parameters will be used.
The Makefiles for the paper use: [code: setrun_220.py] and [code: setrun_260.py]
- [code: setplot.py]
- This file contains a function that
specifies what plots will be done and
sets various plotting parameters.
- [code: setplot_island_topo.py]
- For plotting the island topography
- [code: make_figures.py]
- Runs code and makes all figures for the paper. This uses a number of
other scripts below...
- [code: compare_gauges.py]
- [code: plot_ocean.py]
- [code: plot_xsec.py]
- [code: mapper.py]
Data files
The .data files are automatically generated using the information in
[code: setrun.py].
Instructions
To run both test problems and make all figures for the paper
{{{
$ python make_figures.py
}}}
To run one example, e.g. Test 1:
{{{
$ make all -f Makefile_220
}}}
end_html