Skip to content

Commit

Permalink
added geoclaw1d doc to dev
Browse files Browse the repository at this point in the history
  • Loading branch information
rjleveque committed Nov 1, 2023
1 parent 23c9fd4 commit ea80733
Show file tree
Hide file tree
Showing 713 changed files with 1,324 additions and 73 deletions.
3 changes: 2 additions & 1 deletion _sources/sphere_source.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ by turning them on and recompiling. In the future they will be added by
default with a parameter that can be adjusted in `setrun.py`.

A document is in preparation to describe these source terms and show some
examples of the impact they have. A link will be posted here soon.
examples of the impact they have. A draft can be viewed at
`<https://faculty.washington.edu/rjl/misc/spherical_swe_2023-10-27.pdf>`__


2 changes: 1 addition & 1 deletion dev/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 805152217bca8379bda1265a659f9ddf
config: 1d1678fa7a647d9a49f8fb23d4c7ee3e
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified dev/.doctrees/ClawPlotAxes.doctree
Binary file not shown.
Binary file modified dev/.doctrees/ClawPlotData.doctree
Binary file not shown.
Binary file modified dev/.doctrees/ClawPlotFigure.doctree
Binary file not shown.
Binary file modified dev/.doctrees/ClawPlotItem.doctree
Binary file not shown.
Binary file modified dev/.doctrees/about.doctree
Binary file not shown.
Binary file modified dev/.doctrees/adjoint.doctree
Binary file not shown.
Binary file modified dev/.doctrees/amr_algorithm.doctree
Binary file not shown.
Binary file modified dev/.doctrees/amrclaw.doctree
Binary file not shown.
Binary file modified dev/.doctrees/amrclaw1d.doctree
Binary file not shown.
Binary file modified dev/.doctrees/amrclaw_doxygen.doctree
Binary file not shown.
Binary file modified dev/.doctrees/amrclaw_flowcharts.doctree
Binary file not shown.
Binary file modified dev/.doctrees/application_documentation.doctree
Binary file not shown.
Binary file modified dev/.doctrees/apps.doctree
Binary file not shown.
Binary file modified dev/.doctrees/aws.doctree
Binary file not shown.
Binary file modified dev/.doctrees/b4run.doctree
Binary file not shown.
Binary file modified dev/.doctrees/b4step_defaults.doctree
Binary file not shown.
Binary file modified dev/.doctrees/bc.doctree
Binary file not shown.
Binary file modified dev/.doctrees/biblio.doctree
Binary file not shown.
Binary file added dev/.doctrees/bouss1d.doctree
Binary file not shown.
Binary file added dev/.doctrees/bouss2d.doctree
Binary file not shown.
Binary file modified dev/.doctrees/changes_to_master.doctree
Binary file not shown.
Binary file modified dev/.doctrees/claw43to46.doctree
Binary file not shown.
Binary file modified dev/.doctrees/claw46to50.doctree
Binary file not shown.
Binary file modified dev/.doctrees/claw4x.doctree
Binary file not shown.
Binary file modified dev/.doctrees/clawpack5.doctree
Binary file not shown.
Binary file modified dev/.doctrees/clawpack_components.doctree
Binary file not shown.
Binary file modified dev/.doctrees/community.doctree
Binary file not shown.
Binary file modified dev/.doctrees/contents.doctree
Binary file not shown.
Binary file modified dev/.doctrees/contribute_apps.doctree
Binary file not shown.
Binary file modified dev/.doctrees/current_data.doctree
Binary file not shown.
Binary file modified dev/.doctrees/developers.doctree
Binary file not shown.
Binary file modified dev/.doctrees/docker_image.doctree
Binary file not shown.
Binary file modified dev/.doctrees/dtopotools_module.doctree
Binary file not shown.
Binary file modified dev/.doctrees/environment.pickle
Binary file not shown.
Binary file modified dev/.doctrees/f77_vs_f90.doctree
Binary file not shown.
Binary file modified dev/.doctrees/fgmax.doctree
Binary file not shown.
Binary file modified dev/.doctrees/fgmax_tools_module.doctree
Binary file not shown.
Binary file modified dev/.doctrees/fgout.doctree
Binary file not shown.
Binary file modified dev/.doctrees/fgout_tools_module.doctree
Binary file not shown.
Binary file modified dev/.doctrees/first_run.doctree
Binary file not shown.
Binary file modified dev/.doctrees/first_run_fortran.doctree
Binary file not shown.
Binary file modified dev/.doctrees/first_run_pyclaw.doctree
Binary file not shown.
Binary file modified dev/.doctrees/flagregions.doctree
Binary file not shown.
Binary file modified dev/.doctrees/force_dry.doctree
Binary file not shown.
Binary file modified dev/.doctrees/fortran.doctree
Binary file not shown.
Binary file modified dev/.doctrees/fortran_compilers.doctree
Binary file not shown.
Binary file modified dev/.doctrees/fvmbook.doctree
Binary file not shown.
Binary file modified dev/.doctrees/galleries.doctree
Binary file not shown.
Binary file modified dev/.doctrees/gauges.doctree
Binary file not shown.
Binary file modified dev/.doctrees/geoclaw.doctree
Binary file not shown.
Binary file added dev/.doctrees/geoclaw1d.doctree
Binary file not shown.
Binary file modified dev/.doctrees/geoclaw_started.doctree
Binary file not shown.
Binary file modified dev/.doctrees/geoclaw_util_module.doctree
Binary file not shown.
Binary file modified dev/.doctrees/geohints.doctree
Binary file not shown.
Binary file modified dev/.doctrees/geoplot.doctree
Binary file not shown.
Binary file modified dev/.doctrees/git_versions.doctree
Binary file not shown.
Binary file modified dev/.doctrees/googleearth_plotting.doctree
Binary file not shown.
Binary file modified dev/.doctrees/gpu.doctree
Binary file not shown.
Binary file modified dev/.doctrees/grid_registration.doctree
Binary file not shown.
Binary file modified dev/.doctrees/howto_doc.doctree
Binary file not shown.
Binary file modified dev/.doctrees/howto_release.doctree
Binary file not shown.
Binary file modified dev/.doctrees/installing.doctree
Binary file not shown.
Binary file modified dev/.doctrees/installing_fortcodes.doctree
Binary file not shown.
Binary file modified dev/.doctrees/installing_pip.doctree
Binary file not shown.
Binary file modified dev/.doctrees/kmltools_module.doctree
Binary file not shown.
Binary file modified dev/.doctrees/lagrangian_gauges.doctree
Binary file not shown.
Binary file modified dev/.doctrees/license.doctree
Binary file not shown.
Binary file modified dev/.doctrees/makefiles.doctree
Binary file not shown.
Binary file modified dev/.doctrees/makefiles_library.doctree
Binary file not shown.
Binary file modified dev/.doctrees/manning.doctree
Binary file not shown.
Binary file modified dev/.doctrees/mapc2p.doctree
Binary file not shown.
Binary file modified dev/.doctrees/marching_front.doctree
Binary file not shown.
Binary file modified dev/.doctrees/matlab_plotting.doctree
Binary file not shown.
Binary file modified dev/.doctrees/nearshore_interp.doctree
Binary file not shown.
Binary file modified dev/.doctrees/netcdf.doctree
Binary file not shown.
Binary file modified dev/.doctrees/newapp.doctree
Binary file not shown.
Binary file modified dev/.doctrees/okada.doctree
Binary file not shown.
Binary file modified dev/.doctrees/openmp.doctree
Binary file not shown.
Binary file modified dev/.doctrees/output_styles.doctree
Binary file not shown.
Binary file modified dev/.doctrees/packages.doctree
Binary file not shown.
Binary file modified dev/.doctrees/photos.doctree
Binary file not shown.
Binary file modified dev/.doctrees/plotexamples.doctree
Binary file not shown.
Binary file modified dev/.doctrees/plotting.doctree
Binary file not shown.
Binary file modified dev/.doctrees/plotting_faq.doctree
Binary file not shown.
Binary file modified dev/.doctrees/plotting_geoclaw.doctree
Binary file not shown.
Binary file modified dev/.doctrees/plotting_python.doctree
Binary file not shown.
Binary file modified dev/.doctrees/prereqs.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/about.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/basics.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/classes.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/clawpack_and_pyclaw.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/cloud.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/controller.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/evolve/limiters.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/examples.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/geometry.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/going_further.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/index.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/io.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/output.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/parallel.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/plotting.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/problem.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/rp.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/solution.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/solvers.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/started.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/state.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/troubleshooting.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/tutorial.doctree
Binary file not shown.
Binary file modified dev/.doctrees/pyclaw/util.doctree
Binary file not shown.
Binary file modified dev/.doctrees/python.doctree
Binary file not shown.
Binary file modified dev/.doctrees/python_path.doctree
Binary file not shown.
Binary file modified dev/.doctrees/qinit_defaults.doctree
Binary file not shown.
Binary file modified dev/.doctrees/quick_surge.doctree
Binary file not shown.
Binary file modified dev/.doctrees/quick_tsunami.doctree
Binary file not shown.
Binary file modified dev/.doctrees/refinement.doctree
Binary file not shown.
Binary file modified dev/.doctrees/regression.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_0_0.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_1_0.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_2_0.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_2_1.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_2_2.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_3_0.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_3_1.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_4_0.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_4_1.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_5_0.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_6_0.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_6_1.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_7_0.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_7_1.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_8_0.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_8_1.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_8_2.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_9_0.doctree
Binary file not shown.
Binary file modified dev/.doctrees/release_5_9_1.doctree
Binary file not shown.
Binary file modified dev/.doctrees/releases.doctree
Binary file not shown.
Binary file modified dev/.doctrees/restart.doctree
Binary file not shown.
Binary file modified dev/.doctrees/riemann.doctree
Binary file not shown.
Binary file modified dev/.doctrees/riemann/Shallow_water_Riemann_solvers.doctree
Binary file not shown.
Binary file modified dev/.doctrees/ruled_rectangles.doctree
Binary file not shown.
Binary file modified dev/.doctrees/sealevel.doctree
Binary file not shown.
Binary file modified dev/.doctrees/set_eta_init.doctree
Binary file not shown.
Binary file modified dev/.doctrees/setaux_defaults.doctree
Binary file not shown.
Binary file modified dev/.doctrees/setenv.doctree
Binary file not shown.
Binary file modified dev/.doctrees/setplot.doctree
Binary file not shown.
Binary file modified dev/.doctrees/setrun.doctree
Binary file not shown.
Binary file modified dev/.doctrees/setrun_amrclaw.doctree
Binary file not shown.
Binary file modified dev/.doctrees/setrun_amrclaw_sample.doctree
Binary file not shown.
Binary file modified dev/.doctrees/setrun_geoclaw.doctree
Binary file not shown.
Binary file modified dev/.doctrees/setrun_sample.doctree
Binary file not shown.
Binary file modified dev/.doctrees/sharing.doctree
Binary file not shown.
Binary file modified dev/.doctrees/sphere_source.doctree
Binary file not shown.
Binary file modified dev/.doctrees/sphinxdoc.doctree
Binary file not shown.
Binary file modified dev/.doctrees/src1d_defaults.doctree
Binary file not shown.
Binary file modified dev/.doctrees/src_defaults.doctree
Binary file not shown.
Binary file modified dev/.doctrees/storm_module.doctree
Binary file not shown.
Binary file modified dev/.doctrees/surgedata.doctree
Binary file not shown.
Binary file modified dev/.doctrees/testing.doctree
Binary file not shown.
Binary file modified dev/.doctrees/timing.doctree
Binary file not shown.
Binary file modified dev/.doctrees/topo.doctree
Binary file not shown.
Binary file modified dev/.doctrees/topotools.doctree
Binary file not shown.
Binary file modified dev/.doctrees/topotools_module.doctree
Binary file not shown.
Binary file modified dev/.doctrees/trouble.doctree
Binary file not shown.
Binary file modified dev/.doctrees/tsunamidata.doctree
Binary file not shown.
Binary file modified dev/.doctrees/user_routines.doctree
Binary file not shown.
Binary file modified dev/.doctrees/visit_plotting.doctree
Binary file not shown.
Binary file modified dev/.doctrees/vm.doctree
Binary file not shown.
Binary file modified dev/.doctrees/wp_algorithms.doctree
Binary file not shown.
6 changes: 6 additions & 0 deletions dev/_sources/biblio.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ Papers describing the Clawpack software and algorithms
Volume = {35},
Year = {1998}}
.. [BergerLeVeque2023]
M. J. Berger and R. J. LeVeque. 2023
`Implicit Adaptive Mesh Refinement for Dispersive Tsunami Propagation
<http://faculty.washington.edu/rjl/pubs/mjb-rjl-implicit-2023/>`_
*Submitted for publication*
.. [BergerOliger84]
M. J. Berger and J. Oliger. 1984. Adaptive mesh refinement for
hyperbolic partial differential equations. *J. Comput. Phys.* 53,
Expand Down
126 changes: 126 additions & 0 deletions dev/_sources/bouss1d.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
.. _bouss1d:

*********************************************
Boussinesq solvers in One Space Dimension
*********************************************

.. warning :: Not yet incorporated in clawpack master branch or releases.
As of Version 5.10.0 (?), the geoclaw repository contains some code for solving
problems in one space dimension, as described more generally in
:ref:`geoclaw1d`. This code also supports two different sets of
dispersive Boussinesq equations that have been used in the literature
to better model wave propagation in situations where the wavelength is not
sufficiently long relative to the fluid depth for the shallow water
equation approximation to be accurate.

These Boussinesq equations are still depth-averaged equation with the same
conserved quantities (fluid depth `h` and momentum `hu` in 1d), but the
equations contain higher order derivative terms and so they are no longer
hyperbolic. The equations implemented include third-order derivatives
with respect to `txx`. However, the implementations proceed by alternating
steps with the shallow water equations and the solution of elliptic
equations that involve only second-order derivatives in `xx`.

.. _bouss1d_sgn:

The SGN equations
-----------------

The recommended set of equations to use are a modification of the
Serre-Green-Naghdi (SGN) equations with the addition of a parameter `alpha`
suggested by Bonneton et al. Both the 1d and 2d versions of these equations
and their GeoClaw implementation are discussed in [BergerLeVeque2023]_.
Setting `alpha = 1` gives the original SGN equations, but `alpha = 1.153` is
recommended since it gives a better approximation to the linear dispersion
relation of the Airy solution to the full 3d problem.

.. _bouss1d_ms:

The Madsen-Sorensen (MS) equations
----------------------------------

These equations also give a good approximation to the linear dispersion
relation of the Airy solution when the parameter `beta = 1/15` is used.
These equations were used in an earlier GeoClaw implementation known as
BoussClaw. These have been reimplemented in GeoClaw more recently,
including a 2d implementation that allows the use of AMR. However,
extensive tests with these equations have revealed some stability issues,
particularly in the case of AMR, which have also been reported by others.
The 1d MS implementation is included in GeoClaw but it is generally not
recommended except for those interested in comparing different formulations
and perhaps further investigating the stability issues.

.. _bouss1d_usage:

Using the 1d Boussinesq code
----------------------------

As in the 1d shallow water implementation, general mapped grids can be used,
but AMR is not supported in 1d. The plane wave (`coordinate_system == 1`)
and planar radial (`coordinate_system == -1`) versions of the Boussinesq
equations are both implemented. The axisymmetric version on the sphere
(`coordinate_system == 2`) is not yet implemented.

Specifying topo and dtopo files is identical to what is described for
:ref:`geoclaw1d`.

**Some things that must change:**

See the examples with names like `$CLAW/geoclaw/examples/1d/bouss_*`
for some sample code that can be modified for other problems.

.. _bouss1d_makefile:

Makefile
^^^^^^^^

A different `Makefile` is required for applications to use code from both
the `$CLAW/geoclaw/src/1d/shallow` and `$CLAW/geoclaw/src/1d/bouss`
libraries.

Solving the Boussinesq equations requires solving an elliptic equation each
time step, by setting up and solving a tridiagonal linear system of
equations. LAPACK is used for this, and the `Makefile` requires `FFLAGS` to
include `-llapack -lblas` or explicit pointers to these librarires on your
computer. Alternatively, the file
`$CLAW/geoclaw/src/1d/bouss/lapack_tridiag.f`
contains the necessary soubroutines from lapack and the blas and so you can
add this to the list of `SOURCES` in the `Makefile`. See e.g.
`$CLAW/geoclaw/src/1d/examples/bouss_wavetank_matsuyama/Makefile`
for an example.

OpenMP is not used in the 1d codes, so there is no need to compile with
these flags. For more about `FFLAGS` and suggested settings for debugging,
see :ref:`fortran_fflags`.

.. _bouss1d_setrun:

setrun.py
^^^^^^^^^


Some additional parameters must be added to `setrun.py`, typically set as
follows::

from clawpack.geoclaw.data import BoussData1D
rundata.add_data(BoussData1D(),'bouss_data')
rundata.bouss_data.bouss = True
rundata.bouss_data.equations = 2 # for SGN (recommended, or 1 for MS)
rundata.bouss_data.deepBouss = 5. # depth (meters) to switch to SWE

The `rundata.bouss_data` object has attributes:

- `bouss_equations` (int): Which equation set to use
(0 for SWE, 1 for MS, 2 for SGN).
- `bouss_min_depth` (float): water depth at which to switch from Boussinesq
to SWE.

The latter parameter is needed because in very shallow water, and for
modeling onshore inundation, the Boussinesq equations are not suitable.
So some criterion is needed to drop these correction terms and revert to
solving SWE near shore. Many different approaches have been used in the
literature. So far we have only implemented the simplest common approach,
which is to revert to SWE in any grid cell where the initial water depth (at
the initial time) is less than `bouss_min_depth`.

10 changes: 10 additions & 0 deletions dev/_sources/bouss2d.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _bouss2d:

*********************************************
Boussinesq solvers in Two Space Dimensions
*********************************************

To appear in a future release.

See [BergerLeVeque2023]_.

2 changes: 1 addition & 1 deletion dev/_sources/fortran_compilers.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ code, and this dependency is not handled automatically. So always do::
before rerunning an example with `make .output` or `make .plots`.


.. _fortran_LFAGS:
.. _fortran_LFLAGS:

`LFLAGS` environment variable
------------------------------
Expand Down
3 changes: 3 additions & 0 deletions dev/_sources/geoclaw.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ More will eventually appear in the :ref:`apps`.
marching_front
force_dry
sphere_source
geoclaw1d
bouss1d
bouss2d

* `Links <http://depts.washington.edu/clawpack/geoclaw/>`_
to relevant papers and sample codes (some are based on the Clawpack 4.x
Expand Down
181 changes: 181 additions & 0 deletions dev/_sources/geoclaw1d.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
.. _geoclaw1d:

*********************************************
GeoClaw in One Space Dimension
*********************************************

.. warning :: Not yet incorporated in clawpack master branch or releases.
As of Version 5.10.0 (?), the geoclaw repository contains some code for solving
problems in one space dimension. This can be used for solving plane wave
problems on planar topography (including onshore inundation), as well as
radially symmetric problems on the plane
or axisymmetric problems on the sphere (see :ref:`geoclaw1d_coord`).

Some general notes:

- The standard 2d version of GeoClaw can be used to solve 1d problem by
simply specifying a domain that is only a few cells wide in the
y-direction, and insuring that the topography, initial data, and any dtopo
files varies only in x as well. By setting the AMR refinement ratios to be
1 in the y-direction, it is possible to still use adaptive mesh refinement
in x. For some 1d problems this may be the best approach.

- By contrast, the newly introduced 1d code does not support AMR at this
time. Instead, a fixed grid is used. However, the grid spacing may be
variable and some tools are provided to compute a mapped grid that has the
property that the Courant number (based on the linearized
shallow water wave speed `sqrt(g*h)`)is roughly constant, so that cells in
deep water are larger than cells in shallow water (transitioning to a
uniform grid in very shallow water and onshore). For some problems a fine
1d grid of this nature can be used to compute a very accurate solution and
is sometimes preferable to using AMR.

- In addition to shallow water equations, the 1d code also supports two
different forms of Boussinesq equations, which include dispersive terms
and better model waves whose wavelength is short compared to the fluid
depth. For more information, see :ref:`bouss1d`.
(Two-dimensional Boussinesq solvers have also recently been implemented,
with AMR, and will appear in a future release; see :ref:`bouss2d`.)

- Topography data (topo files) and moving topography (dtopo files) can be
specified much as in 2d GeoClaw; see :ref:`topo1d` below.

The 1d library routines are found in `$CLAW/geoclaw/src/1d_classic/shallow`,
with some additional routines needed for the Boussinesq solvers in
`$CLAW/geoclaw/src/1d_classic/bouss`.

Some examples illustrating usage can be found in
`$CLAW/geoclaw/examples/1d`, and some plots and animations can be viewed in
the :ref:`gallery_geoclaw`.

.. geoclaw1d_coord:
Coordinate systems
-------------------

In `setrun.py`, the parameter `rundata.geo_data.coordinate_system`
can be used to specify the coordinate system to be used.

- `rundata.geo_data.coordinate_system == 1`: `x` is measured in meters. This
is the most natural coordinate system for many 1d problems, e.g. modeling
waves in a wave tank, or plane waves in the ocean (provided the topography
only varies in the direction of propagation).

- `rundata.geo_data.coordinate_system == -1`: `x >= 0` is measured in meters
and represents radial distance.
In this case, the solution is assumed to a 1d cross section of
a rotationally symmetric 2d solution. The 2d shallow water (or
Boussinesq) equations can then be reduced to 1d equations that have a
similar form to the plane wave equations, with the addition also of a
geometric source term. This source term is built in to the solution
procedure in this case.

- `rundata.geo_data.coordinate_system == 2`: `x` is measured in degrees
for a problem that is rotationally symmetric on the sphere about some axis
of rotation, e.g. waves
spreading out from a radially symmetric crater on topography that is also
rotationally symmetric about the same axis. In this case `-90 <= x <=90`
with the endpoints corresponding to the two points where the axis intersects
the sphere, so it represents latitude with respect to this axis.
(If the axis passes through the poles then `x` is the ordinary
latitude with `x = -90` at the south pole and `x = +90` at the north pole.)

As in the case of radial symmetry, the spherical case requires some
changes in the equations and the addition of a geometric source term.
Near each pole the solution behaves much as in the radial symmetric case,
but note that waves from a disturbance at one pole will initially
decay as they spread out but after passing the equator they will start to
refocus at the other pole.


.. geoclaw1d_grids:
Uniform and mapped grids
------------------------

In `setrun.py`, the parameter `rundata.grid_data.grid_type`
can be used to specify the computational grid to be used.

- `rundata.grid_data.grid_type == 0`: A uniform grid is used, with
spacing determined by the domain length and the number of grid cells
specified.

- `rundata.grid_data.grid_type == 1`: A mapped grid is used.
In this case a function `mapc2p.f90` must be provided to map
the computational grid specified in `setrun.py` to physical cells.
See :ref:`mapc2p`.

- `rundata.grid_data.grid_type == 2`: A nonuniform grid is used with a
user-specified set of grid cell edges. In this case
`rundata.grid_data.fname_celledges` should be set to a string
giving the name of the file that contains the cell edges (one per line).
Also, the computational grid should be in the domain `0 <= x <= 1`, i.e.::

clawdata.lower[0] = 0. # xlower
clawdata.upper[0] = 1. # xupper
clawdata.num_cells[0] = mx # number of grid cells

In this case the number of celledges in the data file should be `mx+1`.

.. geoclaw1d_topo:
Topograpy data
-------------------

Topography data is specified in a file that has two columns, with values
`x, B` specifying the topo value `B` at spatial locations `x`.
The topography is viewed as being piecewise linear connecting these points.
As in 2d GeoClaw, the finite volume cells used for the computation have a
single cell-averaged `B` value that is obtained by cell-averaging this
piecewise linear function.

Note that if a mapped grid is used and if the topography values are
specified at the cell edges, then the cell-averaged finite volume values are
simply the average of the `B` values from each edge of the cell. In this
case, the same file that is used to specify the topography can also be used
to specify the grid. (The second column is ignored when it is read in as a
grid specification.)

In `setrun.py`, the parameter `rundata.topo_data.topofiles`
is set to a list of topofiles, each of which is specified by a list
containing the `topo_type` and `topofile_path`, the path to the file, as
in 2d. Currently only one topofile is supported, and
so this should have the form:

rundata.topo_data.topofiles = [[topo_type, topofile_path]]

Currently only `topo_type == 1` is supported, which has the form described
above.


.. geoclaw1d_dtopo:
Moving topograpy (dtopo) data
-----------------------------

In `setrun.py`, the parameter `rundata.dtopo_data.dtopofiles`
is set to a list of dtopofiles, each of which is specified by a list
containing the `dtopo_type` and `dtopofile_path`, the path to the file, as
in 2d. Currently only one dtopofile is supported, and
so this should have the form:

rundata.dtopo_data.dtopofiles = [[dtopo_type, dtopofile_path]]

Currently only `dtopo_type == 1` is supported, and the dtopofile should have
a form similar to what was described for topofiles above,
except that each line
starts with a *t* value for the time, so each line contains t,x,dz

The `x,dz` values give the displacement `dz` at `x` at time `t`. It is assumed
that the grid is uniform and that the file contains `mx*mt` lines if mt
different times are specified on a grid with mx points.

One way to specify a dtopo file is to use the Okada model (see :ref:`okada`)
in a situation where the fault is dipping in the x-direction and the fault
geometry and slip are assumed
to be constant in the y-direction over a long enough distance that a 1d
slice in x is a reasonable model.
Tools are provided create such a dtopo file, see the example in
`$CLAW/geoclaw/examples/1d/okada_dtopo`.

3 changes: 2 additions & 1 deletion dev/_sources/sphere_source.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ by turning them on and recompiling. In the future they will be added by
default with a parameter that can be adjusted in `setrun.py`.

A document is in preparation to describe these source terms and show some
examples of the impact they have. A link will be posted here soon.
examples of the impact they have. A draft can be viewed at
`<https://faculty.washington.edu/rjl/misc/spherical_swe_2023-10-27.pdf>`__


6 changes: 6 additions & 0 deletions dev/biblio.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ <h2>Papers describing the Clawpack software and algorithms<a class="headerlink"
</pre></div>
</div>
</div>
<div class="citation" id="bergerleveque2023" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>BergerLeVeque2023<span class="fn-bracket">]</span></span>
<p>M. J. Berger and R. J. LeVeque. 2023
<a class="reference external" href="http://faculty.washington.edu/rjl/pubs/mjb-rjl-implicit-2023/">Implicit Adaptive Mesh Refinement for Dispersive Tsunami Propagation</a>
<em>Submitted for publication</em></p>
</div>
<div class="citation" id="bergeroliger84" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>BergerOliger84<span class="fn-bracket">]</span></span>
<p>M. J. Berger and J. Oliger. 1984. Adaptive mesh refinement for
Expand Down
Loading

0 comments on commit ea80733

Please sign in to comment.