diff --git a/ClawPlotAxes.html b/ClawPlotAxes.html index 57d1ab6c37..da7fd4583e 100644 --- a/ClawPlotAxes.html +++ b/ClawPlotAxes.html @@ -6,7 +6,7 @@ - ClawPlotAxes — Clawpack 5.9.x documentation + ClawPlotAxes — Clawpack 5.10.x documentation @@ -74,7 +74,7 @@

Navigation

  • previous |
  • - + @@ -420,7 +420,7 @@

    Methods -

    Version 5.9.x

    +

    Version 5.10.x

    Table of Contents

    @@ -482,12 +482,13 @@

    Quick search

    Latest Version

    Older Versions

    @@ -495,7 +496,7 @@

    Older Versions

    +

    Latest Version

    + +

    Older Versions

    + +
    +

    Latest Version

    + +

    Older Versions

    + +
    + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.10.0 release notes

    +

    Clawpack 5.10.0 was released on XX. See Installing Clawpack.

    +

    Permanent DOI: http://doi.org/10.5281/zenodo.XX

    +

    Changes relative to Clawpack 5.9.2 (November 4, 2023) are shown below.

    +

    To see more recent changes that are in the the master branch but not yet +released, see Changes to master since v5.9.2.

    +

    Follow the links to see changes that have been made to the master branch of +each repository since the last release (v5.10.0) on XX.

    +

    These changes should appear in the next release. If you need them now, +see Developers’ Guide for instructions on cloning and installing from the +master branch.

    +

    To see documentation that has already been developed to accompany any new +features listed below, click on the “dev” branch of the documentation, in +the menu on the left hand side of this page.

    +
    +

    Changes that are not backward compatible

    +
      +
    • The switch to meson made in v5.9.2 requires the installation of some +additional packages for developers or others who choose to clone the +repositories from Github. The instructions in Installation instructions for developers +now include instructions to:

      +
      pip install -r requirements-dev.txt
      +
      +
      +

      as part of the installation.

      +
    • +
    • In GeoClaw, when solving equations on the sphere, a spherical source term +in the mass equation is now included by default. This term was missing +previously and so results may change. +See https://www.clawpack.org/sphere_source.html for more discussion +and instructions for omitting this source term.

    • +
    +
    +
    +

    Changes to classic

    +

    None.

    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +
      +
    • $CLAW/clawutil/src/Makefile.common, the main Makefile imported by all +application Makefiles in the Fortran versions, has been improved:

      +
        +
      • When using make new to recompile all routines, after the modules are +compiled all other fortran source codes are compiled in parallel, +speeding up the process.

      • +
      • RUNEXE was added to provide a string to be inserted before the name +of the executable EXE in order to run it. This is necessary in +particular to run the new 2D Boussinesq code using MPI, see +Boussinesq solvers in Two Space Dimensions for instructions.

        +

        (Support for this also added to +$CLAW/clawutil/src/python/clawutil/runclaw.py).

        +
      • +
      • If FC is any variant of gfortran then use the same flags as +gfortran.

      • +
      +
    • +
    • Support added to +$CLAW/clawutil/src/python/clawutil/data.py for checkpt_style==4 +in AMRClaw and GeoClaw (see below), and also for the +D-Claw code +for granular-fluid flows, +which is being updated to work with the latest version of Clawpack. +This is still work in progress.

    • +
    • Other minor changes.

    • +
    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +
      +
    • Change the default plotfigure.facecolor to white for plots made by frametools.py (rather than clawpack_tan).

    • +
    • Add hillshade option to frametools.py for better visualization of topography.

    • +
    • Add imshow_norm and imshow_alpha as ClawPlotItem attributes for imshow plots.

    • +
    • Remove deprecated faceted kwarg in calls to pcolor from frametools.py.

    • +
    • Option added to make mpeg movies when doing make plots. +Provided ffmpeg is installed, +simply include this line in setplot.py:

      +
      plotdata.mp4_movie = True
      +
      +
      +

      Then _plots will include movie_figN.mp4 for each figno N listed in

      +
      plotdata.print_fignos
      +
      +
      +

      and will also be linked from the _PlotIndex.html file.

      +

      You can also now easily change the name of the movie (also for the .html +version created by JSAnimation and the .gif version if requested) via e.g.:

      +
      plotdata.movie_name_prefix = 'chile2010_'   # default is 'movie_'
      +
      +
      +

      Then _plots will include chile2010_figN.mp4 for each figure.

      +
    • +
    • Updates to matlab plotting routines.

    • +
    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
      +
    • New Riemann solver for the p-system.

    • +
    • Clean up some other things.

    • +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
      +
    • Bug fix for case when the domain is periodic only in x and not in y.

    • +
    • STOP feature added: If you create a (possibly empty) file named STOP in the +run directory then the code will stop at the end of the current coarse grid +time step, after writing a checkpoint file. Useful to kill a computation with +the ability to restart after fixing something.

    • +
    • Most routines in $CLAW/amr/src/2d were cleaned up to replace do loop labels +and closing continue statements with more modern enddo, avoiding +many warning messages when compiling the code. +(Still need to clean up 1d and 3d, and classic code, but this cleans up +GeoClaw compilation a lot.)

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +
      +
    • For shallow water equations on the sphere, a spherical source term +in the mass equation is now included by default. This term was missing +previously and so results may change. +See https://www.clawpack.org/sphere_source.html for more discussion +and instructions for omitting this source term.

    • +
    • 1D GeoClaw code added, as described at GeoClaw in One Space Dimension. In particular there +are new directories $CLAW/geoclaw/src/1d_classic and +$CLAW/geoclaw/examples/1d_classic.

    • +
    • 1D Boussinesq code added in $CLAW/geoclaw/src/1d_classic/bouss and some of +the examples, as described in Boussinesq solvers in One Space Dimension.

    • +
    • 2D Boussinesq code added, as described in Boussinesq solvers in Two Space Dimensions. In particular there +are new directories $CLAW/geoclaw/src/2d/bouss and +$CLAW/geoclaw/examples/2d/bouss.

    • +
    • Using the 2D Boussinesq version of the code requires PETSc for solving the large sparse linear systems +that arise, which also requires LAPACK, BLAS, and MPI; +see Prerequisites for the 2d Boussinesq code.

    • +
    • checkpt_style == 4 is now supported, meaning to create a checkpoint file +at every output time. (As with other options, setting it to -4 means to +checkpoint at the same times but to alternate between two checkpoint files +rather than creating a unique file for each checkpoint, greatly reducing +storage if you only need the latest one.)

    • +
    • Introduce integer(kind=8) variables for some topo_module variables to +handle very large topo files for which the index was overflowing.

    • +
    • Introduce STOP feature as described in above for amrclaw.

    • +
    • Improve calculation of number of steps to take (ntogo) when CFL number is +too large in one step. (Still have issues sometimes where code dies with +too many dt reductions….)

    • +
    • Fix bug in python function clawpack.geoclaw.util.bearing and introduce new +clawpack.geoclaw.util.gctransect to compute points along a great circle +transect connecting two points on the sphere. (Transects obtained by +linear interpolation in x,y are fine over small regions but not for +global-scale transects.)

    • +
    • Other minor bug fixes, improvements, and cleanup.

    • +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    None.

    +

    See pyclaw diffs

    +

    For older changes in PyClaw, see also the PyClaw changelog.

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/dev/release_5_1_0.html b/dev/release_5_1_0.html index 01cc14bc52..fe2c8ecee0 100644 --- a/dev/release_5_1_0.html +++ b/dev/release_5_1_0.html @@ -6,7 +6,7 @@ - v5.1.0 release notes — Clawpack dev documentation + v5.1.0 release notes — Clawpack 5.10.x documentation @@ -66,7 +66,7 @@

    Navigation

  • modules |
  • - +
    @@ -211,7 +211,7 @@

    Changes to PyClaw -

    Version dev

    +

    Version 5.10.x

    Table of Contents

    @@ -266,12 +266,13 @@

    Quick search

    Latest Version

    Older Versions

    @@ -279,7 +280,7 @@

    Older Versions

    + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.10.0 release notes

    +

    Clawpack 5.10.0 was released on XX. See Installing Clawpack.

    +

    Permanent DOI: http://doi.org/10.5281/zenodo.XX

    +

    Changes relative to Clawpack 5.9.2 (November 4, 2023) are shown below.

    +

    To see more recent changes that are in the the master branch but not yet +released, see Changes to master since v5.9.2.

    +

    Follow the links to see changes that have been made to the master branch of +each repository since the last release (v5.10.0) on XX.

    +

    These changes should appear in the next release. If you need them now, +see Developers’ Guide for instructions on cloning and installing from the +master branch.

    +

    To see documentation that has already been developed to accompany any new +features listed below, click on the “dev” branch of the documentation, in +the menu on the left hand side of this page.

    +
    +

    Changes that are not backward compatible

    +
      +
    • The switch to meson made in v5.9.2 requires the installation of some +additional packages for developers or others who choose to clone the +repositories from Github. The instructions in Installation instructions for developers +now include instructions to:

      +
      pip install -r requirements-dev.txt
      +
      +
      +

      as part of the installation.

      +
    • +
    • In GeoClaw, when solving equations on the sphere, a spherical source term +in the mass equation is now included by default. This term was missing +previously and so results may change. +See https://www.clawpack.org/sphere_source.html for more discussion +and instructions for omitting this source term.

    • +
    +
    +
    +

    Changes to classic

    +

    None.

    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +
      +
    • $CLAW/clawutil/src/Makefile.common, the main Makefile imported by all +application Makefiles in the Fortran versions, has been improved:

      +
        +
      • When using make new to recompile all routines, after the modules are +compiled all other fortran source codes are compiled in parallel, +speeding up the process.

      • +
      • RUNEXE was added to provide a string to be inserted before the name +of the executable EXE in order to run it. This is necessary in +particular to run the new 2D Boussinesq code using MPI, see +Boussinesq solvers in Two Space Dimensions for instructions.

        +

        (Support for this also added to +$CLAW/clawutil/src/python/clawutil/runclaw.py).

        +
      • +
      • If FC is any variant of gfortran then use the same flags as +gfortran.

      • +
      +
    • +
    • Support added to +$CLAW/clawutil/src/python/clawutil/data.py for checkpt_style==4 +in AMRClaw and GeoClaw (see below), and also for the +D-Claw code +for granular-fluid flows, +which is being updated to work with the latest version of Clawpack. +This is still work in progress.

    • +
    • Other minor changes.

    • +
    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +
      +
    • Change the default plotfigure.facecolor to white for plots made by frametools.py (rather than clawpack_tan).

    • +
    • Add hillshade option to frametools.py for better visualization of topography.

    • +
    • Add imshow_norm and imshow_alpha as ClawPlotItem attributes for imshow plots.

    • +
    • Remove deprecated faceted kwarg in calls to pcolor from frametools.py.

    • +
    • Option added to make mpeg movies when doing make plots. +Provided ffmpeg is installed, +simply include this line in setplot.py:

      +
      plotdata.mp4_movie = True
      +
      +
      +

      Then _plots will include movie_figN.mp4 for each figno N listed in

      +
      plotdata.print_fignos
      +
      +
      +

      and will also be linked from the _PlotIndex.html file.

      +

      You can also now easily change the name of the movie (also for the .html +version created by JSAnimation and the .gif version if requested) via e.g.:

      +
      plotdata.movie_name_prefix = 'chile2010_'   # default is 'movie_'
      +
      +
      +

      Then _plots will include chile2010_figN.mp4 for each figure.

      +
    • +
    • Updates to matlab plotting routines.

    • +
    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
      +
    • New Riemann solver for the p-system.

    • +
    • Clean up some other things.

    • +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
      +
    • Bug fix for case when the domain is periodic only in x and not in y.

    • +
    • STOP feature added: If you create a (possibly empty) file named STOP in the +run directory then the code will stop at the end of the current coarse grid +time step, after writing a checkpoint file. Useful to kill a computation with +the ability to restart after fixing something.

    • +
    • Most routines in $CLAW/amr/src/2d were cleaned up to replace do loop labels +and closing continue statements with more modern enddo, avoiding +many warning messages when compiling the code. +(Still need to clean up 1d and 3d, and classic code, but this cleans up +GeoClaw compilation a lot.)

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +
      +
    • For shallow water equations on the sphere, a spherical source term +in the mass equation is now included by default. This term was missing +previously and so results may change. +See https://www.clawpack.org/sphere_source.html for more discussion +and instructions for omitting this source term.

    • +
    • 1D GeoClaw code added, as described at GeoClaw in One Space Dimension. In particular there +are new directories $CLAW/geoclaw/src/1d_classic and +$CLAW/geoclaw/examples/1d_classic.

    • +
    • 1D Boussinesq code added in $CLAW/geoclaw/src/1d_classic/bouss and some of +the examples, as described in Boussinesq solvers in One Space Dimension.

    • +
    • 2D Boussinesq code added, as described in Boussinesq solvers in Two Space Dimensions. In particular there +are new directories $CLAW/geoclaw/src/2d/bouss and +$CLAW/geoclaw/examples/2d/bouss.

    • +
    • Using the 2D Boussinesq version of the code requires PETSc for solving the large sparse linear systems +that arise, which also requires LAPACK, BLAS, and MPI; +see Prerequisites for the 2d Boussinesq code.

    • +
    • checkpt_style == 4 is now supported, meaning to create a checkpoint file +at every output time. (As with other options, setting it to -4 means to +checkpoint at the same times but to alternate between two checkpoint files +rather than creating a unique file for each checkpoint, greatly reducing +storage if you only need the latest one.)

    • +
    • Introduce integer(kind=8) variables for some topo_module variables to +handle very large topo files for which the index was overflowing.

    • +
    • Introduce STOP feature as described in above for amrclaw.

    • +
    • Improve calculation of number of steps to take (ntogo) when CFL number is +too large in one step. (Still have issues sometimes where code dies with +too many dt reductions….)

    • +
    • Fix bug in python function clawpack.geoclaw.util.bearing and introduce new +clawpack.geoclaw.util.gctransect to compute points along a great circle +transect connecting two points on the sphere. (Transects obtained by +linear interpolation in x,y are fine over small regions but not for +global-scale transects.)

    • +
    • Other minor bug fixes, improvements, and cleanup.

    • +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    None.

    +

    See pyclaw diffs

    +

    For older changes in PyClaw, see also the PyClaw changelog.

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/release_5_1_0.html b/release_5_1_0.html index 5f564c0a1f..5dd1f01834 100644 --- a/release_5_1_0.html +++ b/release_5_1_0.html @@ -6,7 +6,7 @@ - v5.1.0 release notes — Clawpack 5.9.x documentation + v5.1.0 release notes — Clawpack 5.10.x documentation @@ -66,7 +66,7 @@

    Navigation

  • modules |
  • - +
    @@ -211,7 +211,7 @@

    Changes to PyClaw -

    Version 5.9.x

    +

    Version 5.10.x

    Table of Contents

    @@ -266,12 +266,13 @@

    Quick search

    Latest Version

    Older Versions

    @@ -279,7 +280,7 @@

    Older Versions

    + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    ClawPlotAxes

    +

    For usage see Using setplot.py to specify the desired plots and Plotting examples.

    +

    Objects of this class are usually created by the new_plotaxes method of a +ClawPlotFigure object.

    + +
    +
    +class ClawPlotAxes
    +
    + +
    +

    Attributes

    +
    +

    The following attributes can be set by the user:

    +
    +
    +name : str
    +
    + +
    +
    +axescmd : str
    +
    + +
    +
    The command to be used to create this axes, for example:
      +
    • “subplot(1,1,1)” for a single axes filling the figure

    • +
    • “subplot(2,1,1)” for the top half

    • +
    • “axes([0.1, 0.1, 0.2, 0.8])” for a tall skinny axis.

    • +
    +
    +
    +

    See the matplotlib documentation for axes.

    +
    +
    +show : bool
    +

    If False, suppress showing this axes and all items on it.

    +
    + +
    +
    +title : str
    +

    The title to appear at the top of the axis. Defaults to string +specified by the name attribute.

    +

    New in v5.9.1:

    +

    Note that the title can now include the string h:m:s or d:h:m:s +as described further below for the case title_with_t == True.

    +
    + +
    +
    +title_fontsize : float
    +

    Fontsize for title

    +
    + +
    +
    +title_kwargs : str
    +

    Any other kwargs to be passed to plt.title(), e.g. ‘color’

    +
    + +
    +
    +title_with_t : bool
    +

    If True, creates a title using a default format like:

    +
    `"%s at time t = %14.8e" % (title, t)`
    +
    +
    +

    And rather than %14.8e for t, the default format uses %14.8f +if 0.001 <= t <= 1000.

    +

    A different format can be specified with the title_t_format attribute.

    +

    New in v5.9.1:

    +

    If the title attribute contains the string +d:h:m:s then the time is formatted as days:hours:minutes:seconds.

    +

    Otherwise, if the title attribute contains the string +h:m:s then the time is formatted as hours:minutes:seconds.

    +

    For example, you could specify:

    +
    plotaxes.title_with_t = True
    +plotaxes.title = 'Surface elevation at time h:m:s after earthquake'
    +
    +
    +
    + +
    +
    +title_t_format : str
    +

    A format string used to format t in the title. If this is not +None, then this is used instead of the conventions mentioned above.

    +

    Internally it formats using:

    +
    t_str = plotaxes.title_t_format % t
    +title_str = "%s at time t = %s"  % (plotaxes.title,t_str)
    +plt.title(title_str, **plotaxes.title_kwargs)
    +
    +
    +
    + +
    +
    +xlimits : array [xmin, xmax]  or 'auto'
    +

    The x-axis limits if an array with two elements, or choose +automatically

    +
    + +
    +
    +ylimits : array [ymin, ymax]  or 'auto'
    +

    The y-axis limits if an array with two elements, or choose +automatically

    +
    + +
    +
    +xticks_fontsize : float
    +

    Fontsize for xtick mark labels

    +
    + +
    +
    +xticks_kwargs : dictionary
    +

    Other kwargs to be passed to xticks (e.g. locations)

    +
    + +
    +
    +xlabel : str
    +

    Label for x-axis

    +
    + +
    +
    +xlabel_fontsize : str
    +

    Fontsize for x-axis label

    +
    + +
    +
    +xlabel_kwargs : dictionary
    +

    Other kwargs to be passed to xlabel (e.g. color)

    +
    + +
    +
    +yticks_fontsize : float
    +

    Fontsize for ytick mark labels

    +
    + +
    +
    +yticks_kwargs : dictionary
    +

    Other kwargs to be passed to yticks (e.g. locations)

    +
    + +
    +
    +ylabel : str
    +

    Label for y-axis

    +
    + +
    +
    +ylabel_fontsize : str
    +

    Fontsize for y-axis label

    +
    + +
    +
    +ylabel_kwargs : dictionary
    +

    Other kwargs to be passed to ylabel (e.g. color)

    +
    + +
    +
    +aspect : float
    +

    Aspect ratio for plot, used internally in the command:

    +
    plt.gca().set_aspect(plotaxes.aspect)
    +
    +
    +
    + +
    +
    +aspect_latitude : float
    +

    For plots in longitude-latitude coordinates, the latitude to use for +chosing the aspect ratio so that distances in meters are the same +in x and y at this latitude. (For plots covering a broad range of +latitudes, the the latitude near the middle or near the location of +most interest is generally most appropriate.

    +

    This value is used internally in the command:

    +
    plt.gca().set_aspect(1./np.cos(plotaxes.aspect_latitude \
    +                    * np.pi/180))
    +
    +
    +
    + +
    +
    +useOffset : boolean
    +

    If True, then tick marks may be labeled with an offset from some +common value that is printed at the corner. Often it is nicer to see +the full value at each tick mark, for which this should be set to False.

    +

    Internally the command:

    +
    plt.ticklabel_format(useOffset = plotaxes.useOffset)
    +
    +
    +

    is issued if useOffset is not None.

    +
    + +
    +
    +grid : boolean
    +

    If True then internally the command:

    +
    plt.grid(**plotaxes.grid_kwargs)
    +
    +
    +

    is issued to add grid lines to the plot.

    +
    + +
    +
    +grid_kwargs : dictionary
    +

    Any kwargs to be passed to plt.grid, e.g. ‘color’ or ‘linewidth’.

    +
    + +
    +
    +kwargs : dictionary
    +

    Any other attributes to be passed to axes command.

    +
    + +
    +
    +afteraxes : function or str
    +

    A string or function that is to be executed after creating all +plot items on this axes. +If a string, this string is executed using exec. If a +function, it should be defined to have a single argument +current_data.

    +

    The string version is useful for 1-liners such as:

    +
    afteraxes = "pylab.title('My custom title')"
    +
    +
    +

    pylab commands can be used, since pylab has been imported into the +plotting module.

    +

    The function form is better if you want to do several things, or if you +need access to the data stored in current_data. For example:

    +
    def afteraxes(current_data):
    +    # add x- and y-axes to a 1d plot already created
    +    from pylab import plot
    +
    +    xlower = current_data.xlower
    +    xupper = current_data.xupper
    +    plot([xlower, xupper], [0.,0.], 'k')   # x-axis
    +
    +    # Get y limits from variable just plotted, which is
    +    # available in current_data.var.
    +    ymin = current_data.var.min()
    +    ymax = current_data.var.max()
    +    plot([0.,0.], [ymin,ymax], 'k')  # y-axis
    +
    +
    +
    + +
    +
    +
    +

    Attributes for gauge plots

    +

    The following attributes are primarily useful for gauge plots, where the +horizontal axis is time t rather than x, and are implemented in +$CLAW/visclaw/src/python/visclaw/gaugetools.py:

    +
    +
    +
    +time_scale : float
    +

    Scaling for time values, e.g. if t is in seconds but you want the +plot to show hours on the horizontal axis then set +time_scale = 1/3600..

    +
    + +
    +
    +time_label : str
    +

    Label for time axis (same as setting xlabel)

    +
    + +
    +
    +time_label_fontsize : float
    +

    Fontsize for xlabel (time axis)

    +
    + +
    +
    +time_label_kwargs : dictionary
    +

    Other kwargs to be passed to xlabel (e.g. color)

    +
    + +
    +
    +
    +

    Methods

    +
    +
    +
    +new_plotitem(name=None, plot_type)
    +

    Returns an object of class ClawPlotItem associated with this axes. +A single axes may have several items associated with it.

    +

    The name specified is used as a dictionary key. If None is provided, +one is generated automatically of the form ITEM1, etc.

    +
    + +
    +
    +gethandle()
    +

    Returns the handle for this axes.

    +
    + +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/ClawPlotData.html b/v5.10.x/ClawPlotData.html new file mode 100644 index 0000000000..663b7a396d --- /dev/null +++ b/v5.10.x/ClawPlotData.html @@ -0,0 +1,437 @@ + + + + + + + + + ClawPlotData — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    ClawPlotData

    +

    For usage see Plotting with Visclaw, Using setplot.py to specify the desired plots, and Plotting examples.

    +
    +
    +class ClawPlotData
    +
    + +
    +

    Attributes

    +
    +
    +
    +outdir : str
    +

    Path to the directory where the Clawpack output is that is to be +plotted.

    +
    + +
    +
    +plotdir : str
    +

    Path to the directory where hardcopy files of plots are to be put.

    +
    + +
    +
    +overwrite : bool
    +

    Ok to overwrite old plotdir? Default is True

    +
    + +
    +
    +afterframe : str or function
    +

    Function or string to be executed after producing all plots for each +frame. If a string, this string is executed using exec. If a +function, it should be defined to have a single argument +“data”, [documentation to appear!] For example:

    +
    def afterframe(data):
    +    t = data.t
    +    print "Done plotting at time %s" % t
    +
    +
    +
    + +
    +
    +beforeframe : str or function
    +

    Function or string to be executed before starting to do plots for each +frame. If a function, it should be defined to have a single argument +“data”, [documentation to appear!]

    +
    def beforeframe(data):
    +
    +
    +
    + +
    +
    +printfigs : bool
    +

    True if plots are to be generated and printed (e.g. to png files) before +making html or latex files.

    +

    False if the plots have already been generated and the existing versions +are to be used for making html or latex files.

    +
    + +
    +
    +print_format : str
    +

    format for hardcopy, default is ‘png’

    +
    + +
    +
    +print_framenos : list of int's or 'all'
    +

    which frames to print, default is ‘all’

    +
    + +
    +
    +print_fignos : list of int's or 'all'
    +

    which figures to print for each frame, default is ‘all’

    +
    + +
    +
    +iplotclaw_fignos : list of int's or 'all'
    +

    which figures to print for each frame in interactive mode, default is ‘all’

    +
    + +
    +
    +latex : bool
    +

    If True, create a latex file in directory plotdir that to +display all the plots.

    +
    + +
    +
    +latex_fname : str
    +

    Name of latex file, default is ‘plots’. The file created will be e.g. +plots.tex.

    +
    + +
    +
    +latex_title : str
    +

    The title to go at the top of the latex file, default is “Clawpack Results”

    +
    + +
    +
    +latex_framesperpage : int or 'all'
    +

    How many frames to try to put on each page. Default is ‘all’.

    +
    + +
    +
    +latex_framesperline : int or 'all'
    +

    How many frames to try to put on each line. Default is ‘all’.

    +
    + +
    +
    +latex_figsperline : int or 'all'
    +

    How many figures to try to put on each line. Default is ‘all’. +Recall that several plots may be generated for each frame.

    +
    + +
    +
    +latex_pdf : bool
    +

    If True, run pdflatex on the latex file to create e.g., plots.pdf.

    +
    + +
    +
    +html : bool
    +

    If True, create a set of html files to display the plots and an index to +these files called _PlotIndex.html. These will be in the directory +specified by the plotdir attribute.

    +
    + +
    +
    +
    +

    Methods

    +
    +
    +
    +new_plotfigure(name, figno)
    +

    Create and return a new object of class ClawPlotFigure associated with this +ClawPlotData object.

    +
    + +
    +
    +getframe(frameno, outdir=None)
    +

    Return an object of class ClawSolution that contains the solution +read in from the fort.q000N file (where N is frameno).

    +

    If outdir==None then the outdir attribute of this ClawPlotData +object is used as the directory to find the data.

    +

    The data, once read in, is stored in a dictionary (the attribute +framesoln_dict of this ClawPlotData object). It is read from the fort.q +file only if it is not already in the dictionary.

    +

    Note that frames read from different outdir’s are stored separately (with +dictionary key (frameno, outdir) if outdir != None).

    +
    + +
    +
    +clearframes(framenos)
    +

    Remove one or more frames from the dictionary framesoln_dict. +(Different outdir’s not yet implemented.)

    +
    + +
    +
    +clearfigures()
    +

    Clear all plot parameters. Useful as the first command in a setplot +function to make sure previous parameters are cleared if the file is +changed and the function is re-executed in an interactive session.

    +
    + +
    +
    +iplotclaw()
    +

    Return True if interactive plotting with iplotclaw is being done.

    +
    + +
    +
    +getfigure(figname)
    +

    Return ClawPlotFigure object with the specified name.

    +
    + +
    +
    +getaxes(axesname, figname=None)
    +

    Return ClawPlotAxes object with the specified name. +If figname==None then search over all figures and return None if +it is not found or the name is not unique.

    +
    + +
    +
    +getitem(itemname, axesname=None, figname=None)
    +

    Return ClawPlotItem object with the specified name. +If axesname==None and/or figname==None +then search over all figures and/or axes and return None if +it is not found or the name is not unique.

    +
    + +
    +
    +showitems()
    +

    Print a list of all the figures, axes, and items defined.

    +
    + +
    +
    +plotframe(frameno)
    +

    Plot all figures for frame number frameno. Convenience method that +calls pyclaw.plotters.frametools.plotframe().

    +
    + +
    +
    +printframes()
    +

    Plot and print hardcopy for all frames. Convenience method that +calls pyclaw.plotters.frametools.printframes().

    +
    + +
    +
    +

    Note

    +

    More methods still to be documented.

    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/ClawPlotFigure.html b/v5.10.x/ClawPlotFigure.html new file mode 100644 index 0000000000..86fcd3a7d5 --- /dev/null +++ b/v5.10.x/ClawPlotFigure.html @@ -0,0 +1,278 @@ + + + + + + + + + ClawPlotFigure — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    ClawPlotFigure

    +

    For usage see Using setplot.py to specify the desired plots and Plotting examples.

    +

    Objects of this class are usually created by the new_plotfigure method of a +ClawPlotData object.

    +
    +
    +class ClawPlotFigure
    +
    + +
    +

    Attributes

    +
    +

    The following attributes can be set by the user:

    +
    +
    +figno : int
    +

    Figure number, by default the next unused number will be used (starting +at 1001). +This is usually set as an argument to the new_plotfigure function +of a ClawPlotData object

    +
    + +
    +
    +figsize : tuple
    +

    Figure size in (x,y) as in matplotlib.

    +
    + +
    +
    +facecolor : color
    +

    Color for the background of the figure (behind the axes). +By default (if facecolor is None) the clawpack theme tan color is used.

    +

    For plots to be included in publications you probably want to use +‘w’ for a white background instead.

    +
    + +
    +
    +kwargs : dictionary
    +

    A dictionary of keyword arguments for the figure command. +For example:

    +
    "{'figsize':[12,5], 'facecolor':[1,0,0]}"
    +
    +
    +

    would specify that the figure should be +12 inches by 5 inches with a red background.

    +

    For more options +see the matplotlib documentation +for the figure command.

    +
    + +
    +
    +clf_each_frame : bool
    +

    If True, clear the figure with a clf command at the start of each frame.

    +
    + +
    +
    +show : bool
    +

    If False, suppress showing this figure.

    +
    + +
    +
    +
    +

    Methods

    +
    +
    +
    +new_plotaxes(name=None)
    +

    Create and return a new object of class ClawPlotAxes associated with this +ClawPlotFigure object. A single figure may have several axes on it.

    +

    The name specified is used as a dictionary key. If None is provided, +one is generated automatically of the form AXES1, etc.

    +
    + +
    +
    +gethandle()
    +

    Returns the handle for this figure.

    +
    + +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/ClawPlotItem.html b/v5.10.x/ClawPlotItem.html new file mode 100644 index 0000000000..06e3905646 --- /dev/null +++ b/v5.10.x/ClawPlotItem.html @@ -0,0 +1,683 @@ + + + + + + + + + ClawPlotItem — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    ClawPlotItem

    +

    For usage see Using setplot.py to specify the desired plots and Plotting examples.

    +

    Objects of this class are usually created by the new_plotitem method of a +ClawPlotAxes object.

    +

    The examples shown below are fragments of a typical setplot +function which assume plotaxes is an instance of ClawPlotAxes.

    + +
    +

    See also

    +

    Plotting examples

    +
    +
    +
    +class ClawPlotItem
    +
    + +
    +

    Attributes

    +

    The following attributes can be set by the user:

    +
    +
    +plot_type : str
    +

    Type of plot desired, one of the following:

    +
      +
    • ‘1d_plot’ : one dimensional line or set of points plotted using the +matplotlib plot command.

    • +
    • ‘1d_from_2d_data’ : 1d plot generated from 2d data, for example as a +slice of the data or a scatter plot of data that should be radially +symmetric,

    • +
    • ‘1d_fill_between’ : 1d filled plot between two variable specified by +the attributes plot_var and fill_var2.

    • +
    • ‘2d_imshow’ : two dimentional raster plot

    • +
    • ‘2d_contour’ : two dimensional contour plot,

    • +
    • ‘2d_pcolor’ : two dimensional pcolor plot,

    • +
    • ‘2d_schlieren’ : two dimensional Schlieren plot,

    • +
    • ‘2d_patch’ : two dimensional plot of only the cell and/or patch edges, no data

    • +
    • ‘2d_hillshade’ : two dimensional hillshade plot.

    • +
    +
    + +
    +
    +outdir : str or None
    +

    Directory to find data to be plotted. +If None, then data comes from the outdir attribute of the parent +ClawPlotData item.

    +
    + +
    +
    +plot_var : int or function
    +

    If an integer, then this specifies which component of q to plot (with +the Python convention that plot_var=0 corresponds to the first +component).

    +

    If a function, then this function is applied to q on each patch to +compute the variable var that is plotted. The signature is

    +
      +
    • var = plot_var(current_data)

    • +
    +

    The current_data object holds data from the current frame that can be +used to compute the variable to be plotted.

    +
    + +
    +
    +afteritem : str or function or None
    +

    A string or function that is to be executed after plotting this item. +If a string, this string is executed using exec. If a +function, it should be defined to have a single argument +current_data.

    +

    For example:

    +
    def afteritem(current_data):
    +
    +
    +
    + +
    +
    +afterpatch : str or function or None
    +

    A string or function that is to be executed after plotting this item on +each patch. (There may be more than 1 patch in an AMR calculation.) +If a string, this string is executed using exec. If a +function, it should be defined to have a single argument +“data”, [documentation to appear!]

    +

    For example:

    +
    def afterpatch(current_data):
    +    cd = current_data
    +    print "On patch number %s, xlower = %s, ylower = %s" \
    +          % (cd.patchno, cd.xlower, cd.ylower)
    +
    +
    +

    would print out the patch number and lower left corner for each patch in +a 2d computation after the patch is plotted.

    +
    + +
    +
    +MappedGrid : bool
    +

    If True, the mapping specified by the mapc2p attribute of the +underlying ClawPlotData object should be applied to the patch before +plotting.

    +
    + +
    +
    +show : bool
    +

    If False, plotting of this object is suppressed.

    +
    + +

    The other attributes required depend on the plot_type, as summarized +below:

    +
    +

    Special attributes for all 1d plots, plot_type = ‘1d…’

    +
    +
    +plotstyle : str
    +

    Anything that is valid as a fmt +group in the matplotlib plot command. +For example:

    +
      +
    • ‘-’ for a solid line, ‘- -’ for a dashed line,

    • +
    • ‘o’ for circles, ‘x’ for x’s, ‘-o’ for circles and a line,

    • +
    • ‘bo’ for blue circles (though if the color attribute is also set +that will overrule the color in the format string).

    • +
    +
    + +
    +
    +color : str
    +

    Any matplotlib color, for example red can be specified as ‘r’ or ‘red’ +or ‘[1,0,0]’ or ‘#ff0000’.

    +
    + +
    +
    +

    Special attributes for plot_type = ‘1d_plot’

    +

    No extra attributes.

    +
    +
    +

    Special attributes for plot_type = ‘1d_fill_between’

    +

    This gives a filled polygon between two curves using the matplotlib +fill_between command.

    +
    +
    +plot_var : int or function
    +

    as described above defines one curve,

    +
    + +
    +
    +plot_var2 : int or function
    +

    defines the second curve for the fill_between command. +Default is the zero function.

    +
    + +
    +
    +fill_where : str or None
    +
    +

    defines the where attribute of the fill_between command.

    +
    +

    Example:

    +
    plotitem = plotaxes.new_plotitem(plot_type='1d_fill_between')
    +plotitem.plot_var = 0    # means use q[:,0]
    +
    +
    +

    would produce a filled curve between y=q[:,0] and y=0.

    +

    Example:

    +
    plotitem = plotaxes.new_plotitem(plot_type='1d_fill_between')
    +plotitem.plot_var = 0    # means use q[:,0]
    +plotitem.plot_var2 = 1
    +
    +
    +

    would produce a filled curve between y=q[:,0] and y=q[:,1].

    +
    + +
    +
    +

    Special attributes for plot_type = ‘1d_from_2d_data’

    +
    +
    +map_2d_to_1d : function
    +

    Example: In a 2d computation where the solution q[:,:,0] should be +radially symmetric about (x,y)=(0,0), the following will result in a +scatter plot of the cell values q[i,j,0] vs. the radius r(i,j):

    +
    def q0_vs_radius(current_data):
    +    # convert 2d (x,y,q) into (r,q) for scatter plot
    +    from numpy import sqrt
    +    x = current_data.x
    +    y = current_data.y
    +    r = sqrt(x**2 + y**2)
    +    q0 = current_data.var   # the variable specified by plot_var
    +    # q0 = current_data.q[:,:,0]   # would also work
    +    return r,q0
    +
    +plotitem = plotaxes.new_plotitem(plot_type='1d_from_2d_data')
    +plotitem.plot_var = 0     # use q[:,:,0]
    +plotitem.plotstyle = 'o'  # symbol not line is best for scatter plot
    +plotitem.map_2d_to_1d = q0_vs_radius   # the function defined above
    +
    +
    +

    See current_data for a description of the current_data argument.

    +
    + +
    +
    +

    Special attributes for all 2d plots, plot_type = ‘2d…’

    +
    +
    +celledges_show : bool
    +

    If True, draw the cell edges on the plot. +The attribute ‘amr_celledges_show’ should be used for AMR computations +to specify that cell edges should be shown on some levels and not +others. See AMR Attributes.

    +
    + +
    +
    +patchedges_show : bool
    +

    If True, draw the edges of patches, mostly useful in AMR computations.

    +
    + +
    +
    +

    Special attributes for plot_type = ‘2d_contour’

    +
    +
    +contour_levels : numpy array or None
    +

    If a numpy array, the contour levels. If None, then the next three +attributes are used to set the levels.

    +
    + +
    +
    +contour_nlevels : int
    +

    Number of contour levels

    +
    + +
    +
    +contour_min : float
    +

    Minimum contour level

    +
    + +
    +
    +contour_max : float
    +

    Maximum contour level

    +
    + +
    +
    +contour_colors : color specification
    +

    Colors of contour lines. Can be a single color such as ‘b’ or +‘#0000ff’, or a colormap.

    +
    + +
    +
    +amr_contour_colors : list of color specifications
    +

    As with other attributes (see AMR Attributes below), +instead of contour_colors you can specify +amr_contour_colors +to be a list of colors (or colormaps) to use on each AMR level, e.g.:

    +
    amr_contour_colors = ['k','b','r']
    +
    +
    +

    to use black lines on Level 1, blue on Level 2, and red for all +subsequent levels. This is useful since with the matplotlib contour +plotter you will see both fine and coarse cell edges on top of one +another in refined regions (Matplotlib lacks the required +hidden line removal to blank out the lines from coarser patches easily. +See also the next attributes.)

    +
    + +
    +
    +contour_show : boolean
    +

    Show the contour lines only if this attribute is true. This is most +commonly used in the form of the next attribute,

    +
    + +
    +
    +amr_contour_show : list or tuple of booleans
    +

    Determines whether to show the contour lines on each AMR level. Useful +if you only want to view the lines on the finest patches.

    +
    + +
    +
    +contour_kwargs : dictionary
    +

    Other keyword arguments for the contour command.

    +
    + +
    +
    +

    Special attributes for plot_type = ‘2d_pcolor’

    +
    +
    +pcolor_cmap : matplotlib colormap
    +
    + +
    +
    +pcolor_cmin : float
    +
    + +
    +
    +pcolor_cmax : float
    +

    In general you should specify pcolor_cmin and pcolor_cmax to +specify the range of q values over which the colormap applies. If they +are not specified they will be chosen automatically and may vary from +frame to frame. Also, if AMR is used, they may vary from patch to patch, +yielding very confusing plots.

    +
    + +
    +
    +add_colorbar : bool
    +

    If True, a colorbar is added to the plot.

    +
    + +
    +
    +

    Special attributes for plot_type = ‘2d_imshow’

    +
    +
    +imshow_cmap : matplotlib colormap
    +
    + +
    +
    +imshow_cmin : float
    +
    + +
    +
    +imshow_cmax : float
    +

    In general you should specify imshow_cmin and imshow_cmax to +specify the range of q values over which the colormap applies. If they +are not specified they will be chosen automatically and may vary from +frame to frame. Also, if AMR is used, they may vary from patch to patch, +yielding very confusing plots.

    +
    + +
    +
    +add_colorbar : bool
    +

    If True, a colorbar is added to the plot.

    +
    + +
    +
    +

    Special attributes for plot_type = ‘2d_hillshade’

    +
    +
    +hillshade_vertical_exaggeration : float
    +

    Vertical exaggeration for hillshade calulation. Default of 1.

    +
    + +
    +
    +hillshade_azimuth_degree : float
    +

    Light source azimuth angle for hillshade calculation. Default +is 315 (light coming from the northwest). Valid values are +0-360 degrees clockwise from North. The default value is recommended +for proper interpretation by most people.

    +
    + +
    +
    +hillshade_altitude_degree : float
    +

    Light source altitude angle from the horizon for hillshade +calculation. Default is 45. Valid values are 0-90.

    +
    + +
    +
    +hillshade_latlon : bool
    +

    If True, correct the ratio between x and y units and z units +by 1/111200 to reflect that x and y units are degrees. +Default is False.

    +
    + +
    +
    +
    +

    AMR Attributes

    +

    Many attributes listed above also have a second related attribute with the +same name pre-pended with amr_. If this attribute is set, it should be a +list whose elements are of the type specified by the original name, and the +elements of the list will be used for different AMR refinement levels.

    +

    For example, the following commands:

    +
    plotitem = plotaxes.new_plotitem(plot_type='2d_contour')
    +plotitem.contour_color = 'r'
    +
    +
    +

    will result in all contour lines being red on all levels of AMR. On the +other hand:

    +
    plotitem = plotaxes.new_plotitem(plot_type='2d_contour')
    +plotitem.amr_contour_color = ['k', 'b']
    +
    +
    +

    will result in contour lines on patches at level 1 being black and on +patches of level 2 or higher being blue.

    +

    Note that if the list is shorter than the number of levels, the last element +is used repeatedly.

    +

    If both attributes contour_color and amr_contour_color are set, +only amr_contour_color is used.

    +

    A common use is to show cell edges only on coarse levels, not on finer +levels, e.g.:

    +
    plotitem.amr_celledges_show = [1,1,0]
    +
    +
    +

    will result in celledges being shown only on levels 1 and 2, not on finer +levels.

    +
    +
    +

    Colorbar attributes

    +

    If add_colorbar == True, then the following attributes are also used +(see the matplotlib colorbar documentation +for descriptions and note that other kwargs can also be specified in a +dictionary):

    +
    +
    +colorbar_shrink : float
    +
    + +
    +
    +colorbar_label : str
    +
    + +
    +
    +colorbar_ticks : str
    +
    + +
    +
    +colorbar_tick_labels : str
    +
    + +
    +
    +colorbar_extend : str
    +
    + +
    +
    +colorbar_kwargs : dictionary
    +

    Other kwargs to be passed to colorbar.

    +
    + +
    +
    +

    Methods

    +
    +
    +getframe(frameno)
    +

    Returns an object of class pyclaw.solution.Solution +containing the solution being +plotted by this object for frame number frameno.

    +
    + +
    +
    +gethandle()
    +

    Returns the handle for this item.

    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/README.md b/v5.10.x/README.md new file mode 100644 index 0000000000..d4efbb6167 --- /dev/null +++ b/v5.10.x/README.md @@ -0,0 +1,16 @@ + +Any files in this repository will show up at http://clawpack.github.io/ +once they have been pushed to GitHub. + +All files in this directory should be copied from + clawpack/doc/doc/_build/html +after doing "make html" in clawpack/doc/doc + +Files that are in this repository that are not built directly by Sphinx +have been added by putting them in + clawpack/doc/doc/extra_files +from which they are automatically copied by Sphinx to + clawpack/doc/doc/_build/html + + + diff --git a/v5.10.x/_images/Claw-Dev2010.jpg b/v5.10.x/_images/Claw-Dev2010.jpg new file mode 100644 index 0000000000..3f15cd4aa0 Binary files /dev/null and b/v5.10.x/_images/Claw-Dev2010.jpg differ diff --git a/v5.10.x/_images/Claw-Dev2011.jpg b/v5.10.x/_images/Claw-Dev2011.jpg new file mode 100644 index 0000000000..1481f60d17 Binary files /dev/null and b/v5.10.x/_images/Claw-Dev2011.jpg differ diff --git a/v5.10.x/_images/Claw-Dev2013a.jpg b/v5.10.x/_images/Claw-Dev2013a.jpg new file mode 100644 index 0000000000..148af8b218 Binary files /dev/null and b/v5.10.x/_images/Claw-Dev2013a.jpg differ diff --git a/v5.10.x/_images/Claw-Dev2013b.jpg b/v5.10.x/_images/Claw-Dev2013b.jpg new file mode 100644 index 0000000000..017fa4f3e5 Binary files /dev/null and b/v5.10.x/_images/Claw-Dev2013b.jpg differ diff --git a/v5.10.x/_images/Claw-Dev2016.jpg b/v5.10.x/_images/Claw-Dev2016.jpg new file mode 100644 index 0000000000..1431a7e57e Binary files /dev/null and b/v5.10.x/_images/Claw-Dev2016.jpg differ diff --git a/v5.10.x/_images/GE_Chile.png b/v5.10.x/_images/GE_Chile.png new file mode 100644 index 0000000000..a2bd33f2ad Binary files /dev/null and b/v5.10.x/_images/GE_Chile.png differ diff --git a/v5.10.x/_images/GE_aliased.png b/v5.10.x/_images/GE_aliased.png new file mode 100644 index 0000000000..c7fde50f90 Binary files /dev/null and b/v5.10.x/_images/GE_aliased.png differ diff --git a/v5.10.x/_images/GE_nonaliased.png b/v5.10.x/_images/GE_nonaliased.png new file mode 100644 index 0000000000..5c79d3cc5d Binary files /dev/null and b/v5.10.x/_images/GE_nonaliased.png differ diff --git a/v5.10.x/_images/GE_screenshot.png b/v5.10.x/_images/GE_screenshot.png new file mode 100644 index 0000000000..2d62b3f7f5 Binary files /dev/null and b/v5.10.x/_images/GE_screenshot.png differ diff --git a/v5.10.x/_images/HPC3-2012-group-photo.jpg b/v5.10.x/_images/HPC3-2012-group-photo.jpg new file mode 100644 index 0000000000..37434be820 Binary files /dev/null and b/v5.10.x/_images/HPC3-2012-group-photo.jpg differ diff --git a/v5.10.x/_images/HPC3-2014-group-photo.jpg b/v5.10.x/_images/HPC3-2014-group-photo.jpg new file mode 100644 index 0000000000..1f3995267b Binary files /dev/null and b/v5.10.x/_images/HPC3-2014-group-photo.jpg differ diff --git a/v5.10.x/_images/RuledRectangles_10_1.png b/v5.10.x/_images/RuledRectangles_10_1.png new file mode 100644 index 0000000000..a8869f1eb2 Binary files /dev/null and b/v5.10.x/_images/RuledRectangles_10_1.png differ diff --git a/v5.10.x/_images/RuledRectangles_12_1.png b/v5.10.x/_images/RuledRectangles_12_1.png new file mode 100644 index 0000000000..ed95453690 Binary files /dev/null and b/v5.10.x/_images/RuledRectangles_12_1.png differ diff --git a/v5.10.x/_images/RuledRectangles_19_2.png b/v5.10.x/_images/RuledRectangles_19_2.png new file mode 100644 index 0000000000..c1f934a9a8 Binary files /dev/null and b/v5.10.x/_images/RuledRectangles_19_2.png differ diff --git a/v5.10.x/_images/RuledRectangles_23_1.png b/v5.10.x/_images/RuledRectangles_23_1.png new file mode 100644 index 0000000000..14275647d4 Binary files /dev/null and b/v5.10.x/_images/RuledRectangles_23_1.png differ diff --git a/v5.10.x/_images/RuledRectangles_32_0.png b/v5.10.x/_images/RuledRectangles_32_0.png new file mode 100644 index 0000000000..db39251553 Binary files /dev/null and b/v5.10.x/_images/RuledRectangles_32_0.png differ diff --git a/v5.10.x/_images/RuledRectangles_37_0.png b/v5.10.x/_images/RuledRectangles_37_0.png new file mode 100644 index 0000000000..a34e4d1426 Binary files /dev/null and b/v5.10.x/_images/RuledRectangles_37_0.png differ diff --git a/v5.10.x/_images/RuledRectangles_39_1.png b/v5.10.x/_images/RuledRectangles_39_1.png new file mode 100644 index 0000000000..55cc20a49b Binary files /dev/null and b/v5.10.x/_images/RuledRectangles_39_1.png differ diff --git a/v5.10.x/_images/RuledRectangles_42_1.png b/v5.10.x/_images/RuledRectangles_42_1.png new file mode 100644 index 0000000000..a47fe064b6 Binary files /dev/null and b/v5.10.x/_images/RuledRectangles_42_1.png differ diff --git a/v5.10.x/_images/RuledRectangles_44_1.png b/v5.10.x/_images/RuledRectangles_44_1.png new file mode 100644 index 0000000000..bfdec88b53 Binary files /dev/null and b/v5.10.x/_images/RuledRectangles_44_1.png differ diff --git a/v5.10.x/_images/RuledRectangles_46_1.png b/v5.10.x/_images/RuledRectangles_46_1.png new file mode 100644 index 0000000000..807d04ed72 Binary files /dev/null and b/v5.10.x/_images/RuledRectangles_46_1.png differ diff --git a/v5.10.x/_images/RuledRectangles_48_1.png b/v5.10.x/_images/RuledRectangles_48_1.png new file mode 100644 index 0000000000..fd6f274dda Binary files /dev/null and b/v5.10.x/_images/RuledRectangles_48_1.png differ diff --git a/v5.10.x/_images/RuledRectangles_50_0.png b/v5.10.x/_images/RuledRectangles_50_0.png new file mode 100644 index 0000000000..9bc22c225b Binary files /dev/null and b/v5.10.x/_images/RuledRectangles_50_0.png differ diff --git a/v5.10.x/_images/aws1.png b/v5.10.x/_images/aws1.png new file mode 100644 index 0000000000..9e7832c366 Binary files /dev/null and b/v5.10.x/_images/aws1.png differ diff --git a/v5.10.x/_images/aws2.png b/v5.10.x/_images/aws2.png new file mode 100644 index 0000000000..a01199692f Binary files /dev/null and b/v5.10.x/_images/aws2.png differ diff --git a/v5.10.x/_images/aws3.png b/v5.10.x/_images/aws3.png new file mode 100644 index 0000000000..a09e782644 Binary files /dev/null and b/v5.10.x/_images/aws3.png differ diff --git a/v5.10.x/_images/aws4.png b/v5.10.x/_images/aws4.png new file mode 100644 index 0000000000..137490c150 Binary files /dev/null and b/v5.10.x/_images/aws4.png differ diff --git a/v5.10.x/_images/aws5.png b/v5.10.x/_images/aws5.png new file mode 100644 index 0000000000..efcc2b0b31 Binary files /dev/null and b/v5.10.x/_images/aws5.png differ diff --git a/v5.10.x/_images/aws6.png b/v5.10.x/_images/aws6.png new file mode 100644 index 0000000000..bf8b7c34b0 Binary files /dev/null and b/v5.10.x/_images/aws6.png differ diff --git a/v5.10.x/_images/cake3.jpg b/v5.10.x/_images/cake3.jpg new file mode 100644 index 0000000000..6652e43214 Binary files /dev/null and b/v5.10.x/_images/cake3.jpg differ diff --git a/v5.10.x/_images/claw-dev-group-2015.jpg b/v5.10.x/_images/claw-dev-group-2015.jpg new file mode 100644 index 0000000000..f22b794a05 Binary files /dev/null and b/v5.10.x/_images/claw-dev-group-2015.jpg differ diff --git a/v5.10.x/_images/domain_structure_1.png b/v5.10.x/_images/domain_structure_1.png new file mode 100644 index 0000000000..48d1a9dae7 Binary files /dev/null and b/v5.10.x/_images/domain_structure_1.png differ diff --git a/v5.10.x/_images/domain_structure_2.png b/v5.10.x/_images/domain_structure_2.png new file mode 100644 index 0000000000..68753535af Binary files /dev/null and b/v5.10.x/_images/domain_structure_2.png differ diff --git a/v5.10.x/_images/domain_structure_3.png b/v5.10.x/_images/domain_structure_3.png new file mode 100644 index 0000000000..63184ba8c0 Binary files /dev/null and b/v5.10.x/_images/domain_structure_3.png differ diff --git a/v5.10.x/_images/domain_structure_5.png b/v5.10.x/_images/domain_structure_5.png new file mode 100644 index 0000000000..fc1342aad6 Binary files /dev/null and b/v5.10.x/_images/domain_structure_5.png differ diff --git a/v5.10.x/_images/output_11_0.png b/v5.10.x/_images/output_11_0.png new file mode 100644 index 0000000000..170bb7e779 Binary files /dev/null and b/v5.10.x/_images/output_11_0.png differ diff --git a/v5.10.x/_images/output_13_0.png b/v5.10.x/_images/output_13_0.png new file mode 100644 index 0000000000..f320f0800b Binary files /dev/null and b/v5.10.x/_images/output_13_0.png differ diff --git a/v5.10.x/_images/output_13_01.png b/v5.10.x/_images/output_13_01.png new file mode 100644 index 0000000000..3e64c322dc Binary files /dev/null and b/v5.10.x/_images/output_13_01.png differ diff --git a/v5.10.x/_images/output_15_2.png b/v5.10.x/_images/output_15_2.png new file mode 100644 index 0000000000..1addc4b25e Binary files /dev/null and b/v5.10.x/_images/output_15_2.png differ diff --git a/v5.10.x/_images/output_16_0.png b/v5.10.x/_images/output_16_0.png new file mode 100644 index 0000000000..f320f0800b Binary files /dev/null and b/v5.10.x/_images/output_16_0.png differ diff --git a/v5.10.x/_images/output_17_0.png b/v5.10.x/_images/output_17_0.png new file mode 100644 index 0000000000..a28c128fec Binary files /dev/null and b/v5.10.x/_images/output_17_0.png differ diff --git a/v5.10.x/_images/output_22_0.png b/v5.10.x/_images/output_22_0.png new file mode 100644 index 0000000000..693d0e84ad Binary files /dev/null and b/v5.10.x/_images/output_22_0.png differ diff --git a/v5.10.x/_images/output_23_1.png b/v5.10.x/_images/output_23_1.png new file mode 100644 index 0000000000..054badf207 Binary files /dev/null and b/v5.10.x/_images/output_23_1.png differ diff --git a/v5.10.x/_images/output_25_1.png b/v5.10.x/_images/output_25_1.png new file mode 100644 index 0000000000..aa952538cf Binary files /dev/null and b/v5.10.x/_images/output_25_1.png differ diff --git a/v5.10.x/_images/output_27_0.png b/v5.10.x/_images/output_27_0.png new file mode 100644 index 0000000000..f8f17b9328 Binary files /dev/null and b/v5.10.x/_images/output_27_0.png differ diff --git a/v5.10.x/_images/output_30_0.png b/v5.10.x/_images/output_30_0.png new file mode 100644 index 0000000000..f026c47ae0 Binary files /dev/null and b/v5.10.x/_images/output_30_0.png differ diff --git a/v5.10.x/_images/output_34_0.png b/v5.10.x/_images/output_34_0.png new file mode 100644 index 0000000000..da8864ea0a Binary files /dev/null and b/v5.10.x/_images/output_34_0.png differ diff --git a/v5.10.x/_images/output_37_0.png b/v5.10.x/_images/output_37_0.png new file mode 100644 index 0000000000..0e1830d1f1 Binary files /dev/null and b/v5.10.x/_images/output_37_0.png differ diff --git a/v5.10.x/_images/output_42_2.png b/v5.10.x/_images/output_42_2.png new file mode 100644 index 0000000000..42090dab88 Binary files /dev/null and b/v5.10.x/_images/output_42_2.png differ diff --git a/v5.10.x/_images/output_46_1.png b/v5.10.x/_images/output_46_1.png new file mode 100644 index 0000000000..1addc4b25e Binary files /dev/null and b/v5.10.x/_images/output_46_1.png differ diff --git a/v5.10.x/_images/output_9_0.png b/v5.10.x/_images/output_9_0.png new file mode 100644 index 0000000000..3e64c322dc Binary files /dev/null and b/v5.10.x/_images/output_9_0.png differ diff --git a/v5.10.x/_images/output_9_01.png b/v5.10.x/_images/output_9_01.png new file mode 100644 index 0000000000..65dbea6f8b Binary files /dev/null and b/v5.10.x/_images/output_9_01.png differ diff --git a/v5.10.x/_images/pyclaw_architecture_flow.png b/v5.10.x/_images/pyclaw_architecture_flow.png new file mode 100644 index 0000000000..1cfed098e5 Binary files /dev/null and b/v5.10.x/_images/pyclaw_architecture_flow.png differ diff --git a/v5.10.x/_images/pyclaw_solution_structure.png b/v5.10.x/_images/pyclaw_solution_structure.png new file mode 100644 index 0000000000..7bb5379fcc Binary files /dev/null and b/v5.10.x/_images/pyclaw_solution_structure.png differ diff --git a/v5.10.x/_images/qlqr.gif b/v5.10.x/_images/qlqr.gif new file mode 100644 index 0000000000..dacc68410d Binary files /dev/null and b/v5.10.x/_images/qlqr.gif differ diff --git a/v5.10.x/_sources/ClawPlotAxes.rst.txt b/v5.10.x/_sources/ClawPlotAxes.rst.txt new file mode 100644 index 0000000000..4c8466053f --- /dev/null +++ b/v5.10.x/_sources/ClawPlotAxes.rst.txt @@ -0,0 +1,265 @@ + +.. _ClawPlotAxes: + +************************************** +ClawPlotAxes +************************************** + + +For usage see :ref:`setplot` and :ref:`plotexamples`. + +Objects of this class are usually created by the new_plotaxes method of a +:ref:`ClawPlotFigure` object. + +.. seealso:: :ref:`setplot` and :ref:`plotexamples` + +.. class:: ClawPlotAxes + + +Attributes +========== + + The following attributes can be set by the user: + + .. attribute:: name : str + + .. attribute:: axescmd : str + + The command to be used to create this axes, for example: + * "subplot(1,1,1)" for a single axes filling the figure + * "subplot(2,1,1)" for the top half + * "axes([0.1, 0.1, 0.2, 0.8])" for a tall skinny axis. + + See the matplotlib documentation for axes. + + .. attribute:: show : bool + + If False, suppress showing this axes and all items on it. + + .. attribute:: title : str + + The title to appear at the top of the axis. Defaults to string + specified by the *name* attribute. + + **New in v5.9.1:** + + Note that the title can now include the string `h:m:s` or `d:h:m:s` + as described further below for the case `title_with_t == True`. + + .. attribute:: title_fontsize : float + + Fontsize for title + + .. attribute:: title_kwargs : str + + Any other kwargs to be passed to plt.title(), e.g. `'color'` + + .. attribute:: title_with_t : bool + + If True, creates a title using a default format like:: + + `"%s at time t = %14.8e" % (title, t)` + + And rather than `%14.8e` for `t`, the default format uses `%14.8f` + if `0.001 <= t <= 1000`. + + A different format can be specified with the `title_t_format` attribute. + + **New in v5.9.1:** + + If the `title` attribute contains the string + `d:h:m:s` then the time is formatted as days:hours:minutes:seconds. + + Otherwise, if the `title` attribute contains the string + `h:m:s` then the time is formatted as hours:minutes:seconds. + + For example, you could specify:: + + plotaxes.title_with_t = True + plotaxes.title = 'Surface elevation at time h:m:s after earthquake' + + .. attribute:: title_t_format : str + + A format string used to format `t` in the title. If this is not + `None`, then this is used instead of the conventions mentioned above. + + Internally it formats using:: + + t_str = plotaxes.title_t_format % t + title_str = "%s at time t = %s" % (plotaxes.title,t_str) + plt.title(title_str, **plotaxes.title_kwargs) + + .. attribute:: xlimits : array [xmin, xmax] or 'auto' + + The x-axis limits if an array with two elements, or choose + automatically + + .. attribute:: ylimits : array [ymin, ymax] or 'auto' + + The y-axis limits if an array with two elements, or choose + automatically + + .. attribute:: xticks_fontsize : float + + Fontsize for xtick mark labels + + .. attribute:: xticks_kwargs : dictionary + + Other kwargs to be passed to `xticks` (e.g. locations) + + .. attribute:: xlabel : str + + Label for x-axis + + .. attribute:: xlabel_fontsize : str + + Fontsize for x-axis label + + .. attribute:: xlabel_kwargs : dictionary + + Other kwargs to be passed to `xlabel` (e.g. color) + + .. attribute:: yticks_fontsize : float + + Fontsize for ytick mark labels + + .. attribute:: yticks_kwargs : dictionary + + Other kwargs to be passed to `yticks` (e.g. locations) + + .. attribute:: ylabel : str + + Label for y-axis + + .. attribute:: ylabel_fontsize : str + + Fontsize for y-axis label + + .. attribute:: ylabel_kwargs : dictionary + + Other kwargs to be passed to `ylabel` (e.g. color) + + + .. attribute:: aspect : float + + Aspect ratio for plot, used internally in the command:: + + plt.gca().set_aspect(plotaxes.aspect) + + .. attribute:: aspect_latitude : float + + For plots in longitude-latitude coordinates, the latitude to use for + chosing the aspect ratio so that distances in meters are the same + in x and y at this latitude. (For plots covering a broad range of + latitudes, the the latitude near the middle or near the location of + most interest is generally most appropriate. + + This value is used internally in the command:: + + plt.gca().set_aspect(1./np.cos(plotaxes.aspect_latitude \ + * np.pi/180)) + + .. attribute:: useOffset : boolean + + If `True`, then tick marks may be labeled with an offset from some + common value that is printed at the corner. Often it is nicer to see + the full value at each tick mark, for which this should be set to `False`. + + Internally the command:: + + plt.ticklabel_format(useOffset = plotaxes.useOffset) + + is issued if `useOffset is not None`. + + .. attribute:: grid : boolean + + If `True` then internally the command:: + + plt.grid(**plotaxes.grid_kwargs) + + is issued to add grid lines to the plot. + + .. attribute:: grid_kwargs : dictionary + + Any kwargs to be passed to `plt.grid`, e.g. `'color'` or `'linewidth'`. + + .. attribute:: kwargs : dictionary + + Any other attributes to be passed to `axes` command. + + + .. attribute:: afteraxes : function or str + + A string or function that is to be executed after creating all + plot items on this axes. + If a string, this string is executed using *exec*. If a + function, it should be defined to have a single argument + :ref:`current_data`. + + The string version is useful for 1-liners such as:: + + afteraxes = "pylab.title('My custom title')" + + pylab commands can be used, since pylab has been imported into the + plotting module. + + The function form is better if you want to do several things, or if you + need access to the data stored in :ref:`current_data`. For example:: + + def afteraxes(current_data): + # add x- and y-axes to a 1d plot already created + from pylab import plot + + xlower = current_data.xlower + xupper = current_data.xupper + plot([xlower, xupper], [0.,0.], 'k') # x-axis + + # Get y limits from variable just plotted, which is + # available in current_data.var. + ymin = current_data.var.min() + ymax = current_data.var.max() + plot([0.,0.], [ymin,ymax], 'k') # y-axis + + + +Attributes for gauge plots +========================== + +The following attributes are primarily useful for gauge plots, where the +horizontal axis is time `t` rather than `x`, and are implemented in +`$CLAW/visclaw/src/python/visclaw/gaugetools.py`: + + .. attribute:: time_scale : float + + Scaling for time values, e.g. if `t` is in seconds but you want the + plot to show hours on the horizontal axis then set + `time_scale = 1/3600.`. + + .. attribute:: time_label : str + + Label for time axis (same as setting `xlabel`) + + .. attribute:: time_label_fontsize : float + + Fontsize for `xlabel` (time axis) + + .. attribute:: time_label_kwargs : dictionary + + Other kwargs to be passed to `xlabel` (e.g. color) + +Methods +======= + + .. method:: new_plotitem(name=None, plot_type) + + Returns an object of class :ref:`ClawPlotItem` associated with this axes. + A single axes may have several items associated with it. + + The name specified is used as a dictionary key. If None is provided, + one is generated automatically of the form ITEM1, etc. + + + .. method:: gethandle() + + Returns the handle for this axes. + diff --git a/v5.10.x/_sources/ClawPlotData.rst.txt b/v5.10.x/_sources/ClawPlotData.rst.txt new file mode 100644 index 0000000000..60a16aaabc --- /dev/null +++ b/v5.10.x/_sources/ClawPlotData.rst.txt @@ -0,0 +1,189 @@ + +.. _ClawPlotData: + +********************** +ClawPlotData +********************** + + +For usage see :ref:`plotting`, :ref:`setplot`, and :ref:`plotexamples`. + + +.. class:: ClawPlotData + + +Attributes +========== + + + .. attribute:: outdir : str + + Path to the directory where the Clawpack output is that is to be + plotted. + + .. attribute:: plotdir : str + + Path to the directory where hardcopy files of plots are to be put. + + .. attribute:: overwrite : bool + + Ok to overwrite old plotdir? Default is True + + + .. attribute:: afterframe : str or function + + Function or string to be executed after producing all plots for each + frame. If a string, this string is executed using *exec*. If a + function, it should be defined to have a single argument + "data", [documentation to appear!] For example:: + + def afterframe(data): + t = data.t + print "Done plotting at time %s" % t + + .. attribute:: beforeframe : str or function + + Function or string to be executed before starting to do plots for each + frame. If a function, it should be defined to have a single argument + "data", [documentation to appear!] :: + + def beforeframe(data): + + + .. attribute:: printfigs : bool + + True if plots are to be generated and printed (e.g. to png files) before + making html or latex files. + + False if the plots have already been generated and the existing versions + are to be used for making html or latex files. + + .. attribute:: print_format : str + + format for hardcopy, default is 'png' + + + .. attribute:: print_framenos : list of int's or 'all' + + which frames to print, default is 'all' + + .. attribute:: print_fignos : list of int's or 'all' + + which figures to print for each frame, default is 'all' + + .. attribute:: iplotclaw_fignos : list of int's or 'all' + + which figures to print for each frame in interactive mode, default is 'all' + + .. attribute:: latex : bool + + If True, create a latex file in directory plotdir that to + display all the plots. + + .. attribute:: latex_fname : str + + Name of latex file, default is 'plots'. The file created will be e.g. + plots.tex. + + .. attribute:: latex_title : str + + The title to go at the top of the latex file, default is "Clawpack Results" + + .. attribute:: latex_framesperpage : int or 'all' + + How many frames to try to put on each page. Default is 'all'. + + .. attribute:: latex_framesperline : int or 'all' + + How many frames to try to put on each line. Default is 'all'. + + .. attribute:: latex_figsperline : int or 'all' + + How many figures to try to put on each line. Default is 'all'. + Recall that several plots may be generated for each frame. + + .. attribute:: latex_pdf : bool + + If True, run pdflatex on the latex file to create e.g., plots.pdf. + + .. attribute:: html : bool + + If True, create a set of html files to display the plots and an index to + these files called _PlotIndex.html. These will be in the directory + specified by the plotdir attribute. + + + +Methods +======= + + .. method:: new_plotfigure(name, figno) + + Create and return a new object of class :ref:`ClawPlotFigure` associated with this + ClawPlotData object. + + .. method:: getframe(frameno, outdir=None) + + Return an object of class :ref:`ClawSolution` that contains the solution + read in from the fort.q000N file (where N is frameno). + + If outdir==None then the outdir attribute of this ClawPlotData + object is used as the directory to find the data. + + The data, once read in, is stored in a dictionary (the attribute + framesoln_dict of this ClawPlotData object). It is read from the fort.q + file only if it is not already in the dictionary. + + Note that frames read from different outdir's are stored separately (with + dictionary key (frameno, outdir) if outdir != None). + + .. method:: clearframes(framenos) + + Remove one or more frames from the dictionary framesoln_dict. + (Different outdir's not yet implemented.) + + .. method:: clearfigures() + + Clear all plot parameters. Useful as the first command in a `setplot` + function to make sure previous parameters are cleared if the file is + changed and the function is re-executed in an interactive session. + + + .. method:: iplotclaw() + + Return True if interactive plotting with iplotclaw is being done. + + .. method:: getfigure(figname) + + Return :ref:`ClawPlotFigure` object with the specified name. + + .. method:: getaxes(axesname, figname=None) + + Return :ref:`ClawPlotAxes` object with the specified name. + If figname==None then search over all figures and return None if + it is not found or the name is not unique. + + .. method:: getitem(itemname, axesname=None, figname=None) + + Return :ref:`ClawPlotItem` object with the specified name. + If axesname==None and/or figname==None + then search over all figures and/or axes and return None if + it is not found or the name is not unique. + + .. method:: showitems() + + Print a list of all the figures, axes, and items defined. + + .. method:: plotframe(frameno) + + Plot all figures for frame number frameno. Convenience method that + calls pyclaw.plotters.frametools.plotframe(). + + .. method:: printframes() + + Plot and print hardcopy for all frames. Convenience method that + calls pyclaw.plotters.frametools.printframes(). + + +.. note:: More methods still to be documented. + diff --git a/v5.10.x/_sources/ClawPlotFigure.rst.txt b/v5.10.x/_sources/ClawPlotFigure.rst.txt new file mode 100644 index 0000000000..ecfda37cf9 --- /dev/null +++ b/v5.10.x/_sources/ClawPlotFigure.rst.txt @@ -0,0 +1,83 @@ + +.. _ClawPlotFigure: + +*************** +ClawPlotFigure +*************** + + +For usage see :ref:`setplot` and :ref:`plotexamples`. + +Objects of this class are usually created by the new_plotfigure method of a +:ref:`ClawPlotData` object. + +.. class:: ClawPlotFigure + + +Attributes +========== + + The following attributes can be set by the user: + + .. attribute:: figno : int + + Figure number, by default the next unused number will be used (starting + at 1001). + This is usually set as an argument to the new_plotfigure function + of a :ref:`ClawPlotData` object + + + .. attribute:: figsize : tuple + + Figure size in (x,y) as in matplotlib. + + .. attribute:: facecolor : color + + Color for the background of the figure (behind the axes). + By default (if `facecolor is None`) the clawpack theme tan color is used. + + For plots to be included in publications you probably want to use + `'w'` for a white background instead. + + .. attribute:: kwargs : dictionary + + A dictionary of keyword arguments for the figure command. + For example:: + + "{'figsize':[12,5], 'facecolor':[1,0,0]}" + + would specify that the figure should be + 12 inches by 5 inches with a red background. + + For more options + see the `matplotlib documentation `_ + for the `figure command + `_. + + + + .. attribute:: clf_each_frame : bool + + If True, clear the figure with a clf command at the start of each frame. + + .. attribute:: show : bool + + If False, suppress showing this figure. + + + +Methods +======= + + .. method:: new_plotaxes(name=None) + + Create and return a new object of class :ref:`ClawPlotAxes` associated with this + ClawPlotFigure object. A single figure may have several axes on it. + + The name specified is used as a dictionary key. If None is provided, + one is generated automatically of the form AXES1, etc. + + .. method:: gethandle() + + Returns the handle for this figure. + diff --git a/v5.10.x/_sources/ClawPlotItem.rst.txt b/v5.10.x/_sources/ClawPlotItem.rst.txt new file mode 100644 index 0000000000..a7b082073a --- /dev/null +++ b/v5.10.x/_sources/ClawPlotItem.rst.txt @@ -0,0 +1,411 @@ +.. _ClawPlotItem: + +************ +ClawPlotItem +************ + + +For usage see :ref:`setplot` and :ref:`plotexamples`. + +Objects of this class are usually created by the new_plotitem method of a +:ref:`ClawPlotAxes` object. + +The examples shown below are fragments of a typical *setplot* +function which assume *plotaxes* is an instance of :ref:`ClawPlotAxes`. + +.. seealso:: :ref:`setplot` and :ref:`plotexamples` +.. seealso:: :ref:`plotexamples` + +.. class:: ClawPlotItem + +Attributes +========== + +The following attributes can be set by the user: + +.. attribute:: plot_type : str + + Type of plot desired, one of the following: + + * '1d_plot' : one dimensional line or set of points plotted using the + matplotlib plot command. + * '1d_from_2d_data' : 1d plot generated from 2d data, for example as a + slice of the data or a scatter plot of data that should be radially + symmetric, + * '1d_fill_between' : 1d filled plot between two variable specified by + the attributes *plot_var* and *fill_var2*. + * '2d_imshow' : two dimentional raster plot + * '2d_contour' : two dimensional contour plot, + * '2d_pcolor' : two dimensional pcolor plot, + * '2d_schlieren' : two dimensional Schlieren plot, + * '2d_patch' : two dimensional plot of only the cell and/or patch edges, no data + * '2d_hillshade' : two dimensional hillshade plot. + +.. attribute:: outdir : str or None + + Directory to find data to be plotted. + If None, then data comes from the outdir attribute of the parent + ClawPlotData item. + +.. attribute:: plot_var : int or function + + If an integer, then this specifies which component of q to plot (with + the Python convention that plot_var=0 corresponds to the first + component). + + If a function, then this function is applied to q on each patch to + compute the variable var that is plotted. The signature is + + * var = plot_var(current_data) + + The :ref:`current_data` object holds data from the current frame that can be + used to compute the variable to be plotted. + + +.. attribute:: afteritem : str or function or None + + A string or function that is to be executed after plotting this item. + If a string, this string is executed using *exec*. If a + function, it should be defined to have a single argument + :ref:`current_data`. + + For example:: + + def afteritem(current_data): + +.. attribute:: afterpatch : str or function or None + + A string or function that is to be executed after plotting this item on + each patch. (There may be more than 1 patch in an AMR calculation.) + If a string, this string is executed using *exec*. If a + function, it should be defined to have a single argument + "data", [documentation to appear!] + + For example:: + + def afterpatch(current_data): + cd = current_data + print "On patch number %s, xlower = %s, ylower = %s" \ + % (cd.patchno, cd.xlower, cd.ylower) + + would print out the patch number and lower left corner for each patch in + a 2d computation after the patch is plotted. + + + +.. attribute:: MappedGrid : bool + + If True, the mapping specified by the *mapc2p* attribute of the + underlying `ClawPlotData` object should be applied to the patch before + plotting. + + +.. attribute:: show : bool + + If False, plotting of this object is suppressed. + + + +**The other attributes required depend on the plot_type, as summarized +below:** + +Special attributes for all 1d plots, plot_type = '1d...' +---------------------------------------------------------- + +.. attribute:: plotstyle : str + + Anything that is valid as a fmt + group in the `matplotlib plot command + `_. + For example: + + * '-' for a solid line, '- -' for a dashed line, + * 'o' for circles, 'x' for x's, '-o' for circles and a line, + * 'bo' for blue circles (though if the *color* attribute is also set + that will overrule the color in the format string). + +.. attribute:: color : str + + Any matplotlib color, for example red can be specified as 'r' or 'red' + or '[1,0,0]' or '#ff0000'. + +Special attributes for plot_type = '1d_plot' +---------------------------------------------------------- + +No extra attributes. + +Special attributes for plot_type = '1d_fill_between' +---------------------------------------------------------- + +This gives a filled polygon between two curves using the `matplotlib +fill_between command `_. + +.. attribute:: plot_var : int or function + + as described above defines one curve, + + +.. attribute:: plot_var2 : int or function + + defines the second curve for the fill_between command. + Default is the zero function. + +.. attribute:: fill_where : str or None + + defines the *where* attribute of the fill_between command. + + Example:: + + plotitem = plotaxes.new_plotitem(plot_type='1d_fill_between') + plotitem.plot_var = 0 # means use q[:,0] + + would produce a filled curve between y=q[:,0] and y=0. + + Example:: + + plotitem = plotaxes.new_plotitem(plot_type='1d_fill_between') + plotitem.plot_var = 0 # means use q[:,0] + plotitem.plot_var2 = 1 + + would produce a filled curve between y=q[:,0] and y=q[:,1]. + +.. _1d_from_2d_data: + +Special attributes for plot_type = '1d_from_2d_data' +------------------------------------------------------ + +.. attribute:: map_2d_to_1d : function + + Example: In a 2d computation where the solution q[:,:,0] should be + radially symmetric about (x,y)=(0,0), the following will result in a + scatter plot of the cell values q[i,j,0] vs. the radius r(i,j):: + + def q0_vs_radius(current_data): + # convert 2d (x,y,q) into (r,q) for scatter plot + from numpy import sqrt + x = current_data.x + y = current_data.y + r = sqrt(x**2 + y**2) + q0 = current_data.var # the variable specified by plot_var + # q0 = current_data.q[:,:,0] # would also work + return r,q0 + + plotitem = plotaxes.new_plotitem(plot_type='1d_from_2d_data') + plotitem.plot_var = 0 # use q[:,:,0] + plotitem.plotstyle = 'o' # symbol not line is best for scatter plot + plotitem.map_2d_to_1d = q0_vs_radius # the function defined above + + See :ref:`current_data` for a description of the *current_data* argument. + + +Special attributes for all 2d plots, plot_type = '2d...' +------------------------------------------------------------ + +.. attribute:: celledges_show : bool + + If True, draw the cell edges on the plot. + The attribute 'amr_celledges_show' should be used for AMR computations + to specify that cell edges should be shown on some levels and not + others. See :ref:`amr_attributes`. + +.. attribute:: patchedges_show : bool + + If True, draw the edges of patches, mostly useful in AMR computations. + +Special attributes for plot_type = '2d_contour' +------------------------------------------------------ + +.. attribute:: contour_levels : numpy array or None + + If a numpy array, the contour levels. If None, then the next three + attributes are used to set the levels. + +.. attribute:: contour_nlevels : int + + Number of contour levels + +.. attribute:: contour_min : float + + Minimum contour level + +.. attribute:: contour_max : float + + Maximum contour level + +.. attribute:: contour_colors : color specification + + Colors of contour lines. Can be a single color such as 'b' or + '#0000ff', or a colormap. + +.. attribute:: amr_contour_colors : list of color specifications + + As with other attributes (see :ref:`amr_attributes` below), + instead of contour_colors you can specify + *amr_contour_colors* + to be a list of colors (or colormaps) to use on each AMR level, e.g.:: + + amr_contour_colors = ['k','b','r'] + + to use black lines on Level 1, blue on Level 2, and red for all + subsequent levels. This is useful since with the matplotlib contour + plotter you will see both fine and coarse cell edges on top of one + another in refined regions (Matplotlib lacks the required + hidden line removal to blank out the lines from coarser patches easily. + See also the next attributes.) + +.. attribute:: contour_show : boolean + + Show the contour lines only if this attribute is true. This is most + commonly used in the form of the next attribute, + + +.. attribute:: amr_contour_show : list or tuple of booleans + + Determines whether to show the contour lines on each AMR level. Useful + if you only want to view the lines on the finest patches. + + +.. attribute:: contour_kwargs : dictionary + + Other keyword arguments for the contour command. + +Special attributes for plot_type = '2d_pcolor' +------------------------------------------------- + +.. attribute:: pcolor_cmap : matplotlib colormap + +.. attribute:: pcolor_cmin : float + +.. attribute:: pcolor_cmax : float + + In general you should specify *pcolor_cmin* and *pcolor_cmax* to + specify the range of q values over which the colormap applies. If they + are not specified they will be chosen automatically and may vary from + frame to frame. Also, if AMR is used, they may vary from patch to patch, + yielding very confusing plots. + +.. attribute:: add_colorbar : bool + + If True, a colorbar is added to the plot. + +Special attributes for plot_type = '2d_imshow' +------------------------------------------------- + +.. attribute:: imshow_cmap : matplotlib colormap + +.. attribute:: imshow_cmin : float + +.. attribute:: imshow_cmax : float + + In general you should specify *imshow_cmin* and *imshow_cmax* to + specify the range of q values over which the colormap applies. If they + are not specified they will be chosen automatically and may vary from + frame to frame. Also, if AMR is used, they may vary from patch to patch, + yielding very confusing plots. + +.. attribute:: add_colorbar : bool + + If True, a colorbar is added to the plot. + +Special attributes for plot_type = '2d_hillshade' +------------------------------------------------- + +.. attribute:: hillshade_vertical_exaggeration : float + + Vertical exaggeration for hillshade calulation. Default of 1. + +.. attribute:: hillshade_azimuth_degree : float + + Light source azimuth angle for hillshade calculation. Default + is 315 (light coming from the northwest). Valid values are + 0-360 degrees clockwise from North. The default value is recommended + for proper interpretation by most people. + +.. attribute:: hillshade_altitude_degree : float + + Light source altitude angle from the horizon for hillshade + calculation. Default is 45. Valid values are 0-90. + +.. attribute:: hillshade_latlon : bool + + If True, correct the ratio between x and y units and z units + by 1/111200 to reflect that x and y units are degrees. + Default is False. + +.. _amr_attributes: + +AMR Attributes +============== + +Many attributes listed above also have a second related attribute with the +same name pre-pended with *amr_*. If this attribute is set, it should be a +list whose elements are of the type specified by the original name, and the +elements of the list will be used for different AMR refinement levels. + +For example, the following commands:: + + plotitem = plotaxes.new_plotitem(plot_type='2d_contour') + plotitem.contour_color = 'r' + +will result in all contour lines being red on all levels of AMR. On the +other hand:: + + plotitem = plotaxes.new_plotitem(plot_type='2d_contour') + plotitem.amr_contour_color = ['k', 'b'] + +will result in contour lines on patches at level 1 being black and on +patches of level 2 or higher being blue. + +Note that if the list is shorter than the number of levels, the last element +is used repeatedly. + +If both attributes *contour_color* and *amr_contour_color* are set, +only *amr_contour_color* is used. + +A common use is to show cell edges only on coarse levels, not on finer +levels, e.g.:: + + plotitem.amr_celledges_show = [1,1,0] + +will result in celledges being shown only on levels 1 and 2, not on finer +levels. + +Colorbar attributes +=================== + +If `add_colorbar == True`, then the following attributes are also used +(see the `matplotlib colorbar documentation +`_ +for descriptions and note that other kwargs can also be specified in a +dictionary): + +.. attribute:: colorbar_shrink : float + +.. attribute:: colorbar_label : str + +.. attribute:: colorbar_ticks : str + +.. attribute:: colorbar_tick_labels : str + +.. attribute:: colorbar_extend : str + +.. attribute:: colorbar_kwargs : dictionary + + Other kwargs to be passed to `colorbar`. + + + + +Methods +======= + +.. method:: getframe(frameno) + + Returns an object of class :ref:`Solution` + containing the solution being + plotted by this object for frame number frameno. + +.. method:: gethandle() + + Returns the handle for this item. + diff --git a/v5.10.x/_sources/about.rst.txt b/v5.10.x/_sources/about.rst.txt new file mode 100644 index 0000000000..ecaf8a1487 --- /dev/null +++ b/v5.10.x/_sources/about.rst.txt @@ -0,0 +1,229 @@ +.. _about: + +=================== +About this software +=================== + +Clawpack stands for "Conservation Laws Package" and was initially developed +for linear and nonlinear hyperbolic systems of conservation laws, with a +focus on implementing high-resolution Godunov type methods using limiters in +a general framework applicable to many applications. These finite volume +methods require a "Riemann solver" to resolve the jump discontinuity at the +interface between two grid cells into waves propagating into the neighboring +cells. The formulation used in Clawpack allows easy extension to +the solution of hyperbolic problems that are not in conservation form. + +See :ref:`wp_algorithms` for a brief description of the finite volume +methods used in Clawpack and :ref:`riemann` for a description of the +subroutine(s) needed to specify the hyperbolic equation being solved. + +Adaptive mesh refinement is included, see :ref:`amrclaw`, and routines +specialized to depth-averaged geophysical flows can be found in +:ref:`geoclaw`. + +The :ref:`pyclaw` software provides a more pythonic interface and +parallelism that scales to tens of thousands of cores. + +New users may wish to read :ref:`clawpack_packages` before starting. + +The "wave propagation" algorithms implemented in Clawpack are discribed in +detail in the book *Finite Volume Methods for Hyperbolic Problems* +[LeVeque-FVMHP]_. +Virtually all of the figures in this book were generated using Clawpack +(version 4.3). +See :ref:`fvmbook` for a list of available examples with pointers to the codes +and resulting plots. + +See the :ref:`biblio` for some pointers to papers describing Clawpack and +the algorithms used in more detail. + + + +License +------- + +Clawpack is distributed under the terms of the +Berkeley Software Distribution (BSD) license. + +See :ref:`license` for details. + +.. _authors: + +Authors +------- + +Many people have contributed to the development of Clawpack since its +inception in 1994. + +Major algorithmic and software design contributions have been made by the +following individuals: + +* Randall J. LeVeque, University of Washington, + `@rjleveque `_. + +* Marsha Berger, Courant Institute, NYU, + `@mjberger `_. + +* Jan Olav Langseth, Norwegian Defence Research Establishment. + +* David George, USGS Cascades Volcano Observatory, + `@dlgeorge `_. + +* David Ketcheson, KAUST + `@ketch `_. + +* Kyle Mandli, UT-Austin, + `@mandli `_. + +Other major contributors include: + +* Aron Ahmadia, + `@ahmadia `_. +* Amal Alghamdi, + `@amal-ghamdi `_. +* Ian Bolliger, + `@bolliger32 `_. +* Peter Blossey. +* Donna Calhoun, + `@donnaboise `_. +* Ondřej Čertík, + `@certik `_. +* Brisa Davis, + `@BrisaDavis `_. +* Grady Lemoine, + `@gradylemoine `_. +* Sorin Mitran. +* Matteo Parsani, + `@mparsani `_. +* Xinsheng Qin + `@xinshengqin `_. +* Avi Schwarzschild + `@aks2203 `_. +* Andy Terrel, + `@aterrel `_. +* Chris Vogl, + `@cjvogl `_. + + +Numerous students and other users have also contributed towards this software, +by finding bugs, suggesting improvements, and exploring its use on new +applications. Thank you! + +.. _citing: + +Citing this work +---------------- + +If you use Clawpack in publications, please cite the software itself as +well, with a citation similar to the following:: + + Clawpack Development Team (2020), Clawpack Version 5.7.1, + http://www.clawpack.org, doi: 10.5281/zenodo.4025432 + +Here's the bibtex:: + + @misc{clawpack, + title={Clawpack software}, + author={{Clawpack Development Team}}, + url={http://www.clawpack.org}, + note={Version 5.7.1}, + doi={https://doi.org/10.5281/zenodo.4025432}, + year={2020}} + +Please fill in the version number that you used, and its year, with the +appropriate DOI from `Zenodo `_, if available. +See :ref:`releases`. + +It is best to refer to the particular release used to obtain your results, +but if you need to refer to multiple past releases, +or to cite Clawpack more generally, you can also use the DOI +`10.17605/osf.io/kmw6h `__. + + +Also please cite the `recent article `_:: + + + Mandli, K.T., Ahmadia, A.J., Berger, M.J., Calhoun, D.A., George, D.L., + Hadjimichael, Y., Ketcheson, D.I., Lemoine, G.I., LeVeque, R.J., 2016. + Clawpack: building an open source ecosystem for solving hyperbolic PDEs. + PeerJ Computer Science. doi:10.7717/peerj-cs.68 + +Here's the bibtex:: + + @article{mandli2016clawpack, + title={Clawpack: building an open source ecosystem for solving hyperbolic PDEs}, + author={Mandli, Kyle T and Ahmadia, Aron J and Berger, Marsha and Calhoun, Donna + and George, David L and Hadjimichael, Yiannis and Ketcheson, David I + and Lemoine, Grady I and LeVeque, Randall J}, + journal={PeerJ Computer Science}, + volume={2}, + pages={e68}, + year={2016}, + publisher={PeerJ Inc.}, + doi={10.7717/peerj-cs.68} } + + + + +Please also cite at least one of the following regarding the algorithms used +in Clawpack (click the links for bibtex citations): + +* Classic algorithms in 1d and 2d: [LeVeque97]_, [LeVeque-FVMHP]_ + +* 3d classic algorithms: [LangsethLeVeque00]_ + +* AMR: [BergerLeVeque98]_ + +* f-wave algorithms: [BaleLevMitRoss02]_ + +* GeoClaw: [BergerGeorgeLeVequeMandli11]_, [LeVequeGeorgeBerger]_ + +* High-order method-of-lines algorithms (SharpClaw): [KetParLev13]_ + +* PyClaw: [KetchesonMandliEtAl]_ + + +.. _funding: + +Funding +------- + +Development of this software has been supported in part by + + * NSF Grants DMS-8657319, DMS-9204329, DMS-9303404, DMS-9505021, + DMS-96226645, DMS-9803442, DMS-0106511, CMS-0245206, DMS-0609661, + DMS-0914942, DMS-1216732, EAR-1331412, CMMI-1536198. + + * DOE Grants DE-FG06-93ER25181, DE-FG03-96ER25292, DE-FG02-88ER25053, + DE-FG02-92ER25139, DE-FG03-00ER2592, DE-FC02-01ER25474. + + * AFOSR grant F49620-94-0132. + + * NIH grant 5R01AR53652-2. + + * ONR grant N00014-09-1-0649. + + * The Norwegian Research Council (NFR) through the program no. 101039/420. + + * The Scientific Computing Division at the National Center for Atmospheric + Research (NCAR). + + * The Boeing Professorship and the Founders Term Professorship in the + Department of Applied Mathematics, University of Washington. + + * University of Washington CoMotion Fellowship. + + * Grants from King Abdullah University of Science and Technology (KAUST). + + * Contracts from Washington State Emergency Management Division, with + funding from the National Tsunami Hazard Mitigation Program. + + * Contracts from the NASA Asteroid Threat Assessment Project, Planetary + Defense Coordination Office. + +Any opinions, findings, and conclusions or recommendations expressed in this +material are those of the author(s) and do not necessarily reflect the views +of these agencies. + + + diff --git a/v5.10.x/_sources/adjoint.rst.txt b/v5.10.x/_sources/adjoint.rst.txt new file mode 100644 index 0000000000..e8c5b569b7 --- /dev/null +++ b/v5.10.x/_sources/adjoint.rst.txt @@ -0,0 +1,196 @@ +:orphan: + +.. _adjoint: + +************************************** +Guiding AMR with adjoint flagging +************************************** + +A new approach to flagging cells for refinement was introduced in Clawpack +5.6.0 -- using the solution to an adjoint problem to determine what cells in +the forward solution should be refined because these cells may have an impact +on the some specified functional of interest. This approach currently only +works for autonomous linear problems, in which case the adjoint problem needs +to be solved only once, and shifted versions of the adjoint solution can be +used at any time that flagging is performed. The adjoint problem is solved +first and snapshots of the adjoint are saved. These are read in at the start +of the forward solution, and space-time interpolation used as needed at each +regridding time. + +The general approach is described in: + +- [DavisLeVeque2018]_ +- [Davis2018]_ + +See :ref:`adjoint_geoclaw` for discussion of the GeoClaw version. + +Adjoint flagging is appropriate when you are not interested in computing an +accurate solution over the entire space-time domain, but rather are +interested only in some linear functional applied to the solution at each +time (or at a single time, or range of times). +In one space dimension this functional has the form + +.. math:: + J(t) = \int_a^b \phi(x)^T q(x,t)\,dx + +where :math:`a\leq x \leq b` is the full computational domain and +:math:`\phi(x)` is specified by the user as initial data for the +adjoint problem that is solved backward in time. For example, if the +solution is of interest only over a small range of :math:`x` values, say +:math:`x_1 \leq x \leq x_2`, then :math:`\phi(x)` +might be a box function with value 1 in this interval and 0 elsewhere, or +:math:`\phi(x)` could be a sharply peaked Gaussian about one location of +interest. + +In order to calculate an accurate solution near the location of interest at +the final time :math:`T` it may be necessary to refine the solution at other +places at earlier times. The adjoint helps to identify where refinement is +needed. The adjoint equation is first solved backward in time from the final +time :math:`T` with initial data :math:`\hat q(x,T) = \phi(x)` given by the +functional. The waves propagating backward from time :math:`T` to some +regridding time :math:`t_r` in the adjoint solution identify which +waves in the forward solution at time :math:`t_r` will reach the location of +interest at time :math:`T`. + +Some examples for AMRClaw are available in + +- `$CLAW/amrclaw/examples/acoustics_1d_adjoint` +- `$CLAW/amrclaw/examples/acoustics_2d_adjoint` + +In each case the main directory has a subdirectory named `adjoint` +that contains the code that must be run first in order to compute and save +snapshots of the adjoint solution. + +The `adjoint/Makefile` must point to an appropriate Riemann solver for the adjoint +problem, which is a linear hyperbolic PDE with coefficient matrices that are +transposes of the coefficient matrices appearing in the forward problem. + +For variable-coefficient problems it is important to note that if the forward +problem is in conservation form then the adjoint is not, and vice versa. For +example, in one space dimension, if the forward problem is +:math:`q_t + A(x)q_x = 0`, then the adjoint is +:math:`\hat q_t + (A(x)^T \hat q)_x = 0`. On the other hand if the +forward problem is +:math:`q_t + (A(x)q)_x = 0`, then the adjoint is +:math:`\hat q_t + A(x)^T \hat q_x = 0`. + +Note that the eigenvalues of :math:`A` are unchanged upon transforming but +the left eigenvectors of :math:`A` are now the right eigenvectors of +:math:`A^T`, and these must be used in the adjoint Riemann solver. +See for example `$CLAW/riemann/src/rp1_acoustics_variable_adjoint.f90`, used +for the example in `$CLAW/amrclaw/examples/acoustics_1d_adjoint/adjoint`. + +Boundary conditions conditions may also need to be adjusted in going from the +forward to adjoint equation. The guiding principle is that boundary +conditions must vanish during the integration by parts that is used to define +the adjoint PDE, as described in more detail in the references. + +The functional of interest is defined in the `adjoint/qinit.f` file that +specifies "initial" conditions for the adjoint problem. + +The `adjoint/setrun.py` file specifies the final time :math:`T` (as +`clawdata.tfinal`) and the output interval via `clawdata.num_output_times`, +as usual. You should specify :math:`T` at least as large as the final time +of interest in the forward problem, and frequent enough snapshots that +interpolation between them is reasonable. + +You should set :: + + clawdata.output_format = 'binary' + +so that output is in binary format, since the code that reads in these +snapshots in solving the forward problem assumes this format. + + +After solving the adjoint equation by running the code in the `adjoint` +subdirectory in the usual manner (e.g. `make .output`), the code in the main +directory can now be used to solve the forward problem, with the adjoint +snapshots used to guide AMR. + +Starting in v5.6.0 a new attribute of `clawutil.data.ClawRunData` +is available named `adjointdata`. This ia an object of class +`amrclaw.data.AdjointData` and has several attribures that should be set. +For example, in `$CLAW/amrclaw/examples/acoustics_1d_adjoint` they are set +as follows:: + + #------------------------------------------------------------------ + # Adjoint specific data: + #------------------------------------------------------------------ + # Also need to set flagging method and appropriate tolerances above + + adjointdata = rundata.adjointdata + adjointdata.use_adjoint = True + + # location of adjoint solution, must first be created: + adjointdata.adjoint_outdir = os.path.abspath('adjoint/_output') + + # time period of interest: + adjointdata.t1 = rundata.clawdata.t0 + adjointdata.t2 = rundata.clawdata.tfinal + + if adjointdata.use_adjoint: + # need an additional aux variable for inner product: + rundata.amrdata.aux_type.append('center') + rundata.clawdata.num_aux = len(rundata.amrdata.aux_type) + adjointdata.innerprod_index = len(rundata.amrdata.aux_type) + +The times `adjointdata.t1` and `adjointdata.t2` determine the time interval +over which the functional is of interest, and `adjointdata.adjoint_outdir` +specifies where the adjoint snapshots are found. + +The flagging method and tolerances are set using, e.g.:: + + # set tolerances appropriate for adjoint flagging: + + # Flag for refinement based on Richardson error estimater: + amrdata.flag_richardson = False + amrdata.flag_richardson_tol = 1e-5 + + # Flag for refinement using routine flag2refine: + amrdata.flag2refine = True + amrdata.flag2refine_tol = 0.01 + +If `amrdata.flag_richardson` is `True` then we attempt to use estimates of +the one-step error generated by Richardson extrapolation together with the +adjoint to perform flagging. This is still experimental. *(Describe in more +detail).* + +Otherwise it is +simply inner products of the forward and adjoint solutions that are computed +and a cell is flagged for refinement in cells where the magnitude of the +inner project is greater than `amrdata.flag2refine_tol`. + + +.. _adjoint_geoclaw: + +Using adjoint flagging in GeoClaw +--------------------------------- + +The references above contain tsunami modeling examples, as does the paper + +- [DavisLeVeque2016]_ + +An example can be found in + +- `$CLAW/geoclaw/examples/tsunami/chile2010_adjoint` + +Note that GeoClaw solves the nonlinear shallow water equations while the +adjoint as implemented in GeoClaw is only suitable for linear problems. To +date the adjoint has only been used to guide refinement for waves propagating +across the ocean as a way to identify which waves will reach a target +location of interest (possibly after multiple reflections). In the deep +ocean the tsunami amplitude is very small compared to the water depth and so +GeoClaw is essentially solving the linear shallow water equations, +linearized about the ocean at rest. Hence the adjoint problem is also solved +about the ocean at rest and the adjoint equations take essentially the same +form as the forward equations. The adjoint Riemann solver can be found in + +- `$CLAW/riemann/src/rpn2_geoclaw_adjoint_qwave.f` +- `$CLAW/riemann/src/rpt2_geoclaw_adjoint_qwave.f` + +Note that since in the forward problem the adjoint equation is solved using +a f-wave formulation, the adjoint problem is a variable-coefficient problem +in non-conservation form and is solved using the q-wave formulation in which +jumps in the the solution vector are split into eigenvectors, rather than +jumps in the flux. See the comments in the `rpn2` solver for more details. + diff --git a/v5.10.x/_sources/amr_algorithm.rst.txt b/v5.10.x/_sources/amr_algorithm.rst.txt new file mode 100644 index 0000000000..b1c458980e --- /dev/null +++ b/v5.10.x/_sources/amr_algorithm.rst.txt @@ -0,0 +1,170 @@ + +.. _amr_algorithm: + +***************************************************************** +Adaptive mesh refinement (AMR) algorithms +***************************************************************** + +The basic adaptive refinment strategy used in :ref:`amrclaw` is +to refine on logically rectangular patches. A single Level 1 grid covers +the entire domain (usually --- if it is too large it may be split into +multiple Level 1 grids). Some rectangular portions of this grid are covered +by Level 2 grids refined by some refinement factor *R* in each direction +(anisotropic refinement is now allowed too --- see :ref:`setrun_amrclaw`). +Regions of each Level 2 grid may be covered by Level 3 grids, that are +further refined (perhaps with a different refinement ratio). And so on. + +For the hyperbolic solvers in Clawpack the time step is limited by the +Courant number (see Section :ref:`cfl`), and so if the spatial resolution is +refined by a factor of *R* in each direction then the time step will +generally have to be reduced by a factor *R* as well. + +The AMR code thus proceeds as follows: + + * In each time step on the Level 1 grid(s), the values in all grid cells + (including those covered by finer grids) are advanced one time step. + Before this time step is taken, ghost cells around the boundary of the + full computational domain are filled based on the boundary conditions + specified in the library routine *bcNamr.f* (where *N* is the number of + space dimensions). Check the *Makefile* of an application to see where + this file can be found. + + * After a step on the Level 1 grid, *R* time steps must be taken on each + Level 2 grid, where *R* denotes the desired refinement ratio in + time from Level 1 to Level 2. + + For each of these time step, ghost cell + values must be filled in around all boundaries of each Level 2 grid. + This procedure is defined below in :ref:`amr_bc`. + + * After taking *R* steps on Level 2 grids, values on the Level 1 grid are + updated to be consistent with the Level 2 grids. Any cell on Level 1 + that is covered by a Level 2 grid has its *q* value replaced by the + average of all the Level 2 grid cells lying within this cell. This gives + a cell average that should be a better approximation to the true cell + average than the original value. + + * The updating just described can lead to a change in the total mass + calculated on the Level 1 grid. In order to restore global conservation, + it is necessary to do a conservation fix up. (To be described...) + +This style of AMR is often called *Berger-Oliger-Colella* adaptive +refinement, after the papers of Berger and Oliger [BergerOliger84]_ and +[BergerColella89]_. + +The Fortran code in `$CLAW/amrclaw `_ is based on code +originally written by Marsha Berger for gas dynamics, and merged in Clawpack +in the early days of Clawpack development by MJB and RJL. The algorithms +used in AMRClaw are described more fully in [BergerLeVeque98]_. + + +.. _amr_bc: + +Ghost cells and boundary conditions for AMR +------------------------------------------- + +Consider a Level *k > 1* grid for which we need ghost cells all around the +boundary at the start of each time step on this level. The same procedure +is used at other levels. + + * Some Level k grids will be adjacent to other Level k grids and so any + ghost cell that is equivalent to a Level k cell on some other grid has + values copied from this this grid. + + * Some ghost cells will be in the interior of the full computational domain + but in regions where there is no adjacent Level k grid. There will be + a Level k-1 grid covering that region, however. In this case the ghost + cells are obtained by space-time interpolation from values on the Level + k-1 grid. + + * Some ghost cells will lie outside the full computational domain, where + the boundary of the Level k grid lies along the boundary of the full + domain. For these cells the subroutine *bcNamr* + (where *N* is the number of space dimensions) is used to fill ghost cell + values with the proper user-specified boundary conditions, unless + periodic boundary conditions are specified (see below). + +For many standard boundary conditions it is not necessary for the user to do +anything beyond setting appropriate parameters in *setrun.py* (see +:ref:`setrun`). Only if user-specified boundary conditions are +specified is it necessary to modify the library +routine *bcNamr.f* (after copying to your application directory so as not to +damage the library version, and modifying the *Makefile* to point to the new +version). + +There some differences between the *bcNamr.f* routine and the *bcN.f* +routine used for the single-grid classic Clawpack routines (which are found in +*$CLAW/classic/src/Nd/bcN.f*). In particular, it is necessary to check +whether a ghost cell actually lies outside the full computational domain +and only set ghost cell values for those that do. It should be clear how to +do this from the library version of the routine. + +If **periodic boundary +conditions** are specified, this is handled by the AMRClaw software along +with all internal boundaries, rather than in *bcNamr.f*. With AMR it is not +so easy to apply periodic boundary conditions as it is in the case of a +single grid, since it is necessary to determine whether there is a grid at +the same refinement level at the opposite side of the domain to copy ghost +cell values from, and if so which grid and what index corresponds to the +desired location. + +.. _amr_cluster_fill: + +Choosing and initializing finer grids +------------------------------------- + +Every few time steps on the coarsest level it is generally necessary to +revise modify the regions of refinement at all levels, for example to follow +a propagating shock wave. This is done by + + 1. Flagging cells that need refinement according to some criteria. + + 2. Clustering the flagged cells into rectangular patches that will form the + new set of grids at the next higher level. + + 3. Creating the new grids and initializing the values of *q* and also any + *aux* arrays for each new grid. + +Clustering is done using and algorithm developed by Berger and Rigoutsis +[BergerRigoutsis91]_ that finds a nonoverlapping set of rectangles that +cover all flagged points and balances the following conflicting goals: + + * Cover as few points as possible that are not flagged, + to reduce the number of grid cells that must be advanced in each time + step. + + * Create as few new grids as possible, to minimize the overhead associated + with filling ghost cells and doing the conservation fix-up around edges + of grids. + +A parameter *cutoff* can be specified (see :ref:`setrun_amrclaw`) to control +clustering. The algorithm will choose the grids in such a way that at least +this fraction of all the grid points in all the new grids will be in cells +that were flagged as needing refinement. Usually *cutoff = 0.7* is used, so +at least 70% of all grid cells in a computation are in regions where they +are really needed. + +Initializing the new grids at Level k+1 is done as follows: + + * At points where there was already a Level k+1 grid present, this value is + copied over. + + * At points where there was not previously a Level k+1 grid, bilinear + interpolation is performed based on the Level k grids. + +.. _amr_flag: + +Flagging cells for refinement +----------------------------- + +The user can control the criteria used for flagging cells for refinement. + +See :ref:`refinement` for details. + +For more details +---------------- + +See + +- :ref:`amrclaw_doxygen`. +- :ref:`amrclaw_flowcharts`. diff --git a/v5.10.x/_sources/amrclaw.rst.txt b/v5.10.x/_sources/amrclaw.rst.txt new file mode 100644 index 0000000000..801d31d6b2 --- /dev/null +++ b/v5.10.x/_sources/amrclaw.rst.txt @@ -0,0 +1,51 @@ + +.. _amrclaw: + + +********************************************* +AMRClaw Description and Detailed Contents +********************************************* + +The AMRClaw version of Clawpack provides Adaptive Mesh Refinement (AMR) +capabilities in 2 and 3 space dimensions. (The two-dimensional code can +also be used for 1-dimensional problems, see :ref:`amrclaw_1d`.) + +**See also:** + +* :ref:`amr_algorithm` +* :ref:`refinement` +* :ref:`amrclaw_doxygen` +* :ref:`amrclaw_flowcharts` + +Block-structured AMR is implemented, in which rectangular patches of the +grid at level `L` are refined to level `L+1`. +See :ref:`setrun_amrclaw` for a list of the input parameters that can be +specified to help control how refinement is done. +The general algorithms are described in [BergerLeVeque98]_. + +See :ref:`ClawPlotItem` for a list of 2d plot types that can be used to +create a `setplot` function to control plotting of two-dimensional results. +Some of the attribute names start with the string `amr_`, indicating that a +list of different values can be specified for each AMR level. +See :ref:`plotting` and :ref:`setplot` for more about plotting. + +Python plotting tools for 3d are still under development. For now, the +Matlab tools from Clawpack 4.3 can still be used, see +:ref:`matlabplots`. + +.. toctree:: + :maxdepth: 3 + + amrclaw1d + setrun_amrclaw + setrun_amrclaw_sample + amr_algorithm + refinement + flagregions + ruled_rectangles + adjoint + gauges + amrclaw_doxygen + amrclaw_flowcharts + + diff --git a/v5.10.x/_sources/amrclaw1d.rst.txt b/v5.10.x/_sources/amrclaw1d.rst.txt new file mode 100644 index 0000000000..f0ef582fe8 --- /dev/null +++ b/v5.10.x/_sources/amrclaw1d.rst.txt @@ -0,0 +1,36 @@ + +.. _amrclaw_1d: + +--------------------------- +AMRClaw for 1d problems +--------------------------- + +**New in Version 5.4.1** + +AMRClaw has been extended to support one-dimensional AMR directly. + +The `setrun.py` file has the same form as for 2d AMRClaw, with the obvious +changes to eliminate the y-direction. See :ref:`setrun_amrclaw_sample`. + +For some examples, see the `1d` examples in `$CLAW/amrclaw/examples/` and in +:ref:`gallery_classic_amrclaw`. + + +Old approach, deprecated: +------------------------- + +The two-dimensional code can also be used for 1-dimensional problems, by +setting `num_cells[1] = 1` so there is only one cell in the `y` direction. +Also set `refinement_ratios_y = [1,1,1, ...]` so that refinement is not done +in this direction. + +In this case the code will automatically do sweeps only in the x-direction +and not attempt to solve any Riemann problems in the y-direction, or +transverse Riemann problems. + +The output in the *fort.q000N* files will be suitable for plotting with the +one-dimensional Python plotting tools, e.g. these files will list the number +of cells in *x* but not in *y*. + +**This appears to still have bugs and is being worked on.** + diff --git a/v5.10.x/_sources/amrclaw_doxygen.rst.txt b/v5.10.x/_sources/amrclaw_doxygen.rst.txt new file mode 100644 index 0000000000..8ae9a57948 --- /dev/null +++ b/v5.10.x/_sources/amrclaw_doxygen.rst.txt @@ -0,0 +1,18 @@ + +.. _amrclaw_doxygen: + +Doxygen documentation of AMRClaw +================================ + +Starting in Version 5.4.1, the Fortran files in AMRClaw have been modified so +that documentation can be generated using `Doxygen +`_. + +The resulting documentation pages give a description of the parameters and +also show *call graphs* to help understand what other subroutines call a +subroutine or are called by it. For an example, see +`filpatch.f90 `_. + +See `the file list `_ for +a list of the AMRClaw files. + diff --git a/v5.10.x/_sources/amrclaw_flowcharts.rst.txt b/v5.10.x/_sources/amrclaw_flowcharts.rst.txt new file mode 100644 index 0000000000..67237937b4 --- /dev/null +++ b/v5.10.x/_sources/amrclaw_flowcharts.rst.txt @@ -0,0 +1,21 @@ + +.. _amrclaw_flowcharts: + +AMRClaw Flowcharts +================================ + + +Several flowcharts are available that give some idea of the structure of +AMRClaw. + +- `Overall structure <_static/flowcharts/AMRDiagram.pdf>`_ +- `Time stepping <_static/flowcharts/StepgridDiagram.pdf>`_ +- `Regridding <_static/flowcharts/RegridDiagram.pdf>`_ + +For those who want to get into the gory details, this might be useful: + +- `Monster flowchart <_static/flowcharts/AMRClawMonsterFlowchart.pdf>`_ + +The left column shows the basic steps, with subsequent columns providing more +details. + diff --git a/v5.10.x/_sources/application_documentation.rst.txt b/v5.10.x/_sources/application_documentation.rst.txt new file mode 100644 index 0000000000..310c3777d1 --- /dev/null +++ b/v5.10.x/_sources/application_documentation.rst.txt @@ -0,0 +1,43 @@ +.. _application_documentation: + +------------------------- +Application documentation +------------------------- + +.. _convert_readme: + +Converting README.rst to README.html +------------------------------------- + + +In Fortran versions of Clawpack-5, the main documentation page +for an application is often found +in a file named `README.rst`, which can be written using the markup language +`reStructured Text `_. +This is the markup language used by `Sphinx `_ for +all of the Clawpack documentation. + +The `README.rst` file can be coverted into a `README.html` file by doing:: + + python $CLAW/clawutil/src/python/clawutil/convert_readme.py + +This is also automatically done by the command:: + + make .htmls + +which also converts code files into html files for easy browsing. +A list of code files in the directory is automatically generated by +`convert_readme.py` and links inserted in `README.html`. + + +.. _clawcode2html: + +Converting code to html with clawcode2html +------------------------------------------- + +The Python script `$CLAW/clawutil/src/python/clawutil/clawcode2html.py` is +invoked by "make .htmls" (in applications directories having Makefiles). + +This script does minor syntax highlighting by attempting to put comments in +blue and adds a header at the top. + diff --git a/v5.10.x/_sources/apps.rst.txt b/v5.10.x/_sources/apps.rst.txt new file mode 100644 index 0000000000..5afc83e2a2 --- /dev/null +++ b/v5.10.x/_sources/apps.rst.txt @@ -0,0 +1,85 @@ + +.. _apps: + +################################# +Clawpack Applications repository +################################# + + +More complex examples and applications are archived in the Github +`clawpack/apps` repository found at +`https://github.com/clawpack/apps `_. + +In particular, the directory `apps/fvmbook` contains many :ref:`fvmbook`. + +The `Clawpack Gallery `__ +shows results/animations from some selected examples in the `apps` repository. + +These examples are not included in the basic Clawpack installation. +Users interested in obtaining this collection of applications can either +clone the repository using git:: + + git clone https://github.com/clawpack/apps + +or navigate to `https://github.com/clawpack/apps `_ +and click on the green "Code" button to see other options, such as downloading +a zip file. + +Jupyter Notebooks +----------------- + +The directory `apps/notebooks` contains a number of notebooks that illustrate +various aspects of Clawpack. Many of these are also visible in rendered html +form in the +`Gallery of Notebooks `__. + +Submodules +---------- + +The `apps` repository contains several +`git submodules `__ +for collections of examples specific to some application. +This has the advantage that the submodules can be managed independent of the +main `apps` repository, perhaps by people who are not core Clawpack +developers. (Contact us if you have a repository of examples you would like +to see added.) +Also each submodule may be of limited interest, and could contain some large +files that not every Clawpack user wants to download. + +For example, after cloning the `apps` repository you will see a subdirectory +for storm surge modeling examples using GeoClaw named +`apps/surge-examples`, which initially is an empty directory. The file +`apps/.gitmodules` shows that this is a submodule. +It also shows the url to the GitHub repository corresponding to this module +(where you could do a pull request, for example, if you find a bug). + +If you want to add only the `surge-examples`, and not other submodules, +you can do:: + + git submodule update --init surge-examples + +If you want to add all available submodules, leave off the submodule name:: + + git submodule update --init + +The `--init` flag is not needed (but won't hurt) if you are updating +a submodule that you have already initialized and cloned, e.g. if +the submodule maintainer has added new examples to it. + + +Examples included with Clawpack +------------------------------- + +Recall also that a few examples of how to use different flavors of +Clawpack are included in every distribution of Clawpack, in the directories + +* `$CLAW/classic/examples` +* `$CLAW/amrclaw/examples` +* `$CLAW/geoclaw/examples` +* `$CLAW/pyclaw/examples` + + +These examples demonstrate some of the basic capabilities. +The plots resulting from running these examples should agree with those seen +in the `Clawpack Gallery `__. + diff --git a/v5.10.x/_sources/aws.rst.txt b/v5.10.x/_sources/aws.rst.txt new file mode 100644 index 0000000000..e95027ad8d --- /dev/null +++ b/v5.10.x/_sources/aws.rst.txt @@ -0,0 +1,276 @@ + +.. _aws: + +Amazon Web Services EC2 Clawpack AMI +==================================== + +.. warning:: This has not been updated for Clawpack-5 yet, + but it should still work if you start up an instance as described below + and then install Clawpack-5 by following the + :ref:`installing`. + +To run Clawpack in the Cloud using Amazon Web Services Elastic Cloud +Computing (EC2), first sign up for an account. Note that +you can get 750 hours free micro instance usage +(which may be sufficient for many things) in the +`free usage tier `_. + + +For general information and a guide to getting started: + +* `UW eScience information on AWS `_. + +* `Getting started with EC2 + `_, + with tutorial to lead you through an example (a similar tutorial geared + to Clawpack is included below). + +* `EC2 FAQ `_. + +* `Pricing `_. Note: you are charged + per hour for hours (or fraction thereof) that your instance is in + `running` mode, regardless of whether the CPU is being used. + + +Finding the Clawpack AMI +------------------------ + + +Once you have an AWS account, sign in to the +`management console `_ +and click on the +EC2 tab, and then select Region US East (which has cheaper rates) and click +on `AMIs` on the menu to the left. + +Change `Viewing:` to `All Images` and `All Platforms` and then *after* it +has finished loading the database start typing +`uwamath-clawpack` in the search bar. You +should find at least one AMI, as shown in this screen shapshot: + +.. image:: images/aws1.png + :width: 15cm + +Launching an instance +--------------------- + +Select the Clawpack image and then +click on the `Launch` button on this page to start launching an instance +based on this AMI. This means a virtual machine will be started for you, +initialized with this disk image (which is a Ubuntu linux distribution with +Clawpack and its dependencies). + +This should give a popup page that looks like this: + +.. image:: images/aws2.png + :width: 15cm + +Here you can select what sort of instance you wish to start (larger +instances cost more per hour). + +Click `Continue` on the next few screens and eventually you get to one that +looks like: + +.. image:: images/aws3.png + :width: 15cm + +If you don't already have a key pair, create a new one and then +select this key pair here. + +Click `Continue` and you will get a screen to set Security Groups. Select +the `quick-start-1` option. On the next screen click `Launch`. + + +Logging on to your instance +--------------------------- + +Click `Close` on the next page to +go back to the Management Console. Click on `Instances` on the left menu +and you should see a list of instance you +have created, in your case only one. If the status is not yet `running` +then wait until it is (click on the `Refresh` button if necessary). + +*Click on the instance* and information about it should appear at the bottom +of the screen. Scroll down until you find the `Public DNS` information, +highlighted on the screenshot below: + +.. image:: images/aws4.png + :width: 15cm + +Go into the directory where your key pair is stored, in a file with a name +like `rjlkey.pem` and you should be able to `ssh` into your instance using +the name of the public DNS, with format like:: + + $ ssh -i KEYPAIR-FILE ubuntu@DNS + +where KEYPAIR-FILE and DNS must be replaced by the appropriate +things, e.g. for the above example:: + + $ ssh -i rjlkey.pem ubuntu@ec2-50-19-75-229.compute-1.amazonaws.com + +Note: + +* You must include `-i keypair-file` + +* You must log in as user ubuntu. + +Using Clawpack +-------------- + +Once you have logged into your instance, you are on Ubuntu Linux that has +software needed for Clawpack pre-installed, including: + +* gfortran +* Ipython, numpy, scipy, matplotlib +* make +* git +* netcdf +* apache web server + +Other software is easily installed using `apt-get install`. + +The current development version of Clawpack is installed in +`/claw/clawpack-4.x`. If you want to use this version, you might want to:: + + $ cd /claw/clawpack-4.x + $ git fetch origin # bring over any recent changes + $ git merge origin/master # merge them in + $ python python/make_libs.py # compile libraries + +The `$CLAW` variable is set to point to this version of Clawpack (in the +`.bashrc` file). + +Of course you could instead download a tar file of Clawpack and install +following the instructions at :ref:`installing`. At any rate, see that +section for instructions on what to do next if you are new to Clawpack. + +.. warning:: If you want to use Clawpack-5, instead follow the + :ref:`installing`. + +Viewing plots of results +------------------------ + +If you run Clawpack on your instance then you will probably want to view the +results. There are at least three possible approaches (see :ref:`plotting` +for general information about plotting in Clawpack): + +* If you are on a computer that supports X windows and you + add the `-X` flag to your `ssh` command, then you should be able to + plot interactively (see :ref:`plotting_Iplotclaw`). + Response may be pretty slow, however. + +* If you create plots using :: + + $ make .plots + + then you will have a directory (named `_plots` by default) that contains + `.png` + figures and `.html` files for viewing them. You can tar this directory up + and transfer it to your local machine using `sftp`, and then view locally. + + Note that the plot files are often **much** smaller than the Fortran + output files in `_output`, and so much quicker to transfer. + +* You can view the plots directly using a web browser as explained in the + next section. + +Viewing webpages directly from your instance +-------------------------------------------- + +If you use :: + + $ make .plots + +to make a set of plot files and html files for viewing them, you can view +them directly by opening a web browser to an appropriate path on your +instance. + +The apache webserver should already be running, but to allow people to view +webpages you will need to adjust the security settings. Go back to the +Management Console and click on `Security Groups` on the left menu. Select +`quick-start-1` and then click on `Inbound`. You should see a list of ports +that only lists 22 (SSH). You want to add port 80 (HTTP). Select HTTP from +the drop-down menu that says `Custom TCP Rule` and type 80 for the `Port +range`. Then click `Apply Rule Changes`. This should give something like +the next screen shot: + +.. image:: images/aws5.png + :width: 15cm + + +Now you should be able to point your browser to `http://DNS` where `DNS` is +replaced by the Public DNS name of your instance, the same as used for the +`ssh` command. So for the example above, this would be :: + + `http://ec2-50-19-75-229.compute-1.amazonaws.com`. + +You should see this page: + +.. image:: images/aws6.png + :width: 15cm + +The page being displayed can be found in `/var/www/index.html` on your +instance. Any files you want to be visible on the web should be in +`/var/www`, or it is sufficient to have a link from this directory to where +they are located (created with the `ln -s` command in linux). + +So, for example, if you do the following:: + + $ cd /var/www + $ ln -s /claw/clawpack-4.x/apps ./apps + +Then you should be able to see the `apps` directory in your web browser, +which would be at :: + + http://ec2-50-19-75-229.compute-1.amazonaws.com/apps/ + +for the above example. You will have to replace the DNS with that of your +instance. + +If you want to expose all of your home directory to the web:: + + $ cd /var/www + $ ln -s /home/ubuntu ./home + +Transferring files to/from your instance +---------------------------------------- + +You can use `scp` to transfer files between a running instance and +the computer on which the ssh key is stored. + +From your computer (not from the instance):: + + $ scp -i KEYPAIR-FILE FILE-TO-SEND ubuntu@DNS:REMOTE-DIRECTORY + +where DNS is the public DNS of the instance and `REMOTE-DIRECTORY` is +the path (relative to home directory) +where you want the file to end up. You can leave off +`:REMOTE-DIRECTORY` if you want it to end up in your home directory. + +Going the other way, you can download a file from your instance to +your own computer via:: + + $ scp -i KEYPAIR-FILE ubuntu@DNS:FILE-TO-GET . + +to retrieve the file named `FILE-TO-GET` (which might include a path +relative to the home directory) into the current directory. + +Stopping your instance +---------------------- + +Once you are done computing for the day, you will probably want to stop your +instance so you won't be charged while it's sitting idle. You can do this +by selecting the instance from the Management Console / Instances, and then +select `Stop` from the `Instance Actions` menu. + +You can restart it later and it will be in the same state you left it in. +But note that it will probably have a new Public DNS! + +Creating your own AMI +--------------------- + +If you add additional software and want to save a disk image of your +improved virtual machine (e.g. in order to launch additional images in the +future to run multiple jobs at once), simply click on `Create Image (EBS +AMI)` from the `Instance Actions` menu. + + diff --git a/v5.10.x/_sources/b4run.rst.txt b/v5.10.x/_sources/b4run.rst.txt new file mode 100644 index 0000000000..66b8953823 --- /dev/null +++ b/v5.10.x/_sources/b4run.rst.txt @@ -0,0 +1,38 @@ + +.. _b4run: + +***************************************************************** +b4run function +***************************************************************** + +When using the Fortran code, the command:: + + make output + +invokes the `runclaw` function from +`$CLAW/clawutil/src/python/clawutil/runclaw.py +`__ +to run the Fortran executable. + +Starting in v5.7.1, this function has been modified to look for a Python `b4run` +function to be executed before running the Fortran code. This can be used, +for example, to: + + - automate copying certain files into the `_output` directory + (e.g. you might want to keep the `Makefile` and `setrun.py` + that were used for the run along with the output), + + - generate a log file with more information about the run, e.g. + what time the run was started and what directory the input files came + from (the `rundir`). + +The file `$CLAW/clawutil/src/python/clawutil/b4run.py +`__ +is a sample file showing the format it should have, and implements +the sample actions described above. + +To search for a `b4run.py` file, the current `rundir` directory is +first checked and if there is no such file in this directory then +the environment variable `B4RUN` is checked, which can be set to +the full path of a `b4run.py` file that you wish to use globally, for example. + diff --git a/v5.10.x/_sources/b4step_defaults.rst.txt b/v5.10.x/_sources/b4step_defaults.rst.txt new file mode 100644 index 0000000000..c5fb8a3ac9 --- /dev/null +++ b/v5.10.x/_sources/b4step_defaults.rst.txt @@ -0,0 +1,39 @@ +:orphan: + +.. _b4step_defaults: + +======================== +b4step default routines +======================== + +Below are linkes to the default `b4step` library routines for Classic and AMRClaw. +By default these do nothing. If you wish to specify `aux` arrays you will +need to copy one of these files to your application directory and modify it +as needed. Remember to change to `Makefile` to point to the proper version. + +- `$CLAW/classic/src/1d/b4step1.f90 + `__ + +- `$CLAW/classic/src/2d/b4step2.f90 + `__ + +- `$CLAW/classic/src/3d/b4step3.f90 + `__ + +(Note: these links are for the version checked in to the master branch. +You can select a different branch or tag from the GitHub page.) + + +.. _b4step_geoclaw: + +b4step routine in GeoClaw +-------------------------- + +In GeoClaw, there is a library routine that sets `aux(1,i,j)` to the cell +average of the bathymetry, `aux(2,i,j)` to the ratio of the true cell area +to `dx*dy` (the capacity function), and `aux(3,i,j)` to the length ratio of +the bottom edge to `dx` (The latter two quantities vary +with latitude when `coordinate_system == 2`). + +- `$CLAW/geoclaw/src/2d/shallow/b4step2.f90 + `__ diff --git a/v5.10.x/_sources/bc.rst.txt b/v5.10.x/_sources/bc.rst.txt new file mode 100644 index 0000000000..1b72d3d25e --- /dev/null +++ b/v5.10.x/_sources/bc.rst.txt @@ -0,0 +1,166 @@ + +.. _bc: + +=================== +Boundary conditions +=================== + +Boundary conditions are imposed each time step by filling ghost cells +adjacent to the edge of each grid patch. See Chapter 4 of [LeVeque-FVMHP]_ +for more details. + +Boundary conditions are set by the library routines: + +* `$CLAW/classic/src/Nd/bcN.f` for the classic code (N = 1, 2, 3). +* `$CLAW/amrclaw/src/Nd/bcNamr.f` for the amrclaw code (N = 2, 3). + +Several standard choices of boundary condition procedures are provided in +these routines, and can be +selected at each boundary by setting the input parameters `bc_lower` and +`bc_upper` in each dimension (see :ref:`setrun`) to one of the following: + +* 1 or 'extrap' : extrapolation (non-reflecting outflow) + + In this case values from the grid cell adjacent to the boundary + are copied into all ghost cells moving in the direction normal to + the boundary. This gives a fairly good approximation to a + non-reflecting or outgoing boundary condition that lets waves pass + out of the boundary without reflection, particularly in one space + dimension. In more than one direction this is not perfect for waves + that hit the boundary at an oblique angle. + +* 2 or 'periodic' : periodic boundary conditions + + In this case ghost cell values are set by copying from interior + cells at the opposite boundary so that periodic boundary conditions + are perfectly imposed. Normally periodic boundary conditions would + be imposed by setting this value for both `bc_lower` and `bc_upper` + in some dimension, but this is not required. + +* 3 or 'wall' : solid wall boundary conditions are imposed + for systems where the second component of `q` is the `x` velocity + or momentum in one dimension (and where the third component + of `q` is also the `y` velocity/momentum in more dimensions, + etc.) This is true, for example, if the acoustics equations + are solved with components `q = (p, u, v)` or shallow water + equations with `q = (h, hu, hv)`. + + In this case the normal velocity/momentum at a wall is + reflected about the boundary (copied to a ghost cell from + the cell equally far from the boundary on the interior side) + while all other components are extrapolated. + + Reflecting boundary conditions can also often be used on a line of + symmetry of a solution in order to reduce the computational domain + to be only half of the physical domain. + + Note that this option does not work on a mapped grid... + **Add pointer to modified version** + + +If none of the above boundary conditions are desired, the user can modify +the subroutine `bcN` so that setting the appropriate component of `bc_lower` +or `bc_upper` to 0 will execute code added by the user. In this case it is +best to put the modified version of `bcN.f` in the application directory and +modify the `Makefile` to point to the modified version. +See :ref:`bc_user` below. + + + +.. _bc_amr: + +Boundary conditions for adaptive refinement +------------------------------------------- + +When AMR is used, any interior patch edges (not at a domain boundary) are +filled automatically each time step, either by copying from adjacent +patches at the same level or by interpolating (in both space and +time) from coarser levels if needed. + +The user must still specify boundary conditions at the edges of the +computational domain. The same set of choices for standard boundary +conditions as described above are implemented in the library routine +`bcNamr.f`, and so specifying these boundary conditions requires no change +to `setrun.py` when going from Classic Clawpack to AMRClaw. However, if +special boundary conditions have been implemented in a custom version of +`bcN.f` then the same procedure for setting ghost cells will have to be +implemented in a custom version of `bcNamr.f`. This routine is slightly +more complicated than the single-grid Classic version, since one must always +check whether each ghost cell lies outside the computational domain (in +which case the custom boundary condition procedure must be applied) or lies +within the domain (in which case ghost cell values are automatically set by +the AMR code and the user `bcNamr` routine should leave these values +alone. + + +.. _bc_geoclaw: + +Boundary conditions for GeoClaw +-------------------------------- + +For tsunami modeling or other geophysical flows over topography the +computational domain has artificial boundaries that are placed sufficiently +far from the region of interest that any flow or waves leaving the domain +can be ignored and there should be no incoming waves. Extrapolation +boundary conditions are then appropriate. If the ocean is truncated at some +point then these generally have been found to give very small spurious +reflection of outgoing tsunami waves. Extroplation boundary conditions can +also be used on dry land (where the depth `h` is zero). + +In some cases reflecting boundary conditions might be more appropriate, +e.g. along the walls of a wave tank. + +The library routine `$CLAW/geoclaw/src/2d/shallow/bc2amr.f` is modified from +the `amrclaw` version only by extrapolating the depth at the boundaries +into ghost cells. + +.. _bc_sphere: + +Boundary conditions for clamshell grids on the sphere +------------------------------------------------------ + +In 2D AMRClaw and GeoClaw, an additional option is available for `bc_lower` +and `bc_upper` that is implemented in the library routines: + +* 4 or 'sphere' : sphere boundary conditions + + Must set `bc_lower[0:2] = bc_upper[0:2] = 4` (i.e. at all 4 boundaries) + + These boundary conditions are similar to periodic boundary conditions, + but for the clamshell grid introduced in [CalhounHelzelLeVeque]_ + for solving problems on the sphere using a single logically rectangular + grid. This is best envisioned by folding a rectangular piece of paper + in half, gluing the edges together, and inflating to a sphere. See the + animations on the `website for the original paper `_ + See also [BergerCalhounHelzelLeVeque]_ for further examples. + +.. _bc_user: + +User-defined boundary conditions +-------------------------------- + +If none of the boundary conditions described above is suitable at one or +more boundaries of the domain, then you will have to modify the library +routine to implement the desired boundary condition. +See Chapter 4 of [LeVeque-FVMHP]_ for hints on how to specify the ghost cell +values each time step. + +Suppose you need to specify different boundary conditions at the boundary +`xlower`, for example. Then in `setrun.py` you should set +`bc_lower[0] = 0` and modify the library boundary condition routine to +insert your desired boundary conditions at the point indicated in the code, +where it says:: + + c # user-specified boundary conditions go here in place of error output + +in the section marked `left boundary`. The details of how this is done +differ a bit between the classic and AMR codes and also depend on the number +of space dimensions. Examine the way other boundary conditions are +implemented and follow the model in your own code. + +TODO: Give some hints on how things work in AMR code -- must check which ghost +cells extend outside the physical domain and which are filled automatically +from adjacent grid patches or by interpolation from coarser patches if they +are interior to the domain. + + diff --git a/v5.10.x/_sources/biblio.rst.txt b/v5.10.x/_sources/biblio.rst.txt new file mode 100644 index 0000000000..f749a81b38 --- /dev/null +++ b/v5.10.x/_sources/biblio.rst.txt @@ -0,0 +1,315 @@ + +.. _biblio: + +************** +Bibliography +************** + +See also `www.geoclaw.org `_ for papers, posters, and +other resources for GeoClaw. + +Papers describing the Clawpack software and algorithms +------------------------------------------------------ + +.. [BaleLevMitRoss02] + D. S. Bale, R. J. LeVeque, S. Mitran, and J. A. Rossmanith. + `A wave-propagation method for conservation laws with spatially varying + flux functions, + `_ + *SIAM J. Sci.* Comput 24 (2002), 955-978. :: + + @article{BaleLevMitRoss02, + Author = {D. Bale and R. J. LeVeque and S. Mitran and J. A. Rossmanith}, + Title = {A wave-propagation method for conservation laws and balance laws + with spatially varying flux functions}, + Journal = {SIAM J. Sci. Comput.}, + Pages = {955--978}, + Volume = {24}, + Year = {2002}} + + +.. [BergerColella89] + M. J. Berger and P Colella. 1989. Local adaptive mesh refinement for + shock hydrodynamics. *J. Comput. Phys.* 82, 64--84. + +.. [BergerGeorgeLeVequeMandli11] + M. J. Berger, D. L. George, R. J. LeVeque and K. M. Mandli, + The GeoClaw software for depth-averaged flows with adaptive refinement, + Advances in Water Resources 34 (2011), pp. 1195-1206. :: + + + @article{BergerGeorgeLeVequeMandli11, + Author = {M. J. Berger and D. L. George and R. J. LeVeque and K. T. Mandli}, + Journal = {Adv. Water Res.}, + Pages = {1195-1206}, + Title = {The {GeoClaw} software for depth-averaged flows with adaptive refinement}, + Volume = {34}, + Year = {2011}, + Url = {\url{www.clawpack.org/links/papers/awr11}}} + + +.. [BergerLeVeque98] + M. J. Berger and R. J. LeVeque. 1998. + `Adaptive Mesh Refinement using + Wave-Propagation Algorithms for Hyperbolic Systems. + `_ + *SIAM J. Numer. Anal.* 35, 2298--2316. :: + + @article{BergerLeVeque98, + Author = {M. J. Berger and R. J. LeVeque}, + Journal = {SIAM J. Numer. Anal.}, + Pages = {2298--2316}, + Title = {Adaptive Mesh Refinement using Wave-Propagation Algorithms for Hyperbolic Systems}, + Volume = {35}, + Year = {1998}} + +.. [BergerLeVeque2023] + M. J. Berger and R. J. LeVeque. 2023 + `Implicit Adaptive Mesh Refinement for Dispersive Tsunami Propagation + `_ + *Submitted for publication* + +.. [BergerOliger84] + M. J. Berger and J. Oliger. 1984. Adaptive mesh refinement for + hyperbolic partial differential equations. *J. Comput. Phys.* 53, + 484--512. + +.. [BergerRigoutsis91] + M. J. Berger and I. Rigoutsos. 1991. An Algorithm for Point Clustering + and Grid Generation. *IEEE Trans. Sys. Man & Cyber.* 21, 1278--1286. + +.. [Davis2018] + B. N. Davis, 2018. Adjoint-Guided Adaptive Mesh Refinement for + Hyperbolic Systems of Equations, + PhD Thesis, University of Washington. + `link `__ + +.. [DavisLeVeque2016] + B. N. Davis and R. J. LeVeque. 2016. Adjoint Methods for Guiding + Adaptive Mesh Refinement in Tsunami Modeling, 2016. + Pure Appl. Geophys. 173 (2016), pp. 4055-4074. + `More info `__ + +.. [DavisLeVeque2018] + B. N. Davis and R. J. LeVeque. 2018. Analysis and Performance Evaluation of + Adjoint-Guided Adaptive Mesh Refinement for Linear Hyperbolic PDEs + Using Clawpack, `Preprint `_, + `More info `__ + +.. [LangsethLeVeque00] + J. O. Langseth and R. J. LeVeque. 2000. + `A wave-propagation method for + three-dimensional hyperbolic conservation laws. + `_ + *J. Comput. Phys.* + 165, 126--166. :: + + @article{LangsethLeVeque00, + Author = {J. O. Langseth and R. J. LeVeque}, + Title = {A wave-propagation method for three-dimensional hyperbolic conservation laws}, + Journal = {J. Comput. Phys.}, + Pages = {126--166}, + Volume = {165}, + Year = {2000}} + +.. [LeVeque96] + R. J. LeVeque, 1996. + `High-resolution conservative algorithms for advection in + incompressible flow, + `_ :: + + @article{LeVeque1996, + author="R. J. LeVeque", + title="High-resolution conservative algorithms for advection in + incompressible flow", + journal="SIAM J. Numer. Anal.", + volume="33", + year="1996", + pages="627-665" + } + + +.. [LeVeque97] + R. J. LeVeque, 1997. + `Wave propagation algorithms for multi-dimensional + hyperbolic systems. + `_ + *J. Comput. Phys.* 131, 327--353.:: + + @article{rjl:wpalg, + Author = {R. J. LeVeque}, + Title = {Wave propagation algorithms for multi-dimensional hyperbolic systems}, + Journal = {J. Comput. Phys.}, + Pages = {327--353}, + Volume = {131}, + Year = {1997}} + + +.. [LeVeque-FVMHP] + R. J. LeVeque. + `Finite Volume Methods for Hyperbolic Problems. `_ + Cambridge University Press, Cambridge, UK, 2002. :: + + @book{LeVeque-FVMHP, + Author = {R. J. LeVeque}, + Title = {Finite Volume Methods for Hyperbolic Problems}, + Publisher = {Cambridge University Press}, + Year = {2002}, + Url = {https://www.clawpack.org/fvmhp_materials/}} + + See the `Gallery of fvmbook applications + `__ + for some sample results from this book. + +.. [LeVequeGeorgeBerger] + R. J. LeVeque, D. L. George, and M. J. Berger, 2011, + Tsunami modelling with adaptively refined finite volume methods, + *Acta Numerica,* pp. 211-289. :: + + @article{mjb-dg-rjl:actanum2011, + Author = {R.J. LeVeque and D. L. George and M. J. Berger}, + Title = {Adaptive Mesh Refinement Techniques for Tsunamis and Other + Geophysical Flows Over Topography}, + Journal = {Acta Numerica}, + Pages = {211-289}, + Year = {2011}} + +.. [KetParLev13] + D. I. Ketcheson, Matteo Parsani, and R J LeVeque, 2013, + High-order Wave Propagation Algorithms for Hyperbolic Systems, + *SIAM Journal on Scientific Computing*, 35(1):A351-A377 (2013) :: + + @article{KetParLev13, + Author = {Ketcheson, David I. and Parsani, Matteo and LeVeque, + Randall J.}, + Journal = {SIAM Journal on Scientific Computing}, + Number = {1}, + Pages = {A351--A377}, + Title = {{High-order Wave Propagation Algorithms for Hyperbolic Systems}}, + Volume = {35}, + Year = {2013}} + +.. [KetchesonMandliEtAl] + David I. Ketcheson, Kyle T. Mandli, Aron J. Ahmadia, Amal Alghamdi, Manuel + Quezada de Luna, Matteo Parsani, Matthew G. Knepley, and Matthew Emmett, 2012, + PyClaw: Accessible, Extensible, Scalable Tools for Wave Propagation Problems, + *SIAM Journal on Scientific Computing*, 34(4):C210-C231 + :: + + @article{pyclaw-sisc, + Author = {Ketcheson, David I. and Mandli, Kyle T. and Ahmadia, Aron J. and + Alghamdi, Amal and {Quezada de Luna}, Manuel and Parsani, Matteo and + Knepley, Matthew G. and Emmett, Matthew}, + Title = {{PyClaw: Accessible, Extensible, Scalable Tools for Wave Propagation Problems}}, + Journal = {SIAM Journal on Scientific Computing}, + Month = nov, + Number = {4}, + Pages = {C210--C231}, + Volume = {34}, + Year = {2012}} + +.. [KimEtAl2017] + J. Kim, G. K. Pedersen, and F. Lovholt, and R. J. LeVeque, + A Boussinesq type extension of the GeoClaw model - a study of wave + breaking phenomena applying dispersive long wave models, + Coastal Engineering 122 (2017), pp. 75-86. + DOI 10.1016/j.coastaleng.2017.01.005 + :: + + @article{Kim201775, + title = "A Boussinesq type extension of the GeoClaw model - a study of wave + breaking phenomena applying dispersive long wave models ", + author = "Jihwan Kim and Geir K. Pedersen and Finn L{\o}vholt and Randall J. LeVeque", + journal = "Coastal Engineering ", + volume = "122", + pages = "75 - 86", + year = "2017", + doi = "http://dx.doi.org/10.1016/j.coastaleng.2017.01.005", + } + +.. [MandliEtAl2016] + Kyle T. Mandli, Aron J. Ahmadia, Marsha Berger, Donna Calhoun, David L. + George, Yiannis Hadjimichael, David I. Ketcheson, Grady I. Lemoine, Randall J. LeVeque, + Clawpack: building an open source ecosystem for solving hyperbolic PDEs + PeerJ Computer Science 2 (2016), e68:: + + @article{mandli2016clawpack, + title={Clawpack: building an open source ecosystem for solving hyperbolic PDEs}, + author={Mandli, Kyle T and Ahmadia, Aron J and Berger, Marsha and Calhoun, Donna + and George, David L and Hadjimichael, Yiannis and Ketcheson, David I + and Lemoine, Grady I and LeVeque, Randall J}, + journal={PeerJ Computer Science}, + volume={2}, + pages={e68}, + year={2016}, + publisher={PeerJ Inc.}, + doi={10.7717/peerj-cs.68} } + + +Papers describing applications +------------------------------ + +This list is very out of date! A +`Google Scholar search on "clawpack software" +`__ +gives hundreds of hits that may be of interest. + +For GeoClaw applications, see also `www.geoclaw.org +`__ for additional references and other links. + +.. [CalHelLeV08] + D. A. Calhoun, C. Helzel, and R. J. LeVeque. + `Logically Rectangular Grids and Finite Volume Methods for PDEs in + Circular and Spherical Domains, + `_ + *SIAM Review* 50 (2008), 723-752. + +.. [LeVeque09] + R. J. LeVeque. + `Python Tools for Reproducible Research on Hyperbolic Problems + `_ + *Computing in Science and Engineering (CiSE)* 11(2009), pp. 19-27. + +.. [LeVYon03] + R. J. LeVeque and Darryl H. Yong. + Solitary Waves in Layered Nonlinear Media, + *SIAM J. Appl. Math* 63 (2003) pp. 1539-1560. + +.. [Mandli13a] + Mandli, K. T. + `A Numerical Method for the Two Layer Shallow Water Equations with Dry States.` *Ocean Modelling* 72, 80–91 (2013). + :: + + @article{Mandli:2013it, + author = {Mandli, Kyle T}, + title = {{A Numerical Method for the Two Layer Shallow Water Equations with Dry States}}, + journal = {Ocean Modelling}, + year = {2013}, + volume = {72}, + pages = {80--91}, + month = aug + } + +.. [Mandli13b] + Mandli, K. T. & Dawson, C. N. + `Adaptive Mesh Refinement for Storm Surge.` + *Ocean Modelling* 75, 36–50 (2014). + :: + + @article{Mandli:ws, + author = {Mandli, Kyle T and Dawson, Clint N}, + title = {{Adaptive Mesh Refinement for Storm Surge}}, + journal = {Ocean Modelling}, + year = {2014}, + volume = {75}, + pages = {36--50}} + +.. note:: Add more... + +Other references +---------------- + +.. [Okada85] + Y. Okada. + Surface deformation due to shear and tensile faults in a half-space, + Bull. Seism. Soc. Am.* 75 (1985), pp. 1135-1154. diff --git a/v5.10.x/_sources/bouss1d.rst.txt b/v5.10.x/_sources/bouss1d.rst.txt new file mode 100644 index 0000000000..9d86174d09 --- /dev/null +++ b/v5.10.x/_sources/bouss1d.rst.txt @@ -0,0 +1,121 @@ +.. _bouss1d: + +********************************************* +Boussinesq solvers in One Space Dimension +********************************************* + +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 1d 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 (SWE) 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 second-order derivatives in `xx` but no time derivatives. +In one space dimension, solving this equation requires solving a tridiagonal +linear system of equations in each time step. + +See :ref:`bouss2d` and [BergerLeVeque2023]_ for more discussion +of the Boussinesq-type equations SGN and MS that are implemented in GeoClaw. +We recommend using the Serre-Green-Naghdi (SGN) equations rather than +Madsen-Sorensen (MS), which has similar dispersive properties but +is less stable. + +.. _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`. + +The `Makefile` and `setrun.py` files must be modified from those used +for SWE as described below. +See the examples with names like `$CLAW/geoclaw/examples/1d/bouss_*` +for sample files to use as a template. + +.. _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, which in one space dimension yields 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 libraries 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 +`$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 +^^^^^^^^^ + + +To use the Boussinesq solvers, somewhere in the `setrun` function you +must include :: + + from clawpack.geoclaw.data import BoussData1D + rundata.add_data(BoussData1D(),'bouss_data') + +and then the following parameters can be adjusted (the values shown here +are the default values that will be used if you do not specify a value +directly):: + + rundata.bouss_data.equations = 2 # 0=SWE, 1=MS, 2=SGN + rundata.bouss_data.deepBouss = 5. # depth (meters) to switch to SWE + +The `rundata.bouss_data` object has attributes: + +- `bouss_equations`: The system of equations being solved. Setting this to 2 + gives the recommended SGN equations. + + The value `alpha = 1.153` recommended for SGN is + hardwired into `$CLAW/geoclaw/src/2d/bouss/bouss_module.f90`. To change + this value, you must modify this module. (See :ref:`makefiles_library` + for tips on modifying a library routine.) Similarly, if you set + `bouss_equations = 1` for the Madsen-Sorensen equations, the recommended + parameter value `Bparam = 1/15` is set in `bouss_module.f90`. + + Setting `bouss_equations = 0` causes the code to revert to the shallow + water equations, useful for comparing dispersive and nondispersive results. + +- `bouss_min_depth`: The criterion used for switching from Boussinesq to SWE + in shallow water and onshore. If the original water depth `h` at time `t0` + is less than `bouss_min_depth` in a cell or any of its nearest neighbors, + then this cell is omitted from set of unknowns in the elliptic equation + solve and no dispersive correction terms are calculated for this cell. + +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`. +See :ref:`bouss2d_switch` for more discussion. diff --git a/v5.10.x/_sources/bouss2d.rst.txt b/v5.10.x/_sources/bouss2d.rst.txt new file mode 100644 index 0000000000..67673eee67 --- /dev/null +++ b/v5.10.x/_sources/bouss2d.rst.txt @@ -0,0 +1,308 @@ +.. _bouss2d: + +********************************************* +Boussinesq solvers in Two Space Dimensions +********************************************* + + +As of Version 5.10.0, GeoClaw includes the option to solve a +dispersive Boussinesq-type equation known as Serre-Green-Naghdi (SGN) +instead of the usual shallow water equations (SWE). +This equation and related depth-averaged equations have been used +extensively in the literature +to better model wave propagation in situations where the wavelength is not +sufficiently long relative to the fluid depth for the SWE +approximation to be accurate. Applications include the study +of tsunamis generated by landslides, asteroid impacts, or other localized +phenomena. Including dispersive terms has also been found to give more +realistic results for earthquake-generated tsunamis in some situations. +See [BergerLeVeque2023]_ for references to some of this literature along +with more discussion of the GeoClaw implementation and test problems. + +The one-dimensional version of these capabilities are +described in :ref:`bouss1d`. + +The SGN equations are still depth-averaged equations, with the same +conserved quantities (fluid depth `h` and momenta `hu` and `hv` in 2D) as the +shallow water equations (SWE), but the +equations contain higher order derivative terms and so they are no longer +hyperbolic and require implicit methods for efficient solution with a +physically reasonable time step. This adds considerable complexity to the +code since adaptive mesh refinement (AMR) is still supported. +The implementation proceeds by alternating time +steps on the shallow water equations (SWE) with the solution of elliptic +equations where the operator involves second order derivatives in `x` and `y` +of a new set of variables used to modify the momenta each time step. +The right hand side also involves third order derivatives of the topography. + +In two space dimensions, solving this +elliptic equation requires setting up and solving a sparse +linear system of equations in each time step, at each refinement level when +AMR is being used. All grid cells from all patches at +the same refinement level +are included in the linear system. Boundary conditions at the edge of +patches must be interpolated from coarser level solutions, in much the same +way that the boundary conditions for `h`, `hu`, and `hv` are interpolated +when solving the SWE with AMR. Because the solution of the elliptic system +yields correction terms to the momenta (denoted here by `huc` and `hvc`), +when solving the Boussinesq equations the array `q` of state variables +is expanded to include these correction terms as well, and so the number of +equations and variables is 5 instead of 3. This change must be made in +`setrun.py`, along with other changes discussed below, in order to use +the Boussinesq solvers. + +Currently the only linear system solver supported for solving the large +sparse elliptic systems is `PETSc `_, +which can use MPI to solve these these systems. Using the Boussinesq solvers +requires these prerequesites, as discussed further in :ref:`bouss2d_prereqs`. + +See [BergerLeVeque2023]_ for more discussion of the equations solved and the +AMR algorithms developed for these equations. + +.. _bouss2d_eqns: + +Boussinesq-type dispersive equations +------------------------------------ + +The equations we solve are not the original depth-averaged dispersive +equations derived by Boussinesq, but for simplicity +in this documentation and the code, we often refer to the +equations simply as "Boussinesq equations", following common practice. +Many variants of these equations have been derived and fine-tuned to +better match the dispersion relation of the linearized +`Airy wave theory `__ +and to incorporate variable bottom topography. + +Two variants are currently implement in GeoClaw, described below. +In practice we recommend using only the SGN equations, which we have found +to be more stable. + +.. _bouss2d_sgn: + +The SGN equations +----------------- + +The Serre-Green-Naghdi (SGN) equations implemented in GeoClaw +are generalized to include 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]_. +The value `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. +This value is +hardwired into `$CLAW/geoclaw/src/2d/bouss/bouss_module.f90`. To change +this value, you must modify this module. (See :ref:`makefiles_library` +for tips on modifying a library routine.) +Setting `alpha = 1` gives the original SGN equations. + + +.. _bouss2d_ms: + +The Madsen-Sorensen (MS) equations +---------------------------------- + +Primarily for historical reasons, GeoClaw also includes an implementation of +another Boussinesq-type dispersive system, the Madsen-Sorensen (MS) equations. +These equations also give a good approximation to the linear dispersion +relation of the Airy solution when the parameter `Bparam = 1/15` is used, +which is hardwired into `$CLAW/geoclaw/src/2d/bouss/bouss_module.f90`. +These equations were used in an earlier GeoClaw implementation +by Jihwan Kim, known as BoussClaw [KimEtAl2017]_. +This implementation was successfully used in a number of studies +(see [BergerLeVeque2023]_ for some citations). +However, extensive tests with these equations have revealed stability issues, +particularly with the use of AMR, which have also been reported by others. +Implementations of MS in both 1D and 2D are included in GeoClaw, +but are generally not +recommended except for those interested in comparing different +formulations for small numbers of time steps, +and perhaps further investigating the stability issues. + +.. _bouss2d_usage: + +Using the 2d Boussinesq code +---------------------------- + +Provided the :ref:`bouss2d_prereqs` have been installed, switching from the +SWE to a Boussinesq solver in GeoClaw requires only minor changes to +`setrun.py` and the `Makefile`. + +See the files in `$CLAW/geoclaw/examples/bouss/radial_flat` for an example. + + +.. _bouss2d_setrun: + +setrun.py +^^^^^^^^^ + +As mentioned above, it is necessary to set:: + + clawdata.num_eqn = 5 + +instead of the usual value 3 used for SWE, since correction terms for the +momenta are also stored in the `q` arrays to facilitate interpolation to +ghost cells of finer level patches each time step. + +It is also necessary to set some parameters that are specific to the +Boussinesq solvers. Somewhere in the `setrun` function you must include :: + + from clawpack.geoclaw.data import BoussData + rundata.add_data(BoussData(),'bouss_data') + +and then the following parameters can be adjusted (the values shown here +are the default values that will be used if you do not specify a value +directly):: + + rundata.bouss_data.bouss_equations = 2 # 0=SWE, 1=MS, 2=SGN + rundata.bouss_data.bouss_min_level = 1 # coarsest level to apply bouss + rundata.bouss_data.bouss_max_level = 10 # finest level to apply bouss + rundata.bouss_data.bouss_min_depth = 10. # depth (meters) to switch to SWE + rundata.bouss_data.bouss_solver = 3 # 3=PETSc + rundata.bouss_data.bouss_tstart = 0. # time to switch from SWE + +These parameters are described below: + +- `bouss_equations`: The system of equations being solved. Setting this to 2 + gives the recommended SGN equations, while 1 gives Madsen-Sorensen. + + Setting `bouss_equations = 0` causes the code to revert to the shallow + water equations, useful for comparing dispersive and nondispersive results. + (But if `bouss_data` is being set, it still requires `clawdata.num_eqn = 5` + and the two new components in q are always 0 in this case, so this is + slightly less efficient than using the standard GeoClaw.) + +- `bouss_min_level`: The minimum AMR level on which Boussinesq correction + terms should be applied. In some cases it may be desirable to use the SWE + on the coarsest grids in the ocean while Boussinesq corrections are only + applied on fine levels near shore, for example. + +- `bouss_max_level`: The finest AMR level on which Boussinesq correction + terms should be applied. In some cases it may be desirable to use the SWE + only on coarser grids if the finest level grid only exists in very shallow + regions or onshore, where the the equations switch to SWE for inundation + modeling. Since much of the computational work is often on the finest level, + avoiding the Boussinesq terms altogether on these levels may be advantageous + in some situations. + +- `bouss_min_depth`: The criterion used for switching from Boussinesq to SWE + in shallow water and onshore. If the original water depth `h` at time `t0` + is less than `bouss_min_depth` in a cell or any of its nearest + neighbors in a 3-by-3 neighborhood, + then this cell is omitted from set of unknowns in the elliptic equation + solve and no dispersive correction terms are calculated for this cell. + This is discussed further below in :ref:`bouss2d_switch`. + +- `bouss_solver`: What linear system solver to use. Currently only the value + 3 for `PETSc`_ is recognized. + +- `bouss_tstart`: The time `t` at which to start applying Boussinesq terms. + Normally you will want this to be less than or equal to `t0`, the starting + time of the calculation (which is not always 0). However, + there are some cases in which the initial data results in extreme + motion in the first few time steps and it is necessary to get things going + with the SWE. For most applications this is not necessary and you need + only change this parameter if you are solving a problem for which `t0 < 0`. + +.. _bouss2d_makefile: + +Makefile +^^^^^^^^ + +You can copy the `Makefile` from +`$CLAW/geoclaw/examples/bouss/radial_flat/Makefile` and make any adjustments +needed. + +This `Makefile` reads in the standard Boussinesq solver file +`$CLAW/geoclaw/src/2d/bouss/Makefile.bouss`, which lists the Fortran modules +and source code files that are used by default from the library +`$CLAW/geoclaw/src/2d/bouss`, or from `$CLAW/amrclaw/src/2d` or +`$CLAW/geoclaw/src/2d/shallow` in the case of files that did not need to +be modified for the Boussinesq code. + +Two `Makefile` variables `PETSC_DIR` and `PETSC_ARCH` must be set (perhaps as +environment variables in the shell from which `make` is invoked). These are +described further below in :ref:`bouss2d_prereqs`. + +The `FFLAGS` specified in the `Makefile` should include `-DHAVE_PETSC` +to indicate that `PETSc` is being used, necessary when compiling the +source code for Boussinesq solvers. + +The `Makefile` should also include a line of the form:: + + PETSC_OPTIONS=-options_file $(CLAW)/geoclaw/examples/bouss/petscMPIoptions + +with a pointer to the file that sets various `PETSc` options. The file +`$CLAW/geoclaw/examples/bouss/petscMPIoptions` gives the options used in +the examples, which may be adequate for other problems too. +This file includes some comments briefly explaining the options set. +We use a GMRES Krylov space method as the main solver +and algebraic multigrid as the preconditioner. +For more about the options for these methods, see: + + - https://petsc.org/release/manualpages/KSP/KSPSetFromOptions + - https://petsc.org/release/manualpages/PC/PCSetFromOptions/ + + +In addition to a line of the form :: + + EXE = xgeoclaw + +that specifies the name and location of the executable to be generated, the +`Makefile` should also contain a line of the form:: + + RUNEXE="${PETSC_DIR}/${PETSC_ARCH}/bin/mpiexec -n 6" + +This is the command that should be used in order to run the executable. +In other words, if you set `PETSC_DIR` and `PETSC_ARCH` as environment +variables, and the executable is named `xgeoclaw` as usual, then the command :: + + $PETSC_DIR/$PETSC_ARCH/bin/mpiexec -n 6 xgeoclaw + +given in the shell should run the executable (invoking MPI with 6 processes in +this example). If this does not work then one of the environment variables +may be set incorrectly to find the `mpiexec` command. + + +.. _bouss2d_prereqs: + +Prerequisites for the 2d Boussinesq code +---------------------------------------- + +Currently the only linear solver supported is `PETSc`, so this must be +installed, see ``__ for instructions +and also note the `PETSc prerequisites +`__. +Note that MPI, LAPACK, and the BLAS are required and will be installed as +part of installing PETSc. If you already have some of the prerequisites +installed, be sure to read `Configuring PETSc +`__ +before installing. + +The environment variables `$PETSC_DIR` and `$PETSC_ARCH` must be set +appropriately based on your PETSc installation, either as environment +variables or directly in the `Makefile`. +See the PETSc documentation page +`Environmental Variables $PETSC_DIR And $PETSC_ARCH `__. + +.. _bouss2d_switch: + +Wave breaking and switching to SWE +---------------------------------- + +The `bouss_min_depth` 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 commonly used 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`. + + +Examples +-------- + +In addition to one example application included in GeoClaw, found in the +directory `$CLAW/geoclaw/examples/bouss/radial_flat`, several other examples +of usage can be found in the code repository +https://github.com/rjleveque/ImplicitAMR-paper, which was +developed to accompany the paper [BergerLeVeque2023]_. diff --git a/v5.10.x/_sources/changes_to_master.rst.txt b/v5.10.x/_sources/changes_to_master.rst.txt new file mode 100644 index 0000000000..cfb3f90b3d --- /dev/null +++ b/v5.10.x/_sources/changes_to_master.rst.txt @@ -0,0 +1,91 @@ +:orphan: + +.. _changes_to_master: + +=============================== +Changes to master since v5.9.2 +=============================== + + +Follow the links to see changes that have been made to the master branch of +each repository since the last release (v5.9.2) on November 4, 2023. + +These changes should appear in the next release. If you need them now, +see :ref:`developers` for instructions on cloning and installing from the +master branch. + +To see documentation that has already been developed to accompany any new +features listed below, click on the "dev" branch of the documentation, in +the menu on the left hand side of this page. + +Changes that are not backward compatible +---------------------------------------- + + +General changes +--------------- + + +Changes to classic +------------------ + + +See `classic diffs +`_ + +Changes to clawutil +------------------- + + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + + +See `geoclaw diffs `_ + + +Changes to PyClaw +------------------ + + +See `pyclaw diffs `_ + +=========================== +Other Clawpack Repositories +=========================== + +The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest. + +- `apps diffs + `_ + +- `doc diffs + `_ + +- `docker-files diffs + `_ diff --git a/v5.10.x/_sources/claw43to46.rst.txt b/v5.10.x/_sources/claw43to46.rst.txt new file mode 100644 index 0000000000..65ab38d858 --- /dev/null +++ b/v5.10.x/_sources/claw43to46.rst.txt @@ -0,0 +1,30 @@ + +.. _claw43to46: + +########################################## +Converting from Clawpack 4.3 to 4.6 +########################################## + +For users who want to migrate code from 4.3 to 5.0, this may be a useful +intermediate step, followed by migration from 4.6 to 5.0 using the script +described at :ref:`claw46to50`. + +The Python interface (using `setrun.py` and `setplot.py`) was first +introduced in 4.4, so the main step needed to convert from 4.3 is to create +these files, and to make a number of changes to the `Makefile`. + +If you are doing this by hand, you should convert directly to 5.0 form. + +In some cases it will be easiest to do the bulk of the work using scripts. +A first pass of conversion to 4.6 form can be done by executing:: + + $ python $CLAW/clawutil/src/python/clawutil/conversion/convert43to46.py + +in your application directory. You should then inspect the files generated +and fix any broken links, etc. + +After this, see :ref:`claw46to50`. + +.. warning:: This migration script from 4.3 to 4.6 only works for classic + (single grid) codes in 1d and 2d, not AMRClaw codes. + diff --git a/v5.10.x/_sources/claw46to50.rst.txt b/v5.10.x/_sources/claw46to50.rst.txt new file mode 100644 index 0000000000..c5e0c593f4 --- /dev/null +++ b/v5.10.x/_sources/claw46to50.rst.txt @@ -0,0 +1,74 @@ + +.. _claw46to50: + +########################################## +Converting from Clawpack 4.6 to 5.0 +########################################## + +(If you are converting code from Clawpack 4.3, see :ref:`claw43to46`.) + +Many input parameters have been renamed and some new options have been +added in Clawpack 5.0. See :ref:`setrun_changes`. + +Python conversion tool +---------------------- + +A first pass at the conversion of *setrun.py*, *setplot.py* and the +*Makefile* can often be achieved by typing:: + + $ python $CLAW/clawutil/src/python/clawutil/conversion/convert46to50.py + +in your application directory. You should then inspect the files generated +and fix any broken links, etc. + +The original versions of various files will have `_4.x` appended to the file +name for reference. When conversion is complete, these files can be +deleted. + + +**Notes:** + +This does not yet work for all variants of the code. + +Old AMRClaw codes are often in a subdirectory *amr* of an application +directory, and the directory above may contain Fortran files or other files +used by the AMR code. Typically you will want to combine these in one +directory. + +The `Makefile` is currently not converted properly -- a generic `Makefile` +is added to the directory but must be customized to point to any local +Fortran codes, for example. In particular, make sure the Makefile points to +the correct Riemann solver(s), either a local file or a library routine from +the `$CLAW/riemann/src` directory. + +The indices in `q` and `aux` arrays were permuted in Clawpack 5.0 relative +to early versions, e.g. the `m`th component of `q` in grid cell `(i,j)` is +now `q(m,i,j)` rather than `q(i,j,m)`. The conversion script attempts to do +this reordering if it sees a pattern of a suitable form, but you should +carefully check your own local routines such as `qinit` or `setaux` to make +sure this has been done properly. + +Calling sequences of several routines have also been changed and will need +to be adjusted by hand for any Fortran routines in your application directory. +See :ref:`user_routines` for calling sequences of the routines that +most frequently are provided by users. If you specify your own +Riemann solver, see also :ref:`riemann`, and if you have custom +boundary conditions, see :ref:`bc`. + +Note in particular that parameter `maxmx` (and `maxmy`, `maxmz` in more +dimensions) is no longer in the calling sequence. In earlier versions of +Clawpack this indicated the declared dimension of the `q` and `aux` arrays. +It is now assumed the arrays are dimensioned properly since dynamic memory +allocation is generally used at run time based on `mx` (resp. `my`, `mz`). +You should remove these from the calling sequence and also modify the +declaration of input parameters to use `mx` in place of `maxmx`, etc. + +The classic code no longer requires a driver routine `driver.f`. In earlier +versions of Clawpack this was used to declare the `q` and `aux` arrays to be +sufficiently large for the size of the problem to be solved. (And +specifying a larger value for `mx` led to a run-time error.) In Clawpack-5, +a library routine `driver.f90` is provided that calls the Clawpack routines, +which now use dynamic memory allocation to allocate the required arrays at +run time. + + diff --git a/v5.10.x/_sources/claw4x.rst.txt b/v5.10.x/_sources/claw4x.rst.txt new file mode 100644 index 0000000000..bcfe000f84 --- /dev/null +++ b/v5.10.x/_sources/claw4x.rst.txt @@ -0,0 +1,14 @@ +:orphan: + +.. _claw4x: + +########################## +Clawpack 4.x links +########################## + + +Many existing codes based on Clawpack use some flavor of Clawpack 4.x, +including code that has been archived to accompany past publications. + +See the `Clawpack 4.x homepage `_ +for links to the code and documentation. diff --git a/v5.10.x/_sources/clawpack5.rst.txt b/v5.10.x/_sources/clawpack5.rst.txt new file mode 100644 index 0000000000..2868096d0c --- /dev/null +++ b/v5.10.x/_sources/clawpack5.rst.txt @@ -0,0 +1,227 @@ +:orphan: + +.. _clawpack5: + + +================================ +Changes in Clawpack 5.0 +================================ + +Clawpack 5.0 is a major reorganization of the Clawpack code base that has +been going on for several years. + +PyClaw in 5.0 +------------- + +The extensive PyClaw code base is now incorporated into Clawpack. See +:ref:`clawpack_packages` for more about how PyClaw relates to the other +:ref:`clawpack_components`. For recent changes in PyClaw, see the +`PyClaw changelog `_. + +Fortran package changes +----------------------- + +The rest of this page concerns the Fortran components of Clawpack. + +There is no complete list of changes since it has evolved to be very +different from the 4.x version of Clawpack in organization, but some of +major changes that affect users are listed below. + +Some tools are available to assist users in converting code from earlier +versions. To go from Clawpack 4.6 to 5.0, see +:ref:`claw46to50`. Some older Clawpack 4.3 code can be first converted +to 4.6 form using :ref:`claw43to46`. + +If you wish to view recent changes on GitHub, +note that Clawpack is an *organization*, meaning that it is +comprised of several repositories. Go to the +`Clawpack GitHub `_ +webpage to view all the repositories. Major changes that are specific +to PyClaw since its initial release in 2012 are listed in the +`PyClaw changelog `_. + +You might also view the +`issues `_ +associated with each Clawpack repository on +GitHub to see what bugs and features we are working on. + +**Some of the major changes:** + +* In all of the Clawpack codes, indices of the primary arrays `q` (for + the solution) and `aux` (for auxiliary variables) have been reordered for + better cache performance and to interface better with the PETSc code (used + in as an option in PyClaw). For example, in the two-dimensional Clawpack + 4.x code, `q(i,j,m)` denoted the m'th component of the solution vector in + the `(i,j)` grid cell. With this convention the various components of the + solution in a single grid cell are scattered in memory with a stride of + `mx*my`. + In Clawpack 5.0, the indexing for the same value is `q(m,i,j)` so that + the components of `q` in a single grid cell are continguous in memory. + + Note that this means user routines such as `qinit.f`, `setaux.f`, + and Riemann solvers must be modified. + +* The calling sequence of Riemann solvers has been modified by adding + `maux` (the number of auxiliary variables) as another parameter. + This is required because of the reordering of indices so that + `aux(ma,i,j)` is now the `ma` element of the `aux` vector in the `(i,j)` + cell. The leading dimension of `aux` is assumed to be `maux` and is + required in declaring this variable. + +* Calling sequences of many subroutines have changed, so users converting + code from Clawpack 4.x should carefully compare the calling sequences in + any custom Fortran code to those in relevant examples, or to the default + versions in the libraries. + +* Many Riemann solvers for different applications are now found in the + `riemann repository `_. + In the future major changes may be made to the form of the Riemann solvers + to allow more flexibility. + +* The names of many input variables in `setrun.py` have been changed to + clean things up and be more systematic. Several options that used to be + specified by obscure means have been clarified, and some new options have been + added. For details and documentation on the new parameters, see: + + * :ref:`setrun_changes` + * :ref:`setrun` + * :ref:`setrun_amrclaw` + * :ref:`setrun_geoclaw` + +* The directory structure has been reorganized. See + :ref:`clawpack_components`. + +* Some regression tests have been added to the `classic`, `amrclaw`, + and `geoclaw` directories in subdirectories named `tests`. + `Travis `_ is now used for continuous integration + testing during development. + +* The 3d single-grid and AMRClaw code, missing since Version 4.3, + has been updated to conform with 1d and 2d style. In particular, + the inputs can now be specified using `setrun.py`. + +* Three-dimensional plotting routines in Python are still under + construction, so currently there is no capability to use `setplot.py` + to specify the desired plots or `make plots` to produce them. However, + the Matlab plotting routines have been updated and are now found in + Visclaw. See :ref:`matlabplots`. It is also possible to render 3d + plots using the VisIt GUI, see :ref:`visit_plotting`. + +* The classic single-grid Clawpack code (without AMR) is now in the + `classic` directory and the `classic repository + `_ on GitHub. Some new + capabilities have been added, e.g.: + + * OpenMP parallelization has been added to the 3d codes. + See :ref:`openmp`. + + +* The AMRClaw code is now in the + `amrclaw repository `_. + Some new capabilities have been added, e.g.: + + * It is now possible to specify refinement *regions*, previously only + supported in GeoClaw. For a description, see :ref:`refinement_regions`. + +* The GeoClaw code is now in the + `geoclaw repository `_. + Some new capabilities have been added, e.g.: + + * There is an improved set of tools for monitoring the maximum depth or + surface elevation seen over a fixed grid, and the first arrival times. + See :ref:`fgmax`. + + + + +.. _setrun_changes: + +Changes to input parameters in setrun.py from 4.x to 5.0 +---------------------------------------------------------- + +Changes to general parameters +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* Many names have been changed, e.g. + + * `ndim` to `num_dim` + * `xlower`, `ylower`, `zlower` are now `lower[0], lower[1], lower[2]`. + * `xupper`, `yupper`, `zupper` are now `upper[0], upper[1], upper[2]`. + * `mx, my, mz` are now `num_cells[0:3]`. + + There are many other such changes. It is best to take a look at the + `setrun.py` for an example in `$CLAW/classic/examples`. + +See also: + + * :ref:`setrun` + * :ref:`claw46to50` + +Changes to AMR parameters +^^^^^^^^^^^^^^^^^^^^^^^^^ + +* The `rundata` object generally defined in `setrun.py` now has an + attribute `rundata.amrdata` and AMR parameters are attributes of this + object. Most names of attributes have changed from those used in 4.x. + +* Setting `mxnest` negative to indicate that anisotropic refinement + in different directions might be used has been eliminated. + Now this is always assumed and one must always specify + refinement ratios in each direction and in time. + +* New attributes have been added to indicate whether Richardson + extrapolation and/or the routine ins `flag2refine` should be used + to flag cells for refinement. See :ref:`refinement`. + +* The capability of using "regions" to specify areas where refinement is + forced or prohibited has been extended from GeoClaw to AMRClaw. + See :ref:`refinement_regions`. + +See also: + + * :ref:`setrun_amrclaw` + * :ref:`claw46to50` + + +Changes to GeoClaw parameters +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +A number of changes have been made to parameter names and also functionality +in some cases. + +See also: + + * :ref:`setrun_geoclaw` + * :ref:`claw46to50` + + +Changes to plotting routines +----------------------------- + +The plotting routines are now in Visclaw, see :ref:`plotting`. + +The Matlab tools from version 4.x have been updated a bit and many examples +once again include `.m` files for users who wish to plot using Matlab. + +The Python routines have also been updated. For the most part older +versions of `setplot.py` should still work, with a few exceptions: + + * In AMR the individual grids are now called "patches" rather than "grids". + This caused a few changes in attribute names in :ref:`ClawPlotItem`: + + * The old `plot_type` named `2d_grid` has been renamed `2d_patch` + * The old attirbute `gridlines_show` has been renamed `celledges_show` + * The old attirbute `grideges_show` has been renamed `patchedges_show` + +To use the interactive plotting tool `Iplotclaw`, you now need to import +this via:: + + from clawpack.visclaw.Iplotclaw import Iplotclaw + +See :ref:`plotting_python` for more information. + + + + + + diff --git a/v5.10.x/_sources/clawpack_components.rst.txt b/v5.10.x/_sources/clawpack_components.rst.txt new file mode 100644 index 0000000000..06cdc5b75e --- /dev/null +++ b/v5.10.x/_sources/clawpack_components.rst.txt @@ -0,0 +1,47 @@ + +.. _clawpack_components: + +=================== +Clawpack components +=================== + + +Clawpack is developed using the `git `_ version control +system and all the source code is openly available via the +`Clawpack GitHub Organization `_. + +The code is organized in several independent git repositories. One of these +is the `clawpack/clawpack `_ +super-repository that is used to coordinate versions between other +repositories. If you are interested in cloning the code directly from +GitHub and/or helping develop Clawpack, see :ref:`developers`. + +After installing Clawpack, you should have a top level directory that has the +following subdirectories: + +* `classic` (Classic single-grid Fortran code) +* `amrclaw` (:ref:`amrclaw`, AMR version of Fortran code) +* `riemann` (:ref:`riemann`, in Fortran, also used by PyClaw) +* `geoclaw` (:ref:`geoclaw` for geophysical flows) +* `clawutil` (Utility functions, Makefile.common used in multiple repositories) +* `pyclaw` (:ref:`pyclaw/index`, Python version that includes SharpClaw and PETSc parallelization) +* `visclaw` (Python graphics and visualization tools) + +These correspond to individual GitHub repositories in the +`Clawpack GitHub Organization `_. + +.. _other_repos: + +Other repositories +----------------------- + +Other repositories in the +`Clawpack GitHub Organization `_ +may be of interest to some users: + +* `apps` contains additional applications, see :ref:`apps`. +* `doc` contains `sphinx `_ input files for the + Clawpack documentation, see :ref:`howto_doc` +* `clawpack.github.com` contains the html files that appear on the web. +* `clawpack-4.x` contains the latest version of + `Clawpack 4.x `_, the legacy code. diff --git a/v5.10.x/_sources/community.rst.txt b/v5.10.x/_sources/community.rst.txt new file mode 100644 index 0000000000..c671767686 --- /dev/null +++ b/v5.10.x/_sources/community.rst.txt @@ -0,0 +1,162 @@ + +.. _community: + +Clawpack Community +================== + +**We welcome new users!** + +We also welcome new contributors; see :ref:`developers` for tips on +contributing code or new examples. + +If you run into problems or can't find the answer to +your question in these docs, please send a note to the +`claw-users google group +`_. + +**Slack channel.** +Along with the google group we also have created a slack +workspace. If you would like to join please `fill out this +form `_. + +We are also starting to experiment with the following: +(Warning: they are not actively used.) + +- `clawpack on Gitter `_ + (Sign in with your github account if you want to post a comment or ask a + question.) + +- `clawpack on twitter `_. + +**Bug reports and suggested improvements** + +If you find a bug or want to suggest an improvement, please raise an issue +on the appropriate GitHub repository, for example: + +- ``_ for general Clawpack + issues, +- ``_ for documentation issues, +- ``_ for visualization issues, +- ``_ for PyClaw, +- ``_ for the classic code, +- ``_ for AMRClaw, +- ``_ for GeoClaw. + +**We welcome new contributors and developers!** + +See :ref:`photos` for some photos of the team. + +The pages below give some tips for those who want to get involved. + +- :ref:`contribute_apps` for ideas on how to make applications or examples + you've developed available to other users. + +- :ref:`developers` for instructions on how to clone the git repositories, + create your own forks, issue pull requests, etc. + +- Join or browse the `claw-dev google group + `_ + to track discussion on the code. + +.. _tutorials: + +User Workshops, Clinics, and Tutorials +--------------------------------------- + +Available for streaming +^^^^^^^^^^^^^^^^^^^^^^^ + +- The `Clawpack youtube channel + `__ + now has several videos on aspects of GeoClaw. Additional introductory + videos on Clawpack more generally will be added. + +- `The GeoClaw software and tsunami modeling + `__ + Webinar for CSDMS in 2019 by Randy LeVeque + +Upcoming +^^^^^^^^ + +Please join us at one of the upcoming sessions, or help plan one elsewhere... + +- None currently scheduled. + +Recent +^^^^^^^^ + +- GeoClaw webinars and user help sessions + planned as part of the 2020 `CSDMS Annual Meeting + `__ + took place online due to COVID-19, on May 22, 2020. + Four short presentations can be found on the `Clawpack youtube channel + `__. + For titles and links to related slides and resources, see the + `workshop webpage `__. + +- Tutorial on storm surge modeling with GeoClaw, Tulane University, as part + of the `Clifford Lectures `_, April, 2017. + +- Minisymposterium on Clawpack and GeoClaw at + at the `SIAM CSE 2017 Conference `_, + February/March, 2017. + +- `Clinic at the CSDMS Annual Meeting + `_ + in Boulder, CO, May 2016. + +- Minisymposterium on + `Clawpack Development, Extensions and Applications + `_ + at the `SIAM CSE 2015 Conference `_ + + +.. _workshops: + +Developer Workshops and Sprint Sessions +---------------------------------------- + +Upcoming +^^^^^^^^ + +Please join us at one of the upcoming sessions, or help plan one elsewhere... + +- None currently scheduled. + + +Previous +^^^^^^^^ + +See the links below for summaries of some projects that +have been tackled (and/or are still work in progress). + +- `GeoClaw Developers Workshop `__ + held via Zoom in conjunction with the `CSDMS Annual Meeting + `__, + May 22-23, 2020. + +- `GeoClaw Developers Workshop `__, + May 25-28, 2018, at the Univesity of Colorado, immediately following the + `CSDMS Annual Meeting `_. + +- Developers' workshop at the University of Washington, August + `2016 `_. + +- Developers' workshop at the University of Utah in + `2015 `_, + following the + `SIAM CSE Conference `_. + +- :math:`[HPC]^3` workshops at KAUST in + `2011 `_, + `2012 `_, + `2014 `_ + +- Claw-Dev workshop at UW in `2013 `_ + + +Other Clawpack events +--------------------- + +- `Clawpack swag `__ + is now available! diff --git a/v5.10.x/_sources/contents.rst.txt b/v5.10.x/_sources/contents.rst.txt new file mode 100644 index 0000000000..713b783043 --- /dev/null +++ b/v5.10.x/_sources/contents.rst.txt @@ -0,0 +1,189 @@ +.. _contents: + +`The Clawpack Homepage `__ contains a general introduction to +the Clawpack open source software project. + +.. contents:: + :depth: 3 + +==================================================== +Full Table of Contents +==================================================== + +This is the documentation for the latest version of Clawpack. +For documentation corresponding to older versions see the list of +past releases in the menu to the left. The *future* version refers +to new documentation for features that have been merged into the +master branch of a Clawpack repository, but have not yet been +released. To use one of these features, see :ref:`setup_dev`. + +**What's New??** For release notes, summaries of changes between releases, +and links to all the Github commit logs, see :ref:`releases`. + +Overview and Getting Started +============================ + +.. toctree:: + :maxdepth: 2 + + about + +.. toctree:: + :maxdepth: 1 + + releases + packages + installing + installing_pip + installing_fortcodes + setenv + first_run + clawpack_components + wp_algorithms + trouble + +.. toctree:: + :maxdepth: 1 + + docker_image + vm + aws + + +Examples and Applications +============================ + + +.. toctree:: + :maxdepth: 1 + + apps + galleries + fvmbook + contribute_apps + testing + sphinxdoc + +.. _contents_fortcodes: + +Classic, AMRClaw, and GeoClaw +============================== + +Using the Fortran codes +------------------------- +General information that applies to Classic, AMRClaw, and GeoClaw. + +.. toctree:: + :maxdepth: 1 + + first_run_fortran + fortran + fortran_compilers + f77_vs_f90 + user_routines + openmp + timing + python + makefiles + makefiles_library + b4run + application_documentation + setrun + setrun_sample + bc + output_styles + mapc2p + restart + newapp + sharing + gpu + +AMRClaw: adaptive mesh refinement +--------------------------------- + +.. toctree:: + :maxdepth: 2 + + amrclaw + +GeoClaw: geophysical flows +-------------------------- + +.. toctree:: + :maxdepth: 2 + + geoclaw + +PyClaw +====== + +.. toctree:: + :maxdepth: 2 + + pyclaw/index + + +Riemann +======= + +All Clawpack packages make use of the same collection of Riemann solvers. + +See also the new book `Riemann Problems and Jupyter Solutions +`_ (SIAM, 2020), +which consists of a set of Jupyter notebooks illustrating +the basic concepts of Riemann problems and approximate solvers. + +.. toctree:: + :maxdepth: 2 + + riemann + riemann/Shallow_water_Riemann_solvers + +VisClaw: Plotting and Visualization Tools +========================================= + +.. toctree:: + :maxdepth: 2 + + plotting + + +Migrating applications from older versions of Clawpack +====================================================== +If you are looking to run an application that was written +for Clawpack 4.x, this may be helpful. + +.. toctree:: + :maxdepth: 2 + + claw43to46 + claw46to50 + +.. _contents-developers-resources: + +Developers' resources +===================== + +.. toctree:: + :maxdepth: 1 + + community + developers + howto_doc + howto_release + regression + git_versions + photos + +See also :ref:`setup_dev` + +References +========== + +.. toctree:: + :maxdepth: 1 + + fvmbook + biblio + + diff --git a/v5.10.x/_sources/contribute_apps.rst.txt b/v5.10.x/_sources/contribute_apps.rst.txt new file mode 100644 index 0000000000..4deb6d39fa --- /dev/null +++ b/v5.10.x/_sources/contribute_apps.rst.txt @@ -0,0 +1,20 @@ + +.. _contribute_apps: + +Contributing examples and applications +====================================== + +The :ref:`apps` contains a few examples of applications that can be solved +using Clawpack. We hope to greatly expand this repository in the future. + +Contributions from users are desired. We are still working out the best way +to collect applications. One possibility is to use git submodules. +For now you can issue a pull request to +`https://github.com/clawpack/apps `_. + +Stay tuned for more details.... + +Of course you can always post your results using the techniques described in +:ref:`sharing`. + + diff --git a/v5.10.x/_sources/current_data.rst.txt b/v5.10.x/_sources/current_data.rst.txt new file mode 100644 index 0000000000..585179a4db --- /dev/null +++ b/v5.10.x/_sources/current_data.rst.txt @@ -0,0 +1,112 @@ + + +.. _current_data: + +*************** +current_data +*************** + +The Python plotting routines often allow the user to specify a call back +function as plotting parameters, for example :ref:`ClawPlotAxes` has an +attribute *afteraxes* that can be set to a function to be executed after +performing all plots on the specified axes. This is useful for setting +parameters for these axes that are not covered by the provided attributes, +for annotating the plots on these axes, for adding a plot of the true +solution, etc. + +Call back functions include: + + * *beforeframe* and *afterframe* attributes of :ref:`ClawPlotData` + * *afteraxes* attribute of :ref:`ClawPlotAxes` + * *afteritem*, *afterpatch*, *plot_var*, *map2d_to_1d* attributes of :ref:`ClawPlotItem` + + +All of these functions are designed to take a single argument +*current_data*, an object with attributes that may be useful to the user in +evaluating the function. + +.. warning:: :ref:`mapc2p` is one exception that does not take argument *current_data*. + + + +Attributes of *current_data*: +----------------------------- + +Some of these may be unavailable because they don't make sense in the +current context, e.g. in a *beforeframe* function. + +.. attribute:: plotdata : + + parent :ref:`ClawPlotData` object. From this object virtually any + relevant data can be accessed. Other attributes are defined for + convenience. If you find you frequently + need something else, you could modify :mod:`pyclaw.plotters.frametools` + to add this to *current_data*. + + +.. attribute:: frameno : + + The current frame number + +.. attribute:: patch : + + Object of :class:`pyclaw.solution.patch` with data for the last patch + plotted. + +.. attribute:: patchno : + + Grid number of this patch, of interest only in AMR calculations. + +.. attribute:: q : + + q array for current frame, so for example the in a scalar 2d problem the + value in the (i,j) cell would be *current_data.q[0,i,j]* (remember that + Python always indexes starting at 0). + + In an AMR calculation q will be from the last patch plotted. + +.. attribute:: aux : + + aux array for current frame, provided these have been output by the + Fortran code. At the moment this requires modifying the library routine + `outN.f` to set outaux = .true. so that fort.a files are produced along + with fort.q files. [This should be an input parameter!] + + If fort.a files are not found then current_data.aux will be None. + + In an AMR calculation aux will be from the last patch plotted. + +.. attribute:: var : + + array of the variable actually plotted most recently, e.g. if + *plotitem.plot_var == 0* then in 2d *current_data.var[i,j] == + current_data.q[0,i,j]*. + +.. attribute:: level : + + For AMR computations, where *current_data.patch* is for the last patch plotted, + *current_data.level* is the AMR level of this patch. Particularly useful + in `afterpatch` functions. + +.. attribute:: t : + + the current time t. + +.. attribute:: x : + + x array of cell centers corresponding to *current_data.q*. + +.. attribute:: y : + + y array of cell centers corresponding to *current_data.q* (only in 2d). + +.. attribute:: xlower : + + left edge of current patch. + +.. attribute:: ylower : + + left edge of current patch in y (only in 2d). + + + diff --git a/v5.10.x/_sources/developers.rst.txt b/v5.10.x/_sources/developers.rst.txt new file mode 100644 index 0000000000..26884e6a7e --- /dev/null +++ b/v5.10.x/_sources/developers.rst.txt @@ -0,0 +1,410 @@ +.. _developers: + +************************************** +Developers' Guide +************************************** + +See also the following pages from :ref:`contents-developers-resources`: + +.. toctree:: + :maxdepth: 1 + + howto_doc + howto_release + regression + git_versions + + +.. contents:: + +Guidelines for contributing +================================== +When preparing contributions, please follow the guidelines in +:ref:`contribution`. Also: + + * If the planned changes are substantial or will be backward-incompatible, + it's best to discuss them on the `claw-dev Google group + `_ before starting. + + * Make sure all tests pass and all the built-in examples run correctly. + + * Be verbose and detailed in your commit messages and your pull request. + + * It may be wise to have one of the maintainers look at your changes before + they are complete + (especially if the changes will necessitate modifications of tests + and/or examples). + + * If your changes are not backward-compatible, your pull request should + include instructions for users to update their own application codes. + +Reporting and fixing bugs +------------------------- +If you find a bug, post an issue with as much explanation as possible on the +appropriate issue tracker (for instance, the PyClaw issue tracker is at +https://github.com/clawpack/pyclaw/issues. If you're looking +for something useful to do, try tackling one of the issues listed there. + +Developer communication +----------------------- +Developer communication takes place on the google group at +http://groups.google.com/group/claw-dev/, and (increasingly) within the issue +trackers on Github. + + +.. _setup_dev: + + +Installation instructions for developers +======================================== + +Cloning the most recent code from Github +---------------------------------------- + +You can create a read-only development version of Clawpack via:: + + git clone https://github.com/clawpack/clawpack.git + cd clawpack + git submodule init + git submodule update + + +**Note:** The `https://github.com...` form of specifying a remote +clones the repository in a form that does not allow pushing to it +(unlike the `git@github.com:...` form). This is good practice, so +you do not accidently try to push to the main clawpack repository +rather than to your own fork (see :ref:`dev_remote` below if you +need your own fork, e.g. for issuing pull requests). + +The commands above download the following clawpack modules as subrepositories +checked out at specific commits (as opposed to the tip of a branch). + +* ``_ (Python code, some of which is + needed also for Fortran version) +* ``_ (Utility functions, + Makefile.common used in multiple repositories) +* ``_ (Classic single-grid code) +* ``_ (AMR version of Fortran code) +* ``_ (Riemann solvers) +* ``_ (Python graphics and + visualization tools) +* ``_ (GeoClaw) + + +This should give a snapshot of the repositories that work well together. +(Note that there are many inter-dependencies between code in the +repositories and checking out a different commit in one repository may break +things in a different repository.) + +Before proceeding, it is necessary to make sure you have a few +other packages installed that are now listed in `$CLAW/requirements-dev.txt` +(currently on the master branch and to appear in v5.10.0):: + + pip install -r requirements-dev.txt + +Now install this version of Clawpack using:: + + pip install --no-build-isolation -e ./ + +The `-e` flag means that this is an editabl version of the Clawpack code +(rather than installing the original version in the `site-packages` +directory). + +If you want to use the Fortran versions in `classic`, `amrclaw`, `geoclaw`, +etc., you need to set environment variables and proceed as described at +:ref:`setenv`. + + +Checking out the master branch on each repository +------------------------------------------------- + +Following the instructions above gives you a top level `$CLAW` directory +that is checked out to the tip of the master branch, and each subrepository +will be checked out to a particular commit as specified by this master +branch. For development work, You probably want to check out each +subrepository to the master branch as well. The shell script +`$CLAW/pull_all.sh` can be used to do this for all subrepositories (or look +at this file to see how to do it more selectively). At a shell prompt, +type:: + + source pull_all.sh + +which will check out master on each repository and then do a `git pull` to +make sure it is up to date. If you do this shortly after cloning all the +repositories, they should all have been up to date already. + +Updating to the latest master branch +------------------------------------------ + +The script `pull_all.sh` can be used at any time to check out all +subrepositories to master and do a `git pull`. This is handy if you want to +make sure your version of `master` is up to date in every repository. + +You should first make sure that you do not have uncommitted changes in any +repository that might conflict with the `git checkout master` or +`git pull` commands. You can do this easily with the command:: + + python $CLAW/clawutil/src/python/clawutil/claw_git_status.py + +and then check the files `claw_git_status.txt` and `claw_git_diffs.txt`, +which summarize the status of each subrepository. + +Never commit to `master` +------------------------ + +You should never commit to `master`, only to a feature branch, so +the `master` branch should always reflect what's in the `master` branch on +the primary Github repositories. + +You can update `master` to reflect any changes via the above approach (for +all subrepositories at once), or do `git checkout master` and then `git +pull` within any of the subrepositories separately. + + +.. _dev_remote: + +Adding your fork as a remote +---------------------------- + +If you plan to make changes and issue pull requests to one or more +repositories, you will need to do the following steps for each such +repository: + +#. Go to ``_ and fork the repository to your own + Github account. (Click on the repository name and then the *Fork* button + at the top of the screen.) + +#. Add a *remote* pointing to your repository. For example, if you have + forked the `amrclaw` repository to account `username`, you would do:: + + cd amrclaw + git remote add username git@github.com:username/amrclaw.git + + provided you have ssh keys set up, or else: + + git remote add username https://github.com/username/amrclaw.git + + if you don't mind having to type your password whenever you push or pull. + + You should push only to this remote, not to `origin`, e.g.:: + + git push username + + + +You might also want to clone some or all of the following repositories: + +* ``_ (documentation) +* ``_ (To collect applications) +* ``_ (Regression tests) +* ``_ (Previous versions, 4.6) + +These are not brought over by cloning the top `clawpack` super-repository. +You can get one of these in read-only mode by doing, e.g.:: + + git clone https://github.com/clawpack/doc.git + +Then go through the above steps to add your own fork as a remote +if you plan to modify code and issue pull requests. + +**Note:** The `https://github.com...` form of specifying a remote +clones the repository in a form that does not allow pushing to it +(unlike the `git@github.com:...` form). This is good practice, so +you do not accidently try to push to the main clawpack repository +rather than to your own fork. + + +Modifying code +============== +Before making changes, make sure *master* is up to date:: + + git checkout master + git pull + +Then create a new branch based on `master` for any new commits:: + + git checkout -b new_feature master + +Now make changes, add and commit them, +and then push to your own fork:: + + # make some changes + # git add the modified files + git commit -m "describe the changes" + + git push username new_feature + + +If you want these changes pulled into *master*, +you can issue a pull request from the github page for your fork of this +repository (make sure to select the correct branch of your repository). + +**Note:** If you accidentally commit to `master` rather than creating a +feature branch first, you can easily recover:: + + git checkout -b new_feature + +will create a new branch based on the current state and history (including +your commits to `master`) and you can just continue adding additional +commits. + +The only problem is your `master` branch no longer agrees with the history +on Github and you want to throw away the commits you made to `master`. The +easiest way to do this is just to make sure you're on a different branch, +e.g., :: + + git checkout new_feature + +and then:: + + git branch -D master + git checkout -b master origin/master + +This deletes your local branch named `master` and recreates a branch with +the same name based on `origin/master`, which is what you want. + +.. _developers_pr: + +Issuing a pull request +---------------------- + +Before issuing a pull request, you should make sure you have not broken +anything: + +#. Make sure you are up to date with *master*:: + + git checkout master + git pull + + If this does not say "Already up-to-date" then you might want to rebase + your modified code onto the updated master. With your feature branch + checked out, you can see what newer commits have been added to *master* + via:: + + git checkout new_feature + git log HEAD..master + + If your new feature can be added on to the updated master, you can rebase:: + + git rebase master + + which gives a cleaner history than merging the branches. + +#. Run the appropriate regression tests. If you have modified code + in pyclaw or riemann, then you should run the pyclaw tests. First, + if you have modified any Fortran code, you need to recompile:: + + cd clawpack/ + pip install --user --no-build-isolation -e ./ + + Then run the tests:: + + cd pyclaw + nosetests + + If any tests fail, you should fix them before issuing a pull request. + +To issue a pull request (PR), go to the Github page for your fork of the +repository in question, select the branch from which you want the pull +request to originate, and then click the *Pull Request* button. + +.. _test_pr: + +Testing a pull request +-------------------------- + +To test out someone else's pull request, follow these instructions: +For +example, if you want to try out a pull request coming from a branch named +*bug-fix* from user *rjleveque* to the *master* branch of +the *amrclaw* repository, you would do:: + + cd $CLAW/amrclaw # (and make sure you don't have uncommitted changes) + git checkout master + git pull # to make sure you are up to date + + git checkout -b rjleveque-bug-fix master + git pull https://github.com/rjleveque/amrclaw.git bug-fix + +This puts you on a new branch of your own repository named +*rjleveque-bug-fix* that has the proposed changes pulled into it. + +Once you are done testing, you can get rid of this branch via:: + + git checkout master + git branch -D rjleveque-bug-fix + + +.. _toplevel_pr: + +Top-level pull requests +----------------------- + +The top level *clawpack* repository keeps track of what versions of the +subrepositories work well together. + +If you make pull requests in two different repositories that are linked, say +to both *pyclaw* and *riemann*, then you should also push these changes to +the top-level *clawpack* repository and issue a PR for this change:: + + cd $CLAW # top-level clawpack repository + git checkout master + git pull + git checkout -b pyclaw-riemann-changes + git add pyclaw riemann + git commit -m "Cross-update pyclaw and riemann." + git push username pyclaw-riemann-changes + + +Git workflow +------------ + +See :ref:`git-resources` for useful links. + + + +Catching errors with Pyflakes and Pylint +=========================================== + +Pyflakes and Pylint are Python packages designed to help you catch errors or +poor coding practices. To run pylint on the whole PyClaw package, do:: + + cd $PYCLAW + pylint -d C pyclaw + +The `-d` option suppresses a lot of style warnings, since PyClaw doesn't +generally conform to PEP8. To run pylint on just one module, use something +like:: + + pylint -d C pyclaw.state + +Since pylint output can be long, it's helpful to write it to an html file +and open that in a web browser:: + + pylint -d C pyclaw.state -f html > pylint.html + +Pyflakes is similar to pylint but aims only to catch errors. If you +use Vim, there is a nice extension package +`pyflakes.vim `_ +that will catch errors as you code and underline them in red. + +Checking test coverage +======================== +You can use nose to see how much of the code is covered by the current +suite of tests and track progress if you add more tests :: + + nosetests --with-coverage --cover-package=pyclaw --cover-html + +This creates a set of html files in `./cover`, showing exactly which lines +of code have been tested. + + +Trouble-Shooting Tips +===================== +If you are having trouble installing or building Clawpack try out some of the +following tips: + + - Check to see if you have set the environment variable `FFLAGS` which may be + overriding flags that need to be set. This is especially important to check + when building the PyClaw fortran libraries as a number of flags must be set + for the Python bindings and will override the defaults. diff --git a/v5.10.x/_sources/docker_image.rst.txt b/v5.10.x/_sources/docker_image.rst.txt new file mode 100644 index 0000000000..4bdb537639 --- /dev/null +++ b/v5.10.x/_sources/docker_image.rst.txt @@ -0,0 +1,189 @@ + +.. _docker_image: + +Docker for Clawpack +=================== + +Rather than installing Clawpack and all its dependencies on your computer, if +you have `Docker `_ installed then you can now use a +docker image from the `DockerHub Clawpack repositories +`_. + +Using Version 5.9.0 or above +---------------------------- + +A new docker image has been created for v5.9.x. This image includes +Clawpack v5.9.0 and a number of packages of primary interest to GeoClaw users. + +It also now includes the packages and files needed to execute the +Jupyter notebooks from the book +`Riemann Problems and Jupyter Solutions +`__. +These notebooks can be found in the `riemann_book` directory. + +Getting started +---------------- + +To download an image:: + + $ docker pull clawpack/v5.9.0_dockerimage:release + +To create a container and run it:: + + $ docker run -i -t -p 8889:8889 --name clawpack-v5.9.0_container \ + clawpack/v5.9.0_dockerimage:release + +You can change the container name if you wish, and also the port 8889 (on +which jupyter notebooks might be served, see below). + +You should now see a prompt like:: + + jovyan $ + +indicating that you are in the container, logged in as user `jovyan`. + +Once logged in to the container, you should find a directory +`$HOME/clawpack-v5.9.0` that contains the Clawpack installation (including the +current master branch of the :ref:`apps`). + + + +Stopping a container +-------------------- + +You can exit a container (after using `ctrl-C` to quit the jupyter server if +one is running) via:: + + exit + +at the `jovyan $` prompt. + +Restarting a container +---------------------- + +You can restart the container via:: + + docker start -a -i clawpack-v5.9.0_container + + +Running Jupyter notebooks +------------------------- + +The form of run command suggested above also allows you to run Jupyter +notebooks from port 8889 on your own computer (or whatever port you +specified when creating the container). + +To start the sever, in the docker container (at the `jovyan $` prompt) +run this command:: + + jupyter notebook --ip=0.0.0.0 --port=8889 --no-browser + +Then open a browser (on the host machine) to:: + + http://localhost:8889/?token=TOKEN + +replacing `TOKEN` with the token that should have printed out when you started +the server. + +This will open to the top level of `$HOME`, and you can then navigate to +wherever the notebooks are you want to run, e.g. the sample ones in the +`apps` repository can be found at `clawpack-v5.9.0/apps/notebooks`. + +PyClaw users might want to start with +`clawpack-v5.9.0/apps/notebooks/pyclaw/Acoustics-1D.ipynb`. + +GeoClaw users might want to try running +`clawpack-v5.9.0/apps/notebooks/geoclaw/chile2010a.ipynb`, +which exercises most aspects of GeoClaw. + + +Moving files between the docker container and the host machine +------------------------------------------------------------------ + +Often you want to run the code on Docker and then transfer the resulting output +files, and/or the plots generated, back to the host machine (e.g. some +directory on your laptop). You can use the `--volume` flag when running a +container to accomplish this, see +`docker volume documentation `_. + +For example, if you have created a directory `$HOME/docker/volumes/work` +on your computer (it can have a different name but should be in +`$HOME/docker/volumes/`) then adding:: + + -v $HOME/docker/volumes/work:/home/jovyan/work + +to your `docker run` command will map this directory to `/home/jovyan/work` in +the docker container. So you can move Clawpack output or plots to that directory +in order to have access to them from your host computer. + +Putting this together with previous options, here's a sample command +that creates and runs a geoclaw-based container with this mapping +and also allowing us to start a Jupyter server:: + + $ docker run -i -t -p 8889:8889 \ + -v $HOME/docker/volumes/work:/home/jovyan/work \ + --name clawpack-v5.9.0_container \ + clawpack/v5.9.0_geoclaw_dockerimage + + +Some other useful docker commands +--------------------------------- + +See the `docker command line documentation `_ +or any of the tutorials available on-line for more details, but here are a +few particularly useful commands:: + + docker help + docker info + + docker ps -a # list all containsers + docker rm clawpack-v5.7.1_container # remove a container + + docker images -a # list all images + docker rmi clawpack/v5.7.1_dockerimage:release # remove an image + docker prune # remove all images not used by any container + + + +Creating your own docker image +------------------------------ + +If you want to create a new docker image that includes other software in +addition to Clawpack, you can find the `Dockerile` used to create the docker +image on dockerhub in the repository +https://github.com/clawpack/docker-files. + +This might be useful if you want to distribute your own code that depends on +Clawpack in a form that's easy for others to use. + +You can also create a Dockerfile that uses the already-build Clawpack 5.9.0 +on Dockerhub by starting the Dockerfile with:: + + FROM clawpack/v5.9.0_dockerimage:release + +and then adding anything addition you want in the image, +such as other Python modules you need or your own application code. +You may need to specify `USER root` in order to install some things, and +then switch back to `USER jovyan` at the end. For an example, see how +`clawpack/docker-files/Dockerfile_v5.7.0_geoclaw +`_ +is built on top of `clawpack/v5.7.0_dockerimage:release`. + + +Dockerfiles for binder +---------------------- + +The username jovyan was chosen so that you can use this docker image also for +starting up a Jupyter notebook server on `binder +`_. You can do this by +including a simple Dockerfile at the top level of your repository that +uses the dockerhub image, as above. See this repository for a simple example: +``_. + +The repository for the book `Riemann Problems and Jupyter Solutions +`__ also uses this approach. + +See `the binder documentation +`_ +for more details on using Dockerfiles there. + diff --git a/v5.10.x/_sources/dtopotools_module.rst.txt b/v5.10.x/_sources/dtopotools_module.rst.txt new file mode 100644 index 0000000000..0db3a4bb81 --- /dev/null +++ b/v5.10.x/_sources/dtopotools_module.rst.txt @@ -0,0 +1,38 @@ + +.. _dtopotools_module: + +dtopotools module for moving topography +======================================= + +See also :ref:`okada` for a discussion of the subfault parameters required +for the Okada model of seafloor deformation resulting from slip on a +specified fault plane. + +.. warning:: Starting in Version 5.5.0, the subfault parameter `rise_time` + now refers to the total rise time of a subfault, while `rise_time_starting` + is the rise time up to the break in the piecewise quadratic + function defining the rise. By default `rise_time_ending` is set equal to + `rise_time_starting`. See the module function `rise_fraction` below + for more description. (In earlier versions, `rise_time` read in from csv + files, for example, was erroneously interpreted as `rise_time_starting` + is now.) + + +The notebook `dtopotools_examples.ipynb +`_ +illustrates how to use some of the tools. + +The notebook `Okada.ipynb +`_ +illustrates the Okada model using some of these tools. + +The file `$CLAW/geoclaw/tests/test_dtopotools.py` contains some tests of these +tools. Looking at these test routines may also give some ideas on +how to use them. + +Documentation auto-generated from the module docstrings +-------------------------------------------------------- + +.. automodule:: clawpack.geoclaw.dtopotools + :members: + diff --git a/v5.10.x/_sources/f77_vs_f90.rst.txt b/v5.10.x/_sources/f77_vs_f90.rst.txt new file mode 100644 index 0000000000..c1e13dfef7 --- /dev/null +++ b/v5.10.x/_sources/f77_vs_f90.rst.txt @@ -0,0 +1,13 @@ + +.. _f77_vs_f90: + + +===================================== +Fortran 77 vs. Fortran 90 files +===================================== + +- Summarize differences between `.f` and `.f90` files. + +- Describe what happens if `filename.f` and `filename.f90` exist in the same + directory. + diff --git a/v5.10.x/_sources/fgmax.rst.txt b/v5.10.x/_sources/fgmax.rst.txt new file mode 100644 index 0000000000..94e37e7453 --- /dev/null +++ b/v5.10.x/_sources/fgmax.rst.txt @@ -0,0 +1,431 @@ + +.. _fgmax: + +============================== +Fixed grid monitoring (fgmax) +============================== + +.. warning:: + + This feature has been modified and this documentation describes + the version introduced in 5.7.0. + +See also: + + - :ref:`fgmax_tools_module` + - :ref:`setrun_fgmax` - For adding fgmax data to `setrun.py` + - :ref:`fgmax_examples` - Links to some examples + +GeoClaw has the capability to monitor the maximum value of +certain quantities on a specified fixed +"fgmax grid" by interpolating from the AMR grids active at each time step, +or at specified time increments. +This is useful in particular to record the maximum flow depth observed at +each point over the course of a computation, or the maximum flow velocity, +momentum, or momentum flux. These quantities are often of interest in +hazard modeling. + +It is also possible to record the *arrival time* of a flow or wave at each +point on the grid. + +The "grids" do not have to be rectangular grids aligned with the +coordinate directions, but can consist of an arbitrary list of points +that could also be points along a one-dimensional transect or points +following a coastline, for example. It is also possible to specify logically +rectangular grids of points covering an arbitrary quadrilateral. + +**New in v5.7.0:** One can also specify a set of fgmax point by providing a +data file in the style of a topography DEM file with `topo_type==3`, but in +which the values provided are either 0 or 1 instead of topography values, with +1 indicating that a point should be used as an fgmax point, 0 indicating it +should not be used. This is particularly convenient if you want to select +fgmax points that are a subset of points on a DEM. This option is described +more below under `point_style==4`. + +**New in v5.7.0:** Most fgmax information is now most easily set +in `setrun.py` and is written out to the file `fgmax_grids.data` +when this script is executed, e.g. by "`make data`". The information +required is described below. See also :ref:`setrun_fgmax`. + +This is an improved version of the algorithms used in much earlier versions of +GeoClaw, and now +correctly interpolates when a grid point lies near the junction of two +grid patches, which was not always handled properly before. +The earlier version can still be used for outputing results at intermediate +times on a fixed grid (see :ref:`fgout`), but is not recommended for the purpose +of monitoring maxima or arrival times. + +.. _fgmax_input: + +Input file specification +------------------------- + +**(Changed in Clawpack 5.7.0.)** + +The GeoClaw Fortran code reads in one or more files that specify grid(s) for +monitoring values during the computation. + +The fgmax grid(s) are specified to GeoClaw in +`setrun.py` by setting `rundata.fgmax_data.fgmax_grids` +to be a list of objects of class `fgmax_tools.FGmaxGrid`. +The order the files appear in this list determines the number assigned to +this grid (starting with 1) that may be needed for processing or plotting +the results. The output appears in files such as `_output/fgmax0001.txt`. + +**New in v5.7.0:** You can now assign numbers to each fgmax gauge +using the `fgno` attribute, described below, rather than being numbered +sequentially by order specified in the `setrun.py` file. + +Currently at most 50 fgmax grids are allowed by default. If you need more, +you can adjust the parameter `FG_MAXNUM_FGRIDS` in +`$CLAW/geoclaw/src/2d/shallow/fgmax_module.f90` and the do `make new` to +recomile everything that depends on this module. + +Each `fgmax_tools.FGmaxGrid` object (`fg`, for example) +describing a grid of points has the following attributes:: + + fg.fgno + fg.tstart_max + fg.tend_max + fg.dt_check + fg.min_level_check + fg.arrival_tol + fg.interp_method + fg.point_style + +These are explained further below. + +Additional attributes depend on the value of `fg.point_style`. + +Different point styles +^^^^^^^^^^^^^^^^^^^^^^ + +**If `fg.point_style == 0`,** an arbitrary collection of `(x,y)` points is allowed. +In this case you can either set + + fg.npts + +to the number of points and + + fg.X + fg.Y + +to lists (or numpy arrays) of the coordinates, or you can set + + fg.npts = 0 + +and set + + fg.xy_file + +to a string with the path to a file of the form: + + npts # number of points + x1 y1 # first point + x2 y2 # second point + ... # etc. + +These points need not lie on a regular grid and can be specified in any order. + +**If `point_style == 1`,** a 1-dimensional transect of points is specified by +the attributes:: + + fg.npts # number of points to generate + fg.x1, fg.y1 # first point + fg.x2, fg.y2 # last point + +**If `point_style == 2`,** a 2-dimensional cartesian of points is specified by +the attributes:: + + fg.nx, fg.ny # number of points in x and y (nx by ny grid) + fg.x1, fg.y1 # lower left corner of cartesian grid + fg.x2, fg.y2 # upper right corner of cartesian grid + +**If `point_style == 3`,** a 2-dimensional logically rectangular array +of points is specified by the attributes:: + + fg.n12, fg.n23 # number of points along adjacent edges (see below) + fg.x1, fg.y1 # first corner of grid + fg.x2, fg.y2 # second corner of grid + fg.x3, fg.y3 # third corner of grid + fg.x4, fg.y4 # fourth corner of grid + +The corners should define a convex quadrilateral (ordered clockwise around the +perimeter). An array of points will be defined as the intersection points of +two sets of lines. The first set is obtained by connecting `n12` +equally spaced points on the side from `(x1,y1)` to `(x2,y2)` with the same +number of points equally spaced on the side from `(x3,y3)` to `(x4,y4)`. +The second set of lines is obtained by connecting `n23` equally spaced +points on the side from `(x2,y2)` to `(x3,y3)` with the same +number of points equally spaced on the side from `(x4,y4)` to `(x1,y1)` + +**If `point_style == 4`,** a file is expected that has the form of a +topofile with `topo_type == 3` as described in :ref:`topo`. +This file has a header that describes a uniform 2d grid of points, followed +by one line for each row of the grid (moving from north to south). +Unlike a standard topofile, the values are not topography elevations, +however, but are either 1 or 0, with the value 1 indicating that this point +should be used as an fgmax point. + +Other tools are available to construct such a file by preprocessing a +topography DEM and selecting only the points that satisfy certain criteria. +For example, if we only want to capture onshore inundation depths and it is +known that regions above a certain elevation will always stay dry, then we +may want to select only points that are onshore and below this elevation. +See :ref:`marching_front` for more details and examples. + +Other attributes +^^^^^^^^^^^^^^^^ + +The standard required attributes for any `fgmax_tools.FGmaxGrid` object are: + + * `fgno` : int + + The number of this fgmax grid, should be a positive integer with at most + 4 digits since the output file will then have the form `fgmax0001.txt`, + for example, if `fgno = 1`. If these are not specified then they will + be numbered sequentially based on the order they are specified + in the `fgmax_grids` list. + + + * `tstart_max` : float + + Starting time to monitor maximum. Often we only want to monitor on the + finest grids around the location of interest, and only after waves arrive, + and this can be chosen correspondingly. + + + * `tend_max` : float + + Ending time to monitor maximum. Set to e.g. `1e9` to monitor until end + of simulation + + * `dt_check` : float + + Time increment for monitoring maximum and arrivals. + Interpolate to fixed grid and + update values only if the time since the last updating exceeds this time + increment. Set to 0 to monitor every time step. + + * `min_level_check` : integer + + Minimum AMR level to check for updating the maximum value observed and + the arrival time. + Care must be taken in selecting this value since the maximum observed + when interpolating to a point from a coarse AMR level may be much larger + than the value that would be seen on a fine grid that better resolves the + topography at this point. Often AMR "regions" are used to specify that a + fine grid at some level `L` should always be used in the region of + interest over the time period from `start_max` to `tend_max`, and then + it is natural to set `min_level_check` to `L`. + + But also note that if we monitor over multiple levels then we also keep + track of what level the current maximum was computed on. If the level + at this point is greater than the level used for the current maximum + (because new finer grids were introduced since the last monitor time) + then the old maximum is discarded and the current value as used as to + reinitialize the maximum at this point. + + * `arrival_tol` : float + + The time reported as the "arrival time" is the first time the value + of the surface elevation is greater than `sea_level` + `arrival_tol`. + + Note that this captures the first positive wave but doesn't capture + the time of arrival of the first wave if it is a leading depression + rather than a positive wave. + + * `interp_method` : int + + The method to be used to interpolate from finite volume cell averages + in GeoClaw to pointwise values at the fgmax points. + + The default is 0, meaning we take the value directly from the cell + average in the grid cell containing the fgmax point (zero-order piecewise + constant interpolation). + + Setting to 1 will instead use bilinear interpolation between 4 cell + centers. This is not recommended since it can give spurious results near + the margins of the flow. See below, :ref:`fgmax_interp`. + + + +.. _fgmax_values: + +Values to monitor +----------------- + +The values to be monitored are specified by the subroutine `fgmax_values`. +The default subroutine found in the library +`$CLAW/geoclaw/src/2d/shallow/fgmax_values.f90` +is now set up to monitor the +depth `h` (rather than the value `eta_tilde` used in Version 5.1) +and optionally will also monitor the speed :math:`s = \sqrt{u^2 + v^2}` +and three other quantities (the momentum :math:`hs`, +the momentum flux :math:`hs^2`, and :math:`-h`, which is useful to monitor +the minimum depth at each point, e.g. in a harbor where ships may be grounded). + +The values monitored by the default routine described above is determined +by the value of the `fgmax_module` variable `FG_NUM_VAL`, which can be set +to 1, 2, or 5. This value is read in from the data file `fgmax_grids.data` +and can be set by specifying the value of +`rundata.fgmax_data.num_fgmax_val` in `setrun.py`. + +.. _fgmax_interp: + +Choice of interpolation procedure +--------------------------------- + +Before v5.7.0, the choice of interpolation procedure was governed by use of +the library routine `geoclaw/src/2d/shallow/fgmax_interpolate.f90` (for +bilinear interpolation) or `geoclaw/src/2d/shallow/fgmax_interpolate0.f90` (for +constant interpolation). + +**Starting in v5.7.0,** there is a single library routine +`geoclaw/src/2d/shallow/fgmax_interp.f90` and the choice is controlled by +the `fg.interp_method` parameter described above. + +Setting `fg.interp_method = 0` is recommended since +interpolating the fluid depth and the topography +separately and then computing the surface elevation by adding these +may give unrealistic high values. See :ref:`nearshore_interp`. + + + +.. _fgmax_example: + +A simple example +---------------- + +This is taken from +`$CLAW/geoclaw/examples/tsunami/radial-ocean-island-fgmax/setrun.py`, where +other point styles are also illustrated:: + + + from clawpack.geoclaw import fgmax_tools + + # Points on a uniform 2d grid: + fg = fgmax_tools.FGmaxGrid() + fg.point_style = 2 # uniform rectangular x-y grid + fg.x1 = 14.25 + fg.x2 = 14.65 + fg.y1 = 50.10 + fg.y2 = 50.35 + fg.dx = 15/ 3600. # desired resolution of fgmax grid + fg.min_level_check = amrdata.amr_levels_max # which levels to monitor max on + fg.tstart_max = 8000. # just before wave arrives + fg.tend_max = 1.e10 # when to stop monitoring max values + fg.dt_check = 20. # how often to update max values + fg.interp_method = 0 # 0 ==> pw const in cells, recommended + rundata.fgmax_data.fgmax_grids.append(fg) # written to fgmax_grids.data + + +.. _fgmax_processing: + +Processing and plotting fgmax output +------------------------------------ + +After GeoClaw has run, the output directory should contain +files of this form for each fgmax grid: + + - `fgmax0001.txt` + +**Note:** This file format is new in Version 5.7.0. Previously two files +such as `fort.FG1.valuemax` and `fort.FG1.aux1` were created to each +fgmax grid. Now the topo value at each grid point is included along with +the max values in the single file. + +If more than one fgmax grid was specified by `rundata.fgmax_data.fgmax_grids` +then there will be similar files `fgmax0002.txt`, etc. +They will be numbered in the order they appear in the list of input files in +`setrun.py` unless you explicitly set `fg.fgno` in which case these numbers +will be used. + +These files are most easily dealt with using :ref:`fgmax_tools_module` by +defining an object of class `fgmax_tools.FGmaxGrid` and using the +class function `read_output` to read the output. + +For examples, see :ref:`fgmax_examples`. + +.. _fgmax_output_format: + +Format of the output files +-------------------------- + +The paragraphs below describe in more detail the structure of the output files +for users who need to process them differently. + +If `point_style == 0` for a grid then the points will be listed in the same +order as specified in the input file. For other values of `point_style` +(1-dimensional transects or 2-dimensional arrays) the values will be output in +a natural order. + +In all cases the first two columns of each output file are +the longitude and latitude of the point. + +The columns of `fgmax0001.txt` contain the following values, where N refers +to the number of quantities of interest being monitored, as specified +by `rundata.fgmax_data.num_fgmax_val` and described further below: + + - Column 1: longitude + - Column 2: latitude + - Column 3: AMR level + - Column 4: topo value B + - Columns 5 to 5+N: maximum value recorded of each QoI + - Columns 6+N to 5+2N: time max value was recorded + - Column 6+2N: arrival time + +The AMR level is the level of finest level grids covering this fgmax point +at the time the maximum was recorded. + +The "topo value B" is the value of the GeoClaw topography B +interpolated to the fgmax point on this AMR level (with the method +of interpolation being specified by `fg.interp_method`, as for the values). + +The value of N above is assumed to be 1, 2, or 5 in the default +routines, as specified in `setrun.py` by the value of +`rundata.fgmax_data.num_fgmax_val`. The quantities monitored are: + + + - If `rundata.fgmax_data.num_fgmax_val == 1`: + - Column 5 contains maximum value of depth `h`, + - Column 6 contains time of maximum `h`. + + - If `rundata.fgmax_data.num_fgmax_val == 2`: + - Column 5 contains maximum value of depth `h`, + - Column 6 contains maximum value of speed, + - Column 7 contains time of maximum `h`, + - Column 8 contains time of maximum speed. + + - If `rundata.fgmax_data.num_fgmax_val == 5`: + - Columns 5,6,7,8,9 contain maximum value depth, speed, momentum, momentum + flux, and `hmin`, respectively, + - Columns 10,11,12,13,14 contain times the maximum was recorded, for each + value above. + + +The **last** column of `fgmax0001.txt` contains the arrival time of the wave +at this grid point, as determined by the tolerance `arrival_tol` specified in +the input file. The time reported as the "arrival time" is the first time the +value of the surface elevation is greater than `sea_level` + `arrival_tol`. +Points where this value is `-0.99999000E+99` never met this criterion, perhaps +because the point was never inundated. + +.. _fgmax_examples: + +fgmax examples +--------------- + + +For an example of how to process and plot the fgmax results, see the +notebook `make_input_files.ipynb` in the directory +`$CLAW/geoclaw/examples/tsunami/radial-ocean-island-fgmax` +or the rendered version linked from the +`README `__ +in the `GeoClaw Gallery +`__ + +For another examples, see +`$CLAW/geoclaw/examples/tsunami/chile2010_fgmax-fgout` and +its `README `__. + diff --git a/v5.10.x/_sources/fgmax_tools_module.rst.txt b/v5.10.x/_sources/fgmax_tools_module.rst.txt new file mode 100644 index 0000000000..4ea6208abe --- /dev/null +++ b/v5.10.x/_sources/fgmax_tools_module.rst.txt @@ -0,0 +1,17 @@ + +.. _fgmax_tools_module: + +fgmax_tools module for working with fgmax grids +==================================================== + +.. seealso:: + - :ref:`fgmax` + + + +Documentation auto-generated from the module docstrings +-------------------------------------------------------- + +.. automodule:: clawpack.geoclaw.fgmax_tools + :members: + diff --git a/v5.10.x/_sources/fgout.rst.txt b/v5.10.x/_sources/fgout.rst.txt new file mode 100644 index 0000000000..25a364cc9e --- /dev/null +++ b/v5.10.x/_sources/fgout.rst.txt @@ -0,0 +1,294 @@ + +.. _fgout: + +============================== +Fixed grid output (fgout) +============================== + +**New in v5.9.0:** + +See also: + + - :ref:`fgout_tools_module` + - :ref:`setrun_fgout` - For adding fgout data to `setrun.py` + - :ref:`fgout_examples` - Links to some examples + +GeoClaw has the capability to output the results at specified output times +on a specified "fixed grid" by interpolating from the AMR grids active at each +output time. + +This complements the normal output frame capabilities of Clawpack, +and has several advantages for some applications, particularly when +making animations or when using the GeoClaw solution as input to +another process, such as particle tracking. + +Advantages include: + + 1. The solution is output on a fixed uniform grid at each fgout + time, independent of the AMR structure. This is useful in order + to produce a set of frames for an animation that are all the same + resolution with the same size array. + + 2. It is possible to produce fgout outputs at times that do not + coincide with the time steps of the computation, whereas standard + frame output can only occur at the end of a time step on the coarsest + level. Hence fgout output does not require reducing the time step to hit + the fgout times exactly, which would cause significant increase in + computing time and possible degradation of the computed solution + if the coarse grid time steps had to be greatly reduced to match + frequent output times in a finely resolved region. + + 3. When exploring the solution or making an animation over one + small portion of the computational domain, it is possible to + create an fgout grid that only covers this region at the desired + resolution and does not require output of the entire AMR structure + over the entire computational domain at each output time. + This can *greatly* reduce the size of the output in some cases. + + 4. If an fgout grid is output with sufficiently fine temporal resolution, + then this set of data can be used to explore the solution in various ways + using post-processing. For example, it is possible to spatially + interpolate to any desired location within the grid and produce a time + series of the solution at this point. This would be similar to the gauge + output produced by GeoClaw, but would allow specifying the point of + interest after the fact, whereas standard gauages must be specified in + advance of the GeoClaw run (see :ref:`gauges`). Similarly, the fluid + velocities computed from GeoClaw can be used to track particles (as + massless tracer particles for visualization purposes, or with more + complex dynamics for debris tracking). The Python module + :ref:`fgout_tools_module` provides some tools for interpolating + from fgout frames to arbitrary points `(x,y,t)`. + +The original version of this, capability, originally called `fixedgrid +output` in Clawpack 4.6 was carried over and existed through v5.8.x, but has +been removed as of Version 5.9.0. + +An improved version for monitoring maximum values and arrival times was +added in v5.7.0, referred to as `fgmax grids`; see :ref:`fgmax`. + +An improved version of the capability to output on a fixed grid at more +frequent times than the standard AMR output has been introduced in v5.9.0, +and these are now called `fgout grids` to complement the `fgmax grids`. +These `fgout grids` are described further below. + +.. _fgout_input: + +Input file specification +------------------------- + +The GeoClaw Fortran code reads in one or more files that specify fgout grids +grid(s) for writing out the solution on a fixed grid throughout +the computation. + +The desired fgout grid(s) are specified to GeoClaw in `setrun.py`, +by setting `rundata.fgout_data.fgout_grids` to be a list of objects +of class `fgout_tools.FGoutGrid`. +After doing `make data` or `make .output`, these are written out +to `fgout_grids.data`, the file that is read by the Fortran code at runtime. + +More than one fgout grid can be specified, and an integer label with at +most 4 digits can be assigned to each grid. You can assign numbers +to each fgout grid using the `fgno` attribute, described below. +If you do not assign numbers, they will be numbered sequentially (1,2, etc.) +based on the order they are specified in the `setrun.py` file. + + +A simple example +----------------- + +Here's an example of how one grid can be set up:: + + from clawpack.geoclaw import fgout_tools + + fgout_grids = rundata.fgout_data.fgout_grids # empty list initially + + fgout = fgout_tools.FGoutGrid() + fgout.fgno = 1 + fgout.output_format = 'binary32' + fgout.nx = 200 + fgout.ny = 250 + fgout.x1 = -115. + fgout.x2 = -70. + fgout.y1 = -55. + fgout.y2 = -10. + fgout.tstart = 0. + fgout.tend = 6.*3600 + fgout.nout = 37 + fgout_grids.append(fgout) + +This specifies output on a 200 by 250 grid of equally spaced points on the +rectangle `[-115, -70] x [-55, -10]`. (Note that these values are cell +edges, the actual fgout points will be at cell centers, +displaced from these edges. See :ref:`fgout_registration` below.) + +The output times are equally spaced +from `tstart = 0` to `tend = 6*3600` (6 hours). +There will be 37 total outputs, so one every 10 minutes. + +The parameter `fgout.output_format` can be set to `'ascii'`, `'binary32'`, +or `'binary64'`, the same options as supported for the standard output in +geoclaw as of v5.9.0. +Usually`'binary32'` is best, which truncates the float64 (kind=8) +computated values in the fortran code to float32 (kind=4) before dumping the +raw binary. This is almost always sufficient precision for plotting or +post-processing needs, and results in smaller files than either of the other +options. This may be particularly important if hundreds of fgout frames +are saved for making an animation or doing particle tracking. + +.. _fgout_format: + +Format of fgout output +----------------------- + +After GeoClaw has run, the output directory should contain +files of this form for each fgout grid: + + - `fgout0001.t0000` # containing info about this output time + - `fgout0001.q0000` # header (and also data if `output_format=='ascii'`) + - `fgout0001.b0000` # data in binary format (only if + `output_format=='binary32'` or `'binary64'`) + +These would be for fgout grid number `fgno = 1` at the first output time. + +These files have exactly the same format as the output files produced at +each output time for standard GeoClaw output (and more generally for any +Clawpack output), as described at :ref:`output_styles`. The style allows +specifying AMR output in which there are many grids at each output time, +possibly at various refinement levels. +In the case of fgout grids there will always be only a single grid at each +output time, with `AMR_level` set to 0 in the header files to indicate +that these grids are not part of the general AMR hierarchy. + +.. _fgout_setplot: + +Using `setplot.py` to produce plots +----------------------------------- + +Since the files have the same format as the usual `fort.t`, `fort.q`, and +`fort.b` files for Clawpack output, it is possible to use a `setplot.py` +file to set up plotting this sequence of fgout frames in exactly the same +manner as for standard output. The only difference is that it is necessary +to specify that the file names start with `fgout...` rather than `fort.`. +This can be done in `setplot.py` via:: + + plotdata.file_prefix = 'fgout0001' # for fgout grid fgno==1 + plotdata.format = 'binary32' # set to match fgout.output_format + +An example is provided in +`$CLAW/geoclaw/examples/tsunami/chile2010_fgmax-fgout`. + + +.. _fgout_plotting: + +Reading and plotting fgout arrays directly +------------------------------------------ + +Alternatively, since every output frame consists of only a single uniform +grid of data, it is much easier to manipulate or plot this data directly than +for general AMR data. The `fgout_tools.py` module described at +:ref:`fgout_tools_module` provides tools for reading frames and producing +arrays that can then be worked with directly. It also contains tools for +interpolating within these grids in both space and time. + +For example, here's how to read a frame 5 of an fgout grid set up as above:: + + + fgno = 1 + outdir = '_output' + output_format = 'binary32' # format of fgout grid output + fgout_grid = fgout_tools.FGoutGrid(fgno, outdir, output_format) + + fgframe = 5 + fgout = fgout_grid.read_frame(fgframe) + +Then `fgout.X` and `fgout.Y` are 2-dimensional arrays defining the grid +and `fgout.q` defines the standard GeoClaw `q` array, with `q[0:4,:,:]` +corresponding to `h, hu, hv, eta`, where `eta = h+B` and `B` is the topography. +For convenience, additional attributes are defined using lazy +evaluation only if requested by the user, including +`h, hu, hv, eta, u, v, s, hss`, where `s` is the speed and +`hss` is the momentum flux. + +The values in `fgout.X` and `fgout.Y` are the cell centers of the fgout +grid, and if you want to plot the `q` values on this grid you should use +`clawpack.visclaw.plottools.pcolorcells`, as described at +:ref:`pcolorcells`. For example, here's a minimalist example of plotting +the water surface eta on top of topography for a single frame of fgout data +as read above:: + + from clawpack.visclaw import plottools, geoplot + from numpy import ma + + plottools.pcolorcells(fgout.X,fgout.Y,fgout.B, cmap=geoplot.land_colors) + eta = ma.masked_where(fgout.h<0.001, fgout.eta) + eta_plot = plottools.pcolorcells(fgout.X,fgout.Y,eta, cmap=geoplot.tsunami_colormap) + +For more detailed examples of plotting, including making animations, +see `$CLAW/geoclaw/examples/tsunami/chile2010_fgmax-fgout`. + +.. _fgout_registration: + +fgout grid registration +----------------------- + +Note above that fgout points are specified by setting e.g. `fgout.x1, +fgout.x2` and `fgout.nx` in `setrun.py`. For consistency with the way the +finite volume computational grid is specified in `setrun.py` +(and written to the output files), +the values `x1, x2` are viewed as cell edges and `nx` is the desired number +of cells (in the `x` direction). The actual fgout points will be at the +cell centers. So the cell width (= distance between points) +is `dx = (x2-x1)/nx`, and the first fgout point (cell center) +will have `x` coordinate `x1 + dx/2`. + +Solution values at these points are interpolated from the finite volume +GeoClaw solution as described in the next section. + + +.. _fgout_interp: + +Choice of interpolation procedure +--------------------------------- + +The fgout grid need not be aligned with any computational grid, and in general +it may overlap several grids at different AMR resolutions. At each fgout time +requested, the solution is interpolated from the finest available AMR grid +covering each fgout point, at both the last time step before the fgout time +and the first time step after the fgout time. + +The default spatial interpolation method used to assign values to fgout points +at each time step is to assume the computational solution is constant in each +finite volume cell and simply evaluate this value in the finest AMR level +grid cell that includes +the fgout point. This is controlled by the parameter `method = 0` in +subroutine `fgout_interp` in `$CLAW/geoclaw/src/2d/shallow/fgout_module.f90`. +This is generally recommended rather than setting `method = 1`, which gives +linear interpolation between finite volume cell centers, because interpolating +`h`, `B`, and `eta` separately near the shore can lead to unphysically large +values of `h` and/or `eta` (see :ref:`nearshore_interp`). + +Similarly, the temporal intepolation between the two neighboring time steps is +done by simply using the value at the later time step, as controlled by the +parameter `method = 0` in the +subroutine `fgout_write` in `$CLAW/geoclaw/src/2d/shallow/fgout_module.f90`. +This is generally recommended rather than setting `method = 1`, which gives +linear interpolation between the times, because interpolating +`h`, `B`, and `eta` separately near the shore can lead to unphysically large +values of `h` and/or `eta` (see :ref:`nearshore_interp`). + +If you want to change one of these methods, you can make your own version of +`fgout_module.f90` and point to this in the `Makefile` under `MODULES=` +(see :ref:`makefiles_replace`). + +.. _fgout_examples: + +fgout examples +--------------- + +For some examples, see +`$CLAW/geoclaw/examples/tsunami/chile2010_fgmax-fgout`. +Sample results appear in the `GeoClaw Gallery +`__; +see the +`README `__ +for a description and links to the plots and a script for making an animation. diff --git a/v5.10.x/_sources/fgout_tools_module.rst.txt b/v5.10.x/_sources/fgout_tools_module.rst.txt new file mode 100644 index 0000000000..420b9aa2e0 --- /dev/null +++ b/v5.10.x/_sources/fgout_tools_module.rst.txt @@ -0,0 +1,17 @@ + +.. _fgout_tools_module: + +fgout_tools module for working with fgout grids +==================================================== + +.. seealso:: + - :ref:`fgout` + + + +Documentation auto-generated from the module docstrings +-------------------------------------------------------- + +.. automodule:: clawpack.geoclaw.fgout_tools + :members: + diff --git a/v5.10.x/_sources/first_run.rst.txt b/v5.10.x/_sources/first_run.rst.txt new file mode 100644 index 0000000000..f730411e2a --- /dev/null +++ b/v5.10.x/_sources/first_run.rst.txt @@ -0,0 +1,117 @@ +.. _first_run: + +Running an example +================== + +Many examples of Clawpack simulations can be seen in the :ref:`galleries`. + +See also :ref:`first_tests`. + +PyClaw +------ +To run an example and plot the results using PyClaw, simply do the following +(starting from your `clawpack` directory):: + + cd pyclaw/examples/euler_2d + python shock_bubble_interaction.py iplot=1 + +That's it. For next steps with PyClaw, see :ref:`basics`. + +Classic +------- +First ensure that you have :ref:`setenv` +and that you have the :ref:`install_prerequisites`. + +A simple 1-dimensional acoustics equations can be solved +using the code in `$CLAW/classic/examples/acoustics_1d_example1 +`__, as +illustrated in the `Gallery of Classic and AMRClaw applications +`__ + +Move to this directory via:: + + cd $CLAW/classic/examples/acoustics_1d_example1 + +You can try the following test in this directory, or you may want to first +make a copy of it (see the instructions in :ref:`copyex`). + +The Makefiles are set up to do dependency checking so that in many +application directories you can simply type:: + + $ make .plots + +and the Fortran code will be compiled, data files created, the code +run, and the results plotted automatically, resulting in a set of webpages +showing the results. + +However, if this is your first attempt to run a code, it is useful to go +through these steps one at a time, both to understand the steps and so that +any problems with your installation can be properly identified. + +You might want to start by examining the Makefile. This sets a number of +variables, which at some point you might need to modify for other examples, +see :ref:`makefiles` for more about this. At the bottom of the Makefile is +an `include` statement that points to a common Makefile that is used by most +applications, and where all the details of the make process can be found. + +To compile the code, type:: + + $ make .exe + +If this gives an error, see :ref:`trouble_makeexe`. + +This should compile the example code (after first compiling the required +library routines) and produce an executable named `xclaw` in this directory. + +Before running the code, it is necessary to also create a set of data files +that are read in by the Fortran code. This can be done via:: + + $ make .data + +If this gives an error, see :ref:`trouble_makedata`. + +This uses the Python code in `setrun.py` to create data files that have the +form `*.data`. + +Once the executable and the data files all exist, we can run the code. The +recommended way to do this is to type:: + + $ make .output + +If this gives an error, see :ref:`trouble_makeoutput`. + +Before running the code a subdirectory `_output` is created +and the output of the code (often a large number of files) is directed to +this subdirectory. This is convenient if you want to do several runs with +different parameter values and keep the results organized. After the code +has run you can rename the subdirectory, or you can modify the variable +`OUTDIR` in the Makefile to direct results to a different directory. See +:ref:`makefiles` for more details. Copies of all the data files are also +placed in the output directory for future reference. + + + +**Plotting the results.** +Once the code has run and the files listed above have been created, there are several +options for plotting the results. + +To try the Python tools, type:: + + $ make .plots + +If this gives an error, see :ref:`trouble_makeplots`. + +If this works, it will create a subdirectory named `_plots` that contains a number of +image files (the `*.png` files) and a set of html files that can be used to view the +results from a web browser. See :ref:`plotting_makeplots` for more details. + +An alternative is to view the plots from an interactive Python session, as described in +the section :ref:`plotting_Iplotclaw`. + +If you wish to use Matlab instead, see :ref:`matlabplots`. + +Other visualization packages could also be used to display the results, but you will need +to figure out how to read in the data. See :ref:`fortfiles` for information about the +format of the files produced by Clawpack. + + diff --git a/v5.10.x/_sources/first_run_fortran.rst.txt b/v5.10.x/_sources/first_run_fortran.rst.txt new file mode 100644 index 0000000000..444efce460 --- /dev/null +++ b/v5.10.x/_sources/first_run_fortran.rst.txt @@ -0,0 +1,147 @@ +.. _first_run_fortran: + +Testing your Fortran installation and running an example +============================================================= + +This assumes that you have downloaded the Fortran components of Clawpack, +see :ref:`install_fortran`. + +First ensure that you have :ref:`setenv` +and that you have the :ref:`prereqs`. + +As a first test of the Fortran code, try the following:: + + cd $CLAW/classic/tests + nosetests -sv + +(You may need to install `nose `_ +if `nosetests` is not on your system.) + +This will run several tests and compare a few numbers from the solution with +archived results. The tests should run in a few seconds and +you should see output similar to this:: + + runTest (tests.acoustics_1d_heterogeneous.regression_tests.Acoustics1DHeterogeneousTest) ... ok + runTest (tests.acoustics_3d_heterogeneous.regression_tests.Acoustics3DHeterogeneousTest) ... ok + runTest (tests.advection_2d_annulus.regression_tests.Advection2DAnnulusTest) ... ok + + ---------------------------------------------------------------------- + Ran 3 tests in 4.639s + OK + + +There are similar `tests` subdirectories of `$CLAW/amrclaw` and +`$CLAW/geoclaw` to do quick tests of these codes. + + +Running an example +------------------ + +Many examples of Clawpack simulations can be seen in the +`gallery `__. + + +Classic +------- + +A simple 1-dimensional acoustics equations can be solved +using the code in `$CLAW/classic/examples/acoustics_1d_example1 +<_static/classic/examples/acoustics_1d_example1/README.html>`__. + +Move to this directory via:: + + cd $CLAW/classic/examples/acoustics_1d_example1 + +You can try the following test in this directory, or you may want to first +make a copy of it (see the instructions in :ref:`copyex`). + +The Makefiles are set up to do dependency checking so that in many +application directories you can simply type:: + + $ make .plots + +and the Fortran code will be compiled, data files created, the code +run, and the results plotted automatically, resulting in a set of webpages +showing the results. + +However, if this is your first attempt to run a code, it is useful to go +through these steps one at a time, both to understand the steps and so that +any problems with your installation can be properly identified. + +You might want to start by examining the Makefile. This sets a number of +variables, which at some point you might need to modify for other examples, +see :ref:`makefiles` for more about this. At the bottom of the Makefile is +an `include` statement that points to a common Makefile that is used by most +applications, and where all the details of the make process can be found. + +To compile the code, type:: + + $ make .exe + +If this gives an error, see :ref:`trouble_makeexe`. + +This should compile the example code (after first compiling the required +library routines) and produce an executable named `xclaw` in this directory. + +Before running the code, it is necessary to also create a set of data files +that are read in by the Fortran code. This can be done via:: + + $ make .data + +If this gives an error, see :ref:`trouble_makedata`. + +This uses the Python code in `setrun.py` to create data files that have the +form `*.data`. + +Once the executable and the data files all exist, we can run the code. The +recommended way to do this is to type:: + + $ make .output + +If this gives an error, see :ref:`trouble_makeoutput`. + +Before running the code a subdirectory `_output` is created +and the output of the code (often a large number of files) is directed to +this subdirectory. This is convenient if you want to do several runs with +different parameter values and keep the results organized. After the code +has run you can rename the subdirectory, or you can modify the variable +`OUTDIR` in the Makefile to direct results to a different directory. See +:ref:`makefiles` for more details. Copies of all the data files are also +placed in the output directory for future reference. + + + +**Plotting the results.** +Once the code has run and the files listed above have been created, there are several +options for plotting the results. + +To try the Python tools, type:: + + $ make .plots + +If this gives an error, see :ref:`trouble_makeplots`. + +If this works, it will create a subdirectory named `_plots` that contains a number of +image files (the `*.png` files) and a set of html files that can be used to view the +results from a web browser. See :ref:`plotting_makeplots` for more details. + +An alternative is to view the plots from an interactive Python session, as described in +the section :ref:`plotting_Iplotclaw`. + +If you wish to use Matlab instead, see :ref:`matlabplots`. + +Other visualization packages could also be used to display the results, but you will need +to figure out how to read in the data. See :ref:`fortfiles` for information about the +format of the files produced by Clawpack. + +More examples +------------- + +There are additional examples in these directories: + + * `$CLAW/classic/examples` + * `$CLAW/amrclaw/examples` + * `$CLAW/geoclaw/examples` + +You might also want to download the :ref:`apps`, which contains additional +examples. diff --git a/v5.10.x/_sources/first_run_pyclaw.rst.txt b/v5.10.x/_sources/first_run_pyclaw.rst.txt new file mode 100644 index 0000000000..dfe35a0ead --- /dev/null +++ b/v5.10.x/_sources/first_run_pyclaw.rst.txt @@ -0,0 +1,53 @@ +.. _first_run_pyclaw: + +Testing a PyClaw installation and running an example +===================================================== + +First ensure that you have :ref:`setenv` and that you have the :ref:`prereqs`. + +If you downloaded Clawpack manually, you can test your :ref:`pyclaw` +installation as follows (starting from your `clawpack` directory):: + + cd pyclaw/examples + nosetests + +This should return 'OK'. +(You may need to install `nose `_ +if `nosetests` is not on your system.) + + +Running an example +------------------ + +Many examples of PyClaw simulations can be seen in the +`PyClaw gallery `_ +and `Jupyter notebook examples `_. + +You might also want to download the :ref:`apps`, which contains additional +examples in `apps/notebooks/pyclaw`. + +From the Jupyter notebook +************************* + +Try any of the notebooks listed under PyClaw in the :ref:`notebooks`. + +From the IPython interpreter +**************************** +Launch an IPython session and then:: + + from clawpack.pyclaw import examples + claw = examples.shock_bubble_interaction.setup() + claw.run() + claw.plot() + +From the command line +********************* + +To run an example and plot the results using PyClaw, simply do the following +(starting from your `clawpack` directory):: + + cd pyclaw/examples/euler_2d + python shock_bubble_interaction.py iplot=1 + + +That's it. For next steps with PyClaw, see :ref:`basics`. diff --git a/v5.10.x/_sources/flagregions.rst.txt b/v5.10.x/_sources/flagregions.rst.txt new file mode 100644 index 0000000000..daa4e71d07 --- /dev/null +++ b/v5.10.x/_sources/flagregions.rst.txt @@ -0,0 +1,102 @@ + +.. _flagregions: + +Specifying flagregions for adaptive refinement +============================================== + +**New in Version 5.7.0.** + +AMRClaw and GeoClaw version 5.6.1 (and earlier) allow specifying +rectangular refinement regions (see :ref:`refinement_regions`) +in `setrun.py`, in the form of a list that is appended to +`rundata.regiondata.regions`:: + + rundata.regiondata.regions.append([minlevel,maxlevel,t1,t2,x1,x2,y1,y2]) + +This is a region that is active from time `t1` to `t2` over the +spatial extent `[x1,x2,y1,y2]`. + +Starting in v5.7.0 of AMRClaw/GeoClaw we now support a new approach to +specifying regions that are now called `flagregions` for more clarity +regarding what they are used for. The new data structure +also supports simple rectangles and so should ultimately replace +`regions` in both AMRClaw and GeoClaw, but currently you can mix and match. + + +The new way of specifying a flag region in `setrun.py` is to first +define an object `flagregion` of class `clawpack.amrclaw.data.FlagRegion`, +set various +attributes of this object (including `minlevel`, `maxlevel`, `t1`, +`t2`, and a spatial extent), and then append this object to the list +`rundata.flagregiondata.flagregions`. + +Here is how you would specify a simple rectangle as above in the new +style, chosen to cover the entire spatial domain and to allow only 1 level +everywhere (which might be supplemented by other regions where more levels +are allowed):: + + x1,x2,y1,y2 = [rundatat.clawdata.lower[0], rundatat.clawdata.upper[0], + rundatat.clawdata.lower[1], rundatat.clawdata.upper[1]] + + from clawpack.amrclaw.data import FlagRegion + flagregion = FlagRegion(num_dim=2) # so far only 2D supported + flagregion.name = 'Region_domain' + flagregion.minlevel = 1 + flagregion.maxlevel = 1 + flagregion.t1 = 0. + flagregion.t2 = 1e9 + flagregion.spatial_region_type = 1 # Rectangle + flagregion.spatial_region = [x1,x2,y1,y2] + rundata.flagregiondata.flagregions.append(flagregion) + +Note that `flagregion.spatial_region_type == 1` indicates that the +flagregion is a rectangle. + +.. _flagregions-rr: + +Using ruled rectangles as flagregions +------------------------------------- + +In addition to simple rectangles, more general ruled rectangles can also be +used as flagregions. These are a restricted set of polygons for which it is +easy to test if a point is inside or outside, as described in more detail in +:ref:`ruled_rectangles`. + +To specify a ruled rectangle, use `flagregion.spatial_region_type == 2` +and provide a path to a data file that describes the ruled rectangle. +For simple ruled rectangles the code to create the data file can also be +included in `setrun.py`. + +Here is an example where a simple ruled rectangle is defined and used as a +flagregion. In this case the flagregion is a trapezoid with vertices +:math:`(1,3),~ (1,6),~ (2,4),~ (2,7)`:: + + from clawpack.amrclaw.data import FlagRegion + flagregion = FlagRegion(num_dim=2) + flagregion.name = 'Region_Trapezoid' + flagregion.minlevel = 2 + flagregion.maxlevel = 3 + flagregion.t1 = 0. + flagregion.t2 = 1e9 + flagregion.spatial_region_type = 2 # Ruled Rectangle + flagregion.spatial_region_file = \ + os.path.abspath('RuledRectangle_Trapezoid.data') + rundata.flagregiondata.flagregions.append(flagregion) + + # code to make RuledRectangle_Trapezoid.data: + from clawpack.amrclaw import region_tools + rr = region_tools.RuledRectangle() + rr.method = 1 # piecewiselinear edges between s values + rr.ixy = 'x' # so s refers to x, lower & upper are limits in y + rr.s = np.array([1,2]) + rr.lower = np.array([3,6]) + rr.upper = np.array([4,7]) + rr.write('RuledRectangle_Trapezoid.data') # creates data file + + +See the `setrun.py` file in +`$CLAW/amrclaw/examples/advection_2d_flagregions` for additional examples. + +See :ref:`mf-amr-flag` for a more complex example where a ruled rectangle is +defined that covers a set of fgmax points (see :ref:`fgmax`) defined with the +:ref:`marching_front`. diff --git a/v5.10.x/_sources/force_dry.rst.txt b/v5.10.x/_sources/force_dry.rst.txt new file mode 100644 index 0000000000..eda3dedde9 --- /dev/null +++ b/v5.10.x/_sources/force_dry.rst.txt @@ -0,0 +1,393 @@ + +.. _force_dry: + +Force Cells to be Dry Initially +=============================== + +**New in Version 5.7.0.** + +Adapted from `this notebook +`_. + +See also :ref:`marching_front`, which describes a +tool to select points from a topography DEM that satisfy given +constraints on elevation, and how this can be used to determine dry land +behind dikes. + +This can then be used to define an array +that can be read into GeoClaw and used when initializing the water depth +during the creation of new grid patches. +See the section `Usage in GeoClaw Fortran code <#fdry-geoclaw>`__ +for instructions on how to specify this in `setrun.py`. + +We define an rectangular array `force_dry_init` that is aligned with +cell centers of the computational grid at some resolution (typically the +finest resolution) and that has the value `force_dry_init[i,j] = 1` to +indicate cells that should be initialized to dry (`h[i,j] = 0`) +regardless of the value of the GeoClaw topography `B[i,j]` in this +cell. If `force_dry_init[i,j] = 0` the the cell is initialized in the +usual manner, which generally means + +`h[i,j] = max(0, sea_level - B[i,j])`. + +Notes: + +- Another new feature allows initializing the depth so that the surface + elevation `eta` is spatially varying rather than using a single + scalar value `sea_level` everywhere. That feature is described in + :ref:`set_eta_init`. If that is used in + conjunction with a `force_dry_init` array, + `force_dry_init[i,j] = 1` still indicates that the cell should be + dry while elsewhere the “usual” thing is done. + +- The current implementation allows only one `force_dry_init` array + but in the future this may be generalized to allow multiple arrays + covering different subsets of the domain, and perhaps at different grid + resolutions. + +- Typically the `force_dry_init` array is computed from a DEM file at + the desired resolution, using the marching front algorithm defined in + :ref:`marching_front`. But recall that the + GeoClaw topography value `B[i,j]` does not agree with the DEM value + `Z[i,j]` even if the cell center is aligned with the DEM point due + to the way `B` is computed by averaging over piecewise bilinear + functions that interpolate the `Z` values. So one has to be careful + not to set `force_dry_init[i,j] = 1` in a cell close to the shore + simply because `Z > 0` at this point since the `B` value might be + negative in the cell. This is dealt with in the examples below by + doing some buffering. + +Contents +--------- + +- `Sample topography from a 1/3 arcsecond DEM <#fdry-topo>`__ +- `Creating the force_dry_init array <#fdry-init>`__ +- `Create file to read into GeoClaw <#fdry-file>`__ +- `Usage in GeoClaw Fortran code <#fdry-geoclaw>`__ + + +Examples +-------- + +First import some needed modules and set up color maps. + +.. code:: ipython3 + + %matplotlib inline + +.. code:: ipython3 + + from pylab import * + import os,sys + from numpy import ma # masked arrays + from clawpack.visclaw import colormaps + + from clawpack.geoclaw import marching_front, topotools + from clawpack.amrclaw import region_tools + from clawpack.visclaw import plottools + +.. code:: ipython3 + + zmin = -60. + zmax = 40. + + land_cmap = colormaps.make_colormap({ 0.0:[0.1,0.4,0.0], + 0.25:[0.0,1.0,0.0], + 0.5:[0.8,1.0,0.5], + 1.0:[0.8,0.5,0.2]}) + + sea_cmap = colormaps.make_colormap({ 0.0:[0,0,1], 1.:[.8,.8,1]}) + + cmap, norm = colormaps.add_colormaps((land_cmap, sea_cmap), + data_limits=(zmin,zmax), + data_break=0.) + + sea_cmap_dry = colormaps.make_colormap({ 0.0:[1.0,0.7,0.7], 1.:[1.0,0.7,0.7]}) + cmap_dry, norm_dry = colormaps.add_colormaps((land_cmap, sea_cmap_dry), + data_limits=(zmin,zmax), + data_break=0.) + +.. _fdry-topo: + +Sample topography from a 1/3 arcsecond DEM +------------------------------------------ + +We consider a small region on the SW coast of Whidbey Island north of +Maxwelton Beach as an example, as was used in +`MarchingFront.ipynb `__. + +.. code:: ipython3 + + region1_png = imread('region1.png') + extent = [-122.46, -122.38, 47.93, 47.96] + + figure(figsize=(12,6)) + imshow(region1_png, extent=extent) + gca().set_aspect(1./cos(48*pi/180.)) + + + +.. image:: ForceDry/output_9_0.png + + +We read this small portion of the 1/3 arcsecond Puget Sound DEM, +available from the NCEI thredds server: + +.. code:: ipython3 + + path = 'https://www.ngdc.noaa.gov/thredds/dodsC/regional/puget_sound_13_mhw_2014.nc' + topo = topotools.read_netcdf(path, extent=extent) + +Plot the topo we downloaded: + +.. code:: ipython3 + + figure(figsize=(12,6)) + plottools.pcolorcells(topo.X, topo.Y, topo.Z, cmap=cmap, norm=norm) + colorbar(extend='both') + gca().set_aspect(1./cos(48*pi/180.)) + + + +.. image:: ForceDry/output_13_0.png + + +This plot shows that there is a region with elevation below MHW (0 in +the DEM) where the Google Earth image shows wetland that should not be +initialized as a lake. We repeat the code used in :ref:`marching_front` +to identify dry land below MHW: + +.. code:: ipython3 + + wet_points = marching_front.select_by_flooding(topo.Z, Z1=-5., Z2=0., max_iters=None) + + Zdry = ma.masked_array(topo.Z, wet_points) + + figure(figsize=(12,6)) + plottools.pcolorcells(topo.X, topo.Y, Zdry, cmap=cmap, norm=norm) + colorbar(extend='both') + gca().set_aspect(1./cos(48*pi/180.)) + title('Dry land'); + + +.. parsed-literal:: + + Selecting points with Z1 = -5, Z2 = 0, max_iters=279936 + Done after 112 iterations with 59775 points chosen + + + + +.. image:: ForceDry/output_15_2.png + + +Now the blue region above is properly identified as being dry land. + +The colors are misleading, so here’s a way to plot with the dry land +that is below MHW colored pink to distinguish it from the water better: + +.. code:: ipython3 + + # Create a version of topo.Z with all wet points masked out: + mask_dry = logical_not(wet_points) + Z_dry = ma.masked_array(topo.Z, wet_points) + + # Create a version of topo.Z with only dry points below MHW masked out: + mask_dry_onshore = logical_and(mask_dry, topo.Z<0.) + Z_allow_wet= ma.masked_array(topo.Z, mask_dry_onshore) + + figure(figsize=(10,12)) + + # first plot all dry points as pink: + plottools.pcolorcells(topo.X, topo.Y, Z_dry, cmap=cmap_dry, norm=norm_dry) + + # then plot colored by topography except at dry points below MHW: + plottools.pcolorcells(topo.X, topo.Y, Z_allow_wet, cmap=cmap, norm=norm) + + gca().set_aspect(1./cos(48*pi/180.)) + ticklabel_format(useOffset=False) + xticks(rotation=20); + + + +.. image:: ForceDry/output_17_0.png + + +.. _fdry-init: + +Creating the `force_dry_init` array +------------------------------------- + +The array `wet_points` generated above has the value 1 at DEM points +identified as wet and 0 at points identified as dry, so if we set + +.. code:: ipython3 + + dry_points = 1 - wet_points + +then `dry_points[i,j] = 1` at the DEM points determined to be dry. We +do not necessarily want to force the GeoClaw cell to be dry however at +all these dry points, because the GeoClaw topography value `B` may be +slightly negative even if the DEM value `Z` was positive at the same +point, due to the way `B` is computed, and so this might force some +cells near the shore to have `h = 0` even though `B < 0`. + +Instead we will set `force_dry_init[i,j] = 1` only if +`dry_points[i,j] = 1` and the same is true of all its 8 nearest +neighbors. This avoids problems near the proper shoreline while forcing +cells inland to be dry where they should be. + +We also assume it is fine to set `force_dry_init[i,j] = 0` around the +boundary of the grid on which `dry_points` has been defined, so that +the usual GeoClaw procedure is used to initialize these points. If there +are points at the boundary that must be forced to be dry that we should +have started with a large grid patch. + +So we can accomplish this by summing the `dry_points` array over 3x3 +blocks and setting `force_dry_init[i,j] = 1` only at points where this +sum is 9: + +.. code:: ipython3 + + dry_points_sum = dry_points[1:-1,1:-1] + dry_points[0:-2,1:-1] + dry_points[2:,1:-1] + \ + dry_points[1:-1,0:-2] + dry_points[0:-2,0:-2] + dry_points[2:,0:-2] + \ + dry_points[1:-1,2:] + dry_points[0:-2,2:] + dry_points[2:,2:] + + # initialize array to 0 everywhere: + force_dry_init = zeros(dry_points.shape) + # reset in interior to 1 if all points in the 3x3 block around it are dry: + force_dry_init[1:-1,1:-1] = where(dry_points_sum == 9, 1, 0) + +If we use `1-force_dry_init` as a mask then we see only the points +forced to be dry: + +.. code:: ipython3 + + Zdry = ma.masked_array(topo.Z, 1-force_dry_init) + + figure(figsize=(12,6)) + plottools.pcolorcells(topo.X, topo.Y, Zdry, cmap=cmap, norm=norm) + colorbar(extend='both') + gca().set_aspect(1./cos(48*pi/180.)) + title('Points with force_dry_init==1') + + +.. image:: ForceDry/output_23_1.png + + +This looks a lot like the plot above where we masked with +`wet_points`. However, if we plot `dry_points - force_dry_init` we +see that this is not identically zero – and there are points along the +shore and the boundaries where the point was identified as dry but will +not be forced to be dry: + +.. code:: ipython3 + + figure(figsize=(12,6)) + plottools.pcolorcells(topo.X, topo.Y, dry_points - force_dry_init, + cmap=colormaps.white_red) + colorbar() + gca().set_aspect(1./cos(48*pi/180.)) + axis([-122.461, -122.379, 47.929, 47.961]) # expanded domain + title('Points with dry_points - force_dry_init==1'); + + +.. image:: ForceDry/output_25_1.png + + +.. _fdry-file: + +Create file to read into GeoClaw +-------------------------------- + +The array `force_dry_init` can now be saved in the same format as topo +files, using `topo_type=3` and specifying `Z_format='%1i'` so that +the data values from the array, which are all either 0 or 1, are printed +as single digits to help reduce the file size. + +Note we also use the new convenience fuction `set_xyZ` introduced in +`topotools.Topography`. + +.. code:: ipython3 + + force_dry_init_topo = topotools.Topography() + force_dry_init_topo.set_xyZ(topo.x, topo.y, force_dry_init) + + # Old way of setting x,y,Z: + #force_dry_init_topo._x = topo.x + #force_dry_init_topo._y = topo.y + #force_dry_init_topo._Z = force_dry_init + #force_dry_init_topo.generate_2d_coordinates() + + fname_force_dry_init = 'force_dry_init.data' + force_dry_init_topo.write(fname_force_dry_init, topo_type=3, Z_format='%1i') + print('Created %s' % fname_force_dry_init) + + +.. parsed-literal:: + + Created force_dry_init.data + + +As usual, the first 6 lines of this file are the header, which is then +followed by the data: + +.. parsed-literal:: + + 864 ncols + 324 nrows + -1.224599074275750e+02 xlower + 4.793009258334999e+01 ylower + 9.259259000800000e-05 cellsize + -9999 nodata_value + + +.. _fdry-geoclaw: + +Usage in GeoClaw Fortran code +----------------------------- + +To use a `force_dry_init.data` file of the sort created above, when +setting up a GeoClaw run the `setrun.py` file must be modified to +indicate the name of this file along with a time `tend`. The array is +used when initializing new grid patches only if `t < tend`, so this +time should be set to a time after the finest grids are initialized, but +before the tsunami arrives. + +For example, to use the file `force_dry_init.data` to indicate cells that +should be forced to be dry for times up to 15 minutes, we could specify:: + + from clawpack.geoclaw.data import ForceDry + force_dry = ForceDry() + force_dry.tend = 15*60. + force_dry.fname = 'force_dry_init.data' + rundata.qinit_data.force_dry_list.append(force_dry) + + +Internal GeoClaw modifications +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following files in `geoclaw/src/2d/shallow` have been modified to +handle the `force_dry_init` array: + +- `setprob.f90` to read in a parameter indicating that there is such + an array, +- `qinit_module.f90` with code to read the array, +- `qinit.f90` to initialize dry land properly at the initial time, +- `filpatch.f90` to initialize new grid patches properly at later + times, +- `filval.f90` to initialize new grid patches properly at later + times. + +The `force_dry_init` array is used when initializing new patches only +if: + +- The resolution of the patch agrees with that of the + `force_dry_init` array, and it is then assumed that the points in + the array are aligned with cell centers on the patch. +- The simulation time `t` is less than `t_stays_dry`, a time set to + be after the relevant level is introduced in the region of interest + but before the main tsunami wave has arrived. At later times the + tsunami may have gotten a region wet even if `force_dry_init` + indicates is should be initially dry. + diff --git a/v5.10.x/_sources/fortran.rst.txt b/v5.10.x/_sources/fortran.rst.txt new file mode 100644 index 0000000000..617ca176bd --- /dev/null +++ b/v5.10.x/_sources/fortran.rst.txt @@ -0,0 +1,81 @@ + +.. _fortran: + +*************** +Fortran version +*************** + + +Input parameters are generally specified in a Python script :file:`setrun.py` +and then:: + + $ make .data + +creates the :file:`*.data` files that the Fortran code requires. + + +Makefiles +--------- + +Most example directories contain a :file:`Makefile` that offers several +options. Type:: + + $ make help + +for a list. +Often:: + + $ make .plots + +is all you need to type to create the data files, +compile the code, run it, and produce plots as png and html files. + +Or, if you just want to run the code and produce output without making +all the plots (and then do the plotting interactively, for example):: + + $ make .output + +Note: There is a dot before ``plots`` and ``output`` in the above +commands. + +The directory where output and plots are stored is specified in the Makefile. + +The Makefile in most directories includes a common Makefile found at +`$CLAW/clawutil/src/Makefile.common` that does most of the work. +If you get the error message:: + + Makefile: /clawutil/src/Makefile.common: No such file or directory + +then the environment variable `CLAW` is not set properly. +See :ref:`setenv`. + +More tips +--------- + +* The "make .output" + command runs the code and stores the name of the output directory in the + file ``.output`` and it is the modification time of this file that is checked + relative to the dependencies. (Note: the unix command ls generally does + not display files that start with a dot so this file may be invisible + unless you use "ls -a".) + + If you want to re-run the code and encounter:: + + $ make .output + $ make: `.output' is up to date. + + you can remove the file ``.output`` to force the code to be run again. + +* Similarly, remove the file ``.plots`` to force the plots to be recreated. + + +* If you change the compiler flags FFLAGS in the Makefile or as an + environment variable, then you should + make sure that all files used are recompiled with the new flags. The + Makefiles as written do not catch this dependency and will not recompile + all the .o files when the Makefile changes. To force recompilation, + use:: + + $ make new + + See :ref:`fortran_compilers` for more about compiler flags. diff --git a/v5.10.x/_sources/fortran_compilers.rst.txt b/v5.10.x/_sources/fortran_compilers.rst.txt new file mode 100644 index 0000000000..de6215cd3f --- /dev/null +++ b/v5.10.x/_sources/fortran_compilers.rst.txt @@ -0,0 +1,147 @@ + +.. _fortran_compilers: + +************************************** +Fortran Compilers +************************************** + +This section is relevant to users who want to compile the fortran code in +the classic, amrclaw, or geoclaw branches. + +.. _fortran_FC: + +`FC` environment variable +------------------------- + +Users should set the environment variable `FC` to point to the correct +compiler, e.g. in bash via:: + + $ export FC=gfortran + +Note that some versions of `make` will set `FC=f77` by default if no value +is specified, and adding a line to the Makefile such as:: + + FC ?= gfortran + +will not override this. The common Makefile in +`$CLAW/clawutil/src/Makefile.common` now tests to see if `FC` is set to +`f77` and if so resets it to `gfortran` since much of Clawpack is not `f77` +compliant. However, it is best to set the `FC` environment variable +yourself, e.g. in your `.bashrc` file. + +.. _fortran_FFLAGS: + +`FFLAGS` environment variable +----------------------------- + +Compiler flags can be specified using the `FFLAGS` variable that can be set +in an application Makefile. By default sample Makefiles now specify:: + + FFLAGS ?= + +so that no flags are used unless the +environment variable `FFLAGS` is set already. This line can be changed in +the Makefile, but it is often easiest to set an environment variable for the +flags you generally want to use. + +**Note:** If you change the flags you generally have to recompile *all* the +code, and this dependency is not handled automatically. So always do:: + + $ make new + +before rerunning an example with `make .output` or `make .plots`. + + +.. _fortran_LFLAGS: + +`LFLAGS` environment variable +------------------------------ + +The `LFLAGS` environment variable is used to provide flags that are needed when +linking the final binary. The most likely use for this flag would be to link a +particular library with the binary (such as a NetCDF library) or provide a path +to a compiled module. If this variable is not set in the environment then +`LFLAGS` defaults to the relevant flags in `FFLAGS`. + + +.. _fortran_PPFLAGS: + +Pre-Processor and the `PPFLAGS` environment variable +---------------------------------------------------- + +Compilers often provide a pre-processor that can scan source code before +compilation providing some ability to define variables at compile time or +transform the code. Currently the pre-processor is always called before +Clawpack compilation to support optional dependencies, such as NetCDF support, +and some testing abilities. The `PPFLAGS` environment variable is meant to +provide further control of the pre-processor. + + +.. _fortran_gfortran: + +gfortran compiler +--------------------- + + +*Some useful flags:* + +* For debugging:: + + FFLAGS = -g -Wall -pedantic -fbounds-check -ffpe-trap=invalid,overflow,zero + +* For optimizing:: + + FFLAGS = -O2 + +* For using OpenMP:: + + FFLAGS = -O2 -fopenmp + + In this case you should also set some environment variables. See + :ref:`openmp` for details. + + **Note:** Versions of gfortran before 4.6 are known to have OpenMP bugs. + +* For using NetCDF:: + + FFLAGS = -DNETCDF -lnetcdf -I$(NETCDF4_DIR)/include + LFLAGS = -lnetcdf + + The `FFLAGS` can also be put into `PPFLAGS`. Note that the variable + `NETCDF4_DIR` should be defined in the environment. + + +.. _fortran_intel: + +Intel fortran compiler +---------------------- + +Set the `FC` environment variable to `ifort`. + +*Some useful flags:* + +* For debugging:: + + FFLAGS = -g -C -CB -CU -fpe0 -ftrapuv -fp-model precise + +* For optimizing:: + + FFLAGS = -O2 + +* For using OpenMP:: + + FFLAGS = -O2 -qopenmp + + In this case you should also set the environment variable `OMP_NUM_THREADS` + to indicate how many threads to use. + + For older versions of the ifort compiler, you may instead need:: + + FFLAGS = -O2 -openmp + +* For using NetCDF:: + + FFLAGS = -DNETCDF -lnetcdf -I$(NETCDF4_DIR)/include + LFLAGS = -lnetcdf + + Same as for gfortran above. diff --git a/v5.10.x/_sources/fvmbook.rst.txt b/v5.10.x/_sources/fvmbook.rst.txt new file mode 100644 index 0000000000..04b4838f0a --- /dev/null +++ b/v5.10.x/_sources/fvmbook.rst.txt @@ -0,0 +1,45 @@ + +.. _fvmbook: + +############################ +Examples from the book FVMHP +############################ + + + +The book `Finite Volume Methods for Hyperbolic Problems +`_ +contains many examples that link to Clawpack codes used to create the +figures in the book. These codes were originally developed for Clawpack +4.3 and these versions are still available from +`this webpage `_, +but they will only run with Clawpack 4.3, which has not been developed since +2006. + +Many of the examples have been converted to Clawpack 5.x form, with +a `setrun.py` file for setting run time data and a `setplot.py` +file for specifying plots with Python. See: + + * :ref:`setrun` + * :ref:`setplot` + +Available examples +------------------ + +The examples converted to v5.x form so far can be found in the +directory `apps/fvmbook` if you clone the `apps` repository. +(See :ref:`apps`.) + +You can also browse the examples and plots/animations of the results in the +`Clawpack gallery of fvmbook applications `__ + +YouTube Videos +-------------- + +A set of 25 videos on material from the book were recorded in 2023 and are +available in `this playlist +`__ +on the `Clawpack YouTube channel +`__. +For a summary of the contents of each video, see `this webpage +`__. diff --git a/v5.10.x/_sources/galleries.rst.txt b/v5.10.x/_sources/galleries.rst.txt new file mode 100644 index 0000000000..d7a16c7923 --- /dev/null +++ b/v5.10.x/_sources/galleries.rst.txt @@ -0,0 +1,34 @@ +:orphan: + +.. _galleries: + +================== +Clawpack Gallery +================== + +The `Clawpack Gallery `__ +is available only for the latest release of Clawpack. + +The Gallery shows results obtained by running many of the examples that are +included with Clawpack, from the directories + +- `$CLAW/pyclaw/examples` +- `$CLAW/classic/examples` +- `$CLAW/amrclaw/examples` +- `$CLAW/geoclaw/examples` + +and also from + +- `$CLAW/apps` + +which must be obtained separately from the main installation of Clawpack, +see :ref:`apps`. + +The directory `$CLAW/apps/notebooks` contains a number of Jupyter +notebooks that illustrate various aspects of Clawpack. +Many of these are also visible in rendered html form in the +`Gallery of Notebooks `__. + +The directory `$CLAW/apps/fvmbook` contains a number of +:ref:`fvmbook`. + diff --git a/v5.10.x/_sources/gauges.rst.txt b/v5.10.x/_sources/gauges.rst.txt new file mode 100644 index 0000000000..386f0662b9 --- /dev/null +++ b/v5.10.x/_sources/gauges.rst.txt @@ -0,0 +1,279 @@ + + +.. _gauges: + +*************** +Gauges +*************** + + +With AMRClaw in two space dimensions and GeoClaw +it is possible to specify gauge locations as points (x,y) where the values of all +components of q should be output every time step during the computation over some +time range (t1,t2). + +Gauges are useful in several ways, e.g.: + + 1. To compare computational results to measurements from + physical gauges such as a pressure gauge or tide gauge that + record data as a function of time at a single point, + + 2. To better visualize how the solution behaves at a single point, + + 3. To better compare results obtained with different methods or grid resolutions. + Comparing two-dimensional pcolor or contour plots can be difficult whereas + comparing to curves that give the solution as a function of time often reveals + more clearly differences in accuracy or nonphysical oscillations. + +**Note:** The capability of using :ref:`lagrangian_gauges` has been added to +GeoClaw in Version 5.7.0 (it is not available in AMRClaw at this time). + +**Note:** One can also use the :ref:`fgout` capabilities added to +GeoClaw in Version 5.9.0 in order to capture the solution over a specified +fixed grid at frequent output times. If this output is frequent enough, +then it is also possible to sample these outputs at a fixed location to give +a time series similar to a gauge output, but with the advantage that the +points need not be specified prior to the run (at least for any point that +can be spatially interpolated from the fgout grid(s) captured in the run). +The temporal resolution will be that specified for the fgout grids. +See :ref:`fgout` for more details. + +.. _setrun_guages: + +Gauge parameters in setrun +-------------------------- + +See also :ref:`setrun_amrclaw`. + +Gauges are specified in `setrun` by adding lists of gauge data for each +desired gauge to the `ClawRunData` +object `rundata.gaugedata.gauges`. This is initialized as an empty list and +new gauges can be specified by:: + + rundata.gaugedata.gauges.append([gaugeno, x, y, t1, t2]) + +with values + +* *gaugeno* : integer + + the number of this gauge + +* *x, y* : floats + + the location of this gauge + +* *t1, t2* : floats + + the time interval over which gauge data should be output. + + +During the computation the value of all components of q at all gauge locations will +be output to a single file `fort.gauge` in the output directory. Lines of this +file have the form:: + + gaugeno level t q[0] q[1] ... q[meqn-1] + +where level is the AMR level used to determine the q values at this time. +Internally the finest level available at each gauge is used, with bilinear +interpolation to the gauge locations from the 4 nearest cell centers. + +**Note:** In GeoClaw, zero-order interpolation is used instead of piecewise +linear interpolation; see :ref:`nearshore_interp`. + +**New in 5.4.0.** +The output that is in the gauge files can be controlled by a variety of +parameters. These can be specified on a per gauge basis or set for all gauges +specified. The output parameters are + +- *file_format* : Specifies the file format of the gauge data. Starting in + v5.9.0, this value can be *"ascii"*, *"binary64*", or *"binary32*". + The latter value generally results in the smallest file size and reduction + of the 8-byte computated values to 4-byte output still gives sufficient + precision for most applications. +- *display_format* : Specifies the format of the numbers written to the gauge + file for each field, in the case *file_format="ascii"*. + These are Fortran format strings defaulting to *"e15.7"*. +- *q_out_fields* : Specifies which fields of the q array to output. Specify as + a list the indices that should be output. Defaults to *"all"*. +- *aux_out_fields* : Specifies which fields of the aux array to output. + Specify as a list the indices that should be output. Defaults to *"none"* +- *min_time_increment* : Specify a minimum amount of time that should pass + before recording the values at a gauge. This can be useful for decreasing + the amount of output at a gauge location that is currently being + time-stepped at small increments. The default is *0* which effectively + turns off this constraint. + +Setting these values can be done in multiple ways for convenience. The most +direct way is via a dictionary with the keys as the gauge ids and the +corresponding parameter as the value. For example, if we had 3 gauges with +ids 3, 7, 13 we could specify that they all use the display format *e26.16* by +setting:: + + rundata.gaugedata.display_format = "e26.16" + +or:: + + rundata.gaugedata.display_format = {3:"e26.16", 13:"e8.6"} + +to set gauge 3's display format to "e26.16", leave gauge 7 set to the default +and set 13's to "e8.6". + +For the parameters *q_out_fields* and +*aux_out_fields* one can also specify *"all"* to output all fields or *"none"* +to specify none of them (equivalent to an empty list of indices). Both of +these arrays use Python indexing, i.e. they start at 0. + +**Note:** For GeoClaw, the sea-surface value :math:`\eta = h + B` (sum of +water depth and topography) is also output as another column after the q fields. +In the case of the multilayer code the eta for each surface follows the q +fields for that layer. + +**New in 5.4.0:** + + - Gauge output is accumulated in a buffer internally and written out + intermitently, instead of writing to disk every time step. + (The parameter `MAX_BUFFER` in the `amrclaw` library routines + `gauges_module.f90` controls the size of this buffer.) + + - The gauge output for the gauges is written to distinct files in the + output directory, e.g. `gauge00001.txt` for gauge number 1. In previous + versions of Clawpack all gauges were written to a single file + `fort.gauge`. The new approach allows gauges to be written in parallel and + also facilitates reading in a single gauge more quickly. + + - Some header info appears in each of these files to describe the gauge + output. + + - **New in 5.9.0:** If binary output is requested (see below) then files + such as `gauge00001.txt` contain only a header for each gauge, but the + data is all in a corresponding binary file such as `gauge00001.bin`. + + - When doing a restart (see :ref:`restart`), gauge output from the original run + is no longer overwritten by the second run. Instead gauge + output from the restart run will be appended to the end of each + `gaugeXXXXX.txt` file (or `gaugeXXXXX.bin` in the case of binary output). + Note that if you restart from a time earlier than the end of the previous + computation, or do multiple restarts from the same checkpoint file, + the appended data will not be at monotonically increasing times. + + +Plotting tools +-------------- + +Several Python plotting tools are available to plot the gauge data, so you do not +have to parse the file `fort.gauge` yourself. + +If you want to read in the data for a particular gauge to manipulate it +yourself, you can do, for example:: + + from clawpack.pyclaw.gauges import GaugeSolution + g = GaugeSolution(gauge_id=1, path='_output') + +to examine gauge number 1, for example. + +Then: + +* `g.t` is the array of times, +* `g.q` is the array of values recorded at the gauges (`g.q[m,n]` is the `m`th + variable at time `t[n]`) + + +Alternatively, you can use the `getgauge` method of a `ClawPlotData` object, +e.g.:: + + from clawpack.visclaw.data import ClawPlotData + plotdata = ClawPlotData() + plotdata.outdir = '_output' # set to the proper output directory + gaugeno = 1 # gauge number to examine + g = plotdata.getgauge(gaugeno) + + +In the `setplot` Python script you +can specify plots that are to be done for each gauge, similar to the manner in +which you can specify plots that are to be done for each time frame. For example, +to plot the component q[0] at each gauge, include in `setplot` lines of this form:: + + plotfigure = plotdata.new_plotfigure(name='q[0] at gauges', figno=300, \ + type='each_gauge') + + # Set up for axes in this figure: + plotaxes = plotfigure.new_plotaxes() + plotaxes.xlimits = 'auto' + plotaxes.ylimits = [-1.5, 1.5] + plotaxes.title = 'q[0]' + + # Plot q[0] as blue line: + plotitem = plotaxes.new_plotitem(plot_type='1d_plot') + plotitem.plot_var = 0 + plotitem.plotstyle = 'b-' + +Note that `plotdata.new_plotfigure` is called with `type='each_gauge'` which +denotes that this plot is to be produced for each gauge found in `setgauges.data`. +(When type is not specified, the default is `type='each_frame'` for time frame data). + +If you type:: + + $ make .plots + +then html files will be created for the gauge plots along with the time frame plots +and will all show up in the index (usually in `_plots/_PlotIndex.html`). + +When using Iplotclaw to interactively view plots, try:: + + PLOTCLAW> plotgauge 1 + +to produce the plot for gauge 1, or simply:: + + PLOTCLAW> plotgauge + +to loop through all gauges. If you rerun the code without re-executing +`Iplotclaw`, you can refresh the gauge data via:: + + PLOTCLAW> cleargauges + +You can of course specify more than one plotitem on each plotaxes if you want. For +example to plot the each gauge from the current run as a blue line and the same +gauge from some previous run (perhaps with a different grid resolution) +as a red line, you could add the following lines to the above example:: + + # Plot q[0] from previous run as red line: + plotitem = plotaxes.new_plotitem(plot_type='1d_plot') + plotitem.plot_var = 0 + plotitem.plotstyle = 'r-' + plotitem.outdir = '_output_from_previous_run' + + +Plotting gauge locations +------------------------ + +It is often convenient to plot the locations of the gauges on pcolor or contour +plots each time frame. You can do this as follows, for example:: + + plotfigure = plotdata.new_plotfigure(name='pcolor', figno=0) + plotaxes = plotfigure.new_plotaxes('pcolor') + plotitem = plotaxes.new_plotitem(plot_type='2d_pcolor') + # set other attributes as desired + + def addgauges(current_data): + from clawpack.visclaw import gaugetools + gaugetools.plot_gauge_locations(current_data.plotdata, \ + gaugenos='all', format_string='ko', add_labels=True) + + plotaxes.afteraxes = addgauges + +You can replace `gaugenos='all'` by `gaugenos=[1,2]` or other list of specific +gauges to plot. The `format_string` above specifies a black dot at each gauge +location and `add_labels=True` means that the gauge number will appear next to each +gauge. + +If you want more control over this plotting you can of course copy the function +`plot_gauge_locations` from `clawpack.visclaw.gaugetools.py` +to your setplot.py file and modify at will. + +Examples +-------- + +Several of the examples found in `$CLAW/amrclaw/examples/` +and `$CLAW/geoclaw/examples/` contain the specification of gauges. + + diff --git a/v5.10.x/_sources/geoclaw.rst.txt b/v5.10.x/_sources/geoclaw.rst.txt new file mode 100644 index 0000000000..1f8bd7cd35 --- /dev/null +++ b/v5.10.x/_sources/geoclaw.rst.txt @@ -0,0 +1,72 @@ +.. _geoclaw: + +********************************************* +GeoClaw Description and Detailed Contents +********************************************* + +See `www.geoclaw.org `_ for more overview of the +GeoClaw software and links to references and uses. + +.. warning:: As with all of Clawpack, this code is provided as a research + and teaching tool with no guarantee of suitability for any particular + purpose, and no liability on the part of the authors. See the + :ref:`license` for more details and :ref:`geohints` for tips on + exercising appropriate care in using the code. + +The `$CLAW/geoclaw` directory contains a specialized version of some Clawpack +and AMRClaw routines that have been modified to work well for certain +geophysical flow problems. + +Currently the focus is on 2d depth-averaged +shallow water equations for flow over varying topography. The term +*bathymetry* is often used for underwater topography (sea floor or lake +bottom), but in this documentation and in the code the term *topography* is +often used to refer to either. + +A primary concern with such flows is handling the margins of the flow where +the depth goes to 0, for example at the shore line. In GeoClaw this is +handled by letting the depth variable *h* in the shallow water equations be +0 in some cells. Robust Riemann solvers are used that allow for dry cells +adjacent to wet cells and that allow wetting and drying, for example as a +tsunami inundates dry land. + +Some sample calculations can be viewed in the :ref:`gallery_geoclaw`. +illustrated in the `Gallery of GeoClaw applications +`__. +See also the `sample Jupyter notebooks +`__. +More will eventually appear in the :ref:`apps`. + +.. toctree:: + :maxdepth: 2 + + geoclaw_started + geohints + topo + grid_registration + topotools + setrun_geoclaw + plotting_geoclaw + googleearth_plotting + quick_tsunami + quick_surge + okada + sealevel + set_eta_init + lagrangian_gauges + manning + fgout + fgmax + nearshore_interp + tsunamidata + surgedata + marching_front + force_dry + sphere_source + geoclaw1d + bouss1d + bouss2d + +* `Links `_ + to relevant papers and sample codes (some are based on the Clawpack 4.x + version of GeoClaw). diff --git a/v5.10.x/_sources/geoclaw1d.rst.txt b/v5.10.x/_sources/geoclaw1d.rst.txt new file mode 100644 index 0000000000..9f55bf8999 --- /dev/null +++ b/v5.10.x/_sources/geoclaw1d.rst.txt @@ -0,0 +1,201 @@ +.. _geoclaw1d: + +********************************************* +GeoClaw in One Space Dimension +********************************************* + +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 `GeoClaw Gallery +`__ + +.. _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 [BergerLeVeque2023]_. + 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`. In this case `0 <= x <= 1` is used in the examples, + but any computational grid interval can be used as long as `mapc2p` + maps equally spaced points on this interval to te desired physical grid. + +- `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`. + A `mapc2p` function that maps the unit interval to the physical grid + must then be specified in `setplot.py`, and can be generated using the + function `clawpack.geoclaw.nonuniform_grid_tools.make_mapc2p()`. + + The module `clawpack.geoclaw.nonuniform_grid_tools.py` + also includes tools to create a nonuniform grid with the property that + a specified uniform grid width is used onshore an in very shallow + water, but are much larger in deeper water, with the physical grid widths + chosen so that the CFL number is roughly uniform (based on the propagation + speed `sqrt(g*h)`). + Most of the examples in `$CLAW/geoclaw/examples/1d_classic/` + illustrate this. + +Note that when using `grid_type` 1 or 2, any gauges specified in `setrun.py` +must be specified in computational coordinates, not physical coordinates. +See, e.g. `$CLAW/geoclaw/examples/1d_classic/ocean_shelf_beach/setrun.py` +for an example. + +.. 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`. + diff --git a/v5.10.x/_sources/geoclaw_started.rst.txt b/v5.10.x/_sources/geoclaw_started.rst.txt new file mode 100644 index 0000000000..c4c7f8fc41 --- /dev/null +++ b/v5.10.x/_sources/geoclaw_started.rst.txt @@ -0,0 +1,60 @@ +.. _geoclaw_started: + +Getting started with GeoClaw +============================ + +.. _geoclaw_run: + +Running a GeoClaw code +---------------------- + +Setting up, running, and plotting a GeoClaw application follows the same pattern +as other AMRClaw applications, which in turn use many of the same +conventions as the classic single grid Clawpack code, in particular: + + * Setting parameters is done in `setrun.py`, as for other versions + of Clawpack, as described in :ref:`setrun`. However, there are several + new parameters that may or must be set for GeoClaw. See + :ref:`setrun_geoclaw` for more details on these. + + * The program can be compiled and run using *make* and *make .output* as + for other versions, see :ref:`fortran`. + + * Plots of results can be created either as a set of webpages via + *make .plots* or interactively using *Iplotclaw*. See + :ref:`plotting` for more details. Some additional Python plotting tools + that are useful for GeoClaw output (e.g. plotting land and water with + different colormaps) are described in the section + :ref:`plotting_geoclaw`. + + +.. _topo_intro: + +Topography +---------- + +To simulate flow over topography it is of course necessary to specify +the topography. This is usually done by providing one or more files of +surface elevation (relative to some reference, e.g. sea level) at a set of +points on a rectangular grid (with x-y locations in Cartesian units or in +latitude-longitude, depending on the application). + +Several file formats are recognized by GeoClaw. See :ref:`topo` for more +information on how to specify topography and some on-line resources for +obtaining topography. + +.. _geoclaw_plotting: + +Plotting GeoClaw results +------------------------ + +GeoClaw results can be plotted with the usual Python plotting tools (see +:ref:`plotting`). + +Some special tools and colormaps are available, see :ref:`geoplot`. + +Setting up a new example +------------------------ + + * :ref:`quick_tsunami` + diff --git a/v5.10.x/_sources/geoclaw_util_module.rst.txt b/v5.10.x/_sources/geoclaw_util_module.rst.txt new file mode 100644 index 0000000000..d026bc3a7d --- /dev/null +++ b/v5.10.x/_sources/geoclaw_util_module.rst.txt @@ -0,0 +1,14 @@ + +.. _geoclaw_util_module: + +geoclaw.util module of utility functions +======================================== + +**This describes new tools added in Clawpack 5.2.1.** + +Documentation auto-generated from the module docstrings +-------------------------------------------------------- + +.. automodule:: clawpack.geoclaw.util + :members: + diff --git a/v5.10.x/_sources/geohints.rst.txt b/v5.10.x/_sources/geohints.rst.txt new file mode 100644 index 0000000000..9e1d87f78b --- /dev/null +++ b/v5.10.x/_sources/geohints.rst.txt @@ -0,0 +1,106 @@ + + +.. _geohints: + +================================== +Cautionary Hints on using GeoClaw +================================== + +As with all of Clawpack, the GeoClaw code is provided as a research +and teaching tool with no guarantee of suitability for any particular +purpose, and no liability on the part of the authors. See the +:ref:`license` for more details. + +The authors believe that GeoClaw can be used for some real-world modeling of +geophysical hazards, but it is the responsibility of the user to fully +understand the model and its limitations and validate it for the intended +purpose. + +.. _geohints_tsunami: + +Tsunami hazard modeling +----------------------- + +GeoClaw is currently in use for tsunami hazard assessment +by several research groups. Version 4.6.1 of the code was approved in 2012 +by the US National Tsunami Hazard +Mitigation Program (`NHTMP `_) for use in +modeling work supported by the program, after an extensive benchmarking +project, the results of which can be found on the +`NTHMP benchmarking page +`_. + +However, users who wish to apply GeoClaw to the real world should be aware +that doing so properly requires a good understanding of the capabilities and +limitations of the code, the equations they model, and the suitability of +using these equations to model any particular real-world scenario. + +The authors of this code have invested considerable time in learning about +appropriate aspects of geohazard modeling, through reading the literature +and working directly with geoscientists who are domain experts. Even so we +are very cautious in using any results from GeoClaw without performing +sensitivity studies, grid refinement studies, etc., and if possible comparing +results with those obtained by other modeling groups and confirming with +experts that the results are reasonable. +It is impossible to encapsulate the knowledge needed to deal with all the +inaccuracies and uncertainties of geohazard modeling in any piece of +software or its documentation, and there is +no replacement for extensively reading the +literature and working with domain experts. + +It is also important to understand the various parameters in GeoClaw and if +necessary experiment with different settings and perform sensitivity studies. +See :ref:`setrun_geoclaw`. + +Here are a few of the things that should be considered in any GeoClaw +simulation: + +* The depth-averaged shallow water equations are a fairly good model for the + fluid dynamics of tsunamis provided the wave length is long relative to + the depth of the water. In particular, for large tsunamis generated by + subduction zone earthquakes propagating over the ocean, these equations + may be adequate. However, even then, they are only an approximation. + More accurate depth-averaged equations such as Boussinesq equations that + include dispersive terms may be more accurate. + +* For short wavelength tsunamis such as those generated by landslides, + shallow water equations are less accurate since dispersive terms can be very + important. Incorporating dispersive terms in GeoClaw is planned for the + future but not yet available. These limitations should be clearly + understood. + +* GeoClaw solves the nonlinear shallow water equations and can capture + turbulent bore formation to some extent via the formation of shock waves. + It does not model wave breaking directly and in the nearshore region the + use of depth-averaged equations may be inaccurate since the flow becomes + fully three-dimensional. Reasonable agreement with observations from + historic events and wave tank experiments have been seen in validation + studies, both of GeoClaw and other shallow water codes, but caution is + required. + +* The empirical Manning formulation is used to model bottom friction, as + described further in the section :ref:`manning`, where some limitations + are discussed. + +* For most tsunami simulations including the Coriolis terms in the momentum + equations makes little difference in the observed results and so these + terms are often turned off for efficiency (*coriolis_forcing = False*). + +* The geoclaw parameter *sea_level* determines the initial fluid depth + relative to the topography, as specified by the *topo* files. + It is important to know what + `vertical datum `_ + the topography is relative to. Coastal bathymetry developed for tsunami + modeling is often relative to Mean High Water (MHW) at some point, in + which case setting *sea_level = 0.* corresponds to assuming the water level + being initially at MHW. See :ref:`sea_level` for more information. + +* Tsunami modeling generally requires specifying a seafloor displacement in + order to initiate the tsunami, by specifying a *dtopo* file. This may be a + time-dependent displacement, as explained in :ref:`dtopo`. However, it is + important to understand that any displacement of the seafloor causes the + entire water column above this point to be shifted upwards by the same + amount (since the depth *h* is held constant), and so is immediately + observed in the sea surface elevation. In reality, displacement of the + seafloor leads to the propagation of acoustic waves that result in a + surface displacement diff --git a/v5.10.x/_sources/geoplot.rst.txt b/v5.10.x/_sources/geoplot.rst.txt new file mode 100644 index 0000000000..0d1c004264 --- /dev/null +++ b/v5.10.x/_sources/geoplot.rst.txt @@ -0,0 +1,38 @@ + +.. _geoplot: + +======================================================== +GeoClaw plotting tools +======================================================== + +**Needs updating** + +The module `$CLAW/visclaw/geoplot.py` contains some useful tools for +plotting GeoClaw output. + +To be continued. See comments in the module. + + +Plotting water depth or surface elevation +----------------------------------------- + +For information on using masked arrays, see: + + * `Masked array operations `_ + +Tips on latitude-longitude coordinate axes +------------------------------------------- + +With the default style, matplotlib axis labels are often hard to read when +plotting in latitude and longitude. It may help to disable offset labeling +and to rotate the longitude labels:: + + ticklabel_format(format='plain',useOffset=False) + xticks(rotation=20) + +To set the aspect ratio so that latitude and longitude are scaled +appropriately, set `mean_latitude` to some average latitude value in the +region of interest and then:: + + gca().set_aspect(1./cos(mean_latitude*pi/180.)) + diff --git a/v5.10.x/_sources/git_versions.rst.txt b/v5.10.x/_sources/git_versions.rst.txt new file mode 100644 index 0000000000..c473360e32 --- /dev/null +++ b/v5.10.x/_sources/git_versions.rst.txt @@ -0,0 +1,37 @@ + +.. _git_versions: + +============================================= +Keeping track of repository versions with Git +============================================= + +The command:: + + python $CLAW/clawutil/src/python/clawutil/claw_git_status.py + +will report on the status of all Clawpack repositories found, e.g. what +branch is checked out, the hash of the most recent commit, and any tracked +files with uncommitted changes. This information will be saved to a file +`claw_git_status.txt` and any diffs found for uncommitted changes will be +saved to a file `claw_git_diffs.txt`. + +An optional command line argument allows you to save these files in a +different directory, e.g. :: + + python $CLAW/clawutil/src/python/clawutil/claw_git_status.py _output + +This is often useful to do when running a code if you want to later +determine exactly what version of the code was used, particularly when doing +regression testing. + +The function `$CLAW/clawutil/src/python/clawutil/runclaw.py` +now has an argument `print_git_status` (with default value `False`). +Calling `runclaw` with `print_git_status == True` will write these files to +the output directory specified by the `outdir` argument. + +Setting the environment variable `GIT_STATUS` to True will insure that +`make .output` creates output directories containing the `claw_git_status` +files. + + + diff --git a/v5.10.x/_sources/googleearth_plotting.rst.txt b/v5.10.x/_sources/googleearth_plotting.rst.txt new file mode 100644 index 0000000000..8f938ab951 --- /dev/null +++ b/v5.10.x/_sources/googleearth_plotting.rst.txt @@ -0,0 +1,730 @@ + +.. _googleearth_plotting: + +******************************************* +Visualizing GeoClaw results in Google Earth +******************************************* + +.. _Google Earth: http://www.google.com/earth + +The `Google Earth`_ browser is a powerful visualization tool for +viewing georeferenced data and images. The VisClaw visualization suite includes +tools that will produce georeferenced plots and associated KMZ files needed for +animating and browsing your GeoClaw simulation results in Google Earth. GeoClaw +tsunami simulations are particularly appropriate for the Google Earth +platform in that land topography, ocean bathymetry and wave +disturbances created by tsunamis or other inundation events can all be +viewed simultaneously. + +The Google Earth browser is not a fully functional GIS tool, and so +while the simulations may look very realistic, one should not base +critical decisions on conclusions drawn from the Google Earth +visualization alone. Nevertheless, these realistic visualizations are +useful for setting up simulations and communicating your results. + +Basic requirements +================== + +.. _lxml: http://pypi.python.org/pypi/lxml/3.4.0 +.. _GDAL: http://www.gdal.org +.. _pykml: http://pythonhosted.org/pykml/ + +To get started, you will need to install the Python packages `lxml`_ and +`pykml`_. These libraries can be easily installed through Python +package managers *PIP* and *conda*:: + + % conda install lxml # May also use PIP + % pip install pykml # Not available through conda + +**Test your installation.** You can test your installation by +importing these modules into Python:: + + % python -c "import lxml" + % python -c "import pykml" + +Optional GDAL library +--------------------- +To create a pyramid of images for faster loading in Google Earth, you +will also want to install the Geospatial Data Abstraction Library +(`GDAL`_). The GDAL library (and associated Python bindings) +can be easily installed with *conda*:: + + % conda install gdal + +On OSX, the GDAL library can also be installed through MacPorts or Homebrew. + +Depending on your installation, you may also need to set the +environment variable *GDAL_DATA* to point to the directory containing +projection files (e.g. gcs.cvs, epsg.wkt) needed to +georeference and warp your PNG images. For example, in Anaconda +Python, these support files are installed under the `share/gdal` +directory. In *bash*, the *GDAL_DATA* environment variable can be exported +as + +.. code-block:: python + + export GDAL_DATA=$ANACONDA/share/gdal + +**Note.** It is important to use projection files that are packaged with your particular +installation of *GDAL*. Mixing installations and projection files can lead to unexpected +errors. + +.. _gdal_test.py: http://math.boisestate.edu/~calhoun/visclaw/GoogleEarth/gdal_test.py +.. _frame0005fig1.png: http://math.boisestate.edu/~calhoun/visclaw/GoogleEarth/frame0005fig1.png +.. _GDAL install bug: https://github.com/ContinuumIO/anaconda-issues/issues/951 + +**Test your installation.** You can test your installation of the +`GDAL` library by downloading the script `gdal_test.py`_ and +associated image file `frame0005fig1.png`_ (to the same directory) and +running the command:: + + % python -c "import gdal_test" + +You should get the output:: + + % python -c "import gdal_test" + Input file size is 1440, 1440 + Creating output file that is 1440P x 1440L. + Processing input file frame0005fig1_tmp.vrt. + Using band 4 of source image as alpha. + Using band 4 of destination image as alpha. + Generating Base Tiles: + 0...10...20...30...40...50...60...70...80...90...100 - done. + Generating Overview Tiles: + 0...10...20...30...40...50...60...70...80...90...100 - done. + +This test will create an image pyramid in the directory `frame0005fig1` and an associated +`doc.kml` file which you can open in Google Earth. + +**NOTE (8/1/16)** The latest release of the Anaconda GDAL library is not fully version compatible with +its dependencies. If you receive an error that ends with:: + + % Reason: Incompatible library version: libgdal.20.dylib requires version 8.0.0 or later, but liblzma.5.dylib provides version 6.0.0 + +you should install a new version of the `xz` library:: + + % conda install xz + +This bug can be tracked at `GDAL install bug`_. + + +An example : The Chile 2010 tsunami event +========================================= + +.. _Chile_2010.kml: http://math.boisestate.edu/~calhoun/visclaw/GoogleEarth/kml/Chile_2010.kml + +The Chile 2010 tsunami is included as an example in the GeoClaw module +of Clawpack. Once you have run this simulation, you can create the +KMZ file needed for visualizing your data in Google Earth by using the +command:: + + % make plots "SETPLOT_FILE=setplot_kml.py" + +This runs the commands in *setplot_kml.py*. The resulting archive file +*Chile_2010.kmz* (created in your plots directory) can be opened in +Google Earth. An on-line version of the results from this example can +be viewed by opening the file `Chile_2010.kml`_ in Google Earth. + +Use the time slider to step through the frames of the simulation, or +click on the "animate" button (also in the time slider panel) to animate +the frames. + +.. figure:: images/GE_Chile.png + :scale: 50% + :align: center + + Simulation of the Chile 2010 tsunami (see geoclaw/examples/tsunami/chile2010). + +Plotting attributes needed for Google Earth +------------------------------------------- + +The plotting parameters needed to instruct VisClaw to create plots +suitable for visualization in Google Earth are all set as attributes +of instances of the VisClaw classes *ClawPlotData* and *ClawPlotFigure*. +We describe each of the relevant attributes and refer to their +usage in the Chile 2010 example file `setplot_kml.py` file. + +In what follows, we only refer to instances `plotdata` and `plotfigure` +of the `ClawPlotData` and `ClawPlotFigure` classes. + +plotdata attributes +------------------- + +The following *plotdata* attributes apply to all VisClaw figures to be +visualized in Google Earth. These attributes are all **optional** and +have reasonable default values. + +.. code-block:: python + + #----------------------------------------- + # plotdata attributes for KML + #----------------------------------------- + plotdata.kml_name = "Chile 2010" + plotdata.kml_starttime = [2010,2,27,6,34,0] # Date and time of event in UTC [None] + plotdata.kml_tz_offset = 3 # Time zone offset (in hours) of event. [None] + + plotdata.kml_index_fname = "Chile_2010" # name for .kmz and .kml files ["_GoogleEarth"] + + plotdata.kml_user_files.append(['Santiago.kml',True]) # Extra user defined file. + + # Set to a URL where KMZ file will be published. + # plotdata.kml_publish = None + + # plotdata.kml_map_topo_to_latlong = None # Use if topo coords. are not lat/long [None] + +.. attribute:: kml_name : string + + Name used in the Google Earth sidebar to identify the simulation. Default : "GeoClaw" + +.. attribute:: kml_starttime : [Y,M,D,H,M,S] + + Start date and time, in UTC, of the event. The format is *[year,month,day,hour, minute, second]*. + By default, local time will be used. + +.. attribute:: kml_timezone : integer + + Time zone offset, in hours, of the event from UTC. For example, the offset for Chile is +3 hours, + whereas the offset for Japan is -9 hours. Default : no time zone offset. + +.. attribute:: kml_index_fname : string + + The name given to the KMZ file created in the plot directory. Default : "_GoogleEarth" + +.. attribute:: kml_publish : string + + A URL address and path to a remote site hosting a + KMZ file you wish to make available on-line. Default : None + + See `Publishing your results`_ for more details. + +.. attribute:: kml_map_topo_to_latlong : function + + A function that maps computational coordinates (in meters, for + example) to latitude/longitude coordinates. This will be called to + position PNG overlays, gauges, patch boundaries, and regions boundaries to the + latitude longitude box specified in `plotfigure.kml_xlimits` and + `plotfigure.kml_ylimits` used by Google Earth. + Default : None. + + See `Mapping topography data to latitude/longitude coordinates`_ + for details on how to set this function. + +.. attribute:: kml_use_figure_limits : boolean + + Set to *True* to indicate that the `plotfigure` limits should be + used as axes limits when creating the PNG file. If set to *False*, + then axes limits set by an `axes` member of a *plotfigure* + (e.g. *plotaxes*) will be used. Default : True. + +.. attribute:: kml_user_files : list + + A list of extra user KML files to be archived along with image + files and other plotting artifacts created by the VisClaw + GoogleEarth plotting routines. These user files can contain, for + example, additional placemarks, polygons, paths or other geographic + features of relevance to the simulation. These geographic features + will be copied to the KMZ archive and viewable in GoogleEarth, + along with the results of the GeoClaw simulation. + + The additional files to be archived are assumed to exist in the + working directory (i.e. the directory containing the plots and + output directories). For each file to be included, append a list + of the form `[filename, visibility]` where `filename` is the KML + file name (with the `.kml` extension) and `visibility` is either *True* or + *False*. Append this list to the *plotdata* attribute, as in the + example above. Default : No user files are included. + + + +plotfigure attributes +--------------------- + +The following attributes apply to an individual figure created for visualization in Google Earth. +The first three attributes are **required**. The remaining attributes +are optional. + +The name "Sea Surface" given to the new instance `plotfigure`, below, +will be used in the Google Earth sidebar to identify this figure. + +.. code-block:: python + + #----------------------------------------------------------- + # Figure - Sea Surface + #---------------------------------------------------------- + plotfigure = plotdata.new_plotfigure(name='Sea Surface',figno=1) + plotfigure.show = True + + # Required KML attributes for visualization in Google Earth + plotfigure.use_for_kml = True + plotfigure.kml_xlimits = [-120,-60] # Longitude + plotfigure.kml_ylimits = [-60, 0.0] # Latitude + + # Optional attributes + plotfigure.kml_use_for_initial_view = True + plotfigure.kml_figsize = [30.0,30.0] + plotfigure.kml_dpi = 12 # Resolve all three levels + plotfigure.kml_tile_images = False # Tile images for faster loading. Requires GDAL [False] + +.. attribute:: use_for_kml : boolean + + Indicates to VisClaw that the PNG files created for this figure should be suitable for + visualization in Google Earth. With this set to `True`, all titles, axes labels, colorbars + and tick marks will be suppressed. Default : `False`. + +.. attribute:: kml_xlimits : [longitude_min, longitude_max] + + Longitude range used to place PNG images on Google Earth. *This setting will override + any limits set as plotaxes attributes*. **Required** + +.. attribute:: kml_ylimits : [latitude_min, latitude_max] + + Latitude range used to place the PNG images on Google Earth. + *This setting will override any limits set as plotaxes attributes*. **Required** + +.. attribute:: kml_use_for_initial_view : boolean + + Set to `True` if this figure should be used to determine the initial + camera position in Google Earth. The initial camera position will + be centered over this figure at an elevation equal to approximately + twice the width of the figure, in meters. By default, the first + figure encountered with the `use_for_kml` attribute set to *True* + will be used to set the initial view. + +.. attribute:: kml_figsize : [size_x_inches,size_y_inches] + + The figure size, in inches, for the PNG file. See `Removing + aliasing artifacts`_ for tips on how to set the figure size and dpi + for best results. Default : 8 x 6 (chosen by Matplotlib). + +.. attribute:: kml_dpi : integer + + Number of pixels per inch used in rendering PNG figures. For best + results, figure size and dpi should be set to respect the numerical + resolution of the the simulation. See `Removing aliasing + artifacts`_ below for more details on how to improve the quality of + the PNG files created by Matplotlib. Default : 200. + +.. attribute:: kml_tile_images : boolean + + Set to `True` if you want to create a pyramid of images at different + resolutions for faster loading in Google Earth. *Image tiling + requires the GDAL library*. See `Optional GDAL library`_, above, + for installation instructions. Default : False. + +Creating the figures +-------------------- + +All figures created for Google Earth are rendered as PNG files using +the Matplotlib backend. So in this sense, the resulting PNG files are +created in a manner that is no different from other VisClaw output +formats. Furthermore, there are no special `plotaxes` or *plotitem* +attributes to set for KML figures. But several attributes will either +be ignored by the KML output or should be suppressed for best results +in Google Earth. + +.. code-block:: python + + # Create the figure + plotaxes = plotfigure.new_plotaxes('kml') + + # Create a pseudo-color plot. Render the sea level height transparent. + plotitem = plotaxes.new_plotitem(plot_type='2d_pcolor') + plotitem.plot_var = geoplot.surface_or_depth + plotitem.cmin = -0.2 + plotitem.cmap = 0.2 + plotitem.pcolor_cmap = googleearth_transparent + + # Create a colorbar (appears as a Screen Overlay in Google Earth). + def kml_colorbar(filename): + cmin = -0.2 + cmax = 0.2 + cmap = geoplot.googleearth_transparent + geoplot.kml_build_colorbar(filename,cmap,cmin,cmax) + + plotfigure.kml_colorbar = kml_colorbar + + +plotaxes attributes +^^^^^^^^^^^^^^^^^^^ + +The plotaxes attributes +`colorbar`, `xlimits`, `ylimits` and `title` will all be ignored by the KML plotting. +For best results, the attribute `scaled` should be set to its default value `False`. The +only plotaxes attribute that might be useful in some limited contexts is the `afteraxes` +setting, and only if the `afteraxes` function does not add plot features that cause +Matplotlib to alter the space occupied by the figure. In most cases, the `afteraxes` +commands should not be needed or should not be used. + +plotitem attributes +^^^^^^^^^^^^^^^^^^^ + +The most useful `plotitem` type will probably be the `2d_pcolor` type, although other +types including the filled contour `contourf` can also be used to good effect. + +Colormaps that are designed to work well with Google Earth are + +* `geoplot.googleearth_transparent` +* `geoplot.googleearth_lightblue` +* `geoplot.googleearth_darkblue` + +The transparent +colormap is particularly appealing visually when overlaid onto the Google Earth because +the ocean bathymetry is clearly visible, illustrating the effect that underwater ridges +and so on have on the propagating tsunami. The other two colormaps +are solid colormaps, where the sea level color is set to match that of lighter or darker +regions of the Google Earth ocean bathymetry. + +Adding a colorbar overlay +^^^^^^^^^^^^^^^^^^^^^^^^^ + +A colorbar can be associated with each figure in the Google Earth +browser by setting the figure attribute `kml_colorbar` to point to a function +that creates the colorbar:: + + # Create a colorbar (appears as a Screen Overlay in Google Earth). + def kml_colorbar(filename): + cmin = -0.2 + cmax = 0.2 + cmap = geoplot.googleearth_transparent + geoplot.kml_build_colorbar(filename,cmap,cmin,cmax) + + plotfigure.kml_colorbar = kml_colorbar + + +The color axis range `[cmin, cmax]` and the colormap `cmap` should be +consistent with those set as plotitem attributes. By expanding the +figure folder in the Google Earth sidebar, you can use check boxes to +hide or show the colorbar screen overlay. + +The input argument `filename` should be passed unaltered to the +routine `geoplot.kml_build_colorbar`. + +Gauge plots +----------- + +There are no particular attributes for gauge plots and so they +can be created in the usual way. In the Google Earth browser, gauge locations +will be displayed as Placemarks. Clicking on gauge Placemarks will bring +up the individual gauge plots. The screenshot below shows the gauge plot +that appears when either the gauge Placemark or the gauge label in the sidebar is +clicked. + + +.. figure:: images/GE_screenshot.png + :scale: 20% + :align: center + + Screenshot illustrating gauge plots. + +If the computational coordinates are not in latitude/longitude coordinates, then you must +set the `plotdata` attribute `map_topo_to_latlong` to specify a mapping between the computational +coordinates and latitude longitude box which Google Earth will use to visualize your data. +See `plotdata attributes`_. + +Additional plotdata attributes +------------------------------ + +VisClaw has additional `plotdata` attributes indicating which figures and frames +to plot and which output style to create. When plotting for Google +Earth, one additional output parameter is necessary. + + +.. code-block:: python + + #----------------------------------------- + plotdata.print_format = 'png' # file format + plotdata.print_framenos = 'all' # list of frames to print + plotdata.print_fignos = 'all' # list of figures to print + plotdata.html = False # create html files of plots? + plotdata.latex = False # create latex file of plots? + # .... + plotdata.kml = True # <====== Set to True to create KML/KMZ output + + return plotdata # end of setplot_kml.py file + +.. attribute:: kml : boolean + + Set to `True` to indicate that a KML/KMZ file should be created. Default : False. + +Plotting tips +============= +Below are tips for working with KML/KMZ files, creating zoomed images, +improving the quality of your images and publishing your results. + +KML and KMZ files +----------------- +KML files are very similar to HTML files in that they contan +`...` describing data to be rendered by a suitable +rendering engine. Whereas as standard web browsers can render content +described by HTML tags, Google Earth renders the geospatial data +described by KML-specific tags. + +The `kml` attributes described above will direct VisClaw to create +Google Earth suitable PNG files +for frames and colorbars and a hierarchy of linked KML files, +including a top level `doc.kml` file for the entire simulation, one +top level `doc.kml` file per figure, and additional referenced kml +files per frame. These KML and image files will not appear +individually in your plots directory, but are archived into a single +KMZ file that you can load in Google Earth. + +If you would like to browse the individual images and KML files created +by VisClaw, you can extract them from the KMZ file using an un-archiving +utility. On OSX, for example, you can use `unzip` to extract one or +more individual files from the KMZ file. Other useful `zip` utilities +include `zip` (used to create the KMZ file initially) and `zipinfo`. + +One reason you might wish to view the contents of an individual KMZ +file is to inspect the PNG images generated by Matplotlib and used as +GroundOverlays in the Google Earth browser. Another reason may be +that you wish to make minor edits the top level doc.kml file to add +additional Google Earth sidebar entries or to change visibility +defaults of individual folders. + +The KMZ file can be posted to a website to share your results with others. +See `Publishing your results`_, below. + + +.. _Creating an image pyramid: + +Tiling images for faster loading +-------------------------------- + +If you create several frames with relatively high dpi, you may find +that the resulting KMZ file is slow to load in Google Earth. In +extreme cases, large PNG files will not load at all. You can improve +Google Earth performance by creating an image hierarchy which loads +only a low resolution sampling of the data at low zoom levels and +higher resolution images suitable for close-up views. In VisClaw, +this image pyramid is created by setting the plotfigure attribute +`kml_tile_images` to `True`. + +.. code-block:: python + + plotfigure.kml_tile_images = True + +**Note:** This requires the GDAL library, which can be installed following the +`Optional GDAL library`_ instructions, above. + +.. _Enhancing the resolution: + +Removing aliasing artifacts +--------------------------- + +You may find that the transparent colormap leads to unappealing visual +artifacts. This can happen when the resolution of the PNG file does +not match the resolution of the data used to create the image. In the +Chile example, the number of grid cells on the coarsest level is 30 in +each direction. Two additional levels are created by refining first by +a factor of 2 and then by a factor of 6. But the default settings for +the figure size (`kml_figsize`) is `8x6` inches and dpi (`kml_dpi`) is +200, resulting in an image that is 1600 x 1200. But because 1600 is +not an even multiple of 30, noticeable vertical stripes appear at the +coarsest level. A more obvious plaid pattern appears at finer levels, +since neither 1600 or 1200 are evenly divisible by 30*2*6 = 360. + +.. figure:: images/GE_aliased.png + :scale: 40% + :align: center + + Aliasing effects resulting from default `kml_dpi` and `kml_figsize` settings + +We can remove these aliasing effects by making the resolution of the +PNG file a multiple of 30*2*6 = 360. This can be done by setting the +figure size and dpi appropriately:: + + # Set dpi and figure size to resolve the 30x30 coarse grid, and two levels of refinement with + # refinement factors of 2 and 6. + plotfigure.kml_figsize = [30,30] + plotfigure.kml_dpi = 12 + +The resulting PNG file has a resolution of only 360x360, but in fact, is free of +the vertical and horizontal stripes that appeared in the much higher resolution image +created from the default settings. + +.. figure:: images/GE_nonaliased.png + :scale: 150% + :align: center + + Aliasing effects removed by properly setting `kml_dpi` and `kml_figsize` + +This baseline dpi=12 is the minimum resolution that will remove +striped artifacts from your images. However, you may find that this +resolution is unacceptable, especially for close-up views of +shorelines and so on. In this case, you can increase the resolution of +the figure by integer factors of the baseline dpi. In the Chile +example, you might try increasing the dpi to 24 or even 48. The resulting +PNG file, when rendered in Google Earth, should be much sharper when +zoomed in for coastline views. + +In some cases, it might not be possible to fully resolve all levels of +a large multi-level simulation because the resulting image resolution +would exceed the Matplotlib limit of 32768 pixels on a side. In this case, +you can limit the number of levels that are resolved by a particular +figure and create zoomed in figures to resolve finer levels. See +`Creating multiple figures at different resolutions`_, below. +Alternatively, you can break the computational domain into several +figures, each covering a portion of the entire domain. + +If you set `kml_dpi` to a value less than 10, Matplotlib will revert to +a dpi of 72 and change the figure size accordingly, so that the +total number of pixels in each direction will still be equal to +`kml_figsize*kml_dpi`, subject to round-off error. While you can +avoid aliasing effects if this happens (assuming the dpi is still +consistent with the resolution of the simulation), you can prevent +Matplotlib from switching to a 72 dpi by simply reducing your figure +size by a factor of 10 and increasing your dpi by a factor of 10. + + +Creating multiple figures at different resolutions +-------------------------------------------------- +You can create several figures for visualization in Google Earth. +Each figure you create will show up as a separate named folder in the Google +Earth sidebar. The name will match that given to the VisClaw *plotfigure*. + +For at least one figure, you will probably want to set +the `kml_xlimits` and `kml_ylimits` to match the computational domain. +To get higher resolution zoomed in figures, you will want to restrict +the x- and y-limits to a smaller region. For best results, these zoom +regions should be consistent with the resolution of your simulation. +In the Chile example, a 30x30 inch figure resolves two degrees per inch. +The x- and y-limits for the zoomed in figure should then span an even +number of degrees in each direction, and have boundaries that align +with even degree marks, i.e. -120, -118, -116, etc. In **setplot_kml.py**, +the zoomed in region is described as : + +.. code-block:: python + + #----------------------------------------------------------- + # Figure for KML files (zoom) + #---------------------------------------------------------- + plotfigure = plotdata.new_plotfigure(name='Sea Surface (zoom)',figno=2) + plotfigure.show = True + + plotfigure.use_for_kml = True + plotfigure.kml_use_for_initial_view = False # Use large plot for view + + # Zoomed figure created for Chile example. + plotfigure.kml_xlimits = [-84,-74] # 10 degrees + plotfigure.kml_ylimits = [-18,-4] # 14 degrees + plotfigure.kml_figsize = [10,14] # inches. (1 inch per degree) + + # Resolution + rcl = 10 # Over-resolve the coarsest level + plotfigure.kml_dpi = rcl*2*6 # Resolve all three levels + plotfigure.kml_tile_images = False # Tile images for faster loading. + +The resulting figure will have a resolution of 120 dots (i.e. pixels) per inch, compared to the +12 dpi in the larger PNG file covering the whole domain. The resolution of the zoomed +image is 1200x1680, compared to 360x360 for the larger domain. + +This higher resolution figure shows up in the Google Earth sidebar as "Sea Surface (zoom)". + +See `Removing aliasing artifacts`_ for more details on how to set the zoom levels. + +.. _Publishing your results: + +Mapping topography data to latitude/longitude coordinates +--------------------------------------------------------- +In many situations, your computational domain may not be conveniently +described in latitude/longitude coordinates. When simulating overland +flooding events, for example, topographic data may more easily be +described in rasterized distance increments (meters, for example). +VisClaw uses data stored in generated data files (`gauges.data`, +`regions.data`, and so on) to position objects on the Google Earth +browser. The coordinate system for these objects is, however, in +computational coordinates, and so to locate them in the Google Earth +browser, the user must provide VisClaw a function to convert from +computational to latitude/longtitude coordinates. This is done by +setting the `plotdata` attribute `kml_map_topo_to_latlong` to a +function describing your mapping between the two coordinate systems. + +A crucial underlying assumption in setting the mapping function for +use with GoogleEarth is that the boundary of your physical domain is +approximately aligned with spherical (latitude/longitude) coordinate +lines. + + +The following example illustrates how to set a linear map between the +coordinates in `[0,48000]x[0,17540]` and the latitude/longitude +coordinates that Google Earth will use to visualize the results of +your simulation. + +.. code-block:: python + + + def map_cart_to_latlong(xc,yc): + # Map x-coordinates + topo_xlim = [0,48000] # x-limits, in meters + ge_xlim = [-111.96132553, -111.36256443] # longitude limits + slope_x = (ge_xlim[1]-ge_xlim[0])/(topo_xlim[1]-topo_xlim[0]) + xp = slope_x*(xc-topo_xlim[0]) + ge_xlim[0] + + # Map y-coordinates + topo_ylim = [0,17500] # y-limits, in meters + ge_ylim = [43.79453362, 43.95123268] # latitude limits + slope_y = (ge_ylim[1]-ge_ylim[0])/(topo_ylim[1]-topo_ylim[0]) + yp = slope_y*(yc-topo_ylim[0]) + ge_ylim[0] + + return xp,yp + + # set plotdata attribute. + plotdata.kml_map_topo_to_latlong = map_cart_to_latlong + +Figure limits `plotfigure.kml_xlimits` and `plotfigure.kml_ylimits` must still be set to +the latitude/longitude coordinates for your Google Earth figure. But to indicate that you +do not wish to use these coordinates for creating PNG files, you must set +the `plotfigure.kml_use_figure_limits` attribute to `False`. This will indicate that when +creating the PNG figure, the axes limits should be set to those specifed in the +`plotaxes` attribute. For example, + +.. code-block:: python + + plotfigure = plotdata.new_plotfigure(name='Teton Dam',figno=1) + plotfigure.use_for_kml = True + + # Latlong box used for GoogleEarth + plotfigure.kml_xlimits = [-111.96132553, -111.36256443] # Lat/Long box use by Google Earth + plotfigure.kml_ylimits = [43.79453362, 43.95123268] + + # Use computational coordinates for plotting + plotfigure.kml_use_figure_limits = False # Use plotaxes limits below + + # .... + + plotaxes.xlimits = [0,48000] # Computational axes needed for creating PNG files. + plotaxes.ylimits = [0,17500] + + +The mapping function will be used to position PNG Overlays, locate gauge placemarks, +and plot patch and region boundaries on the Google Earth browser. + + +Publishing your results +----------------------- + +You can easily share your results with collaborators +by providing links to your archive KMZ file in HTML webpages. Collaborators can +download the KMZ file and open it in a Google Earth browser. + +If you find that the KMZ file is too large to make downloading +convenient, you can provide a light-weight KML file that contains a +link to your KMZ file stored on a host server. Collaborators can then +open this KML file in Google Earth and browse your results remotely. + +VisClaw offers an option to automatically create a sample +KML file containing a link to your KMZ file. +To create this KML file, you should set the `plotdata` attribute +`kml_publish` to the url address of your host server where the KMZ +files will be stored. For example, the Chile file above is stored at:: + + plotdata.kml_publish = "http://math.boisestate.edu/~calhoun/visclaw/GoogleEarth/kmz" + +VisClaw will detect that this `plotdata` attribute has been set and +automatically create a KML file that refers to the linked file +"Chile_2010.kmz", stored at the above address. This KML file (see +`Chile_2010.kml`_ for an example) can be easily edited, shared or posted on webpages to allow +collaborators to view your results via links to your remotely stored +KMZ file. + +By default, `plotdata.kml_publish` is set to `None`, in which case, no KML file will be created. diff --git a/v5.10.x/_sources/gpu.rst.txt b/v5.10.x/_sources/gpu.rst.txt new file mode 100644 index 0000000000..9999f094b5 --- /dev/null +++ b/v5.10.x/_sources/gpu.rst.txt @@ -0,0 +1,59 @@ + +.. _gpu: + + +************************************* +Using the GPU version of Clawpack +************************************* + +GPU versions of the two-dimensional AmrClaw and GeoClaw codes have been +developed primarily by Xinsheng Qin, as described in the references below. + +This is still under development and has not yet been fully merged +in Clawpack, but there is a `gpu` branch of most of the Clawpack +repositories and checking those out will give a working version of +the GPU code. + +You can do this by checking out the gpu branch of the `clawpack/clawpack` +module and then doing `git module update`. + +To create a new clone `clawpack_gpu` with the +proper branches checked out, you can use these commands:: + + git clone https://github.com/clawpack/clawpack.git clawpack_gpu + cd clawpack_gpu + git checkout -b gpu origin/gpu + git submodule init + git submodule update + +Note that this version of the GPU code is roughly based on version 5.5.0 of +Clawpack but had some other changes merged in as well (in particular adjoint +flagging, see :ref:`adjoint`), and so it is not exactly equivalent in +capabilities. + +The GPU version has some new libraries of source code. In particular, +`$CLAW/amrclaw/src/2d/GPU` contains `.H`, `.cpp` and `.f90` files for the +2d amrclaw code. Many of the `.f90` files replace those normally used +from `$CLAW/amrclaw/src/2d` and those files are removed from this branch. +This means that the pure CPU version of amrclaw cannot be run from this +branch, instead check out a specific version such as `v5.5.0` to +run the CPU code for comparisons. + +Similarly, `$CLAW/geoclaw/src/2d/shallow/GPU` contains replacement `.f90` +files for many of the library routines in `$CLAW/geoclaw/src/2d/shallow`. + +References +---------- + +- Efficient Tsunami Modeling on Adaptive Grids with Graphics Processing Units (GPUs) + by X. Qin, R. J. LeVeque, and M. Motley, + Journal of Advances in Modeling Earth Systems, 2019, + `DOI:10.1029/2019MS001635 `_ + +- Accelerating wave-propagation algorithms with adaptive mesh refinement + using the Graphics Processing Unit (GPU), + by X. Qin, R. J. LeVeque, and M. R. Motley, + ``_ + +- See also the older instructions and links to Xinsheng's original branches at + ``_ diff --git a/v5.10.x/_sources/grid_registration.rst.txt b/v5.10.x/_sources/grid_registration.rst.txt new file mode 100644 index 0000000000..83fb9ac7ab --- /dev/null +++ b/v5.10.x/_sources/grid_registration.rst.txt @@ -0,0 +1,120 @@ + + +.. _grid_registration: + +***************************************************************** +Grid registration +***************************************************************** + +.. seealso:: + - :ref:`topo` + - :ref:`topotools` + + +GeoClaw `topo_type == 3` is +essentially the same as the `ESRI ASCII Raster format `_ +but it is important to note which grid registration is used. +(`topo_type == 2` uses the same header conventions, so this discussion also +applies to these files.) + +See `this NOAA page `_ +and `the wikipedia ESRI grid page `_ +for more about registration, with some useful figures. + +The third and fourth lines of the header file contain labels that tell whether the +registration is `llcorner` (lower left corner) or `llcenter` (lower left center). +GeoClaw also recognizes `lower`, which is currently handled in a way +equivalent to `llcenter`. This is also the assumed default registration +if the string is not one of these recognized values. + +According to the documentation linked above for ESRI raster format, the topography +data given in the file should be viewed as **cell averages** of the topography over +DEM cells of dimension `dx` by `dy` where in this format `dx = dy` and is given by the +`cellsize` parameter. (We use DEM cell to denote the cell in the Digital Elevation +Model provided in the topofile, not be be confused with the computational grid +cells used by the finite volume method.) + +The **registration** +indicates whether the `(x,y)` (longitude, latitude) value given in the header +corresponds to the location of the lower left corner of the SW-most DEM cell, or to the +center of this cell. Using the example from :ref:`topo`, a file containing:: + + + 2 mx + 2 my + 0. xllcenter + 20. yllcenter + 10. cellsize + -9999 nodatavalue + -1000. -2000. + -3000. -4000. + +would specify DEM cells with centers at `(0,30), (10,30), (0,20), (10,20)`, which +are the same points specified in the `topo_type == 1` example on :ref:`topo`. + +By contrast, the file:: + + 2 mx + 2 my + 0. xllcorner + 20. yllcorner + 10. cellsize + -9999 nodatavalue + -1000. -2000. + -3000. -4000. + +would specify DEM cells with lower left corners at the 4 points listed above, and +hence cell centers at `(5,35), (15,35), (5,25), (15,25)`. + +In the GeoClaw Fortran code, we assume the DEM values are actually +pointwise values and these are used to construct a piecewise bilinear +function interpolating these values. This function is then integrated +over the computational grid cells in order to get the +cell-averaged topography values that are stored in `aux(1,:,:)` and +used in the finite volume method. The computational cells over +which this function is integrated can vary as adaptive refinement is performed. + +If the topography is smoothly varying, then the cell average over a DEM cell +agrees with the pointwise value at the cell center, so for our purpose +it is best to view the DEM values as being located at cell centers. Hence if +`llcorner` registration is specified, the lower left corner (and all other `(x,y)` +points spaced according to `cellsize`) should all be shifted by `cellsize/2` in +both `x` and `y` before being used. + +Starting with Version 5.5.0, this is done in the Fortran code when the DEM topofile +is read in. It is also done in the Python `topotools` module at the time of +reading the file, so the internal representation has `Topography.x` and +`Topography.y` corresponding to the cell centers or points where the data should be +interpreted in a pointwise view. This is also best when producing contour plots, +for example. When writing a topography file using `Topography.write()`, a new +optional argument `grid_registration` has been added. The `(x,y)` values in the +header will be printed properly based on the registration chosen. + +Note that if you use `Topography.crop()` with a `coarsen` parameter +in order to generate a coarser version of the DEM, this simply +subsamples the topography. This followed by `Topography.write()` +should print out the proper `llcorner` or `llcenter` value for the +coarsened topography based on the location of the subsamples, but +`crop()` does not currently average topography over large cells as +the ESRI standard suggests should be done. In the future a +`coarsen_method` parameter might be added to `crop()` to allow this. + +Earlier versions of GeoClaw always viewed the `(x,y)` value in the header as the +location of the SW-most data point, i.e., always assumed `llcenter == lower` +registration. So if you rerun a previous example that had a topofile specifying +`llcorner` in the header, the results may change since the DEM data will now be (more +properly) viewed as specified at slightly different points. If you need to try to +reproduce your earlier results, you could change `llcorner` to `lower` in the +header lines, for example. + +For GeoClaw `topo_type=1`, each row contains `x, y, z` data for a single +point and we interpret `z` as the pointwise data at the specified `x, y`. + +NetCDF files +------------ + +For netCDF files the +data points are generally interpreted as pointwise values at the points +specified in the `lat` and `lon` arrays included in the file (or as +cell-averaged values with these points as the cell centers). + diff --git a/v5.10.x/_sources/howto_doc.rst.txt b/v5.10.x/_sources/howto_doc.rst.txt new file mode 100644 index 0000000000..dbe6ba6106 --- /dev/null +++ b/v5.10.x/_sources/howto_doc.rst.txt @@ -0,0 +1,332 @@ + +.. _howto_doc: + +Guide for updating this documentation +============================================= + +See also the README.md at https://github.com/clawpack/doc. + +The `clawpack/doc `_ repository is not +included in the Clawpack distribution and must be cloned separately if you +want to work with these files. + +After cloning into the `$CLAW` directory, the restructured text +files for the main documentation are in `$CLAW/doc/doc`. All files +related to the gallery are in `$CLAW/doc/gallery`. As of Version +5.4.1, these two subdirectories are separate Sphinx projects + +They used to be connected using +`intersphinx `_. +but this was dropped in v5.7.x. + +Git branches and tags +--------------------- + +Older versions of the documentation used to be tagged for each minor +release, e.g. `v5.6.1`. Starting with v5.7.0, these are now only tagged +with the major release, e.g. `v5.7.x`. + +The side menu on the Sphinx pages now lists only these major tags. The +assumption is that any changes within e.g. the 5.7 version are minor enough +that the documentation should not change substantially. + +There are two active **branches** at any time, one for the current major +release, e.g. `v5.7.x`, and one named `dev` for the development of documenation +for features not yet released. When a new major release is done the +`v5.7.x` branch will be retired, creating a `v5.7.x` tag instead along with +a new `v5.8.x` branch. + +As documents are improved, continue to update the current release branch, +e.g. `v5.7.x`, and also merge these changes in to the `dev` branch. In +general `dev` should be up to date with the current release branch along +with perhaps some new documentation for features not in the current +release. + +Note that the file `conf.py` contains the version number. Please insure +that the `dev` branch and current release branch each have the correct +thing. This can easily get messed up when merging from one branch to the +other. One way to help avoid this is to always merge via, e.g.:: + + git checkout dev + git merge v5.7.x --no-ff --no-commit + +and then check before doing the merge commit to make sure `conf.py` hasn't +been improperly changed. If it has, and that's the only change to this +file, you can do:: + + git reset HEAD conf.py + git checkout conf.py + +and check that it's correct before committing via e.g.:: + + git commit -m "merged recent v5.7.x changes into dev" + + +Configuration and style files +----------------------------- + +The general look of the documentation and various things that appear on each +page are controlled by the following files: + + - `conf.py` includes the version number, sets the `html_theme`, as well as + setting paths to extensions and various other sphinx settings. + - `_themes/flask_local/layout.html` determines the menus at the top + - `_static/clawlogo.jpg` is the Clawpack logo put on each page + - `_static/clawicon.ico` is the icon that appears on browser tabs + - `_templates/index.html` contains the main landing page + +.. _howto_doc_release: + +Updating the docs for a new release +----------------------------------- + +When updating the documentation for a new release, see also +:ref:`howto_release_doc` for a list of necessary changes. + + +Before proceeding, first make sure other repositories are checked out to +master, since some pages now have literalinclude's that bring in code +(e.g. setaux_defaults.rst, etc). +**Note: This is no longer true.** + +To create html files from the dev branch only, for example:: + + cd $CLAW/doc/doc + git checkout dev + make html + +The `Makefile` has been modified so that `make html` does this:: + + sphinx-build -b html . _build1/html + +To view the files, point your browser to `$CLAW/doc/doc/_build1/html/index.html` + +Note that we suggest using `_build1` when building a single version so this +can be quickly rebuilt when writing and editing documentation. + + +To generate docs including previous versions +-------------------------------------------- + +If you have just done a new major release, first see :ref:`howto_doc_major` +below. + +The instructions below make webpages that list v5.7.x, v5.8.x, etc. and allow +viewing docs that may be more relevant to a previous version of Clawpack. + +This should be done when you are close to pushing changes to the website, +otherwise the above approach works fine and shows the current state of the +documentation based on files in your working directory. + +This can take longer since it rebuilds pages for all versions. + +As of v5.7.x, we are now using +`sphinx-multiversion `__ +instead of +`sphinxcontrib-versioning `__. + + +To make pages that show previous Clawpack versions, first install +`sphinx-multiversion `__. + +Insure that any changes you want to show up in multiversion docs has been +committed to some branch (normally `dev` if you have been adding something new). + +And then do this:: + + cd $CLAW/doc/doc + rm -rf _build # recommended to make sure new versions are clean + make versions + +The `Makefile` has been modified so that `make versions` does this:: + + sphinx-multiversion . _build/html + +To view the files, point your browser to `_build/html/dev/index.html` +and from there you should be able to navigate to other versions. + +Unlike `sphinxcontrib-versioning`, this now uses your local branches and tags +rather than the versions on Github. It lists only two branches under "Latest +Versions" and all tags as "Older Versions". +The two branches are set to `dev` and the most +recent version, by this line of `conf.py`:: + + smv_branch_whitelist = r'v5.7.x|dev' + +This should be updated for a new version. + +Note that `_build/html` contains a subdirectory for each version, but there +are no `.html` files in the top level of `_build/html`. For the Clawpack +webpage we need to: + +- Copy the files from the current version to the top level so that + navigating to http://www.clawpack.org/installing.html, + for example, goes to the current version of this document. + +- Fix the links in the sidebars of each of these `.html` files so that clicking + on `dev`, for example, takes you to http://www.clawpack.org/dev/installing.html + +This can be done as follows:: + + cd $CLAW/doc/doc/_build/html + cp -r v5.7.x/* . # replacing v5.7.x with the current version + python ../../fix_links_top_level.py + +If you like what you see, you can push back to your fork and then issue a +pull request to have these changes incorporated into the documentation. + +**Note:** We are no longer using `intersphinx` to link the gallery and the +main doc pages together. Instead there are hard links to `www.clawpack.org` +to go from one to the other. So the old use of +the environment variable `SPHINX_WEB` is now deprecated. + +.. _howto_doc_major: + +Updating for a new major version +-------------------------------- + +When updating a minor version, e.g. from v5.7.0 to v5.7.1, we will continue +to use the same branch v5.7.x. You should just make sure the v5.7.x and dev +are up to date with each other at the time of release. + +When updating to the next major version, e.g. from v5.7.x to v5.8.x, it is +necessary to do the following: + +- Create a new branch v5.8.x from v5.7.x (or dev). + +- Delete branch v5.7.x and replace it with a tag, so that the proper + versions get included in the documentation when next it is built. + +For example, this could be done as follows:: + + git checkout v5.7.x # assuming up to date with dev + git checkout -b v5.8.x # create new branch + git branch -d v5.7.x # remove old branch + git push origin :v5.7.x # delete branch on github + git tag v5.7.x # create new tag + git push origin v5.8.x # push new branch + git push origin --tags # push new tag + + + +Updating the gallery +-------------------- + +The gallery webpages are now decoupled from the main sphinx pages, and reside +in `$CLAW/doc/gallery` rather than `$CLAW/doc/doc`. + +To remake the galleries, you need to first run all the examples that produce +results shown in the galleries. + +For detailed instructions, see `CLAW/doc/gallery/README.md +`_. + +Then do the following:: + + cd $CLAW/doc/gallery + make html + +Note that we don't track past versions in the gallery. + + +Note that `doc/gallery/notebooks.rst` contains pointers to html versions of many +notebooks, stored in `doc/gallery/_static/notebooks`. If any notebooks were +updated for this release, the corresponding html files should be too. +*(We should automate this).* + +Updating the webpages +--------------------- + +A few developers can push html files to the repository +`clawpack/clawpack.github.com +`_ +which causes them to show up on the web at +`http://clawpack.github.io +`_. + +To do so, first create the html files as described above, which should appear +in `doc/doc/_build/html` and `doc/gallery/_build/html`. + +Commit any changed source files and +push to `clawpack/doc `_. + +Then do:: + + cd $CLAW/clawpack.github.com + git checkout v5.x.x + git pull origin # make sure you are up to date before doing next steps! + + cd $CLAW/doc/doc + rsync -azv _build/html/ ../../clawpack.github.com/ + +If you have updated the gallery, also do:: + + rsync -azv ../gallery/_build/html/ ../../clawpack.github.com/gallery/ + + +Then move to the `clawpack.github.com` repository and +add and commit any new or changed files. +All files are needed, so :: + + cd $CLAW/clawpack.github.com + git add . + +should work. For the commit message you might want to add the commit +hash of the most recent commit in $CLAW/doc/doc:: + + cd $CLAW/clawpack.github.com + git add . + git commit -m "changes from doc/doc commit " + +And finally push to the web:: + + git push origin + +which assumes that `origin` is +`git@github.com:clawpack/clawpack.github.com.git`. + +It may take a few minutes for the updated webpages to appear at +``_. + +Note that ``_ and ``_ +should also resolve properly to ``_. +and that `www.clawpack.org` should appear in the browser address bar. The +file `extra_files/CNAME` combined with settings on the domain server +`godaddy.com` determine this behavior. + +.. _extra_files: + +Extra files for webpages not built by Sphinx +--------------------------------------------- + +Any files placed in `$CLAW/doc/doc/extra_files` will be copied verbatim +(recursively for subdirectories) to the directory +`$CLAW/doc/doc/_build/html` when Sphinx is used to build the documentation. +These will be copied to `$CLAW/clawpack.github.com/` when the +`rsync_clawpack.github.sh` script is run and hence will appear on the +webpages. + +For example, the file `$CLAW/doc/doc/extra_files/clawdev2013/index.html` +should appear at ``_. + +The files in `$CLAW/doc/doc/extra_files/links` provide redirects so that +links like ``_ resolve properly to +webpages on the University of Washington server. Links of this nature have +been provided in published paper and some contain large amounts of data that +have not been copied to Github. + +Pages from other clawpack repositories +-------------------------------------- + +Some webpages are created within other clawpack repositories. +For example, the page http://www.clawpack.org/geoclawdev-2020/ +is modified by pushing changes to the master branch of the repository +`geoclawdev-2020 `__. +This is configured in that repository, in the `GitHub Pages` section found +under `Settings`. + +Other repositories that create webpages include: + +- `geoclawdev-2018 `__ +- `clawdev-2016 `__ + diff --git a/v5.10.x/_sources/howto_release.rst.txt b/v5.10.x/_sources/howto_release.rst.txt new file mode 100644 index 0000000000..78355580b3 --- /dev/null +++ b/v5.10.x/_sources/howto_release.rst.txt @@ -0,0 +1,283 @@ + +.. _howto_release: + +Guide for doing a Clawpack release +=================================== + +This is the procedure used to do a new official release of Clawpack. + +Preparation +----------- + +Make sure all your subrepositories are up to date and clean:: + + cd $CLAW + git co master + git pull + source pull_all.sh # to make sure all subrepos are up to date + + python $CLAW/clawutil/src/python/claw_git_status.py + +Check the output of this last commands in the files `claw_git_status.txt` +and `claw_git_diffs.txt` to make sure you don't have any uncommitted changes. + +Run all the examples as described in `CLAW/doc/gallery/README.md +`_ +as required for building the galleries, and check all the resulting plots to +make sure everything looks correct. + +Version numbers +--------------- + +Change the version number in `clawpack/clawpack/__init__.py`. +Initially set it to e.g. v5.4.1rc-alpha, then to the final release number. + +The version number is also set in `clawpack/setup.py` and should be changed +there to be consistent with `clawpack/clawpack/__init__.py` + +Release candidates +------------------ + +Make sure all repositories are checked out to the master branch and are up to +date with the main Clawpack repositories and clean, as described in the +preparation step above. + + +After following the preparation instructions above, do the following:: + + cd $CLAW + git checkout -b v5.4.1rc-alpha # change to appropriate name for this rc + git add -u . + git commit -m "v5.4.1rc-alpha release candidate" + git push + +Then do a PR on https://github.com/clawpack/clawpack. + +Create a tar file and a Github release +-------------------------------------- + +We generally do this step for a release candidate first, and then +do the same for the final release. For release candidates, modify the +version number to include `5.4.1rc-alpha`, for example. + +**NOTE:** Once one or more release candidates have been tested, the final +such PR should contain a change of the version number in the file +`$CLAW/setup.py` and in `$CLAW/clawpack/__init__.py` to the full version, +e.g. `5.4.1`. + +Once the PR has been merged:: + + cd $CLAW + git co master + git pull + source pull_all.sh # to make sure all subrepos are up to date + +Create tar file (first install https://github.com/Kentzo/git-archive-all):: + + cd $CLAW + git-archive-all --prefix clawpack-v5.x.x/ clawpack-v5.x.x.tar + gzip clawpack-v5.x.x.tar + +(Note: best to use v5.x.x rather than just 5.x.x to be consistent with the +directory name created if following :ref:`installing_pip`.) + +Draft a new release on the webpage +https://github.com/clawpack/clawpack/releases. +Indicate that it is pre-release if desired. + +As a comment, add text such as:: + + Download the clawpack-v5.x.x.tar.gz file below, not the other tar + file of zip file. Those only include the top-level Clawpack directories and + not all the submodules. + +Then attach the tar file `clawpack-v5.x.x.tar.gz` to be +included in the release by using the link "Attach binaries..." before +finalizing the release. (You can go back and "Edit release" if necessary.) + + + +Final release +-------------- + +After the release has been finalized, **tag all repositories**. In the commands +below, it is assumed the remote `upstream` points to the main Github repos +(not your fork) and that you have push permission. Change `5.x.x` to the +appropriate version number in these commands:: + + cd $CLAW + git checkout master; git pull # make sure up to date! + git tag v5.x.x + git push upstream v5.x.x + + cd ../pyclaw + git checkout master; git pull # make sure up to date! + git tag v5.x.x + git push upstream v5.x.x + +Do the same in all other repos (classic, amrclaw, geoclaw, clawutil, visclaw, +riemann). + +Note these tags are used in the documentation for pages like +:ref:`changes_to_master` which generate diffs between the latest version and +the current master branch of each repository. + + +Pypi +---- +To release on the pypi server (for installation via pip) we have to do a bit +of trickery. We can't just follow the directions at https://packaging.python.org/tutorials/packaging-projects/ +because we have a very non-Pythonic directory structure; in particular, +the subdirectories `clawpack/x/` do not have an `__init__.py`. + +Here's what to do, starting with a clean clone in some directory +referred to below as `$TEMP` (replace `5.x.x` by the new version number):: + + cd $TEMP + git clone https://github.com/clawpack/clawpack.git + cd clawpack # should now be in $TEMP/clawpack + source pull_all.sh + git submodule update --init --recursive + git-archive-all --prefix clawpack-5.x.x/ clawpack-5.x.x.tar + + mv clawpack-5.x.x.tar .. + cd .. + tar -xf clawpack-5.x.x.tar # creates $TEMP/clawpack-5.x.x + + cd clawpack + python3 setup.py sdist # creates $TEMP/clawpack/dist/clawpack-5.x.x.tar.gz + cd dist # should be in $TEMP/clawpack/dist + tar -xzf clawpack-5.x.x.tar.gz + + cp clawpack-5.x.x/PKG-INFO ../../clawpack-5.x.x + rm -rf clawpack-5.x.x + + cd ../.. # should be in $TEMP + rm clawpack-5.x.x.tar + tar -cf clawpack-5.x.x.tar clawpack-5.x.x + gzip clawpack-5.x.x.tar + mv clawpack-5.x.x.tar.gz clawpack/dist + +Upload to the testpypi server for testing +(you will need to have created an account there):: + + cd clawpack # should be in $TEMP/clawpack + twine upload --repository-url https://test.pypi.org/legacy/ dist/* + + credentials: [[test pypi]] + +Click the link and check that it looks okay. You can also test via:: + + pip3 uninstall clawpack + pip3 install —no-cache—dir —index-url https://test.pypi.org/simple/ clawpack + +Once that works, do the real upload to pypi:: + + twine upload dist/* + + + +Zenodo +------ + +Go to the `the Zenodo page `_ +and create a new upload for the latest tar file, following the framework of +https://doi.org/10.5281/zenodo.820730, for example. This will issue a new +DOI, which should be added to the page `$CLAW/doc/doc/releases.rst`. + +Note that the Github repository is not linked to Zenodo for automatic uploading +on release since that would only archive a zip file of the main `clawpack` +repository. Instead we want to archive the tar file containing all +subrepositories too. + +Open Science Framework (OSF) +---------------------------- + +Go to https://osf.io/kmw6h/files/ and upload the latest tarfile to the set +of versions that can be accessed with the single DOI +`10.17605/osf.io/kmw6h `__. + +.. _howto_release_doc: + +Updating the documentation +-------------------------- + +See :ref:`howto_doc` for general instructions on building the documentation +and galleries using Sphinx, and for how to push changes to Github so they +show up on the web. + +Note that in the `clawpack/doc` repository there is no `master` branch. +There should be one corresponding to the latest release and +also a branch `dev` that has changes since the last release. For a new +release create a new branch from the `dev` branch with the version number, +and update `conf.py` for the new version. + +When making changes for a new release, the following pages in the directory +`$CLAW/doc/doc` need to be updated: + + - A page like :ref:`release_5_4_0` needs to be created. Copy + `changes_to_master.rst` to `release_5_x_x.rst` for a new release `5.x.x` + and then change `master` to `5_x_x` in each link to Github, so they have + the form `v5.4.0...v5.4.1`, for example when going from 5.4.0 to 5.4.1. + + - Add to this page a brief summary of the major changes from the last + release, using the diffs that show up in `changes_to_master.rst` as a guide. + + - Add and commit this new page, and also add a link to it to the file + `releases.rst` (to show up in :ref:`releases`). + + - Modify the page `changes_to_master.rst` by replacing the previous version + number (e.g. `5.y.y`) by the version number of the new release + (e.g. `5.x.x`) so that links are comparing e.g. `v5.x.x...master` + + - Update `releases.rst` to include a link to the new version on Zenodo. + Also update the bibtex and recommended citation in `about.rst`. + + - Modify several other files to point to the new version number, in particular + `installing_pip.rst`, `installing_fortcodes.rst`, + `contents.rst`, `docker_image.rst`. + + - Modify the main landing page `_templates/index.html` to cite the + proper version number and DOI. + (No longer necessary -- This page has been changed to be more generic.) + + - Update `conf.py` to the new version number, and also + `$CLAW/doc/gallery/conf.py` (For a major release.) + +Updating the apps repository +---------------------------- + +Ideally all the apps in the :ref:`apps` should be rerun with the new release +and any issues fixed. If old apps are modified, add a note to the +`README.rst` file in the directory that indicates when it was last updated +and to what release. Some apps already have a section at the end of this +file of the form:: + + Version history: + ---------------- + + - Updated for Clawpack 5.3.0 on 15 Sept 2015 + + - Updated for Clawpack 5.4.0 on 4 Jan 2017 + + + +Updating the Dockerfile +----------------------- + +See :ref:`docker_image` for instructions on using the docker image. + +Note that unlike the tar file for a new release, the docker image includes +a clone of the `apps` repository, so it would be best to first update that +repository if necessary. + + - Clone the repository https://github.com/clawpack/docker-files + + - Make a new `Dockerfile` for the new version by copying an old one + and changing the version numbers in it. Make any other changes needed + for this new release. + + - See the `README.md` file in that repo for instructions on building an + image and pushing it to dockerhub (which requires push permission). + + diff --git a/v5.10.x/_sources/installing.rst.txt b/v5.10.x/_sources/installing.rst.txt new file mode 100644 index 0000000000..a58a25a8f0 --- /dev/null +++ b/v5.10.x/_sources/installing.rst.txt @@ -0,0 +1,61 @@ +:orphan: + +.. _installing: + +************************************** +Installing Clawpack +************************************** + +See also: + +- :ref:`releases` +- :ref:`docker_image` as an alternative to installing + +**Register:** Please `register `_ +if you have not already done so. This is very useful in helping +us track the extent of usage, and important to the :ref:`funding` agencies +who support this work. + +**Prerequisites:** Before installing, check that you have the :ref:`prereqs`. + +**Please see** + +- :ref:`clawpack_packages` + +before installing, particularly if you are not sure whether you will +be using the Fortran versions of the PDE solvers +(:ref:`contents_fortcodes`) or the :ref:`pyclaw` version of the PDE solvers. + +**Then choose the best installation option** for your needs from this list: + +- If you **only** plan to use PyClaw to solve the PDEs and Visclaw for plotting, + we suggest + + - :ref:`install_quick_pyclaw`. + +- If you **only** plan to use the Fortran variants of Clawpack + (:ref:`contents_fortcodes`) for solving the PDEs, together with + Visclaw for plotting and other Python tools (e.g. from geoclaw or clawutil), + then we suggest + + - :ref:`installing_fortcodes`. + +- If you are a power user who plans to use both PyClaw and the Fortran variants + for solving PDEs, we recommend + + - :ref:`install_quick_all`. + + + + +Next steps: +=========== + +Once Clawpack is installed, you can go to one of the following pages to get +started: + +- :ref:`first_run_pyclaw` +- :ref:`first_run_fortran` +- :ref:`trouble_installation` + + diff --git a/v5.10.x/_sources/installing_fortcodes.rst.txt b/v5.10.x/_sources/installing_fortcodes.rst.txt new file mode 100644 index 0000000000..7f30a9c349 --- /dev/null +++ b/v5.10.x/_sources/installing_fortcodes.rst.txt @@ -0,0 +1,86 @@ +:orphan: + +.. _installing_fortcodes: + +********************************************** +Options for installing Clawpack Fortran codes +********************************************** + + +This page describes ways to download and "install" Clawpack in a way that +the Fortran versions of the PDE solvers (:ref:`contents_fortcodes`) +can be used, along with Python codes that support these solvers, including +the visualization tools in VisClaw. + +If you plan to use the PDE solvers directly from :ref:`pyclaw`, please +see :ref:`installing` for other options. If you are not sure, see +:ref:`clawpack_packages` + +.. _installing_tarfile: + +tar file +-------- + +You can download the most recent (or certain previous versions) of Clawpack +as a tar file. After untarring this, you can set environment variables +to point to this version. + +Download a tar file from one of these sources: + +- `Clawpack releases on Github + `_ + +- The Zenodo link for the current release, listed at + :ref:`releases` (which also lists DOIs for recent versions, useful for + :ref:`citing`) + +After downloading a tar file you can do, e.g. :: + + tar -xzf clawpack-v5.9.2.tar.gz + cd clawpack-v5.9.2 + export CLAW=/full/path/to/clawpack-v5.9.2 # in bash + +The last command sets an environment variable when using the bash shell. +The syntax may be different in other shells. Replace `/full/path/to` +with the appropriate full path. + +You must also add `$CLAW` to your `PYTHONPATH` environment variable, +see :ref:`python_path`. + +.. _install_dev: + +git clone +--------- + +You can clone the git repositories from ``_. +This is particularly useful if you +want the latest development version or a branch that is not in a release yet, +and/or if you plan to contribute to the code yourself via a pull request. +See :ref:`developers` for more details, but the basic commands are:: + + git clone https://github.com/clawpack/clawpack.git + cd clawpack + git checkout v5.9.2 # or an older version; `git tag -l` to list options + git submodule init # for repositories pyclaw, clawutil, visclaw, etc. + git submodule update # clones all the submodule repositories + export CLAW=/full/path/to/clawpack # in bash + +The last command sets an environment variable when using the bash shell. +The syntax may be different in other shells. Replace `/full/path/to` +with the appropriate full path. + +You must also add `$CLAW` to your `PYTHONPATH` environment variable, +see :ref:`python_path`. + +**Components:** +See :ref:`clawpack_components` for a list of what is generally included +under the top level `clawpack` directory when using any of these approaches. +(And what is not included, e.g. the :ref:`apps`.) + +Next steps: +=========== + +Once Clawpack is installed, you can get started: + +- :ref:`first_run_fortran` +- :ref:`trouble_installation` diff --git a/v5.10.x/_sources/installing_pip.rst.txt b/v5.10.x/_sources/installing_pip.rst.txt new file mode 100644 index 0000000000..c15ac68298 --- /dev/null +++ b/v5.10.x/_sources/installing_pip.rst.txt @@ -0,0 +1,206 @@ +.. _installing_pip: + +************************************** +pip install instructions +************************************** + + +**Note:** If you only plan to use the Fortran versions of the solvers +(rather than :ref:`pyclaw`), and you run into problems with pip, +then you might want to try :ref:`installing_fortcodes`. + + + +.. _install_quick_pyclaw: + +Quick Installation of PyClaw with pip +===================================== + +Please see :ref:`clawpack_packages` before installing, particularly +if you are not sure whether you will +be using the Fortran versions of the PDE solvers +(:ref:`contents_fortcodes`) or the :ref:`pyclaw` version of the PDE solvers. +See :ref:`installing` for other installation options. + +**Prerequisites:** Before installing, check that you have the :ref:`prereqs`. + +If you only want to use PyClaw (and associated Python +tools, e.g. VisClaw for visualization), then the simplest way to install +Clawpack is via:: + + pip install --user clawpack + +or, more specifically, :: + + pip install --user clawpack==v5.9.2 + +or you can choose a previous version from the `PyPi history `__. + +However, note that this does not download the Fortran codes in a way that they +can be used for :ref:`contents_fortcodes`. + +If you think you might want to use the Fortran packages as well +(Classic, AMRClaw, GeoClaw) and/or want easier access to the Python source +code, it is recommended that you follow the pip instructions below. + + +.. _install_quick_all: + +Quick Installation of all packages with pip +============================================ + +The recommended way to install the latest release of Clawpack, for +using both PyClaw and the Fortran packages, is to use pip, e.g. with the +following command +**(you might want to first read the notes below to see if you +want to change anything in this command)**:: + + pip install --src=$HOME/clawpack_src --user --no-build-isolation -e \ + git+https://github.com/clawpack/clawpack.git@v5.9.2#egg=clawpack + + +**Notes:** + +- With older versions of `pip`, the flag + `--use-deprecated=legacy-resolver` + may not be recognized and is not needed. + +- Using pip to install will also check some python + :ref:`prereqs` and may update these on your system, and will use f2py to + convert Fortran Riemann solvers to Python versions. See + :ref:`installing_options` if you want more control. + +- This will download Clawpack (via a git clone) into the directory + `$HOME/clawpack_src/clawpack-v5.9.2`. The top + installation directory can be changed by modifying the ``--src`` target + (or omit this part to put it in your current working directory). + If you have already downloaded Clawpack via a different mechanism then + see :ref:`pip_switch_version` rather than using the above command. + +- See :ref:`clawpack_components` for a list of what's included in this top + level directory. + +- The ``--user`` flag is necessary if you are installing on a shared computer + where you do not have root access. If you do have root access and want it + to be available to all users, you can omit this flag. See notes below for + more information. + +- The ``-e`` flag makes it an "editable" install, leaving the source code in + place and allowing you to modify it if desired. + (Otherwise, by default, pip would move the python code to some + `site-packages` directory and delete everything else.) + +- In order to use the Fortran codes within Clawpack (`classic`, + `amrclaw`, or `geoclaw`), you should then set the environment + variable `CLAW` to point to the `clawpack-v5.9.2` directory within + the installation directory `$HOME/clawpack_src`, and `FC` to point + to the desired Fortran compiler, e.g. in the bash shell:: + + export CLAW=$HOME/clawpack_src/clawpack-v5.9.2 + export FC=gfortran + + +- You may want to set `CLAW` even if you are only using PyClaw, since `$CLAW` is + sometimes used in this documentation to indicate the top level of the + Clawpack source directory structure. + +Installing with `pip` also compiles Riemann solvers written in Fortran for +use in PyClaw. If you get a Fortran error message when installing, see +:ref:`trouble_f2py`. + +See :ref:`setenv` for more information, and :ref:`python_path` if you are +having problems with importing Python modules. + + +Next steps: +----------- + +Once Clawpack is installed, you can go to one of the following pages to get +started: + +- :ref:`first_run_pyclaw` +- :ref:`first_run_fortran` +- :ref:`trouble_installation` + + +.. _pip_switch_version: + +Using pip to install a different version +----------------------------------------- + +Using `pip` to download and install actually clones Git repositories from +https://github.com/clawpack/clawpack. If you are comfortable with +Git you can use the same top repository to update Clawpack or switch +to other versions. However, if you have made any changes to files +that are tracked by Git in this set of directories and then try to +update or check out other branches, you may run into merge conflicts. + +Instead, you can always install another branch by doing a new +`pip install` into a different subdirectory of `clawpack_src`, e.g. :: + + export CLAW_VERSION=v5.3.1 # used several places in next commands + pip install --src=$HOME/clawpack_src --user --no-build-isolation -e \ + git+https://github.com/clawpack/clawpack.git@$CLAW_VERSION#egg=clawpack + export CLAW=$HOME/clawpack_src/clawpack-$CLAW_VERSION + +If this version doesn't already exist on your computer then it will clone +the necessary repositories. + +If you already have a different version of Clawpack in some directory +obtained by any means (e.g. from a tarfile), then you can set the paths +properly via:: + + export CLAW=/full/path/to/desired/version/of/clawpack + cd $CLAW + pip install --user --no-build-isolation -e ./ + +See :ref:`python_path` if you are having problems with the wrong version +being imported. + + +Experimenting with code in the examples directories +--------------------------------------------------- + +We suggest that if you want to experiment extensively with examples or +modify an example to solve your own problem, you first copy a directory out +of the source code tree to a different location, in order to minimize +confusion if you later want to update to a different version of clawpack. See +:ref:`newapp` for more details. + +If you want to check out the `master` branch of the clawpack repositories or +work with other development versions, see :ref:`setup_dev`. + +.. _trouble_pip: + +Troubleshooting pip install +--------------------------- + +In case you run into problems with `pip install` or with changing version, +here are some tips: + +- The `-e` flag ("editable") results in the the source code + remaining in the directory `$CLAW`, which includes all the Fortran packages as + well as Python source. + +- When the `--user` flag is omitted, the `pip install` will modify a + system-wide file `easy-install.pth` to add the path. This requires + root permission. When the `--user` flag is used, this path will + instead be added to an `easy-install.pth` file that is within + your user directory structure. See :ref:`python_path` for information on + finding these files. + +- If you use `pip` to install or switch versions then you should **not** set + the environment variable `PYTHONPATH`. See :ref:`python_path` for more + information. + +- If you wish to point to a different version of the Clawpack Python tools, + you need to rerun `pip install` (or use `pip uninstall clawpack` to + remove clawpack from the search path controlled by pip). + +- If you get a Fortran error message when installing, see + :ref:`trouble_f2py`. + +If you cannot get this to work, consider other :ref:`installing` and +`raise an issue `_ to let us know +what went wrong. + diff --git a/v5.10.x/_sources/kmltools_module.rst.txt b/v5.10.x/_sources/kmltools_module.rst.txt new file mode 100644 index 0000000000..03409b6c64 --- /dev/null +++ b/v5.10.x/_sources/kmltools_module.rst.txt @@ -0,0 +1,14 @@ + +.. _kmltools_module: + +kmltools module of utility functions +======================================== + +**This describes new tools added in Clawpack 5.2.1.** + +Documentation auto-generated from the module docstrings +-------------------------------------------------------- + +.. automodule:: clawpack.geoclaw.kmltools + :members: + diff --git a/v5.10.x/_sources/lagrangian_gauges.rst.txt b/v5.10.x/_sources/lagrangian_gauges.rst.txt new file mode 100644 index 0000000000..736d9ad9f4 --- /dev/null +++ b/v5.10.x/_sources/lagrangian_gauges.rst.txt @@ -0,0 +1,87 @@ + +.. _lagrangian_gauges: + + +Lagrangian gauges for particle tracking +======================================= + +Specifying Lagrangian Gauges +---------------------------- + +:ref:`gauges` are normally added in `setrun.py` via lines of the form: + +:: + + rundata.gaugedata.gauges.append([gaugeno, xg, yg, t1, t2]) + +where `(xg,yg)` is the gauge location and the gauge is to be tracked +for `t1 <= t <= t2`. Several properties can already be set for gauges, +for example `rundata.gaugedata.display_format` can be used to specify +how many digits to print out. This can be either a single format string +or a dictionary with an entry for each gauge, as described at +:ref:`gauges`. + +As of GeoClaw Version 5.7.0, +a new property has been defined that specifies whether each gauge is +"stationary" or "lagrangian". In the past all gauges were stationary, +i.e. `(xg,yg)` is a fixed location. If a gauge is set to be lagrangian +then `(xg,yg)` specifies the initial location for `t <= t1` but +after this time the gauge location is updated using the fluid velocity +at each time that the gauge values are recorded (until time `t2` if +this is less than the final time of the computation, but often it is set +to a huge value like `1e9`). + +The frequency of updating is controlled by +`rundata.gaugedata.min_time_increment` -- if this is 0 (the default) +then the gauge values are updated every time step. + +Currently lagrangian gauges are implemented only in GeoClaw, for which +the fluid velocity `(ug,vg)` at a gauge location `(xg,yg)` is +computed from the momentum in the appropriate manner based on +`rundata.geo_data.coordinate_system`. This could be implemented more +generally in amrclaw in the same manner, but of course would only make +sense when solving equations for velocities are part of the solution. + +The velocities are used to move each gauge location from the current +`(xg, yg)` to `(xg + dt*ug, yg + dt*vg)`, i.e. Forward Euler is used +to integrate :math:`dx/dt = u, dy/dt = v`. + +The default if nothing is added to `setrun.py` is equivalent to +setting + +:: + + rundata.gaugedata.gtype = 'stationary' + +so that all gauges are stationary. Alternatively this can be set to +`'lagrangian'` to make all gauges lagrangian, or +`rundata.gaugedata.gtype` can be a dictionary with +`rundata.gaugedata.gtype[gaugeno]` set to one of these values as +desired for each gauge. These values are written out to `gauges.data` +(as 1 for stationary, 2 for lagrangian), from which they are read into +GeoClaw. + +When a gauge is lagrangian, the values written out (e.g. to the file +`_output/gauge00001.txt` for gauge 1) are modified so that the columns +that normally contain momenta `hu` and `hv` are replaced by the +current location `xg` and `yg`. + +Visclaw tools for plotting +-------------------------- + +A new module `clawpack.visclaw.particle_tools` has been added to +facilitate plotting particle locations and particle paths. + +An alternative using fgout grids +--------------------------------- + +One can also use the :ref:`fgout` capabilities added to +GeoClaw in Version 5.9.0 in order to capture the solution over a specified +fixed grid at frequent output times. If this output is frequent enough, +then it is also possible to sample these outputs at a fixed location to give +a time series similar to a gauge output, but with the advantage that the +points need not be specified prior to the run (at least for any point that +can be spatially interpolated from the fgout grid(s) captured in the run). +The temporal resolution will be that specified for the fgout grids. +See :ref:`fgout` for more details. + diff --git a/v5.10.x/_sources/license.rst.txt b/v5.10.x/_sources/license.rst.txt new file mode 100644 index 0000000000..125ef04f2f --- /dev/null +++ b/v5.10.x/_sources/license.rst.txt @@ -0,0 +1,45 @@ +:orphan: + +.. _license: + +License +------- + +Clawpack is distributed under the terms of the +Berkeley Software Distribution (BSD) license. + +See http://www.opensource.org/licenses/bsd-license.php +for more details. + + +Copyright (c) 1994--2020, The Clawpack Development Team. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Washington nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + diff --git a/v5.10.x/_sources/makefiles.rst.txt b/v5.10.x/_sources/makefiles.rst.txt new file mode 100644 index 0000000000..c7117c7516 --- /dev/null +++ b/v5.10.x/_sources/makefiles.rst.txt @@ -0,0 +1,142 @@ + +.. _makefiles: + + +===================================== +Clawpack Makefiles +===================================== + +Makefiles for the Fortran code in many repositories +use the common Makefile found in `$CLAW/clawutil/src/Makefile.common`, +so you must have the `clawutil` repository. + +**New in 5.4.0.** The `Makefile` also typically refers to a common list of +library routines needed for this particular example or application code, +rather than listing all the files individually in every `Makefile`. See +:ref:`makefiles_library` for more details on how to specify local files in +place of library files if you need to replace a default file. + +In most directories with a `Makefile` you can type:: + + $ make help + +to find out what options are available. + +Applications directory Makefiles +-------------------------------- + +.. _makefiles_output: + +output +++++++ + +In applications directories, compiling and running the code can usually be +accomplished via:: + + $ make .output + +This checks dependencies using the data of the hidden file `.output` that is +created after the code has successfully run. If any Fortran codes have been +modified since this date, the code is first recompiled. If the `setrun.py` +script has been changed more recently, then the data files are first +recreated. + +If you want to re-run the code and you get:: + + $ make .output + make: `.output' is up to date. + +then you can force it to run again by removing the file `.output`:: + + $ rm -f .output + $ make .output + +This happens for example if you changed something that you know +will affect the output but that isn't in the Makefile's set of +dependencies, or if the code bombed or was aborted before completion. + +The hidden file ``.output`` contains a single line, which is the path to the +directory where the output resides (as specified by the ``CLAW_outdir`` variable +in the ``Makefile``). This file is used by the interactive plotting routines, as +described in :ref:`plotting`. + +You can also do:: + + $ make output + +(with no dot before ``output``) to run the code without checking dependencies. +This is sometimes handy but note that +if you modify the ``setrun`` function +and then do ``make output``, it will not use the new parameter values. +You must do ``make .data`` to regenerate the data files used by Clawpack. +This would be done automatically by ``make .output``, for which ``.data`` is a +dependency. + +.. _makefiles_plots: + +plots +++++++ + +In applications directories, plotting results computed by Clawpack can generally +be accomplished via:: + + $ make .plots + +This checks dependencies using the date of the hidden file `.plots`. + +This creates a set of webpages that show the plots, as described further in +:ref:`plotting`. There are other interactive plotting options also described +there. + +Starting in 4.5.1, you can also do + + $ make plots + +(with no dot before ``plots``) to plot the output without checking dependencies. +This insures that the code will not be run again and is sometime safer than +``make .plots``, which may attempt to run the code if something appears out of +date. + + +Variables ++++++++++ + +A number of variables are defined in the Makefiles of application +directories. For example, output is directed to the subdirectory specified +by the variable `OUTDIR`. To change this, simply modify the Makefile before +typing "make .output". Alternatively, you can modify the variable from the +command line, e.g.:: + + $ make .output OUTDIR=run1 + +to direct output to a subdirectory named `run1`. + +Compiler flags +++++++++++++++ + +Compiler flags can be changed by modifying the `FFLAGS` variable in the +Makefile. If you change compiler flags you will generally need to recompile +all the Fortran files and the Makefile dependencies will not detect this. +To force recompilation of all files, use the "make new" option, e.g. to +recompile with the `-g` flag for debugging:: + + $ make new FFLAGS=-g + +See :ref:`fortran_compilers` for more about compiler flags. + +Duplicate Base Source Name +++++++++++++++++++++++++++ + +Fortran source files with the same base name but different suffixes can cause +unexpected source files to be compiled. This occurs as the Makefiles are +structured to use the free-format Fortran source files **.f90* before the +fixed-format source files with *.f*. For example, if someone specified +*qinit.f* in the Makefile but there was a *qinit.f90* file that existed in the +same directory then the compiler would compile the **f90** file instead of the +**f** file. + +The best way to avoid this problem is to check periodically whether you may +have conlicting source via the **make debug** command which should list +possible conflicts. Note that this command will also list sources that may +not be in conflict. If you do have conflicting source either remove the +**f90** file, rename it, or convert the **f** file into a **f90** file. \ No newline at end of file diff --git a/v5.10.x/_sources/makefiles_library.rst.txt b/v5.10.x/_sources/makefiles_library.rst.txt new file mode 100644 index 0000000000..9a446d9bbf --- /dev/null +++ b/v5.10.x/_sources/makefiles_library.rst.txt @@ -0,0 +1,143 @@ + +.. _makefiles_library: + + +===================================== +Library routines in Makefiles +===================================== + +See :ref:`makefiles` for general information on using the `Makefile` found +in application directories for the Fortran codes. + +**New in 5.4.0.** The `Makefile` also typically refers to a common list of +library routines needed for this particular example or application code, +rather than listing all the files individually in every `Makefile`. + + +For example, the directory `$CLAW/classic/examples/advection_1d_example1` +contains the lines:: + + + # --------------------------------- + # package sources for this program: + # --------------------------------- + + include $(CLAW)/classic/src/1d/Makefile.classic_1d + + # --------------------------------------- + # package sources specifically to exclude + # (i.e. if a custom replacement source + # under a different name is provided) + # --------------------------------------- + + EXCLUDE_MODULES = \ + + EXCLUDE_SOURCES = \ + + # ---------------------------------------- + # List of custom sources for this program: + # ---------------------------------------- + + MODULES = \ + + SOURCES = \ + qinit.f90 \ + setprob.f90 \ + $(CLAW)/riemann/src/rp1_advection.f90 + + +This indicates that the file `$CLAW/classic/src/1d/Makefile.classic_1d` +is used to specify the default list of files to be used. These are +separated into `MODULES` and `SOURCES` since Fortran modules need to be +compiled before files that contain only subroutines or functions. + +In the example shown above, we are +including three source code routines specific to this example: `qinit.f90` +and `setprob.f90` from this example directory, and the Riemann solver +`rp1_advection.f90` from the `riemann` repository. + +The file `$CLAW/classic/src/1d/Makefile.classic_1d` contains:: + + #get the directory of this makefile + LIB:=$(CLAW)/classic/src/1d + + #list of common sources for classic 1d codes + COMMON_SOURCES += \ + $(LIB)/qinit.f90 \ + $(LIB)/setprob.f90 \ + $(LIB)/setaux.f90 \ + $(LIB)/bc1.f \ + $(LIB)/b4step1.f90 \ + $(LIB)/driver.f90 \ + $(LIB)/claw1ez.f \ + $(LIB)/claw1.f \ + $(LIB)/copyq1.f \ + $(LIB)/inlinelimiter.f90 \ + $(LIB)/opendatafile.f \ + $(LIB)/out1.f \ + $(LIB)/src1.f90 \ + $(LIB)/step1.f90 + +For the `classic` 1d code there are no modules, only subroutines. + +.. _makefiles_replace: + +Replacing files with the same name as library files +--------------------------------------------------- + +Note that the list of default library routines above contains both +`qinit.f90` and `setprob.f90`. The default versions of these files contain +subroutines that have the correct calling sequence but return without doing +anything. Every application directory will generally contain a local +version of `qinit.f90` that sets the initial conditions. Many applications +also have a custom version of `setprob.f90` that sets parameters, reads +custom input files, etc. + +Since the local `Makefile` contains `qinit.f90` and `setprob.f90` in its +list of `SOURCES`, the new make system (as of v5.4.0) will use these in +place of the library source files since they have identical names. Hence we +do not need to list these routines explicitly in the list `EXCLUDE_SOURCES` +(although it wouldn't hurt to do so). + +Note that if the local version were called `qinit.f` rather than +`qinit.f90`, the local version would also still be used in spite of the +different extension, since the base of the file name is the same. +(See :ref:`f77_vs_f90` for an important cautionary note on what +might go wrong if you have both a `.f` file and a `.f90` file with +the same base name in the same directory.) + +Using a modified library routine with a different name +------------------------------------------------------ + +Suppose we want to use a local version of `bc1.f` in order to +implement some new boundary condition not included in the default version. +If we call the local file `bc1.f` then we can simply add it to the list +`SOURCES` in the local `Makefile` and it will be used in place of the +default library version as described in the previous section. + +However, suppose our new boundary condition routine is called +`bc1_inflow.f` instead of `bc1.f`. Then we would add this routine +to the list `SOURCES` in the local `Makefile` and in this case we +must also add `bc1.f` to `EXCLUDE_SOURCES` list. After these changes +the local `Makefile` would contain these lines:: + + + EXCLUDE_MODULES = \ + + EXCLUDE_SOURCES = \ + bc1.f \ + + # ---------------------------------------- + # List of custom sources for this program: + # ---------------------------------------- + + MODULES = \ + + SOURCES = \ + qinit.f90 \ + setprob.f90 \ + bc1_inflow.f \ + $(CLAW)/riemann/src/rp1_advection.f90 + +(It doesn't matter what order the files are listed in each section.) + diff --git a/v5.10.x/_sources/manning.rst.txt b/v5.10.x/_sources/manning.rst.txt new file mode 100644 index 0000000000..d34feb0b9d --- /dev/null +++ b/v5.10.x/_sources/manning.rst.txt @@ -0,0 +1,52 @@ +.. _manning: + +========================== +Manning friction term +========================== + +When using GeoClaw to model inundation, it is important to include an +appropriate bottom friction term in the equations. This takes the form of a +source term added to the right hand side of +the momentum equations: + + :math:`(hu)_t + \cdots = -\gamma (hu),` + + :math:`(hv)_t + \cdots = -\gamma (hv),` + +The form built into GeoClaw is the Manning formulation, in which +:math:`\gamma` is a function of the depth and momentum: + + :math:`\gamma = \frac{gn^2\sqrt{(hu)^2 + (hv)^2}}{h^{7/3}}.` + +with :math:`g` the gravitational constant and :math:`n` the "Manning +coefficient". This is an empirical formula and the proper value of +:math:`n` to use depends on the roughness of the terrain or seabed, as shown +for example in +`this table `_. +Often for generic tsunami modeling, the constant value :math:`n=0.025` is used. +An enhancement of GeoClaw planned for the future is to allow +spatially-varying Manning coefficient. + +The friction term is only applied in regions where the depth is below a +threshold specified by *friction_depth* (see :ref:`setrun_geoclaw`). + +New in 5.0: A list of Manning coefficients can be specifed to be used in +different regions based on the topography B, e.g. one value offshore and a +different value onshore. See :ref:`setrun_geo`. + +.. warning:: Changing the Manning coefficient can have a significant effect + on the extent of inundation and runup. If GeoClaw (or any other code) is + used for estimating real-world hazards, users should think carefully + about chosing an appropriate value, and may want to run sensitivity + studies. A smaller value of :math:`n` (less friction) will generally + lead to greater inundation. + +.. warning:: A bug was recently discovered in GeoClaw that was corrected + in Version 4.6.3: The exponent (7/3) was used in the Fortran code, which + evaluates as 2 in integer arithmetic rather than 2.3333. This has now + been corrected by writing it as (7.d0/3.d0). This can make a difference in + the extent of inundation and runup. Given the uncertainty in the proper + value of :math:`n` to use and the inadequacy of using the same value + everywhere, the effect of this bug on the resulting accuracy was probably + small, but users may want to test this. + diff --git a/v5.10.x/_sources/mapc2p.rst.txt b/v5.10.x/_sources/mapc2p.rst.txt new file mode 100644 index 0000000000..030cfbcd63 --- /dev/null +++ b/v5.10.x/_sources/mapc2p.rst.txt @@ -0,0 +1,10 @@ + + + +.. _mapc2p: + +******************* +The mapc2p function +******************* + +To appear. diff --git a/v5.10.x/_sources/marching_front.rst.txt b/v5.10.x/_sources/marching_front.rst.txt new file mode 100644 index 0000000000..f8a7fcbe31 --- /dev/null +++ b/v5.10.x/_sources/marching_front.rst.txt @@ -0,0 +1,568 @@ + +.. _marching_front: + +Marching Front algorithm +======================== + +**New in Version 5.7.0.** + +Adapted from `this notebook +`_. + + +The module `clawpack.geoclaw.marching_front` defines a function +`select_by_flooding` that takes as input an array `Ztopo` containing +topography elevations on a rectangular grid and returns an array +`pt_chosen` of the same shape with values 1 (if chosen) or 0 (if not +chosen). Other inputs specify the criteria used to choose points, as +described below. + +The basic idea is that chosen points satisfy certain elevation +requirements along with connectivity to the coast. This was originally +developed to identify points in a topography DEM where the topography +value :math:`Z` is below MHW, but that should be initialized as dry land +because they are in regions protected by dikes or levies. In this +situation, the marching algorithm is used by initializing points well +offshore (e.g. with :math:`Z < -5` meters) as *wet* and other points to +*unset*. Then the front between *wet/unset* points is advanced by +marking neighboring points as *dry* if :math:`Z\geq0` or as *wet* if +:math:`Z<0`. This is repeated iteratively for each new front until there +are no more *wet* points with *unset* neighbors. At this point any +points still *unset* are entirely buffered by *dry* points and must lie +behind dikes, so these are also set to *dry*. + +The use of such a `force_dry_array` in GeoClaw is explained in +:ref:`force_dry`. + +Other applications are also described below along with some examples. + +Contents +-------- + +- `Function arguments <#mf-args>`__ + +- `Output array <#mf-output>`__ + +- `The mask argument <#mf-mask>`__ + +- `The previous_pts_chosen argument <#mf-prev>`__ + +- `Examples <#mf-examples>`__ + + - `Finding points below a given elevation <#mf-find-Zlow>`__ + - `Choose points only near shore <#mf-find-nearshore>`__ + - `Write out the masked array indicating fgmax + points <#mf-fgmax-file>`__ + - `Creating an AMR flag region <#mf-amr-flag>`__ + - `Determining dry areas below MHW <#mf-dry>`__ + +Function arguments +------------------ + +The main function in the `marching_front.py` module is +`select_by_flooding`. + +The function is defined by: + +:: + + def select_by_flooding(Ztopo, mask=None, prev_pts_chosen=None, + Z1=-5., Z2=0., max_iters=None, verbose=False): + +If `Z1 <= Z2` then points where `Ztopo < Z1` are first selected and +then a marching algorithm is used to select neighboring points that +satisfy `Ztopo < Z2`. + +Think of chosen points as “wet” and unchosen points as “dry” and new +points are flooded if at least one neighbor is “wet” and the topography +is low enough. Starting from deep water (e.g. `Z1 = -5`) this allows +flooding up to MHW (`Z2 = 0`) without going past dikes that protect +dry land with lower elevation. + +However, this can also be called with `Z1 > Z2`, in which case points +where `Ztopo >= Z1` are first selected and then the marching algorithm +is used to select neighboring points that satisfy `Ztopo > Z2`. This +is useful to select offshore points where the water is shallow, (and +that are connected to the shore by a path of shallow points) e.g. to +identify points on the continental shelf to set up a flag region for +refinement. + +If `max_iters=None` then iterate to convergence. Otherwise, at most +`max_iters` iterations are taken, so setting this to a small value +only selects points within this many grid points of where +`Ztopo <= Z1`, useful for buffering or selecting a few onshore points +along the coast regardless of elevation. + +If `prev_pts_chosen` is None we are starting from scratch, otherwise +we possibly add additional chosen points to an existing array. Points +where `prev_pts_chosen[i,j]==1` won’t change but those `==0` may be +changed to 1 based on the new criteria. + +If `mask==None` or `mask==False` then the entire array is subject to +selection. If `mask` is an array with `mask[i,j]==True` at some +points, then either: - these masked points are marked as not selected +(`pts_chosen[i,j]=0`) if `prev_pts_chosen==None`, or - these masked +points are not touched if `prev_pts_chosen` is an array (so previous +0/1 values are preserved). + +These arguments are described in more detail below with examples of how +they might be used. + +.. _mf-output: + +output array +------------ + +The function returns an array `pt_chosen` with the same shape as +`Ztopo` and has the value 1 at points chosen and 0 at points not +chosen. + + +creating a masked array +~~~~~~~~~~~~~~~~~~~~~~~ + +This array can be used to define a masked array from `Ztopo` that +masks out the points not chosen via: + +:: + + from numpy import ma # masked array module + Zmasked = ma.masked_array(Ztopo, mask=logical_not(pt_chosen)) + +This could be used to plot only the points chosen using the matplotlib +function `pcolormesh`, for example, or the function now defined in +`geoclaw.visclaw.plottools.pcolorcells` that better plots finite +volume grid cell data with proper alignment and boundary cells. See +:ref:`pcolorcells`. + +topofile mask for initializing dry points +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The array `pt_chosen` can be used to create a file that is read in by +GeoClaw to identify points where `Ztopo` is below MHW but where there +is dry land because of protection by dikes or levies. This is done by +defining a `geoclaw.topotools.Topography` object and setting its `Z` +attribute based on `pt_chosen`, and then writing this as a topofile +with `topo_type==3`. Then in `setrun.py` this file can be specified +as a mask that is read in and used when initializing grid cells. There +are some subtleties in how this is done, described in more detail in +:ref:`force_dry`. + +fgmax points +~~~~~~~~~~~~ + +The chosen points might be used as fgmax points, as described below. + +flag regions +~~~~~~~~~~~~ + +The output array could also be used to define an AMR flag region as a +ruled rectangle, using the function +`region_tools.ruledrectangle_covering_selected_points` described in +:ref:`ruled_rectangles`. This would give a +minimal ruled rectangle covering all the chosen points. An example is +given `below <#amr-flag>`__. + +.. _mf-mask: + +The `mask` argument +--------------------- + +`mask` can be `False` or `None`, or else must be an array of the +same shape as `Ztopo`. + +The `Ztopo` array input must be a rectangular array, but sometimes we +want to select points covering only a subset of these points, e.g. when +defining fgmax points along some stretch of coastline. In this case +`mask` can be used to mask out values we do not want to select. Set +`mask[i,j] = True` at points that should *not* be chosen. + +To mask out points that lie outside some ruled rectangle that has been +defined as `rr`, you can use the `rr.mask_outside` function to +define the mask. See :ref:`ruled_rectangles`. + +.. _mf-prev: + +The `previous_pts_chosen` argument +------------------------------------ + +This argument is useful if you want to apply a sequence of different +criteria to choose points. For example, suppose you first want to choose +all grid points within 5 points of the coast (as can be done using +`max_iters`) and then supplement this will all grid points below a +specified elevation that are farther inland from the coast. + +Examples are given below, also of how the `mask` array works in +conjunction with `previous_pts_chosen`. + +.. _mf-examples: + +Examples +-------- + +First import some needed modules and set up color maps. + + +.. code:: ipython3 + + import os,sys + from numpy import ma # masked arrays + from clawpack.visclaw import colormaps + from clawpack.geoclaw import topotools, marching_front + from clawpack.amrclaw import region_tools + from clawpack.visclaw.plottools import pcolorcells + + zmin = -60. + zmax = 40. + + cmap_land = colormaps.make_colormap({ 0.0:[0.1,0.4,0.0], + 0.25:[0.0,1.0,0.0], + 0.5:[0.8,1.0,0.5], + 1.0:[0.8,0.5,0.2]}) + + cmap_sea = colormaps.make_colormap({ 0.0:[0,0,1], 1.:[.8,.8,1]}) + + cmap_topo, norm_topo = colormaps.add_colormaps((cmap_land, cmap_sea), + data_limits=(zmin,zmax), + data_break=0.) + + cmap_sea_dry = colormaps.make_colormap({ 0.0:[1.0,0.7,0.7], 1.:[1.0,0.7,0.7]}) + cmap_dry, norm_dry = colormaps.add_colormaps((cmap_land, cmap_sea_dry), + data_limits=(zmin,zmax), + data_break=0.) + +Sample topography from a 1/3 arcsecond DEM +------------------------------------------ + +We consider a small region on the SW coast of Whidbey Island north of +Maxwelton Beach as an example: + +.. code:: ipython3 + + region1_png = imread('region1.png') + extent = [-122.46, -122.38, 47.93, 47.96] + + figure(figsize=(12,6)) + imshow(region1_png, extent=extent) + gca().set_aspect(1./cos(48*pi/180.)) + + + +.. image:: MarchingFront/output_13_0.png + + +We read this small portion of the 1/3 arcsecond Puget Sound DEM, +available from the NCEI thredds server: + +.. code:: ipython3 + + path = 'https://www.ngdc.noaa.gov/thredds/dodsC/regional/puget_sound_13_mhw_2014.nc' + topo = topotools.read_netcdf(path, extent=extent) + +.. code:: ipython3 + + figure(figsize=(12,6)) + pcolorcells(topo.X, topo.Y, topo.Z, cmap=cmap, norm=norm) + colorbar(extend='both') + gca().set_aspect(1./cos(48*pi/180.)) + + + +.. image:: MarchingFront/output_16_0.png + + +This plot shows that there is a region with elevation below MHW (0 in +the DEM) where the Google Earth image shows wetland that should not be +initialized as a lake. This problem is discussed in :ref:`force_dry`. + +Here we show how to choose only the DEM points that are close to the +shore and/or below a given elevation. + +.. _mf-find-Zlow: + +Finding all points below a given elevation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +First we choose all points with elevation below 15 m and that are +connected to the coast over this topography extent. Note the latter +requirement will eliminate the low lying area at the bottom of the +figure above near longitude -122.4 (which is connected to the coast +through Cultus Bay, but not by points in this extent). + +.. code:: ipython3 + + pts_chosen = marching_front.select_by_flooding(topo.Z, Z1=0, Z2=15., max_iters=None) + + +.. parsed-literal:: + + Selecting points with Z1 = 0, Z2 = 15, max_iters=279936 + Done after 183 iterations with 89871 points chosen + + +.. code:: ipython3 + + Zmasked = ma.masked_array(topo.Z, logical_not(pts_chosen)) + + figure(figsize=(12,6)) + pcolorcells(topo.X, topo.Y, Zmasked, cmap=cmap, norm=norm) + colorbar(extend='both') + gca().set_aspect(1./cos(48*pi/180.)) + + + +.. image:: MarchingFront/output_22_0.png + + +Create a buffer zone along shore +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To select more points along the shore where the topography is steep, we +could have first used `max_iters`. + +To illustrate this, we start again and fist use `max_iters = 20` so +that at least 20 grid points are selected near the coast, also setting +`Z2 = 1e6` (a huge value) so that the arbitrarily high regions will be +included if they are within 20 points of the coast: + +.. code:: ipython3 + + pts_chosen = marching_front.select_by_flooding(topo.Z, Z1=0, Z2=1e6, max_iters=20) + + +.. parsed-literal:: + + Selecting points with Z1 = 0, Z2 = 1e+06, max_iters=20 + Done after 20 iterations with 84800 points chosen + + +Plot what we have so far: + +.. code:: ipython3 + + Zmasked = ma.masked_array(topo.Z, logical_not(pts_chosen)) + + figure(figsize=(12,6)) + pcolorcells(topo.X, topo.Y, Zmasked, cmap=cmap, norm=norm) + colorbar(extend='both') + gca().set_aspect(1./cos(48*pi/180.)) + + + +.. image:: MarchingFront/output_27_0.png + + +Then we augment the points already chosen with any points below 15 m and +connected to the coast: + +.. code:: ipython3 + + pts_chosen = marching_front.select_by_flooding(topo.Z, Z1=0, Z2=15., + prev_pts_chosen=pts_chosen, + max_iters=None) + + +.. parsed-literal:: + + Selecting points with Z1 = 0, Z2 = 15, max_iters=279936 + Done after 163 iterations with 94297 points chosen + + +.. code:: ipython3 + + Zmasked = ma.masked_array(topo.Z, logical_not(pts_chosen)) + + figure(figsize=(12,6)) + pcolorcells(topo.X, topo.Y, Zmasked, cmap=cmap, norm=norm) + colorbar(extend='both') + gca().set_aspect(1./cos(48*pi/180.)) + + + +.. image:: MarchingFront/output_30_0.png + + +.. _mf-find-nearshore: + +Choose points only near shore +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +We can set `Z1 = 0` and `Z2 = -15` to select points that have +elevation *greater than* -15 m and are connected to the coast: + +.. code:: ipython3 + + pts_chosen_shallow = marching_front.select_by_flooding(topo.Z, Z1=0, Z2=-15., max_iters=None) + + +.. parsed-literal:: + + Selecting points with Z1 = 0, Z2 = -15, max_iters=279936 + Done after 177 iterations with 249577 points chosen + + +.. code:: ipython3 + + Zshallow = ma.masked_array(topo.Z, logical_not(pts_chosen_shallow)) + + figure(figsize=(12,6)) + pcolorcells(topo.X, topo.Y, Zshallow, cmap=cmap, norm=norm) + colorbar(extend='both') + gca().set_aspect(1./cos(48*pi/180.)) + + + +.. image:: MarchingFront/output_34_0.png + + +Note that this chooses *all* onshore points in addition to offshore +points with elevation greater than -15 m. + +We can take the intersection of this set of points with the onshore +points previously chosen to get only the points that lie near the coast: + +.. code:: ipython3 + + pts_chosen_nearshore = logical_and(pts_chosen, pts_chosen_shallow) + Znearshore = ma.masked_array(topo.Z, logical_not(pts_chosen_nearshore)) + + figure(figsize=(12,6)) + pcolorcells(topo.X, topo.Y, Znearshore, cmap=cmap, norm=norm) + colorbar(extend='both') + gca().set_aspect(1./cos(48*pi/180.)) + + + +.. image:: MarchingFront/output_37_0.png + + +.. _mf-fgmax-file: + +Write out the masked array indicating fgmax points +-------------------------------------------------- + +One we have selected the desired fgmax points, these can be output in +the style of a `topo_type=3` topography file, with a header followed +point values at all points on a uniform grid. The values are simply the +integer 1 for points that should be used as fgmax points and 0 for other +points. Note that format `%1i` is used for compactness. + +.. code:: ipython3 + + fname_fgmax_mask = 'fgmax_pts_topostyle.data' + topo_fgmax_mask = topotools.Topography() + topo_fgmax_mask._x = topo.x + topo_fgmax_mask._y = topo.y + topo_fgmax_mask._Z = where(pts_chosen_nearshore, 1, 0) # change boolean to 1/0 + topo_fgmax_mask.generate_2d_coordinates() + + topo_fgmax_mask.write(fname_fgmax_mask, topo_type=3, Z_format='%1i') + print('Created %s' % fname_fgmax_mask) + + +.. parsed-literal:: + + Created fgmax_pts_topostyle.data + + +This file `fgmax_pts_topostyle.data` can then be read into GeoClaw, +using the new capability of specifying fgmax grids in this manner, using +`point_style == 4` as described in +:ref:`fgmax`. + +.. _mf-amr-flag: + +Creating an AMR flag region +--------------------------- + +Once a set of points has been selected, it can be used to define a ruled +rectangle that might be used as an adaptive mesh refinement flag region, +for example. See :ref:`ruled_rectangles` and :ref:`flagregions`. + +You might want to try both `ixy = 'x'` and `ixy = 'y'` in creating +the ruled rectangle to see which one covers fewer non-selected points. +In this case `ixy = 'x'` is better: + +.. code:: ipython3 + + figure(figsize=(12,5)) + subplot(121) + + rr = region_tools.ruledrectangle_covering_selected_points(topo.X, topo.Y, pts_chosen_nearshore, + ixy='x', method=0, + padding=0, verbose=True) + xv,yv = rr.vertices() + pcolorcells(topo.X, topo.Y, Znearshore, cmap=cmap, norm=norm) + axis([-122.47, -122.40, 47.925, 47.965]) + gca().set_aspect(1./cos(48*pi/180.)) + plot(xv, yv, 'r') + title("With ixy = 'x'") + + subplot(122) + rr = region_tools.ruledrectangle_covering_selected_points(topo.X, topo.Y, pts_chosen_nearshore, + ixy='y', method=0, + padding=0, verbose=True) + xv,yv = rr.vertices() + pcolorcells(topo.X, topo.Y, Znearshore, cmap=cmap, norm=norm) + axis([-122.47, -122.40, 47.925, 47.965]) + gca().set_aspect(1./cos(48*pi/180.)) + plot(xv, yv, 'r') + title("With ixy = 'y'") + + +.. parsed-literal:: + + Extending rectangles to cover grid cells + RuledRectangle covers 69788 grid points + Extending rectangles to cover grid cells + RuledRectangle covers 76005 grid points + + + + +.. image:: MarchingFront/output_42_2.png + + +.. _mf-dry: + +Determining dry areas below MHW +------------------------------- + +Note the blue region in the above plot that is inland from the coast and +behind a green barrier. Examining Google Earth shows that this is +wetland area that probably should not be initialized as a lake. We can +identify this by using the marching front algorithm to start at +`Z1 = -5` m and fill in up to `Z2 = 0` (MHW). + +.. code:: ipython3 + + wet_points = marching_front.select_by_flooding(topo.Z, Z1=-5., Z2=0., max_iters=None) + + +.. parsed-literal:: + + Selecting points with Z1 = -5, Z2 = 0, max_iters=279936 + Done after 112 iterations with 59775 points chosen + + +.. code:: ipython3 + + Zdry = ma.masked_array(topo.Z, wet_points) + + figure(figsize=(12,6)) + pcolorcells(topo.X, topo.Y, Zdry, cmap=cmap, norm=norm) + colorbar(extend='both') + gca().set_aspect(1./cos(48*pi/180.)) + title('Dry land'); + + +.. image:: MarchingFront/output_46_1.png + + +Now the blue region above is properly identified as being dry land. + +See :ref:`force_dry` for more +discussion of this example, showing how to create an array for +GeoClaw in order to indicate that this region should be initialized as dry in +spite of being below MHW. + diff --git a/v5.10.x/_sources/matlab_plotting.rst.txt b/v5.10.x/_sources/matlab_plotting.rst.txt new file mode 100644 index 0000000000..07127dd388 --- /dev/null +++ b/v5.10.x/_sources/matlab_plotting.rst.txt @@ -0,0 +1,322 @@ + +.. _matlabplots: + +*************************************** +Plotting using Matlab +*************************************** + +.. _Matlab: http://www.mathworks.com + +Before version 4.3, Clawpack used `Matlab`_ (Mathworks, Inc.) for plotting and visualizing +results of simulations. For this purpose, an extensive set of plotting +tools were developed. These are still available in +`$CLAW/visclaw/src/matlab`. The user interface for these routines is +essentially unchanged from the previous versions, although several new +features have been added. + + +These graphics tools extend standard +Matlab plotting routines by allowing for easy plotting of both 2d and +3d adaptively refined mesh data produced from AMRClaw and solutions on +2d manifolds, produced from either single grid Clawpack, or AMRClaw. +In each of these cases, the user can easily +switch on or off the plotting of grid lines (on a per-level basis), +contour lines, isosurfaces, and AMR patch borders, cubes and other +graphical items. In 3d, the user can create a custom set of slices, +and then loop through the slices in the x,y or z directions. All +visualization assumes finite volume data, and individual plot +"patches" use cell-averaged values to color mesh cells directly. No +graphical interpolation is done when mapping to the colormap. + +.. _setting_up_matlab: + +The Matlab search path +---------------------- +To use the Matlab plotting tools with Clawpack, the user will need to +first be sure that the necessary Matlab routines are on the Matlab +search path. This can be done by explicitly setting the MATLABPATH +environment variable. In bash, this is done via + + $ export MATLABPATH ${CLAW}/visclaw/src/matlab + +Alternatively, one can permanently add this directory to the Matlab search path +using the Matlab "pathtool" command:: + + >> pathtool + +.. _create_output_for_matlab: + +Creating output files +--------------------- +To visualize Clawpack output using the Matlab plotting routines, first +produce output files from an example using:: + + $ make .output + +This will build the appropriate Clawpack executable, create necessary input files +for the executable, and +finally run the executable to create output files. These output files +are stored by default in the directory '_output'. + +.. _plotclaw: + +The plotclaw command +-------------------- +Once output files, e.g. 'fort.q0000', 'fort.q0001', and so on, and +corresponding fort.t0000' or 'fort.t0001' files have been created, the +user can plot them in Matlab by entering one of +the following commands (depending on whether the output is one, +two or three dimensional) at the Matlab prompt:: + + >> plotclaw1 + +or:: + + >> plotclaw2 + +or:: + + >> plotclaw3 + +Initially, the user is prompted to run a file `setplot`_. For +example:: + + >> plotclaw2 + + plotclaw2 plots 2d results from clawpack or amrclaw + Execute setplot2 (default = yes)? + +The setplot file sets various parameters in the base workspace needed +to create the plot (see below for more details on this file). +Entering [enter] at this prompt will run the file. + +Successively hitting [enter] steps through and plots data from each of +the fort files in order. In one and two dimensions, this plotting +prompt is:: + + Frame 2 at time t = 0.2 + Hit for next plot, or type k, r, rr, j, i, q, or ? + +In three dimensions, one can optionally step through user defined slices of data by entering +'x', 'y' or 'z' at the command prompt:: + + Frame 1 at time t = 0.0625 + Hit for next plot, or type k, r, rr, j, i, x, y, z, q, or ? + +A description of the plot prompt options is given by entering '?':: + + Frame 2 at time t = 0.2 + Hit for next plot, or type k, r, rr, j, i, q, or ? ? + k -- keyboard input. Type any commands and then "return" + r -- redraw current frame, without re-reading data + rr -- re-read current file,and redraw frame + j -- jump to a particular frame + i -- info about parameters and solution + x -- loop over slices in x direction (3d only) + y -- loop over slices in y direction (3d only) + z -- loop over slices in z direction (3d only) + q -- quit + +After the graphics routines have created the plot, but before the user +is returned to the plot prompt, a file `afterframe`_ is called. This +file contains user commands to set various plot properties. See below +for more details on what the user might wish to include in this file. + +.. _matlab_setplot: + +The setplot file +---------------- +The properties of the Matlab plot are controlled through two main +user-defined files located, typically, in the current working +directory. The first of these files, the 'setplot' file (e.g. setplot1.m, setplot2.m or +setplot3.m) control basic plot properties that must be known before the plot is created. +Such properties include + + * component of q to plot, (.e.g. rho=1, rhou=2, rhov=3 and so on). + * a user defined quantity (e.g. pressure or velocity) to plot, + * the maximum number of frames to plot + * the location of the output files + * the line type or symbol type for 1d plots or scatter plots. Different symbols or line types can be specified for each AMR level. + * the plot type, e.g. a pseudo-color plot, a Schlieren type plot or a scatter plot. + * grid mappings for mapped grids or manifold calculations, + * user defined slices through the data (3d data) + * isosurface properties (3d plots) + +A typical setplot file might contain the following parameter settings:: + + % ----------------------------------------------- + % file: setplot2.m (not all parameters are shown) + % ----------------------------------------------- + OutputDir = '_output'; + PlotType = 1; % Create a pseudo-color plot + mq = 1; % which component of q to plot + UserVariable = 0; % set to 1 to specify a user-defined variable + UserVariableFile = ' '; % name of m-file mapping data to q + MappedGrid = 0; % set to 1 if mapc2p.m exists for nonuniform grid + MaxFrames = 1000; % max number of frames to loop over + MaxLevels = 6; % max number of AMR levels + ... + +One of the main uses of the 'keyboard' option described in the `plotclaw`_ section is to +allow the user to temporarily change the value of plotting parameters set in the setplot file. + +To ensure that the required set of variables is defined, the user is encouraged to +create and modify a local copy of setplot1.m, setplot2.m or setplot3.m found in +'${CLAW}visclaw/src/matlab'. + +To get more help on what types of settings can be specified in the setplot file, +enter the following command:: + + >> help setplot + +Each of the examples in Clawpack include a 'setplot' file which you +can browse to get an idea as to what can be put in the file. + +.. _afterframe: + +The afterframe file +------------------- +The 'afterframe.m' script is the second file which control aspects of the +plot and is called after the plot has been created. The following are +commonly set in the afterframe file: + + * set axis limits and scaling + * add a 1d reference solution (1d plots and scatter plots) + * print out the current frame to a png, jpg or other graphics format file. + * add, show or hide contour lines on slices (2d/3d) + * show or hide AMR patch and cube borders (2d/3d) + * modify the colormap (2d/3d) + * set the color axis (2d/3d) + * show or hide grid lines on different AMR levels (2d/3d) + * add lighting to isosurfaces (3d) + * hide or show isosurfaces (3d) + * show or hide slices (3d) + +A typical 'afterframe' file might contain the following commands:: + + % ----------------------------------------------- + % file: afterframe.m + % ----------------------------------------------- + axis([-1 1 -1 1]); % Set the axis limits + daspect([1 1 1]); % Set the aspect ratio + + colormap(jet); + + showpatchborders; % Show outlines of AMR patch borders + showgridlines(1:2); % Show gridlines on level 1 and 2 grids + + cv = linspace(-1,1,21); % Values for contour levels + cv(cv == 0) = []; + drawcontourlines(cv); % add contour lines to a plot + + caxis([-1 1]); % Set the color axis + + shg; % Bring figure window to the front + + fstr = framename(Frame,'frame0000','png','_plots'); + print('-dpng',fstr); % Create .png file of figure. + + clear afterframe; + +The final 'clear' statement is added so that any modifications that +the user makes to the afterframe file while stepping through plot +frames will take effect immediately. + +When plotting results from AMR runs, the user can also create an +'aftergrid.m' file. This file will be called after each individual +grid of data is plotted. + +The user is encouraged to browse the 'afterframe.m' file available +with each Clawpack example to get a better idea as to what one might +include in this file. + +.. _matlab_help: + +Getting help +----------------------------------- +To get help on any of the topics available in the Matlab graphics tools, you can always issue +the command:: + + >> help clawgraphics + +at the Matlab prompt. This will bring up a list of topics which you can get further help on. + +.. _base_variables: + +Trouble shooting +---------------- +Below are a few potential problems one can run into with the Matlab plotting routines. + + +Output files not found +`````````````````````` +The following error message indicates that the output files have not been found:: + + Hit for next plot, or type k, r, rr, j, i, x, y, z, q, or ? + + Frame 2 (./fort.t0002) does not exist *** + + + Frame 2(ascii) does not exist *** + +Be sure to check that that the variable 'OutputDir', set in the setplot file, points to +the proper location of the output files that you wish to plot. +Second, double check that you actually have fort.[t/q]XXXX files in that directory. + +MaxFrames not set +````````````````` +The error message below most likely means that a 'setplot' script +containing a definition for MaxFrames was not run:: + + >> plotclaw2 + + plotclaw2 plots 2d results from clawpack or amrclaw + Execute setplot2 (default = yes)? no + + MaxFrames parameter not set... you may need to execute setplot2 + +To correct this problem, the user should make sure that they have +local copy of a setplot file in their working directory, that it +defines the required set of variables and that it is run at least once before +the plotclaw command. + +Switching examples +`````````````````` +The graphics are controlled to a large extent using variables that are +set in the Matlab base workspace. This can lead to unpredictable results +when switching between Clawpack examples. + +To illustrate what can go wrong, suppose one sets:: + + MappedGrid = 1; % assumes that mapc2p file exists + +in the setplot file for one example, and then switches to a second +example which is not a simulation on a mapped grid. If the variable +'MappedGrid' is not explicitly set to zero in the setplot file for the +second example, the Matlab routines will look for a grid mapping file +'mapc2p.m' which may not be found for the second example. + +To avoid such potential clashes of variables, the +user is strongly encouraged to enter the command:: + + >> clear all; + +before switching examples. This will clear the base workspace of +all plotting parameters and avoid potential conflicts in base variable settings. + +The user is also encouraged to issue a command:: + + >> close all + +in situations where the one example explicitly sets plotting features such as a colormap, +or axes scaling that are not overridden by subsequent plot commands. + +.. _matlab_gallery: + +Matlab Gallery +-------------- +The interested user is encouraged to browse the `Matlab Gallery`_ for +examples of the types of plots that can be created with the Clawpack Matlab +plotting routines. + +.. _Matlab Gallery: http://math.boisestate.edu/~calhoun/visclaw/matlab_gallery/test_graphics/index.html diff --git a/v5.10.x/_sources/nearshore_interp.rst.txt b/v5.10.x/_sources/nearshore_interp.rst.txt new file mode 100644 index 0000000000..8e0de46171 --- /dev/null +++ b/v5.10.x/_sources/nearshore_interp.rst.txt @@ -0,0 +1,62 @@ + +.. _nearshore_interp: + +======================= +Nearshore interpolation +======================= + +Several Fortran routines in GeoClaw interpolate from the computational grids +to other specified points where output is desired +(typically using the finest AMR resolution available nearby at each desired +output time). This includes: + +- Gauge output (time series at specified locations), see :ref:`gauges`, +- `fgmax grids` (maximum of various quantities over the entire simulation at + specified locations), see :ref:`fgmax`, +- `fgout grids` (output of various quantities on a fixed spatial grid at a + sequence of times), see :ref:`fgout`. + +If the specified location is exactly at the center of a computational cell +at the finest AMR level present, then the value output is simply that cell +value (which in a finite volume method is really a cell average of the +quantity over the cell, but approximates the cell center value to +:math:`O(\Delta x^2)` if the quantity is smoothly varying. + +In general, however, the specified points may not lie at cell centers. In +all the cases listed above, the default behavior is to use "zero-order +extrapolation" to determine the value at the point, meaning that the value +throughout each computational cell is approximated by a constant function +(zero degree polynomial) with value equal to the cell average. Hence the +value that is output at any specified point is simply the cell average of +the (finest level) grid cell that the point lies within. + +One might think that a better approximation to the value at a point could be +obtained by using piecewise bilinear approximation (in two +dimensions): Determine what set of four grid centers the point lies within +and construct the bilinear function :math:`a_0 + a_1x + a_2y + a_3xy` +that interpolates at these four points, and then evaluate the bilinear +interpolant at the point of interest. If the function being approximated +were smooth then this would be expected to provide an :math:`O(\Delta x^2)` +approximation, whereas zero-order extrapolation is only :math:`O(\Delta x)` +accurate. + +For GeoClaw simulations, however, we have found that it is best to use +zero-order extrapolation because piecewise bilinear interpolation can cause +problems and misleading results near the coastline, which is often the +region of greatest interest. + +The problem is that interpolating the fluid depth `h` and the topography `B` +separately and then computing the surface elevation `eta` by adding these +may give unrealistic high values. For example if one cell has topo `B = -2` +and `h = 6` (so `eta = B+h = 4`) and the neighboring cell has `B = 50` +and `h = 0`, so that `eta = B+h = 50`. In the latter case, the elevation +`eta` is simply the elevation of the land and this point is not wet, as +indicated by the fact that `h=0`. But now if we use linear interpolation +(in 1D for this simple example) to the midpoint between these points, +interpolating the topography gives +`B = 24` and interpolating the depth gives `h = 3`. +Hence we compute `eta = B+h = 27` as the surface elevation. +Since the point is apparently wet (`h > 0`), one might conclude that the sea +surface at this point is 27 meters above the initial sea level, whereas in +fact the sea level is never more than 6 meters above sea level. + diff --git a/v5.10.x/_sources/netcdf.rst.txt b/v5.10.x/_sources/netcdf.rst.txt new file mode 100644 index 0000000000..fdcb9afe2a --- /dev/null +++ b/v5.10.x/_sources/netcdf.rst.txt @@ -0,0 +1,12 @@ +:orphan: + +.. _netcdf: + +.. seealso:: :ref:`topo_netcdf`. + +========================== +Using NetCDF output +========================== + +NetCDF output is not currently supported in Clawpack. This is not a suitable +format for AMR style data. diff --git a/v5.10.x/_sources/newapp.rst.txt b/v5.10.x/_sources/newapp.rst.txt new file mode 100644 index 0000000000..673c2d658c --- /dev/null +++ b/v5.10.x/_sources/newapp.rst.txt @@ -0,0 +1,29 @@ + +.. _newapp: + + +************************************* +Creating a new application directory +************************************* + +.. _copyex: + +Copying an existing example +--------------------------- + + +The simplest approach to implementing something new is to start with a +Clawpack example and modify the code appropriately. + + +Rather than modifying one of the examples in place, it is best to copy it to +a new directory. Clawpack should work fine +from any directory as long as the environment variable is set properly. +(See :ref:`setenv`.) + +In unix/linux you can copy a directory recursively (with all subdirectories +intact) using the *cp -r* command, e.g. :: + + $ cp -r $CLAW/classic/examples/acoustics_1d_example1 path/to/newdir + + diff --git a/v5.10.x/_sources/okada.rst.txt b/v5.10.x/_sources/okada.rst.txt new file mode 100644 index 0000000000..5b17eab8bb --- /dev/null +++ b/v5.10.x/_sources/okada.rst.txt @@ -0,0 +1,235 @@ + +.. _okada: + +===================================================== +Earthquake sources: Fault slip and the Okada model +===================================================== + +To initiate a tsunami from an earthquake, it is necessary to generate a model of +how the seafloor moves, which is generally specified in a *dtopo* file as +described in :ref:`topo_dtopo`. This is often done by starting with a +description of an earthquake fault, broken up into a collection of +subfaults, with various parameters defined on each subfault. A seismic +modeling code would take these parameters and compute the elastic waves +generated in the earth as a result. However, for tsunami modeling all we need +to know is the motion of the seafloor, which is one boundary of the seismic +domain. Moreover the high-frequency ground motions during the earthquake +have little impact on the resulting tsunami. For these reasons it is often +sufficient to use the "Okada model" described below, which gives the final +deformation of the sea floor due to specified slip on each subfault. + +The Jupyter notebook `$CLAW/apps/notebooks/geoclaw/Okada.ipynb` +illustrates how the Okada model works and how to generate the seafloor +deformation needed in GeoClaw using this model. + + +The Python module `$CLAW/geoclaw/src/python/geoclaw/dtopotools.py` +provides tools to convert a file specifying a collection of subfaults +into a *dtopofile* by applying the Okada model to each subfault and adding +the results together (valid by linear superposition of the solutions to the +linear elastic halfspace problems). +See :ref:`dtopotools_module` for more documentation and illustrations. + +.. _okada_slip: + +Fault slip on rectangular subfaults +----------------------------------- + +For historic earthquakes, it is generally possible to find many different +models for the distribution of slip on one or more fault planes, +see for example the pointers at :ref:`tsunamidata_sources`. + +An earthquake subfault model is typically given in the form of a set of +*rectangular patches* on the fault plane. +Each patch has a set of parameters defining the relative slip of rock on one +side of the planar patch to slip on the other side. The minimum set of +parameters required is: + +* *length* and *width* of the fault plane (typically in m or km), +* *latitude* and *longitude* of some point on the fault plane, typically + either the centroid or the center of the top (shallowest edge), +* *depth* of the specified point below the sea floor, +* *strike*, the orientation of the top edge, measured in degrees + clockwise from North. Between 0 and 360. The fault plane dips downward + to the right when moving along the top edge in the strike direction. +* *dip*, angle at which the plane dips downward from the top edge, a + positive angle between 0 and 90 degrees. +* *rake*, the angle in the fault plane in which the slip occurs, + measured in degrees counterclockwise from the strike direction. + Between -180 and 180. +* *slip > 0*, the distance (typically in cm or m) the hanging block moves + relative to the foot block, in the direction specified by the rake. + The "hanging block" is the one above the dipping fault plane (or to the + right if you move in the strike direction). + +Note that for a strike-slip earthquake, *rake* is near 0 or 180. +For a subduction earthquake, the rake is usually closer to 90 degrees. + +For kinematic (time-dependent) rupture, it is also necessary to specify the +`rupture_time` and `rise_time` of each subfault, as discussed below. + +A fault can be specified in GeoClaw as an instance of the +`dtopotools.Fault` class, instatiated e.g. by:: + + from clawpack.geoclaw import dtopotools + fault = dtopotools.Fault() + +Then set `fault.subfaults` to a list of subfaults as instances of the class +`dtopotools.SubFault`. Each subfault has attributes corresponding to the +parameters listed above. In addition, `coordinate_specification` should be +set for each subfault to one of: + + +- "bottom center": (longitude,latitude) and depth at bottom center +- "top center": (longitude,latitude) and depth at top center +- "centroid": (longitude,latitude) and depth at centroid of plane +- "noaa sift": (longitude,latitude) at bottom center, depth at top, + This mixed convention is used by the NOAA SIFT + database and "unit sources", see: + http://nctr.pmel.noaa.gov/propagation-database.html. +- "top upstrike corner": (longitude,latitude) and depth at + corner of fault that is both updip and upstrike. + +For example, a simple single-subfault model of the 2010 Chile event can be +specified by:: + + + subfault = dtopotools.SubFault() + subfault.length = 450.e3 # meters + subfault.width = 100.e3 # meters + subfault.depth = 35.e3 # meters + subfault.strike = 16. # degrees + subfault.slip = 15. # degrees + subfault.rake = 104. # degrees + subfault.dip = 14. # degrees + subfault.longitude = -72.668 # degrees + subfault.latitude = -35.826 # degrees + subfault.coordinate_specification = "top center" + + fault = dtopotools.Fault() + fault.subfaults = [subfault] + + +Starting in Version 5.5.0, it is also possible to specify a set of +*triangular* subfault patches rather than rectangles. Doing so requires +a different set of parameters, as described below in +:ref:`okada_triangular`. + +Once the subfaults have been specified, the function +`fault.create_dtopography` can be used to create a +`dtopotools.DTopography` object, and then written out as a dtopofile for use +in GeoClaw, e.g.:: + + x,y = fault.create_dtopo_xy(dx=1/60., buffer_size=2.0) + fault.create_dtopography(x,y,times=[1.]) + dtopo = fault.dtopo + fault.rupture_type = 'static' + dtopo.write('chile_dtopo.tt3', dtopo_type=3) + +This will create a file `chile_dtopo.tt3` that can be used as a +dtopofile in GeoClaw. It will cover a region `buffer_size = 2.0` +degrees larger on each side than the surface projection of the +rectangular fault, with a resolution of one arcminute (`dx = 1/60.` degree). + +In addition to `dtopotools.Fault`, the `dtopotools` has several other +derived classes that simplify setting up a fault from a specified set of +subfaults: + +- `CSVFault`: reads in subfaults from a csv file with header, +- `SiftFault`: sets up a fault based on the NOAA SIFT unit sources, see + http://nctr.pmel.noaa.gov/propagation-database.html, +- `UCSBFault`: reads in subfaults in UCSB format, +- `SegmentedPlaneFault`: Take a single fault plane and subdivides it into + recangles, to allow specifying different subfault parameters on each. + +See :ref:`dtopotools_module` for more details, and the Jupyter notebook +`$CLAW/apps/notebooks/geoclaw/dtopotools_examples.ipynb` for more examples. + +.. _okada_model: + +Okada model +----------- + +The slip on the fault plane(s) must be translated into seafloor deformation. +This is often done using the "Okada model", which is derived from +a Green's function solution to the elastic half space problem, following +[Okada85]_. Uniform +displacement of the solid over a finite rectangular patch specified +using the parameters described above, when inserted in a homogeneous +elastic half space a distance *depth* below the free surface, leads +to a steady state solution in which the free surface is deformed. This +deformation is used as the seafloor deformation. Of course this is only an +approximation since the actual seafloor in rarely flat, and the actual earth +is not a homogeneous isotropic elastic material as assumed in this model. +However, it is often assumed to be a reasonable approximation for tsunami +modeling, particularly since the fault slip parameters are generally not +known very well even for historical earthquakes and so a more accurate +modeling of the resulting seafloor deformation may not be justified. + +In addition to the parameters above, the Okada model also requires an elastic +parameter, the Poisson ratio, which is usually taken to be 0.25. + + +Kinematic rupture +----------------- + +It is also possible to set a `rupture_time` and a `rise_time` for each +subfault in order to model a time-dependent rupture process. This is called +a "kinematic rupture" since the these values are specified. + +To specify a kinematic rupture, create a `dtopotools.Fault` object `fault` +with `fault.rupture_type = 'kinematic'`. +(For backward compatibility, you can also specify this as `'dynamic'`. +However, the term "dynamic rupture" often refers to modeling the +rupture process itself.) + +A kinematic rupture is **not** modeled by via modeling the seismic +waves that would be generated by the specified subfault motions. +There are seismic codes that do this, based on the same set of fault +parameters, but this is not supported directly in GeoClaw. If +desired, output from such a code could be converted by the user +into a dtopo file for use in GeoClaw. + +Once a `dtopotools.Fault` object has been created with the desired +subfaults, a `dtopotools.DTopography` object can be computed using +the `dtopotools.Fault.create_dtopography` function in GeoClaw (and +written out as a dtopo file using its `write` function.) The moving +dtopo generated in this manner is the sum of the Okada solutions +generated by each subfault, sampled at a set of specified times +`t`. For subfaults with `subfault.rupture_time > t`, no displacement +is included, while if `subfault.rupture_time + subfault.rise_time +<= t` the entire deformation due to this subfault is included, with +linear interpolation between these at intermediate times. + + +.. warning:: Starting in Version 5.5.0, the subfault parameter `rise_time` + now refers to the total rise time of a subfault, while `rise_time_starting` + is the rise time up to the break in the piecewise quadratic + function defining the rise. By default `rise_time_ending` is set equal to + `rise_time_starting`. + (In earlier versions, `rise_time` read in from csv + files, for example, was erroneously interpreted as `rise_time_starting` + is now.) See the module function `rise_fraction` in + :ref:`dtopotools_module` for more details. + +.. _okada_triangular: + +Fault slip on triangular subfaults +---------------------------------- + +Starting in Version 5.5.0, it is also possible to specify a set of +*triangular* subfault patches rather than rectangles. + +Specifying a subfault as a triangular patch rather than as a rectangle can +be done by setting `subfault.coordinate_specification = 'triangular'` and +specifying `subfault.corners` as a list of three `(x,y,depth)` tuples, along +with the `slip` and `rake`. In this case you do not set the attributes +`length`, `width`, `depth`, `strike`, or `dip`, since the corners of the +triangle are sufficient to determine this geometry. +Internally a strike direction is calculated by intersecting the plane +defined by the triangle with the ground surface, and choosing the direction +so that the plane of the triangle dips at an angle between 0 and 90 degrees +relative to the strike direction. The specified `rake` is again +interpreted as degrees counterclockwise from this strike direction. + +For an example see [need to add a notebook]. diff --git a/v5.10.x/_sources/openmp.rst.txt b/v5.10.x/_sources/openmp.rst.txt new file mode 100644 index 0000000000..192ebb41a9 --- /dev/null +++ b/v5.10.x/_sources/openmp.rst.txt @@ -0,0 +1,90 @@ + + +.. _openmp: + +************************************** +Using OpenMP +************************************** + +The Clawpack Fortran Classic 3d code, AMRClaw 2d and 3d code, +and GeoClaw codes include +OpenMP directives for making use of multicore shared memory machines. + +**Note:** Versions of gfortran before 4.6 are known to have OpenMP bugs. +You should use a recent version or a different compiler if you want to use +OpenMP. + +To invoke OpenMP you need to compile the entire code with appropriate +compiler flags (see :ref:`fortran_compilers`). For example, with gfortran +and the bash shell you could do:: + + export FFLAGS='-O2 -fopenmp' # or hardwire FFLAGS in the Makefile + make new + +in an application directory, which should recompile all of the library +routines as well. + +Then you may want to specify how many threads OpenMP should split the work +between, e.g. :: + + export OMP_NUM_THREADS=2 + +If you do not set this environment variable some default for your system +will be used. + +You may also need to increase the stack size if the code bombs for no +apparent reason (and no useful error message):: + + export OMP_STACKSIZE=16M + +and also:: + + ulimit -s unlimited + +On a Mac this isn't allowed and the best you can do is :: + + ulimit -s hard + + +To stop using OpenMP you could do:: + + export FFLAGS=-O2 # or hardwire FFLAGS in the Makefile + make new + +.. _openmp_amr: + +Using OpenMP with AMR +--------------------- + +The code in AMRClaw and GeoClaw is parallelized by splitting the list of +patches that must be advanced in time between threads, and then each grid +patch is handled by a single thread. For this reason good performance will +be seen only when there are a sufficiently large number of patches at each +level relative to the number of threads. For this reason it is recommended +that the parameter `max1d` be set to 60 in the modules + +* `$CLAW/amrclaw/src/2d/amr_module.f90` +* `$CLAW/amrclaw/src/3d/amr_module.f90` + +when OpenMP is used. This limits the size of any patch to have at most +`max1d` grid cells in each direction. If OpenMP is not used, a larger value +of `max1d` might give somewhat better performance since there is less +overhead associated with passing boundary values in ghost cells and other +per-patch work. However, this is generally negligible and `max1d=60` is the +default value set in the code. If you do change this value, remember to +recompile everything via:: + + make new + + +.. _openmp_fixedgrids: + +Fixed grid output in GeoClaw +---------------------------- + +The original fixed grid output routines are not thread safe and so OpenMP +should not be used if you want to produce output on fixed grids. + +The newer fgmax routines that keep track of maxima on fixed grids should be +thread safe, see :ref:`fgmax`. + diff --git a/v5.10.x/_sources/output_styles.rst.txt b/v5.10.x/_sources/output_styles.rst.txt new file mode 100644 index 0000000000..fc3ad9ee58 --- /dev/null +++ b/v5.10.x/_sources/output_styles.rst.txt @@ -0,0 +1,189 @@ + +.. _output_styles: + +****************************** +Output data sytles and formats +****************************** + +Output style +------------ + +In :ref:`setrun`, the style of specifying output times can be +specified by setting the parameter `output_style`. This can be illustrated +by a typical example from a `setrun.py` file:: + + + clawdata.output_style = 1 + + if clawdata.output_style==1: + # Output nout frames at equally spaced times up to tfinal: + clawdata.num_output_times = 2 + clawdata.tfinal = 2*3600. + clawdata.output_t0 = True # output at initial (or restart) time? + + elif clawdata.output_style == 2: + # Specify a list of output times. + clawdata.output_times = [0, 1800, 7200] + + elif clawdata.output_style == 3: + # Output every iout timesteps with a total of ntot time steps: + clawdata.output_step_interval = 1 + clawdata.total_steps = 3 + clawdata.output_t0 = False + +In this case setting `clawdata.output_style==1` results in outputs at times +`clawdata.t0`, 1800, and 3600 (equally spaced in time). +Setting `clawdata.output_style==2` results in outputs at times +0, 1800, and 7200 (not necessarily equally spaced). +Setting `clawdata.output_style==3` results in outputs after 1, 2, and 3 +time steps on the coarsest grid (used primarily for debugging, or in cases +where you do not want the time steps to be adjusted to hit specific output +times). + +.. _output_formats: + +Output data formats +------------------- + +In AMRClaw and GeoClaw, the format for the output data (solutions) can be +specified by setting the parameter `output_format` to `'ascii'`, +`'binary64'`, or `'binary32'`. (The single-grid +`classic` code only supports ASCII output at this time.) + +To read the solution stored in these files into Python for plotting or other +postprocessing purposes, utilities are provided that are described in +:ref:`pyclaw_io`. + +Setting `output_format = 'ascii'` gives ASCII text output. The data files +can then be viewed with any standard text editor, which is particularly +useful for debugging. However, ASCII files are generally much larger than +is necessary to store the original data in binary form, and so when grid +have many grid cells or when many output frames are saved it is often better +to use some form of binary output, see :ref:`output_binary`. + +In AMRClaw and GeoClaw, ASCII and binary output are both written +by the library routine `valout.f90`. The aux arrays are also dumped +if requested, see :ref:`output_aux`. + +.. _output_ascii: + +ASCII output data format +------------------------ + +Two output files are created at each output time (each frame). The frames +are generally numbered 0, 1, 2, etc. The two files, at frame 2, for +example, are called `fort.t0002` and `fort.q0002`. + +`fort.t0002` +************ + +This file has the typical form:: + + 0.40000000E+00 time + 1 meqn + 36 ngrids + 0 naux + 2 ndim + 2 nghost + ascii format + + +This file contains only 7 lines with information about the current time and the +number of AMR patches at this time, along with other metadata needed for +reading the AMR data properly. + +In the above example, Frame 2 contains 36 patches. +If you are using the classic code +or PyClaw with only a single patch, then `ngrids` would be 1. + +The data for all 36 patches is contained in `fort.q0002`. The data from each +patch is preceeded by a header that tells where the patch is located in the +domain, how many grid cells it contains, and what the cell size is, e.g. + +`fort.q0002` +************ + +This header has the typical form:: + + 1 grid_number + 1 AMR_level + 40 mx + 40 my + 0.00000000E+00 xlow + 0.00000000E+00 ylow + 0.25000000E-01 dx + 0.25000000E-01 dy + +This would be followed by 40*40 = 1600 lines with the data from cells (i,j). +The order they are written is (in Fortran style):: + + do j = 1,my + do i = 1,mx + write (q(i,j,m), m=1,meqn) + +Each line has `meqn` (change to `num_eqn`?) values, for the components of +the system in this grid cell. + +After the data for this patch, there would be another header for the next +patch, followed by its data, etc. + +In the header, `xlow` and `ylow` are the coordinates of the lower left +corner of the patch, `dx` and `dy` are the cell width in `x` and `y`, and +`AMR_level` is the level of refinement, where 1 is the coarsest level. +Each patch has a unique `grid_number` that usually isn't needed for +visualization purposes. + + + + +.. _output_binary: + +Raw binary output data formats +------------------------------ + +**New in v5.9.0:** Previously the user could specify `output_format='binary'` +for binary format. Starting in v5.9.0, the user can specify either +`output_format='binary64'` or `output_format='binary32'`. For backward +compatibility, the former is equivalent to specifying `output_format='binary'` +and dumps full 8-byte precision values. The new `'binary32'` option +truncates the solution values to 4-bytes before writing, cutting the file +size in half. For *most* applications, this should still give sufficient +precision for plotting purposes. + +The files for each frame are numbered as for the ASCII file and the +`fort.t0002` file, for example, is still an ASCII file with 7 lines of +metadata. There are also ASCII files such as `fort.q0002`, but these now +contain only the headers for each grid patch and not the solution on each +patch. In addition there are files such as +`fort.b0002` that contain a raw binary dump of the data from all of the +grid patches at this time, one after another. In order to decompose this +data into patches for plotting, the `fort.q0002` file must be used. + +Unlike the ASCII data files, the binary output +files contain ghost cells as well as the interior cells (since a contiguous +block of memory is dumped for each patch with a single `write` statement). + + +.. _output_netcdf: + +NetCDF output data format +------------------------------ + +NetCDF output is not currently supported in Clawpack. This is not a suitable +format for AMR style data. + +.. _output_aux: + +Output of aux arrays +--------------------- + +The contents of `aux` arrays can also be output along with each time frame. +Which components are output is controlled by the setrun variable +`clawdata.output_aux_components`, which can be `'none'` (default) or `'all'` +currently. The values, if desired, will go into files `fort.aXXXX` that +have the same format as the `q` data, as +specifed by `output_format`. Set `output_aux_onlyonce` to +`True` if the `aux` arrays do not change with time and you only want to +output these arrays once. + + diff --git a/v5.10.x/_sources/packages.rst.txt b/v5.10.x/_sources/packages.rst.txt new file mode 100644 index 0000000000..8d2a104efe --- /dev/null +++ b/v5.10.x/_sources/packages.rst.txt @@ -0,0 +1,66 @@ + +.. _clawpack_packages: + +************************************ +Which Clawpack solver should I use? +************************************ + +Clawpack includes a number of related hyperbolic PDE solvers: + + - Classic (single grid solvers in Fortran) + - :ref:`amrclaw` (adaptive mesh refinement in Fortran) + - :ref:`geoclaw` (geophysical flows with AMR, in Fortran) + - :ref:`pyclaw` (Python version of solvers) + +All of them are built on common algorithmic +ideas, make use of the same set of Riemann solvers, and can be used with VisClaw +for visualization. If you're not sure which solver to use, here you will find +the main differences between them. + + +Installation and user interface +=============================== +The :ref:`contents_fortcodes` solvers are Fortran-based +packages and rely on Makefiles and environment variables. Problems are +specified partially through Python scripts at run time (`setrun.py`) and partially +through custom Fortran code at compile time (to set initial conditions, for instance). + +With :ref:`pyclaw`, problems are specified entirely at run time through +Python script files, or +interactively (e.g., in IPython or Jupyter notebooks). +Typically, the user does not need to +write any Fortran code (though custom routines can be written in Fortran +when necessary for performance reasons). + +PyClaw uses much of the same library of Fortran code, but that code is +compiled during installation so that it can be imported dynamically within +Python programs. In particular, Fortran versions of all the :ref:`riemann` +available in Classic or AMRClaw are also exposed in PyClaw. These are +converted using `f2py `__, a step +that sometimes causes problems and is not required if you are only using +Fortran versions of the solvers. + + + +Algorithmic differences +=============================== +All of the Clawpack solvers include the *classic* algorithms described in +[LeVeque-FVMHP]_; if you only require those, it's easiest to use Classic or +:ref:`pyclaw`. Most of the packages contain additional algorithms: + + - **AMRClaw** includes block-structured adaptive mesh refinement that allows one + to use a non-uniform grid that changes in time and uses smaller grid cells + in regions with fine structure or where high accuracy is required. + - **GeoClaw** Includes the AMR capabilities of AMRClaw and also has a number + of special routines and algorithms for handling geophysical problems, including + special well-balanced, positivity-preserving shallow water solvers. + - **PyClaw** includes the :ref:`high-order WENO-RK algorithms of SharpClaw `, described in + [KetParLev13]_. + + +Parallel computing +================== +- **AMRClaw**, **GeoClaw**, and **Classic** can be run in parallel using shared memory + via OpenMP. +- **PyClaw** can be run in parallel on distributed-memory machines using MPI (through + PETSc) and has been shown to scale to tens of thousands of cores. diff --git a/v5.10.x/_sources/photos.rst.txt b/v5.10.x/_sources/photos.rst.txt new file mode 100644 index 0000000000..d1d8d687b9 --- /dev/null +++ b/v5.10.x/_sources/photos.rst.txt @@ -0,0 +1,65 @@ + +.. _photos: + +Clawpack Community Photos +========================= + +`2016 Developers' workshop at University of Washington `_ +--------------------------------------------------------------------------------------------------------------------------------- + + +.. image :: photos/Claw-Dev2016.jpg + :width: 20cm + +`2015 Developers' workshop at University of Utah `_ +--------------------------------------------------------------------------------------------------------------------------------- + + +.. image :: photos/claw-dev-group-2015.jpg + :width: 20cm + +`2014 HPC3 workshop at KAUST `_ +------------------------------------------------------------------------------------ + + +Clawpack turned 20 in 2014... Cake by Belky Ketcheson. + +.. image :: photos/HPC3-2014-group-photo.jpg + :width: 15cm +.. image :: photos/cake3.jpg + :width: 8cm + + +`2013 Claw-Dev workshop at UW `_ +-------------------------------------------------------------------------- + + +.. image :: photos/Claw-Dev2013b.jpg + :width: 10cm +.. image :: photos/Claw-Dev2013a.jpg + :width: 10cm + + +`2012 HPC3 workshop at KAUST `_ +------------------------------------------------------------------------------------ + + +.. image :: photos/HPC3-2012-group-photo.jpg + :width: 15cm + + +2011 coding sprints at UW +------------------------------- + + +.. image :: photos/Claw-Dev2011.jpg + :width: 15cm + + +2010 GeoClaw hacking UW +------------------------------- + + +.. image :: photos/Claw-Dev2010.jpg + :width: 15cm + diff --git a/v5.10.x/_sources/plotexamples.rst.txt b/v5.10.x/_sources/plotexamples.rst.txt new file mode 100644 index 0000000000..010b69c5ff --- /dev/null +++ b/v5.10.x/_sources/plotexamples.rst.txt @@ -0,0 +1,14 @@ + + +.. _plotexamples: + +************************ +Plotting examples +************************ + +See :ref:`setplot` and the examples in the :ref:`galleries`. +The code that produced each set of plots can be found in +the Clawpack directory indicated. + +If you wish to use the Matlab tools, see the :ref:`matlab_gallery`. + diff --git a/v5.10.x/_sources/plotting.rst.txt b/v5.10.x/_sources/plotting.rst.txt new file mode 100644 index 0000000000..a5631d27ec --- /dev/null +++ b/v5.10.x/_sources/plotting.rst.txt @@ -0,0 +1,82 @@ + +.. _plotting: + + +*************************************** +Plotting with Visclaw +*************************************** + +.. toctree:: + :maxdepth: 2 + + plotting_python + setplot + current_data + plotexamples + plotting_faq + geoplot + matlab_plotting + visit_plotting + + +.. _plotting_postproc: + +Plotting as post-processing +--------------------------- + +Running a Fortran version of Clawpack produces output files that can then be +read in to a graphics package as a post-processing step. If you understand +the format of the output files, you can write custom graphics routines using +your favorite visualization tools. The output formats are described in the +section :ref:`output_styles`. + +Clawpack includes utilities for plotting using Python, and most of the +documention assumes you will use these tools. See +:ref:`plotting_python` for a description of these. +The Python package `matplotlib `_ +is used under the hood for 1d and 2d plots, but the tools provided with +Clawpack simplify some common tasks since they handle looping over all grid +patches as is generally required when plotting AMR data. + +Matlab plotting tools (mostly the same as in Clawpack 4.x) are available in +Visclaw. +See :ref:`matlabplots` for pointers if you wish to use these tools. +For 3d plots the Matlab tools may still be the best choice. + +Another alternative for 3d plots (also for 2d) is to use +`VisIt `_. +See :ref:`visit_plotting`. + +Since Clawpack 4.4, a set of Python plotting tools for 1d and 2d are +the recommended approach. The advantages of using the Python options are: + + * Python and the graphics modules used in Clawpack are open source. Since + Clawpack itself is open source we find it desirable to also have an open + source plotting open for viewing the results. + + * The Python tools developed so far (mostly for 1d and 2d data sets) are + more powerful than the Matlab versions they replace, and can be used for + example to automatically generate html versions of multiple plots each + frame over all frames of a computation, to generate latex versions of the + output, as well as to step through the frames one by one as with the + Matlab tools. It is easier to specify a set of multiple plots to be + produced for each frame. + + * Matlab graphics are somewhat limited for 3d data sets, whereas several + open source visualization tools such as `VisIt` + are much better for dealing with large data sets, AMR meshes, etc. + and have Python bindings that should allow scripting in a manner + compatible with 1d and 2d. (Yet to be done.) + + * Python is a powerful language that can be scripted to perform multiple + runs, such as in a convergence test, and collect the results in tables or + plots. We are developing tools to simplify this process. + + +.. _plotting_onfly: + +Plotting on the fly +--------------------------- + +**Describe options.** + diff --git a/v5.10.x/_sources/plotting_faq.rst.txt b/v5.10.x/_sources/plotting_faq.rst.txt new file mode 100644 index 0000000000..6eef768794 --- /dev/null +++ b/v5.10.x/_sources/plotting_faq.rst.txt @@ -0,0 +1,341 @@ + + +.. _plotting_faq: + +*********************** +Plotting hints and FAQ +*********************** + +.. seealso:: + :ref:`plotting`, + :ref:`setplot`, + :ref:`plotexamples` + + +.. contents:: + +More to come! + +What's the difference between `make .plots` and `make plots` ? +------------------------------------------------------------------ + +The default Makefile configuration in Version 4.5.1 was changed to allow two +different targets ``.plots`` and ``plots``. The former creates a +hidden file ``.plots`` whose modification time is used to check dependencies. +The plotting commands will be performed again only if the output of +``setplot`` file has been changed, and will also re-run the code if it appears +that the output is out of date relative to the ``setrun`` file, for example. +If you want to create the plots without checking dependencies (and perhaps +accidentally re-running the code), use the ``make plots`` option. +``plots`` is a phony target in the default Makefile. + + + +How to plot a something other than a component of q? +---------------------------------------------------- + +Objects of class :ref:`ClawPlotItem` have an attribute ``plot_var``. If +this is set to an integer than the corresponding component of q is plotted +(remembering that Python indexing starts at 0, so ``plot_var = 0`` will +specify plotting the first component of q, for example). + +If plot_var is a function then this function is applied to applied to +:ref:`current_data` and should return the array of values to be plotted. +For an example, see :ref:`plotexample-acou-1d-6`. + +Sometimes you want to plot something other than the solution on the patch, +for example to add another feature to a plot of the solution. This can be +done via an ``afteraxes`` command, for example, which is called after all +items have been plotted on the current axes. See :ref:`ClawPlotAxes` for +details and an example. + + +How to add another curve to a plot, e.g. the true solution? +----------------------------------------------------------- + +The ``afteraxes`` attribute of a :ref:`ClawPlotAxes`` object can be specified as +either a string or a function. The string is executed (using ``exec(...)``) or +the function is called after performing +all plots on these axes (as specified by :ref:`ClawPlotItem`` objects). +This can be used to add a curve to a plot. + +For example, if the true solution to an advection equation +is known to be :math:`q(x,t) = \sin(x+t)`, this could be added to a plot as a +red curve via:: + + def add_true_solution(current_data): + from pylab import sin, plot + x = current_data.x + t = current_data.t + qtrue = sin(x+t) + plot(x, qtrue, 'r') + + plotaxes.afteraxes = add_true_solution + + +How to change the title in a plot? +---------------------------------- + +The ``title`` attribute of a :ref:`ClawPlotAxes`` object determines the title that +appears a the top of the plot. + +The ``title_with_t`` attributed determines if the time is included in this title. +If True (the default value), then "at time t = ..." is appended to the title. +The time is printed using format ``14.8f`` if ``(t>=0.001) & (t<1000.)``, +or format ``14.8e`` more generally. + +It is also possible to change the title using and afteraxes function. For +example, to create a larger title with fontsize 20 and only 4 digits in t:: + + def add_title(current_data): + from pylab import title + t = current_data.t + title("Solution at time t = %10.4e" % t, fontsize=20) + + plotaxes.afteraxes = add_title + + +How to specify ``outdir``, the directory to find ``fort.*`` files for plotting? +------------------------------------------------------------------------------- + +This is normally determined by the ``outdir`` attribute of +the :ref:`ClawPlotData` object directing the plotting. But see the next FAQ +for the option of using different directories for some plot items (e.g. to +compare results of two computations). + +If you are making a set of hardcopy plots using:: + + $ make .plots + +or + + $ make plots + + +then ``outdir`` is specified in the Makefile by setting the ``CLAW_OUTDIR`` +variable. + +If you are making plots interactively using Iplotclaw_, then you can +directly specify the ``outdir`` as a parameter, e.g.:: + + In[1]: ip=Iplotclaw(outdir="_output"); ip.plotloop() + +If you don't specify this parameter, `Iplotclaw`_ will look for a file +``.output`` in the current directory. If you created the ``fort.*`` files by +the command:: + + $ make .output + +then the output directory is set in the Makefile and the file ``.output`` +contains the path to the output directory. + +Note: If you use + + $ make output + +which does not check dependencies, this also +does not create a target file ``.output``. + + +If the file ``.output`` does not exist, ``outdir = '.'`` is used by +default, the current directory. + +Note that if you stop a calculation mid-stream using ``-C``, the file +``.output`` may not exist or be correct, since this file is written after +the execution finishes. + +How to specify a different ``outdir`` for some plot item? +------------------------------------------------------------- + +If you want one plot item on an axis to use the default ``plotdata.outdir`` +while another to take data from a different directory (in order to compare +two computations, for example), you can set the ``outdir`` +attribute of a :ref:`ClawPlotItem` directly. If you do not set it, by +default it inherits from the :ref:`ClawPlotFigure` object this item belongs +to. + +For example, you might have the following in your ``setplot`` function:: + + plotfigure = plotdata.new_plotfigure(name='compare', figno=1) + plotaxes = plotfigure.new_plotaxes() + + plotitem = plotaxes.new_plotitem(plot_type='1d_plot') + plotitem.plot_var = 0 + plotitem.plotstyle = '-o' + plotitem.color = 'b' + + plotitem = plotaxes.new_plotitem(plot_type='1d_plot') + import os + plotitem.outdir = os.path.join(os.getcwd(), '_output2') + plotitem.plot_var = 0 + plotitem.plotstyle = '-+' + plotitem.color = 'r' + +This would plot results from ``plotdata.outdir`` as blue circles and results +from ``./_output2`` as red plus signs. It's best to give the full path +name, e.g. as done here using ``os.path.join(os.getcwd(), '_output2')``. + +How to set plot parameters that are not provided as attributes of :ref:`ClawPlotItem`? +---------------------------------------------------------------------------------------- + +Some commonly used plotting parameters can be specified as an attribute of a +:ref:`ClawPlotItem``, for example:: + + plotitem = plotaxes.new_plotitem(plot_type='1d_plot') + plotitem.plot_var = 0 + plotitem.plotstyle = '-' + plotitem.color = 'b' + +specifies plotting a blue line. These attributes are used in the call to the +matplotlib ``plot`` function. The ``plot`` function has many other keyword +parameters that are not all duplicated as attributes of :ref:`ClawPlotItem``. To +change these, the ``kwargs`` attribute can be used. + +For example, to plot as above, but with a wider blue line, append the following:: + + plotitem.kwargs = {'linewidth': 2} + +If you try to specify the same keyword argument two different ways, e.g.:: + + plotitem.color = 'b' + plotitem.kwargs = {'linewidth': 2, 'color': 'r'} + +the value in ``kwargs`` takes precedence. It is the ``kwargs`` dictionary that +is actually used in the call, and the ``color`` attribute is checked only if it +has not been defined by the user in the ``kwargs`` attribute. + +How to change the size or background color of a figure? +------------------------------------------------------- + +By default, a figure is created of the default matplotlib size, with a tan +background. Any desired +keyword arguments to the matplotlib `figure `_ command can +be passed using the ``kwargs`` attributed of :ref:`ClawPlotFigure``. For +example, to create a figure that is 10 inches by 5 inches with a pink +background:: + + plotfigure = plotdata.new_plotfigure(name='pinkfig', figno=1) + plotfigure.kwargs = {'figsize': [10,5], 'facecolor': [1, .7, .7]} + +Specifying colormaps for pcolor or contourf plots +------------------------------------------------- + +The matplotlib module `matplotlib.cm` provides many colormaps that can be +acquired as follows, for example:: + + from matplotlib import cm + cmap = cm.get_cmap('Greens') + +`matplotlib.colors` provides some tools for working with colormaps, +and some additional colormaps and tools can be found in +`clawpack.visclaw.colormaps`. + +In particular, the `make_colormaps` function simplifies the creation of new +colormaps interpolating between specified colors. +For example, a colormap fading from blue to yellow to red can be created +with the command:: + + from clawpack.visclaw import colormaps + yellow_red_blue = colormaps.make_colormap({0.:'#ffff00', 0.5:[1,0,0], 1.:'b'}) + + +The argument of `make_colormaps` is a dictionary that maps values to colors, +with linear interpolation between the specified values. Each color can be +specified in various ways, e.g. in the example above blue is specified as +the matlab style 'b', yellow with an html hex string, and red with an RGB +tuple `[1,0,0]`. + +The colormap above is also predefined as +`clawpack.visclaw.colormaps.yellow_red_blue` and is used in many Clawpack +examples. + +The function +`clawpack.visclaw.colormaps.showcolors(cmap)` can be used to display a +colormap. +` + + +How to debug setplot.py? +-------------------------- + +Suppose you are working in an interactive Python shell such as ipython and +encounter the following when trying to plot with `Iplotclaw`_:: + + In [3]: ip=Iplotclaw(); ip.plotloop() + *** Error in call_setplot: Problem executing function setplot + *** Problem executing setplot in Iplotclaw + setplot = setplot.py + *** Either this file does not exist or + there is a problem executing the function setplot in this file. + *** PLOT PARAMETERS MAY NOT BE SET! *** + + Interactive plotting for Clawpack output... + + Plotting data from outdir = _output + Type ? at PLOTCLAW prompt for list of commands + + Start at which frame [default=0] ? + + +This tells you that there was some problem importing ``setplot.py``, but is not +very informative and it is hard to debug from within the +``Iplotclaw.plotloop`` +method. You may also run into this if you modify ``setplot.py`` +(inadvertantly introducing a bug) +and then use the ``resetplot`` option:: + + PLOTCLAW > resetplot + Executing setplot from setplot.py + *** Error in call_setplot: Problem executing function setplot + *** Problem re-executing setplot + PLOTCLAW > + + +If you can't spot the bug by examing ``setplot.py``, it is easiest to debug +by exiting the plotloop and doing:: + + PLOTCLAW > q + quitting... + + In [4]: import setplot + In [5]: pd = ip.plotdata + In [6]: pd = setplot.setplot(pd) + --------------------------------------------------------------------------- + AttributeError Traceback (most recent call last) + + 8 + 9 # Figure for q[0] + ---> 10 plotfigure = plotdata.new_plotfgure(name='q[0]', figno=1) + 11 + 12 # Set up for axes in this figure: + + AttributeError: 'ClawPlotData' object has no attribute 'new_plotfgure' + + +In this case, the error is that ``new_plotfigure`` is mis-spelled. + +In ipython you can also easily turn on the Python debugger pdb:: + + In [9]: pdb + Automatic pdb calling has been turned ON + + In [10]: pd = setplot.setplot(pd) + --------------------------------------------------------------------------- + AttributeError Traceback (most recent call last) + 8 + 9 # Figure for q[0] + ---> 10 plotfigure = plotdata.new_plotfgure(name='q[0]', figno=1) + 11 + 12 # Set up for axes in this figure: + + AttributeError: 'ClawPlotData' object has no attribute 'new_plotfgure' + + ipdb> + +For more complicated debugging you could now explore the current state using +any pdb commands, described in the `documentation +`_. See also +the `ipython documentation +`_. + + diff --git a/v5.10.x/_sources/plotting_geoclaw.rst.txt b/v5.10.x/_sources/plotting_geoclaw.rst.txt new file mode 100644 index 0000000000..fe76bcc932 --- /dev/null +++ b/v5.10.x/_sources/plotting_geoclaw.rst.txt @@ -0,0 +1,22 @@ + +.. _plotting_geoclaw: + +*************************************** +Plotting routines for GeoClaw +*************************************** + +See :ref:`plotting` for general information about plotting Clawpack results. +GeoClaw results can be viewed using these same tools. Some addition +functions and useful colormaps are available in the visclaw module +`geoplot`. + +In particular, the following functions are useful to specify as *plot_var* +attributes of a :ref:`ClawPlotItem`: + + topo, land, depth, surface, surface_or_depth + +The function *plot_topo_file* is useful for plotting the topography in a +file of the type described in :ref:`topo`. + +See the module for more documentation, found in the file +`$CLAW/visclaw/src/python/visclaw/geoplot.py`. diff --git a/v5.10.x/_sources/plotting_python.rst.txt b/v5.10.x/_sources/plotting_python.rst.txt new file mode 100644 index 0000000000..fecc1016b1 --- /dev/null +++ b/v5.10.x/_sources/plotting_python.rst.txt @@ -0,0 +1,249 @@ + +.. _plotting_python: + +*************************************** +Plotting options in Python +*************************************** + + +Clawpack includes utilities for plotting using Python. Most of these +are defined in the `clawpack.visclaw` module. +In order to use these you will need to insure that you have the required +modules installed (see :ref:`python-install`). + +See :ref:`python` for more information on Python and pointers to many tutorials. + +.. plotting_makeplots: + +Producing html plots from the command line +========================================== + + +In most Clawpack directories, typing:: + + $ make .plots + +will compile the code and run it (if necessary) and then +produce a set of html files that can be +used to view the resulting plots. These will be in a subdirectory +of the current directory as specified by PLOTDIR in the Makefile. + + + +Producing a latex file with plots from the command line +======================================================= + +A latex file with all the plots can also be produced by :ref:`printframes`, +and is also typically controlled by options set in the file setplot.py. + +Setting plot parameters with a setplot function +=============================================== + +Typically each applications directory contains a file :file:`setplot.py`, see for +example :ref:`plotexamples`. +This file should define a function `setplot(plotdata)` that sets various +attributes of an object plotdata of class :ref:`ClawPlotData`. + +Documentation on how to create a setplot function and the various plotting +parameters that can be set can be found in the section :ref:`setplot`. + +Examples can be found at :ref:`plotexamples`. + +.. _plotting_Iplotclaw: + +Interactive plotting with `Iplotclaw` +======================================= + +For interactive plotting we suggest using `IPython +`_, which is a nicer shell +than the pure python shell, with things like command completion and history. + + +Here's an example:: + + $ ipython + In [1]: from clawpack.visclaw.Iplotclaw import Iplotclaw + In [2]: ip = Iplotclaw() + In [3]: ip.plotloop() + Executing setplot ... + + Interactive plotclaw with ndim = 1 ... + Type ? at PLOTCLAW prompt for list of commands + + Start at which frame [default=0] ? + Plotting frame 0 ... + PLOTCLAW > n + Plotting frame 1 ... + PLOTCLAW > q + quitting... + In [4]: + +Type `?` at the PLOTCLAW prompt or `?command-name` for more +information. Most commonly used are n for next frame, p for previous frame +and j to jump to a different frame. Hitting return at the prompt repeats +the previous command. + +You can restart the plotloop later by doing:: + + In [4]: ip.plotloop() + + Interactive plotclaw with ndim = 1 ... + Type ? at PLOTCLAW prompt for list of commands + + Start at which frame [default=1] ? + Replot data for frame 1 [no] ? + PLOTCLAW > + + +By default it starts at the frame where you previously left off. + +If you want to change plot parameters, the easiest way is to edit the file +setplot.py, either in a different window or, if you use vi, by:: + + PLOTCLAW > vi setplot.py + +and then re-execute the setplot function using:: + + PLOTCLAW > resetplot + +If you recompute results by running the fortran code again and want to plot +the new results (from this same directory), you may have to clear the frames +that have already been viewed using:: + + PLOTCLAW > clearframes + +Or you can redraw the frame you're currently looking at without clearing the +rest of the cached frame data by doing:: + + PLOTCLAW > rr + +To see what figures, axes, and items have been defined by *setplot*:: + + PLOTCLAW > show + + Current plot figures, axes, and items: + --------------------------------------- + figname = Pressure, figno = 1 + axesname = AXES1, axescmd = subplot(1,1,1) + itemname = ITEM1, plot_type = 1d_plot + + figname = Velocity, figno = 2 + axesname = AXES1, axescmd = subplot(1,1,1) + itemname = ITEM1, plot_type = 1d_plot + + + +Type "help" or "help command-name" at the prompt for more options. + +Access to current_data +---------------------- + +If you are viewing plots in using Iplotclaw and want to explore the data for +some frame or make plots directly in your Python shell, the data that is +being plotted is available to you in attributes of the Iplotclaw instance. +For example:: + + >>> ip = Iplotclaw(); ip.plotloop() + + Interactive plotting for Clawpack output... + + Plotting data from outdir = _output + ... + Plotting Frame 0 at t = 0.0 + PLOTCLAW > q + quitting... + + >>> pd = ip.plotdata + >>> cd = ip.current_data + +The *cd* object contains the :ref:`current_data` used for the most recent +plot, while *pd* is the :ref:`ClawPlotData` object that +gives access to all the plotting parameters currently being used as well as +to methods such as *getframe* for retrieving other frames of data from this +computation. + +If you want to change the directory *outdir* where the frame data is coming +from, you could do, for example:: + + >>> pd.outdir = "_output2" + >>> ip.plotloop() + ... + PLOTCLAW > clearframes # to remove old frames from cache + PLOTCLAW > rr # to redraw current frame number but with new data + + +.. _ipyclaw: + + +.. _printframes: + +printframes +=========== + + +**Need to update** + +The function pyclaw.plotters.frametools.printframes can be used to produce html and +latex versions of the plots:: + + >>> from clawpack.visclaw.data import ClawPlotData + >>> from clawpack.visclaw import frametools + >>> plotclaw = ClawPlotData() + >>> # set attributes as desired + >>> frametools.printframes(plotclaw) + +A convenience method of ClawPlotData is defined to apply this function, +e.g.:: + + >>> plotclaw.printframes() + +This function is automatically called by the "make .plots" option available +in most examples. + + +.. _plot_files: + +Specifying what and how to plot +=============================== + +The first step in specifying how to plot is to create a :ref:`ClawPlotData` +object to hold all the data required for plotting. This is generally done +by creating a file `setplot.py` (see below). + +Note that when you use Iplotclaw to do interactive plotting, e.g.:: + + >>> ip = Iplotclaw() + +Then object `ip` will have an attribute plotdata that is a :ref:`ClawPlotData` +object. This object will have attribute setplot initialized to +'setplot.py', indicating that other attributes should be set by +executing the setplot function defined in the file 'setplot.py' in this +directory. + +Once you have a :ref:`ClawPlotData` object you can set various attributes to +control what is plotted interactively if you want. For example,:: + + >>> plotdata.plotdir = '_plots' + >>> plotdata.setplot = 'my_setplot_file.py' + +will cause hardcopy to go to subdirectory _plots of the current directory and +will cause the plotting routines to execute:: + + >>> from my_setplot_file import setplot + >>> plotdata = setplot(plotdata) + +before doing the plotting. + +There are many other :ref:`ClawPlotData` attributes and methods. + +Most example directories contain a file setplot.py that contains a +function setplot(). This function +sets various attributes of the :ref:`ClawPlotData` +object to control what figures, axes, and items should be plotted for each +frame of the solution. + +For an outline of how a typical set of plots is specified, see +:ref:`setplot`. + + + diff --git a/v5.10.x/_sources/prereqs.rst.txt b/v5.10.x/_sources/prereqs.rst.txt new file mode 100644 index 0000000000..38a4609dca --- /dev/null +++ b/v5.10.x/_sources/prereqs.rst.txt @@ -0,0 +1,70 @@ +:orphan: + +.. _prereqs: + +Installation Prerequisites +=========================== + +Installing and using Clawpack requires the following: + +.. _prereqs_os: + +Operating system +------------------ + +- Linux +- Mac OS X: For the Fortran packages, you need to have the `Xcode developer tools + `_ installed in + order to have `make` working. PyClaw does not require `make`. + + +.. _prereqs_fortran: + +Fortran +------- + +To use the Fortran versions of the PDE solvers (:ref:`contents_fortcodes`), +you will need +`gfortran `_ or another F90 compiler. + +See :ref:`fortran_compilers` for more about which compilers work well with +Clawpack. + +.. _prereqs_python: + +Python +------ + +- Python Version 3.0 or above (much of the code works in Python2, but this + is no longer officially supported; see :ref:`python-three`). +- `NumPy `_ (for PyClaw/VisClaw) +- `matplotlib `_ (for PyClaw/VisClaw) + +There are many ways to install the Python scientific stack, e.g. via +`apt-get` or `brew`. On MacOS, you might check out +`ScipySuperpack for Homebrew `__. + +.. _prereqs_pip: + +pip +--- + +If you are installing via `pip install` then you need `pip`. +If you need to install it, see +``_ + +The version of `pip install` suggested for :ref:`install_quick_all` requires +a recent version of `pip`, so you may need to upgrade if you run into +problems. + +.. _prereqs_git: + +Git +---- + +If you are installing via `pip` using the command in +:ref:`install_quick_all`, or via `git clone`, then you need Git. +You may already have it; in particular the Xcode tools on +Mac OSX contains Git. If you need to install it, see `the Git book +`_. + diff --git a/v5.10.x/_sources/pyclaw/about.rst.txt b/v5.10.x/_sources/pyclaw/about.rst.txt new file mode 100644 index 0000000000..a4283870ce --- /dev/null +++ b/v5.10.x/_sources/pyclaw/about.rst.txt @@ -0,0 +1,80 @@ +:group: pyclaw + +.. _about: + + +======================= +About PyClaw +======================= +PyClaw is part of Clawpack -- an open-source, free project. If you find PyClaw +useful, please `let us know `_. + +Contributors +======================= +Many people have contributed to PyClaw, some of them very substantial parts of +the package. Their work is greatly appreciated: no open source project can +survive without a community. The following people contributed major parts of +the library (in alphabetical order) + + * Aron Ahmadia: PETSc integration; I/O; programmatic testing framework; general design. + + * Amal Alghamdi: Initial development of PetClaw, many bug-fixes and enhancements. + + * Jed Brown: Implicit time stepping (still experimental). + + * Ondrej Certik: Installation and continuous integration bug-fixes. + + * Lisandro Dalcin: Fortran wrapping; PETSc integration; general efficiency. + + * Matthew Emmett: PyWENO integration. + + * Yiannis Hadjimichael: Documentation testing. + + * David Ketcheson: General maintenance and development; incorporation of SharpClaw routines. + + * Matthew Knepley: General design; PETSc integration. + + * Grady Lemoine: Interleaving and cache-optimization of 3D Classic routines. + + * Kyle Mandli: Initial design and implementation of the PyClaw framework. + + * Matteo Parsani: Mapped grids; Python-Fortran interfacing; implicit time stepping. + + * Manuel Quezada de Luna: 2D P-system Riemann solvers and example script. + + * Kristof Unterweger: PeanoClaw (AMR); still experimental. + +Contributions to the package are most welcome. If you have +used PyClaw for research, chances are that others would find your +code useful. See :ref:`develop` for more details. + + +License +======================= +PyClaw is distributed under a Berkeley Software Distribution +(BSD) style license. The license is in the file pyclaw/LICENSE.txt and +reprinted below. + +See http://www.opensource.org/licenses/bsd-license.php for more details. + +Copyright (c) 2008-2011 Kyle Mandli and David I. Ketcheson. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of King Abdullah University of Science & Technology nor + the names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Funding +========== + +PyClaw development has been supported by +grants from King Abdullah University of Science & Technology. diff --git a/v5.10.x/_sources/pyclaw/basics.rst.txt b/v5.10.x/_sources/pyclaw/basics.rst.txt new file mode 100644 index 0000000000..f28b31bc89 --- /dev/null +++ b/v5.10.x/_sources/pyclaw/basics.rst.txt @@ -0,0 +1,17 @@ +:group: pyclaw + +.. _basics: + + +************* +PyClaw Basics +************* + + +.. toctree:: + :maxdepth: 2 + + started + tutorial + examples + plotting diff --git a/v5.10.x/_sources/pyclaw/classes.rst.txt b/v5.10.x/_sources/pyclaw/classes.rst.txt new file mode 100644 index 0000000000..e25ea4ccd3 --- /dev/null +++ b/v5.10.x/_sources/pyclaw/classes.rst.txt @@ -0,0 +1,274 @@ +:group: pyclaw + +.. _pyclaw_classes: + +***************************************** +Understanding Pyclaw Classes +***************************************** +.. contents:: + +Flow of a Pyclaw Simulation +=========================== + +The basic idea of a pyclaw simulation is to construct a +:class:`~pyclaw.solution.Solution` object, hand it to a +:class:`~pyclaw.solver.Solver` object, and request a solution at a new +time. The solver will take whatever steps are necessary to evolve the solution +to the requested time. + +.. image:: images/pyclaw_architecture_flow.* + +The bulk of the work in order to run a simulation then is the creation and +setup of the appropriate :class:`~pyclaw.geometry.Domain`, :class:`~pyclaw.state.State`, +:class:`~pyclaw.solution.Solution`, and :class:`~pyclaw.solver.Solver` +objects needed to evolve the solution to the requested time. + +Creation of a Pyclaw :class:`~pyclaw.solution.Solution` +======================================================= + +.. image:: images/pyclaw_solution_structure.* + +A Pyclaw :class:`~pyclaw.solution.Solution` is a container for a collection of +:class:`~pyclaw.geometry.Domain` and :class:`~pyclaw.state.State` designed with a +view to future support of adaptive mesh refinement and multi-block simulations. The :class:`~pyclaw.solution.Solution` +object keeps track of a list of :class:`~pyclaw.state.State` objects +and controls the overall input and output of the entire collection of +:class:`~pyclaw.state.State` objects. Each +:class:`~pyclaw.state.State` object inhabits a :class:`~pyclaw.geometry.Grid`, composed of +:class:`~pyclaw.geometry.Dimension` objects that define the extents +of the :class:`~pyclaw.grid.Domain`. Multiple states can inhabit the same +grid, but each :class:`~pyclaw.state.State` inhabits a single grid. + +The process needed to create a :class:`~pyclaw.solution.Solution` object then +follows from the bottom up. + +.. doctest:: + + >>> from clawpack import pyclaw + >>> x = pyclaw.Dimension('x', -1.0, 1.0, 200) + >>> y = pyclaw.Dimension('y', 0.0, 1.0, 100) + +This code creates two dimensions, a dimension ``x`` on the interval +``[-1.0, 1.0]`` with :math:`200` grid points and a dimension ``y`` on the interval +``[0.0, 1.0]`` with :math:`100` grid points. + +.. note:: + + Many of the attributes of a :class:`~pyclaw.geometry.Dimension` + object are set automatically so make sure that the values you want are set + by default. Please refer to the :class:`~pyclaw.geometry.Dimension` + classes definition for what the default values are. + +Next we have to create a :class:`~pyclaw.geometry.Domain` object that will +contain our :class:`~pyclaw.geometry.Domain.dimensions` objects. + +.. doctest:: + + >>> domain = pyclaw.Domain([x,y]) + >>> num_eqn = 2 + >>> state = pyclaw.State(domain,num_eqn) + + +Here we create a ``domain`` with the dimensions we created earlier to make a single 2D +:class:`~pyclaw.geometry.Domain` object. Then we set the number of equations the State +will represent to 2. Finally, we create a :class:`~pyclaw.state.State` that inhabits +this domain. As before, many of the attributes of the :class:`~pyclaw.geometry.Domain` +and State objects are set automatically. + +We now need to set the initial condition ``q`` and possibly ``aux`` to the correct +values. + +.. doctest:: + + >>> import numpy as np + >>> sigma = 0.2 + >>> omega = np.pi + >>> Y,X = np.meshgrid(state.grid.y.centers,state.grid.x.centers) + >>> r = np.sqrt(X**2 + Y**2) + >>> state.q[0,:] = np.cos(omega * r) + >>> state.q[1,:] = np.exp(-r**2 / sigma**2) + +We now have initialized the first entry of ``q`` to a cosine function +evaluated at the cell centers and the second entry of ``q`` to a gaussian, again +evaluated at the grid cell centers. + +Many Riemann solvers also require information about the problem we are going +to run which happen to be grid properties such as the impedence :math:`Z` and +speed of sound :math:`c` for linear acoustics. We can set these values in the +``problem_data`` dictionary in one of two ways. The first way is to set them +directly as in: + +.. doctest:: + + >>> state.problem_data['c'] = 1.0 + >>> state.problem_data['Z'] = 0.25 + +If you're using a Fortran Riemann solver, these values will automatically get +copied to the corresponding variables in the cparam common block of the +Riemann solver. This is done in solver.setup(), which calls state.set_cparam(). + +Last we have to put our :class:`~pyclaw.state.State` object into a +:class:`~pyclaw.solution.Solution` object to complete the process. In this +case, since we are not using adaptive mesh refinement or a multi-block +algorithm, we do not have multiple grids. + +.. doctest:: + + >>> sol = pyclaw.Solution(state,domain) + +We now have a solution ready to be evolved in a +:class:`~pyclaw.solver.Solver` object. + + +Creation of a Pyclaw :class:`~pyclaw.solver.Solver` +========================================================== + +A Pyclaw :class:`~pyclaw.solver.Solver` can represent many different +types of solvers; here we will use a 1D, classic Clawpack type of +solver. This solver is defined in the :mod:`~pyclaw.classic.solver` module. + +First we import the particular solver we want and create it with the default +configuration. + +.. doctest:: + + >>> solver = pyclaw.ClawSolver1D() + >>> solver.bc_lower[0] = pyclaw.BC.periodic + >>> solver.bc_upper[0] = pyclaw.BC.periodic + +Next we need to tell the solver which Riemann solver to use from the +:ref:`pyclaw_rp`. We can always +check what Riemann solvers are available to use via the :mod:`~pyclaw.riemann` +module. Once we have picked one out, we pass it to the solver via: + +.. doctest:: + + >>> from clawpack import riemann + >>> solver.rp = riemann.acoustics_1D + +In this case we have decided to use the 1D linear acoustics Riemann solver. You +can also set your own solver by importing the module that contains it and +setting it directly to the `rp` attribute of the particular object in the class +:class:`~pyclaw.classic.solver.ClawSolver1D`. + +.. doctest:: + + >>> import my_rp_module # doctest: +SKIP + >>> solver.rp = my_rp_module.my_acoustics_rp # doctest: +SKIP + +Last we finish up by specifying solver options, if we want to override the +defaults. For instance, we might want to specify a particular limiter + +.. doctest:: + + >>> solver.limiters = pyclaw.limiters.tvd.vanleer + +If we wanted to control the simulation we could at this point by issuing the +following commands: + +.. doctest:: + + >>> solver.evolve_to_time(sol,1.0) # doctest: +SKIP + +This would evolve our solution ``sol`` to ``t = 1.0`` but we are then +responsible for all output and other setup considerations. + +Creating and Running a Simulation with :class:`~pyclaw.controller.Controller` +============================================================================= + +The :class:`~pyclaw.controller.Controller` coordinates the output and setup of +a run with the same parameters as the classic Clawpack. In order to have it +control a run, we need only to create the controller, assign it a solver and +initial condition, and call the :meth:`~pyclaw.controller.Controller.run` +method. + +.. testsetup:: + + from clawpack import pyclaw + x = pyclaw.Dimension('x',0.0,1.0,100) + domain = pyclaw.Domain(x) + state = pyclaw.State(domain,2) + sol = pyclaw.Solution(state,domain) + +.. doctest:: + + >>> from pyclaw.controller import Controller + + >>> claw = Controller() + >>> claw.solver = solver + >>> claw.solutions = sol + +Here we have imported and created the :class:`~pyclaw.controller.Controller` +class, assigned the :class:`~pyclaw.solver.Solver` and +:class:`~pyclaw.solution.Solution`. + +These next commands setup the type of output the controller will output. The +parameters are similar to the ones found in the classic clawpack claw.data +format. + +.. doctest:: + + >>> claw.output_style = 1 + >>> claw.num_output_times = 10 + >>> claw.tfinal = 1.0 + +When we are ready to run the simulation, we can call the +:meth:`~pyclaw.controller.Controller.run` method. It will then run the +simulation and output the appropriate time points. If the +:attr:`~pyclaw.controller.Controller.keep_copy` is set to *True* the +controller will keep a copy of each solution output in memory in the frames array. +For instance, you can then immediately plot the solutions output into the *frames* +array. + + +Restarting a simulation +========================= +To restart a simulation, simply initialize a Solution object using an output +frame from a previous run; for example, to restart from frame 3 + +.. doctest:: + + >>> claw.solution = pyclaw.Solution(3) + +By default, the :class:`~pyclaw.controller.Controller` will number your +output frames starting from the frame number used for initializing +the :class:`~pyclaw.solution.Solution` object. +If you want to change the default behaviour and start counting frames +from zero, you will need to pass the keyword argument +``count_from_zero=True`` to the solution initializer. + + +.. note:: + + It is necessary to specify the output format ('petsc' or 'ascii'). + + +If your simulation includes aux variables, you will need to either recompute them or +output the aux values at every step, following the instructions below. + + +Outputting aux values +=============================== +To write aux values to disk at the initial time:: + + >>> claw.write_aux_init = True + +To write aux values at every step:: + + >>> claw.write_aux_always = True + +Outputting derived quantities +=============================== +It is sometimes desirable to output quantities other than those +in the vector q. To do so, just add a function `compute_p` to +the controller that accepts the state and sets the derived quantities +in state.p + +.. doctest:: + + >>> def stress(state): + ... state.p[0,:,:] = np.exp(state.q[0,:,:]*state.aux[1,:,:]) - 1. + + >>> state.mp = 1 + >>> claw.compute_p = stress + diff --git a/v5.10.x/_sources/pyclaw/clawpack_and_pyclaw.rst.txt b/v5.10.x/_sources/pyclaw/clawpack_and_pyclaw.rst.txt new file mode 100644 index 0000000000..9c9ec32cb4 --- /dev/null +++ b/v5.10.x/_sources/pyclaw/clawpack_and_pyclaw.rst.txt @@ -0,0 +1,148 @@ +:group: pyclaw + +.. _clawpack_and_pyclaw: + +.. _port_Example: + +Porting a problem from Clawpack 4.6.x to PyClaw +====================================================== +The script `pyclaw/development/clawdata2pyclaw.py` is intended to aid +in converting a Clawpack 4.6 problem setup to PyClaw. However, +some manual conversion is necessary, especially if the problem +includes custom fortran routines. + +In PyClaw, the high-level portions of the Fortran routines are reorganized in +an object-oriented Python framework, while the low-level ones are bound through +the Fortran to Python interface generator `f2py `_. +Therefore, for simple problems you won't need to call f2py directly. However, if +you want to reutilize some problem-specific fortran routines that were set up and +tested in a Clawpack problem, you can easily do it. Indeed, if those routines +are complicated and/or computationally intensive, +you should consider directly using the f2py +interface in the initialization script (see :ref:`problem_setup`). +The example in `clawpack/pyclaw/examples/shallow_sphere`, which +solves the shallow water equations on the surface of a sphere, is a +complete example that relies heavily on the use of problem-specific Fortran routines. +In that problem setup, a few Fortran routines have been used to provide the +following functionality: + + * Initialize the solution ``state.q[:,:,:]`` + + * Provide the mapping from a uniform Cartesian domain to the desired + physical domain, i.e. the mapc2p function + + * Setup the auxiliary variables ``state.aux[:,:,:]`` + + * Compute the (non-hyperbolic) contribution of a source term + + * Impose custom boundary conditions to both solution and auxiliary + variables + +The first step to succesfully interface the Fortran functions with PyClaw +is to automate the extension module generation of these routines through f2py. +You can use `clawpack/pyclaw/examples/shallow_sphere/Makefile` as a template:: + + # Problem's source Fortran files + INITIALIZE_SOURCE = mapc2p.f setaux.f qinit.f src2.f + problem.so: $(INITIALIZE_SOURCE) + $(F2PY) -m problem -c $^ + +The code above, calls f2py to compile a set of Fortran routines +and build a module +(``problem.so``) which can then be imported as a function in Python. +The argument following the ''-m'' flag is the name the python module should have (i.e. +the name of the target). f2py uses the ``numpy.distutils`` module from NumPy +that supports a number of major Fortran compilers. For more information +see ``_. + +After compilation, it is useful to check the signature of each +function contained in ``problem.so``, which may be different than +that of the original Fortran function, since f2py eliminates dummy variables. +One can easily achieve that by using the following commands:: + + $ ipython + >>> import problem + >>> problem? + +The last command queries the content of the module and outputs the functions' +signature that must be used in the initialization script to correctly call the +fortran functions. In the shallow water equations on a sphere example, we get +the following output:: + + >>> Type: module + >>> Base Class: + >>> String Form: + >>> Namespace: Interactive + >>> File: /Users/../../../clawpack/pyclaw/examples/shallow-sphere/problem.so + >>> Docstring: + This module 'problem' is auto-generated with f2py (version:1). + Functions: + mapc2p(x1,y1,xp,yp,zp,rsphere) + aux = setaux(maxmx,maxmy,num_ghost,mx,my,xlower,ylower,dxc,dyc,aux,rsphere,num_aux=shape(aux,0)) + q = qinit(maxmx,maxmy,num_ghost,mx,my,xlower,ylower,dx,dy,q,aux,rsphere,num_eqn=shape(q,0),num_aux=shape(aux,0)) + q = src2(maxmx,maxmy,num_ghost,xlower,ylower,dx,dy,q,aux,t,dt,rsphere,num_eqn=shape(q,0),mx=shape(q,1),my=shape(q,2),num_aux=shape(aux,0)) + +For instance, the function ``src2``, which computes the contribution of the +(non-hyperbolic) source term, has the following intent variables:: + + >>> cf2py integer intent(in) maxmx + >>> cf2py integer intent(in) maxmy + >>> cf2py integer optional, intent(in) num_eqn + >>> cf2py integer intent(in) num_ghost + >>> cf2py integer intent(in) mx + >>> cf2py integer intent(in) my + >>> cf2py double precision intent(in) xlower + >>> cf2py double precision intent(in) ylower + >>> cf2py double precision intent(in) dx + >>> cf2py double precision intent(in) dy + >>> cf2py intent(in,out) q + >>> cf2py integer optional, intent(in) num_aux + >>> cf2py intent(in) aux + >>> cf2py double precision intent(in) t + >>> cf2py double precision intent(in) dt + >>> cf2py double precision intent(in) Rsphere + +Note that ``num_eqn``, ``mx``, ``my`` ``num_aux`` are identified by f2py as optional +arguments since their values can be retrieved by looking at the dimensions of +other multidimensional arrays, i.e. ``q`` and ``aux``. + +We are now ready to call and use the Fortran functions in the initialization +script. For instance, the ``src2`` function is called in the +`script `_ by using a fortran_src_wrapper function whose main part reads:: + + >>> # Call src2 function + >>> import problem + >>> state.q = problem.src2(mx,my,num_ghost,xlowerg,ylowerg,dx,dy,q,aux,t,dt,Rsphere) + +A similar approach is used to call other wrapped Fortran functions like +``qinit``, ``setaux``, etc. + +An important feature that makes PyClaw more flexible is the +capability to replace the standard low-level Fortran routines whith some +problem-specific routines. Binding new low-level functions and replacing the +standard ones is very easy; the user just needs to modify the problem-specific +Makefile. The shallow water equations on a sphere is again a +typical example that uses this nice feature. Indeed, to run correctly the problem an +ad-hoc ``step2`` function (i.e. the ``step2qcor``) is required. For that problem +the interesting part of the `Makefile +`_ +reads:: + + # Override step2.f with a new function that contains a call to an additional + # function, i.e. qcor.f + # ========================================================================== + override TWO_D_CLASSIC_SOURCES = step2qcor.f qcor.o flux2.o limiter.o philim.o + + qcor.o: qcor.f + $(FC) $(FFLAGS) -o qcor.o -c qcor.f + +The user has just to override ``step2.f`` with the new function ``step2qcor.f`` +and provide new:: + + output_filenames : input_filenames + actions + +rules to create the targets required by the new Fortran routine. +Similar changes to the problem-specific Makefile can be used to replace other +low-level Fortran routines. + diff --git a/v5.10.x/_sources/pyclaw/cloud.rst.txt b/v5.10.x/_sources/pyclaw/cloud.rst.txt new file mode 100644 index 0000000000..b5354f2710 --- /dev/null +++ b/v5.10.x/_sources/pyclaw/cloud.rst.txt @@ -0,0 +1,23 @@ +:group: pyclaw +:orphan: + +.. _cloud: + +============================ +Running PyClaw in the cloud +============================ + +PyClaw can be quickly installed and run for free using SageMathCloud. +After you've followed the instructions below, you may want to try some of the :ref:`notebooks`. + +Sage Math Cloud +=============== +To run on Sage Math Cloud, simply create an account and a project at http://cloud.sagemath.org/. +Clawpack is pre-installed, so you can use it immediately from a terminal or IPython notebook. +Since matplotlib plots generated from the terminal will not work in the cloud, we +recommend using an IPython notebook. + +You can also install the latest release of Clawpack in your Sage Math Cloud project. +Open a new terminal in your project, and type:: + + pip install --user clawpack diff --git a/v5.10.x/_sources/pyclaw/controller.rst.txt b/v5.10.x/_sources/pyclaw/controller.rst.txt new file mode 100644 index 0000000000..91cdacca83 --- /dev/null +++ b/v5.10.x/_sources/pyclaw/controller.rst.txt @@ -0,0 +1,49 @@ +:group: pyclaw + +.. _pyclaw_controller: + +*********************** +Pyclaw Controller Class +*********************** + +The pyclaw controller object is a convenience class for running simulations +based on the classic clawpack formats and output specifications. It allows +for a variety of output time specifications, output styles and other ways to +keep a simulation organized. + +The main way to use a Controller object then is to provide it with an +appropriate :class:`~pyclaw.solver.Solver` and initial +:class:`~pyclaw.solution.Solution` object. Then specify what kind of output +you would like different than the defaults (see +:class:`~pyclaw.controller.Controller` for +details on what those are). Then simply call +:meth:`~pyclaw.controller.Controller.run` in order to run the desired +simulation. + +.. doctest:: + + >>> import pyclaw.controller as controller + >>> claw = controller.Controller() # Instantiate a new controller + >>> claw.solver = my_solver # Assign a solver # doctest:+SKIP + >>> claw.solution = my_initial_solution # Assign an initial condition # doctest:+SKIP + +Here we would set a variety of run parameters such as ``tfinal``, +``keep_copy`` if we wanted to plot the solutions immediately, or +``output_format`` to specify a format other than ``ascii`` or no output files +if we are going to use ``keep_copy = True``. After we are all set up we just +need to call the controller's :meth:`run` method and off we go. + +.. doctest:: + + >>> claw.run() # doctest:+SKIP + +Please see the :ref:`pyclaw_tutorial` for a detailed example of how this would +work in its entirety. + +:class:`pyclaw.controller.Controller` +===================================== + +.. autoclass:: clawpack.pyclaw.controller.Controller + :members: + :member-order: groupwise + diff --git a/v5.10.x/_sources/pyclaw/evolve/limiters.rst.txt b/v5.10.x/_sources/pyclaw/evolve/limiters.rst.txt new file mode 100644 index 0000000000..43d2783cc7 --- /dev/null +++ b/v5.10.x/_sources/pyclaw/evolve/limiters.rst.txt @@ -0,0 +1,15 @@ +.. _pyclaw_limiters: + +=============== +Pyclaw Limiters +=============== + +.. autofunction:: clawpack.pyclaw.limiters.tvd.limit + +:mod:`clawpack.pyclaw.limiters.tvd` +=================================== + +.. automodule:: clawpack.pyclaw.limiters.tvd + :exclude-members: limit + :members: + diff --git a/v5.10.x/_sources/pyclaw/examples.rst.txt b/v5.10.x/_sources/pyclaw/examples.rst.txt new file mode 100644 index 0000000000..c532d4e05f --- /dev/null +++ b/v5.10.x/_sources/pyclaw/examples.rst.txt @@ -0,0 +1,70 @@ +:group: pyclaw + +.. _examples: + +======================================== +Working with PyClaw's built-in examples +======================================== +PyClaw comes with many example problem scripts that can be +accessed from the module `clawpack.pyclaw.examples`. +If you have downloaded the PyClaw source, you can find them +in the directory `clawpack/pyclaw/examples/`. +These examples demonstrate the kinds of things that can be done +with PyClaw and are a great way to learn how to use PyClaw. + +Running and plotting examples +============================= + +Interactively in IPython +++++++++++++++++++++++++ +A built-in example can be run and plotted as follows:: + + from clawpack.pyclaw import examples + claw = examples.shock_bubble_interaction.setup() + claw.run() + claw.plot() + +To run and plot a different example, simply replace `shock_bubble_interaction` +with another example name. A number of keyword arguments may be passed to +the setup function; see its docstring for details. +These usually include the following: + + * ``use_petsc``: set to 1 to run in parallel + + * ``solver_type``: set to ``classic`` or ``sharpclaw`` + + * ``iplot``: set to 1 to automatically launch interactive plotting after running. + Note that this shouldn't be used in parallel, as every process will try to plot. + + * ``htmlplot``: set to 1 to automatically create HTML plot pages after running. + + * ``outdir``: the name of the subdirectory in which to put output files. Defaults to + ``./_output``. + + +From the command line ++++++++++++++++++++++ +If you have downloaded the Clawpack source, you can run +the examples from the command line. +Simply do the following at the command prompt:: + + $ cd clawpack/pyclaw/examples/acoustics_1d_homogeneous + $ python acoustics.py iplot=1 + +You can run any of the examples similarly by going to the appropriate directory and +executing the Python script. For convenience, the scripts are set up to pass any +command-line options as arguments to the setup function. + + +Built-in examples +========================= +You can see results from many of the examples in the :ref:`galleries`. + + +Adding new examples +======================================== +If you have used PyClaw, we'd love to add your application to the built-in scripts. +Please contact us on the `claw-users Google group `_ +or just issue a `pull request on Github `_. + + diff --git a/v5.10.x/_sources/pyclaw/geometry.rst.txt b/v5.10.x/_sources/pyclaw/geometry.rst.txt new file mode 100644 index 0000000000..28a56688eb --- /dev/null +++ b/v5.10.x/_sources/pyclaw/geometry.rst.txt @@ -0,0 +1,104 @@ +:group: pyclaw + +.. _pyclaw_geometry: + +*************** +PyClaw Geometry +*************** + +The PyClaw geometry package contains the classes used to define the +geometry of a :class:`~pyclaw.solution.Solution` object. The base container +for all other geometry is the :class:`~pyclaw.geometry.Domain` object. It +contains a list of :class:`~pyclaw.geometry.Patch` objects that reside inside +of the :class:`~pyclaw.geometry.Domain`. + +.. image:: images/geometry/domain_structure_1.* + +:class:`~pyclaw.geometry.Patch` +represents a piece of the domain that could be a different resolution than +the others, have a different coordinate mapping, or be used to construct +complex domain shapes. + +.. image:: images/geometry/domain_structure_2.* + +It contains :class:`~pyclaw.geometry.Dimension` +objects that define the extent of the :class:`~pyclaw.geometry.Patch` and the +number of grid cells in each dimension. :class:`~pyclaw.geometry.Patch` also +contains a reference to a nearly identical :class:`~pyclaw.geometry.Grid` +object. The :class:`~pyclaw.geometry.Grid` object also contains a set of +:class:`~pyclaw.geometry.Dimension` objects describing its extent and number +of grid cells. The :class:`~pyclaw.geometry.Grid` is meant to represent the +geometry of the data local to the process in the case of a parallel run. In +a serial simulation the :class:`~pyclaw.geometry.Patch` and +:class:`~pyclaw.geometry.Grid` share the same dimensions. + +In the case where only one :class:`~pyclaw.geometry.Patch` object exists in +a :class:`~pyclaw.geometry.Domain` but it is run with four processes in +parallel, the :class:`~pyclaw.geometry.Domain` hierarchy could look like: + +.. image:: images/geometry/domain_structure_3.* + +In the most complex case with multiple patches and a parallel run we may +have the following: + +.. image:: images/geometry/domain_structure_5.* + +.. _pyclaw_serial_geometry: + +Serial Geometry Objects +####################### + + +:class:`pyclaw.geometry.Domain` +================================= + +.. autoclass:: clawpack.pyclaw.geometry.Domain + :members: + :member-order: groupwise + + +:class:`pyclaw.geometry.Patch` +================================= + +.. autoclass:: clawpack.pyclaw.geometry.Patch + :members: + :member-order: groupwise + :show-inheritance: + + +:class:`pyclaw.geometry.Grid` +================================= + +.. autoclass:: clawpack.pyclaw.geometry.Grid + :members: + :member-order: groupwise + + +:class:`pyclaw.geometry.Dimension` +================================== + +.. autoclass:: clawpack.pyclaw.geometry.Dimension + :members: + :member-order: groupwise + +.. _pyclaw_parallel_geometry: + +Parallel Geometry Objects +######################### + +:class:`petclaw.geometry.Domain` +=================================== + +.. autoclass:: clawpack.petclaw.geometry.Domain + :members: + :member-order: groupwise + :show-inheritance: + +:class:`petclaw.geometry.Patch` +=============================== + +.. autoclass:: clawpack.petclaw.geometry.Patch + :members: + :member-order: groupwise + :show-inheritance: + diff --git a/v5.10.x/_sources/pyclaw/going_further.rst.txt b/v5.10.x/_sources/pyclaw/going_further.rst.txt new file mode 100644 index 0000000000..602c1807bf --- /dev/null +++ b/v5.10.x/_sources/pyclaw/going_further.rst.txt @@ -0,0 +1,18 @@ +:group: pyclaw + +.. _going_further: + + +************* +Going Further +************* + + +.. toctree:: + :maxdepth: 2 + + problem + clawpack_and_pyclaw + solvers + parallel + output diff --git a/v5.10.x/_sources/pyclaw/index.rst.txt b/v5.10.x/_sources/pyclaw/index.rst.txt new file mode 100644 index 0000000000..3da3e5f8fb --- /dev/null +++ b/v5.10.x/_sources/pyclaw/index.rst.txt @@ -0,0 +1,174 @@ +:group: pyclaw + +.. _pyclaw: + + +PyClaw +====== + +In this section of the documentation, PyClaw refers +a Python version of the hyperbolic PDE solvers that allows solving the +problem in Python (e.g. in a Jupyter notebook) without explicitly using +any Fortran code. Versions of the solvers are written in Python. +However, they use Riemann solvers that are converted from the Fortran +versions into Python-callable versions using +`f2py `__, +to facilitate using the same large set of solvers from either Fortran +or Python. Note that +in order for this to work the solvers must be precompiled, as is done +when using `pip install`, for example (see :ref:`installing_pip`). + +See :ref:`clawpack_packages` for more information about the different +capabilities of PyClaw relative to :ref:`contents_fortcodes`. + +**Note:** The `clawpack/pyclaw` directory also contains some +Python tools that are used many places in +Clawpack, e.g. when plotting with :ref:`visclaw` or when compiling and +running Fortran code using a `Makefile` and `setrun.py` file +(when using :ref:`contents_fortcodes`). +These modules are mostly used "under the hood". +Other Python tools of use in the Fortran versions +are described elsewhere; see e.g. :ref:`plotting` or :ref:`geoclaw`. +All of these modules are pure Python and should work fine as long +as the top level of Clawpack is on your :ref:`python_path`. + + +.. _pyclaw_install: + +PyClaw installation +------------------- + +Using `pip install` is the recommended approach, see +:ref:`installing_pip`. + + +Examples +-------- + +Next, try running an example `Jupyter notebook `_. + +Alternatively, to run an example from the **IPython prompt**:: + + from clawpack.pyclaw import examples + claw = examples.shock_bubble_interaction.setup() + claw.run() + claw.plot() + +To run an example and plot the results directly from the command line, +go to the directory where Clawpack is installed and then:: + + cd pyclaw/examples/euler_2d + python shock_bubble_interaction.py iplot=1 + + +Features +-------- + + * A **hyperbolic PDE solver** in 1D, 2D, and 3D, including mapped grids and surfaces, built on Clawpack; + * **Massively parallel** -- the same simple script that runs on your laptop will + scale efficiently on the world's biggest supercomputers (see :ref:`parallel`); + * **High order accurate**, with WENO reconstruction and Runge-Kutta time integration + (see :ref:`solvers`); + * Simple and intuitive thanks to its Python interface. + +PyClaw makes use of the additional Clawpack packages, +`Riemann `_ and +`VisClaw `_ for Riemann solvers and visualization, +respectively. + +If you have any issues or need help using PyClaw, `contact us `_. + +PyClaw Documentation +==================== + +See also the +`Gallery of PyClaw Applications `_ +for some examples of how PyClaw can be used. + +.. toctree:: + :maxdepth: 2 + + ../first_run_pyclaw + basics + going_further + classes + ../developers + troubleshooting + about + + + +.. _pyclaw_reference: + +PyClaw Modules reference documentation +====================================== +.. toctree:: + :maxdepth: 1 + + controller + solvers + evolve/limiters + io + solution + state + geometry + util + +.. _riemann_reference: + +Riemann Solvers reference documentation +======================================== +The Riemann solvers now comprise a separate package. For convenience, +documentation of the available pure python Riemann solvers is included +here. Many other Fortran-based Riemann solvers are available. + +.. toctree:: + :maxdepth: 3 + + rp + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + + +Citing PyClaw +======================= +If you use PyClaw in work that will be published, please cite the Clawpack software +(see :ref:`citing`) and also mention specifically that you used PyClaw, and cite the paper:: + + @article{pyclaw-sisc, + Author = {Ketcheson, David I. and Mandli, Kyle T. and Ahmadia, Aron J. and Alghamdi, Amal and {Quezada de Luna}, Manuel and Parsani, Matteo and Knepley, Matthew G. and Emmett, Matthew}, + Journal = {SIAM Journal on Scientific Computing}, + Month = nov, + Number = {4}, + Pages = {C210--C231}, + Title = {{PyClaw: Accessible, Extensible, Scalable Tools for Wave Propagation Problems}}, + Volume = {34}, + Year = {2012}} + +If you use the Classic (2nd-order) solver, you may also wish to cite:: + + @article{leveque1997, + Author = {LeVeque, Randall J.}, + Journal = {Journal of Computational Physics}, + Pages = {327--353}, + Title = {{Wave Propagation Algorithms for Multidimensional Hyperbolic Systems}}, + Volume = {131}, + Year = {1997}} + +If you use the SharpClaw (high order WENO) solver, you may also wish to cite:: + + @article{KetParLev13, + Author = {Ketcheson, David I. and Parsani, Matteo and LeVeque, + Randall J.}, + Journal = {SIAM Journal on Scientific Computing}, + Number = {1}, + Pages = {A351--A377}, + Title = {{High-order Wave Propagation Algorithms for Hyperbolic Systems}}, + Volume = {35}, + Year = {2013}} + diff --git a/v5.10.x/_sources/pyclaw/io.rst.txt b/v5.10.x/_sources/pyclaw/io.rst.txt new file mode 100644 index 0000000000..86cd51ee6f --- /dev/null +++ b/v5.10.x/_sources/pyclaw/io.rst.txt @@ -0,0 +1,97 @@ +:group: pyclaw + +.. _pyclaw_io: + +*************************** +Pyclaw Input/Output Package +*************************** + +Pyclaw supports the following input and output formats: + + * ASCII_ - ASCII file I/O, supports traditional clawpack format files + * BINARY_ - for reading binary output files containing 32 or 64 byte floats + * HDF5_ - HDF5 file I/O + * NetCDF_ - NetCDF file I/O, support for NetCDF3 and NetCDF4 files + +Each module contains two main routines ``read_`` and +``write_`` which :class:`~pyclaw.Solution` can call with the +appropriate . In order to create a new file I/O extension the calling +signature must match + +:: + + read_(solution,frame,path,file_prefix,write_aux,options) + +where the the inputs are + :Input: + - *solution* - (:class:`~pyclaw.solution.Solution`) Pyclaw object to be + output + - *frame* - (int) Frame number + - *path* - (string) Root path + - *file_prefix* - (string) Prefix for the file name. + - *write_aux* - (bool) Boolean controlling whether the associated + auxiliary array should be written out. + - *options* - (dict) Optional argument dictionary + +and + +:: + + write_(solution,frame,path,file_prefix,write_aux,options) + +where the inputs are + :Input: + - *solution* - (:class:`~pyclaw.solution.Solution`) Pyclaw object to be + output + - *frame* - (int) Frame number + - *path* - (string) Root path + - *file_prefix* - (string) Prefix for the file name. + - *write_aux* - (bool) Boolean controlling whether the associated + auxiliary array should be written out. + - *options* - (dict) Optional argument dictionary. + +Note that both allow for an ``options`` dictionary that is format specific +and should be documented thoroughly. For examples of this usage, see the +HDF5_ and NetCDF_ modules. + +HDF5_ and NetCDF_ support require installed libraries in order to work, please +see the respective modules for details on how to obtain and install the +libraries needed. + + .. note:: + + Pyclaw automatically detects the availability of HDF5 and NetCDF file + support and will warn you if you try and use them without the proper + libraries. + +.. _ASCII: + +:mod:`pyclaw.fileio.ascii` +========================== + +.. automodule:: clawpack.pyclaw.fileio.ascii + :members: + +.. _BINARY: + +:mod:`pyclaw.fileio.binary` +=========================== + +.. automodule:: clawpack.pyclaw.fileio.binary + :members: + +.. _HDF5: + +:mod:`pyclaw.fileio.hdf5` +========================= + +.. automodule:: clawpack.pyclaw.fileio.hdf5 + :members: + +.. _NetCDF: + +:mod:`pyclaw.fileio.netcdf` +=========================== + +.. automodule:: clawpack.pyclaw.fileio.netcdf + :members: diff --git a/v5.10.x/_sources/pyclaw/output.rst.txt b/v5.10.x/_sources/pyclaw/output.rst.txt new file mode 100644 index 0000000000..a5565c7973 --- /dev/null +++ b/v5.10.x/_sources/pyclaw/output.rst.txt @@ -0,0 +1,234 @@ +:group: pyclaw + +.. contents:: + +.. _output: + +*********************** +PyClaw output +*********************** +In the documentation below, it is assumed that `claw` refers to a +`pyclaw.controller.Controller` object, as is customary in the example +scripts. + +Output frames +============= +The result of a PyClaw simulation is a set of snapshots, or *frames* +of the solution. By default these are written to disk in a subdirectory +named `_outdir`. Writing of output files can be turned off by setting +`claw.output_format = None`. + +If `claw.keep_copy = True`, then output frames are also saved in memory +in the list `claw.frames`. Each entry is a `pyclaw.solution.Solution` +object. Thus the initial condition is available from `claw.frames[0].q` +and the final solution is in `claw.frames[-1].q`. +This can be convenient for working with +smaller simulations without reading from and writing to disk. + + +When output is saved/written +============================ +PyClaw supports the same basic options as other Clawpack packages for +controlling output. These are selected by setting `claw.output_style`: + + * `claw.output_style = 1`: Evenly spaced output, between the initial + and final simulation times. The number of outputs is the value of + `claw.num_output_times`. + * `claw.output_style = 2`: Manual specification of output times. + Output will be written at the times specified in + `claw.output_times`, which should be a list. + * Write output after a certain number of steps have been taken; + the number is specified in `claw.nstepout`. For instance, + if `claw.nstepout = 3`, then output is written after every 3 + steps. This is most often useful for debugging. + +Where and how output is written +=============================== +The following options control the kind and location of output +files: + + * `claw.output_format`: A string specifying the format in which output data + is written. The default is `ascii`. Other valid options are `binary`, + `hdf5`, and `petsc`. These formats can be useful for obtaining + smaller output files or for loading output data into other software. + Finally, this can be set to `None` to avoid writing any output to disk. + * `claw.outdir`: Subdirectory in which to place output files. Defaults + to `_output`. + * `claw.output_file_prefix`: Allows manual specification of the prefix + for output files. + * `claw.overwrite`: if True, allow existing files in the output + directory to be overwritten by the current run. + +What output is written +====================== +PyClaw supports options to output more +than just the solution :math:`q`. It can provide: + + * Snapshots of the values in the `aux` array at the initial time + and/or output times. This is turned on by setting + `claw.write_aux_int = True` or `claw.write_aux_always = True`. + * Output of derived quantities computed from :math:`q`; for instance, + pressure (not a conserved quantity) could be computed from density + and energy. + * Output of scalar functionals, such as the total mass summed over the whole grid. + * Output of gauge values, which are time traces of the solution at a + single point. + +Derived quantities and functionals are written out at the same times that the solution +:math:`q` is written. While these could be computed in postprocessing, it is more efficient +to compute them at run-time for large parallel runs. + +Gauge output is written at every timestep. In order to get this data without a +gauge, one would otherwise have to write the full solution out at every +timestep, which might be very slow. + + + +Outputting derived quantities +=============================== +It is sometimes desirable to output quantities other than those +in the vector q. To do so, just add a function `p_function` to +the controller that accepts the state and sets the derived quantities +in state.p + +.. testsetup:: * + + from clawpack import pyclaw + from clawpack import riemann + import numpy as np + solver = pyclaw.ClawSolver2D(riemann.acoustics_2D) + domain = pyclaw.Domain([0.,0.],[1.,1.],[100,100]) + num_aux = 2 + state = pyclaw.State(domain,solver.num_eqn,num_aux) + solution = pyclaw.Solution(state,domain) + grid = state.grid + Y,X = np.meshgrid(grid.y.centers,grid.x.centers) + r = np.sqrt(X**2 + Y**2) + width = 0.2 + state.q[0,:,:] = (np.abs(r-0.5)<=width)*(1.+np.cos(np.pi*(r-0.5)/width)) + state.q[1,:,:] = 0. + state.q[2,:,:] = 0. + claw = pyclaw.Controller() + +.. doctest:: + + >>> def stress(state): + ... state.p[0,:,:] = np.exp(state.q[0,:,:]*state.aux[1,:,:]) - 1. + + >>> state.mp = 1 + >>> claw.p_function = stress + +For a working example, see `the PyClaw P-system example `_. + + +Outputting functionals +=============================== +In PyClaw a functional is a scalar quantity computed from :math:`q` that is written +to file at each output time. For now, only functionals of the form + +.. math:: + \begin{equation} + F(q) = \int |f(q)| dx dy + \end{equation} + +are supported. In other words, the functional must be the absolute +integral of some function of :math:`q`. To enable writing functionals, simply +set `state.mF` to the number of functionals:: + + >>> state.mf = 1 + +and point the controller to a function that computes :math:`f(q)` elementwise +and stores it in the array +`state.F`. For instance, if your first two conserved quantities are density +and momentum, you might write: + +.. doctest:: + + >>> def energy(state): + ... state.F[0,:,:] = 0.5 * state.q[0,:,:]*state.q[1,:,:] + >>> claw.compute_F = energy + >>> claw.F_file_name = 'total_energy' + +The total energy (summed over the grid) would then be written to +`_output/total_energy.txt`. The output file has two columns; the +first is time and the second is the functional value. Output is +written at the same times that `q` is written to file. + +For a working example, see `the PyClaw P-system example `_. + +Using gauges +=================== +A gauge in PyClaw is a single grid location for which output is written at +every time step. This can be very useful in some applications, like comparing +with data from tidal gauges (from whence the name is derived) in tsunami modeling. +The gauges are managed by the grid object, and a grid at location :math:`(x,y)` +may be added simply by calling `grid.add_gauges((x,y))`. Multiple gauges +can be set at once by providing a list of coordinate tuples + +.. testsetup:: + + x1 = 0; x2 = 1; x3 = 2 + y1 = 1; y2 = 2; y3 = 0 + +.. doctest:: + + >>> state.grid.add_gauges([(x1,y1),(x2,y2),(x3,y3)]) + +By default, the solution values are written out at each gauge location. +To write some other quantity, simply provide a function +:math:`f(q,aux)` and point the solver to it + +.. doctest:: + + >>> def f(q,aux): + ... return q[1,:,:]/q[0,:,:] + + >>> solver.compute_gauge_values = f + +For a working example, see `the PyClaw P-system example `_. + + +******* +Logging +******* +By default, PyClaw prints a message to the screen each time it writes +an output file. This message is also writing to the file `pyclaw.log` +in the working directory. There are additional warning or error messages +that may be sent to the screen or to file. You can adjust the logger levels +in order to turn these messages off or to get more detailed debugging +information. + +The controller provides one means to managing the logging with the +:py:attr:`~pyclaw.controller.verbosity` parameter and is provided as an easy +interace to control the console output (that which is shown on screen). Valid +values for :py:attr:`~clawpack.pyclaw.controller.verbosity` are: + +=========== ================ +Verbosity Message Level +----------- ---------------- +0 Critical - This effectively silences the logger, since there are + no logging messages in PyClaw that correspond to this level. May + be useful in an IPython notebook for instance if you want the + plots to appear immediately below your code. +1 Error - These are logged by the IO system to indicate that + something has gone wrong with either reading or writing a file. +2 Warning - There are no warning level logger messages. +3 Info - Additional IO messages are printed and some minor messages + dealing with hitting the end time requested. +4 Debug - If this level is set all logger output is displayed. This + includes the above and detailed time step information for every + time step (includes CFL, current dt and whether a time step is + rejected). +=========== ================ + +When running on a supercomputer, logging to file can be problematic because +the associated I/O can slow down the entire computation (this is true on +Shaheen). To turn off all logging (both to screen and to file), you need to +change the level of the root logger:: + + import logging + logger = logging.getLogger('pyclaw') + logger.setLevel(logging.CRITICAL) + +Again since we don't use `CRITICAL` logger messages in PyClaw, this has the +effect of turning the loggers off. diff --git a/v5.10.x/_sources/pyclaw/parallel.rst.txt b/v5.10.x/_sources/pyclaw/parallel.rst.txt new file mode 100644 index 0000000000..beff6d1753 --- /dev/null +++ b/v5.10.x/_sources/pyclaw/parallel.rst.txt @@ -0,0 +1,208 @@ +:group: pyclaw + +.. _parallel: + +============================ +Running in parallel +============================ +PyClaw can be run in parallel on your desktop or on large supercomputers using the +PETSc library. +Running your PyClaw script in parallel is usually very easy; it mainly consists of +replacing:: + + from clawpack import pyclaw + +with:: + + import clawpack.petclaw as pyclaw + + +Also, most of the provided scripts in `pyclaw/examples` are set up to run in parallel +simply by passing the command-line option `use_petsc=True` (of course, you will need +to launch them with `mpirun`. + + +Installing PETSc +================== +First make sure you have a working install of PyClaw. +For PyClaw installation instructions, see :ref:`installation`. + +To run in parallel you'll need: + + * `PETSc `_ a toolkit for + parallel scientific computing. The current recommended version is 3.3 with latest patch. + + * `petsc4py `_: Python bindings for PETSc. + The current recommended version is 3.3. + +**Obtaining PETSc:** + +PETSc 3.3 can be obtained using three approaches. Here we use `Mercurial `_ to get it. Look at ``_ for more information. + +Do: :: + + $ cd path/to/the/dir/where/you/want/download/Petsc-3.3 + $ hg clone https://bitbucket.org/petsc/petsc-3.3 petsc-3.3 + $ hg clone https://bitbucket.org/petsc/buildsystem-3.3 petsc-3.3/config/BuildSystem + +For sh, bash, or zsh shells add the following lines to your shell start-up file: :: + + $ export PETSC_DIR=path/to/the/dir/where/you/downloaded/Petsc-3.3/petsc-3.3 + $ export PETSC_ARCH=your/architecture + +whereas for csh/tcsh shells add the following lines to your shell start-up file: :: + + $ setenv PETSC_DIR path/to/the/dir/where/you/downloaded/Petsc-3.3/petsc-3.3 + $ setenv PETSC_ARCH your/architecture + +For more information about PETSC_DIR and PETSC_ARCH, i.e. the variables that +control the configuration and build process of PETSc, please look at +``_. + +Then, if you want PETSc-3.3 configure for 32-bit use the following command: :: + + $ ./config/configure.py --with-cc=gcc --with-cxx=g++ --with-python=1 --download-mpich=1 --with-shared-libraries=1 + +whereas, if you want PETSc-3.3 64-bit do: :: + + $ ./config/configure.py --with-cc=gcc --with-cxx=g++ --with-python=1 --download-mpich=1 --with-shared-libraries=1 --with-64-bit-indices=1 + +Note that one of the option is --download-mpich=1. This means that mpich is downloaded. If you do not need/want mpich, remove this option. Note that you need MPI when using PETSc. Therefore, if the option –download-mpich=1 is removed you should have MPI installed on your system or in your user account. + +Once the configuration phase is completed, build PETSc libraries with :: + + $ make PETSC_DIR=path/to/the/dir/where/you/have/Petsc-3.3/petsc-3.3 PETSC_ARCH=your/architecture all + +Check if the libraries are working by running :: + + $ make PETSC_DIR=path/to/the/dir/where/you/have/Petsc-3.3/petsc-3.3 PETSC_ARCH=your/architecture test + +**Obtaining petsc4py:** + +petsc4py is a python binding for PETSc. We recommend installing petsc4py 3.3 because it is compatible with PETSc 3.3 and 3.2. To install this binding correctly make sure that the PETSC_DIR and PETSC_ARCH are part of your shell start-up file. + +Obtain petsc4py-3.3 with mercurial: :: + + $ cd path/to/the/dir/where/you/want/download/petsc4py + $ hg clone https://petsc4py.googlecode.com/hg/petsc4py-3.3 -r 3.3 + +The prefered method for the petsc4py iinstallation is `pip `_ :: + + $ cd petsc4py-3.3 + $ pip install . --user + +Indeed, pip removes the old petsc4py installation, downloads the new version of +`cython `_ (if needed) and installs petsc4py. + +To check petsc4py-3.3 installation do: :: + + $ cd petsc4py-3.3/test + $ python runtests.py + +All the tests cases should pass, i.e. OK should be printed at the screen. + +**NOTE:** To run a python code that uses petsc4py in parallel you will need to use mpiexec or mpirun commands. It is important to remember to use the mpiexec or mpirun executables that come with the MPI installation that was used for configuring PETSc installation. If you have used the option --download-mpich=1 while installing PETSc, then the correct mpiexec to use is the one in ${PETSC_DIR}/${PETSC_ARCH}/bin. You can set this mpiexec to be your default by adding this line to your sh, bash, or zsh shell start-up file: :: + + $ export PATH="${PETSC_DIR}/${PETSC_ARCH}/bin:${PATH}" + +or this line in case you are using csh or tcsh shells: :: + + $ setenv PATH "${PETSC_DIR}/${PETSC_ARCH}/bin:${PATH}" + +You can test that you are using the right mpiexec by running a demonstration script that can be found in $PYCLAW/demo as follows: :: + + $ cd $PYCLAW + $ mpiexec -n 4 python demo/petsc_hello_world.py + +and you should get an output that looks like follows: :: + + Hello World! From process 3 out of 4 process(es). + Hello World! From process 1 out of 4 process(es). + Hello World! From process 0 out of 4 process(es). + Hello World! From process 2 out of 4 process(es). + + +**NOTE:** An alternative way to install petsc4py is simply using the python +script setup.py inside petsc4py, i.e. :: + + $ cd petsc4py-dev + $ python setup.py build + $ python setup.py install --user + + +Testing your installation +============================ +If you don't have it already, install nose :: + + $ easy_install nose + +Now simply execute :: + + $ cd $PYCLAW + $ nosetests + +If everything is set up correctly, this will run all the regression tests +(which include pure python code and python/Fortran code) and inform you that +the tests passed. If any fail, please post the output and details of your +platform on the `claw-users Google group `_. + + +Running and plotting an example +================================ +Next :: + + $ cd $PYCLAW/examples/advection/1d/constant + $ python advection.py use_PETSc=True iplot=1 + +This will run the code and then place you in an interactive plotting shell. +To view the simulation output frames in sequence, simply press 'enter' +repeatedly. To exit the shell, type 'q'. For help, type '?' or see +this `Clawpack interactive python plotting help page `_. + + +Tips for making your application run correctly in parallel +================================================================ +Generally serial PyClaw code should "just work" in parallel, but if you are not +reasonably careful it is certainly possible to write serial code that will fail +in parallel. + +Most importantly, use the appropriate grid attributes. In serial, both `grid.n` and +`grid.ng` give you the dimensions of the grid (i.e., the number of cells in +each dimension). In parallel, `grid.n` contains the size +of the whole grid, while `grid.ng` contains just the size of the part that a given +process deals with. You should typically use only `grid.ng` (you can also use `q.shape[1:]`, +which is equal to `grid.ng`). + +Similarly, `grid.lower` contains the lower bounds of the problem domain in the +computational coordinates, whereas `grid.lowerg` contains the lower bounds of the +part of the grid belonging to the current process. Typically you should use +`grid.lowerg`. + +Additionally, be aware that when a Grid object is instantiated in a parallel run, +it is not instantiated as a parallel object. A typical code excerpt looks like + +.. doctest:: + + >>> import clawpack.petclaw as pyclaw # doctest: +SKIP + >>> from clawpack import pyclaw + >>> mx = 320; my = 80 + >>> x = pyclaw.Dimension('x',0.0,2.0,mx) + >>> y = pyclaw.Dimension('y',0.0,0.5,my) + >>> grid = pyclaw.Domain([x,y]) + +At this point, `grid.ng` is identically equal to `grid.n`, rather than containing +the size of the grid partition on the current process. Before using it, you +should instantiate a State object + +.. doctest:: + + >>> num_eqn = 5 + >>> num_aux=1 + >>> state = pyclaw.State(grid,num_eqn,num_aux) + +Now `state.grid.ng` contains appropriate information. + +Passing options to PETSc +========================= +The built-in applications (see :ref:`examples`) are set up to automatically pass +command-line options starting with a dash ("-") to PETSc. diff --git a/v5.10.x/_sources/pyclaw/plotting.rst.txt b/v5.10.x/_sources/pyclaw/plotting.rst.txt new file mode 100644 index 0000000000..7fddddea19 --- /dev/null +++ b/v5.10.x/_sources/pyclaw/plotting.rst.txt @@ -0,0 +1,56 @@ +:group: pyclaw + +.. _pyclaw_plotting: + +======================= +Plotting PyClaw results +======================= +PyClaw relies on the +`VisClaw package `_ for easy plotting, although +it is of course possible to load the output into other visualization packages. +VisClaw supports 1D and 2D plotting; for 3D plotting, we recommend using the +`old Clawpack MATLAB routines `_ +for now. + +This page gives some very basic information; for more detail, see :ref:`plotting` +in VisClaw's documentation. + + +Basics +======= +VisClaw includes routines for creating HTML and LaTex plot pages or plotting interactively. +These require a `setplot.py` file that defines the plotting parameters; +see :ref:`plotting_python`. +for more information. Once you have an appropriate `setplot.py` file, +there are some convenience functions in `$PYCLAW/src/petclaw/plot.py` +for generating these plots. Assuming you have output files in `./_output` +(which is the default), you can generate HTML pages with plots from Python via + +.. doctest:: + + >>> from clawpack.pyclaw import plot + >>> plot.html_plot() # doctest: +SKIP + +This will generate HTML pages with plots and print out a message with the +location of the HTML file. To launch an interactive plotting session +from within Python, do + +.. doctest:: + + >>> from clawpack.pyclaw import plot + >>> plot.interactive_plot() # doctest: +SKIP + +To see a list of commands available in the resulting interactive environment, +type "?" or see :ref:`plotting_Iplotclaw`. + +Plotting result from parallel runs +======================================== +By default, when running in parallel, PyClaw outputs data in a binary format. +In order to plot from such files, just replace ``pyclaw`` with ``petclaw`` in the +commands above; e.g. + +.. doctest:: + + >>> from clawpack.petclaw import plot + >>> plot.interactive_plot() # doctest: +SKIP + diff --git a/v5.10.x/_sources/pyclaw/problem.rst.txt b/v5.10.x/_sources/pyclaw/problem.rst.txt new file mode 100644 index 0000000000..185a4c89aa --- /dev/null +++ b/v5.10.x/_sources/pyclaw/problem.rst.txt @@ -0,0 +1,182 @@ +:group: pyclaw + +.. _problem_setup: + +============================= +Setting up your own problem +============================= +The best way to set up a new problem is to find an existing problem setup that +is similar. The main steps are: + + * Write the initialization script + * Write routines for source terms, custom boundary conditions, or other customizations + * Write a Riemann solver (if solving a new system of equations) + * Write a Makefile if using any custom Fortran code + * Write a setplot.py file for visualization + +If needed for your problem, custom Riemann solvers, boundary condition routines, +source term routines, and other functions can all be written in Python but you may +prefer to write some of them in Fortran for performance reasons. +The latter approach requires direct use of +`f2py `_. See :ref:`port_Example` for +more details. + + +Writing the initialization script +=================================== +This script should: + + * Import the appropriate package (pyclaw or petclaw) + * Instantiate a :class:`~pyclaw.solver.Solver` and specify the Riemann solver to use + * Set the boundary conditions + * Define the domain through a :class:`~pyclaw.geometry.Domain` object + * Define a :class:`~pyclaw.solution.Solution` object + * Set the initial condition + +Usually the script then instantiates a :class:`~pyclaw.controller.Controller`, sets the +initial solution and solver, and calls :meth:`~pyclaw.controller.Controller.run`. + +Setting initial conditions +---------------------------- +Once you have initialized a Solution object, it contains a member state.q +whose first dimension is num_eqn and whose remaining dimensions are those +of the grid. Now you must set the initial condition. For instance + +.. testsetup:: * + + from clawpack import pyclaw + from clawpack import riemann + x = pyclaw.Dimension('x',-1.0,1.0,100) + y = pyclaw.Dimension('y',-1.0,1.0,100) + domain = pyclaw.Domain([x,y]) + solver = pyclaw.ClawSolver2D(riemann.acoustics_2D) + state = pyclaw.State(domain,solver.num_eqn,num_aux) + +.. doctest:: + + >>> import numpy as np + >>> Y,X = np.meshgrid(state.grid.y.centers,state.grid.x.centers) + >>> r = np.sqrt(X**2 + Y**2) + >>> width = 0.2 + >>> state.q[0,:,:] = (np.abs(r-0.5)<=width)*(1.+np.cos(np.pi*(r-0.5)/width)) + >>> state.q[1,:,:] = 0. + >>> state.q[2,:,:] = 0. + +Note that in a parallel run we only wish to set the local values of the state +so the appropriate geometry object to use here is the +:class:`~pyclaw.geometry.Grid` class. + +Setting auxiliary variables +---------------------------- +If the problem involves coefficients that vary in space or a mapped grid, +the required fields are stored in state.aux. In order to use such fields, +you must pass the num_aux argument to the State initialization + +.. testsetup:: + + num_aux = 2 + +.. doctest:: + + >>> state = pyclaw.State(domain,solver.num_eqn,num_aux) + +The number of fields in state.aux (i.e., the length of its first dimension) +is set equal to num_aux. The values of state.aux are set in the same way +as those of state.q. + +Setting boundary conditions +---------------------------- +The boundary conditions are specified through solver.bc_lower and +solver.bc_upper, each of which is a list of length ``solver.num_dim``. The +ordering of the boundary conditions in each list is the same as the ordering of +the Dimensions in the Grid; typically :math:`(x,y)`. Thus +``solver.bc_lower[0]`` specifies the boundary condition at the left boundary +and ``solver.bc_upper[0]`` specifies the condition at the right boundary. +Similarly, ``solver.bc_lower[1]`` and ``solver.bc_upper[1]`` specify the +boundary conditions at the top and bottom of the domain. + +PyClaw includes the following built-in boundary condition implementations: + + * ``pyclaw.BC.periodic`` - periodic + * ``pyclaw.BC.extrap`` - zero-order extrapolation + * ``pyclaw.BC.wall`` - solid wall conditions, assuming that the 2nd/3rd + component of q is the normal velocity in x/y. + +Other boundary conditions can be implemented by using ``pyclaw.BC.custom``, and +providing a custom BC function. The attribute solver.user_bc_lower/upper must +be set to the corresponding function handle. For instance + + +.. doctest:: + + >>> def custom_bc(state,dim,t,qbc,num_ghost): + ... for i in xrange(num_ghost): + ... qbc[0,i,:] = q0 + + >>> solver.bc_lower[0] = pyclaw.BC.custom + >>> solver.user_bc_lower = custom_bc + +If the ``state.aux`` array is used, boundary conditions must be set for it +in a similar way, using ``solver.aux_bc_lower`` and ``solver.aux_bc_upper``. +Note that although state is passed to the BC routines, they should +NEVER modify state. Rather, they should modify qbc/auxbc. + +Setting solver options +---------------------------- + +Using your own Riemann solver +============================= +The Riemann package has solvers for many hyperbolic systems. If your problem +involves a new system, you will need to write your own Riemann solver. +A nice example of how to compile and import your own Riemann solver can be seen +`here https://github.com/damiansra/empyclaw/tree/master/maxwell_1d_homogeneous`_. +You will need to: + + * Put the Riemann solver in the same directory as your Python script + * Write a short makefile calling f2py + * import the Riemann solver module in your Python script + +Here are some tips if you are converting an old Clawpack 4.5 or earlier Riemann solver: + + * Rename the file from .f to .f90 and switch to free-format Fortran + * Move the spatial index (i) to the last place in all array indexing + +Please do contribute your solver to the package by sending a pull request on Github +or e-mailing one of the developers. To add your Riemann solver to the Clawpack +Riemann package, you will need to: + + * Place the .f90 file(s) in clawpack/riemann/src. + * Add the solver to the list in clawpack/riemann/setup.py + * Add the solver to the list in clawpack/riemann/src/python/riemann/setup.py + * Add the solver to the list in clawpack/riemann/src/python/riemann/Makefile + * Add the solver to the list in clawpack/riemann/src/python/riemann/__init__.py + + +For very simple problems in one dimension, it may be worthwhile to write the +Riemann solver in Python, especially if you are more comfortable with Python +than with Fortran. For two-dimensional problems, or one-dimensional problems +requiring fine grids (or if you are impatient) the solver should be written +in Fortran. The best approach is generally to find a similar solver in the +Riemann package and modify it to solve your system. + +Adding source terms +============================== +Non-hyperbolic terms (representing, e.g., reaction or diffusion) can be included +in a PyClaw simulation by providing an appropriate function handle to + + * solver.step_source if using Classic Clawpack. In this case, the function + specified should modify q by taking a step on the equation :math:`q_t = \psi(q)`. + + * solver.dq_src if using SharpClaw. In this case, the function should + return :math:`\Delta t \cdot \psi(q)`. + +For an example, see pyclaw/examples/euler_2d/shockbubble.py. + +Setting up the Makefile +=============================== +Generally you can just copy the Makefile from an example in pyclaw/examples and +replace the value of `RP_SOURCES`. Make sure the example you choose has the +same dimensionality. Also be sure to use the f-wave targets if your Riemann +solver is an f-wave solver. + + diff --git a/v5.10.x/_sources/pyclaw/rp.rst.txt b/v5.10.x/_sources/pyclaw/rp.rst.txt new file mode 100644 index 0000000000..719be571cd --- /dev/null +++ b/v5.10.x/_sources/pyclaw/rp.rst.txt @@ -0,0 +1,116 @@ +:group: pyclaw + +.. _pyclaw_rp: + +====================== +Riemann Solver Package +====================== + +This package contains all of the Python-based Riemann solvers. Each +module solves the Riemann solver for a particular system of hyperbolic +equations. The solvers all have a common function signature:: + + rp__d(q_l,q_r,aux_l,aux_r,problem_data) + +with ```` replaced with the appropriate solver name and ```` with +the appropriate dimension. + +:Input: + - *q_l* - (ndarray(...,num_eqn)) Contains the left states of the Riemann problem + - *q_r* - (ndarray(...,num_eqn)) Contains the right states of the Riemann problem + - *aux_l* - (ndarray(...,num_aux)) Contains the left values of the auxiliary array + - *aux_r* - (ndarray(...,num_aux)) Contains the right values oft he auxiliary array + - *problem_data* - (dict) Dictionary containing miscellaneous data which is + usually problem dependent. + +:Output: + - *wave* - (ndarray(...,num_eqn,num_waves)) Contains the resulting waves from the cell + edge + - *s* - (ndarray(...,num_waves)) Speeds of each wave + - *amdq* - (ndarray(...,num_eqn)) Left going fluctuation + - *apdq* - (ndarray(...,num_eqn)) Right going fluctuation + +Except for *problem_data*, all of the input and output values are arrays whose +elements represent grid values with locations indicated by the following scheme +:: + + Indexing works like this: here num_ghost=2 as an example + 0 1 2 3 4 mx+num_ghost-2 mx+num_ghost mx+num_ghost+2 + | mx+num_ghost-1 | mx+num_ghost+1 + | | | | | ... | | | | | + 0 1 | 2 3 mx+num_ghost-2 |mx+num_ghost + mx+num_ghost-1 mx+num_ghost+1 + + The top indices represent the values that are located on the grid + cell boundaries such as waves, s and other Riemann problem values, + the bottom for the cell centered values. In particular the ith grid cell + boundary has the following related information: + i-1 i i+1 + | | | + | i-1 | i | + | | | + Again, grid cell boundary quantities are at the top, cell centered + values are in the cell. + +.. note:: + + The values ``q_l[i]``, ``q_r[i]`` are the left and right states, respectively, of + the ``ith`` Riemann problem. This convention is different than that used in + the Fortran Riemann solvers, where ``q_l[i]``, ``q_r[i]`` are the values at the + left and right edges of a cell. + +All of the return values (waves, speeds, and fluctuations) are indexed by cell edge +(Riemann problem being solved), with ``s[i]`` referring to the wave speed at interface +$i-1/2$. This follows the same convention used in the Fortran solvers. + +See [LeVeque_book_2002]_ for more details. + +List of available Riemann solvers: + + * Acoustics_ + * Advection_ + * `Burgers Equation`_ + * `Euler Equations`_ + * `Shallow Water Equations`_ + +.. _Acoustics: + +:mod:`Acoustics ` +================================================ + +.. automodule:: clawpack.riemann.acoustics_1D_py + :members: + +.. _Advection: + +:mod:`Advection ` +================================================ + +.. automodule:: clawpack.riemann.advection_1D_py + :members: + +.. _`Burgers Equation`: + +:mod:`Burgers Equation ` +===================================================== + +.. automodule:: clawpack.riemann.burgers_1D_py + :members: + +.. _`Euler Equations`: + +:mod:`Euler Equations ` +================================================== + +.. automodule:: clawpack.riemann.euler_1D_py + :members: + +.. _`Shallow Water Equations`: + +:mod:`Shallow Water Equations ` +============================================================ + +.. automodule:: clawpack.riemann.shallow_1D_py + :member-order: groupwise + :members: + diff --git a/v5.10.x/_sources/pyclaw/solution.rst.txt b/v5.10.x/_sources/pyclaw/solution.rst.txt new file mode 100644 index 0000000000..70bcd3f147 --- /dev/null +++ b/v5.10.x/_sources/pyclaw/solution.rst.txt @@ -0,0 +1,53 @@ +:group: pyclaw + +.. _pyclaw_solution: + +**************** +PyClaw Solutions +**************** + +PyClaw :class:`~pyclaw.solution.Solution` objects are containers for +:class:`~pyclaw.state.State` and :class:`~pyclaw.geometry.Domain` objects +that define an entire solution. +The :class:`~pyclaw.state.State` class is responsible for containing all +the data of the solution on the given :class:`~pyclaw.geometry.Domain`. +The :class:`~pyclaw.geometry.Domain` is responsible for containing +the geometry of the :class:`~pyclaw.solution.Solution`. The structure of a +solution may look something like the :ref:`figure `. + +.. _pyclaw_solution_structure: + +.. figure:: images/pyclaw_solution_structure.png + :align: center + + Pyclaw solution structure including a :class:`~pyclaw.geometry.Domain`, + a set of :class:`~pyclaw.geometry.Patch` objects and corresponding + :class:`~pyclaw.geometry.Dimension` objects defining the solution's + geometry and three :class:`~pyclaw.state.State` objects pointing to + the appropriate :class:`~pyclaw.geometry.Patch` with varying fields. + + +List of serial and parallel objects in a :class:`~pyclaw.solution.Solution` class: + ++------------------------------------+-------------------------------------+ +| Serial | Parallel | ++====================================+=====================================+ +| :class:`pyclaw.state.State` | :class:`petclaw.state.State` | ++------------------------------------+-------------------------------------+ +| :class:`pyclaw.geometry.Domain` | :class:`petclaw.geometry.Domain` | ++------------------------------------+-------------------------------------+ +| :class:`pyclaw.geometry.Patch` | :class:`petclaw.geometry.Patch` | ++------------------------------------+-------------------------------------+ +| :class:`pyclaw.geometry.Grid` | | ++------------------------------------+-------------------------------------+ +| :class:`pyclaw.geometry.Dimension` | | ++------------------------------------+-------------------------------------+ + +.. _Solution: + +:class:`pyclaw.solution.Solution` +================================= + +.. autoclass:: clawpack.pyclaw.solution.Solution + :members: + :member-order: groupwise diff --git a/v5.10.x/_sources/pyclaw/solvers.rst.txt b/v5.10.x/_sources/pyclaw/solvers.rst.txt new file mode 100644 index 0000000000..9228abc2a3 --- /dev/null +++ b/v5.10.x/_sources/pyclaw/solvers.rst.txt @@ -0,0 +1,167 @@ +:group: pyclaw + +.. contents:: + +.. _solvers: + +********************************************** +Using PyClaw's solvers: Classic and SharpClaw +********************************************** + +At present, PyClaw includes two types of solvers: + + * Classic: the original Clawpack algorithms, in 1/2/3D + * SharpClaw: higher-order wave propagation using WENO reconstruction and + Runge-Kutta integration, in 1/2D + + +Solver initialization takes one argument: a Riemann solver, usually +from the Riemann repository. +Typically, all that is needed to select a different solver is to specify +it in the problem script, e.g. + +.. doctest:: + + >>> from clawpack import pyclaw + >>> from clawpack import riemann + >>> solver = pyclaw.ClawSolver2D(riemann.acoustics_2D) + +for the 2D acoustics equations and the Classic Clawpack solver or + +.. doctest:: + + >>> solver = pyclaw.SharpClawSolver2D(riemann.acoustics_2D) + +for the SharpClaw solver. Most of the applications distributed with PyClaw +are set up to use either solver, depending on the value of the command line option +`solver_type`, which should be set to `classic` or `sharpclaw`. + +Typically, for a given grid resolution, the SharpClaw solvers are more accurate +but also more computationally expensive. +For typical problems involving shocks, the Classic solvers are recommended. +For problems involving high-frequency waves, turbulence, or smooth solutions, +the SharpClaw solvers may give more accurate solutions at less cost. This +is an active area of research and you may wish to experiment with both solvers. + +Future plans include incorporation of finite-difference and discontinuous Galerkin +solvers. + +Key differences between the Classic and SharpClaw solvers are: + + * The source term routine for the Classic solver should return the integral of + the source term over a step, while the source term routine for SharpClaw + should return the instantaneous value of the source term. For Classic, + the source term function is set using `solver.step_source`, while for + SharpClaw it is set using `solver.dq_src`. The `shock-bubble interaction + example `_ + shows how to use each of these. + + * The solvers have different options. For a list of options and possible + values, see the documentation of the :class:`~pyclaw.classic.solver.ClawSolver` and + :class:`~pyclaw.sharpclaw.solver.SharpClawSolver` classes. + + +.. _sharpclaw_solvers: + +=============================== +SharpClaw Solvers +=============================== + +The SharpClaw solvers are a collection of solvers that contain the +functionality of the Fortran code SharpClaw, developed in David Ketcheson's +thesis. The 1D SharpClaw solver contains a pure Python implementation as +well as a wrapped Fortran version. The 2D solver is in progress but not +available yet. The SharpClaw solvers provide an interface similar to that +of the classic Clawpack solvers, but with a few different options. +The superclass solvers are not meant +to be used separately but are there to provide common routines for all the +Clawpack solvers. Please refer to each of the inherited classes for more info +about the methods and attributes they provide each class. +.. The inheritance structure is: + +.. .. inheritance-diagram:: pyclaw.sharpclaw.solver.SharpClawSolver1D pyclaw.sharpclaw.solver.SharpClawSolver2D + +:Example: + + This is a simple example of how to instantiate and evolve a solution to a + later time :math:`\text{t_end}` using the 1D acoustics Riemann solver. + +.. doctest:: + + >>> from clawpack import pyclaw + >>> solver = pyclaw.SharpClawSolver1D() # Instantiate a default, 1d solver + + >>> solver.evolve_to_time(solution,t_end) # Evolve the solution to t_end # doctest: +SKIP + + +:mod:`pyclaw.sharpclaw` +=============================== + +.. autoclass:: clawpack.pyclaw.sharpclaw.solver.SharpClawSolver + :members: + + + +.. _pyclaw_clawpack_solvers: + +=============================== +Pyclaw Classic Clawpack Solvers +=============================== + +The pyclaw classic clawpack solvers are a collection of solvers that represent +the functionality of the older versions of clawpack. It comes in two forms, a +pure python version and a python wrapping of the fortran libraries. All of the +solvers available provide the same basic interface and provide the same +options as the old versions of clawpack. The superclass solvers are not meant +to be used separately but there to provide common routines for all the +Clawpack solvers. Please refer to each of the inherited classes for more info +about the methods and attributes they provide each class. +.. The inheritance structure is: + +.. .. inheritance-diagram:: clawpack.pyclaw.classic.solver.ClawSolver1D clawpack.pyclaw.classic.solver.ClawSolver2D clawpack.pyclaw.classic.solver.ClawSolver3D + +:Example: + + This is a simple example of how to instantiate and evolve a solution to a + later time :math:`\text{t_end}` using the linearized 1d acoustics Riemann solver + +.. doctest:: + + >>> from clawpack import pyclaw + >>> solver = pyclaw.ClawSolver1D() # Instantiate a default, 1d solver + >>> solver.limiters = pyclaw.limiters.tvd.vanleer # Use the van Leer limiter + >>> solver.dt = 0.0001 # Set the initial time step + >>> solver.max_steps = 500 # Set the maximum number of time steps + +.. doctest:: + + >>> solver.evolve_to_time(solution,t_end) # Evolve the solution to t_end # doctest: +SKIP + + +:mod:`pyclaw.classic.solver` +============================= + +.. autoclass:: clawpack.pyclaw.classic.solver.ClawSolver + :members: + + +.. _pyclaw_clawpack_solvers_custom_BC_change: + +======================================= +Change to Custom BC Function Signatures +======================================= + +To allow better access to aux array data in the boundary condition functions +both the `qbc` and `auxbc` arrays are now passed to the custom boundary +condition functions. The new signature is + + def my_custom_BC(state, dim, t, qbc, auxbc, num_ghost): + ... + +and should be adopted as soon as possible. The old signature + + def my_custom_BC(state, dim, t, bc_array, num_ghost): + ... + +can still be used but a warning will be issued and the old signature will not be +supported when version 6.0 is released. This addition is available in versions > 5.2.0. diff --git a/v5.10.x/_sources/pyclaw/started.rst.txt b/v5.10.x/_sources/pyclaw/started.rst.txt new file mode 100644 index 0000000000..55ff12f920 --- /dev/null +++ b/v5.10.x/_sources/pyclaw/started.rst.txt @@ -0,0 +1,96 @@ +:group: pyclaw + +.. _pyclaw_installation: + +================== +Installing PyClaw +================== +The fastest way to install the latest release of PyClaw is:: + + pip install clawpack + +To get the latest development version, do this instead:: + + git clone git@github.com:clawpack/clawpack.git + cd clawpack + python setup.py install + +If you encounter any difficulties in the installation +process, please `contact us `_ or +`raise an issue `_. + +To run an example, launch an IPython session and then:: + + from clawpack.pyclaw import examples + claw = examples.shock_bubble_interaction.setup() + claw.run() + claw.plot() + +This will run the code and then place you in an interactive plotting shell. +To view the simulation output frames in sequence, simply press 'enter' +repeatedly. To exit the shell, type 'q'. For help, type '?' or see +:ref:`pyclaw_plotting`. + + +Dependencies: Python, gfortran, numpy, and matplotlib +-------------------------------------------------------- +PyClaw requires Python 2.7 or greater and a modern Fortran 95 +compiler. PyClaw is known to work with GNU gfortran 4.2 and higher and the IBM +XLF compiler. + + * `Python `_ version >= 2.7. + * `numpy `_ version >= 1.6. + * `matplotlib `_ version >= 1.0.1 + (optional -- only for plotting). + * `pip `_ + * A Fortran 90 compiler, such as gfortran version >= 4.2. + If you do not have one already, we recommend getting one via + `GCC Wiki GFortranBinaries `_. + +There are some additional dependencies for running in parallel; see +:ref:`parallel`. + + +Obtaining Python, numpy, and matplotlib ++++++++++++++++++++++++++++++++++++++++++++++++ +If you don't already have these on your system, we recommend +`Anaconda CE `_ or +`Enthought Canopy Express `_ +(both free). + + +Clawpack +----------------------------------------------------------- +PyClaw is part of Clawpack, which includes several other +packages; see :ref:`clawpack_components`. Note that the +installation instructions above will install PyClaw, +Riemann and VisClaw. If you also wish to use AMRClaw or +GeoClaw, you should follow the more general Clawpack +:ref:`installing`. + + +Testing your installation with nose +----------------------------------------------------------- +If you've manually downloaded the source, or cloned from Github, +then you can easily test your installation. +First install nose: :: + + pip install nose + +Then :: + + cd clawpack/pyclaw/examples + nosetests + +If you have followed the instructions for :ref:`parallel`, you can run the tests in parallel:: + + mpirun -n 4 nosetests + +.. note:: + + PyClaw automatically enables tests that require PETSc if it detects a + petsc4py installation. Otherwise, tests that use PETSc are disabled. + +Next steps +----------------------------------------------------------- +Now you're ready to set up your own PyClaw simulation. Try the :ref:`pyclaw_tutorial`! diff --git a/v5.10.x/_sources/pyclaw/state.rst.txt b/v5.10.x/_sources/pyclaw/state.rst.txt new file mode 100644 index 0000000000..5e6dec2586 --- /dev/null +++ b/v5.10.x/_sources/pyclaw/state.rst.txt @@ -0,0 +1,35 @@ +:group: pyclaw + +.. _pyclaw_state: + +************ +PyClaw State +************ + +The :class:`~pyclaw.state.State` object records the fields that exist on a given +:class:`~pyclaw.geometry.Patch`. These fields include ``q`` and ``aux``. The +:class:`~pyclaw.state.State` also includes references to the +:class:`~pyclaw.geometry.Patch` that the state belongs to. + +In parallel the :class:`~petclaw.state.State` +object also handles some of the parallel communication required of the state on the +given patch such that only the parts of the fields local to the process. If you +are interested in the geometry of the local state you can find it through the +:class:`~petclaw.geometry.Patch` object's reference to its own +:class:`~petclaw.geometry.Grid`. + +.. _State: + +Serial :class:`pyclaw.state.State` +================================== + +.. autoclass:: clawpack.pyclaw.state.State + :members: + :member-order: groupwise + +Parallel :class:`petclaw.state.State` +=========================================== + +.. autoclass:: clawpack.petclaw.state.State + :members: + :member-order: groupwise diff --git a/v5.10.x/_sources/pyclaw/troubleshooting.rst.txt b/v5.10.x/_sources/pyclaw/troubleshooting.rst.txt new file mode 100644 index 0000000000..3a5ac475c9 --- /dev/null +++ b/v5.10.x/_sources/pyclaw/troubleshooting.rst.txt @@ -0,0 +1,50 @@ +:group: pyclaw + +.. _troubleshooting: + +******************** +Troubleshooting +******************** + +This page lists some of the most common difficulties encountered in +installing and running PyClaw. If you do not find a solution for your +problem here, please e-mail the +`claw-users Google group `_. +You may also wish to consult the `list of known issues `_. + +Compilation errors +******************** +Two frequent sources of compilation error are: + + * Your environment variable FC is set to g77 or another Fortran 77 compiler. + FC should be undefined or set to a Fortran 90 compiler. + If you have installed gfortran, you could set:: + + $ export FC = gfortran + + in your .bash_profile (in mac) or .bashrc (in linux). + + * Conflicts between 32-bit and 64-bit files. This has been encountered on + Mac OS X with 32-bit Enthought Python. We recommend using a 64-bit Python + install, such as that available from Enthought (free for academics). + The 32-bit EPD has also been known to cause a plotting issue with PyClaw + in which plotting becomes extremely slow. + +Use Fortran-ordered arrays +*************************** +By default, Numpy arrays use C-ordering. But the arrays that store the solution +and coefficients in PyClaw (i.e., q and aux) must be initialized using Fortran +ordering, for compatibility with the Fortran routines and PETSc. Ordinarily, +this is handled automatically when you create a State or Solution object. +If you are manually creating arrays, be sure to pass the flag 'F' to specify +Fortran ordering. + +Installation +************ +When installing Clawpack, if you get an error message saying that +lblas or llapack is not found, please update your installation of Numpy +to at least version 1.8. You can do this via:: + + pip install -U numpy + +Then try the installation again. diff --git a/v5.10.x/_sources/pyclaw/tutorial.rst.txt b/v5.10.x/_sources/pyclaw/tutorial.rst.txt new file mode 100644 index 0000000000..d051f9cdff --- /dev/null +++ b/v5.10.x/_sources/pyclaw/tutorial.rst.txt @@ -0,0 +1,145 @@ +:group: pyclaw + +.. _pyclaw_tutorial: + +*********************************************** +PyClaw tutorial: Solve the acoustics equations +*********************************************** +PyClaw is designed to solve general systems of hyperbolic PDEs of the form + +.. math:: + \begin{equation} + \kappa(x) q_t + A(q,x) q_x = 0. + \end{equation} + +As an example, in this tutorial we'll set up a simulation that solves +the acoustics equations in one dimension: + +.. math:: + \begin{eqnarray} + &p_t + K u_x = 0\\ + &u_t + \frac{1}{\rho} p_x = 0 + \end{eqnarray} + +The key to solving a particular system of equations with PyClaw or other similar +codes is a Riemann solver. Riemann solvers for many systems are available as part +of the clawpack/riemann package. + +We'll assume that you've already followed the :ref:`pyclaw_installation` instructions. + +The following instructions show how to set up a problem step-by-step in an +interactive shell. See :ref:`acoustics_1d` for the full source on which this is based. + +The commands below should be typed at the Python prompt; we recommend using +IPython. + +.. doctest:: + + >>> from clawpack import pyclaw + >>> from clawpack import riemann + +The Solver +=========== +PyClaw includes various algorithms for solving hyperbolic PDEs; each is implemented +in a :class:`~pyclaw.solver.Solver` object. So the first step is to create a solver + +.. doctest:: + + >>> solver = pyclaw.ClawSolver1D(riemann.acoustics_1D) + +Next we set the boundary conditions. We'll use a wall (wall) +condition at the left boundary and a non-wall (zero-order extrapolation) +condition at the right boundary + +.. doctest:: + + >>> solver.bc_lower[0] = pyclaw.BC.wall + >>> solver.bc_upper[0] = pyclaw.BC.extrap + +The domain +============== +Next we need to set up the grid. We do so by defining the +physical domain and the computational resolution. We'll +use the interval :math:`(-1,1)` and 200 grid cells: + +.. doctest:: + + >>> domain = pyclaw.Domain([-1.0], [1.0], [200]) + +Notice that the calling sequence is similar to numpy's ``linspace`` command. + +Finally, we set up a :class:`~pyclaw.Solution` +object, which will hold the solution values: + +.. doctest:: + + >>> solution = pyclaw.Solution(solver.num_eqn, domain) + +Initial condition +================= +Now we will set the initial value of the solution + +.. doctest:: + + >>> state = solution.state + >>> xc = state.grid.p_centers[0] # Array containing the cell center coordinates + >>> from numpy import exp + >>> state.q[0,:] = exp(-100 * (xc-0.75)**2) # Pressure: Gaussian centered at x=0.75. + >>> state.q[1,:] = 0. # Velocity: zero. + + +Problem-specific parameters +=========================== +The acoustics equations above have some coefficients -- namely, the +bulk modulus :math:`K` and density :math:`\rho` -- that must be defined. +Furthermore, checking the code for the Riemann solver we've chosen +reveals that it expects us to provide values for the impedance :math:`Z` +and sound speed :math:`c`. These values are stored in a Python dictionary +called problem_data that is a member of the :class:`~pyclaw.state.State` + +.. doctest:: + + >>> from math import sqrt + >>> rho = 1.0 + >>> bulk = 1.0 + >>> state.problem_data['rho'] = rho + >>> state.problem_data['bulk'] = bulk + >>> state.problem_data['zz'] = sqrt(rho*bulk) + >>> state.problem_data['cc'] = sqrt(bulk/rho) + +The controller +=================== +The most convenient way to run a PyClaw simulation is by using a +:class:`~pyclaw.controller.Controller` object. The controller +directs the solver in advancing the solution and handles output. + +.. doctest:: + + >>> controller = pyclaw.Controller() + >>> controller.solution = solution + >>> controller.solver = solver + >>> controller.tfinal = 1.0 + +At last everything is set up! Now run the simulation + +.. doctest:: + + >>> status = controller.run() + +This should print out a few lines indicating the output times. It also prints +the minimum and maximum tipe-step used, the number of steps required for the +computation and the maximum CFL number. The simplest way to plot the solution +is + +.. doctest:: + + >>> from clawpack.pyclaw import plot + >>> plot.interactive_plot() # doctest: +SKIP + + +That's it! Your first PyClaw simulation. Of course, we've only +scratched the surface of what PyClaw can do, and there are many +important options that haven't been discussed here. To get an +idea, take a look through the pyclaw/examples directory and try running +some other examples. It's also a good idea to get more deeply +acquainted with the main :ref:`pyclaw_classes`. diff --git a/v5.10.x/_sources/pyclaw/util.rst.txt b/v5.10.x/_sources/pyclaw/util.rst.txt new file mode 100644 index 0000000000..5a37534fea --- /dev/null +++ b/v5.10.x/_sources/pyclaw/util.rst.txt @@ -0,0 +1,13 @@ +:group: pyclaw + + .. _pyclaw_util: + +********************* +Pyclaw Utility Module +********************* + +:mod:`pyclaw.util` +============================= + +.. automodule:: clawpack.pyclaw.util + :members: diff --git a/v5.10.x/_sources/python.rst.txt b/v5.10.x/_sources/python.rst.txt new file mode 100644 index 0000000000..9d356e23bf --- /dev/null +++ b/v5.10.x/_sources/python.rst.txt @@ -0,0 +1,68 @@ + + +.. _python: + +*************** +Python Hints +*************** + +.. _python-three: + +Dropping support for Python 2.7 +-------------------------------- + +As of Clawpack v5.7.0 we are no longer supporting Python 2.7, and +Python 3.x is expected, see :ref:`release_5_7_0`. At this point we +believe v5.7.0 still works with Python 2.7, but we are phasing out +testing this in the future. + +This is consistent with the fact that Python 2.7 itself will not be +maintained beyond January, 2020, and most package we rely on (e.g. +numpy, matplotlib, jupyter) are also ceasing support for Python 2.7, +see https://python3statement.org/ + +Hence we view Clawpack version 5.6.x as the end of the line for Python +2 support (probably 5.6.1 unless there's a strong need to update this +further). Clawpack 5.6.x will continue to be available, of course, +but in order to take advantage of future improvements to Clawpack (and +most other Python packages) we strongly suggest that you start +converting all of your codes to work in Python 3 if you haven't +already. Often this only requires changing print statements to print +functions, but there are a few other changes. See e.g., +https://docs.python.org/3/howto/pyporting.html +and other online resources discussing the differences between Python 2 and 3. + + +References and tutorials +------------------------ + +For use with Clawpack, you will need the `Numpy +`_ module (*Numerical Python*) +that allows working with arrays in much the same way as in Matlab. +This is distributed as part of +`SciPy `_ (*Scientific Python*). +See the `Installing SciPy `_ +page for tips installing SciPy and NumPy on various platforms. + +For plotting you will also need the `matplotlib +`_ module which provides Matlab-like +plotting commands for 1d and 2d plots (e.g. contour and pcolor plots). + +Some useful links to get started learning Python: + + * `NumPy User Guide `_ + * `NumPy for Matlab users `_ + * `SciPy Reference Guide `_ + * `Matplotlib gallery `_ + * `LeVeque's class notes + `_ + + + +Notebooks +--------- + +The `Clawpack Gallery of Jupyter +Notebooks `__ +contains a number of notebooks with other examples of using Python for +Clawpack. diff --git a/v5.10.x/_sources/python_path.rst.txt b/v5.10.x/_sources/python_path.rst.txt new file mode 100644 index 0000000000..dc2d4a8997 --- /dev/null +++ b/v5.10.x/_sources/python_path.rst.txt @@ -0,0 +1,205 @@ +:orphan: + +.. _python_path: + +Python path +=========== + + +When using PyClaw or other Python tools from Clawpack (e.g. the +visualization tools in VisClaw or :ref:`topotools` from GeoClaw), you need +to be able to import various modules. + +For a general discussion of importing Python modules, see the tutorial in the +`Python3 documentation `_. + +Below are some hints in case you run into problems with import statements +with modules not being found, or being imported from the wrong version of +Clawpack (if you have more than one on your computer). + +.. _whichclaw: + +whichclaw.py +------------ + +The script `$CLAW/clawutil/src/python/clawutil/whichclaw.py` may be useful in +debugging paths. It prints out information on how various paths and environment +variables are set. (Available starting in Version 5.4.0.) + +Sample output:: + + $ python $CLAW/clawutil/src/python/clawutil/whichclaw.py + + `import clawpack` imports from: + /Users/rjl/clawpack_src/clawpack-v5.5.0 + + The CLAW environment variable is set to: + /Users/rjl/D/clawpack-v5.5.0 + The PYTHONPATH environment variable is not set + + The following directories on sys.path might contain clawpack, + and are searched in this order: + /Users/rjl/clawpack_src/clawpack-v5.5.0 + + The following easy-install.pth files list clawpack: + /Users/rjl/Library/Python/2.7/lib/python/site-packages/easy-install.pth + (points to /Users/rjl/clawpack_src/clawpack-v5.5.0) + +Beware if there seems to be a conflict (e.g. between where the `CLAW` +environment variable points and where Python imports from). +See below for more about `sys.path` and `easy-install.pth` files. + +Which version was imported? +--------------------------- + +Try the following in a Python (or IPython) shell:: + + >>> import clawpack + >>> clawpack.__file__ + +This should print out something like:: + + '/Users/rjl/clawpack_src/clawpack-v5.5.0/clawpack/__init__.py' + +This shows where clawpack is being imported from. In this case the +directory `/Users/rjl/clawpack_src/clawpack-v5.5.0` is the directory +normally referred to as `$CLAW` in this documentation. Within this +directory, there is a subdirectory `$CLAW/clawpack` that contains a file +`__init__.py`, which is a standard Python way of indicating that the files +in the directory should be handled as a Python package. + +The directory `$CLAW` (top level of Clawpack code) +must be in the Python search path in order for this import statement to work. +The Python command `import clawpack` searches through all directories in +this path looking for the first one that contains a subdirectory named +`clawpack` containing a file `__init__.py`, (or a file named `clawpack.py`, +but in this case it should find the `$CLAW/clawpack` directory). + +.. warning :: Up to version 5.5.0, + the directory `$CLAW/clawpack` also contains symbolic links to other + directories within the Clawpack repository hierarchy that contain + other Python modules. This allows you to do, for example:: + + >>> from clawpack import pyclaw + >>> pyclaw.__file__ + + '/Users/rjl/clawpack_src/clawpack-v5.5.0/clawpack/pyclaw/__init__.py' + +Starting in Version 5.6.0, symbolic links in `$CLAW/clawpack` +have been eliminated. +Instead `$CLAW/clawpack/__init__.py` includes a dictionary of subpackages with +the relative path indicated in this file:: + + >>> import clawpack + >>> clawpack._subpackages + {'forestclaw': 'pyclaw/src', 'amrclaw': 'amrclaw/src/python', 'riemann': 'riemann', + 'pyclaw': 'pyclaw/src', 'classic': 'classic/src/python', 'visclaw': 'visclaw/src/python', + 'clawutil': 'clawutil/src/python', 'petclaw': 'pyclaw/src', 'geoclaw': 'geoclaw/src/python'} + + + +**Example:** Suppose you want to examine the Python code for the `Iplotclaw` +module of VisClaw (see :ref:`plotting_Iplotclaw`). You can figure out where +this code is via:: + + >>> from clawpack.visclaw import Iplotclaw + >>> Iplotclaw.__file__ + +Alternatively, in IPython you could examine this code directly via:: + + In [1]: from clawpack.visclaw import Iplotclaw + In [2]: Iplotclaw?? + + +sys.path +-------- + +To examine the Python search path, you can do:: + + >>> import sys + >>> sys.path + +This should print out a list of strings. The first string in the list is +probably the empty string, indicating that the current working directory +should be searched first. The remaining strings are paths in your file +system. + +You should see that the directory referred to as `$CLAW` in this +documentation is in the path. + +If you have multiple versions of Clawpack on your computer and Python seems +to be importing from the wrong place, check the path. +Directories are searched in the order listed in `sys.path`. + + +easy-install.pth +---------------- + +If you used `pip` to install Clawpack (following :ref:`installing_pip`), +then the path to the installed version will may be added to the file +`easy-install.pth` located in the `site-packages` directory. If you want +to switch to a different version you may need to either use `pip` again, +or remove this line from `site-packages/easy-install.pth`, or execute +`pip uninstall clawpack`. + +The :ref:`whichclaw` command is useful for determining where the +`site-packages/easy-install.pth` is located. + +More generally, to find `site-packages/easy-install.pth`, +use this these commands in Python:: + + >>> import site + >>> site.getusersitepackages() + +this will tell you where the users' `site-packages` directory is. If you +installed using the `--user` flag in the `pip install`, then it is the +`easy-install.pth` in this directory that contains the path. + +If you installed without the `--user` flag, then then system-wide +`site-packages/easy-install.pth` file has been modified. You can find the +path to this via:: + + >>> import site + >>> site.getsitepackages() + + + +PYTHONPATH +---------- + +If you install Clawpack with pip, then you do not need to include it in +environment variable `PYTHONPATH`. + +Setting the environment variable `PYTHONPATH` is often +considered bad practice in the Python community +and can lead to problems, see for example +`PYTHONPATH Considered Harmful `_. + + +In spite of the possible drawbacks, some Clawpack developers often +use `PYTHONPATH` to switch versions without difficulty, particularly +when using one of the :ref:`installing_fortcodes` rather than pip. + +If you do wish to use it, you should set `PYTHONPATH` to point to the top +level of the clawpack directory for the code you wish to use. +Then use the :ref:`whichclaw` utility to check that this is where Clawpack +is imported from, and there is not an `easy-install.pth` file generated by +pip that points to a different location. + +If you have an environment variable `PYTHONPATH` set, the paths specified +here may be searched before or after what is specified in the users' +`site-packages/easy-install.pth`, depending on how you set `PYTHONPATH`. +See also +https://docs.python.org/3/using/cmdline.html#environment-variables. +Hence trying to use `PYTHONPATH` if you have also used pip to install a +different version of Clawpack can lead to confusion. + +To see if this environment variable is set, in the bash shell you can do:: + + $ echo $PYTHONPATH + +or use the :ref:`whichclaw` utility to report this, along with any other +possibly conflicting `easy-install.pth` files. + +See :ref:`setenv` for information on setting environment variables. + diff --git a/v5.10.x/_sources/qinit_defaults.rst.txt b/v5.10.x/_sources/qinit_defaults.rst.txt new file mode 100644 index 0000000000..27eef44cd8 --- /dev/null +++ b/v5.10.x/_sources/qinit_defaults.rst.txt @@ -0,0 +1,41 @@ +:orphan: + +.. _qinit_defaults: + +====================== +qinit default routines +====================== + +Below are links to the default `qinit` library routines for Classic and AMRClaw. + +These should never be used +as is, but rather copied to your application directory and modified to set +the initial conditions as desired. + + +- `$CLAW/classic/src/1d/qinit.f90 + `__ + +- `$CLAW/classic/src/2d/qinit.f90 + `__ + +- `$CLAW/classic/src/3d/qinit.f90 + `__ + +(Note: these links are for the version checked in to the master branch. +You can select a different branch or tag from the GitHub page.) + + +.. _qinit_geoclaw: + +qinit routine in GeoClaw +------------------------ + +In GeoClaw, there is a library routine that +sets the surface elevation to sea level by default, and also has the option +of adding a perturbation as specified in the setrun file, see +:ref:`setrun_qinit`. + +- `$CLAW/geoclaw/src/2d/shallow/qinit.f90 + `__ + diff --git a/v5.10.x/_sources/quick_surge.rst.txt b/v5.10.x/_sources/quick_surge.rst.txt new file mode 100644 index 0000000000..0bb2136880 --- /dev/null +++ b/v5.10.x/_sources/quick_surge.rst.txt @@ -0,0 +1,55 @@ + + +.. _quick_surge: + +***************************************************************** +Quick start guide for storm surge modeling +***************************************************************** + +See also this `youtube video `__ +and the related materials from the `2020 GeoClaw Developers Workshop +`__. + +To get started with a storm surge computation it is best to refer to a previous +working example. For example, you might start with +`$CLAW/geoclaw/examples/storm-surge/ike`. There are also a number of additional +examples in the `$CLAW/geoclaw/examples/storm-surge` directory as well as some +in the `$CLAW/apps/surge-examples` directory (this is actually a repository of +examples that is actively updated). The primary input that one needs to provide +for a new example usually involves two data source + + - Topography data: Data that specifies the topography and bathymetry of the + region around the area of interest. For storm surge computations it is + generally good practice to include entire oceanic basins so that you can + ensure that flow into and out of the basin is resolved by the computation + and is sufficiently distant from the computational domain's boundaries. + - Storm data: Of course we need to specify the particular storm that you + are interested in. There are a number of ways to specify a storm which + are described in :ref:`setrun_surge`. Sources for parameterized storms + can also be found in :ref:`surgedata` and a description of how to include + them in :ref:`_surge_module`. + +.. warning:: This is a work in progress and only partially has been filled out. + If you are interested in the rest of the steps or wish to contribute your + own workflow please let us know! + +Here we will concentrate on changing the Hurricane Ike example into one for +Hurricane Katrina. + +1. First copy the files located in the Hurricane Ike directorty located at + `$CLAW/geoclaw/examples/storm-surge/ike`. + +2. Next let's find some better topography for the New Orleans area... + +3. Now let's find a storm specification for Hurricane Katrina. In this + example we will use the ATCF database. For Katrina this ends up being + the file located `here <>`_. + +4. We now need to modify the `setrun.py` to use our new storm format and + topography we now added... + +5. Finally we need to also modify the plotting so that we have an + +6. Gauges... + +7. Running the simulation... diff --git a/v5.10.x/_sources/quick_tsunami.rst.txt b/v5.10.x/_sources/quick_tsunami.rst.txt new file mode 100644 index 0000000000..71a0c19174 --- /dev/null +++ b/v5.10.x/_sources/quick_tsunami.rst.txt @@ -0,0 +1,34 @@ + + +.. _quick_tsunami: + +***************************************************************** +Quick start guide for tsunami modeling +***************************************************************** + + +.. warning:: As with all of Clawpack, this code is provided as a research + and teaching tool with no guarantee of suitability for any particular + purpose, and no liability on the part of the authors. See the + :ref:`license` for more details. + + +As always, the best way to get started is to copy a working example and +modify it to do what you want. For example, you might start with +`$CLAW/geoclaw/examples/tsunami/chile2010`. + +If you clone the :ref:`apps` then there are two Jupyter notebooks that +illustrate how to make some simple changes to the setup for this example, +and lead you through some exercises: + + - `$CLAW/apps/notebooks/geoclaw/chile2010a/chile2010a.ipynb` + - `$CLAW/apps/notebooks/geoclaw/chile2010b/chile2010b.ipynb` + +To work with :ref:`topo` data and :ref:`okada`, see also the +tutorials + + - `$CLAW/apps/notebooks/geoclaw/topotools_examples.ipynb` + - `$CLAW/apps/notebooks/geoclaw/dtopotools_examples.ipynb` + - `$CLAW/apps/notebooks/geoclaw/Okada.ipynb` + +These are also visible online, see :ref:`notebooks`. diff --git a/v5.10.x/_sources/refinement.rst.txt b/v5.10.x/_sources/refinement.rst.txt new file mode 100644 index 0000000000..52cc7e0910 --- /dev/null +++ b/v5.10.x/_sources/refinement.rst.txt @@ -0,0 +1,259 @@ + +.. _refinement: + +***************************************************************** +AMR refinement criteria +***************************************************************** + +Several parameters controlling refinement can be set in the `setrun` +function. See :ref:`setrun_amrclaw` for further description of these. +Many of the parameters discussed below are attributes of `rundata.amrdata` +in `setrun.py`. + +Every `regrid_interval` time steps on each level, the error is +estimated in all cells on grids at this level. Cells where some +refinement criteria are satisfied are flagged for refinement. Default +options for flagging are described below. Additional cells surrounding +the flagged cells are also flagged to insure that moving features +of the solution (e.g. shock waves) do not escape from the region +of refinement before the next regridding time. The number of buffer +cells flagged is specified by `regrid_buffer_width` and the number +of steps between regridding on each level is specified by +`regrid_interval`. Typically these are equal (assuming the Courant +number is close to 1) and taken to be some small integer such as 2 or 3. + +In addition to flagging individual cells based on the behavior of the +solution, it is also possible to specify that certain regions of the domain +should always be refined to a certain level (and/or never refined above +some level). This is described further in :ref:`refinement_regions`. +These regions are used in conjunction with the methods +described below to determine whether or not a given cell should be flagged +for refinement. + +The cells that have been flagged are then clustered into +rectangular regions to form grids at the next finer level. The clustering is +done in light of the tradeoffs between a few large grids (which usually +means refinement of many additional cells that were not flagged) or many +small grids (which typically results in fewer fine grid cells but more grids +and hence more overhead and less efficient looping over shorter rows of +cells). The parameter `clustering_cutoff` in amrNez.data is used to control this +tradeoff. At least this fraction of the fine grid cells should result from +coarse cells that were flagged as needing refinement. The value +clustering_cutoff = 0.7 is usually reasonable. + +.. _refinement_flagging: + +Flagging criteria +----------------- + +Two possible approaches to flagging individual +cells for refinement (based on the behavior of the solution) are built into +AMRClaw. (A different default approach is used in GeoClaw, see +:ref:`refinement_geoclaw`). + +**Note:** Starting in v5.6.0, a new approach is also available, see +:ref:`adjoint`. + +.. _refinement_flag2refine: + +flag2refine +^^^^^^^^^^^ + +One approach to flagging cells for refinement (the default used in +most examples) is to set `flag2refine == True` and specify +a tolerance `flag2refine_tol`. This indicates that the +library subroutine `$CLAW/amrclaw/src/Nd/flag2refine.f90` should +be used to flag cells for refinement. This routine computes the +maximum max-norm of the undivided difference of :math:`q_{i,j}` +based its four neighbors in two space dimensions (or 6 neighbors in +3d). If this is greater than the specified tolerance, then the +cell is flagged for refinement (subject to limitations imposed by +"regions"). The undivided difference (not divided by the mesh +width) is used, e.g. :math:`|q(m,i+1,j) - q(m,i-1,j)|` for each +component :math:`m`. + +Note that the user can change the criterion used for flagging cells by +modifying this routine -- best done by copying the library routine to your +application directory and modifying the `Makefile` to point to the modified +version. + +.. _refinement_richardson: + +Richardson extrapolation +^^^^^^^^^^^^^^^^^^^^^^^^^ + +The second approach to flagging individual cells is based on using Richardson +extrapolation to estimate the error in each cell. This is used if +`flag_richardson == True`. In this case a cell is flagged if the error +estimate exceeds the value `flag_richardson_tol`. +Richardson estimation requires taking two time steps on the current grid and +comparing the result with what’s obtained by taking one step on a coarsened +grid. +One time step on the fine grid is re-used, so only one additional time step +on the fine grid and one on a coarsened grid are required. +It is somewhat more expensive than the `flag2refine` approach, +but may be more useful for cases where the solution is smooth and undivided +differences do not identify the regions of greatest error. + +**Note:** Both approaches can be used together: if +`flag2refine == True` and `flag_richardson == True` +then a cell will be flagged if either of the corresponding specified +tolerances is exceeded. + +.. _refinement_regions: + +Specifying AMR regions +---------------------- + +**New in Version 5.7.0:** Although the regions described here are still +supported in v5.7.0, a more general form of :ref:`flagregions` +are also now supported and are recommended in general rather than +using what is described below. + +In addition to specifying a tolerance or other criteria for flagging +individual cells as described above, it is possible to specify regions of +the domain so that all points in the region, over some +time interval also specified, will be refined to at least some level +*minlevel* and at most some level *maxlevel*. +These are specified through the parameter `rundata.regiondata.regions` in +`setrun.py`. +This is a list of lists, each of which specifies a region. A new region can +be added via:: + + rundata.regiondata.regions.append([minlevel,maxlevel,t1,t2,x1,x2,y1,y2]) + +This indicates that over the time period from `t1` to `t2`, cells in the +rectangle `x1 <= x <= x2` and `y1 <= y <= y2` should be refined to at least +`minlevel` and at most `maxlevel`. + +To determine whether a grid cell lies in one of the regions specified, the +center of the grid cell is used. If a mapped grid is being used, the limits +for the regions should be in terms of the computational grid coordinates, +not the physical coordinates. + +If a cell center lies in more than one specified region, then the +cell will definitely be flagged for refinement at level L (meaning it should +be covered by a Level L+1 grid) if *L+1 <= minlevel* for any of the regions, +regardless of whether the general flagging criteria hold or not. +This means the smallest of the various *minlevel* parameters for any region +covering this point will take effect. Conversely it will **not** +be flagged for refinement if *L+1 > maxlevel* for **all** regions that cover +this point. This means the largest of the various *maxlevel* parameters for +any region covering this point will take effect. +(However, note that since flagged cells are buffered as described above by +flagging some adjacent cells, a cell may still end up flagged for refinement +even if the above tests say it should not be.) + + +For example, suppose that `amr_levels_max = 6` has been specified along +with these two regions:: + + rundata.regiondata.regions.append([2, 5, 10.0, 30.0, 0.0, 0.5, 0.0, 0.5]) + rundata.regiondata.regions.append([3, 4, 20.0, 40.0, 0.2, 1.0, 0.2, 1.0]) + +The first region specifies that from time 10 to 30 there should be at least 2 +levels and at most 5 levels of refinement for points in the spatial domain +`0 < x < 0.5` and `0 < y < 0.5`. + +The second region specifies that from time 20 to 40 there should be at least 3 +level and at most 4 levels of refinement for points in the spatial domain +`0.2 < x < 1.0` and `0.2 < y < 1.0`. + +Note that these regions overlap in both space and time, and in regions of +overlap the *maximum* of the `minlevel` and also the *maximum* of the +`maxlevel` parameters applies. So in the above example, from time 20 to 30 +there will be at least 3 levels and at most 5 levels in the region of +overlap, `0.2 < x < 0.5` and `0.2 < y < 0.5`. + +Within these regions, how many levels are chosen at each point will be +determined by the *error flagging criteria*, i.e. by the default +or user-supplied routine :ref:`refinement_flag2refine`, or as +determined by :ref:`refinement_richardson`, as described above. + +Points that are not covered by either region are not constrained by the +regions at all. With `amr_levels_max = 6` then they might +be refined to any level from 1 to 6 depending on the error flagging criteria. + +Implementation +-------------- + +It is perhaps easiest to understand how this works by summarizing +the implementation. Note the order in which different flagging +criteria are checked was modified in Version 5.5.0 in order to avoid +the more expensive options for grid cells that are either forbidden +from being refined or forced to be refined based on `regions` they +lie in. + +The regridding algorithm from level L to L+1 loops over all grid patches +(in parallel when OpenMP is used with +more than one thread). The cells on each patch are initially marked with +`amrflags(i,j) = UNSET`, a special value (set in `amr_module.f90`). + +In flagging based on regions: + + * If the current level is less than the + maximum of all `minlevel` values for regions that contain the cell, then it + is marked with `amrflags(i,j) = DOFLAG`. + + * If the current level is greater than or equal to the + maximum of all `maxlevel` values for regions that contain the cell, then it + is marked with `amrflags(i,j) = DONTFLAG`. + +If there are any cells in the patch that are still marked as `UNSET` after +checking all the regions, then if the `setrun` parameter `flag2refine` is +True, then the routine `flag2refine` is called. +The user may wish to create their own version of this routine. +The default library version was modified with the addition of the adjoint +option in Version 5.6.0 (see :ref:`adjoint`), and does one of two things: + + * If `adjoint_flagging` then it checks the inner product of the forward + solution with all adjoints over the specified time period and if the + magnitude is greater than `tolsp` the cell is marked `DOFLAG`. + + * Otherwise, the undivided difference of all components of `q` in each + coordinate direction is computed, e.g. `abs(q(:,i+1,j) - q(:,i-1,j))` and + `abs(q(:,i,j+1) - q(:,i,j-1))` in 2d, and if the maximum of these is + greater than `tolsp` the cell is marked `DOFLAG`. + +If there are still any cells in the patch that are still marked as `UNSET`, +then if the `setrun` parameter `flag_richardson` is +True, then the routine `errest` is called. This does flagging based on +estimates of the one-step error produced by Richardson extrapolation using +the solution on the current grid and on a coarsened grid. If +`adjoint_flagging` then these estimates are applied to the inner product of +the error estimate with the adjoint solutions over the relevant time period. +In either case, the setrun parameter `flag_richardson_tol` is used as the +tolerance. + + + +.. _refinement_geoclaw: + +Flagging criteria in GeoClaw +----------------------------- + +In GeoClaw, a special `flag2refine` subroutine is defined. +A standard approach for modeling tsunamis propagating across the ocean +is to refine anywhere that the surface elevation of the ocean :math:`\eta = +h+B` is greater in absolute value than some specified `wave_tolerance`, e.g. +0.1 meter as set, for example, in the `setrun.py` file of +`$CLAW/geoclaw/examples/tsunami/chile2010`. +This `wave_tolerance` parameter can be set for any GeoClaw application. + +Often this ends up refining the entire ocean when in fact only some waves +are of interest. In this case one can use `regions` as described in +:ref:`flagregions` to limit refinement to certain space-time regions. + +Alternatively, starting in Version 5.6.0 one can use adjoint flagging (see +:ref:`adjoint`) to better select the waves that will reach a particular +location over a specified time range, including those that might reflect off +distant shores. + +Generally one must also use `regions` to allow (or force) much higher levels of +refinement over small regions along the coast if one is doing detailed +inundation modeling of a particular community. + + + + + diff --git a/v5.10.x/_sources/regression.rst.txt b/v5.10.x/_sources/regression.rst.txt new file mode 100644 index 0000000000..4237e907ba --- /dev/null +++ b/v5.10.x/_sources/regression.rst.txt @@ -0,0 +1,219 @@ +.. _regression: + +================== +Regression testing +================== + +.. contents:: + :depth: 2 + +Clawpack includes a number of tests that can be used to check for a working +installation or to see whether new changes to the code have broken anything. + +Running the tests +================= + +If you use multiple git branches, before running the tests you should check that +you have checked out appropriate branches of all relevant repositories; see :ref:`git_versions`. + +PyClaw +------ + +Regression tests can be performed via:: + + cd $CLAW/pyclaw/examples + nosetests + +For more details, see :ref:`pyclaw_testing`. +(You may need to install `nose `_ +if `nosetests` is not on your system.) + +Fortran codes +------------- + +A few quick tests can be perfomed of the `classic`, `amrclaw`, or `geoclaw` +codes by running `make tests` in the corresponding `tests` subdirectory, e.g.:: + + cd $CLAW/classic/tests + make tests + +This uses `nosetests` to run a few Python scripts that in turn run the +Fortran codes and then compare a small set of values derived from the output +of the run with values that are stored in these directories. +If one of these tests fails then there is a problem to be investigated, but +these tests do not provide good coverage of the code or check that +everything is working properly. + +A somewhat more complete set of tests can be run by executing all of the +codes in the `examples` subdirectories and comparing the resulting plots +with those archived in the :ref:`galleries`. An attempt at automating this +can be found in the `$CLAW/amrclaw/examples` directory, which uses the +`imagediff` tool described below. This is still under development. + + +Travis continuous integration +----------------------------- + +Most Clawpack git repositories now contain a file `.travis.yml` at the top +level so that every time a pull request is issued on Github, a basic set of +tests is run. This uses the `Travis continuous integration +`_ platform. Shortly after a PR is issued, Travis +will run the commands in the `.travis.yml` and report the results on the +PR page. Look for a green check mark (good) or a red X (bad) next to a commit +hash and click on it to see the Travis output. +`[Sample output] `_ + + +Diff tools for checking test output +=================================== + +chardiff tool for line-by-line comparison of output files +--------------------------------------------------------- + +If `_output_old` and `_output_new` are two sets of output files from old and +new versions of a code, then it is often useful to do a line by line +comparison of all of the files in each directory and display any +differences. Standard tools such as `xxdiff` in linux or `opendiff` on a +Mac are not very good for this since they try to match up blocks of lines to +give the best match and may not compare the files line by line. + +The Python script `$CLAW/clawutil/src/python/clawutil/chardiff.py` can be +used for this purpose:: + + $ python $CLAW/clawutil/src/python/clawutil/chardiff.py _output_old _output_new + +will create a new directory with html files showing all differences. It can +also be used to compare two individual files. See the docstring for more +details. + +imagediff tool for pixel comparison of plots +-------------------------------------------- + +If `_plots_old` and `_plots_new` contain two sets of plots that we hope are +identical, the Python script +`$CLAW/clawutil/src/python/clawutil/imagediff.py` can be used to compare +the corresponding images in each directory and produce html files +that show each pair of images side by side. If the images are not +identical it also shows an image indicating which pixels are different +in the two:: + + $ python $CLAW/clawutil/src/python/clawutil/imagediff.py _plots_old _plots_new + +will create a new directory with html files showing all differences. It can +also be used to compare two individual files. See the docstring for more +details. + + +.. _pyclaw_testing: + +Running and writing tests in PyClaw +=================================== + +Running the tests +----------------- + +The PyClaw test suite is built around `nosetests +`_ for automatic test discovery, with +supplementary functionality from the :mod:`pyclaw.util` module. To run the +complete test suite with helpful output, issue the following command at the +top-level of the pyclaw source directory:: + + nosetests -vs + +To run the parallel versions of the tests (if petsc4py is installed), run:: + + mpirun -n 4 nosetests -vs + +Replace 4 with the number of processes you'd like test on. +Try prime numbers if you're really trying to break things! + +The `-vs` switch tells nose to be verbose and to show you stdout, which can be +useful when debugging tests. To run the tests with less output, omit the +`-vs`. + +Running serial tests simultaneously +----------------------------------- + +When running the tests, if your machine has multiple cores you can take +advantage of them by doing:: + + nosetests -vs --processes=2 + +(replace "2" with the number of processes you want to spawn). However, using +large numbers of processes occasionally causes spurious failure of some tests +due to issues with the operating system. If you see this behavior, it's best +to run the tests in serial or with a small number of processes. + +Running a specific test +----------------------- + +The PyClaw tests are associated with particular applications in the examples/ sub- +directory of the primary repository directory. If you want to run tests for a +specific application, simply specify the directory containing the application +you are interested in:: + + nosetests -vs examples/acoustics_3d_variable + +You can also specify a single file to run the tests it contains. + +Doctests +-------- + +Several of the main PyClaw modules also have doctests (tests in their +docstrings). You can run them by executing the corresponding module:: + + cd $PYCLAW/src/pyclaw + python grid.py + python state.py + +If the tests pass, you will see no output. You can get more output by using +the `-v` option:: + + python state.py -v + +Writing New Tests +----------------- + +If you contribute new functionality to PyClaw, it is expected that you will also +write at least one or two new tests that exercise your contribution, so that +further changes to other parts of PyClaw or your code don't break your feature. + +This section describes some functions in `pyclaw.util` that facilitate testing. +You do not have to use any of the functionality offered by `pyclaw.util`, but it +may simplify your test-writing and allow you to check more cases than you would +easily specify by hand. + +The most important function in :mod:`pyclaw.util` is +:func:`pyclaw.util.gen_variants`, which allows you to perform combinatorial +testing without manually specifying every feature you'd like to perform. +Currently, :func:`~pyclaw.util.gen_variants` can multiplicatively exercise +kernel_languages (Fortran or Python) and pure PyClaw or PetClaw implementations. +This allows you to write one function that tests four variants. + +Another function provided by :mod:`~pyclaw.util` is +:func:`pyclaw.util.test_app`. The :func:`~pyclaw.util.test_app` function will +run an application as if started from the command line with the specified +keyword arguments passed in. This is useful for testing specific code that does +not necessarily work with :mod:`petclaw`, for example, and is not expected to. + +You will notice that both :func:`~pyclaw.util.gen_variants` and +:func:`~pyclaw.util.test_app` require a `verifier` method as an argument. +These functions both effectively run tests and verify output with the following +function calls:: + + output = application(**kwargs) + check_values = verifier(output) + +The `verifier` method needs to return `None` if there is no problem with the +output, or a sequence of three values describing what was expected, what it +received, and more details about the error. A very simple `verifier` method +that you can use is :func:`pyclaw.util.check_diff`, which can use either an +absolute tolerance or a relative tolerance to compare an expected value against +the test output from the application. + +See `examples/acoustics_1d_homogeneous/test_acoustics.py` for a comprehensive example +of how to use :func:`~pyclaw.util.gen_variants` and +:func:`~pyclaw.util.check_diff`. See `examples/shallow_sphere/test_shallow_sphere.py` +for an example that uses :func:`~pyclaw.util.test_app` and also loads a known +solution from disk using numpy. + diff --git a/v5.10.x/_sources/release_5_0_0.rst.txt b/v5.10.x/_sources/release_5_0_0.rst.txt new file mode 100644 index 0000000000..10edcd5b31 --- /dev/null +++ b/v5.10.x/_sources/release_5_0_0.rst.txt @@ -0,0 +1,25 @@ +:orphan: + +.. _release_5_0_0: + +========================== +v5.0.0 release notes +========================== + +Clawpack 5.0.0 was released on January 8, 2014. See :ref:`installing`. + +Clawpack 5.0 is a major reorganization of the Clawpack code base that has +been going on for several years. See :ref:`clawpack5` for an overview of +many of the major changes. + +Changes to classic, riemann, amrclaw, geoclaw, visclaw +------------------------------------------------------ + +Are summarized in :ref:`clawpack5`. + +Changes to PyClaw +------------------ + +For changes in PyClaw, see the `PyClaw changelog +`_. + diff --git a/v5.10.x/_sources/release_5_10_0.rst.txt b/v5.10.x/_sources/release_5_10_0.rst.txt new file mode 100644 index 0000000000..445de82915 --- /dev/null +++ b/v5.10.x/_sources/release_5_10_0.rst.txt @@ -0,0 +1,234 @@ +:orphan: + +.. _release_5_10_0: + +=============================== +v5.10.0 release notes +=============================== + +Clawpack 5.10.0 was released on XX. See :ref:`installing`. + +Permanent DOI: http://doi.org/10.5281/zenodo.XX + + +Changes relative to Clawpack 5.9.2 (November 4, 2023) are shown below. + +To see more recent changes that are in the the master branch but not yet +released, see :ref:`changes_to_master`. + + +Follow the links to see changes that have been made to the master branch of +each repository since the last release (v5.10.0) on XX. + +These changes should appear in the next release. If you need them now, +see :ref:`developers` for instructions on cloning and installing from the +master branch. + +To see documentation that has already been developed to accompany any new +features listed below, click on the "dev" branch of the documentation, in +the menu on the left hand side of this page. + +Changes that are not backward compatible +---------------------------------------- + +- The switch to meson made in v5.9.2 requires the installation of some + additional packages for developers or others who choose to clone the + repositories from Github. The instructions in :ref:`setup_dev` + now include instructions to:: + + pip install -r requirements-dev.txt + + as part of the installation. + +- In GeoClaw, when solving equations on the sphere, a spherical source term + in the mass equation is now included by default. This term was missing + previously and so results may change. + See https://www.clawpack.org/sphere_source.html for more discussion + and instructions for omitting this source term. + +Changes to classic +------------------ + +None. + +See `classic diffs +`_ + +Changes to clawutil +------------------- + +- `$CLAW/clawutil/src/Makefile.common`, the main Makefile imported by all + application Makefiles in the Fortran versions, has been improved: + + - When using `make new` to recompile all routines, after the modules are + compiled all other fortran source codes are compiled in parallel, + speeding up the process. + + - RUNEXE was added to provide a string to be inserted before the name + of the executable `EXE` in order to run it. This is necessary in + particular to run the new 2D Boussinesq code using MPI, see + :ref:`bouss2d` for instructions. + + (Support for this also added to + `$CLAW/clawutil/src/python/clawutil/runclaw.py`). + + - If `FC` is any variant of `gfortran` then use the same flags as + `gfortran`. + +- Support added to + `$CLAW/clawutil/src/python/clawutil/data.py` for `checkpt_style==4` + in AMRClaw and GeoClaw (see below), and also for the + `D-Claw code `_ + for granular-fluid flows, + which is being updated to work with the latest version of Clawpack. + This is still work in progress. + +- Other minor changes. + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + +- Change the default `plotfigure.facecolor` to white for plots made by `frametools.py` (rather than `clawpack_tan`). + +- Add hillshade option to `frametools.py` for better visualization of topography. + +- Add `imshow_norm` and `imshow_alpha` as ClawPlotItem attributes for imshow plots. + +- Remove deprecated `faceted` kwarg in calls to pcolor from `frametools.py`. + +- Option added to make mpeg movies when doing `make plots`. + Provided `ffmpeg `__ is installed, + simply include this line in `setplot.py`:: + + plotdata.mp4_movie = True + + Then `_plots` will include `movie_figN.mp4` for each `figno N` listed in :: + + plotdata.print_fignos + + and will also be linked from the `_PlotIndex.html` file. + + You can also now easily change the name of the movie (also for the .html + version created by JSAnimation and the .gif version if requested) via e.g.:: + + plotdata.movie_name_prefix = 'chile2010_' # default is 'movie_' + + Then `_plots` will include `chile2010_figN.mp4` for each figure. + +- Updates to matlab plotting routines. + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + +- New Riemann solver for the p-system. + +- Clean up some other things. + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + +- Bug fix for case when the domain is periodic only in x and not in y. + +- STOP feature added: If you create a (possibly empty) file named STOP in the + run directory then the code will stop at the end of the current coarse grid + time step, after writing a checkpoint file. Useful to kill a computation with + the ability to restart after fixing something. + + + +- Most routines in `$CLAW/amr/src/2d` were cleaned up to replace do loop labels + and closing continue statements with more modern `enddo`, avoiding + many warning messages when compiling the code. + (Still need to clean up 1d and 3d, and classic code, but this cleans up + GeoClaw compilation a lot.) + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + +- For shallow water equations on the sphere, a spherical source term + in the mass equation is now included by default. This term was missing + previously and so results may change. + See https://www.clawpack.org/sphere_source.html for more discussion + and instructions for omitting this source term. + +- 1D GeoClaw code added, as described at :ref:`geoclaw1d`. In particular there + are new directories `$CLAW/geoclaw/src/1d_classic` and + `$CLAW/geoclaw/examples/1d_classic`. + +- 1D Boussinesq code added in `$CLAW/geoclaw/src/1d_classic/bouss` and some of + the examples, as described in :ref:`bouss1d`. + +- 2D Boussinesq code added, as described in :ref:`bouss2d`. In particular there + are new directories `$CLAW/geoclaw/src/2d/bouss` and + `$CLAW/geoclaw/examples/2d/bouss`. + +- Using the 2D Boussinesq version of the code requires `PETSc + `__ for solving the large sparse linear systems + that arise, which also requires LAPACK, BLAS, and MPI; + see `Prerequisites for the 2d Boussinesq code `__. + +- `checkpt_style == 4` is now supported, meaning to create a checkpoint file + at every output time. (As with other options, setting it to -4 means to + checkpoint at the same times but to alternate between two checkpoint files + rather than creating a unique file for each checkpoint, greatly reducing + storage if you only need the latest one.) + +- Introduce `integer(kind=8)` variables for some `topo_module` variables to + handle very large topo files for which the index was overflowing. + +- Introduce STOP feature as described in above for amrclaw. + +- Improve calculation of number of steps to take (`ntogo`) when CFL number is + too large in one step. (Still have issues sometimes where code dies with + too many dt reductions....) + +- Fix bug in python function `clawpack.geoclaw.util.bearing` and introduce new + `clawpack.geoclaw.util.gctransect` to compute points along a great circle + transect connecting two points on the sphere. (Transects obtained by + linear interpolation in x,y are fine over small regions but not for + global-scale transects.) + +- Other minor bug fixes, improvements, and cleanup. + +See `geoclaw diffs `_ + + +Changes to PyClaw +------------------ + +None. + +See `pyclaw diffs `_ + +For older changes in PyClaw, see also the `PyClaw changelog +`_. + +=========================== +Other Clawpack Repositories +=========================== + +The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest. + +- `apps diffs + `_ + +- `doc diffs + `_ + shows changes in the `dev` branch not yet in the main version of the + documentation. + +- `docker-files diffs + `_ diff --git a/v5.10.x/_sources/release_5_1_0.rst.txt b/v5.10.x/_sources/release_5_1_0.rst.txt new file mode 100644 index 0000000000..fec88b46a8 --- /dev/null +++ b/v5.10.x/_sources/release_5_1_0.rst.txt @@ -0,0 +1,141 @@ +:orphan: + +.. _release_5_1_0: + +========================== +v5.1.0 release notes +========================== + + +Clawpack 5.1.0 was released on March 2, 2014. See :ref:`installing`. + + +Changes to classic +------------------ + +* None + +See `classic diffs +`_ + +Changes to clawutil +------------------- + +* Minor change for replacing a rundata object. + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + +* Replaced JSAnimation.IPython_display.py by improved version. + +* Added an attribute to `data.py`. + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + +* Changes to multi-layer code -- do not attempt to compile by default + since LAPACK is required. + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + +* Fixed the calling sequence where setaux is called two places in the + regridding routines. + +* Several other minor fixes. + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + +* Changed gauge output to avoid underflow in printing. + +* Major change to the way moving topography (dtopo) is handled to correct + problems observed with earlier versions of GeoClaw in which the moving + topography was not always tracked properly. A number of other + improvements were also made to the way topography more generally is + handled. Some improvements: + + * Multiple dtopo files can be specified with overlapping time ranges and + spatial extent. + * Each dtopo file now results in the automatic creation of a topo array + at the same resolution as the dtopo array that is updated before each + time step so that it contains the proper topography plus dtopo. + These arrays remain after the dtopo stops moving and contain the final + topography at the final time. This avoids issues where dtopo might + have been specified at much finer resolution than the topo files. (In + earlier versions, the topo arrays were updated to incorporate the + final topo+dtopo but only stored at the resolution of the original + topo files.) + * The routine for integrating the bilinear function defined by all + topo arrays over a grid cell to compute `aux(1,i,j)` has been improved + by making it a recursive function that can handle an arbitrary number + of nested topo grids (including those created automatically from dtopo + grids). Previous versions died if there were more than 4 nested topo + grids. + +* Several changes to the `Makefile` for a GeoClaw run are required because + of refactoring of this code. You must: + + * Remove the line :: + + $(GEOLIB)/dtopo_module.f90 \ + + * Replace the lines :: + + $(GEOLIB)/movetopo.f \ + $(GEOLIB)/cellgridintegrate.f \ + + by :: + + $(GEOLIB)/topo_update.f90 \ + $(GEOLIB)/cellgridintegrate2.f \ + + For an example, see the changes made to + `$CLAW/geoclaw/examples/tsunami/chile2010/Makefile`, + + As always, you should do `make new` in your application directory + after updating the version. + +* A new parameter has been added that can be set in `setrun.py`:: + + rundata.dtopo_data.dt_max_dtopo = 0.2 + + for example will specify that the maximum time step allowed on the + coarsest level is 0.2 seconds during the time when the topography is + moving. This avoids issues where the time step selected by the CFL + condition is much larger than the time scale over which the topography + changes. You must also set `rundata.clawdata.dt_initial` to the same + value (or smaller) to insure that the first time step is sufficiently small. + + + + +See `geoclaw diffs +`_ + +Changes to PyClaw +------------------ + + +* Added 3d capabilities to SharpClaw. + +* Many other minor fixes. + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs +`_ + diff --git a/v5.10.x/_sources/release_5_2_0.rst.txt b/v5.10.x/_sources/release_5_2_0.rst.txt new file mode 100644 index 0000000000..e64905822b --- /dev/null +++ b/v5.10.x/_sources/release_5_2_0.rst.txt @@ -0,0 +1,111 @@ +:orphan: + +.. _release_5_2_0: + +========================== +v5.2.0 release notes +========================== + +Clawpack 5.2.0 was released on July 18, 2014. See :ref:`installing`. + +Changes relative to Clawpack 5.1.0 (March 2, 2014) are shown below. + +Changes to classic +------------------ + +* Change max number of values printed on each line of `fort.q` files to 50. + +See `classic diffs +`_ + +Changes to clawutil +------------------- + +* Add `nohup` and `nice` options to `runclaw.py` + +* Some minor corrections. + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + +* Several minor improvements. + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + +* Some minor corrections. + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + +* Refactoring of code handling `aux` arrays when regridding. + Now allows `setaux` to check `aux(1,i,j)` to determine if the + values `aux(:,i,j)` need to be set or if this cell has already been set by + copying from `aux` arrays at the same level that existed before + regridding. It should always be ok to just set them, so this should be + backward compatible. But this allows avoiding recalculating `aux` values + unnecessarily in cases where this computation is very expensive. In + particular, this was done so that `geoclaw` does not need to recompute + cell averages of topography (see geoclaw changes below for more details). + +* Fixed (?) sphere boundary conditions for clamshell grids. + +* Change max number of values printed on each line of `fort.q` files to 50. + +* Several other minor fixes. + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + +* Refactoring of code handling `aux` arrays when regridding. + Now allows `setaux` to check `aux(1,i,j)` to determine if the + values `aux(:,i,j)` need to be set or if this cell has already been set by + copying from `aux` arrays at the same level that existed before + regridding. This is used in geoclaw to avoid recomputing cell averages of + topography, which requires integrating a piecewise bilinear function + formed from all the topography grids that overlap the grid cell. This + can be expensive particularly when a grid cell is covered by a finer + topography grid. + +* Several changes have been made to the `fgmax` routines that are used to + keep a running maximum of values over the entire calculation. + See :ref:`fgmax` for documentation on the latest version. + + +* Major refactoring of the module + `$CLAW/geoclaw/src/python/geoclaw/topotools.py`. + The file `$CLAW/geoclaw/tests/test_topotools.py` contains some tests of these + tools. Looking at these test routines will give some ideas on how to use them. + More documentation is needed. + +* Change max number of values printed on each line of `fort.q` files to 50. + +* Multilayer shallow water equations functionality and test problem added. + +* Several other corrections and minor improvements. + +See `geoclaw diffs +`_ + +Changes to PyClaw +------------------ + + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs +`_ + diff --git a/v5.10.x/_sources/release_5_2_1.rst.txt b/v5.10.x/_sources/release_5_2_1.rst.txt new file mode 100644 index 0000000000..6626a7cdb4 --- /dev/null +++ b/v5.10.x/_sources/release_5_2_1.rst.txt @@ -0,0 +1,77 @@ +:orphan: + +.. _release_5_2_1: + +============================ +v5.2.1 release notes +============================ + +Clawpack 5.2.1 was released on October 2, 2014. See :ref:`installing`. + +Changes relative to Clawpack 5.2.0 (July 18, 2014) are shown below. + + +Changes to classic +------------------ + +* Minor fix to limits of `dtdx1d` and `dtdy1d` arrays. + +See `classic diffs +`_ + +Changes to clawutil +------------------- + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + +* Added `JSAnimation_frametools.py` + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + +* Refactor multi-layer shallow water solvers +* 3d Euler fixes +* `rpn2_vc_advection` + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + +* Minor changes + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + +* Major changes to `topotools.py` and `dtopotools.py` modules, may not be + backwards compatible! + + See + - :ref:`topotools` for an overview and some examples, + - :ref:`topotools_module` + - :ref:`dtopotools_module` + +See `geoclaw diffs +`_ + +Changes to PyClaw +------------------ + + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs +`_ + diff --git a/v5.10.x/_sources/release_5_2_2.rst.txt b/v5.10.x/_sources/release_5_2_2.rst.txt new file mode 100644 index 0000000000..d4ec752afe --- /dev/null +++ b/v5.10.x/_sources/release_5_2_2.rst.txt @@ -0,0 +1,85 @@ +:orphan: + +.. _release_5_2_2: + +=============================== +v5.2.2 release notes +=============================== + +Clawpack 5.2.2 was released on October 28, 2014. +See :ref:`installing` and https://github.com/clawpack/clawpack/releases/. + +Changes relative to Clawpack 5.2.1 (October 2, 2014) are shown below. + + +Changes to classic +------------------ + + +See `classic diffs +`_ + +Changes to clawutil +------------------- + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + +* Fixed problem when a single time is specified in dtopo file and dtdtopo(m) = 0. + The example in `$CLAW/geoclaw/apps/tsunami/chile2010` was modified in 5.2.1 + to use this feature but it was not implemented properly. + See https://github.com/clawpack/geoclaw/pull/116. + +* Removed duplicate definition of RefinementData in `data.py` + +* Improved handling of ticklabels in topotools and dtopotools plotting. + See https://github.com/clawpack/geoclaw/pull/114. + +* Fixed a number of bugs in `fgmax_tools.py` that didn't work properly + for `point_style` taking values other than 2. Some new examples have + been added to `$CLAW/apps/tsunami` to illustrate the use of fgmax + monitoring. See: + + * :ref:`fgmax` + * :ref:`apps` + * :ref:`galleries` + +* Fixed other minor glitches. + +See `geoclaw diffs +`_ + + +Changes to PyClaw +------------------ + + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs +`_ + diff --git a/v5.10.x/_sources/release_5_3_0.rst.txt b/v5.10.x/_sources/release_5_3_0.rst.txt new file mode 100644 index 0000000000..9a3d7c4904 --- /dev/null +++ b/v5.10.x/_sources/release_5_3_0.rst.txt @@ -0,0 +1,196 @@ +:orphan: + +.. _release_5_3_0: + +========================== +v5.3.0 release notes +========================== + +Clawpack 5.3.0 was released on May 21, 2015. See :ref:`installing`. + +Changes relative to Clawpack 5.2.2 (October 28, 2014) are shown below. + +Changes to classic +------------------ + +* One example added with a pointwise Riemann solver. + +See `classic diffs `_ + +Changes to clawutil +------------------- + +* Added `nbtools.py` module for working with Jupyter (formerly IPython) + notebooks (still work in progress). + +* Added ability to correctly call alternative Makefiles, e.g. :: + + make .plots -f Makefile_kml + +* Added support for preprocessing variables and flags + +* Added support for storm surge code + +See `clawutil diffs `_ + +Changes to visclaw +------------------ + +* Added support for creating `kml` files that can be viewed on Google Earth + (for GeoClaw applications). See :ref:`googleearth_plotting`. + +* Added some support for JSAnimation in notebooks and other improvements, in + particular to insure that filenames do not have extraneous spaces and fail + to show up in animation. + +* Added support for ForestClaw + +* Added function `gaugetools.compare_gauges` and support for gauges in 3d. + +* Deprecate `plot_topo_file` and `TopoPlotData` in favor of + `topotools.Topography` methods. + +* Some refactoring and cleaning up of code, and minor bug fixes. + + +See `visclaw diffs `_ + +Changes to riemann +------------------ + +* Added 3d Euler equations in general geometries using f-waves. + +* Added 2d acoustics solvers for mapped grids. + +* Added some pointwise Riemann solvers for several problems in 1d and 2d. + +* Added `riemann_tools.py` and other code to facilitate showing Riemann + solutions in notebooks. Still work in progress. + +See `riemann diffs `_ + +Changes to amrclaw +------------------ + +* Substantial refactoring of code, much of which should be invisible to + users. + +* Some changes are required in any application `Makefile` to + update from 5.2.2 to 5.3.0. + + - In 2d, remove:: + + $(AMRLIB)/dumpgauge.f \ + + - In 2d, add the files:: + + $(AMRLIB)/stepgrid_dimSplit.f \ + $(AMRLIB)/step2x.f90 \ + $(AMRLIB)/step2y.f90 \ + $(AMRLIB)/flux2_dimSplit.f \ + + - In 3d, add the MODULE:: + + $(AMRLIB)/gauges_module.f90 + + somewhere **after** `$(AMRLIB)/amr_module.f90` in the list of modules. + + - In 3d, add the files:: + + $(AMRLIB)/stepgrid_dimSplit.f \ + $(AMRLIB)/step3x.f \ + $(AMRLIB)/step3y.f \ + $(AMRLIB)/step3z.f \ + $(AMRLIB)/flux3_dimSplit.f \ + + Here `AMRLIB = $(CLAW)/amrclaw/src/2d` in 2d, for example + +* Gauge output refactored. + +* Gauge output option added to 3d code. For an example, see + `$CLAW/amrclaw/examples/advection_3d_swirl/setrun.py` + +* Dimensional splitting option added to both 2d and 3d code. To use, in + `setrun.py` set `clawdata.dimensional_split` to `"split"` or `1`. + +* New approach to handling boundary conditions to fix bug where + boundary conditions varying spatially along a boundary could not be specified. + Illustrated in new `examples/advection_2d_inflow`. + +* `alloc` changed from pointer to allocatable, `igetsp` stack-based, + +* Several bug fixes, particularly in 3d code. + +See `amrclaw diffs `_ + +Changes to geoclaw +------------------ + +* Some changes are required in any application `Makefile` to + update from 5.2.2 to 5.3.0. + + - add the MODULEs:: + + $(GEOLIB)/gauges_module.f90 \ + $(GEOLIB)/surge/holland_storm_module.f90 \ + $(GEOLIB)/surge/stommel_storm_module.f90 \ + $(GEOLIB)/surge/constant_storm_module.f90 \ + $(GEOLIB)/surge/storm_module.f90 \ + $(GEOLIB)/friction_module.f90 + + - remove the MODULE:: + + $(AMRLIB)/gauges_module.f90 \ + + - remove the file:: + + $(GEOLIB)/dumpgauge.f \ + + Here `GEOLIB = $(CLAW)/geoclaw/src/2d/shallow`. + + Note that `$(GEOLIB)/gauges_module.f90` must come **after** both + ` $(AMRLIB)/amr_module.f90` and + `$(GEOLIB)/geoclaw_module.f90` in the list of modules. + +* Gauge output refactored as in `amrclaw`. Note it is now necessary to use + the version of `gauges_module.f90` in `geoclaw` rather than the version from + `amrclaw` since the subroutine for printing the gauges is now in this module + rather than in `dumpgauge.f`. In `geoclaw`, an additional column is + printed for `eta = B + h`, the sea surface, in addition to the + components of `q`. + +* Multilayer code merged in and several routines refactored or consolidated. + +* New support added for creating `kml` files for plotting results on Google + Earth. + +* Topography `topo_type` 2 and 3 are now more flexible: + + - The header lines can have either the number or the text first, e.g. :: + + NCOLS 200 + + or :: + + 200 NCOLS + + (In either case the label is ignored, the order of lines is all that + matters). Both Python and Fortran codes now support this. + + - The header line for the cellsize `dx` can now have a single value + or two values `dx` and `dy` for different resolutions in longitude and + latitude. Previously a single value was allowed and `dx == dy` assumed. + +* Added support for creating `kml` files that can be viewed on Google Earth + (for GeoClaw applications). See :ref:`googleearth_plotting`. + +See `geoclaw diffs `_ + +Changes to PyClaw +------------------ + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs `_ + diff --git a/v5.10.x/_sources/release_5_3_1.rst.txt b/v5.10.x/_sources/release_5_3_1.rst.txt new file mode 100644 index 0000000000..8d6fa7666b --- /dev/null +++ b/v5.10.x/_sources/release_5_3_1.rst.txt @@ -0,0 +1,129 @@ +:orphan: + +.. _release_5_3_1: + +========================== +v5.3.1 release notes +========================== + +Clawpack 5.3.1 was released on November 10, 2015. See :ref:`installing`. + +Changes relative to Clawpack 5.3.0 (May 21, 2015) are shown below. + +Changes to classic +------------------ + +Minor fixes and new testing framework. + +See `classic diffs `_ + +Changes to clawutil +------------------- + +Allow `checkpt_style < 0` in `setrun.py`, see Changes to amrclaw below. + +New testing framework. + +See `clawutil diffs `_ + +Changes to visclaw +------------------ + +Added `amr_data_show` attribute to `ClawPlotItem` to suppress certain amr levels in plotting. + +Read gauge locations from `setgauge.data` file found in `plotdata.outdir` (the +output directory where `fort.gauge` is located) rather +than from `datadir`. This works better if gauges are changed for new runs but +you want to plot old output, since the correct `setgauge.data` input for a run +is copied to the output directory at the start of the run. + +Fix `colormaps.add_colormap` function to work better for combining two +different colormaps for different ranges of a variable in certain cases. + +See `visclaw diffs `_ + +Changes to riemann +------------------ + +Added `src/riemann_interactive.py` for making interactive plots of the phase +plane in Jupyter notebooks. For an example, see +http://nbviewer.ipython.org/github/maojrs/ipynotebooks/blob/master/interactive_test.ipynb. + + +See `riemann diffs `_ + +Changes to amrclaw +------------------ + +Bug in 3d dimensional splitting fixed --- the CFL was computed incorrectly, +causing the code to use timesteps that are too large and go +unstable in some cases. + +Improved the checkpoint and restart capabilities, adding the option to set +`checkpt_style < 0` in `setrun.py` if you want the checkpoint to alternate +between two files rather than creating a unique new file each time a +checkpoint is done. This reduces storage needed if you want to checkpoint +frequently but only need the most recent one, e.g. to guard against crashes +in a long run. Two files are used in case the code crashes in the middle of +doing a checkpoint, the previous one is still intact. You can set +`checkpt_style = -2`, for example, to give the same behavior as +`checkpt_style = 2` but saving only two latest checkpoint files. + +With this feature turned on, instead of files with names like +`fort.chk00100` and `fort.tck00100` being created for a checkpoint +after 100 steps, the files are named either `fort.chkaaaaa, +fort.tckaaaaa` or `fort.chkbbbbb, fort.tckbbbbb` and these names +alternate. (The `fort.tck` files are very small with information +about the time of checkpointing, the solution data is all in the `fort.chk` file.) + +Also improved checkpointing so that the output files `fort.amr` and `fort.gauge` +have buffers flushed whenever checkpointing, to avoid possibly losing some +gauge output if the code crashes. Now `fort.gauge` will have data at least +up to the last checkpoint time. + +Fixed so that `advanc` is not called initially if `flag_richardson` is +`False`, avoiding some unneeded work in this case. + +Better reporting of statistics regarding run time and number of cells +integrated is now provided to the screen at the end of a run, and to the +file `_output/fort.amr`. In particular, better reports wall time vs. CPU +time when OpenMP is used, and breaks this down into several groups to help +determine where the code is spending the most time. See :ref:`timing`. + +New testing framework and several changes in the `tests` directory. + +See `amrclaw diffs `_ + +Changes to geoclaw +------------------ + +NetCDF format can now be used for topography files by specifying `topo_type = 4`, +both in `topotools.py` and when reading into the Fortran modeling code. + +Binary output option added for multi-layer code. + +Bug fixes in `topotools` and `dtopotools`. + +Better reporting of statistics regarding run time and number of cells +integrated is now provided to the screen at the end of a run, and to the +file `_output/fort.amr`. In particular, better reports wall time vs. CPU +time when OpenMP is used, and breaks this down into several groups to help +determine where the code is spending the most time. + +Restart option changed so that `fort.gauge` is appended to rather than +clobbering the previous version. This may be modified in future releases, +it is currently inconsistent with what's done in amrclaw. See +https://github.com/clawpack/clawutil/issues/93. + +New testing framework. + +See `geoclaw diffs `_ + +Changes to PyClaw +------------------ + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs `_ + diff --git a/v5.10.x/_sources/release_5_4_0.rst.txt b/v5.10.x/_sources/release_5_4_0.rst.txt new file mode 100644 index 0000000000..9798e6465d --- /dev/null +++ b/v5.10.x/_sources/release_5_4_0.rst.txt @@ -0,0 +1,251 @@ +:orphan: + +.. _release_5_4_0: + +========================== +v5.4.0 release notes +========================== + + +Clawpack 5.4.0 was released on January 17, 2017. See :ref:`installing`. + +Changes relative to Clawpack 5.3.1 (November 9, 2015) are shown below. + +.. _release_5_4_0_global: + +Global changes +-------------- + +**Python 3 compatibility.** Python code in all repositories has been updated so +that it should work with either Python 2 or Python 3. In particular the +statements:: + + from __future__ import absolute_import + from __future__ import print_function + +have been added and print statements have been replaced by print functions. +Various other minor changes were also required. + +**Makefile structure for Fortran codes.** +The `Makefile` in all Fortran examples and tests has been +modified to rely on a common list of library source code files, +rather than listing all of these in every `Makefile`. Capabilites include +the ability to specify whether a library file should be replaced +by one from the local directory. This is cleaner and will make it +easier to update code in the future -- if a new library routine is +required only one master list needs updating rather than the +`Makefile` in every example and users' application directories. +See :ref:`makefiles_library` for more details on how to specify +local files in place of default library files. + +It is also no longer necessary to set the `Makefile` variable +`RESTART` to `True` or `False`. Instead you can set it to `None` (or omit +setting it at all, since this is the default), in which case the `setrun.py` +file will be used to determine if this is a restart run (in which case +the previous output directory should be added to, rather than replaced). + +**Improved Gauge Output Options** +:ref:`gauges` in `amrclaw` and `geoclaw` now support a number of additional +output options including: + + - specification of output fields, i.e. you can now specify the q and aux + fields that are output; + - specification of output field format, i.e. you can now specify the number + of digits to output; + - a minimum length of time at which a gauge is allowed to output, i.e. if + this was set to 10 time units then the gauge would only output every 10 + time units or longer; + - support for future file format specifications (only ASCII is supported now); + +Other improvements to gauge handling include: + + - a refactor of how the code stores gauge data has been done in the Fortran + *gauges_module.f90* source file in each library. + + - Gauge output is accumulated in a buffer internally and written out + intermitently, instead of writing to disk every time step. + (The parameter `MAX_BUFFER` in the `amrclaw` library routines + `gauges_module.f90` controls the size of this buffer.) + + - The gauge output for the gauges is written to distinct files in the + output directory, e.g. `gauge00001.txt` for gauge number 1. In previous + versions of Clawpack all gauges were written to a single file + `fort.gauge`. The new approach allows gauges to be written in parallel and + also facilitates reading in a single gauge more quickly. + + - Some header info appears in each of these files to describe the gauge + output. + + - When doing a restart (see :ref:`restart`), gauge output from the original run + is no longer overwritten by the second run. Instead gauge + output from the restart run will be appended to the end of each + `gaugeXXXXX.txt` file. + + +**Updated regression testing framework for Fortran.** +The Fortran code uses an updated framework and so the regression data has +changed. + +Changes to classic +------------------ + +**Makefile structure.** See discussion above, under +:ref:`release_5_4_0_global`. + +See `classic diffs +`_ + +Changes to clawutil +------------------- + +**Makefile structure.** The `Makefile.common` was updated to support the +changes described in the discussion above, under +:ref:`release_5_4_0_global`. + +**Better support for gauges.** +New supporting code added. + +**Updated regression testing framework for Fortran.** +New supporting code added. + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + +**Parallel Plotting in setplot.py.** +A new capability has been added to plot multiple frames at once on +a multicore machine when doing `make plots` (i.e. not interactive). +The png files for different frames can be simultaneously generated. +To use this feature you need to: + + - Add the line `plotdata.parallel = True` (usually at the + bottom) to `setplot.py`. + +and then *either*: + + - Add the line `plotdata.num_procs = 4` (or however many processes you + wish to use), or + + - Alternatively you can set the shell environment variable + `OMP_NUM_THREADS` to the number of processes desired. + +The value specified by `OMP_NUM_THREADS` is used only if +`plotdata.num_procs` is not set. If neither is set, the default +is to use only one process. + +**Gauge plots.** +Updates to go with improvements to how gauges are handled. + +**KML files for GeoClaw output.** +Some improvements have been made to the capabilities for creating KML and +KMZ files for plotting on Google Earth or with other GIS tools. + +See `visclaw diffs +`_ + +.. _release_5_4_0_riemann: + +Changes to riemann +------------------ + +**GeoClaw Riemann solver.** The Riemann solver generally used in GeoClaw has +been updated to fix a couple issues: + + - The transverse velocity jump is now put into the 1-wave or 3-wave rather + than the 2-wave. This avoids some cases where transverse velocity does + not propagate past jump in bathymetry, may improve some instability issues. + See https://github.com/clawpack/riemann/pull/111 for details. + + - The tolerance used in the transonic test has been modified to be better + scaled. + +These changes cause some changes to results computed with GeoClaw. They +have been fairly extensively tested by now and give results that are +generally believed to be at least as good or better than the previous +version. + +Some other solvers were added or updated. + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + +**Makefile structure.** See discussion above, under +:ref:`release_5_4_0_global`. + +**Gauge output** See discussion above, under +:ref:`release_5_4_0_global`. + +**Ghost Cell (filpatch) Filling.** +A list of the neighboring grids at same the level of refinement +that are used for filling ghost cells for each grid patch is saved between +regridding steps. This improves the speed of `filpatch` +operations. (Not yet implemented for neighboring grids at coarser level, +still have to search for neighbors.) + +**Proper Nesting.** +Insidious but rare bug fixed, where occasionally a fine level grid had +cells with no underlying coarse grid cell from which to interpolate the +new values. The fix can make regridding more expensive when more than 3 +levels of refinement are used. (This will be addressed in future +revisions). Also, there were several different ways of projecting a +cell to a coarser level. This was made consistent across all routines. +The refined grids that are generated are now somewhat different and may +cover a slightly larger area than in previous releases. + +**3D filpatch bug fix.** +Fixed a bug in calculating indices used when interpolating from coarse to fine +grid ghost cells. (Fixed in 2D in previous release.) + +**Output Formats.** +Enlarged formats in many format statements used for ascii output +throughout. + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + +**Changes to Riemann solver.** The default Riemann solver used +for single-layer shallow water equations was modified, causing potential +changes to computed results. See the discussion above, under +:ref:`release_5_4_0_riemann`. + +**Makefile structure.** See discussion above, under +:ref:`release_5_4_0_global`. + +**Gauge output** See discussion above, under +:ref:`release_5_4_0_global`. + +The changes in amrclaw titled **Ghost Cell (filpatch) Filling**, +**Proper Nesting** and **Output Formats** +also affect geoclaw. See notes above. + +**fgmax Checkpoint/Restart Capability.** +If checkpoints have been requested, `fgmax` variables are +added to the end of the checkpoint file. This enables a calculation to +restart for a longer simulation time and still compute valid `fgmax` +amplitudes and arrival times, instead of reinitializing the `fgmax` arrays. +See :ref:`fgmax`. + +See `geoclaw diffs +`_ + + +Changes to PyClaw +------------------ + +**Python 3 compatibility.** See discussion above, under +:ref:`release_5_4_0_global`. + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs +`_ + diff --git a/v5.10.x/_sources/release_5_4_1.rst.txt b/v5.10.x/_sources/release_5_4_1.rst.txt new file mode 100644 index 0000000000..b6cdd34568 --- /dev/null +++ b/v5.10.x/_sources/release_5_4_1.rst.txt @@ -0,0 +1,124 @@ +:orphan: + + +.. _release_5_4_1: + +========================== +v5.4.1 release notes +========================== + + +Clawpack 5.4.1 was released on June 28, 2017. See :ref:`installing`. + +Changes relative to Clawpack 5.4.0 (February 17, 2017) are shown below. + +Changes to documentation +------------------------ + +The documentation repository https://github.com/clawpack/doc has been refactored so that versioning is now supported. On the menu to the left of the Clawpack documentation pages, at the bottom you should see links to select previous versions of the documentation, in particular `v5.4.0` and some earlier versions. The `master` version points to the current master branch of the doc repository used to build the documentation. + +If you switch to different version of a page, use the back button to return to the version for the current release, or click on the Clawpack logo to get back to this version. If you click on the `master` version most things will work but links to gallery pages will not (due to the way relative paths are specified since inter-sphinx is now used for different projects in the main docs and the gallery). Old versions of the gallery are not available. + +Instructions for building the documentation have been updated in :ref:`howto_doc`. + + +Changes to classic +------------------ + +The Woodward-Collela blast wave problem for 1-dimensional Euler was added to the examples. + +See `classic diffs +`_ + +Changes to clawutil +------------------- + +Minor changes. + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + +- Fixes for Python3 compatibility. +- **There are still some known issues when making plots using Python3 that are being worked on.** See e.g. https://github.com/clawpack/visclaw/pull/219. +- Improve KML functionality. +- Add `legend_tools` module to simplify adding a legend. +- Other minor fixes. + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + +- Added several Riemann solvers for new problems. +- Improved several existing solvers. +- The GeoClaw Riemann solver `riemann_aug_JCP` in `geoclaw_riemann_utils.f` + has been modified to incorporate pressure source terms for storm surge + simulations. The calling sequence has changed. + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + +The major new addition is 1d `amrclaw` code in the `src/1d` directory and +some examples in the `examples` directory. (Also regression tests in `tests`). +These examples have also been added to the gallery at `www.clawpack.org `_. +This code was based on the `2d` code but reduced to a fully `1d` version that is better than the previous approach of using the `2d` code with only 1 cell in the `y` direction. This code has not yet been extensively tested on challenging problems, so let us know if you run into problems with it. + + +- Cleanup some code related to timers. +- Fix a problem with integer overflows in some cases. +- Suppress printing Courant number every timestep to `fort.amr` +- Print more digits in gauge locations to output files `gauge*.txt`. +- The code in `$CLAW/amrclaw/src/2d` has had comments improved and added so that doxygen can be used, see :ref:`amrclaw_doxygen`. +- Other minor fixes. + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + + +- Allow more flexibility in specification of `fgmax` grids when doing a restart. +- Print more digits in gauge locations to output files `gauge*.txt`. +- For storm surge, the pressure gradient source term has been moved to the + Riemann solver for well-balancing. This may cause slightly different + results on these applications but should not affect others. +- The output and plotting functions for surge and multilayer versions been refactored. +- Other minor fixes and improvements of Python tools. + +See `geoclaw diffs +`_ + + +Changes to PyClaw +------------------ + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs +`_ + +=========================== +Other Clawpack Repositories +=========================== + +The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest. + +- `apps diffs + `_ + +- `doc diffs + `_ + +- `docker-files diffs + `_ + diff --git a/v5.10.x/_sources/release_5_5_0.rst.txt b/v5.10.x/_sources/release_5_5_0.rst.txt new file mode 100644 index 0000000000..a7c1171507 --- /dev/null +++ b/v5.10.x/_sources/release_5_5_0.rst.txt @@ -0,0 +1,281 @@ +:orphan: + +.. _release_5_5_0: + +========================== +v5.5.0 release notes +========================== + + +Clawpack 5.5.0 was released on August 28, 2018. See :ref:`installing`. + +Changes relative to Clawpack 5.4.1 (June 28, 2017) are shown below. + +Changes to documentation +------------------------ + +For developers: There is no longer a `master` branch in the +`clawpack/doc `_ repository. + +Use branch `v5.5.0` for updates to current documentation and the `dev` branch +for developing documentation for changes or new features that are in the +`master` branch of the code repositories but are not yet in an official +release. + + +Changes that are not backward compatible +---------------------------------------- + +- The format of checkpoint styles has changed for AMRClaw and GeoClaw, so old + checkpoint files can not be used to restart with newer code. + +- In GeoClaw, the way some topofiles are interpreted has been changed to conform with + the intended "grid registration". + This is not backward compatable for files with headers that specify + `xllower, yllower`. See below for more details. + +- Many of the previous storm surge capabilies in GeoClaw have been enhanced and + simplified in terms of handling storm input. Some of these changes are not + backwards compatible due to the way storm data is now specified and how + time references to landfall are now specified. The examples in GeoClaw now + are updated to reflect these changes however and it is highly recommended + that users look at these examples for how to change their own existing + examples. + + +General changes +--------------- + + - `LICENSE` file added to all repositories, with BSD license + - `CODE_OF_CONDUCT.md` has been added to the super repository so as to + define a code of conduct for the community. + +Changes to classic +------------------ + + - None other than addition of License. + +See `classic diffs +`_ + +Changes to clawutil +------------------- + + - Minor changes + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + + - The script `src/python/visclaw/plot_timing_stats.py` + can be used to plot timing data that is now printed out following + AMRClaw and GeoClaw runs. See the AMRClaw notes below for more details. + - Minor changes to Matlab codes + - Minor changes to kml functionality, and printing of more digits + - `ClawPlotItem.colorbar_kwargs` added for setting other colorbar keyword + arguments + - `ClawPlotAxes.beforeframe` added to allow e.g. plotting on a background + image, see `PR #226 `_ for an + example. + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + + - Add some vectorized Riemann solvers + - Changes to layered shallow water solvers + - Add some Riemann solvers for adjoint equations + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + +- The `valout.f` routine in `amrclaw/src/Nd` (for `N=1,2,3`) + has been cleaned up as `valout.f90`, and now also prints out timing + information to two files in the output directory: `timing.txt` contains a + summary at the end of the run, while `timing.csv` contains cumulative timing + information at each output time. + +- The boundary condition routines `amrclaw/src/Nd/bcNamr.f` (for `N=1,2,3`) + have been replaced with modernized versions `amrclaw/src/Nd/bcNamr.f90` + that should be easier to read and modify by users if necessary. + +- The script `$CLAW/visclaw/src/python/visclaw/plot_timing_stats.py` + can be used to plot this data (or modify this script as desired). + Information on both wall time and CPU time is + included, particularly useful for multi-core simulations. + +- Write more digits in `regions.data` file. + +- Clean up some timing variables. + +- The maximum number of allowable refined grids is now + variable, and no longer static. If the current maximum + is exceeded, all arrays dimension at `maxgr`, namely + `rnode`, `node`, and `listOfGrids` (currently set + to 10000) are resized by another 10K. + `bndList` is also now resizable. + +- The format of checkpoint files changed to include `maxgr`. + **This is not backward compatible -- old checkpoint files can not be used + to restart with the new code.** + +- `Makefile.amr_2d` changed to include the new files to initialize, + restart, and resize the nodal arrays and boundary lists. + +- The gauges had one some variable that depended + on `maxgr`. By changing the gauges algorithm, this was + eliminated. The old algorithm did not scale well for + `O(10^5)` grids and `O(100)` gauges. The new algorithm just + has each grid patch sort the gauge list to see if it has any + gauges to update. (The old algorithm sorted all grid owners and + their owner gauges, (thus needing to save that mapping), and + therefore was an index lookup by grid number. But again, 10^5 + grids needing 2 arrays for only 100 gauges did not make sense. + Also changed the algorithm for finding the best source grid for a + gauge. By starting at the finest level, and rearranging the order + of the loops, once a grid owner was found for a gauge there was no + need to search the rest of the grids. + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ +- Makefile.geoclaw changed to include the new files to initialize, + restart, and resize the nodal arrays and boundary lists. + +- The way some topofiles are interpreted has been changed to conform with + the intended "grid registration". In particular, topofiles with a header + containing `xllower` and `yllower` contain data that should be viewed as + cell-centered data on a uniform grid that starts at + `(xllower + dx/2, yllower + dy/2)` and not at `(xllower, yllower)`. + See `PR #303 `_ for more + discussion and :ref:`grid_registration` for documentation. + **This is not backward compatable for files with these headers.** + Change the header to specify `xlower` and `ylower` (or `xllcenter, + yllcenter`) if you want the data to be interpreted in the old manner. + +- The boundary condition routine `geoclaw/src/2d/shallow/bc2amr.f` + have been replaced with a modernized version `geoclaw/src/2d/shallow/bc2amr.f` + that should be easier to read and modify by users if necessary. + (Similar to changes made in amrclaw.) In the case of extrapolation boundary + conditions all aux variables are also copied rather than just bathymetry. + +- The format of checkpoint files changed to include `maxgr`. + **This is not backward compatible -- old checkpoint files can not be used + to restart with the new code.** + +- The `valout.f` routine in `src/2d/shallow` + has been cleaned up as `valout.f90`, and now also prints out timing + information to two files in the output directory. See the notes + for amrclaw above for more details. + +- The storm surge capabilties have been significantly changed including: + + - A new storm format that GeoClaw now reads in directly. There is also + a new Python storm module that contains the capability of converting + many common formats into the format that GeoClaw now expects. These + formats currently include ATCF, HURDAT, JMA, IBtRACS, and TCVITALS. + + - Time reference is now specific to landfall or anything else that the + use requests. In other words you no longer need absolute values of + start and stop times but everything is relative to landfall. + + - The Fortran code for storms is now simplified following the above + restricted format. This is all handled via the Python module. + + - Additional parameterized wind and pressure fields are now included + in addition to the existing Holland 1980 field. + + - Additional preliminary support for storm data beyond parameterized + versions have been added. This is primarily in the form of stubs + so that an API can be establised for the different data sources that + we intend to add in the future including HWRF and other formats. + + - Changes to plotting storm surge applications have also been included + that mimic the ones above. Again please refer to the examples in + GeoClaw to see how to adapt your application. + +- Multi-layer shallow water solvers have been extended to work with AMR. + (This is still under development and may have some bugs.) + +- There is a new Makefile.multilayer file that should be used for + multilayer applications. + +- Makefile.geoclaw changed to include the new files to initialize, + restart, and resize the nodal arrays and boundary lists. + +- New capabilities have been added to read topofiles in netCDF, and also to + download topo DEMs from `.nc` files at remote URLs. This allows downloading + only a subset of the DEM and at a coarsened resolution. + See `topotools.read_netcdf` in :ref:`topotools_module`, + and `tests/test_etopo1.py` for an example of usage. + *More documentation needed.* + +- The `etopotools.py` module has been deprecated in favor of the + `topotools.read_netcdf` function, which can be called with + `path = 'etopo1` to read from the online etopo1 database in netCDF format. + This allows downloading only a subset of the DEM and at a coarsened resolution. + The old way of doing this is not robust and sometimes gave incorrect results + due to issues with the old etopo1 server (which is no longer maintained). + See :ref:`topo_netcdf` and + `PR #308 `_. + An example can be found in `tests/test_etopo1.py`. + +- More generally, topofiles can now be read in from netCDF files either + locally or from the web. See :ref:`topo_netcdf` for some documentation. + +- New capabilities have been added to download NOAA tide gauge data, see + `PR #287 `_. + +- Some plotting issues have been resolved. + +- `dtopotools.SiftFault` now has the rigidity `mu` set properly, which + changes the magnitude `Mw` that is reported for a fault created using + the NOAA SIFT database. + +- `dtopotools.SubFault` has been extended to allow triangular subfaults + in addition to rectangular subfaults. Some examples illustrating this + should be added to the `apps` repository. + +- `topotools.read` now allows `dx != dy` in a header for `topo_type in [2,3]`. + +- Many other minor changes. + +See `geoclaw diffs +`_ + + +Changes to PyClaw +------------------ + + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs +`_ + +=========================== +Other Clawpack Repositories +=========================== + +The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest. + +- `apps diffs + `_ + +- `doc diffs + `_ + +- `docker-files diffs + `_ + diff --git a/v5.10.x/_sources/release_5_6_0.rst.txt b/v5.10.x/_sources/release_5_6_0.rst.txt new file mode 100644 index 0000000000..ee06146fd8 --- /dev/null +++ b/v5.10.x/_sources/release_5_6_0.rst.txt @@ -0,0 +1,163 @@ +:orphan: + +.. _release_5_6_0: + +=============================== +v5.6.0 release notes +=============================== + + +Clawpack 5.6.0 was released on June 2, 2019. See :ref:`installing`. + +Changes relative to Clawpack 5.5.0 (Aug 28, 2018) are shown below. + +To see more recent changes that are in the the master branch but not yet +released, see :ref:`changes_to_master`. + + +Changes that are not backward compatible +---------------------------------------- + + - A new approach to flagging cells for AMR refinement was added in 1d and + 2d amrclaw and in geoclaw (see notes below). This led to the addition + of a new `adjoint.data` file created by running `setrun.py`. + If adjoint error flagging is not being used then this file is still + expected by the Fortran code. + + - Many Fortran routines changes for adjoint flagging and some new modules + were added, resulting in changes to the Makefiles used in amrclaw and + geoclaw (see below). + +General changes +--------------- + + - None so far. + +Changes to classic +------------------ + +Nothing major. + +See `classic diffs +`_ + +Changes to clawutil +------------------- + + - A new attribute `data.ClawRunData.adjointdata` was added, which points to + an object of class `amrclaw.data.AdjointData` containing information + about inputs needed for adjoint flagging. + + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + + - Numerous minor improvements. + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + + - HLLE solvers added for the Euler equations and 1d and 2d shallow water. + + - Riemann solvers added for the adjoint of the linearized shallow water + equations in non-conservative form, as needed for adjoint flagging. + + - Note that other adjoint Riemann solvers for amrclaw examples had already + been added in v5.5.0. + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + + - A new approach to flagging cells for AMR refinement was added in 1d and + 2d (not yet in 3d), based on + first solving an adjoint equation and then taking inner products of the + forward solution at each regridding time with snapshots of the adjoint + solution. This is described in ``_ + and ``_. This was developed + over the past several years, primarily by + `@BrisaDavis `_, and required + refactoring several routines. Some of these changes were already + included in version 5.5.0. + + - In `amrclaw/src/1d`, new the Fortran module `adjoint_module.f90` + was to support adjoint flagging, and `Makefile.amr_1d` updated. + + - In `amrclaw/src/2d`, new Fortran modules `adjoint_module.f90` and + `adjointsup_module.f90` were added to support adjoint flagging, + and `Makefile.amr_2d` updated. + + - class `amrclaw.data.AdjointData` added, to contain information + about adjoint error flagging. + + - `moment.f` was refactored as `moment.f90`. + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + + - The adjoint flagging option was also added to GeoClaw, resulting in + many changes to geoclaw routines. + + - In `geoclaw/src/2d/shallow`, new Fortran modules `adjoint_module.f90` and + `adjointsup_module.f90` were added to support adjoint flagging, + and `Makefile.geoclaw` updated. + + - These modules were also added to + `src/2d/shallow/multilayer/Makefile.multilayer`, although adjoint + flagging has not been implemented yet for the multilayer equations. + + - New capabilities were added to `src/python/geoclaw/surge/storm.py` for + reading storm tracks. + + - `topotools.read_netcdf` was improved to more robustly handle `coarsen == 1` + + - The url was fixed in `examples/tsunami/chile2010/maketopo.py` that caused + a webpage to be downloaded instead of the topofile needed for this + example, caused by incorrect url resolution of `geoclaw.org`. + + - A typo was fixed in `dtopotools.SubFault.dynamic_slip` that caused + failure. + + - Numerous other minor fixes and improvements. + +See `geoclaw diffs +`_ + + +Changes to PyClaw +------------------ + + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs +`_ + +=========================== +Other Clawpack Repositories +=========================== + +The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest. + +- `apps diffs + `_ + +- `doc diffs + `_ + +- `docker-files diffs + `_ + diff --git a/v5.10.x/_sources/release_5_6_1.rst.txt b/v5.10.x/_sources/release_5_6_1.rst.txt new file mode 100644 index 0000000000..9e1042a5e8 --- /dev/null +++ b/v5.10.x/_sources/release_5_6_1.rst.txt @@ -0,0 +1,121 @@ +:orphan: + +.. _release_5_6_1: + +=============================== +v5.6.1 release notes +=============================== + +Clawpack 5.6.1 was released on October 28, 2019. See :ref:`installing`. + +Changes relative to Clawpack 5.6.0 (June 2, 2019) are shown below. + +To see more recent changes that are in the the master branch but not yet +released, see :ref:`changes_to_master`. + + +Changes that are not backward compatible +---------------------------------------- + +`$CLAW/amrclaw/src/2d/amr_module.f90` has changed, so do a `make new` in +any AMRClaw or GeoClaw application directories. + +General changes +--------------- + +A `gpu` branch has been added to many git repositories, and checking this out +gives a GPU version of two-dimensional AmrClaw and GeoClaw, as described at +:ref:`gpu`. This version does not have equivalent capabilities to v5.6.1, +however, and is not included as part of the tar file for this release. + + +Changes to classic +------------------ + +None. + +See `classic diffs +`_ + +Changes to clawutil +------------------- + +- The python package `subprocess` is now used in `runclaw.py`, improving ability + to run multiple models. +- Improved handling of Fortran modules. + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + +- Improvements to `plot_timing_stats.py` to create plots of CPU time and wall + time used in a simulation, and number of cells updated. + For some examples of the output, see http://staff.washington.edu/rjl/misc/timing_plots/ + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + +- 1D MHD solver added. + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + +- Improvements in how timing of code is done, in particular using `integer(kind=8)` + variables for better computation of wall time. +- Improve handling of `AdjointData` file references. + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + +- Some fixes to checkpoint and restart files +- Several changes to storm surge codes, including handling more forms of storm + input data. +- Improvements in how timing of code is done, in particular using `integer(kind=8)` + variables for better computation of wall time. +- Faster version of `filpatch` improves regridding performance substantially + for some applications by re-using topo values rather than recomputing them. +- If some topo values are missing replace by value that makes this clearer + by default, or allow the user to set an appropriate `topo_missing` value. +- New `geoclaw/examples/tsunami/bowl-slosh-netcdf` added to illustrate + using netCDF topofiles. + +See `geoclaw diffs `_ + + +Changes to PyClaw +------------------ + + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs +`_ + +=========================== +Other Clawpack Repositories +=========================== + +The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest. + +- `apps diffs + `_ + +- `doc diffs + `_ + +- `docker-files diffs + `_ + diff --git a/v5.10.x/_sources/release_5_7_0.rst.txt b/v5.10.x/_sources/release_5_7_0.rst.txt new file mode 100644 index 0000000000..23afe92e58 --- /dev/null +++ b/v5.10.x/_sources/release_5_7_0.rst.txt @@ -0,0 +1,216 @@ +:orphan: + +.. _release_5_7_0: + +=============================== +v5.7.0 release notes +=============================== + +Clawpack 5.7.0 was released on April 23, 2020. See :ref:`installing`. + +Permanent DOI: +`[DOI 10.5281/zenodo.3764278] `__. + +Changes relative to Clawpack 5.6.1 (October 28, 2019) are shown below. + +To see more recent changes that are in the the master branch but not yet +released, see :ref:`changes_to_master`. + + +Python support +--------------- + +As of v5.7.0 we are no longer supporting Python 2.7, and Python 3.x is +expected. At this point we believe v5.7.0 still works with Python 2.7, but +we are phasing out testing this in the future. + +See :ref:`python-three` for more information about this. + + +Changes that are not backward compatible +---------------------------------------- + +Some of the `.data` files generated from `setrun.py` have been changed in both +amrclaw and geoclaw, so if using these packages it is important to do:: + + make new + +to recompile all the code and:: + + make data + +to recreate `.data` files in the new form (the latter should happen +automatically if you `make .output`, for example). + +General changes +--------------- + +- Support for particle tracking via "Lagrangian gauges" has been added to + `amrclaw`, but this capability itself has so far only been added to `geoclaw`, + see below. This has changed the format of `gauges.data` files generated + from `setrun.py`. + +- A new way of specifying `flagregions` for guiding adaptive mesh refinement + has been introduced in both `amrclaw` and `geoclaw`, and `RuledRectangles` + have been introduced to assist in specifying non-rectangular `flagregions`. + This has added a new `flagregions.data` file generated from `setrun.py`. + +- The AMR parameter `max1d` can now be set in `setrun.py`. This parameter + controls the maximum size of each grid patch in each spatial dimension. + Previously this was set in `amrclaw/src/Nd/amr_module.f90` and changing it + required recompiling all library files via `make new`. The default value + is still 60, which seems to work well in relation to cache size and the + desire to distribute grids among threads when OpenMP is used. If you want + to change it for some application, set `rundata.amrdata.max1d` in `setrun.py`. + +Changes to classic +------------------ + +None. + +See `classic diffs +`_ + +Changes to clawutil +------------------- + +- Support added for `flagregions` and `FlagRegionData`, see + `flagregions.html `_. + +- Support added for gzip/bzip2 unpacking in `get_remote_file`. + +- Changes to `Makefile.common` to add `make notebook_htmls` target to turn + Jupyter notebooks into html files using nbconvert, + and `make readme` to better handle converting `README.rst` into `README.html`. + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + +- Several updates to Matlab tools. + +- Added `particle_tools.py` for plotting particle paths when using Lagrangian gauges. + +- Added `plottools.pcolorcells` to better plot data on finite volume grid cells. + +- Improvements to how animations are made on html pages and other updates to + `animation_tools.py`. + +- Improve colorbar options and better colorbars when using `colormaps.add_colormaps`. + +- Change default behavior in `frametools.py` when looping over all patches: + skip those that lie outside of rectangle specified by `xlimits` and `ylimits` + to improve speed. Can over-ride this by setting + `plotaxes.skip_patches_outside_xylimits = False`. + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + +- Updates to a few Riemann solvers + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + +- Allow setting `max1d` in `setrun.py`. + +- Close output files properly in `valout.f90` + +- Some support for Lagrangian gauges but not yet fully implemented + except in geoclaw. + +- Introduce new `flagregions` to replace `regions` eventually, see + `flagregions.html `_. + +- New `region_tools.py` module with class `RuledRectangle` in particular, + useful in specifying `flagregions`. See + `ruled_rectangles `_. + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + +- For an overview of changes to GeoClaw, see also this `youtube video + `__ + and the related materials from the `2020 GeoClaw Developers Workshop + `__. + +- Support for "Lagrangian gauges" that can be used for particle tracking + to help visualize the flow. See + `lagrangian_gauges.html `_. + +- Many changes to how fgmax grids are specified and handled. The new code is + much faster if there are lots of fgmax points (tested up to around 7 million). + You can now specify points near the coastline up to some elevation much + more easily for problems where you know higher ground will never be + inundated. Points can also be specifed using file specified with the same + format as a topofile (with `topo_type==3`) with 0/1 values indicating which + points are to be used as fgmax points. For more about all these changes, see + `fgmax.html `_. Note that now a file `fgmax_grids.data` is generated from + information in `setrun.py` rather than `fgmax.data`, with a different format. + +- Improvements to `fgmax_tools.py` module. + +- New routine `set_eta_init.f90` added that can be used to specify a spatially + varying initial elevation `eta = B + h`. The default version handles + subsidence or uplift specified in `dtopo` files. See + `set_eta_init `_. + +- Improvements to `kmltools.py` to facilitate making kml versions of plots, + including `pcolorcells_for_kml` to make png files that align better, + `fgmax2kml` for plotting fgmax results, and better support to plot + polygonal outlines of flagregions that are RuledRectangles. + +- New option added to allow specifying a `force_dry_init` array that indicates + cells that should be forced to be dry (`h = 0`) when initialized, even if + the topography elevation is below `sea_level`. This allows better modeling + of coastal regions where there is dry land below sea level but protected by + dikes or levies. See + `force_dry.html `_. + +- New `marching_front.py` module with tools to identify dry land protected by + dikes or to select fgmax points connected to the shore by land below some + specified elevation. See + `marching_front.html `_. + +- Many other minor fixes and improvements. + +See `geoclaw diffs `_ + + +Changes to PyClaw +------------------ + +Mostly minor changes. + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs +`_ + +=========================== +Other Clawpack Repositories +=========================== + +The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest. + +- `apps diffs + `_ + +- `doc diffs + `_ + +- `docker-files diffs + `_ + diff --git a/v5.10.x/_sources/release_5_7_1.rst.txt b/v5.10.x/_sources/release_5_7_1.rst.txt new file mode 100644 index 0000000000..98ec96973e --- /dev/null +++ b/v5.10.x/_sources/release_5_7_1.rst.txt @@ -0,0 +1,118 @@ +:orphan: + +.. _release_5_7_1: + +=============================== +v5.7.1 release notes +=============================== + +Clawpack 5.7.1 was released on September 11, 2020. See :ref:`installing`. + +Permanent DOI: +`[DOI 10.5281/zenodo.4025432] `__. + +Changes relative to Clawpack 5.7.0 (April 23, 2020) are shown below. + +To see more recent changes that are in the the master branch but not yet +released, see :ref:`changes_to_master`. + + +Changes that are not backward compatible +---------------------------------------- + +- None + +General changes +--------------- + +- None + +Changes to classic +------------------ + +- None + +See `classic diffs +`_ + +Changes to clawutil +------------------- + +- New `b4run.py` capability added -- script run before `runclaw` from `make + .output` that can be used to copy files to `_output`, for example. + +- `claw_git_status.py` improved. + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + +- Fix some things that weren't backward compatible with older versions of + `matplotlib` + +- Improve animation plot quality, and other changes to `animation_tools.py` + +- New Matlab tools + +- Other misc. changes + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + +- None + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + +- fix `verbosity_regrid` +- fix use of `kmltools` in `region_tools` + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + +- Some fixes to fgmax examples +- Improve some kml and netcdf tools +- Additional storm models +- Other misc. fixes and improvements + +See `geoclaw diffs +`_ + + +Changes to PyClaw +------------------ + + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs +`_ + +=========================== +Other Clawpack Repositories +=========================== + +The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest. + +- `apps diffs + `_ + +- `doc diffs + `_ + +- `docker-files diffs + `_ + diff --git a/v5.10.x/_sources/release_5_8_0.rst.txt b/v5.10.x/_sources/release_5_8_0.rst.txt new file mode 100644 index 0000000000..db2cbca3e1 --- /dev/null +++ b/v5.10.x/_sources/release_5_8_0.rst.txt @@ -0,0 +1,221 @@ +:orphan: + +.. _release_5_8_0: + +=============================== +v5.8.0 release notes +=============================== + +Clawpack 5.8.0 was released on February 4, 2021. See :ref:`installing`. + +Permanent DOI: http://doi.org/10.5281/zenodo.4503024 + + +Changes relative to Clawpack 5.7.1 (Sept. 11, 2020) are shown below. + +To see more recent changes that are in the the master branch but not yet +released, see :ref:`changes_to_master`. + + +Changes that are not backward compatible +---------------------------------------- + +- For AMRClaw and GeoClaw, the data file `amr.data` now created from + `setrun.py` now includes an additional line with the parameter `memsize` + specifying the initial length of the `alloc` array used for allocating + memory to patches when adaptive refinement is used. This can be specified + in `setrun.py` by setting `amrdata.memsize`. If it is not set, then + default values are used that are similar to past default values; + see :ref:`setrun_amrclaw`. + So this is backward compatible in the sense that no changes to `setrun.py` + are required, but the old `amr.data` files will not work so you may need + to do `make data` to create a new version. + +- In GeoClaw, refinement "regions" can no longer be specified implicitly + when listing a topo dtopo or qinit file. See the `geoclaw` section below. + **Note:** You may need to explicitly declare new `regions` or + `flagregions` to produce the same behavior as in past versions of GeoClaw. + +- The GeoClaw transverse Riemann solver `rpt2_geoclaw.f` has been improved + and results in slightly different computated results in some cases. For + more details see the `riemann` and `geoclaw` sections below. + +- For AMRClaw and GeoClaw, + an additional short array is saved in a checkpoint file for use in a + restart. Due to this change, a checkpoint file created using a previous + version of Clawpack cannot be used for a restart with the new version. + +General changes +--------------- + +The travis tests that automatically run on pull requests no longer test using +Python2, only Python3. See :ref:`python-three`. + +Changes to classic +------------------ + + +See `classic diffs +`_ + +Changes to clawutil +------------------- + + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + +- `ClawPlotAxes.skip_patches_outside_xylimits` does not work properly if there + is a `mapc2p` function defining a grid mapping, so it is now ignored in + this case. + + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + +- The GeoClaw transverse solver `rpt2_geoclaw.f` was modified to fix some + long-standing bugs and change some of the logic. + + The new version gives + slightly different results on most problems, but extensive testing indicates + the new results are at least as good as the old. The new version has also + been refactored to make the logic clearer and to avoid some unnecessary work, + and generally runs faster. In some cases where instabilities had been + observed in long-duration runs (particularly for storm surge), the new + version appears to provide better stability. + + In particular, the left- and right-going waves are now split up transversely + using states in the cell to the left (resp. right) in which the splitting is + performed, rather than using Roe averages based on the cell from which the + wave originates. + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + +- An additional short array is saved in a checkpoint file for use in a + restart. Due to this change, a checkpoint file created using a previous + version of Clawpack cannot be used for a restart with the new version. + +- A `memsize` parameter can now be set in `setrun.py`, see above + and :ref:`setrun_amrclaw`. + +- `src/2d/prepc.f` was improved to use less storage from the + work array `alloc` that is used for memory allocation for AMR patches. + For large-scale problems this can be a substantial savings and allow + running larger problems. + + + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + +Several changes were made to fix long-standing bugs. These fixes lead to +slightly different results than those obtained with previous versions of +GeoClaw. In all the tests performed so far the changes are minor and it is +thought that the new version is at least as accurate as the old version. +Please let the developers know if you run into problems that may be related +to these changes. + +- In `filpatch.f90`: The slope chosen for interpolating from a + coarse grid to the ghost cells + of a fine-grid patch had an index error that could affect the + sign of the slope used in momentum components. Also slopes were + not always initialized to zero properly at the start of a loop + +- Some index errors were fixed in `fgmax_interp.f90`. + +- Changes to `riemann/src/rpt2_geoclaw.f90`. These cause some change in + results but tests have shown the new results appear to be at least as + good as previous results and the code may be more stable in some + situations. For more detail see the "Changes to riemann" above. + +- The new `flagregions` introduced in v5.7.0 (see :ref:`flagregions`) + were not implemented properly in GeoClaw, and in some situations + refinement to a `maxlevel` that was indicated only in `flagregion` was + not allowed as expected. This is now fixed. + +- In previous versions of GeoClaw one could implicitly define AMR flag + regions that are aligned with the spatial extent of topo, dtopo, or qinit + files by specifying `minlevel, maxlevel` (and in the case of topo files, + a time interval `t1, t2`) when the file name is given. This feature + did not always work as advertised and was often confusing. If these + values are specified then they are now ignored, as explained in + more detail in the following items. Not that you may have to explicitly + declare new flag regions now in order to have the expected refinement regions. + +- When specifying topo files in `setrun.py` using the format:: + + [topotype, minlevel, maxlevel, t1, t2, fname] + + the values `minlevel, maxlevel, t1, t2` will now be ignored. + To avoid warning messages, instead specify:: + + [topotype, fname] + +- When specifying dtopo files in `setrun.py` using the format:: + + [topotype, minlevel, maxlevel, fname] + + the values `minlevel, maxlevel` will now be ignored. + To avoid warning messages, instead specify:: + + [topotype, fname] + +- When specifying qinit files in `setrun.py` using the format:: + + [minlevel, maxlevel, fname] + + the values `minlevel, maxlevel` will now be ignored. + To avoid warning messages, instead specify:: + + [fname] + +- A `memsize` parameter can now be set in `setrun.py`, see above + and :ref:`setrun_amrclaw`. + +- An additional short array is saved in a checkpoint file for use in a + restart. Due to this change, a checkpoint file created using a previous + version of Clawpack cannot be used for a restart with the new version. + +See `geoclaw diffs +`_ + + +Changes to PyClaw +------------------ + + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs +`_ + +=========================== +Other Clawpack Repositories +=========================== + +The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest. + +- `apps diffs + `_ + +- `doc diffs + `_ + +- `docker-files diffs + `_ + diff --git a/v5.10.x/_sources/release_5_8_1.rst.txt b/v5.10.x/_sources/release_5_8_1.rst.txt new file mode 100644 index 0000000000..611f804c2d --- /dev/null +++ b/v5.10.x/_sources/release_5_8_1.rst.txt @@ -0,0 +1,111 @@ +:orphan: + +.. _release_5_8_1: + +=============================== +v5.8.1 release notes +=============================== + +Clawpack 5.8.1 was released on October 19, 2021. See :ref:`installing`. + +**The installation instructions have been reorganized (once again) +in an attempt to make the different options clearer.** + +Permanent DOI: http://doi.org/10.5281/zenodo.5595424 + + +Changes relative to Clawpack 5.8.0 (February 4, 2021) are shown below. + +To see more recent changes that are in the the master branch but not yet +released, see :ref:`changes_to_master`. + + +Changes that are not backward compatible +---------------------------------------- + + +General changes +--------------- + + +Changes to classic +------------------ + +No changes. + +See `classic diffs +`_ + +Changes to clawutil +------------------- + +No changes. + + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + +No major changes. + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + +- Fix `rp1_shallow_hlle.f90` to work better near dry states. + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + +No changes. + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + +- Some improvements to storm tracks +- Reading (some) geotiff files now supported in `topotools` +- Added `kmltools.topo2kmz` to make Google Earth overlays showing topography +- Some other bug fixes. + +See `geoclaw diffs +`_ + + +Changes to PyClaw +------------------ + + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs +`_ + +=========================== +Other Clawpack Repositories +=========================== + +The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest. + +- `apps diffs + `_ + +- `doc diffs + `_ + shows changes in the `dev` branch not yet in the posted version of the + documentation. + +- `docker-files diffs + `_ + diff --git a/v5.10.x/_sources/release_5_8_2.rst.txt b/v5.10.x/_sources/release_5_8_2.rst.txt new file mode 100644 index 0000000000..ec76dbe55a --- /dev/null +++ b/v5.10.x/_sources/release_5_8_2.rst.txt @@ -0,0 +1,107 @@ +:orphan: + +.. _release_5_8_2: + +=============================== +v5.8.2 release notes +=============================== + +Clawpack 5.8.2 was released on December 14, 2021. See :ref:`installing`. + +Permanent DOI: http://doi.org/10.5281/zenodo.5781749 + + +Changes relative to Clawpack 5.8.1 (October 19, 2021) are shown below. + +To see more recent changes that are in the the master branch but not yet +released, see :ref:`changes_to_master`. + + +Changes that are not backward compatible +---------------------------------------- + +None. + +General changes +--------------- + +None. + + + +Changes to classic +------------------ + +None. + +See `classic diffs +`_ + +Changes to clawutil +------------------- + +Minor addition of a print statement. + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + +None. + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + +None. + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + +- Bug fix that avoids some segmentation faults when running amrclaw or geoclaw + jobs with many grids. + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + +None, although the bug fix in amrclaw is sometimes needed. + +See `geoclaw diffs `_ + + +Changes to PyClaw +------------------ + +For changes in PyClaw, see the `PyClaw changelog +`_. + +See `pyclaw diffs +`_ + +=========================== +Other Clawpack Repositories +=========================== + +The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest. + +- `apps diffs + `_ + +- `doc diffs + `_ + shows changes in the `dev` branch not yet in the posted version of the + documentation. + +- `docker-files diffs + `_ + diff --git a/v5.10.x/_sources/release_5_9_0.rst.txt b/v5.10.x/_sources/release_5_9_0.rst.txt new file mode 100644 index 0000000000..e97a4d050e --- /dev/null +++ b/v5.10.x/_sources/release_5_9_0.rst.txt @@ -0,0 +1,177 @@ +:orphan: + +.. _release_5_9_0: + +=============================== +v5.9.0 release notes +=============================== + +Clawpack 5.9.0 was released on August 26, 2022. See :ref:`installing`. + +Permanent DOI: http://doi.org/10.5281/zenodo.7026045 + + +Changes relative to Clawpack 5.8.2 (December 14, 2021) are shown below. + +To see more recent changes that are in the the master branch but not yet +released, see :ref:`changes_to_master`. + + +Follow the links to see changes that have been made to the master branch of +each repository since the last release (v5.9.0) on August 26, 2022. + +These changes should appear in the next release. If you need them now, +see :ref:`developers` for instructions on cloning and installing from the +master branch. + +To see documentation that has already been developed to accompany any new +features listed below, click on the "dev" branch of the documentation, in +the menu on the left hand side of this page. + +Changes that are not backward compatible +---------------------------------------- + + +General changes +--------------- + +- `'binary32`' added as an `output_format` option in both amrclaw and + geoclaw. (So far classic only supports `'ascii'` output.) The old + `'binary'` option now defaults to `'binary64'`, which dumps the raw + binary of the full float64 (kind=8) Fortran variables. The new + `'binary32'` option trucates to float32 (kind=4) before dumping, and + results in binary output files that are only half as large. Since + float32 values have about 8 significant figures, this is generally + sufficient for most plotting and post-processing needs. These files + are also much smaller than the files created with the `'ascii'` + option, which is generally recommended only for debugging if you need to + examine the output files directly. + For more info, see http://www.clawpack.org/output_styles.html + +- Gauge output in amrclaw and geoclaw can also now be specified as + 'ascii', 'binary64', or 'binary32', + see http://www.clawpack.org/gauges.html for instructions. + +- Adding support for `'binary32'` required changes in the pyclaw, clawutil + and visclaw repositories as well. + +- A new `fgout` capability was added to geoclaw (see below and :ref:`fgout`), + which also required additional changes to other repositories. + + + +Changes to classic +------------------ + +- Comments in some sample `setrun.py` files were changed to make it clear + that only `output_format = 'ascii'` is supported so far in classic. + +See `classic diffs +`_ + +Changes to clawutil +------------------- + +- Support for `'binary32'` and `fgout` grids added. + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + +- Support for `'binary32'` and `fgout` grids added. + +- `pcolor` plots are now rasterized by default, which greatly reduces the + file size in some cases. When e.g. `savefig('filename.svg')` is used + the labels are still vector graphics but the flow field is rasterized. + Passing the option `pcolor_kwargs = {"rasterized":False}` in setplot + turns this off. See ``. + +- The `JSAnimation` subdirectory was removed, since we now use + `anim.to_jshtml` instead. + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + +- None. + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + +- Support for `output_format='binary32'` added for both output frames and + gauges. + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + +- Support for `output_format='binary32'` added for both output frames and + gauges. + +- New `fgout` grid capabilities added, as described at :ref:`fgout`. + This allows specifying one or more fixed resolution rectangular grids on + which the AMR solution will be interpolated (in both space and time) + at each time in a specified set of times. This does not affect the + time steps used in the computation and allows frequent output on a + fixed portion of the domain for making animations or doing + post-processing, such as particle tracking based on the velocity field. + +- The new `fgout` capability (together with :ref:`fgmax`) + replaces the very old `fixedgrid` capability, + which has now been further deprecated. + +- `$CLAW/geoclaw/examples/tsunami/chile2010_fgmax` has been replaced by + `$CLAW/geoclaw/examples/tsunami/chile2010_fgmax-fgout`. This example + now also shows how to plot results on fgout grids either by + using a special `setplot` function or by reading them directly. + It also shows how to make an animation from the fgout results. + +See `geoclaw diffs `_ + + +Changes to PyClaw +------------------ + +- Support for reading fgout frames added, by passing the parameter + `file_prefix` more consistently (which can be e.g. `fgout` rather than + `fort`, as used for output frames). + +- Support for reading binary output files with format `'binary32'` or + `'binary64'`. Added for both output frames and gauges. The old `'binary'` + format is equivalent to `'binary64'`. + +- Support reading `file_format` from the `fort.t` files, now one of `ascii`, + `binary32`, or `binary64`. See General Changes above for more details. + +See `pyclaw diffs `_ + +For older changes in PyClaw, see also the `PyClaw changelog +`_. + +=========================== +Other Clawpack Repositories +=========================== + +The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest. + +- `apps diffs + `_ + +- `doc diffs + `_ + shows changes in the `dev` branch not yet in the main version of the + documentation. + +- `docker-files diffs + `_ + diff --git a/v5.10.x/_sources/release_5_9_1.rst.txt b/v5.10.x/_sources/release_5_9_1.rst.txt new file mode 100644 index 0000000000..c1eb9c612b --- /dev/null +++ b/v5.10.x/_sources/release_5_9_1.rst.txt @@ -0,0 +1,188 @@ +:orphan: + +.. _release_5_9_1: + +=============================== +v5.9.1 release notes +=============================== + +Clawpack 5.9.1 was released on October 2, 2023. See :ref:`installing`. + +Permanent DOI: http://doi.org/10.5281/zenodo.8400237 + + +Changes relative to Clawpack 5.9.0 (August 26, 2022) are shown below. + +To see more recent changes that are in the the master branch but not yet +released, see :ref:`changes_to_master`. + + +Follow the links to see changes that have been made to the master branch of +each repository since the last release (v5.9.1) on October 2, 2023. + +These changes should appear in the next release. If you need them now, +see :ref:`developers` for instructions on cloning and installing from the +master branch. + +To see documentation that has already been developed to accompany any new +features listed below, click on the "dev" branch of the documentation, in +the menu on the left hand side of this page. + + +Changes to classic +------------------ + +- None. + +See `classic diffs +`_ + +Changes to clawutil +------------------- + +- Consistently use `CLAW_PYTHON` in `Makefile.common`, which should point to + the version of Python the user wants to use for Clawpack. + +- Make some changes to ease the transition from `nose` (which is no longer + supported) to `pytest` in the future. + +- Other minor changes. + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + +- The `ClawPlotAxes.title` string is used by default to make a title for the + plot for each time frame with the time in the units used in the problem. + A new capability was added so that if `title` includes the string + `d:h:m:s` then the time is assumed to be in seconds and is converted to + days:hours:minutes:seconds in the title. Otherwise, if the `title` includes + `h:m:s` then the time is converted to hours:minutes:seconds in the title. + This is particularly useful in GeoClaw. + +- Some more attributes have been added to `ClawPlotFigure`, `ClawPlotAxes`, + and `ClawPlotItem` + to facilitate making nicer looking plots without so much need to use + `kwargs` attributes or define an `afteraxes function`, for example. + + The lines below are extracted from + `$CLAW/visclaw/src/python/visclaw/data.py`. + For more information about these attributes (and others), see + ``__. + + - Added to `ClawPlotFigure`:: + + self.add_attribute('figsize',None) + self.add_attribute('facecolor',None) + + + - Added to `ClawPlotAxes`:: + + self.add_attribute('time_label_kwargs', {}) # kwargs for xlabel cmd + self.add_attribute('kwargs', {}) + self.add_attribute('grid', None) # True to add grid() command + self.add_attribute('grid_kwargs', {}) # argument to grid() command + self.add_attribute('title_fontsize', None) + self.add_attribute('title_kwargs', {}) # e.g. to set color + self.add_attribute('title_t_format', None) # format for t in title + self.add_attribute('xticks_fontsize', None) + self.add_attribute('xticks_kwargs', {}) # e.g. to set ticks,rotation + self.add_attribute('yticks_fontsize', None) + self.add_attribute('yticks_kwargs', {}) # e.g. to set ticks + self.add_attribute('xlabel', None) # label for x-axis + self.add_attribute('ylabel', None) # label for y-axis + self.add_attribute('xlabel_fontsize', None) + self.add_attribute('ylabel_fontsize', None) + self.add_attribute('xlabel_kwargs', {}) + self.add_attribute('ylabel_kwargs', {}) + self.add_attribute('aspect', None) + self.add_attribute('aspect_latitude', None) + self.add_attribute('useOffset', None) + + - Added to `ClawPlotItem`:: + + self.add_attribute('colorbar_extend',None) + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + +- None. + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + +- In 2d and 3d, `valout.f90` now calls `bound` before dumping arrays when doing + binary output (since the ghost cells are also dumped in this case). + +- On restart, do not advance the frame number if `output_t0 == True`, so that + there is not a duplicated frame at the same time. + +- Other minor fixes. + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + +- Fixed `fgmax_finalize.90` so that if a grid number `fgno` is specified + for the fgmax grid then it uses this in constructing the filename for + output (rather than 1,2,3 based on order specified in `setrun.py`) + +- Facilitate reading a topo file when at `topotools.Topography` object + is first instantiated: the `__init__` function now calls `read()` if + `path` is provided as an argument. + +- `fgmax_tools.FGmaxGrid.read_output` function now takes an argument + `indexing` that is `'ij'` by default for backward compatibility, but setting + to `'xy'` results in the fgmax grid having the same layout as topo + grids generated by `topotools.Topography`, which is often useful. + +- Added `geoclaw.data.FGmaxData.read()` function to read in the data from a + `fgmax_grids.data` file. + +- Added `sphere_source` as local variable in `src/2d/shallow/src2.f90`, set to + 0 for now for backward compability. This allows testing the addition of + source terms that should be included on the sphere but were always missing. + After further testing, the plan is to change the default in the next major + release v5.10.0 and also allow this to be adjusted in `setrun.py`. + See ``__ + for more information. + +- Other minor fixes. + +See `geoclaw diffs `_ + + +Changes to PyClaw +------------------ + +- Some fixes in ASCII output for compatibility with Fortran versions. + +- Other minor fixes. + +See `pyclaw diffs `_ + +=========================== +Other Clawpack Repositories +=========================== + +The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest. + +- `apps diffs + `_ + +- `doc diffs + `_ + +- `docker-files diffs + `_ diff --git a/v5.10.x/_sources/release_5_9_2.rst.txt b/v5.10.x/_sources/release_5_9_2.rst.txt new file mode 100644 index 0000000000..dc70ee6b5f --- /dev/null +++ b/v5.10.x/_sources/release_5_9_2.rst.txt @@ -0,0 +1,130 @@ +:orphan: + +.. _release_5_9_2: + +=============================== +v5.9.2 release notes +=============================== + +Clawpack 5.9.2 was released on November 4, 2023. See :ref:`installing`. + +Permanent DOI: http://doi.org/10.5281/zenodo.XXX + + +Changes relative to Clawpack 5.9.2 (October 2, 2023) are shown below. + +To see more recent changes that are in the the master branch but not yet +released, see :ref:`changes_to_master`. + + +Follow the links to see changes that have been made to the master branch of +each repository since the last release (v5.9.2) on November 4, 2023. + +These changes should appear in the next release. If you need them now, +see :ref:`developers` for instructions on cloning and installing from the +master branch. + +To see documentation that has already been developed to accompany any new +features listed below, click on the "dev" branch of the documentation, in +the menu on the left hand side of this page. + + +General changes +--------------- + +The build process for the Python modules has been completely redone using +`meson `__ in place of `distutils`, which is being +deprecated. We chose `meson` since this is now being used by many of the core +scientific python projects that we use, e.g. `numpy` and `scipy`. This should +not affect most users, except for some changes to the recommended installation +options, see :ref:`installing`. + +Many Python modules were cleaned up by removing transition code that was useful +for Python2 users but is no longer needed since we now require Python3 in +general. + +Otherwise, mostly minor changes and bug fixes. + +Changes to classic +------------------ + + +See `classic diffs +`_ + +Changes to clawutil +------------------- + +Some new data objects were added to `clawpack.clawutil.data` for GeoClaw 1d +and Boussinesq solvers, but these will not be used until the next major release. + +See `clawutil diffs +`_ + +Changes to visclaw +------------------ + + +See `visclaw diffs +`_ + +Changes to riemann +------------------ + + +See `riemann diffs +`_ + +Changes to amrclaw +------------------ + + +See `amrclaw diffs +`_ + +Changes to geoclaw +------------------ + +The `setrun` parameter `rundata.fixed_grid_data` was removed from +`geoclaw/src/python/geoclaw/data.py` and is no longer available in `setrun`. +This old way of specifying fixed grid output has been deprecated for some +time in favor of `fgmax` and `fgout` grids, but some old `setrun.py` files +may still set :: + + fixedgrids = rundata.fixed_grid_data.fixedgrids + +and throw an error that can be fixed by deleting this line. +If items are appended to this list in your `setrun`, then these should be +converted to `fgmax` and/or `fgout` grids. + + +The `setrun` parameter `runclaw.geo_data.sphere_source` was added to allow +experimenting with the spherical source term that is currently missing from +the default GeoClaw code, see :ref:`sphere_source`, which now includes a +link to a document with more description of the problem and computational +examples. + +See `geoclaw diffs `_ + + +Changes to PyClaw +------------------ + + +See `pyclaw diffs `_ + +=========================== +Other Clawpack Repositories +=========================== + +The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest. + +- `apps diffs + `_ + +- `doc diffs + `_ + +- `docker-files diffs + `_ diff --git a/v5.10.x/_sources/releases.rst.txt b/v5.10.x/_sources/releases.rst.txt new file mode 100644 index 0000000000..64df88ffd8 --- /dev/null +++ b/v5.10.x/_sources/releases.rst.txt @@ -0,0 +1,89 @@ +.. _releases: + +Releases of Clawpack and release notes +======================================= + +Before downloading a tar file, please click on the Install tab or visit +:ref:`installing` for installation instructions. You may want to use +`pip install` or some other mechanism rather than the tar file. + +Other notes: +------------ + +* Please see :ref:`citing` for the suggested way to cite the version of + Clawpack that you are using in publications. + +* For older changes in PyClaw, see the `PyClaw changelog `_. + Starting with v5.9.0, changes will be recorded in the release notes along + with those for other repositories. + +* See :ref:`changes_to_master` for changes to the master branch on Github + that are not in the most recent release. + +* The "dev" branch of the + documentation (selected under Versions on the menu + to the left) may contain documentation of features not yet released. + +Releases: +--------- + +Tar files can be downloaded from +`https://github.com/clawpack/clawpack/releases/ +`_ or +from the Zenodo links provided below. + +Tar files for all recent releases +can also be referenced with the single DOI +`10.17605/osf.io/kmw6h `__. +See :ref:`citing` for more information on how best to cite Clawpack. + +* :ref:`release_5_10_0` -- TBA + `[DOI 10.5281/zenodo.XX] `_ +* :ref:`release_5_9_2` -- November 4, 2023 + `[DOI 10.5281/zenodo.10076317] `_ +* :ref:`release_5_9_1` -- October 2, 2023 + `[DOI 10.5281/zenodo.8400237] `_ +* :ref:`release_5_9_0` -- August 26, 2022 + `[DOI 10.5281/zenodo.7026045] `_ +* :ref:`release_5_8_2` -- December 14, 2021 + `[DOI 10.5281/zenodo.5781749] `_ +* :ref:`release_5_8_1` -- October 19, 2021 + `[DOI 10.5281/zenodo.5595424] `_ +* :ref:`release_5_8_0` -- February 4, 2021 + `[DOI 10.5281/zenodo.4503024] `_ +* :ref:`release_5_7_1` -- September 11, 2020 + `[DOI 10.5281/zenodo.4025432] `_ +* :ref:`release_5_7_0` -- April 23, 2020 + `[DOI 10.5281/zenodo.3764278] `_ +* :ref:`release_5_6_1` -- October 28, 2019 + `[DOI 10.5281/zenodo.3528429] `_ +* :ref:`release_5_6_0` -- June 2, 2019 + `[DOI 10.5281/zenodo.3237295] `_ +* :ref:`release_5_5_0` -- August 28, 2018 + `[DOI 10.5281/zenodo.1405834] `_ +* :ref:`release_5_4_1` -- June 28, 2017 + `[DOI 10.5281/zenodo.820730] `_ +* :ref:`release_5_4_0` -- January 17, 2017 + `[DOI 10.5281/zenodo.262111] `_ +* :ref:`release_5_3_1` -- November 10, 2015 + `[DOI 10.5281/zenodo.50982] `_ +* :ref:`release_5_3_0` -- May 21, 2015 +* :ref:`release_5_2_2` -- October 28, 2014 +* :ref:`release_5_2_1` -- October 2, 2014 +* :ref:`release_5_2_0` -- July 18, 2014 +* :ref:`release_5_1_0` -- March 2, 2014 +* :ref:`release_5_0_0` -- January 8, 2014 + + +.. _new_in_claw4x: + +Clawpack 4.x +------------- + +Clawpack 5.x has significant changes from past versions (prior to 2014). +See :ref:`clawpack5`. + +For documentation and recent changes to the Clawpack 4.x version, please see +`Clawpack 4.x documentation +`_ + diff --git a/v5.10.x/_sources/restart.rst.txt b/v5.10.x/_sources/restart.rst.txt new file mode 100644 index 0000000000..c2922cda69 --- /dev/null +++ b/v5.10.x/_sources/restart.rst.txt @@ -0,0 +1,107 @@ + + +.. _restart: + + +************************************* +Checkpointing and restarting +************************************* + +.. warning :: These instructions currently only apply to `amrclaw` and + `geoclaw` codes. + +.. _restart_checkpt: + +Checkpointing a computation +--------------------------- + +In this section `clawdata` refers to the `rundata.clawdata` attribute +of an object of class `ClawRunData`, as is generally set at the top +of a `setrun.py` file. + +The `rundata.clawdata.checkpt_style` parameter specified in `setrun.py` (see +:ref:`setrun`) determines how often checkpointing is done, if at all. + +See the comments in :ref:`setrun_sample` for examples. + +The checkpoint files are saved in the same output directory as the solution +output, with file names of the form `fort.tchkNNNNN` (a small ASCII file) and +`fort.chkNNNNN` (a large binary file) where `NNNNN` is the +step number on the coarsest level. These files containt all the information +needed to restart the computation at this point. + +.. _restart_restart: + +Restarting a computation +------------------------- + +To restart a computation from any point where checkpoint files have been saved, +modify `setrun.py` to set:: + + clawdata.restart = True + clawdata.restart_file = 'fort.chkNNNNN' + +where `NNNNN` is the time step number from which the restart should +commence. + +You should also modify the output time parameters to specify that the +computation should go to a later time than the time of the restart file +(which can be found in the file `fort.tchkNNNNN`). + +Note the following in setting the new output times: + +* The value `clawdata.t0` should generally be left to the original starting + time of the computation. + +* If `clawdata.output_style==1`, then `clawdata.t0` and `clawdata.tfinal` + along with `clawdata.num_output_times` are used to determine equally + spaced output times. Only those times greater than the restart time will + be used as output times. + + If `clawdata.output_t0==True` then a time frame will be output at the + restart time (not t0 in general). This may duplicate the final frame that was + output from the original computation. Set `clawdata.output_t0 = False` + to avoid this. + +* If `clawdata.output_style==2`, then `clawdata.output_times` is a list of + output times and only those times greater than or equal to + the restart time will be used as output times. + +.. _restart_makefile: + +Modifying the Makefile for a restart +------------------------------------ + +**New in 5.4.0.** It is no longer necessary to set the `Makefile` variable +`RESTART` to `True` or `False`. Instead you can set it to `None` (or omit +setting it at all, since this is the default), in which case the `setrun.py` +file will be used to determine if this is a restart run (in which case +the previous output directory should be added to, rather than replaced). + +.. _restart_output: + +Output files after a restart +---------------------------- + +After running the restarted computation, +the original set of output files should still be in the output directory +along with a new set from the second run. Note that one output time may +be repeated in two frames if `clawdata.output_t0 == True` in the restarted run. + +**New in 5.4.0.** +Gauge output from the original run +is no longer overwritten by the second run. Instead gauge +output from the restart run will be appended to the end of each +`gaugeXXXXX.txt` file (or `gaugeXXXXX.bin` in the case of binary gauge +output, introduced in v5.9.0). + +Note that if you have to restart a computation from a checkpoint +file that is at an earlier time than the original computation +reached, then intermediate gauge outputs will be repeated twice, +and data from these output files may have to be adjusted to account +for this. If multiple restarts are performed from the same checkpoint +file then gauge data will accumulate in an undesirable fashion, but +for most purposes this does the right thing. + + + diff --git a/v5.10.x/_sources/riemann.rst.txt b/v5.10.x/_sources/riemann.rst.txt new file mode 100644 index 0000000000..950197b267 --- /dev/null +++ b/v5.10.x/_sources/riemann.rst.txt @@ -0,0 +1,245 @@ + +.. _riemann: + +Riemann solvers +=============== + +The Riemann solver defines the hyperbolic equation that is being solved and +does the bulk of the computational work -- it is called at every cell +interface at every time step and returns the information about waves and speeds +that is needed to update the solution. + +The directory `$CLAW/riemann/src` contains Riemann solvers for many +applications, including advection, acoustics, shallow water equations, Euler +equations, traffic flow, Burgers' equation, etc. + +See also the new book `Riemann Problems and Jupyter Solutions +`_ (SIAM, 2020), +which consists of a set of Jupyter notebooks illustrating +the basic concepts of Riemann problems and approximate solvers. + +.. _rp1: + +One-dimensional Riemann solver +------------------------------ + +Understanding the 1-dimensional solver is a critical first step since in 2 +or 3 dimensions the bulk of the work is done by a "normal solver" that +solves a 1-dimensional Riemann problem normal to each cell edge. In multiple +dimensions it is possible to use additional transverse solvers; see below. + +See :ref:`wp_algorithms` and [LeVeque-FVMHP]_ for more details about how the +algorithms in Clawpack use the Riemann solution. + +The calling sequence for the 1-dimensional Riemann solver subroutine `rp1` +is:: + + subroutine rp1(maxm, num_eqn, num_waves, num_aux, num_ghost, num_cells,ql,qr,auxl,auxr,wave,s,amdq,apdq) + + ! Input arguments + integer, intent(in) :: maxm, num_eqn, num_waves, num_aux, num_ghost, num_cells + double precision, intent(in), dimension(num_eqn, 1-num_ghost:maxm+num_ghost) :: ql,qr + double precision, intent(in), dimension(num_aux, 1-num_ghost:maxm+num_ghost) :: auxl,auxr + + ! Output arguments + double precision, intent(out) :: s(mwaves, 1-num_ghost:maxm+num_ghost) + double precision, intent(out) :: wave(num_eqn, mwaves, 1-num_ghost:maxm+num_ghost) + double precision, intent(out), dimension(num_eqn, 1-num_ghost:maxm+num_ghost) :: amdq,apdq + +Note that the names of the integer parameters used in this calling sequence have +changed in recent versions, and many solvers still use the old names. The +correspondence is: + +* `meqn = num_eqn`, the number of equations in the system, +* `mwaves = num_waves`, the number of waves in each Riemann solution, +* `mx = num_cells`, the number of grid cells, +* `maux = num_aux`, the number of auxiliary variables, + +The input data consists of two arrays `ql` and `qr`. The value +`ql(:,i)` is the value :math:`q_i^L` at the left edge of the i’th +cell, while `qr(:,i)` is the value :math:`q_i^R` at the right edge +of the i’th cell, as indicated in this figure: + +.. image :: images/qlqr.gif + +In the classic Clawpack algorithm, :math:`q_i^L = q_i^R` and both values agree with +:math:`Q_i` , the cell average. +More flexibility is allowed because in some applications, or in +adapting clawpack to implement different algorithms, it is useful to allow +different values at each edge. For example, in the SharpClaw algorithms, we define a +piecewise polynomial function within the grid cell (as illustrated in the figure) +and then solve the Riemann problems between these values. This approach to +high-resolution methods is discussed in Chapter 6 of [LeVeque-FVMHP]_, +and the SharpClaw algorithms are discussed in [KetParLev13]_. + +Note that the Riemann problem at the interface :math:`x_{i−1/2}` +between cells :math:`i − 1` and :math:`i` has data: + +* Left state: :math:`q_{i-1}^R` = `qr(:,i-1)`, +* Right state: :math:`q_{i}^L =` `ql(:,i)`. + +This notation can be confusing since in the literature we often use :math:`q_\ell` +to denote the left state and :math:`q_r` to denote the right state +in specifying Riemann data. + +The Riemann solver `rp1` also has input parameters `auxl` and `auxr` +that contain values of the auxiliary variables if these are being used (see +:ref:`user_setaux`). +Normally `auxl(:,i) = auxr(:,i) = aux(:,i)` when the Riemann solver is called from the +classic Clawpack routines. + +The routine `rp1` must solve the Riemann problem for each value of `i`, +and return the following (for `i=1-num_ghost` to `mx+num_ghost`): + +* `amdq(1:meqn,i)` = the vector :math:`{\cal A}^-\Delta Q_{i-1/2}`, + +* `apdq(1:meqn,i)` = the vector :math:`{\cal A}^+\Delta Q_{i-1/2}`, + +* `wave(1:meqn,i,p)` = the vector :math:`{\cal W}^p_{i-1/2}`, + +* `s(i,p)` = the wave speed :math:`s^p_{i-1/2}` for each wave. + +This uses the notation of :ref:`wp_algorithms` and [LeVeque-FVMHP]_. + +Here are some examples of one-dimensional Riemann solvers that may +be helpful as a starting point for development of new solvers: + +* `Advection (linear, scalar, constant-coefficient) `_ +* `Acoustics (linear system, constant-coefficient) `_ +* `Acoustics (linear system, variable-coefficient) `_ +* `Shallow water (Roe) (nonlinear system) `_ + +.. _riemann_pointwise: + +Pointwise Riemann solvers +------------------------- +Most of the solvers available are written (as described above) in **vectorized +form**, meaning that there is a loop over a 1-dimensional slice of the grid +inside the Riemann solver itself. This used to be necessary in order to get +good performance, but tests with modern compilers suggest that it is no longer +so. Clawpack 5.x (both the Fortran codes and PyClaw) also supports the use of +**pointwise Riemann solvers**, in which the solver routine solves a single +Riemann problem and does not loop over the grid. This allows the solver +to be written in a more natural way, with `q_l` and `q_r` referring to the +left and right states in the Riemann problem. + +In a pointwise Riemann solver, the solver routine should be named by appending +`_ptwise` to the usual name; i.e. `rp1_ptwise` in 1D, or `rpn2_ptwise` and +`rpt2_ptwise` in higher dimensions. When compiling the solver, it is necessary +to link in the appropriate "harness": + +* `$CLAW/Riemann/src/rp1_ptwise.f90` in 1D; +* `$CLAW/Riemann/src/rpn2_ptwise.f90` and `$CLAW/Riemann/src/rpt2_ptwise.f90` in 2D. + +No harness has been written yet for 3D pointwise solvers. + +The calling sequence for a 1D pointwise solver is:: + + subroutine rp1_ptwise(num_eqn, num_aux, num_waves, q_l, q_r, aux_l, aux_r, wave, s, amdq, apdq) + + ! Input Arguments + integer, intent(in) :: num_eqn, num_aux, num_waves + real(kind=8), intent(in out) :: q_l(num_eqn), q_r(num_eqn) + real(kind=8), intent(in out) :: aux_l(num_aux), aux_r(num_aux) + + ! Output arguments + real(kind=8), intent(in out) :: wave(num_eqn, num_waves) + real(kind=8), intent(in out) :: s(num_waves) + real(kind=8), intent(in out) :: apdq(num_eqn), amdq(num_eqn) + +Examples of pointwise Riemann solvers: + +* `1D Advection `_ +* `2D Acoustics `_ + + +.. _riemann_fwave: + +f-wave Riemann solvers +---------------------- + +As described in :ref:`wp_fwave`, for spatially-varying flux functions it is +often best to use the f-wave formulation of the wave-propagation algorithms. +This can be implemented in Clawpack by providing a +suitable Riemann solver that returns f-waves instead of ordinary waves, +obtained by decomposing +the flux difference :math:`f(Q_i,x_i) - f(Q_{i-1},x_{i-1})` into +f-waves using appropriate eigenvectors of the Jacobian matrices to either +side of the interface. The Riemann solver has the same form and calling +sequence as described above; the only difference is that the output +argument `wave` should return an array of f-waves. while `amdq` +and `apdq` have the same meaning as before. + +In order to indicate that the Riemann solver returns f-waves: + +* In classic Clawpack, AMRClaw, or Geoclaw, the parameter `runclaw.use_fwaves` + in `setrun` should be set to `True`, see :ref:`setrun`. + +* In PyClaw, one should set `solver.fwave = True`. + +.. _riemann_2D: + +2D Riemann solvers +------------------ +In two dimensions, all Clawpack algorithms require a *normal* Riemann +solver, that solves a one-dimensional (planar) Riemann problem in the +direction normal to a cell interface. Some Clawpack algorithms also +make use of a *transverse* Riemann solver. + +The calling sequence for the normal Riemann solver in 2D is:: + + subroutine rpn2(ixy, maxm, num_eqn, num_waves, num_aux, num_ghost, num_cells, ql, qr, auxl, auxr, wave, s, amdq, apdq) + + ! Input + integer, intent(in) :: ixy, maxm, num_eqn, num_waves, num_aux, num_ghost, num_cells + real(kind=8), intent(in out) :: ql(num_eqn, 1-num_ghost:maxm+num_ghost) + real(kind=8), intent(in out) :: qr(num_eqn, 1-num_ghost:maxm+num_ghost) + real(kind=8), intent(in out) :: auxl(num_aux, 1-num_ghost:maxm+num_ghost) + real(kind=8), intent(in out) :: auxr(num_aux, 1-num_ghost:maxm+num_ghost) + + ! Output + real(kind=8), intent(in out) :: wave(num_eqn, num_waves, 1-num_ghost:maxm+num_ghost) + real(kind=8), intent(in out) :: s(num_waves, 1-num_ghost:maxm+num_ghost) + real(kind=8), intent(in out) :: amdq(num_eqn, 1-num_ghost:maxm+num_ghost) + real(kind=8), intent(in out) :: apdq(num_eqn, 1-num_ghost:maxm+num_ghost) + +The inputs and outputs have the same meaning as in 1D. The additional input +parameter `ixy` is used to indicate whether the solver is sweeping in the +x direction (`ixy=1`) or the y direction (`ixy=2`). + +TODO: Continue description -- 3d, transverse solvers. + +Using a custom solver +--------------------- +Many solvers are provided in the Clawpack Riemann repository. +If you develop your own Riemann solver, you can use it as follows: + +With the Fortran codes (Classic, AMRClaw, Geoclaw) simply compile your +solver and link it into the executable. + +With PyClaw, if you have written your solver in Python then you can simply +import it. If you have written it in Fortran, first compile it with `f2py` +via a command like + + f2py -c my_riemann_solver.f90 -m solver_name + +Here `solver_name` can be replaced by whatever you like. Then in your +PyClaw script, simply import the Riemann solver and pass it as the sole argument +when you initialize your ClawSolver object; e.g.:: + + import solver_name + ... + solver = pyclaw.ClawSolver1D(solver_name) + + +Adding a solver to the Riemann repository +----------------------------------------- +If you have developed a new Riemann solver, **please** let us know! +We'd love to include it in the Clawpack Riemann repository so that +others can make use of it. You can simply send us a note on the +claw-users google group, or issue a pull request on Github. + +If you +want to make your solver fully functional with the various Clawpack +codes, then follow the additional steps +`outlined in the Riemann README. `_ diff --git a/v5.10.x/_sources/riemann/Shallow_water_Riemann_solvers.rst.txt b/v5.10.x/_sources/riemann/Shallow_water_Riemann_solvers.rst.txt new file mode 100644 index 0000000000..03b3f6919d --- /dev/null +++ b/v5.10.x/_sources/riemann/Shallow_water_Riemann_solvers.rst.txt @@ -0,0 +1,188 @@ + +.. _Shallow_water_Riemann_solvers: + +Shallow water Riemann solvers in Clawpack +========================================= + +A wide range of shallow water (SW) solvers are available in +`clawpack.riemann`. Here’s a brief description of each. For each one, +we have indicated (after “Fortran:”) the files you should compile to use +it in the Fortran codes, and after “PyClaw” where you should import it +from to use it in Python. If a pure-Python implementation is available, +we also indicate that. Finally, we include links to examples that use +each solver. + +One dimension +------------- + +For most 1D solvers, the vector `q` of conserved quantities is + +.. math:: + + + q = \begin{bmatrix} h \\ hu \end{bmatrix}, + +where :math:`h` is depth and :math:`hu` is momentum. Solvers with a +tracer include that as a 3rd component. For solvers with bathymetry, the +bathymetry is the first (and only) component of `aux`. All solvers +require setting a constant parameter `grav`, which controls the force +of gravity. + +- **Basic Roe solver**: The most basic solver. Uses Roe’s + linearization, with an entropy fix. + + - Fortran code: + `rp1_shallow_roe_with_efix.f90 `__ + - PyClaw import: `riemann.shallow_roe_with_efix_1D` + - Pure Python code: `riemann.shallow_1D_py.shallow_roe_1D` + - Examples: + + - https://github.com/clawpack/pyclaw/blob/master/examples/shallow_1d/dam_break.py + +- **HLL solver**: Also basic; uses HLL instead of Roe. + + - Pure Python `riemann.shallow_1D_py.shallow_hll_1D` + +- **Roe solver with a tracer**: Uses Roe’s linearization and add a 3rd + equation to advect a passive tracer. Useful if you want to track + which bit of water went where. + + - Fortran code: + `rp1_shallow_roe_tracer.f90 `__ + - PyClaw import: `riemann.shallow_roe_tracer_1D` + - Examples: + + - https://github.com/clawpack/riemann_book/blob/master/Shallow_tracer.ipynb + +- **F-wave solver with bathymetry**: Use this one if you have varying + bathymetry. Uses the :math:`f`-wave approach to incorporate source + terms from bathymetry. Well-balanced. + + - Fortran: `rp1_shallow_bathymetry_fwave.f90` + - PyClaw: `riemann.shallow_bathymetry_fwave_1D` + - Pure Python: `riemann.shallow_1D_py.shallow_fwave_1D` + - Examples: + + - https://github.com/clawpack/pyclaw/blob/master/examples/shallow_1d/sill.py + +Two dimensions +-------------- + +For most 2D solvers, the vector `q` of conserved quantities is + +.. math:: + + + q = \begin{bmatrix} h \\ hu \\ hv \end{bmatrix}, + +where :math:`h` is depth and :math:`hu, hv` are the :math:`x`- and +:math:`y`-components of momentum. For solvers with bathymetry, the +bathymetry is the first (and only) component of `aux`. For the mapped +solver, see the implementation for a description of `aux`. As in 1D, +all solvers require setting a constant parameter `grav`, which +controls the force of gravity. + +- **Basic Roe solver**: The most basic solver. Uses Roe’s + linearization, with an entropy fix. Normal and transverse solvers + available. + + - Fortran code: + `rpn2_shallow_roe_with_efix.f90 `__, + `rpt2_shallow_roe_with_efix.f90 `__ + - PyClaw import: `riemann.shallow_roe_with_efix_2D`. + - Examples: + + - https://github.com/clawpack/pyclaw/blob/master/examples/shallow_2d/radial_dam_break.py + +- **F-wave solver with bathymetry**: Use this one if you have varying + bathymetry but no dry states. Uses the :math:`f`-wave approach to + incorporate source terms from bathymetry. Well-balanced. Normal + solver only. + + - Fortran: `rpn2_shallow_bathymetry_fwave.f90`. + - PyClaw: `riemann.shallow_bathymetry_fwave_2D`. + +- **Mapped solver for the sphere**: Uses grid mapping to solve the + shallow water equations on the sphere. Does not include bathymetry. + Both normal and transverse solvers available. + + - Fortran: + `rpn2_shallow_sphere.f90 `__, + `rpt2_shallow_sphere.f90 `__ + - PyClaw: `riemann.shallow_sphere_2D` + - Examples: + + - https://github.com/clawpack/pyclaw/blob/master/examples/shallow_sphere/Rossby_wave.py + +- **GeoClaw “augmented” solver**: This is the most robust (but also the + most costly) solver. Used in GeoClaw. Augmented solver (with extra + waves) to handle bathymetry, and dry states. Both normal and + transverse solvers available. + + - Fortran: + `rpn2_geoclaw.f `__, + `rpt2_geoclaw.f `__ + - PyClaw import: (normal solver only) `riemann.sw_aug_2d` + - Examples: + + - https://github.com/clawpack/apps/blob/master/notebooks/pyclaw/beach.ipynb + +Layered shallow water equations +------------------------------- + +1D and 2D solvers for the layered shallow water equations are also +included. + +Potentially useful contributions (what’s missing) +------------------------------------------------- + +- 2D mapped grid solvers (for a planar grid) +- Transverse versions of `rpn2_shallow_bathymetry_fwave.f90`, + `rpn2_sw_aug.f90`. + +Demonstrations +-------------- + +.. code:: ipython3 + + %matplotlib inline + import matplotlib.pyplot as plt + from clawpack import riemann + from clawpack.riemann import riemann_tools + import numpy as np + +.. code:: ipython3 + + h_l = 1.; h_r = 0.5; + u_l = 0.; u_r = 0.; + q_l = np.array([h_l,u_l]); q_r = np.array([h_r,u_r]) + problem_data={'grav':1.0,'efix':False} + +Roe +~~~ + +.. code:: ipython3 + + states, speeds, reval = riemann_tools.riemann_solution(riemann.shallow_1D_py.shallow_roe_1D,q_l,q_r, + problem_data=problem_data) + riemann_tools.plot_phase(states) + + + +.. image:: Shallow_water_Riemann_solvers_figs/output_9_0.png + + +HLL +~~~ + +.. code:: ipython3 + + states, speeds, reval = riemann_tools.riemann_solution(riemann.shallow_1D_py.shallow_hll_1D,q_l,q_r, + problem_data=problem_data) + riemann_tools.plot_phase(states) + + + +.. image:: Shallow_water_Riemann_solvers_figs/output_11_0.png + + diff --git a/v5.10.x/_sources/ruled_rectangles.rst.txt b/v5.10.x/_sources/ruled_rectangles.rst.txt new file mode 100644 index 0000000000..4fe5440750 --- /dev/null +++ b/v5.10.x/_sources/ruled_rectangles.rst.txt @@ -0,0 +1,624 @@ +.. _ruled_rectangles: + +Ruled Rectangles +================ + +**New in Version 5.7.0.** + +Adapted from `this notebook +`_. + +In past versions of AMRClaw and GeoClaw, one could specify "refinement +regions" as rectangles over which a `minlevel` and `maxlevel` are +specified (perhaps over some time interval), as described in +:ref:`refinement-regions`. + +Allowing only rectangles made it very easy to check each cell for +inclusion in a region, but is a severe restriction -- often a number of +rectangles must be used to follow a complicated coastline, for example, +or else many points ended up being refined that did not require it (e.g. +onshore points that never get wet in a GeoClaw simulation). + +We have introduced a new data structure called a "Ruled Rectangle" that +is a special type of polygon for which it is also easy to check whether +a given point is inside or outside, but that is much more flexible than +a rectangle. It is a special case of a "ruled surface", which is a +surface in 3D that is bounded by two curves, each parameterized by +:math:`s` from :math:`s_1` to :math:`s_2`, and with the surface defined +as the union of all the line segments connecting one curve to the other +for each value of :math:`s` in :math:`[s_1,s_2]`. A Ruled Rectangle is a +special case in which each curve lies in the :math:`x`-:math:`y` plane +and either :math:`s=x` for some range of :math:`x` values or :math:`s=y` +for some range of :math:`y` values. If :math:`s=x`, for example, then +the line segments defining the surface are intervals +:math:`y_{\scriptstyle lower}(x) \leq y \leq y_{\scriptstyle upper}(x)` +for each :math:`x` over some range :math:`x_1 \leq x \leq x_2`. It is +easy to check if a given :math:`(x_c,y_c)` is in this region: it is if +:math:`x_1 \leq x_c \leq x_2` and in addition +:math:`y_{\scriptstyle lower}(x_c) \leq y_c \leq y_{\scriptstyle upper}(x_c)`. + +The class ``clawpack.amrclaw.region_tools.RuledRectangle`` supports +a subset of ruled rectangles defined by a finite set of :math:`s` +values along a coordinate line, e.g. :math:`s[0] < s[1] < s[2] < +\cdots < s[N]` and for each :math:`s[k]` two values `lower[k]` and +`upper[k]`. If `rr` is an instance of this class then `rr.s`, +`rr.lower`, and `rr.upper` contain these arrays. Whether `s` +corresponds to `x` or `y` is determined by: + +- If `rr.ixy in [1, 'x']` then `s` gives a set of :math:`x` values, +- If `rr.ixy in [2, 'y']` then `s` gives a set of :math:`y` values. + +The points specified can then be connected by line segments to define a +Ruled Rectangle, and this is done if `rr.method == 1` (piecewise +linear). On the other hand, if `rr.method == 0` (piecewise constant) +then the values `lower[k], upper[k]` are used as the bounds for all +`s` in the interval :math:`s[k] \leq s \leq s[k+1]` (for +:math:`k = 0,~1,~\ldots,~N-1`). In this case the values +`lower[N], upper[N]` are not used. This also defines a polygon, but +one that consists of a set of *stacked boxes*. The advantage of the +latter form is that it is slightly easier to check if a point is in the +Ruled Rectangle since no linear interpolation is required along the +edges. Also for some applications we want the Ruled Rectangle to exactly +cover a contiguous set of finite volume grid cells, which has the shape +of a set of stacked boxes. + +Contents +-------- + +- `Examples <#rr-examples>`__ +- `Relation to convex polygons <#rr-polygons>`__ +- `Other attributes and methods <#rr-attr>`__ +- `A simple rectangle <#rr-rect>`__ +- `Defining a Ruled Rectangle covering selected cells <#rr-cover>`__ + + +.. _rr-examples: + +Examples +-------- + +Some simple examples follow: + + +Define a Ruled Rectangle by specifying a set of points: + +.. code:: ipython3 + + from clawpack.amrclaw import region_tools + rr = region_tools.RuledRectangle() + rr.ixy = 1 # so s refers to x, lower & upper are limits in y + rr.s = array([1,2,4,6]) + rr.lower = array([0,2,1,3]) + rr.upper = array([4,5,3,6]) + +Setting `rr.method` to 1 or 0 gives a Ruled Rectangle in which the +points specified above are connected by lines or used to define stacked +boxes. + +Both are illustrated in the figure below. Note that we use the method +`rr.vertices()` to return a list of all the vertices of the polygon +defined by `rr` for plotting purposes. + +.. code:: ipython3 + + figure(figsize=(10,5)) + subplot(121) + rr.method = 1 + xv,yv = rr.vertices() + plot(xv,yv,'b') + grid(True) + axis([0,7,-1,6]) + title('With method==1') + + subplot(122) + rr.method = 0 + xv,yv = rr.vertices() + plot(xv,yv,'r') + grid(True) + axis([0,7,-1,6]) + title('With method==0') + + + +.. image:: RuledRectangles_files/RuledRectangles_10_1.png + + +In the plots above the `s` values correspond to `x = 1, 2, 4, 6`, +and the `lower` and `upper` arrays define ranges in `y`. + +If we set `rr.ixy = 2` or `'y'`, then the `s` values will instead +correspond to `y = 1, 2, 4, 6` and the `lower` and `upper` will +define ranges in `x`. This is illustrated in the plots below. + +.. code:: ipython3 + + rr.ixy = 2 # so s refers to y, lower & upper are limits in x + + figure(figsize=(10,5)) + subplot(121) + rr.method = 1 + xv,yv = rr.vertices() + plot(xv,yv,'b') + grid(True) + axis([-1,6,0,7]) + title('With method==1') + + subplot(122) + rr.method = 0 + xv,yv = rr.vertices() + plot(xv,yv,'r') + grid(True) + axis([-1,6,0,7]) + title('With method==0') + + + + + +.. image:: RuledRectangles_files/RuledRectangles_12_1.png + + +.. _rr-polygons: + +Relation to convex polygons +--------------------------- + +Note that the polygons above are not convex, but clearly some Ruled +Rectangles would be convex. Conversely, *any* convex polygon can be +expressed as a Ruled Rectangle --- simply order the vertices so that the +:math:`x` values are increasing, for example, and use these as the `s` +values in a `RuledRectangle` with `ixy='x'`. Then for each :math:`x` +there is a connected interval of :math:`y` values that lie within the +polygon (by convexity), so this defines the `lower` and `upper` +values. (Or you could start by ordering vertices by increasing :math:`y` +values and similarly define a `RuledRectangle` with `ixy='y'`.) + +So a `RuledRectangle` is a nice generalization of a convex polygon for +which it is easy to check inclusion of an arbitrary point. + + +.. _rr-attr: + +Other attributes and methods +---------------------------- + +`ds` +~~~~~~ + +If the points `s[k]` are equally spaced then `ds` is the spacing +between them. This makes it quicker to determine what two points an +arbitrary value of :math:`s` lies between when determining whether a +large set of points are inside or outside the Ruled Rectangle, rather +than having to search. + +The Ruled Rectangle defined above has unequally spaced points and the +`ds` attribute is set to `-1` in this case. + +.. code:: ipython3 + + rr.ds + + + + +.. parsed-literal:: + + -1 + + + +`slu` +~~~~~~~ + +Rather than specifying `s`, `lower`, and `upper` separately, you +can specify an array `slu` with three columns in defining a +`RuledRectangle`, and such an array is returned by the `slu` method: + +.. code:: ipython3 + + rr.slu() + + + + +.. parsed-literal:: + + array([[1, 0, 4], + [2, 2, 5], + [4, 1, 3], + [6, 3, 6]]) + + + +Here's an example defining a `RuledRectangle` via `slu`: + +.. code:: ipython3 + + slu = vstack((linspace(0,14,8), zeros(8), [1,2,1,2,1,2,1,2])).T + print('slu = \n', slu) + + rr = region_tools.RuledRectangle(slu=slu) + rr.ixy = 2 + rr.method = 1 + xv,yv = rr.vertices() + plot(xv,yv) + + +.. parsed-literal:: + + slu = + [[ 0. 0. 1.] + [ 2. 0. 2.] + [ 4. 0. 1.] + [ 6. 0. 2.] + [ 8. 0. 1.] + [10. 0. 2.] + [12. 0. 1.] + [14. 0. 2.]] + + + +.. image:: RuledRectangles_files/RuledRectangles_19_2.png + + +`bounding_box` +~~~~~~~~~~~~~~~~ + +`rr.bounding_box()` returns the smallest rectangle `[x1,x2,y1,y2]` +containing the ruled rectangle: + +.. code:: ipython3 + + rr.bounding_box() + + +.. parsed-literal:: + + [0.0, 2.0, 0.0, 14.0] + + + +`mask_outside` +~~~~~~~~~~~~~~~~ + +If `X,Y` are 2D numpy arrays defining `(x,y)` coordinates on a grid, +then `rr.mask_outside(X,Y)` returns a mask array `M` of the same +shape as `X,Y` that is `True` at points outside the Ruled Rectangle. + +.. code:: ipython3 + + x = linspace(0,3,31) + y = linspace(0,16,81) + X,Y = meshgrid(x,y) + Z = X + Y # sample data values to plot + + M = rr.mask_outside(X,Y) + Zm = ma.masked_array(Z,mask=M) + pcolorcells(X,Y,Zm) + colorbar() + + + + +.. image:: RuledRectangles_files/RuledRectangles_23_1.png + + +read and write, and instantiating from a file +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`rr.write(fname)` writes out the `slu` array and other attributes to +file `fname`, and `rr.read(fname)` can be used to read in such a +file. You can also specify `fname` when instantiating a new Ruled +Rectangle: + +.. code:: ipython3 + + rr.write('RRzigzag.data') + +.. code:: ipython3 + + rr2 = region_tools.RuledRectangle('RRzigzag.data') + rr2.slu() + +.. parsed-literal:: + + array([[ 0., 0., 1.], + [ 2., 0., 2.], + [ 4., 0., 1.], + [ 6., 0., 2.], + [ 8., 0., 1.], + [10., 0., 2.], + [12., 0., 1.], + [14., 0., 2.]]) + + + +Here's what the file looks like: + +.. code:: ipython3 + + lines = open('RRzigzag.data').readlines() + for line in lines: + print(line.strip()) + + +.. parsed-literal:: + + + 2 ixy + 1 method + 2 ds + 8 nrules + 0.000000000 0.000000000 1.000000000 + 2.000000000 0.000000000 2.000000000 + 4.000000000 0.000000000 1.000000000 + 6.000000000 0.000000000 2.000000000 + 8.000000000 0.000000000 1.000000000 + 10.000000000 0.000000000 2.000000000 + 12.000000000 0.000000000 1.000000000 + 14.000000000 0.000000000 2.000000000 + + +Note that this Ruled Rectangle has equally spaced points and so +`ds = 2` is the spacing. + +`make_kml` +~~~~~~~~~~~~ + +`rr.make_kml()` can be used to create a kml file that can be opened on +Google Earth to show the polygon defined by `rr`. This assumes that +`x` corresponds to longitude and `y` to latitude and is designed for +GeoClaw applications. Several optional arguments can be specified: +`fname, name, color, width, verbose`. + +A GeoClaw AMR flag region +~~~~~~~~~~~~~~~~~~~~~~~~~ + +The figure below shows a Ruled Rectangle designed to cover Admiralty +Inlet, the water way between the Kitsap Peninsula and Whidbey Island +connecting the Strait of Juan de Fuca to lower Puget Sound. For some +tsunami modeling problems it is important to cover this region with a +finer grid than is needed elsewhere. + +.. code:: ipython3 + + Image('figs/RuledRectangle_AdmiraltyInlet.png', width=400) + + + + +.. image:: RuledRectangles_files/RuledRectangles_32_0.png + :width: 400px + + + +The Ruled Rectangle shown above was defined by the code below: + +.. code:: ipython3 + + slu = \ + array([[ 47.851, -122.75 , -122.300], + [ 47.955, -122.75 , -122.300], + [ 48. , -122.8 , -122.529], + [ 48.036, -122.8 , -122.578], + [ 48.12 , -122.9 , -122.577], + [ 48.187, -122.9 , -122.623], + [ 48.191, -122.9 , -122.684], + [ 48.221, -122.9 , -122.755]]) + + rr_admiralty = region_tools.RuledRectangle(slu=slu) + rr_admiralty.ixy = 'y' + rr_admiralty.method = 1 + + rr_name = 'RuledRectangle_AdmiraltyInlet' + rr_admiralty.write(rr_name + '.data') + rr_admiralty.make_kml(fname=rr_name+'.kml', name=rr_name) + +The file `RuledRectangle_AdmiraltyInlet.data` can then be used as a +"flag region" in the modified GeoClaw code, see +`FlagRegions.ipynb `__ for more details. + +The file `RuledRectangle_AdmiraltyInlet.kml` can be opened in Google +Earth to show the polygon, as captured in the figure above. + + +.. _rr-rect: + +A simple rectangle +------------------ + +A simple rectangle with extent `[x1,x2,y1,y2]` can be specified as a +`RuledRectangle` via e.g. : + +:: + + rectangle = region_tools.RuledRectangle() + rectangle.ixy = 'x' + rectangle.s = [x1, x2] + rectangle.lower = [y1, y1] + rectangle.upper = [y2, y2] + rectangle.method = 0 + +This can be done for you when instantiating a `RuledRectangle` using: + +:: + + rectangle = region_tools.RuledRectangle(rect=[x1,x2,y1,y2]) + +For example: + +.. code:: ipython3 + + rectangle = region_tools.RuledRectangle(rect=[1,3,5,6]) + + xv,yv = rectangle.vertices() + plot(xv,yv,'b') + grid(True) + axis([0,4,4,7]); + + + +.. image:: RuledRectangles_files/RuledRectangles_37_0.png + + +.. _rr-cover: + +Defining a Ruled Rectangle covering selected cells +-------------------------------------------------- + +The module function +``region_tools.ruledrectangle_covering_selected_points`` can be used to +generate a Ruled Rectangle that covers a specified set of points as +compactly as possible. This is useful for generating AMR refinement +regions that cover a set of points where we want to enforce a fine grid +without including too many other points. + +First generate some sample data: + +.. code:: ipython3 + + x_edge = linspace(-5,27,33) + y_edge = linspace(-7,7,15) + + x_center = 0.5*(x_edge[:-1] + x_edge[1:]) + y_center = 0.5*(y_edge[:-1] + y_edge[1:]) + + X,Y = meshgrid(x_center,y_center) + pts_chosen = where(abs(X-Y**2) < 4., 1, 0) + pts_chosen = where(logical_or(X>24, Y<-4), 0, pts_chosen) + pcolorcells(x_edge,y_edge,pts_chosen, cmap=cm.Blues, + edgecolor=[.8,.8,.8], linewidth=0.1) + + + +.. image:: RuledRectangles_files/RuledRectangles_39_1.png + + +The array `pts_chosen` has been defined with the value 1 in the dark +blue cells in the figure above, and 0 elsewhere. + +In this case the points can be covered by a Ruled Rectangle with +`ixy = 'y'` most efficiently, giving a polygon that covers only the +selected points. Note we use `method = 0` to generate a Ruled +Rectangle that covers all the grid cells: + +.. code:: ipython3 + + rr = region_tools.ruledrectangle_covering_selected_points(x_center, y_center, + pts_chosen, ixy='y', method=0, + verbose=True) + + pcolorcells(x_edge,y_edge,pts_chosen, cmap=cm.Blues, + edgecolor=[.8,.8,.8], linewidth=0.1) + xv,yv = rr.vertices() + plot(xv,yv,'r',label='Ruled Rectangle') + legend(loc='lower right') + title('With ixy=2 and method=0'); + + +.. parsed-literal:: + + Extending rectangles to cover grid cells + RuledRectangle covers 80 grid points + + + +.. image:: RuledRectangles_files/RuledRectangles_42_1.png + + +By contrast, if we use `ixy = 'x'`, the minimal Ruled Rectangle +covering the selected cells will also cover a number of cells that were +not selected: + +.. code:: ipython3 + + rr = region_tools.ruledrectangle_covering_selected_points(x_center, y_center, + pts_chosen, ixy='x', method=0, + verbose=True) + pcolorcells(x_edge,y_edge,pts_chosen, cmap=cm.Blues, + edgecolor=[.8,.8,.8], linewidth=0.1) + xv,yv = rr.vertices() + plot(xv,yv,'r',label='Ruled Rectangle') + legend(loc='lower right') + title('With ixy=1 and method=0'); + + +.. parsed-literal:: + + Extending rectangles to cover grid cells + RuledRectangle covers 129 grid points + + + +.. image:: RuledRectangles_files/RuledRectangles_44_1.png + + +Note that if we use `method = 1` then the Ruled Rectangle covers the +center of each cell but not the entire grid cell for cells near the +boundary: + +.. code:: ipython3 + + rr = region_tools.ruledrectangle_covering_selected_points(x_center, y_center, + pts_chosen, ixy='y', method=1, + verbose=True) + + pcolorcells(x_edge,y_edge,pts_chosen, cmap=cm.Blues, + edgecolor=[.8,.8,.8], linewidth=0.1) + xv,yv = rr.vertices() + plot(xv,yv,'r',label='Ruled Rectangle') + legend(loc='lower right') + title('With ixy=2 and method=1'); + + +.. parsed-literal:: + + RuledRectangle covers 63 grid points + + + +.. image:: RuledRectangles_files/RuledRectangles_46_1.png + + +With `ixy='x'` and `method=1` the Ruled Rectangle degenerates in the +upper right corner to a line segment that covers only the cell centers: + +.. code:: ipython3 + + rr = region_tools.ruledrectangle_covering_selected_points(x_center, y_center, + pts_chosen, ixy='x', method=1, + verbose=True) + pcolorcells(x_edge,y_edge,pts_chosen, cmap=cm.Blues, + edgecolor=[.8,.8,.8], linewidth=0.1) + xv,yv = rr.vertices() + plot(xv,yv,'r',label='Ruled Rectangle') + legend(loc='lower right') + title('With ixy=1 and method=1'); + + +.. parsed-literal:: + + RuledRectangle covers 100 grid points + + + +.. image:: RuledRectangles_files/RuledRectangles_48_1.png + + +Example covering the continental shelf +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The figure below shows a Ruled Rectangle that roughly covers the +continental shelf offshore of Vancouver Island and Washington state. The +region may need to be refined to a higher level than the deeper ocean in +order to capture shoaling tsunami waves interacting with the shelf +topography. This region was defined by first selecting a set of points +from etopo1 topography satisfying certain constraints on elevation using +the marching front algorithm described in :ref:`marching_front`, +and then using the ``region_tools.ruledrectangle_covering_selected_points`` +function to build a Ruled Rectangle covering these points. + + +.. image:: RuledRectangles_files/RuledRectangles_50_0.png + :width: 400px + diff --git a/v5.10.x/_sources/sealevel.rst.txt b/v5.10.x/_sources/sealevel.rst.txt new file mode 100644 index 0000000000..b2f373dee7 --- /dev/null +++ b/v5.10.x/_sources/sealevel.rst.txt @@ -0,0 +1,67 @@ +.. _sealevel: + +========================== +Setting sea_level +========================== + +GeoClaw has a parameter *sea_level* (see :ref:`setrun_geoclaw`) that can be +used to specify the initialization of the fluid depth relative to the +specified topography (see :ref:`topo`). + +**New in v5.7.0:** You can now specify a spatially varying initial surface +elevation, see :ref:`set_eta_init`. + +Unless a different set of initial +conditions is specified (see :ref:`setrun_qinit`), the default is to +initialize with zero velocity and depth *h* chosen so that *h+B = sea_level* +at any point where *B < sea_level*, where *B* is the topography or bathymetry +in the grid cell (as determined by interpolation from the specified +*topo* files as described in :ref:`topo`). + +It is important to know what +`vertical datum `_ +the topography is relative to. Coastal bathymetry developed for tsunami +modeling (e.g. from +`NOAA NGDC inundataion relief +`_) +is often relative to Mean High Water (MHW), in +which case setting *sea_level = 0.* corresponds to assuming the water level +is initially at MHW. To adjust to use a different tide level, the value of +*sea_level* must be set appropriately. The relation between MHW and other +tide levels such as Mean Sea Level (MSL) can often be found from the NGDC +webpages for a nearby tide gauge. +For example, if you go to a station page such as +`Hilo Bay +`_, +you will see a *Datums* link on the left menu. +(Be sure to switch from feet to meters!) + +Note that the difference between MHW and MSL can vary greatly between +different locations. +Global bathymetry data such as the ETOPO1 data (see :ref:`tsunamidata`) +is generally relative to MSL. +However, this data has a resolution of 1 arc-minute, more than 1.5 km, and +is not suitable as coastal bathymetry, so this data will presumably only be +used in grid cells away from the region where coastal bathymetry is +available. Since the difference between MSL and +MHW is at most a few meters, the use of different vertical datums for +regions of vastly different resolution will generally have little effect. + +If GeoClaw is used to compare inundation or tide gauge values to +observations from past tsunamis, it may be important to know the tide stage +when the largest tsunami waves arrived. Ideally it would be possible to +model the actual rise and fall of the tides during the duration +of the event, but this is not currently possible. +Tidal currents may also have a significant effect on observed inundation +patterns, but these are also ignored in GeoClaw since the water is assumed +to be at rest before the tsunami arrives. + +If GeoClaw is used for hazard assessment based on potential tsunami +scenarios, then thought should be given to the appropriate value of +*sea_level* to assume. The NCEI coastal bathymetry data is often referenced to MHW +because this is often the level assumed for tsunami hazard assessment, but +higher tide levels such as Mean Higher High Water (MHHW) or the Astronomical +High Tide (AHT) are sometimes used for worst-case scenarios. + +See :ref:`tsunamidata` for more information and links to sources of data. + diff --git a/v5.10.x/_sources/set_eta_init.rst.txt b/v5.10.x/_sources/set_eta_init.rst.txt new file mode 100644 index 0000000000..06b969c7d7 --- /dev/null +++ b/v5.10.x/_sources/set_eta_init.rst.txt @@ -0,0 +1,110 @@ + +.. _set_eta_init: + +Set Eta Init – spatially varying initial surface elevation +========================================================== + +Prior to Version 5.7.0, +GeoClaw had a single scalar parameter `sea_level` and the water +surface is initialized to this value in every cell where the GeoClaw +cell-averaged topography value `B` is smaller, i.e., the water depth +in each cell is initialized to: + +`h[i,j] = max(0, sea_level - B[i,j])`. + +In some cases it is desirable to initialize the depth so that the +surface is spatially varying. + +Starting in v5.7.0, the library routine +`$CLAW/geoclaw/src/2d/shallow/set_eta_init.f90` can be used to set +the desired initial water surface `eta = B + h` in a spacially varying +manner. In order to invoke this routine, in `setrun.py` you should set:: + + rundata.qinit_data.variable_eta_init = True + +Default behavior, adjusting sea level by seismic deformation +------------------------------------------------------------ + +The default library routine +`$CLAW/geoclaw/src/2d/shallow/set_eta_init.f90` +is set up for the use case in which a region subsides or is uplifted by a +local earthquake. +In tsunami modeling of a nearfield event, the seafloor +deformation due to the earthquake often extends onto shore in the region +being modeled. If the coastal region subsides, for example, then the +land drops near the shore and the water adjacent drops as well. If a +grid patch was initialized before the deformation specified in the dtopo +file by the formula above, then the depth `h[i,j]` does not decrease +during the subsidence, which is the correct behavior. + +However, in some +cases the tsunami does not arrive at the shore quickly and so it is +desirable to use coarser grids in early stages of the computation, +introducing highly refined grids only after some specified time. When +new levels of refinement are first introduced into a simulation then the +formula given above is used to initialize cells near the coast. But if the +coast subsided (or is uplifted), the the formula above should be replaced by: + +`h[i,j] = max(0, sea_level + dz[i,j] - B[i,j])` + +where `dz[i,j]` is obtained by interpolating the co-seismic +deformation specified in the dtopo file to the cell center. Failure to +do this can sometimes result in large areas being flooded by the +initialization that should not be flooded by the tsunami. + + +The default version of `$CLAW/geoclaw/src/2d/shallow/set_eta_init.f90` +loops over all (possibly time-dependent) +dtopo files and interpolates from these +files to the points on the grid patch, at the specified time, to adjust the +initial constant `sea_level` value at each point on the patch. + +Note that this `set_eta_init` function is only called when a grid cell is +first initialized at a given AMR level. It is called from `qinit.f90` to +initialize any patches that exist at the initial time (which may be before +the earthquake starts, in which case no adjustment to `sea_level` would be +made). + +It is also called if a region is refined to a higher level than +previously, but the resulting value is used only in cells where the +the water surface level `h+B` cannot be interpolated from coarser levels, due +to the fact that one or more neighboring cells was dry (in which case +`h+B=B` may be huge if the land rises steeply, and using this value in an +interpolation of the sea surface would lead to artificially high surface +elevation, and hence incorrect depth `h` when this is computed as `eta - B`. +So such cells near the coast must be filled with water up to the value +specified by `set_eta_init`. In previous versions they were always filled +to the level specified by `sea_level`, but this was incorrect +in regions where the water level subsided (or was uplifted) along with the +land. + +As noted above, +this is particularly important in coastal regions where there is seismic +deformation but it takes some time for the tsunami to arrive and so the fine +grids needed to resolve the region are not introduced until some time after the +seismic deformation. + +Other use cases +--------------- + +For other uses one can copy the library routine +`$CLAW/geoclaw/src/2d/shallow/set_eta_init.f90` +to the application directory and modify it as desired (and change the +`Makefile` to point to the modified version). + +For example, there may be **onshore lakes** whose initial surface elevation +should be different than `sea_level`. This could be added to the existing +routine, so that siesmic displacement of both the offshore water and onshore +lakes is also handled, or the dtopo adjustments can be removed if not needed. + +When modeling **dam break problems,** there may one or more lakes +of interest at different initial elevations. +As an example, to develop a custom routine in the case +where a lake behind a dam is desired to be set to one elevation while +everywhere else there should be no water, this routine could check the +`(x,y)` location of each cell and set `eta_init` either to the lake +elevation, if in a specified region, +or to a very negative value lower than any topography (to force `h = 0`), +when outside the region covered by the lake. + + diff --git a/v5.10.x/_sources/setaux_defaults.rst.txt b/v5.10.x/_sources/setaux_defaults.rst.txt new file mode 100644 index 0000000000..4dacbfd588 --- /dev/null +++ b/v5.10.x/_sources/setaux_defaults.rst.txt @@ -0,0 +1,43 @@ +:orphan: + +.. _setaux_defaults: + +======================== +setaux default routines +======================== + +Below are links to the default `setaux` library routines for Classic and AMRClaw. +By default these do nothing. If you wish to specify `aux` arrays you will +need to copy one of these files to your application directory and modify it +as needed. Remember to change to `Makefile` to point to the proper version. + + +- `$CLAW/classic/src/1d/setaux.f90 + `__ + +- `$CLAW/classic/src/2d/setaux.f90 + `__ + +- `$CLAW/classic/src/3d/setaux.f90 + `__ + +(Note: these links are for the version checked in to the master branch. +You can select a different branch or tag from the GitHub page.) + + + + +.. _setaux_geoclaw: + +setaux routine in GeoClaw +-------------------------- + +In GeoClaw, there is a library routine that sets `aux(1,i,j)` to the cell +average of the bathymetry, `aux(2,i,j)` to the ratio of the true cell area +to `dx*dy` (the capacity function), and `aux(3,i,j)` to the length ratio of +the bottom edge to `dx` (The latter two quantities vary +with latitude when `coordinate_system == 2`). + +- `$CLAW/geoclaw/src/2d/shallow/b4step2.f90 + `__ + diff --git a/v5.10.x/_sources/setenv.rst.txt b/v5.10.x/_sources/setenv.rst.txt new file mode 100644 index 0000000000..52f11aff4e --- /dev/null +++ b/v5.10.x/_sources/setenv.rst.txt @@ -0,0 +1,57 @@ + +.. _setenv: + +========================= +Set environment variables +========================= + +The `export` commands below work in the bash shell. The syntax may +be different in other shells. + + +CLAW +---- + +To use the Fortran versions of Clawpack you will need to set the +environment variable `CLAW` to point to the top level of clawpack tree +(there is no need to perform this step if you will only use PyClaw). +In the bash shell these can be set via:: + + export CLAW=/full/path/to/clawpack # to top level clawpack directory + + +FC +-- + +You also need to set `FC` to point to the desired Fortran compiler, +e.g.:: + + export FC=gfortran # or other preferred Fortran compiler + +Consider putting the two commands above in a file that is executed every +time you open a new shell or terminal window. On Linux machines +with the bash shell this is generally the file `.bashrc` in your home +directory. On a Mac it may be called `.bash_profile`. + +If your environment variable `CLAW` is properly set, the command :: + + ls $CLAW + +should list the top level directory, and report for example:: + + README.md riemann/ pyclaw/ + amrclaw/ setup.py clawutil/ + geoclaw/ visclaw/ classic/ + +PYTHONPATH +---------- + +If you used `pip` to install Clawpack then you should not set this +environment variable. But if you installed without `pip`, e.g. following +:ref:`installing_fortcodes`, then you need to set `PYTHONPATH` to include +the directory `$CLAW`. If `PYTHONPATH` is already set, then you may want to +insert `$CLAW` into the list of directories searched by Python via:: + + export PYTHONPATH=$CLAW:$PYTHONPATH + +See :ref:`python_path` for more information. diff --git a/v5.10.x/_sources/setplot.rst.txt b/v5.10.x/_sources/setplot.rst.txt new file mode 100644 index 0000000000..4f66a754a1 --- /dev/null +++ b/v5.10.x/_sources/setplot.rst.txt @@ -0,0 +1,121 @@ +.. _setplot: + +********************************************* +Using setplot.py to specify the desired plots +********************************************* + + +The desired plots are specified by creating an object +of class ClawPlotData that contains specifications of what *figures* should be +created, and within each figure what sets of *axes* should be drawn, and +within each axes what *items* should be plotted (lines, contour plots, +etc.). + + + +Plotting Data Objects +===================== + +More details about each class of objects can be found +on these pages: + +.. toctree:: + :maxdepth: 2 + + ClawPlotData + ClawPlotFigure + ClawPlotAxes + ClawPlotItem + + +For examples, see :ref:`plotexamples`. + +.. _setplot_overview: + +Overview +======== + +The approach outlined below may seem more complicated than necessary, and it +would be if all you ever want to do is plot one set of data at each output +time. However, when adaptive mesh refinement is used each frame of data may +contain several patches and so creating the desired plot requires looping over +all patches. This is done by the plotting utilities described in :ref:`plotting`, +but for this to work it is necessary to specify what plot(s) are desired. + +Most example directories contain a file setplot.py that contains a +function setplot(plotdata). This function +sets various attributes of plotdata +in order to specify how plotting is to be done. + +The object plotdata is of class ClawPlotData. The way to set up the plot +structure is to follow this outline: + + + * Specify some attributes of setplot that determine what sort of plots + will be produced and where they will be stored, e.g.:: + + plotdata.plotdir = '_plots' + + will cause hardcopy to go to subdirectory _plots of the current directory. + (Attributes like plotdir that are only used for hardcopy are often set in + the script plotclaw.py rather than in setplot. See :ref:`plot_files`.) + + There are many other :ref:`ClawPlotData` attributes and methods. + + * Specify one or more Figures to be created for each frame, e.g.:: + + plotfigure = plotdata.new_plotfigure(name='Solution', figno=1) + + plotfigure is now an object of class ClawPlotFigure and various attributes + can be set, e.g.:: + + plotfigure.kwargs = {'figsize':[8,12], 'facecolor':'#ff9999'} + + to specify any keyword arguments + that should be used when creating this figure in matplotlib. + The above would create a figure that is + 8 inches by 12 inches with a pink background. + + + For more options, + see the `matplotlib documentation `_ + for the `figure command + `_. + + There are many other :ref:`plotfigure` attributes and methods. + + * Specify one or more Axes to be created within each figure, e.g.:: + + plotaxes = plotfigure.new_plotaxes() + + Note that new_plotaxes is a method of class ClawPlotFigure and creates a set + of axes specific to the particular object plotfigure. + + plotaxes is now an object of class ClawPlotAxes and various attributes + can be set, e.g.:: + + plotfigure.ylimits = [-1, 1] + + + There are many other :ref:`ClawPlotAxes` attributes and methods. + + + * Specify one or more Items to be created within these axes, e.g.:: + + plotitem = plotaxes.new_plotitem(plot_type='1d_plot') + + Note that new_plotitem is a method of class ClawPlotAxes and creates a plot + object (e.g. line, contour plot, etc) + specific to the particular object plotaxes. + + plotitem is now an object of class ClawPlotItem and various attributes + can be set, e.g.:: + + plotitem.plotstyle = '-' + plotitem.color = 'r' + + for a solid line that is red. + + There are many other :ref:`ClawPlotItem` attributes and methods. + + diff --git a/v5.10.x/_sources/setrun.rst.txt b/v5.10.x/_sources/setrun.rst.txt new file mode 100644 index 0000000000..1e3435db92 --- /dev/null +++ b/v5.10.x/_sources/setrun.rst.txt @@ -0,0 +1,371 @@ + + +.. _setrun: + +***************************************************************** +Specifying classic run-time parameters in `setrun.py` +***************************************************************** + + + +It may be useful to look at a specific example, e.g. +:ref:`setrun_sample`. + +**Note:** Many parameters have changed name since Version 4.X and some new +ones have been added. See :ref:`setrun_changes` for a summary. + +To convert a Version 4.x `setrun.py` file to Version 5.0, see :ref:`claw46to50`. + + +Input +----- + +`setrun` takes a single argument `claw_pkg` that should be set to `classic`. + +Output +------ + +`rundata`, an object of class `ClawRunData`, created in the +setrun file with the commands:: + + from clawpack.clawutil import clawdata + rundata = clawdata.ClawRunData(claw_pkg, num_dim) + +The `rundata` object has an attribute `rundata.clawdata` whose +attributes are described below. + + +This section explains the parameters needed for the classic single-grid +Clawpack code. Additional parameters are needed by extensions of the code. +For these, see: + + * AMRClaw (adaptive mesh refinement): :ref:`setrun_amrclaw` + + * GeoClaw (geophysical flows): :ref:`setrun_geoclaw` + + +Run-time parameters +------------------- + +The parameters needed in 1 space dimension (*ndim=1*) are described. In 2d +and 3d there are analogous parameters in y and z required, as mentioned +below. + +.. attribute:: num_dim : integer from [1,2,3] + + number of space dimensions. + + +.. attribute:: lower : list of floats + + lower limits in the x, [y,z] directions. + +.. attribute:: upper : list of floats + + upper limits in the x, [y ,z] directions. + + +.. attribute:: num_cells : list of integers + + The number of grid cells in the x, [y, ,z] directions. + + Note that when AMR is used, `num_cells` determines the number of cells in + each dimension on the coarsest Level 1 grid. Additional parameters + described below determine refinement ratios to finer levels. + +.. attribute:: num_eqn : integer + + Number of equations in the system (e.g. *num_eqn=1* for a scalar problem). + +.. attribute:: num_aux : integer + + Number of auxiliary variables in the aux array (initialized in `setaux.f`) + +.. attribute:: capa_index : integer + + Index of aux array corresponding to capacity function, if there is one. + +.. attribute:: t0 : float + + Initial time, often *t0 = 0.* + +.. attribute:: restart : boolean + + **Currently only available in amrclaw and geoclaw.** + + Set True to restart a previous computation. To use this option, + see :ref:`restart`. Note that a change in the `Makefile` is also + required. + +.. attribute:: restart_file : str + + If `restart == True` then this should be the name of the checkpoint + file containing all the information needed to do a restart. This will + generally be of the form `fort.chkNNNNN` where `NNNNN` is the (coarse + grid) timestep from the previous computation to restart from. + This file is assumed to be in the directory specified for output from + this run. + See :ref:`restart` for more details. + + +.. attribute:: output_style: integer + + There are three possible ways to specify the output + times. This parameter selects the desired manner to specify the times, + and affects what other attributes are required. + + * *output_style = 1* : Output at fixed time intervals. + + Requires additional parameters: + + * `num_output_times` : integer, number of output times + * `tfinal` : float, final time + * `output_t0` : boolean, whether to also output at initial time `t0`. + + The time steps will be adjusted to hit these times exactly. (Provided + *dt_variable = True*. Otherwise *dt_initial* must divide + *tfinal/num_output_times* an integer number of times.) + + * *output_style = 2* : Output at specified times. + + Requires the additional parameter: + + * `output_times` : list of floats, + times to output (include `t0` explicitly if desired) + + * *output_style = 3* : Output every so many steps. + Most often used for debugging, e.g to output every time step. + + Requires additional parameters: + + * `output_step_interval` : integer, number of steps between outputs + * `total_steps` : integer, total number of steps to take + * `output_t0` : boolean, whether to also output at initial time `t0`. + + +.. attribute:: output_format: str + + Format of output. Currently the following are supported in amrclaw and + geoclaw (only `'ascii'` in classic): + + * `'ascii'` : the files `fort.q0000` etc. are ASCII files, + * `'binary64'` : Raw binary dump of full float64 (kind=8) values, + * `'binary32'` : Raw binary dump of float32 (kind=4) truncated values. + This is almost always sufficient precision for plotting or + post-processing purposes, and results in files that are + half as large as `'binary64'`. + +.. attribute:: output_q_components: list of booleans or str + + * A list such as `[1,0,1]` would indicate to output `q[0]` and `q[2]` only. + *This might not be working yet.* + + * The string `'all'` indicates that all components should be output + * The string `'none'` indicates that no components should be output + +.. attribute:: output_aux_components: list of booleans or str + + * A list such as `[1,0,1]` would indicate to output `aux[0]` and `aux[2]` only. + *This might not be working yet.* + + * The string `'all'` indicates that all components should be output + * The string `'none'` indicates that no components should be output + +.. attribute:: output_aux_onlyonce: boolean + + If `output_aux_components` is not `'none'` or an empty list, this + indicates whether `aux` arrays should be only output at time `t0` or at + every output time. The latter is generally necessary for AMR + applications unless the grids never change (and the component of `aux` + are never modified except in `setaux`). + +.. attribute:: verbosity: integer >= 0 + + A line of output (reporting t, dt and CFL number) is written to the + terminal every time step, but only at Level `verbosity` or coarser. + + Set to 0 to suppress all such output. + + +.. attribute:: dt_initial: float >= 0. + + Initial time step to try in first step. If using `dt_variable == True` + and are unsure of an appropriate + timestep, set to a very small value (e.g. `1.e-10`). After the first + step the wave speeds observed in all Riemann solutions will be used to + set the time step appropriately for the next step. + + +.. attribute:: dt_variable: boolean + + If True, time steps are adjusted automatically based on the desired + Courant number *cfl_desired*. + + If False, fixed time steps of lenght *dt_initial* are used. + +.. attribute:: dt_max: float >= 0. + + If *dt_variable = True* then this is an upper bound on the allowable time + step regardless of the Courant number. Useful if there are other reasons + to limit the time step (e.g. stiff source terms). + +.. attribute:: cfl_desired: float >= 0. + + If *dt_variable = True* then this is the desired Courant number. Time + steps will be adjusted based on the maximum wave speed seen in the *last* + time step taken. For a nonlinear problem this may not result in the + Courant number being exactly the desired value in the next step. + + Usually *cfl_desired = 0.9* or less. + +.. attribute:: cfl_max: float + + If *dt_variable = True* then this is the maximum Courant number that can + be allowed. If a time step results in a Courant number that is greater + than *cfl_desired* but less than or equal to *cfl_max*, the step is + accepted. If the Courant number is greater than *cfl_max* then the step + is rejected and a smaller step is taken. (At this point the maximum wave + speed from Riemann solutions is known, so the step can be adjusted to + exactly hit the desired value *cfl_desired*.) + + **Note:** With AMRClaw it is impossible to retake a step and so if + `cfl > cfl_max` then a warning message is printed and the computation + continues. *Note that results may be contaminated if the Courant number + is much above 1.* + This means that with AMR it is important to choose an appropriate time + step `dt_initial` for the first time step, or use a very small value. + + Usually *cfl_max = 1.0* is fine, e.g. 500000. + +.. attribute:: steps_max: int + + Maximum number of time steps allowed between output times. This is just + to avoid infinite loops and generally a large value is fine. + +.. attribute:: order : int + + `order == 1` : Use Godunov's method + + `order == 2` : Use second order corrections with limiters in normal + direction. + +.. attribute:: dimensional_split : str + + `dimensional_split == 'unsplit'` is the only option currently allowed + for AMRClaw. + +.. attribute:: transverse_waves : int or str + + `transverse_waves == 0 or 'none'` : No transverse correction terms + (Donor cell upwind if also `order == 1`). + + `transverse_waves == 1 or 'increment'` : Only the increment waves are + transmitted transversely. + (Corner transport upwind if also `order == 1`, should be second order + accurate if `order == 2`). + + `transverse_waves == 2 or 'all'` : Corner tranpsort of second order + corrections as well. (Somewhat improved stability.) + +.. attribute:: num_waves : int + + Number of waves the Riemann solver returns. + +.. attribute:: limiter : list of int or str, of length num_waves + + Each element of the list can take the values: + + * 0 or 'none' : no limiter (Lax-Wendroff) + * 1 or 'minmod' : minmod + * 2 or 'superbee' : superbee + * 3 or 'mc' : monotonized central (MC) limiter + * 4 or 'vanleer' : van Leer + + See Chapter 6 of [LeVeque-FVMHP]_ for details. + +.. attribute:: use_fwaves : boolean + + If True, the Riemann solvers should return f-waves (a decomposition of + the the flux difference) rather than the usual waves (which give + a decomposition of the jump in Q between adjacent states). + See :ref:`wp_fwave`, :ref:`riemann_fwave` and + Section 16.4 of [LeVeque-FVMHP]_ or [BaleLevMitRoss02]_ for details. + +.. attribute:: source_split : list of int or str, of length num_waves + + Determines form of fractional step algorithm used to apply source terms + (if any). Source terms must be implemented by providing a subroutine + `srcN.f` (in `N` space dimensions) that is called each time step + and should advance the solution by solving the source term equations + (the PDE after dropping the hyperolic terms). + See :ref:`user_src`. + + * src_split == 0 or 'none' : no source term (`srcN` routine never called) + * src_split == 1 or 'godunov' : Godunov (1st order) splitting used, + * src_split == 2 or 'strang' : Strang (2nd order) splitting used. + + The Strang splitting requires calling the source term routine twice each + time step (before and after the hyperbolic step, with half the time step) + and is generally not recommended. It is often no more accurate thn the + Godunov splitting, requires more work, and can make it harder to properly + set ghost cells for boundary conditions. + +.. attribute:: num_ghost : int + + number of ghost cells at each boundary. Should be at least 1 if + `order == 1` and at least 2 if `order == 2`. + +.. attribute:: bc_lower : list of int or str, of length num_ghost + + Choice of boundary conditions at the lower boundary in each dimension. + Each element can take the following values: + + * 0 or 'user' : user specified (must modify `bcNamr.f` to use this option) + * 1 or 'extrap' : extrapolation (non-reflecting outflow) + * 2 or 'periodic' : periodic (must specify this at both boundaries) + * 3 or 'wall' : solid wall for systems where q(2) is normal velocity + + If the value is 0 or 'user', then the user must modify the boundary + condition routine `bcNamr.f` to fill ghost cells in the desired manner. + See :ref:`bc` for more details. + +.. attribute:: bc_upper : list of int or str, of length num_ghost + + Choice of boundary conditions at the upper boundary in each dimension. + The same choices are available as for `bc_lower`. + + Note that if periodic boundary conditions are specified at the lower + boundary in some dimension then the same should be specified at the upper. + +.. attribute:: checkpt_style :: int + + **Currently only available in amrclaw and geoclaw.** + + Specify how often checkpoint files should be created that can be used to + restart a computation. + See :ref:`restart` for more details. + + * *checkpt_style = 0* : Do not checkpoint at all + + * *checkpt_style = 1* : Checkpoint only at the final time. + + * *checkpt_style = 2* : Specify a list of checkpoint times. + + This is generally **not** recommended because time steps will be + adjusted to hit the checkpoint times, but may be useful in order to + create a checkpoint file just before some event of interest (e.g. + when debugging a code that is known to crash at a certain time). + + Requires additional parameter: + + * checkpt_times : list of floats + + * *checkpt_style = 3* : Specify an interval for checkpointing. + + Requires additional parameter: + + * checkpt_interval : int + + Checkpoint every `checkpt_interval` time steps on Level 1 (coarsest + level). + diff --git a/v5.10.x/_sources/setrun_amrclaw.rst.txt b/v5.10.x/_sources/setrun_amrclaw.rst.txt new file mode 100644 index 0000000000..8ecf385c6d --- /dev/null +++ b/v5.10.x/_sources/setrun_amrclaw.rst.txt @@ -0,0 +1,248 @@ + +.. _setrun_amrclaw: + +***************************************************************** +Specifying AMRClaw run-time parameters in `setrun.py` +***************************************************************** + + +It may be useful to look at a specific example, e.g. +:ref:`setrun_amrclaw_sample`. + +**Note:** Many parameters have changed name since Version 4.X and some new +ones have been added. See :ref:`setrun_changes` for a summary. + +To convert a Version 4.x `setrun.py` file to Version 5.0, see :ref:`claw46to50`. + + +Input +----- + +`setrun` takes a single argument `claw_pkg` that should be set to `amrclaw`. + +Output +------ + +`rundata`, an object of class `ClawRunData`, created in the +setrun file with the commands:: + + from clawpack.clawutil import clawdata + rundata = clawdata.ClawRunData(claw_pkg, num_dim) + +The `rundata` object has an attribute `rundata.clawdata` whose +attributes are described in :ref:`setrun`. + +In addition, for AMRClaw `rundata` has an attribute `rundata.amrdata` +whose attributes are described below. + + +Run-time parameters +------------------- + +The parameters needed in 2 space dimensions (*ndim=2*) are described. In 3d +there are analogous parameters in z required, as mentioned below. + +In addition to the parameters in `rundata.clawdata` (see :ref:`setrun`), +the AMR parameters that can be set are the following attributes of +`rundata.amrdata`: + + +Special AMR parameters +---------------------- + +.. attribute:: amr_levels_max : int + + Maximum levels of refinement to use. + +.. attribute:: refinement_ratios_x : list of int + + Refinement ratios to use in the `x` direction. + + *Example:* If `num_cells[0] = 10` and `refinement_ratios_x = [2,4]` + then the Level 1 grid will have 10 cells in the x-direction, + Level 2 patches will be refined by a factor of 2, + and Level 3 will be refined by 4 relative to Level 2 + (by 8 relative to Level 1). + +.. attribute:: refinement_ratios_y : list of int + + Refinement ratios to use in the `y` direction. + +.. attribute:: refinement_ratios_t : list of int + + Refinement ratios to use in time. For an explicit method, maintaining + the Courant number usually requires refining in time by the same factor as + in space (or the maximum of the refinement ratio in the different space + directions). + + **Note:** Rather than specifying this list, in GeoClaw it is possible to set + to set `variable_dt_refinement_ratios = True` so refinement ratios in + time are chosen automatically. This might be ported to AMRClaw? + +.. attribute:: aux_type : list of str, of length num_aux + + Specifies the type of variable stored in each aux variable. + These are used when coarsening aux arrays. Each + element can be one of the following (but at most one can be 'capacity'): + + * 'center' for cell-centered values (e.g. density) + * 'capacity' for a cell-centered capacity function (e.g. cell volume) + * 'xleft' for a value centered on the left edge in x (e.g. normal velocity u) + * 'yleft' for a value centered on the left edge in y (e.g. normal velocity v) + +.. attribute:: flag_richardson : boolean + + Determines whether Richardson extrapolation will be used as an error + estimator. If `True`, patches will be coarsened by a factor of 2 each + time regridding is done and the result from a single step on the + coarsened patch with double the time step will be compared to the + solution after 2 steps on the original patch in order to estimate the error. + +.. attribute:: flag_richardson_tol : float + + When `flag_richardson == True`, cells will be flagged for refinement + if the absolute value of the estimated error exceeds this value. + + When `flag_richardson == False`, this value is not used. + +.. attribute:: flag2refine : boolean + + Determines whether the subroutine `flag2refine` is used to flag cells + for refinement. + +.. attribute:: flag2refine_tol : float + + When `flag2refine == True`, the default library version `flag2refine.f` + checks the maximum absolute value of the difference between any component + of q in this cell with the corresponding component in any of the + neighboring cells. The cell is flagged for refinement if the maximum + value is greater than this tolerance. + +.. attribute:: regrid_interval : int + + The number of time steps to take on each level between regridding to the + next finer level. + +.. attribute:: regrid_buffer_width : int + + The number of points to flag for refining around any point flagged by + error estimation or `flag2refine`. This buffer zone is to insure that + waves do not leave the refined region before the next regridding and so + is generally chosen based on the value of `regrid_interval`, typically to + be the same value since waves can travel at most one grid cell per time + step. + +.. attribute:: clustering_cutoff : float between 0 and 1 + + Cut-off used in clustering flagged points into rectangular patches for + refinement. Clusters are chosen to minimize the number of patches + subject to the constraint:: + + (# flagged pts) / (total # of cells refined) < clustering_cutoff + + If `clustering_cutoff` is close to 1, only flagged cells will be refined, + which could lead to many `1 x 1` patches. + + The default value 0.7 usually works well. + +.. attribute:: verbosity_regrid : int + + Additional information is printed to the terminal each time regridding is + done at this level or coarser. Set to 0 to suppress regridding output. + +.. attribute:: regions : list + + List of lists of the form + `[minlevel,maxlevel,t1,t2,x1,x2,y1,y2]`. + See :ref:`refinement_regions`. + This attribute may be phased out in the future in favor of `flagregions`, + but currently both are supported. + +.. attribute:: flagregions : list + + (Introduced in v5.7.0) + List of objects of class `clawpack.amrclaw.data.FlagRegion` that specify + regions where further adaptive refinement is either forced or forbiddne. + These objects are more flexible than the + older `regions` lists and are now preferred. See :ref:`flagregions`. + +.. attribute:: max1d : int + + The maximum size (in each spatial dimension) of any grid patch. If + a larger region must be refined then it it split into multiple patches. + This can be tuned if desired based on cache size and OMP efficiency + (recall that multiple patches can be advanced in time in parallel). + For debugging it may also be useful to vary this parameter. + For most cases the default values work fine: 500 in 1D, 60 in 2D, 32 in 3D. + +.. attribute:: memsize : int + + The initial length of the `alloc` array used internally in AMRClaw for + dynamic allocation of grid patch data. The default values depend on + the number of space dimensions and may be large enough. If the + `alloc` array is not long enough, then Fortran's dynamic memory + allocation will be used to double the size of this array and copy over + all previous data, so it is not necessary to specify a value unless you + are running a large problem and are concerned about the time spent + repeatedly doubling and copying. The default values are:: + + 2**20 - 1 = 1048575 in 1D, + 2**22 - 1 = 4194303 in 2D, + 2**23 - 1 = 8388607 in 3D. + + These are chosen so that repeated doubling can get as close to `2**30 - 1` as + possible, the limit of `int*4` array indices. The code will crash if + more memory is needed, in which case you may have to recompile with + `int*8` index variables. + + + + + +Debugging flags for additional printing +--------------------------------------- + +Setting one or more of these to `True` will cause additional information to +be written to the file `fort.amr` in the output directory. + +.. attribute:: dprint : boolean + + Print domain flags + +.. attribute:: eprint : boolean + + Print error estimation flags + +.. attribute:: edebug : boolean + + Print even more error estimation flags + +.. attribute:: gprint : boolean + + Print grid bisection and clustering information + +.. attribute:: nprint : boolean + + Print proper nesting output + +.. attribute:: pprint : boolean + + Print projection of tagged points + +.. attribute:: rprint : boolean + + Print regridding summary + +.. attribute:: sprint : boolean + + Print space/memory output + +.. attribute:: tprint : boolean + + Print time step info on each level + +.. attribute:: uprint : boolean + + Print update/upbnd information + + diff --git a/v5.10.x/_sources/setrun_amrclaw_sample.rst.txt b/v5.10.x/_sources/setrun_amrclaw_sample.rst.txt new file mode 100644 index 0000000000..add40d9250 --- /dev/null +++ b/v5.10.x/_sources/setrun_amrclaw_sample.rst.txt @@ -0,0 +1,363 @@ + + +.. _setrun_amrclaw_sample: + +***************************************************************** +Sample `setrun.py` module for AMRClaw +***************************************************************** + +This sample `setrun.py` module is for two-dimensional acoustics, from the +example in `$CLAW/amrclaw/examples/acoustics_2d_radial`. + +:: + + """ + Module to set up run time parameters for Clawpack. + + The values set in the function setrun are then written out to data files + that will be read in by the Fortran code. + + """ + + import os + import numpy as np + + #------------------------------ + def setrun(claw_pkg='amrclaw'): + #------------------------------ + + """ + Define the parameters used for running Clawpack. + + INPUT: + claw_pkg expected to be "amrclaw" for this setrun. + + OUTPUT: + rundata - object of class ClawRunData + + """ + + from clawpack.clawutil import clawdata + + + assert claw_pkg.lower() == 'amrclaw', "Expected claw_pkg = 'amrclaw'" + + num_dim = 2 + rundata = clawdata.ClawRunData(claw_pkg, num_dim) + + #------------------------------------------------------------------ + # Problem-specific parameters to be written to setprob.data: + #------------------------------------------------------------------ + + probdata = rundata.new_UserData(name='probdata',fname='setprob.data') + probdata.add_param('rho', 1., 'density of medium') + probdata.add_param('bulk', 4., 'bulk modulus') + + #------------------------------------------------------------------ + # Standard Clawpack parameters to be written to claw.data: + # (or to amrclaw.data for AMR) + #------------------------------------------------------------------ + + clawdata = rundata.clawdata # initialized when rundata instantiated + + + # Set single grid parameters first. + # See below for AMR parameters. + + + # --------------- + # Spatial domain: + # --------------- + + # Number of space dimensions: + clawdata.num_dim = num_dim + + # Lower and upper edge of computational domain: + clawdata.lower[0] = -1.000000e+00 # xlower + clawdata.upper[0] = 1.000000e+00 # xupper + clawdata.lower[1] = -1.000000e+00 # ylower + clawdata.upper[1] = 1.000000e+00 # yupper + + # Number of grid cells: + clawdata.num_cells[0] = 50 # mx + clawdata.num_cells[1] = 50 # my + + + # --------------- + # Size of system: + # --------------- + + # Number of equations in the system: + clawdata.num_eqn = 3 + + # Number of auxiliary variables in the aux array (initialized in setaux) + clawdata.num_aux = 0 + + # Index of aux array corresponding to capacity function, if there is one: + clawdata.capa_index = 0 + + + # ------------- + # Initial time: + # ------------- + + clawdata.t0 = 0.000000 + + + # Restart from checkpoint file of a previous run? + # Note: If restarting, you must also change the Makefile to set: + # RESTART = True + # If restarting, t0 above should be from original run, and the + # restart_file 'fort.chkNNNNN' specified below should be in + # the OUTDIR indicated in Makefile. + + clawdata.restart = False # True to restart from prior results + clawdata.restart_file = 'fort.chk00006' # File to use for restart data + + + # ------------- + # Output times: + #-------------- + + # Specify at what times the results should be written to fort.q files. + # Note that the time integration stops after the final output time. + + clawdata.output_style = 1 + + if clawdata.output_style==1: + # Output ntimes frames at equally spaced times up to tfinal: + # Can specify num_output_times = 0 for no output + clawdata.num_output_times = 20 + clawdata.tfinal = 1.0 + clawdata.output_t0 = True # output at initial (or restart) time? + + elif clawdata.output_style == 2: + # Specify a list or numpy array of output times: + # Include t0 if you want output at the initial time. + clawdata.output_times = [0., 0.1] + + elif clawdata.output_style == 3: + # Output every step_interval timesteps over total_steps timesteps: + clawdata.output_step_interval = 2 + clawdata.total_steps = 4 + clawdata.output_t0 = True # output at initial (or restart) time? + + + clawdata.output_format = 'ascii' # 'ascii', 'binary32', 'binary64' + + clawdata.output_q_components = 'all' # could be list such as [True,True] + clawdata.output_aux_components = 'none' # could be list + clawdata.output_aux_onlyonce = True # output aux arrays only at t0 + + + # --------------------------------------------------- + # Verbosity of messages to screen during integration: + # --------------------------------------------------- + + # The current t, dt, and cfl will be printed every time step + # at AMR levels <= verbosity. Set verbosity = 0 for no printing. + # (E.g. verbosity == 2 means print only on levels 1 and 2.) + clawdata.verbosity = 0 + + + + # -------------- + # Time stepping: + # -------------- + + # if dt_variable==True: variable time steps used based on cfl_desired, + # if dt_variable==False: fixed time steps dt = dt_initial always used. + clawdata.dt_variable = True + + # Initial time step for variable dt. + # (If dt_variable==0 then dt=dt_initial for all steps) + clawdata.dt_initial = 1.00000e-02 + + # Max time step to be allowed if variable dt used: + clawdata.dt_max = 1.000000e+99 + + # Desired Courant number if variable dt used + clawdata.cfl_desired = 0.900000 + # max Courant number to allow without retaking step with a smaller dt: + clawdata.cfl_max = 1.000000 + + # Maximum number of time steps to allow between output times: + clawdata.steps_max = 50000 + + + # ------------------ + # Method to be used: + # ------------------ + + # Order of accuracy: 1 => Godunov, 2 => Lax-Wendroff plus limiters + clawdata.order = 2 + + # Use dimensional splitting? (not yet available for AMR) + clawdata.dimensional_split = 'unsplit' + + # For unsplit method, transverse_waves can be + # 0 or 'none' ==> donor cell (only normal solver used) + # 1 or 'increment' ==> corner transport of waves + # 2 or 'all' ==> corner transport of 2nd order corrections too + clawdata.transverse_waves = 2 + + + # Number of waves in the Riemann solution: + clawdata.num_waves = 2 + + # List of limiters to use for each wave family: + # Required: len(limiter) == num_waves + # Some options: + # 0 or 'none' ==> no limiter (Lax-Wendroff) + # 1 or 'minmod' ==> minmod + # 2 or 'superbee' ==> superbee + # 3 or 'mc' ==> MC limiter + # 4 or 'vanleer' ==> van Leer + clawdata.limiter = ['mc','mc'] + + clawdata.use_fwaves = False # True ==> use f-wave version of algorithms + + # Source terms splitting: + # src_split == 0 or 'none' ==> no source term (src routine never called) + # src_split == 1 or 'godunov' ==> Godunov (1st order) splitting used, + # src_split == 2 or 'strang' ==> Strang (2nd order) splitting used, not recommended. + clawdata.source_split = 0 + + + # -------------------- + # Boundary conditions: + # -------------------- + + # Number of ghost cells (usually 2) + clawdata.num_ghost = 2 + + # Choice of BCs at xlower and xupper: + # 0 or 'user' => user specified (must modify bcNamr.f to use this option) + # 1 or 'extrap' => extrapolation (non-reflecting outflow) + # 2 or 'periodic' => periodic (must specify this at both boundaries) + # 3 or 'wall' => solid wall for systems where q(2) is normal velocity + + clawdata.bc_lower[0] = 'extrap' # at xlower + clawdata.bc_upper[0] = 'extrap' # at xupper + + clawdata.bc_lower[1] = 'extrap' # at ylower + clawdata.bc_upper[1] = 'extrap' # at yupper + + + # --------------- + # Gauges: + # --------------- + rundata.gaugedata.gauges = [] + # for gauges append lines of the form [gaugeno, x, y, t1, t2] + rundata.gaugedata.gauges.append([0, 0.0, 0.0, 0., 10.]) + rundata.gaugedata.gauges.append([1, 0.7, 0.0, 0., 10.]) + rundata.gaugedata.gauges.append([2, 0.7/np.sqrt(2.), 0.7/np.sqrt(2.), 0., 10.]) + + # -------------- + # Checkpointing: + # -------------- + + # Specify when checkpoint files should be created that can be + # used to restart a computation. + + clawdata.checkpt_style = 1 + + if clawdata.checkpt_style == 0: + # Do not checkpoint at all + pass + + elif clawdata.checkpt_style == 1: + # Checkpoint only at tfinal. + pass + + elif clawdata.checkpt_style == 2: + # Specify a list of checkpoint times. + clawdata.checkpt_times = [0.1,0.15] + + elif clawdata.checkpt_style == 3: + # Checkpoint every checkpt_interval timesteps (on Level 1) + # and at the final time. + clawdata.checkpt_interval = 5 + + + + # --------------- + # AMR parameters: + # --------------- + + amrdata = rundata.amrdata + + # max number of refinement levels: + amrdata.amr_levels_max = 3 + + # List of refinement ratios at each level (length at least amr_level_max-1) + amrdata.refinement_ratios_x = [2, 2] + amrdata.refinement_ratios_y = [2, 2] + amrdata.refinement_ratios_t = [2, 2] + + + # Specify type of each aux variable in clawdata.auxtype. + # This must be a list of length num_aux, each element of which is one of: + # 'center', 'capacity', 'xleft', or 'yleft' (see documentation). + amrdata.aux_type = [] + + + # Flag for refinement based on Richardson error estimater: + amrdata.flag_richardson = False # use Richardson? + amrdata.flag_richardson_tol = 0.001000e+00 # Richardson tolerance + + # Flag for refinement using routine flag2refine: + amrdata.flag2refine = True # use this? + amrdata.flag2refine_tol = 0.2 # tolerance used in this routine + # User can modify flag2refine to change the criterion for flagging. + # Default: check maximum absolute difference of first component of q + # between a cell and each of its neighbors. + + # steps to take on each level L between regriddings of level L+1: + amrdata.regrid_interval = 2 + + # width of buffer zone around flagged points: + # (typically the same as regrid_interval so waves don't escape): + amrdata.regrid_buffer_width = 2 + + # clustering alg. cutoff for (# flagged pts) / (total # of cells refined) + # (closer to 1.0 => more small grids may be needed to cover flagged cells) + amrdata.clustering_cutoff = 0.7 + + # print info about each regridding up to this level: + amrdata.verbosity_regrid = 0 + + + # --------------- + # Regions: + # --------------- + rundata.regiondata.regions = [] + # to specify regions of refinement append lines of the form + # [minlevel,maxlevel,t1,t2,x1,x2,y1,y2] + + + # ----- For developers ----- + # Toggle debugging print statements: + amrdata.dprint = False # print domain flags + amrdata.eprint = False # print err est flags + amrdata.edebug = False # even more err est flags + amrdata.gprint = False # grid bisection/clustering + amrdata.nprint = False # proper nesting output + amrdata.pprint = False # proj. of tagged points + amrdata.rprint = False # print regridding summary + amrdata.sprint = False # space/memory output + amrdata.tprint = False # time step reporting each level + amrdata.uprint = False # update/upbnd reporting + + return rundata + + # end of function setrun + # ---------------------- + + + if __name__ == '__main__': + # Set up run-time parameters and write all data files. + import sys + rundata = setrun(*sys.argv[1:]) + rundata.write() + diff --git a/v5.10.x/_sources/setrun_geoclaw.rst.txt b/v5.10.x/_sources/setrun_geoclaw.rst.txt new file mode 100644 index 0000000000..e67bc2b2f1 --- /dev/null +++ b/v5.10.x/_sources/setrun_geoclaw.rst.txt @@ -0,0 +1,459 @@ + + +.. _setrun_geoclaw: + +***************************************************************** +Specifying GeoClaw parameters in `setrun.py` +***************************************************************** + + +Since :ref:`geoclaw` is a modified version of :ref:`amrclaw`, +all of the parameters that +are required for AMRClaw are also needed by GeoClaw. See +:ref:`setrun_amrclaw` for a discussion of these, and :ref:`setrun` for a +description of `setrun.py` input scripts more generally. + +In addition, a number of other parameters should be set in the `setrun.py` +file in any :ref:`geoclaw` application. +See also the :ref:`geohints` for more about parameter choices. + +It is best to look at a specific example while reading this section, for +example in one of the subdirectories of `$CLAW/geoclaw/examples/tsunami`. + + +The function `setrun` in this module is essentially the same as for AMRClaw, +except that it expects to be called with *claw_pkg = 'geoclaw'*. This call +should be performed properly by the Makefile if you have *CLAW_PKG = +geoclaw* set properly there. + +.. comment + + The section :ref:`setrun_geoclaw_sample_parameters` + +The new section :ref:`setrun_setgeo` +in this module contains the new GeoClaw parameters. + +A brief summary of these: + +Additional AMR parameters +-------------------------- + +In addition to the standard AMRClaw parameters described in +:ref:`setrun_amrclaw`, some additional parameters governing how refinement +is done should be specified for GeoClaw applications: + +.. attribute:: rundata.refinement_data.variable_dt_refinement_ratios : bool + + The default is False, in which case refinement factors in time + are specified by the user as usual in the array + `rundata.amrdata.refinement_ratios_t`. + + When True, this indicates that GeoClaw should automatically choose + refinement factors in time on each level based on an estimate of the maximum + wave speed on all grids at this level. For most hyperbolic problems the CFL + condition suggests that one should refine in time by the same factor as in + space. However, for GeoClaw applications where fine grids appear only in + shallow coastal regions this may not be the case. + +.. attribute:: rundata.refinement_data.wave_tolerance : float + + Cells are flagged for refinement if the difference between the surface + elevation and sea level is larger than this tolerance. Note that whether + refinement is actually done depends also on how various AMR regions have + been set (see Section :ref:`regions`) and also on several other + attributes described below that contain information on minimum and + maximum refinement allowed in various regions. + + +.. attribute:: rundata.refinement_data.speed_tolerance : list + + Cells are flagged for refinement at a level if the magnitude of the + velocity is greater than the corresponding value in the list. For + instance if `rundata.refinement_data.speed_tolerance = [1.0, 2.0, 3.0]` + then cells with a speed of 1.0 would refine to level 2, cells with a + speed of 2.0 would refine to level 3, and cells with a speed of 3.0 + would refine to level 4. + + +.. _setrun_geo: + +General geo parameters +---------------------- + +`rundata.geo_data` has the following additional attributes: + +.. attribute:: rundata.geo_data.gravity : float + + gravitational constant in m/s**2, e.g. *gravity = 9.81*. + +.. attribute:: rundata.geo_data.coordinate_system : integer + + *coordinate_system = 1* for Cartesian x-y in meters, + + *coordinate_system = 2* for latitude-longitude on the sphere. + +.. attribute:: rundata.geo_data.earth_radius : float + + radius of the earth in meters, e.g. *earth_radius = 6367.5e3*. + +.. attribute:: rundata.geo_data.coriolis_forcing : bool + + *coriolis_forcing = True* to include Coriolis terms in momentum equations + + *coriolis_forcing = False* to omit Coriolis terms (usually fine for tsunami modeling) + + +.. attribute:: rundata.geo_data.sea_level : float + + sea level (often *sea_level = 0.*) + This is relative to the 0 vertical datum of the topography files used. + It is important to set this properly for tsunami applications, see + :ref:`sealevel`. + + +.. attribute:: rundata.geo_data.friction_forcing : bool + + Whether to apply friction source terms in momentum equations. + See :ref:`manning` for more discussion of the next three parameters. + +.. attribute:: rundata.geo_data.friction_depth : float + + Friction source terms are only applied in water shallower than this, + i.e. if `h < friction_depth`, + assuming they have negligible effect in deeper water. + +.. attribute:: rundata.geo_data.manning_coefficient : float or list of floats + + For friction source terms, the Manning coefficient. If a single value + is given, this value will be used where ever h < friction_depth. + If a list of values is given, then the next parameter delineates the + regions where each is used based on values of the topography B. + +.. attribute:: rundata.geo_data.manning_break : list of floats + + If manning_coefficient is a list of length N, then this should be a + monotonically increasing list + of length N-1 giving break points in the topo B used to determine where + each Manning coefficient is used. + + For example, if :: + + manning_coefficient = [0.025, 0.06] + manning_break = [0.0] + + then 0.025 will be used where B<0 and 0.06 used where B>0. + (Subject still to the restriction that no friction is applied + where h >= friction_depth.) + + +.. _setrun_topo: + +Topography data file parameters +------------------------------- + +See :ref:`topo` for more information about specifying topography (and +bathymetry) data files in GeoClaw. + + +.. attribute:: rundata.topo_data.topofiles : list of lists + + *topofiles* should be a list of the form *[file1info, file2info, etc.]* + where each element is itself a list of the form + + [topotype, fname] + + with values + + *topotype* : integer + + 1,2 or 3 depending on the format of the file (see :ref:`topo`). + + *fname* : string + + the name of the topo file. + + **Note:** Starting in v5.8.0 implicitly specifying a flag region for + AMR is no longer supported in the specification of a topo file. + For more about controlling AMR in various regions, see :ref:`flagregions`. + +.. attribute:: rundata.dtopo_data.dtopofiles : list of lists + + Information about topography displacement files, giving perturbations to + topography generated by an earthquake, for example. + + *dtopofiles* should be a list of the form *[]* or *[file1info]* + where each element (currently at most 1 is allowed!) + is itself a list of the form + + [dtopotype, fname] + + with values + + *dtopotype* : integer + + 1 or 3 depending on the format of the file (see :ref:`topo_dtopo`). + + *fname* : string + + the name of the dtopo file. See :ref:`topo_dtopo` for information about + the format of data in this file. + + **Note:** Starting in v5.8.0 implicitly specifying a flag region for + AMR is no longer supported in the specification of a dtopo file. + For more about controlling AMR in various regions, see :ref:`flagregions`. + + +.. attribute:: rundata.dtopo_data.dt_max_dtopo : float + + the maximum time step allowed during the time interval over which the + topography is moving. This is assumed to start at time `t0` and to + extend to the maximum time that any of the dtopo files specified is + active. This avoids issues where the time step selected by the CFL + condition is much larger than the time scale over which the topography + changes. You must also set `rundata.clawdata.dt_initial` to the same + value (or smaller) to insure that the first time step is sufficiently small. + +.. _setrun_qinit: + +qinit data file parameters +------------------------------- + +A modification to the initial data specified by default can be made as +described at :ref:`qinit_file`. + +.. attribute:: rundata.qinit_data.qinit_type : integer + + Specifies what type of perturbation is stored in the *qinitfile*, + see :ref:`qinit_file` for more information. Valid values for *qinit_type* + are + + - 0 = No perturbation specified + - 1 = Perturbation to depth *h* + - 2 = Perturbation to x-momentum *hu* + - 3 = Perturbation to y-momentum *hv* + - 4 = Perturbation to surface level + + +.. attribute:: rundata.qinit_data.qinitfiles : list of lists + + *qinitfiles* should be a list of the form *[]* or *[file1info]* + where each element (currently at most 1 is allowed!) + is itself a list of the form + + [fname] + + with values + + *fname* : string + + the name of the qinitdata file. See :ref:`topo` for information about + the format of data in this file. + + **Note:** Starting in v5.8.0 implicitly specifying a flag region for + AMR is no longer supported in the specification of a dtopo file. + For more about controlling AMR in various regions, see :ref:`flagregions`. + + +See :ref:`qinit_file` for more details about the format. + +Force some cells to be initially dry +------------------------------------- + +.. attribute:: rundata.qinit_data.force_dry_list: list of `clawpack.geoclaw.data.ForceDry` objects + +Normally the finite volume cells with topography values below sea level (as +specified by `rundata.geo_data.sea_level`) are initialized as wet, with the +depth of water `h` needed to bring the surface eta to sea level. If the +computational domain includes regions where there is dry land below sea level +(e.g. behind a dike or levy), then these regions can be specified via this +attribute. See :ref:`force_dry`. + +Adjust sea level in some regions +-------------------------------- + +.. attribute:: rundata.qinit_data.variable_eta_init: logical + +Normally a single constant value of sea level +(specified by `rundata.geo_data.sea_level`) is used to initialize the +depth of water required to bring the surface eta to sea level. +Sometimes sea level should have different values in different locations, +e.g. for an inland lake with surface level above the ocean level, or in +regions where coseismic uplift or subsidence moves the original water +vertically. If so, set this attribute to `True` and see :ref:`set_eta_init` +for more discussion on how to proceed. + + +.. _setrun_regions: + +AMR refinement region parameters +-------------------------------- + + + As in AMRClaw (see :ref:`setrun_amrclaw`), + one can specify `regions` and/or `flagregions` to control flagging cells + for refinement to the next level. + See :ref:`refinement_regions` and :ref:`flagregions` for more details. + +.. attribute:: rundata.regiondata.regions: list of regions + + An old style `region` is a list of the form + + `[minlevel,maxlevel,t1,t2,x1,x2,y1,y2]` + + See :ref:`refinement_regions` for more details. + +.. attribute:: rundata.regiondata.flagregions: list of flagregions + + A new style `flagregion` is an object of class + `clawpack.amrclaw.data.FlagRegion`. + See :ref:`flagregions` for more details. + + +.. _setrun_fixedgrids: + +Deprecated Fixedgrid output parameters +--------------------------------------- + +.. attribute:: rundata.fixedgrids : list of lists + + **Removed from GeoClaw as of v5.9.0.** + Use :ref:`setrun_fgmax` and/or :ref:`setrun_fgout` instead, + see below. + + +.. _setrun_fgmax: + +Fixed grid maximum monitoring / arrival times +--------------------------------------------- + +.. attribute:: rundata.fgmax_grids : list of clawpack.geoclaw.fgmax_tools.FGoutGrid + objects. + + + This can be used to specify a set of grids on which to monitor the + maximum flow depth (or other quantities) observed over the course of + the computation, and/or the arrival time of the flow or wave. + + + The "grids" also do not have to be rectangular grids aligned with the + coordinate directions, but can consist of an arbitrary list of points + that could also be points along a one-dimensional transect or points + following a coastline, for example. + + You can set these via e.g.:: + + from clawpack.geoclaw import fgmax_tools + fgmax_grids = rundata.fgmax_data.fgmax_grids # empty list initially + + fgmax = fgmax_tools.FGmaxGrid() + # set fgmax attributes + fgmax_grids.append(fgmax) # written to fgmax_grids.data + + # repeat for additional fgout grids if desired + + See :ref:`fgmax` for more details. + +.. attribute:: rundata.fgmax_data.num_fgmax_val : int + + Should take the value 1, 2, or 5 and indicates how many values to monitor. + See :ref:`fgmax` for more details. + +.. _setrun_fgout: + +Fixed grid output +----------------- + +.. attribute:: rundata.fgout_grids : list of clawpack.geoclaw.fgout_tools.FGoutGrid + objects. + + You can set these via e.g.:: + + from clawpack.geoclaw import fgout_tools + fgout_grids = rundata.fgout_data.fgout_grids # empty list initially + + fgout = fgout_tools.FGoutGrid() + # set fgout attributes + fgout_grids.append(fgout) # written to fgout_grids.data + + # repeat for additional fgout grids if desired + + See :ref:`fgout` for more details. + +.. _setrun_surge: + +Storm Specification Data +------------------------ + +.. attribute:: rundata.surge_data.wind_forcing : bool + + Includes the wind forcing term if `True`. The drag coefficient is specified + by `rundata.surge_data.drag_law`. + +.. attribute:: rundata.surge_data.drag_law : integer + + This specifies how to deterimine the wind drag coefficient. Valid options + include include `0` implying use no wind drag (effectively eliminates the + wind source term but still computes the wind), `1` uses the Garret wind + drag law, and `2` uses the Powell (2006) wind drag law. + +.. attribute:: rundata.surge_data.pressure_forcing : bool + + Includes the pressure forcing term if `True`. + +.. attribute:: rundata.surge_data.wind_index : int + + Specifies at what index into the `aux` array the wind velocities are stored. + Note that this is Python indexed in the setrun but will be corrected in the + FORTRAN code (1 is added to the index). + +.. attribute:: rundata.surge_data.pressure_index : int + + Specifies at what index into the `aux` array the wind velocities are stored. + Note that this is Python indexed in the setrun but will be corrected in the + FORTRAN code (1 is added to the index). + +.. attribute:: rundata.surge_data.display_landfall_time : bool + + Sets whether the console output displays time relative to land fall in days. + In GeoClaw versions past 5.5 this only deterimines whether the time is + displayed in seconds or days. + +.. attribute:: rundata.surge_data.wind_refine : list + + Similar to the `speed_tolerance` data, cells are flagged for refinement at + a level if the magnitude of the wind velocity in m/s is greater than the + corresponding value in the list. For + instance if `wind_refine = [20.0, 30.0, 40.0]` + then cells with a wind speed of 20.0 would refine to level 2, cells with a + wind speed of 30.0 would refine to level 3, and cells with a wind speed of + 40.0 would refine to level 4. This can also be set to a boolean which if + `False` disables wind based refinement. + +.. attribute:: rundata.surge_data.R_refine : list + + Similar to the `wind_refine` data, cells are flagged based on the radial + distance to the storm's center. This can also be set to a boolean which if + `False` disables storm radial based refinement. + +.. attribute:: rundata.surge_data.storm_specification_type : int + + Specifies the type of storm being used. Positive options refer to a + parameterized storm model where as negative integers refer to fully + specified storms, for instance from HWRF, to be specified. + + Valid options + + - `-1`: The input data is specified in the HWRF format. + - `0`: No storm specified + - `1`: Parameterized storm requested using the Holland 1980 modeled storm. + - `2`: Parameterized storm requested using the Holland 2010 modeled storm. + - `3`: Parameterized storm requested using the Chava, Lin, Emmanuel modeled + storm. + +.. attribute:: rundata.surge_data.storm_file : string + + Specifies the path to the storm data. IF `storm_specification_type > 0` then + this should point to a GeoClaw formatted storm file (see :ref:`storm_module` for + details). If `storm_specification < 0` then this should either specify a path + to files specifying the storm or a single file depending on the type of input + data. diff --git a/v5.10.x/_sources/setrun_sample.rst.txt b/v5.10.x/_sources/setrun_sample.rst.txt new file mode 100644 index 0000000000..e65de2a5e4 --- /dev/null +++ b/v5.10.x/_sources/setrun_sample.rst.txt @@ -0,0 +1,251 @@ + + +.. _setrun_sample: + +***************************************************************** +Sample `setrun.py` module for classic Clawpack +***************************************************************** + +.. warning :: Need to update link? Add 2d example? + +This sample `setrun.py` script is from the example in +`$CLAW/classic/tests/advection`. + +:: + + """ + Module to set up run time parameters for Clawpack. + + The values set in the function setrun are then written out to data files + that will be read in by the Fortran code. + + """ + + import clawpack.clawutil.clawdata + + + #------------------------------ + def setrun(claw_pkg='Classic'): + #------------------------------ + + """ + Define the parameters used for running Clawpack. + + INPUT: + claw_pkg expected to be "Classic4" for this setrun. + + OUTPUT: + rundata - object of class ClawRunData + + """ + + assert claw_pkg.lower() == 'classic', "Expected claw_pkg = 'classic'" + + rundata = clawpack.clawutil.clawdata.ClawRunData(pkg=claw_pkg, num_dim=1) + + #------------------------------------------------------------------ + # Problem-specific parameters to be written to setprob.data: + #------------------------------------------------------------------ + + probdata = rundata.new_UserData(name='probdata',fname='setprob.data') + probdata.add_param('u', 1.0, 'advection velocity') + probdata.add_param('beta', 200., 'Gaussian width parameter') + + + #------------------------------------------------------------------ + # Standard Clawpack parameters to be written to claw.data: + #------------------------------------------------------------------ + + clawdata = rundata.clawdata # initialized when rundata instantiated + + # --------------- + # Spatial domain: + # --------------- + + # Number of space dimensions: + clawdata.num_dim = 1 + + # Lower and upper edge of computational domain: + clawdata.lower[0] = 0.0 + clawdata.upper[0] = 1.0 + + # Number of grid cells: + clawdata.num_cells[0] = 100 + + + + # --------------- + # Size of system: + # --------------- + + # Number of equations in the system: + clawdata.num_eqn = 1 + + # Number of auxiliary variables in the aux array (initialized in setaux) + clawdata.num_aux = 0 + + # Index of aux array corresponding to capacity function, if there is one: + clawdata.capa_index = 0 + + + + # ------------- + # Initial time: + # ------------- + + clawdata.t0 = 0.0 + + + # Restart from checkpoint file of a previous run? + # Note: If restarting, you must also change the Makefile to set: + # RESTART = True + # If restarting, t0 above should be from original run, and the + # restart_file 'fort.chkNNNNN' specified below should be in + # the OUTDIR indicated in Makefile. + + clawdata.restart = False # True to restart from prior results + clawdata.restart_file = 'fort.chk00006' # File to use for restart data + + + # ------------- + # Output times: + #-------------- + + # Specify at what times the results should be written to fort.q files. + # Note that the time integration stops after the final output time. + # The solution at initial time t0 is always written in addition. + + clawdata.output_style = 1 + + if clawdata.output_style == 1: + # Output nout frames at equally spaced times up to tfinal: + clawdata.num_output_times = 10 + clawdata.tfinal = 1.0 + clawdata.output_t0 = True # output at initial (or restart) time? + + elif clawdata.output_style == 2: + # Specify a list of output times. + clawdata.tout = [0.5, 1.0] # used if output_style == 2 + clawdata.num_output_times = len(clawdata.tout) + + elif clawdata.output_style == 3: + # Output every iout timesteps with a total of ntot time steps: + clawdata.output_step_interval = 1 + clawdata.total_steps = 5 + clawdata.output_t0 = True + + + clawdata.output_format = 'ascii' # 'ascii', 'binary32', 'binary64' + + clawdata.output_q_components = 'all' # could be list such as [True,True] + clawdata.output_aux_components = 'none' # could be list + clawdata.output_aux_onlyonce = True # output aux arrays only at t0 + + + + # --------------------------------------------------- + # Verbosity of messages to screen during integration: + # --------------------------------------------------- + + # The current t, dt, and cfl will be printed every time step + # at AMR levels <= verbosity. Set verbosity = 0 for no printing. + # (E.g. verbosity == 2 means print only on levels 1 and 2.) + clawdata.verbosity = 1 + + + + # -------------- + # Time stepping: + # -------------- + + # if dt_variable==1: variable time steps used based on cfl_desired, + # if dt_variable==0: fixed time steps dt = dt_initial will always be used. + clawdata.dt_variable = True + + # Initial time step for variable dt. + # If dt_variable==0 then dt=dt_initial for all steps: + clawdata.dt_initial = 0.8 / float(clawdata.num_cells[0]) + + # Max time step to be allowed if variable dt used: + clawdata.dt_max = 1e+99 + + # Desired Courant number if variable dt used, and max to allow without + # retaking step with a smaller dt: + clawdata.cfl_desired = 0.9 + clawdata.cfl_max = 1.0 + + # Maximum number of time steps to allow between output times: + clawdata.steps_max = 500 + + + + + # ------------------ + # Method to be used: + # ------------------ + + # Order of accuracy: 1 => Godunov, 2 => Lax-Wendroff plus limiters + clawdata.order = 2 + + # Use dimensional splitting? + clawdata.dimensional_split = 0 + + # For unsplit method, transverse_waves can be + # 0 or 'none' ==> donor cell (only normal solver used) + # 1 or 'increment' ==> corner transport of waves + # 2 or 'all' ==> corner transport of 2nd order corrections too + clawdata.transverse_waves = 0 + + # Number of waves in the Riemann solution: + clawdata.num_waves = 1 + + # List of limiters to use for each wave family: + # Required: len(limiter) == num_waves + # Some options: + # 0 or 'none' ==> no limiter (Lax-Wendroff) + # 1 or 'minmod' ==> minmod + # 2 or 'superbee' ==> superbee + # 3 or 'mc' ==> MC limiter + # 4 or 'vanleer' ==> van Leer + clawdata.limiter = ['mc'] + + clawdata.use_fwaves = False # True ==> use f-wave version of algorithms + + # Source terms splitting: + # src_split == 0 or 'none' ==> no source term (src routine never called) + # src_split == 1 or 'godunov' ==> Godunov (1st order) splitting used, + # src_split == 2 or 'strang' ==> Strang (2nd order) splitting used, not recommended. + clawdata.source_split = 'none' + + + # -------------------- + # Boundary conditions: + # -------------------- + + # Number of ghost cells (usually 2) + clawdata.num_ghost = 2 + + # Choice of BCs at xlower and xupper: + # 0 => user specified (must modify bcN.f to use this option) + # 1 => extrapolation (non-reflecting outflow) + # 2 => periodic (must specify this at both boundaries) + # 3 => solid wall for systems where q(2) is normal velocity + + clawdata.bc_lower[0] = 2 + clawdata.bc_upper[0] = 2 + + return rundata + # end of function setrun + # ---------------------- + + + if __name__ == '__main__': + # Set up run-time parameters and write all data files. + import sys + if len(sys.argv) == 2: + rundata = setrun(sys.argv[1]) + else: + rundata = setrun() + + rundata.write() + diff --git a/v5.10.x/_sources/sharing.rst.txt b/v5.10.x/_sources/sharing.rst.txt new file mode 100644 index 0000000000..137a8e132b --- /dev/null +++ b/v5.10.x/_sources/sharing.rst.txt @@ -0,0 +1,46 @@ + + +.. _sharing: + +########################## +Saving and sharing results +########################## + + +Clawpack now includes some tools to help facilitate archiving and sharing +results that you have obtained with this software. +These make it relatively easy to generate +a set of webpages such as those seen when browsing the examples collected in +:ref:`galleries`. + +These webpages can easily be posted on your own website to be viewed by +others if you wish, for example to share on-going work with collaborators or +to supplement a journal article. + + +Making webpages of plots +======================== + +The "make .plots" option available via the standard Makefiles will create a +set of webpages illustrating the plots and allowing easy navigation between +frames. These webpages also allow viewing all frames of a plot as an +animation (via javascript within the browser). + +See :ref:`plotting` for more details on how to specify what plots will +appear on these webpages. + +Sharing your results +==================== + +To make it easy for others to view your code and the resulting plots, you +can simply copy the example directory (containing the code +and the _plots subdirectory) to your publicly visible web pages. + +Jupyter notebooks +================= + +You should also consider creating an Jupyter notebook to explain your +problem, illustrate your workflow, and present plots and animations all in +one. See the +`Gallery of Notebooks `_ +for some examples. diff --git a/v5.10.x/_sources/sphere_source.rst.txt b/v5.10.x/_sources/sphere_source.rst.txt new file mode 100644 index 0000000000..a08a6824f1 --- /dev/null +++ b/v5.10.x/_sources/sphere_source.rst.txt @@ -0,0 +1,38 @@ +:orphan: + +.. _sphere_source: + +============================================ +Source terms for shallow water on the sphere +============================================ + +The shallow water equations on the sphere involve some geometric +source terms that are currently missing from GeoClaw. Experiments +during initial develpment of GeoClaw seemed to indicate that they were +not important, but more recently it has been found that at least the +source term in the mass equation can be quite important for properly +modeling waves moving between the tropics and polar regions due to the +variation in cell size with latitude. + +As of v5.9.1, these source terms have been added to +`$CLAW/geoclaw/src/2d/shallow/src2.f90`. +There is a `setrun.py` parameter `rundata.geo_data.sphere_source` +that can be set to 0 for no source terms, 1 to add the source term +only in the mass equation, or 2 to add source terms in the momentum equations +too. + +**Change in default behavior:** + +Starting in v5.10.0, the default value :: + + rundata.geo_data.sphere_source = 1 + +is used if this parameter is not +set otherwise in `setrun.py`, so that the source term in mass is included. +Adding the source terms in momentum seems to have almost no effect in +most practical problems, as illustrated in +`this document +`__, +which presents more discussion of these source terms and includes some +examples to illustrate the effect they have in various circumstances. + diff --git a/v5.10.x/_sources/sphinxdoc.rst.txt b/v5.10.x/_sources/sphinxdoc.rst.txt new file mode 100644 index 0000000000..a9ccec733f --- /dev/null +++ b/v5.10.x/_sources/sphinxdoc.rst.txt @@ -0,0 +1,16 @@ + +.. _sphinxdoc: + +****************************************** +Compiling the Sphinx documentation locally +****************************************** + + + +For most users, the best way to view the documentation is +`online `_. + +The source files that create this documentation are included in the +repository +`clawpack/doc `_ repository in `$CLAW/doc/doc`. +See :ref:`howto_doc` if you want to create and view them locally. diff --git a/v5.10.x/_sources/src1d_defaults.rst.txt b/v5.10.x/_sources/src1d_defaults.rst.txt new file mode 100644 index 0000000000..6be6abead3 --- /dev/null +++ b/v5.10.x/_sources/src1d_defaults.rst.txt @@ -0,0 +1,39 @@ +:orphan: + +.. _src1d_defaults: + +======================== +src1d default routines +======================== + +See also :ref:`user_src1d`. + +Below are links to the default `src1d` library routines for AMRClaw. +The same form is used in both 2d and 3d. +By default these do nothing. If you wish to specify source terms, you +need to copy one of these files to your application directory and modify it +as needed. Remember to change to `Makefile` to point to the proper version. + +- `$CLAW/amrclaw/src/2d/src1d.f90 + `__ + +- `$CLAW/amrclaw/src/3d/src1d.f90 + `__ + +(Note: these links are for the version checked in to the master branch. +You can select a different branch or tag from the GitHub page.) + + +.. _src1d_geoclaw: + +src1d routine in GeoClaw +-------------------------- + +In GeoClaw, there is a library routine to impose source terms for bottom +friction (via a Manning term) and Coriolis terms. The topography source term +is built into the Riemann solver in a manner that achieves well balancing +(an ocean at rest remains at rest). + +- `$CLAW/geoclaw/src/2d/shallow/src1d.f90 + `__ + diff --git a/v5.10.x/_sources/src_defaults.rst.txt b/v5.10.x/_sources/src_defaults.rst.txt new file mode 100644 index 0000000000..949e79c9e3 --- /dev/null +++ b/v5.10.x/_sources/src_defaults.rst.txt @@ -0,0 +1,45 @@ +:orphan: + +.. _src_defaults: + +======================== +src default routines +======================== + +See also :ref:`user_src`. + +Below are links to the default `src` library routines for Classic and AMRClaw. +By default these do nothing. If you wish to specify source terms, you +need to copy one of these files to your application directory and modify it +as needed. Remember to change to `Makefile` to point to the proper version. + +If you are using AMRClaw, you will also need to provide a routine `src1d`, +see :ref:`user_src1d`. + +- `$CLAW/classic/src/1d/src1.f90 + `__ + +- `$CLAW/classic/src/2d/src2.f90 + `__ + +- `$CLAW/classic/src/3d/src3.f90 + `__ + +(Note: these links are for the version checked in to the master branch. +You can select a different branch or tag from the GitHub page.) + + + +.. _src_geoclaw: + +src routine in GeoClaw +-------------------------- + +In GeoClaw, there is a library routine to impose source terms for bottom +friction (via a Manning term) and Coriolis terms. The topography source term +is built into the Riemann solver in a manner that achieves well balancing +(an ocean at rest remains at rest). + +- `$CLAW/geoclaw/src/2d/shallow/src2.f90 + `__ + diff --git a/v5.10.x/_sources/storm_module.rst.txt b/v5.10.x/_sources/storm_module.rst.txt new file mode 100644 index 0000000000..5e5a0ac2f0 --- /dev/null +++ b/v5.10.x/_sources/storm_module.rst.txt @@ -0,0 +1,11 @@ + +.. _storm_module: + +Storm Specification Class and Tools +================================================= + +.. warning :: This describes new tools added in Clawpack 5.5 + +.. automodule:: clawpack.geoclaw.surge.storm + :members: + diff --git a/v5.10.x/_sources/surgedata.rst.txt b/v5.10.x/_sources/surgedata.rst.txt new file mode 100644 index 0000000000..dc9d273f9d --- /dev/null +++ b/v5.10.x/_sources/surgedata.rst.txt @@ -0,0 +1,37 @@ + +.. _surgedata: + +================================== +Sources for Storm Surge Data +================================== + +For storm surge computations the input data is very similar to tsunamis save +for the specification of the forcing storm (as opposed to an earthquake). There +are multiple ways to specify a storm forcing in GeoClaw which include + +1. Storms described by a set of observerd parameters for which the wind and pressure + fields are constructed by a parametric model such as the Holland 1980 model. These + generally require: + - the maximum wind speed, + - the radius at which the maximum winds occurs, + - the central pressure of the storm, + - the location of the center of the storm (the eye), + - and sometimes the maximum radius of the storm is also included. + +2. Storm described by a grided set of data. This includes output from a + modeled storm such as from HWRF, or observed values if dense enough. Here GeoClaw + will interpolate this data to the grid cells as needed rather than assume a particular + profile for the wind and pressure. + +For the parameterized storm data there are a number of sources supported for this data and +there is a listing in :ref:`_storm_module` of available input formats. Valid input files +for this type of input are made available by the particular agency involved: + + - `ATCF `_ + - `HURDAT `_ + - `JMA `_ + - `IMD `_ + - `TCVITALS `_ + +Note that not all these formats are currently fully supported and may require some work +to be readable. \ No newline at end of file diff --git a/v5.10.x/_sources/testing.rst.txt b/v5.10.x/_sources/testing.rst.txt new file mode 100644 index 0000000000..3f847e160e --- /dev/null +++ b/v5.10.x/_sources/testing.rst.txt @@ -0,0 +1,49 @@ + +.. _testing: + +=================================================================== +Testing your installation +=================================================================== + +PyClaw +------ +If you downloaded Clawpack manually, you can test your :ref:`pyclaw` +installation as follows (starting from your `clawpack` directory):: + + + cd pyclaw + nosetests + +This should return 'OK'. +(You may need to install `nose `_ +if `nosetests` is not on your system.) + +Classic +------- +As a first test of the Fortran code, try the following:: + + cd $CLAW/classic/tests + nosetests -sv + + +This will run several tests and compare a few numbers from the solution with +archived results. The tests should run in a few seconds and +you should see output similar to this:: + + runTest (tests.acoustics_1d_heterogeneous.regression_tests.Acoustics1DHeterogeneousTest) ... ok + runTest (tests.acoustics_3d_heterogeneous.regression_tests.Acoustics3DHeterogeneousTest) ... ok + runTest (tests.advection_2d_annulus.regression_tests.Advection2DAnnulusTest) ... ok + + ---------------------------------------------------------------------- + Ran 3 tests in 4.639s + OK + + +There are similar `tests` subdirectories of `$CLAW/amrclaw` and +`$CLAW/geoclaw` to do quick tests of these codes. + + +More extensive tests can be performed by running all of the examples in the +`examples` directory and comparing the resulting plots against those +archived in the :ref:`galleries`. See also :ref:`regression`. + diff --git a/v5.10.x/_sources/timing.rst.txt b/v5.10.x/_sources/timing.rst.txt new file mode 100644 index 0000000000..f14c5fa2dc --- /dev/null +++ b/v5.10.x/_sources/timing.rst.txt @@ -0,0 +1,57 @@ + +.. _timing: + +Timing Statistics +================= + +The `amrclaw` and `geoclaw` Fortran codes provide some timing information at the +end of a run (and also stored at the end of the file `fort.amr` in the output +directory). + +Typical output looks like this:: + + ============================== Timing Data ============================== + + Integration Time (stepgrid + BC + overhead) + Level Wall Time (seconds) CPU Time (seconds) Total Cell Updates + 1 2.850 2.853 0.288E+07 + 2 13.214 41.552 0.373E+08 + 3 92.774 370.259 0.260E+09 + total 108.838 414.664 0.301E+09 + + All levels: + stepgrid 101.440 392.473 + BC/ghost cells 5.014 19.801 + Regridding 40.508 40.447 + Output (valout) 15.413 15.402 + + Total time: 165.483 472.470 + Using 4 thread(s) + + Note: The CPU times are summed over all threads. + Total time includes more than the subroutines listed above + + ========================================================================= + + +This was generated by running the code in +`$CLAW/amrclaw/examples/advection_3d_swirl` with a third level of AMR added (and +additional refinement factor 2) so that more grids are generated. + +Note the following: + +- All times are in seconds. + +- For this example, more than 85% of the integration time is spent on the finest + Level 3 grids. + +- OpenMP was used in this run, specifying `OMP_NUM_THREADS=4`. Grid patches are + then split up between threads (see :ref:`openmp`). This test problem has enough + grid patches that the time spent in `stepgrid` (where updating each patch using + the finite volume method) uses roughly 1/4 as much wall time as CPU time, and + similarly for filling ghost cells. + +- Regridding and output are done in serial mode, however, so the wall time for + these portions agree with the CPU time. + + diff --git a/v5.10.x/_sources/topo.rst.txt b/v5.10.x/_sources/topo.rst.txt new file mode 100644 index 0000000000..46909954eb --- /dev/null +++ b/v5.10.x/_sources/topo.rst.txt @@ -0,0 +1,310 @@ + + +.. _topo: + +***************************************************************** +Topography data +***************************************************************** + +.. seealso:: + - :ref:`topotools` + - :ref:`grid_registration` + - :ref:`tsunamidata` + +The :ref:`geoclaw` software for flow over topography requires at least one +topo file to be input, see :ref:`setrun_geoclaw`. + +Currently topo files are restricted to three possible formats as ASCII files, or +NetCDF files are also allowed. + +In the descriptions below it is assumed that the topo file gives the +elevation of the topography (relative to some reference level) as a value of +z at each (x,y) point on a rectangular grid. Only uniformly spaced +rectangular topo grids are currently recognized. + +More than one topo file can be specified (see :ref:`setrun_topo`) that might +cover overlapping regions at different resolutions. The union of all the +topo files should cover the full computational domain specified (and may +extend outside it). Internally in :ref:`geoclaw` a single +piecewise-bilinear function is constructed from the union of the topo files, +using the best information available in regions of overlap. This function +is then integrated over computational grid cells to obtain the single topo value +in each grid cell needed when solving depth averaged equations such as the +shallow water equations with these finite volume methods. Note that this +has the feature that if a grid cell is refined at some stage in the +computation, the topo used in the fine cells have an average value that is +equal to the coarse cell value. This is crucial in maintaining the +ocean-at-rest steady state, for example. + +.. warning:: Some changes were made in version 5.5.0 that affect how + topofiles with `topo_type in [2,3]` + are interpreted for files with a header specifying + `xllcorner` and `yllcorner`. + This may cause computed results to differ from previous results using + the same topofiles if the header contains this specification. + See :ref:`grid_registration` for more details on this `llcorner` + registration. + The description below has been modified to use `lower` registration, + equivalent to `llcenter` registration. + +The recognized topotypes are: + + **topotype = 1** + + x,y,z values on each line, progressing from upper left (NW) corner across + rows (moving east), then down in standard GIS form. + The size of the grid and spacing + between the grid points is deduced from the data. + + *Example:* The data below would be used in the GeoClaw code + to define a bilinear function + over the domain 0. <= x <= 10. and 20. <= y <= 30. + that decreases (deeper water) as you move to the east or to the south:: + + 0. 30. -1000. + 10. 30. -2000. + 0. 20. -3000. + 10. 20. -4000. + + These files are larger than necessary since they store the x,y values at + each point even though the points are required to be equally spaced. + Many data sets come this way, but note that you can convert a file of + this type to one of the more compact types below using e.g.:: + + from clawpack.geoclaw import topotools + topo = topotools.Topography(input_path, topo_type=1) + topo.write(output_path, topo_type=3) + + + + **topotype = 2** + + The file starts with a header consisting of 6 lines containing:: + + XXX mx + XXX my + XXX xlower | xllcenter | xllcorner + XXX ylower | yllcenter | yllcorner + XXX cellsize + XXX nodataval + + and is followed by mx*my lines containing the z values at each x,y, + again progressing from upper left (NW) corner across + rows (moving east), then down in standard GIS form. + The lower left corner of the grid + is *(xlower, ylower)* and the distance between grid points in both + x and y is *cellsize*. The value *nodataval* indicates what value of z + is specified for missing data points (often something like -9999 in data + sets with missing values). + + Note: + + - The value `XXX` and the label (e.g. `xlower`) can appear in + either order in each of the header lines. + - the `cellsize` line can include two values `dx, dy` rather than a single + value, in case the spacing is different in `x` and `y`. + + *Example:* For the same example as above, the topo file with + topotype==2 and `lower` registration would be:: + + 2 mx + 2 my + 0. xlower + 20. ylower + 10. cellsize + -9999 nodatavalue + -1000. + -2000. + -3000. + -4000. + + This file would be interpreted the same way if `llcenter` registration + was specified on lines 3 and 4, but differently if `llcorner` + was specified -- see :ref:`grid_registration`. + + **topotype = 3** + + The file starts with a header consisting of 6 lines as for *topotype=2*, + followed by *my* lines, each containing *mx* values for one row of data + (ordered as before, so the first line of data is the northernmost line + of data, going from west to east). + + *Example:* For the same example as above, the topo file with + topotype==3 and `lower` registration would be:: + + 2 mx + 2 my + 0. xlower + 20. ylower + 10. cellsize + -9999 nodatavalue + -1000. -2000. + -3000. -4000. + + This file would be interpreted the same way if `llcenter` registration + was specified on lines 3 and 4, but differently if `llcorner` + was specified -- see :ref:`grid_registration`. + + Note: + + - The value `XXX` and the label (e.g. `xlower`) can appear in + either order in each of the header lines. + - the `cellsize` line can include two values `dx, dy` rather than a single + value, in case the spacing is different in `x` and `y`. + + This is essentially the same as the `ESRI ASCII Raster format + `_, + but it is important to note which grid registration is used. + NCEI and etopo1 data sets generally have this format with `llcorner` + registration! See :ref:`grid_registration` for more details. + + **topotype = 4** + + This file type is not ASCII but rather in a NetCDF4 format supported by the + `CF MetaData conventions (v. 1.6) `_. Files + that conform to this standard can be read in by GeoClaw. The `topotools` + module also has support for reading and writing (including therefore + conversion) of these types of bathymetry files (see :ref:`topo_netcdf` + below). To use this functionality + you will need to add *-DNETCDF* to the *FFLAGS* variable either by the + command line or in the Makefile. + +The Fortran code will recognize headers for *topotype* 2 +or 3 that have the labels first and then the parameter values. +The order of lines is important. + +It is also possible to specify values -1, -2, or -3 for *topotype*, in which +case the *z* values will be negated as they are read in (since some data +sets use different convensions for positive and negative values relative to +sea level). + +For :ref:`geoclaw` applications in the ocean or lakes (such as tsunami +modeling), it is generally assumed that *sea_level = 0* has been set in +:ref:`setrun_geoclaw` and that *z<0* corresponds to subsurface bathymetry +and *z>0* to topograpy above sea level. + +.. _topo_sources: + +Downloading topography files +---------------------------- + +The example +`$CLAW/examples/tsunami/chile2010 +`_ +is set up to automatically download topo files via:: + + $ make topo + +See the `maketopo.py` file in that directory. + +Other such examples will appear in the future. + +Several on-line databases are available for topograpy, see +:ref:`tsunamidata` for some links. + +Some Python tools for working with topography files are available, see +:ref:`topotools`. + +.. _topo_netcdf: + +NetCDF format +^^^^^^^^^^^^^ + +Topofiles can be read in netCDF format, either from local `.nc` files or +from some online databases that provide netCDF servers, e.g. the +`NOAA THREDDS server `_. +Use the +`topotools.read_netcdf `_ +function. Note that this also allows reading in only a subset of the data, +both limiting the extent and the resolution, e.g. by sampling every other +point (by setting `coarsen=2`). This is particularly useful if you only want +a subset of a huge online netCDF file (e.g. coastal DEMs at 1/3 arcsecond +resolution are typically several gigabytes). + +The dictionary `topotools.remote_topo_urls` contains some useful URLs for +etopo1 and a few other NOAA THREDDS datasets. This allows reading etopo1 +data, for example, via:: + + >>> from clawpack.geoclaw import topotools + >>> topo1 = topotools.read_netcdf('etopo1',...) + +See `$CLAW/geoclaw/tests/test_etopo1.py` for one example, in which a very +small patch from the global etopo1 database (which has 1 arcminute resolution) +is downloaded at different resolutions. + +**Note:** Earlier versions of clawpack included `etopotools.py` providing a +different way to download subsampled etopo1 topography. That has been +deprecated since the old way is no longer supported by NOAA and did not +always do the subsampling properly. + +**Note:** Data in the NOAA THREDDS server is referenced to NAVD88, not to MHW! + +See also :ref:`grid_registration` for important information about the manner +in which the data downloaded should be interpreted. For netCDF files the +data points are generally interpreted as pointwise values at the points +specified in the `lat` and `lon` arrays included in the file (or as +cell-averaged values with these points as the cell centers). + +.. _topo_dtopo: + +Topography displacement files +----------------------------- + + +For tsunami generation a file *dtopo* is generally used to specify the +displacement of the topography relative to that specified in the topo files. + +Currently two formats are supported for this file: + + **dtopotype=1:** + + Similar to + topo files with *topotype=1* as described above, except that each line + starts with a *t* value for the time, so each line contains t,x,y,dz + + The x,y,dz values give the displacement dz at x,y at time t. It is assumed + that the grid is uniform and that the file contains mx*my*mt lines if mt + different times are specified for an mx*my grid. + + **dtopotype=3:** + + Similar to + topo files with *topotype=3* as described above, but the header is + different, and contains lines specifying *mx, my, mt, xlower, ylower, t0, + dx, dy*, and *dt*. These are followed by *mt* sets of *my* lines, + each line containing *mx* values of *dz*. + +The Okada model can be used to generate *dtopo* files from fault parameters, +as described in :ref:`okada`. See also :ref:`dtopotools_module`. + +Note that if the topography is moving, it is important to insure that the +time step is small enough to capture the motion. Starting in Version 5.1.0, +there is a new parameter that can be specified in `setrun.py` +to limit the size time step used during the time when topography is moving. +See :ref:`setrun_topo`. + +.. _qinit_file: + +qinit data file +--------------- + +Instead of (or in addition to) specifying a displacement of the topography +it is possible to specify a perturbation to the depth, momentum, or surface +elevation of the initial data. This is generally useful only for tsunami +modeling where the initial data specified in the default *qinit.f90* function +is the stationary water with surface elevation equal to *sea_level* as set in +`setrun.py` (see :ref:`setrun_geoclaw`). + +Of course it is possible to copy the *qinit.f90* function to your +directory and modify it, but for some applications the initial elevation may +be given on grid of the same type as described above. In this case file can +be provided as described at :ref:`setrun_qinit` containing this +perturbation. + +The file format is similar to what is described above for *topotype=1*, but +now each line contains *x,y,dq* where *dq* is a perturbation to one of the +components of *q* as specified by the value of *qinit_type* specified (see +:ref:`setrun_qinit`). If *qinit_type = 4*, the value *dq* is instead the +surface elevation desired for the initial data and the depth *h* (first +component of *q*) is set accordingly. + diff --git a/v5.10.x/_sources/topotools.rst.txt b/v5.10.x/_sources/topotools.rst.txt new file mode 100644 index 0000000000..bf6ffb788d --- /dev/null +++ b/v5.10.x/_sources/topotools.rst.txt @@ -0,0 +1,14 @@ + +.. _topotools: + +Python tools for working with topo and dtopo +-------------------------------------------- + + +.. toctree:: + :maxdepth: 1 + + topotools_module + dtopotools_module + geoclaw_util_module + kmltools_module diff --git a/v5.10.x/_sources/topotools_module.rst.txt b/v5.10.x/_sources/topotools_module.rst.txt new file mode 100644 index 0000000000..fbb9b7485f --- /dev/null +++ b/v5.10.x/_sources/topotools_module.rst.txt @@ -0,0 +1,26 @@ + +.. _topotools_module: + +topotools module for working with topography data +================================================= + +.. seealso:: + - :ref:`topo` + - :ref:`topotools` + + +The notebook +`topotools_examples `__ +illustrates how to use some of the tools. + +The file `$CLAW/geoclaw/tests/test_topotools.py` contains some tests of these +tools. Looking at these test routines may also give some ideas on +how to use them. + + +Documentation auto-generated from the module docstrings +-------------------------------------------------------- + +.. automodule:: clawpack.geoclaw.topotools + :members: + diff --git a/v5.10.x/_sources/trouble.rst.txt b/v5.10.x/_sources/trouble.rst.txt new file mode 100644 index 0000000000..1546b94451 --- /dev/null +++ b/v5.10.x/_sources/trouble.rst.txt @@ -0,0 +1,156 @@ + +.. _trouble: + +************************************* +Troubleshooting +************************************* + + +.. _trouble_installation: + +Troubleshooting Installation ++++++++++++++++++++++++++++++ + +Don't forget to :ref:`setenv`, if necessary. + +See :ref:`python_path` for problems with your Python path. + +The utility function :ref:`whichclaw` may be useful for sorting out path issues. + +Troubleshooting Fortran: ++++++++++++++++++++++++++++++ + +.. _trouble_f2py: + +Setting the Fortran compiler to be used by f2py (pip) +----------------------------------------------------- + +When trying to install with `pip` (see :ref:`installing_pip`) +or `python setup.py install`, if you get an error like:: + + error: f90 not supported by GnuFCompiler + +then f2py is trying to use your f77 compiler. This may happen even if +you also have an f90 compiler like gfortran installed. In this case, +``pip install`` will not work; you should download a tarball or clone +the code from Github. Then, in order to see the compilers detected by f2py, +run:: + + python setup.py config_fc --help-fcompiler + +Then to install using a different compiler, do e.g.:: + + python setup.py config_fc --fcompiler=gfortran install + +You may replace ``gfortran`` with the compiler you wish to use. + +.. _trouble_fc: + +Trouble compiling Fortran code at the command line +----------------------------------------------------- + +The packages Classic, AMRClaw, and GeoClaw all require compiling Fortran +code in the process of running an example. This is typically done with the +`make .exe` command in an example or application directory that contains a +:ref:`makefiles`. Even if you don't do this explicitly, due to dependency +checking in the Makefile the code will be compiled if necessary if you do +`make .output`, or `make .plots` (or `make all`). + +.. _trouble_makeexe: + +Trouble running "make .exe" +----------------------------------------------------- + +If the code does not compile, check the following: + + * Make sure your environment variable `CLAW` is set properly:: + + $ printenv CLAW + + to print the value. + The Makefiles use this variable to find the common Makefile and + library routines. + + If you get the error message:: + + Makefile:154: /clawutil/src/Makefile.common: No such file or directory + + then `CLAW` is not set properly. It is looking for the file + `$CLAW/clawutil/src/Makefile.common` and if `CLAW` is not set, the path + will be missing. + + * Make sure your environment variable `FC` is set properly. This + should be set to + the command used to invoke the Fortran compiler, e.g. *gfortran*. + + If you get an error like:: + + make[1]: gfortran: No such file or directory + + then the gfortran compiler is not being found. + + + +.. _trouble_makedata: + +Trouble running "make .data" +++++++++++++++++++++++++++++ + + +If there are errors in the `setrun` function (usually defined in +`setrun.py`) then the these may show up when you try to "make .data" +since this function must be executed. + +See :ref:`setrun` for information about the setrun function. + + +.. _trouble_makeoutput: + +Trouble running "make .output" +++++++++++++++++++++++++++++++ + +If you want to re-run the code and you get:: + + $ make .output + make: `.output' is up to date. + +then you can force it to run again by removing the file `.output`:: + + $ rm -f .output + $ make .output + +This happens for example if you changed something that you know +will affect the output but that isn't in the Makefile's set of +dependencies. + +You can also do + + $ make output + +(with no dot before ``output``) to run the code without checking dependencies. +See :ref:`makefiles` for more details and warnings. + +.. _trouble_makeplots: + +Trouble running "make .plots" +++++++++++++++++++++++++++++++ + +The Python plotting routines require `NumPy` and `matplotlib`. See +:ref:`python` for information on installing these. + +If there are errors in the `setplot` function (usually defined in +`setplot.py`) then the these may show up when you try to "make .plots" +since this function must be executed. See :ref:`setplot`. + +You can also do + + $ make plots + +(with no dot before ``plots``) to plot the output without checking dependencies. +This will never run the code, it will only attempt to plot the output files +found in `_output` directory (or wherever the `OUTDIR` variable in the +`Makefile` points). + +See :ref:`makefiles` for more details and warnings. + + diff --git a/v5.10.x/_sources/tsunamidata.rst.txt b/v5.10.x/_sources/tsunamidata.rst.txt new file mode 100644 index 0000000000..be33c513b4 --- /dev/null +++ b/v5.10.x/_sources/tsunamidata.rst.txt @@ -0,0 +1,89 @@ + +.. _tsunamidata: + +================================== +Some sources of tsunami data +================================== + +.. seealso :: :ref:`topo` + +Topography / bathymetry +------------------------ + +Note that it is important to know what elevation :math:`B=0` +corresponds to for each +topography dataset you might use (i.e. the +`vertical datum `_) +Global ETOPO1 bathymetry is relative to MSL (Mean Sea Level), +while tsunami inundation relief is often relative to MHW (Mean High Water). +These can often be combined since the difference is small relative to the +resolution of the global bathymetry and the result assumed to be relative to +MHW. This is important if comparing to tide gauge observation or when +modeling inundation. + +The NOAA Design-a-Grid tool no longer exists but you can download data sets +from: + +* `NCEI's WCS Grid Extraction Tool `_ +* `NOAA NCEI inundataion relief + `_: + High resolution data near US coastlines. +* `More recent catalog + `_ + +It is also possible to open a remote NetCDF file on the +`NOAA THREDDS server `_ +to download data, which allows downloading only a +subsampled subset of a large DEM. See :ref:`topo_netcdf` for more +details. + +.. _tsunamidata_sources: + +Earthquake source models +------------------------ + +An earthquake source is typically specified by giving the slip along the +fault on a set of fault planes or on subfaults making up a single plane. +This data must then be converted into seafloor deformation to create the +*dtopo* file needed for GeoClaw (see :ref:`topo_dtopo`). This conversion +is often done using the Okada model as described at +:ref:`okada`. + +* `USGS archive `_ +* `Chen Ji's archive, UCSB + `_ + + +DART buoy data +-------------- + +* `Information page `_ +* `Real-time and archived data `_ + +Tide gauges +----------- + +Tide gauge data is often recorded relative to MLLW (Mean Lower-Low Water), so be +sure to check the +`vertical datum `_. + +For example, if you go to a station page such as +`Hilo Bay +`_, +you will see a *Datums* link on the left menu that gives the difference +between MLLW and other water levels such as MHW, which might be the +reference level for the bathymetry. (Be sure to switch from feet to +meters!) Sometimes you can also select the Datum to use when retrieving +data. + +* `NCEI `_ +* NOAA Tides & Currents: `Historic verified data + `_ + ... `Preliminary data + `_ + +* `NOAA 1-minute water level data + `_ + at tsunami-capable stations. + +* `GLOSS / SONEL `_ diff --git a/v5.10.x/_sources/user_routines.rst.txt b/v5.10.x/_sources/user_routines.rst.txt new file mode 100644 index 0000000000..8b245d3b33 --- /dev/null +++ b/v5.10.x/_sources/user_routines.rst.txt @@ -0,0 +1,269 @@ + +.. _user_routines: + +User files required for the Fortran code +======================================== + +The `Makefile` in an application directory shows the set of Fortran source +code files that are being used. Most of these files are typically in one of +the libraries, but a few subroutines must be provided by the user in order to +specify the hyperbolic problem to be solved and the initial conditions. +Other subroutines may also be provided that are application-specific. +This page summarizes some of the most common user-modified routines. + +The calling sequence for each subroutine differs with the number of space +dimensions. The sample calling sequences shown below are for one space +dimension. + +The subroutines described below have default versions in the +corresponding library and the `Makefile` can point to these if +application-specific versions are not needed. + +See the examples in the following directories for additional samples: + +* `$CLAW/classic/examples` +* `$CLAW/amrclaw/examples` +* `$CLAW/geoclaw/examples` + +You can also browse from the :ref:`galleries` to the `README` file for an +example and then to the source code for the application-specific codes. + +.. _user_qinit: + +Specifying the initial conditions +---------------------------------- + +Calling sequence in 1d:: + + subroutine qinit(meqn,mbc,mx,xlower,dx,q,maux,aux) + +.. comment + +See the :ref:`qinit_defaults` for other calling sequences and the proper +declaration of input/output parameters. + +Typically every application directory contains a file `qinit.f` or +`qinit.f90` that sets the initial conditions, typically in a loop such as:: + + do i=1,mx + xi = xlower + (i-0.5d0)*dx + q(1,i) = xi**2 + enddo + +This loop would set the value of :math:`q^1` in the i'th cell to +:math:`x_i^2` where :math:`x_i` is the cell center. +For the finite volume methods used in Clawpack, the initial data should +really be set to be the cell average of the data over each grid cell, +determined by integrating the data for the PDE. +If the initial data is given by a smooth function, then evaluating the +function at the center of the grid cell generally agrees with the cell +average to :math:`{\cal O}(\Delta x^2)` and is consistent with the +second-order accurate high-resolution methods being used in Clawpack. + +For a system of more than 1 equation, you must set `q(m,i)` for `m = +1, 2, ..., num_eqn`. + +For adaptive mesh refinement codes, the `qinit` subroutine will be called +for each grid patch at the initial time, so it is always necessary to +compute the cell centers based on the information passed in. + +.. _user_riemann: + +Specifying the Riemann solver +----------------------------- + +The Riemann solver defines the hyperbolic equation that is being solved and +does the bulk of the computational work -- it is called at every cell +interface every time step and returns the information about waves and speeds +that is needed to update the solution. + +See :ref:`riemann` for more details about the Riemann solvers. + +All of the examples that come with Clawpack use Riemann solvers that are +provided in the directory `$CLAW/riemann/src`, see the `Makefile` in one of +the examples to determine what Riemann solver file(s) are being used (in two +and three space dimensions, transverse Riemann solvers are also required). + +The directory `$CLAW/riemann/src` contains Riemann solvers for many +applications, including advection, acoustics, shallow water equations, Euler +equations, traffic flow, Burgers' equation, etc. + +.. _user_bc: + +Specifying boundary conditions +-------------------------------------------------------- + +Boundary conditions are set by the library routines: + +* `$CLAW/classic/src/Nd/bcN.f` for the classic code (N = 1, 2, 3). +* `$CLAW/amrclaw/src/Nd/bcNamr.f` for the amrclaw code (N = 2, 3). + +Several standard choices of boundary condition procedures are provided in +these routines -- see :ref:`bc` for details. + +For user-supplied boundary conditions that are not implemented in the +library routines, the library routine can be copied to the application +directory and changes made as described at :ref:`bc_user`. +The `Makefile` should then be modified to point to the local version. + + +.. _user_setprob: + +Specifying problem-specific data +--------------------------------- + +Often an application problem has data or parameters that is most +conveniently specified in a user-supplied routine named `setprob`. There is +a library version that does nothing in case one is not specified in the +application directory. As usual, the `Makefile` indicates what file is +used. + +The `setprob` subroutine takes no arguments. Data set in `setprob` is often +passed in common blocks to other routines, such as `qinit` or the Riemann +solver. This is appropriate only for data that does not change with time +and does not vary in space (e.g. the gravitational constant `g` in the +shallow water equations, or the density and bulk modulus for acoustics in +a homogenous medium). + +Note that named common blocks must have the same name in each routine where +they are used. Check any Riemann solvers you use (including those from +`$CLAW/riemann/src`) to see if they require some parameters to be passed in +via a common block. If so, `setprob` is the place to set them. + +For spatially-varying data, see :ref:`user_setaux` below. + +Often `setprob` is written so that it reads in data values from a file, +often called `setprob.data`. This makes it easier to modify parameter +values without recompiling the code. It is also possible to set these +values in `setrun.py` so that this input data is specified in the same file +as other input parameters. For a sample, see +`$CLAW/classic/examples/acoustics_1d_heterogeneous`, for example. + +.. _user_setaux: + +Specifying spatially-varying data using `setaux` +------------------------------------------------- + +Some problems require specifying spatially varying data, for example the +density and bulk modulus for acoustics in a heterogenous medium might vary +in space and in principle could be different in each grid cell. The best +way to specify such data is by use of *auxiliary arrays* that are created +whenever a grid patch for the solution is created and have the same number +of cells with `num_aux` components in each cell. The value `num_aux` is +specified in `setrun.py`, and the contents of the `aux` arrays are filled by +a subroutine named `setaux`, which in one dimension has the calling +sequence:: + + subroutine setaux(mbc,mx,xlower,dx,maux,aux) + +See the :ref:`setaux_defaults` for other calling sequences and the proper +declaration of input/output parameters. + +If adaptive refinement is being used, then every time a new grid patch is +created at any refinement level this subroutine will be called to fill in +the corresponding `aux` arrays. For a sample, see +`$CLAW/classic/examples/acoustics_1d_heterogeneous`, for example. + +If the `aux` arrays need to be time-dependent, the easiest way to adjust +them each time step is in the routine `b4step` described below. + +.. _user_b4step: + +Using `b4step` for work to be done before each time step +-------------------------------------------------------- + +The routine `b4stepN` is called in `N` space dimensions (`N=1,2,3`) just +before a time step is taken (and after ghost cells have been filled by the +boundary conditions). The library version of this routine does +nothing, but this can be modified to do something prior to every time step. + +In one dimension the calling sequence is:: + + subroutine b4step1(mbc,mx,meqn,q,xlower,dx,t,dt,maux,aux) + +See the :ref:`b4step_defaults` for other calling sequences and the proper +declaration of input/output parameters. + +For example, in `$CLAW/amrclaw/examples/advection_2d_swirl` the advection +equation is solved with an advection velocity that varies in time as well as +space. This is initialized for each grid patch in `setaux`, but is adjusted +each time step in `b4step2`. + +.. _user_src: + +Using `src` for source terms +-------------------------------------------------------- + +Problems of the form +:math:`q_t(x,t) + f(q(x,t))_x = \psi(q,x,t)` +can be solved using a fractional step approach, as described in Chapter 17 +of [LeVeque-FVMHP]_. The user can provide a subroutine named `srcN` in `N` +space dimensions that takes a single time step on the equation +:math:`q_t = \psi`. In one dimension the calling sequence is:: + + subroutine src1(meqn,mbc,mx,xlower,dx,q,maux,aux,t,dt) + +On output the `q` array should have been updated by using the input values +as initial data for a single step of length `dt` starting at time `t`. + +See the :ref:`src_defaults` for other calling sequences and the proper +declaration of input/output parameters. + +The library version of `srcN` does nothing. If you copy this to an +application directory and modify for your equation, you must modify the +`Makefile` to point to the local version. You must also set the +`source_split` parameter in `setrun.py` (see :ref:`setrun`) to either +`"godunov"` or `"strang"`. In the former case, the 1st order Godunov +splitting is used (after each time step on the homogenous +hyperbolic equation, a time step of the same length is taken on the source +terms). In the latter case the 2nd order Strang splitting is used: the time +step on the hyperbolic part is both preceeded and followed by +a time step of half the length on the source terms. + +For an example where source terms are used, see +`$CLAW/classic/examples/acoustics_2d_radial/1drad` where a one-dimensional +acoustic equation with a geometric source term is solved in order to provide +a reference solution for the two-dimensional radially symmetric problem +solved in `$CLAW/classic/examples/acoustics_2d_radial`. + + +.. _user_src1d: + +Using `src1d` for source terms with AMRClaw +-------------------------------------------------------- + +When the AMRClaw code is used for a problem in 2 or 3 dimensions with source +terms, then a subroutine `srcN` must be provided as described above. In +addition, for the AMR procedure to work properly it is also necessary to +provide another subroutine `src1d` with calling sequence:: + + subroutine src1d(meqn,mbc,mx1d,q1d,maux,aux1d,t,dt) + +See the :ref:`src1d_defaults` for other calling sequences and the proper +declaration of input/output parameters. + +This routine should be a simplified version of `src2` or `src3` that takes a +one-dimensional set of data in `q1d` rather than a full 2- or 3-dimensional +array of data. The input array `aux1d` has the corresponding set of +auxiliary variables in case these are needed in stepping forward with the +source terms. + +If the source terms depend only on `q`, it should be easy to +adapt src2 to create this routine, simply by looping over `i=1:mx1d` rather +than over a multi-dimensional array. + +This routine is used in computing adjustments around a fine grid patch that +are needed in order to maintain global conservation after values in a +coarser grid cell have been overwritten with the average of the more +accurate fine grid values. Adjustment of the coarse grid values in the +cells bordering this patch is then required to maintain conservation. +This requires solving a set of Riemann problems between fine-grid and +coarse-grid values around the edge of the patch and `src1d` is used in +advancing coarse grid values to intermediate time steps. + +The code may work fine without applying source terms in this +context, so using the dummy library routine `src1d` might be +successful even when source terms are present. + + + diff --git a/v5.10.x/_sources/visit_plotting.rst.txt b/v5.10.x/_sources/visit_plotting.rst.txt new file mode 100644 index 0000000000..089f7f4067 --- /dev/null +++ b/v5.10.x/_sources/visit_plotting.rst.txt @@ -0,0 +1,36 @@ + +.. _visit_plotting: + +=================== +Plotting with VisIt +=================== + +2d and 3d plots can be rendered using the visualization package +`VisIt `_. +VisIt has a Claw reader that can be used to +import data from Clawpack, see `Application Toolkit Formats +`_ +for other formats that VisIt supports. + +The ASCII output files generated by Clawpack can be read in +directly to VisIt if one additional file is added to the directory +of output files: a file named `plot.claw` is required with contents:: + + DIR=. + TIME_FILES_SCANF=fort.t%04d + GRID_FILES_SCANF=fort.q%04d + +When using the VisIt GUI, simply open this file to load the data. +See the `VisIt documentation `_ +for information on how to use the GUI. + + +**To do:** + + * Create Python tools using the Python interface to VisIt so that plots + can be specified in `setplot.py`. + + * Add routines to Clawpack to output data in Silo format, the binary + format recommended for VisIt, and/or other binary formats. + + diff --git a/v5.10.x/_sources/vm.rst.txt b/v5.10.x/_sources/vm.rst.txt new file mode 100644 index 0000000000..7ba720b15e --- /dev/null +++ b/v5.10.x/_sources/vm.rst.txt @@ -0,0 +1,16 @@ + +.. _vm: + +============================================================= +Clawpack Virtual Machine +============================================================= + +See also :ref:`docker_image`, which is now the suggested way to use a virtual +machine. + +There is no Clawpack 5.0 VM yet. + +See `The Clawpack 4.6 VM documentation +`_ for now. +This VM should work with Clawpack 5.0 if you install it following the +:ref:`installing`. diff --git a/v5.10.x/_sources/wp_algorithms.rst.txt b/v5.10.x/_sources/wp_algorithms.rst.txt new file mode 100644 index 0000000000..c2e5c92c11 --- /dev/null +++ b/v5.10.x/_sources/wp_algorithms.rst.txt @@ -0,0 +1,171 @@ +:orphan: + +.. _wp_algorithms: + +Wave-propagation algorithms +=========================== + +.. _wp_1d: + +One space dimension +------------------- + +Clawpack can be used to solve a system of equations of the form + +.. math:: + \kappa(x)q_t+f(q)_x = \psi(q,x,t), + +where :math:`q=q(x,t)\in{\cal R}^m`. The standard case of a homogeneous +conservation law has :math:`\kappa\equiv 1` and :math:`\psi\equiv 0`, + +.. math:: + q_t+f(q)_x=0. + :label: cons1d + +The flux function :math:`f(q)` can also depend explicitly on :math:`x` and +:math:`t` as well as on :math:`q`. +Hyperbolic systems that are not in conservation form, e.g., + +.. math:: + q_t+A(x,t)q_x=0, + +can also be solved. See [LeVeque-FVMHP]_ for more details about the +wave-propagation algorithms that are briefly described here. + +The basic requirement on the homogeneous system is that it be hyperbolic in +the sense that a Riemann solver can be specified that, for any two states +:math:`q_{i-1}` and :math:`Q_i`, returns a set of :math:`M_w` waves +:math:`{\cal W}^p_{i-1/2}` and speeds +:math:`s^p_{i-1/2}` +satisfying + +.. math:: + \sum_{p=1}^{M_w} {\cal W}^p_{i-1/2} = Q_i-Q_{i-1} \equiv \Delta Q_{i-1/2}. + + +The Riemann solver must also return a left-going fluctuation +:math:`{\cal A}^-\Delta Q_{i-1/2}` and +a right-going fluctuation :math:`{\cal A}^+\Delta Q_{i-1/2}`. In +the standard conservative case :eq:`cons1d` these should satisfy + +.. math:: + {\cal A}^-\Delta Q_{i-1/2}+{\cal A}^+\Delta Q_{i-1/2} = f(Q_i)-f(Q_{i-1}) + :label: asum + +and the fluctuations then define a "flux-difference splitting". + +.. math:: + {\cal A}^-\Delta Q_{i-1/2} = \sum_p (s^p_{i-1/2})^- {\cal W}^p_{i-1/2}, + \qquad {\cal A}^+\Delta Q_{i-1/2} = \sum_p (s^p_{i-1/2})^+ {\cal W}^p_{i-1/2}, + +where :math:`s^- = \min(s,0)` and :math:`s^+ = \max(s,0)`. In the +nonconservative case \eqn{claw_1dnoncon}, there is no "flux function" +:math:`f(q)`, +and the constraint :eq:`asum` need not be satisfied. + +Godunov's method +---------------- + +Only the fluctuations are used for the first-order Godunov method, which is +implemented in the form + +.. math:: + Q_i^{n+1} = Q_i^n - \frac{\Delta t}{\Delta x}\left[{\cal A}^+\Delta Q_{i-1/2} + + {\cal A}^-\Delta Q_{i+1/2}\right], + +assuming :math:`\kappa \equiv 1`. + +The Riemann solver must be supplied by the user in the form of a subroutine +`rp1`, as described in :ref:`user_riemann`. + + +Typically the Riemann solver first computes waves and speeds and then uses +these to compute :math:`{\cal A}^+Q_{i-1/2}` and :math:`{\cal A}^-Q_{i-1/2}` +internally in the Riemann solver. + +High-resolution methods +----------------------- + +The waves and speeds must also +be returned by the Riemann solver in order to use the high-resolution +methods described in [LeVeque-FVMHP]_, which reduce to a second-order +accurate Lax-Wendroff type method when limiters are not used. +By introducing wave limiters, non-physical oscillations near discontinuities +or steep gradients in the solution can be avoided. The limiters are based +on the theory of TVD methods for nonlinear scalar equations and extended in +a natural way to systems of equations. + +These methods take the form + +.. math:: + + Q_i^{n+1} = Q_i^n - \frac{\Delta t}{\Delta x}\left[{\cal A}^+Q_{i-1/2} + + {\cal A}^-Q_{i+1/2}\right] + - \frac{\Delta t}{\Delta x}(\tilde F_{i+1/2} - \tilde F_{i-1/2}) + +where + +.. math:: + + \tilde F_{i-1/2} = \frac 1 2 \sum_{p=1}^{M_w} |s^p_{i-1/2}| + \left( 1-\frac{\Delta t}{\Delta x} |s^p_{i-1/2}|\right) + \tilde{\cal W}_{i-1/2}^p. + +Here :math:`\tilde{\cal W}_{i-1/2}^p` represents a limited version of the wave +:math:`{\cal W}_{i-1/2}^p`, obtained by comparing :math:`{\cal W}_{i-1/2}^p` to +:math:`{\cal W}_{i-3/2}^p` if :math:`s^p>0` or to :math:`{\cal W}_{i+1/2}^p` +if :math:`s^p<0`. + +.. _wp_fwave: + +f-wave formulation +------------------- + +For equations with spatially-varying flux functions, such as + +.. math:: + q_t+f(q,x)_x=0. + :label: cons1dvf + +it is often convenient to use the f-wave formulation of the algorithm, as +proposed in [BaleLevMitRoss02]_. Rather than decomposing the jump +:math:`Q_i-Q_{i-1}` into waves, the idea of the f-wave approach is to +decompose the flux difference :math:`f(Q_i,x_i) - f(Q_{i-1},x_{i-1})` into +f-waves using appropriate eigenvectors of the Jacobian matrices to either +side of the interface. See :ref:`riemann_fwave` for more details. + + + +Capacity functions +------------------ + +When a capacity function :math:`\kappa(x)` is present, the Godunov method becomes + +.. math:: + + Q_i^{n+1} = Q_i^n - \frac{\Delta t}{\kappa_i \Delta x} + \left[{\cal A}^+Q_{i-1/2} + {\cal A}^-Q_{i+1/2}\right], + +See [LeVeque-FVMHP]_ for discussion of this algorithm and its extension to +the high-resolution method. +Capacity functions are useful in particular for solving equations on a +mapped grid. + +Source terms +------------ + +If the equation has a source term, +a routine `src1` must also be supplied that +solves the source term equation :math:`q_t=\psi` over a time step. +A fractional step method is used to couple this with the homogeneous +solution, as described in :ref:`user_src`. + +Boundary conditions +------------------- + +Boundary conditions are imposed by setting values in ghost cells each time +step, as described in :ref:`bc`. + + + +TODO: Continue description -- 2d and 3d, transverse solvers. diff --git a/v5.10.x/_static/ClawpackCake.jpg b/v5.10.x/_static/ClawpackCake.jpg new file mode 100644 index 0000000000..4aaa807f6e Binary files /dev/null and b/v5.10.x/_static/ClawpackCake.jpg differ diff --git a/v5.10.x/_static/Makefile_geoclaw_bilinear_interp b/v5.10.x/_static/Makefile_geoclaw_bilinear_interp new file mode 100644 index 0000000000..c03be4460e --- /dev/null +++ b/v5.10.x/_static/Makefile_geoclaw_bilinear_interp @@ -0,0 +1,65 @@ +# Makefile for Clawpack code in this directory. +# This version only sets the local files and frequently changed +# options, and then includes the standard makefile pointed to by CLAWMAKE. +CLAWMAKE = $(CLAW)/clawutil/src/Makefile.common + +# See the above file for details and a list of make options, or type +# make .help +# at the unix prompt. + + +# Adjust these variables if desired: +# ---------------------------------- + +CLAW_PKG = geoclaw # Clawpack package to use +EXE = xgeoclaw # Executable to create +SETRUN_FILE = setrun.py # File containing function to make data +OUTDIR = _output # Directory for output +SETPLOT_FILE = setplot.py # File containing function to set plots +PLOTDIR = _plots # Directory for plots + +RESTART = False + +# Environment variable FC should be set to fortran compiler, e.g. gfortran + +# Compiler flags can be specified here or set as an environment variable +FFLAGS ?= + +# --------------------------------- +# package sources for this program: +# --------------------------------- + +GEOLIB = $(CLAW)/geoclaw/src/2d/shallow +include $(GEOLIB)/Makefile.geoclaw + +# --------------------------------------- +# package sources specifically to exclude +# (i.e. if a custom replacement source +# under a different name is provided) +# --------------------------------------- + +EXCLUDE_MODULES = \ + +EXCLUDE_SOURCES = \ + $(GEOLIB)/fgmax_interpolate0.f90 \ + + +# ---------------------------------------- +# List of custom sources for this program: +# ---------------------------------------- + + +MODULES = \ + +SOURCES = \ + qinit.f90 \ + $(GEOLIB)/fgmax_interpolate.f90 \ + $(CLAW)/riemann/src/rpn2_geoclaw.f \ + $(CLAW)/riemann/src/rpt2_geoclaw.f \ + $(CLAW)/riemann/src/geoclaw_riemann_utils.f \ + +#------------------------------------------------------------------- +# Include Makefile containing standard definitions and make options: +include $(CLAWMAKE) + +# (Perhaps modify to add `topo` target to construct the topography data) diff --git a/v5.10.x/_static/_sphinx_javascript_frameworks_compat.js b/v5.10.x/_static/_sphinx_javascript_frameworks_compat.js new file mode 100644 index 0000000000..8549469dc2 --- /dev/null +++ b/v5.10.x/_static/_sphinx_javascript_frameworks_compat.js @@ -0,0 +1,134 @@ +/* + * _sphinx_javascript_frameworks_compat.js + * ~~~~~~~~~~ + * + * Compatability shim for jQuery and underscores.js. + * + * WILL BE REMOVED IN Sphinx 6.0 + * xref RemovedInSphinx60Warning + * + */ + +/** + * select a different prefix for underscore + */ +$u = _.noConflict(); + + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } + } + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} diff --git a/v5.10.x/_static/base.css b/v5.10.x/_static/base.css new file mode 100644 index 0000000000..5c2b557773 --- /dev/null +++ b/v5.10.x/_static/base.css @@ -0,0 +1,126 @@ +body { + font-family: "Lucida Grande", "DejaVu Sans", "Verdana", sans-serif; + font-size: 14px; + line-height: 1.8; + color: #262626; +} +a, a:active, a:focus, a:hover, a:visited { + text-decoration: none; + color: inherit; +} +b, strong { + font-weight: bold; +} +em, i { + font-style: italic; +} +h1, h2, h3 { + font-family: "JosefinSlab", "DejaVu Sans", "Lucida Grande", "Verdana", sans-serif; + font-style: normal; +} +h1 { + color: #7f0000; + font-size: 22px; + margin-bottom: 11px; + font-weight: 800; +} +h2 { + color: #9c0101; + font-size: 16px; + margin-top: 22px; + margin-bottom: 4px; + font-weight: 800; +} +h3 { + color: #9b0101; + font-size: 18px; + margin-top: 10px; + margin-bottom: 4px; + font-weight: 800; +} +h4 { + font-style: italic; +} +p { + margin-bottom: 1em; +} +.literal, code, pre { + font-family: "Andale Mono", "Consolas", "Bitstream Vera Sans Mono", "Courier New", + Courier, monospace !important; +} +pre { + font-size: 12px; + line-height: 1.5; + overflow: auto; + margin: 1em 0; +} +span.pre { + background-color: #f0f0f0; +} +code { + font-size: 11px; +} +sub { + vertical-align: sub; +} +sup { + vertical-align: super; +} +cite { + font-style: italic; +} +dt { + font-style: italic; +} +blockquote { + margin-left: 30px; + padding-left: 4px; +} +blockquote blockquote { + border-left: 2px solid #aaaaaa; +} +blockquote blockquote blockquote { + border-left: 2px solid #777777; +} +ol, ul { + margin-bottom: 1em; +} +table { + text-align: left; + margin-bottom: 21.6px; +} +table th { + font-weight: bold; +} +table td, table th { + padding: 3px; +} +#main a, .main a { + font-weight: bold; + color: #7f0000; +} +#main a:hover, .main a:hover { + font-weight: bold; + color: #b60202; + text-decoration: underline; +} +#main .highlight, .main .highlight { + font-weight: bold; +} +#main a.button, .main a.button { + text-decoration: none; +} +#main a.button:hover, .main a.button:hover { + color: inherit; +} +#main h1 a, #main h2 a, #main h3 a, #main h4 a, #main h5 a, +.main h1 a, .main h2 a, .main h3 a, .main h4 a, .main h5 a { + color: inherit; + text-decoration: none; +} +#main h1 a:hover, #main h2 a:hover, #main h3 a:hover, +#main h4 a:hover, #main h5 a:hover, .main h1 a:hover, +.main h2 a:hover, .main h3 a:hover, .main h4 a:hover, +.main h5 a:hover { + text-decoration: none; +} diff --git a/v5.10.x/_static/basic.css b/v5.10.x/_static/basic.css new file mode 100644 index 0000000000..4e9a9f1fac --- /dev/null +++ b/v5.10.x/_static/basic.css @@ -0,0 +1,900 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/v5.10.x/_static/clawicon.ico b/v5.10.x/_static/clawicon.ico new file mode 100644 index 0000000000..86ebcf7b38 Binary files /dev/null and b/v5.10.x/_static/clawicon.ico differ diff --git a/v5.10.x/_static/clawlogo.jpg b/v5.10.x/_static/clawlogo.jpg new file mode 100644 index 0000000000..ece2c07b33 Binary files /dev/null and b/v5.10.x/_static/clawlogo.jpg differ diff --git a/v5.10.x/_static/clawlogo2.jpg b/v5.10.x/_static/clawlogo2.jpg new file mode 100644 index 0000000000..e1ff42c4c7 Binary files /dev/null and b/v5.10.x/_static/clawlogo2.jpg differ diff --git a/v5.10.x/_static/doctools.js b/v5.10.x/_static/doctools.js new file mode 100644 index 0000000000..527b876ca6 --- /dev/null +++ b/v5.10.x/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/v5.10.x/_static/documentation_options.js b/v5.10.x/_static/documentation_options.js new file mode 100644 index 0000000000..7da634ac5e --- /dev/null +++ b/v5.10.x/_static/documentation_options.js @@ -0,0 +1,14 @@ +var DOCUMENTATION_OPTIONS = { + URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), + VERSION: '5.10.x', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/v5.10.x/_static/file.png b/v5.10.x/_static/file.png new file mode 100644 index 0000000000..a858a410e4 Binary files /dev/null and b/v5.10.x/_static/file.png differ diff --git a/v5.10.x/_static/flasky.css b/v5.10.x/_static/flasky.css new file mode 100644 index 0000000000..93fb0ac713 --- /dev/null +++ b/v5.10.x/_static/flasky.css @@ -0,0 +1,582 @@ +/* + * flasky.css_t + * ~~~~~~~~~~~~ + * + * :copyright: Copyright 2010 by Armin Ronacher. + * :license: Flask Design License, see LICENSE for details. + */ + + + + +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: 'Georgia', serif; + font-size: 17px; + background-color: white; + color: #000; + margin: 0; + padding: 0; +} + +div.document { + width: 1200; + margin: 30px auto 0 auto; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 220px; +} + +div.sphinxsidebar { + width: 220px; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + background-color: #ffffff; + color: #3E4349; + padding: 0 30px 0 30px; +} + +img.floatingflask { + padding: 0 0 10px 10px; + float: right; +} + +div.footer { + width: 1200; + margin: 20px auto 30px auto; + font-size: 14px; + color: #888; + text-align: right; +} + +div.footer a { + color: #888; +} + +div.related { + display: none; +} + +div.sphinxsidebar a { + color: #444; + text-decoration: none; + border-bottom: 1px dotted #999; +} + +div.sphinxsidebar a:hover { + border-bottom: 1px solid #999; +} + +div.sphinxsidebar { + font-size: 14px; + line-height: 1.5; +} + +div.sphinxsidebarwrapper { + padding: 18px 10px; +} + +div.sphinxsidebarwrapper p.logo { + padding: 0 0 20px 0; + margin: 0; + text-align: center; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: 'Garamond', 'Georgia', serif; + color: #444; + font-size: 24px; + font-weight: normal; + margin: 0 0 5px 0; + padding: 0; +} + +div.sphinxsidebar h4 { + font-size: 20px; +} + +div.sphinxsidebar h3 a { + color: #444; +} + +div.sphinxsidebar p.logo a, +div.sphinxsidebar h3 a, +div.sphinxsidebar p.logo a:hover, +div.sphinxsidebar h3 a:hover { + border: none; +} + +div.sphinxsidebar p { + color: #555; + margin: 10px 0; +} + +div.sphinxsidebar ul { + margin: 10px 0; + padding: 0; + color: #000; +} + +div.sphinxsidebar input { + border: 1px solid #ccc; + font-family: 'Georgia', serif; + font-size: 1em; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + text-decoration: underline; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + + +div.indexwrapper h1 { + text-indent: -999999px; + background: url('') no-repeat center center; + height: 0px; +} + +div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #ddd; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #eaeaea; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + background: #fafafa; + margin: 20px -30px; + padding: 10px 30px; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; +} + +div.admonition tt.xref, div.admonition a tt { + border-bottom: 1px solid #fafafa; +} + +dd div.admonition { + margin-left: -60px; + padding-left: 60px; +} + +div.admonition p.admonition-title { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight { + background-color: white; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.seealso { + background-color: #ffc; + border: 1px solid #ff6; +} + +div.topic { + background-color: #eee; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt { + font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.9em; +} + +img.screenshot { +} + +tt.descname, tt.descclassname { + font-size: 0.95em; +} + +tt.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #eee; + background: #fdfdfd; + font-size: 0.9em; +} + +table.footnote + table.footnote { + margin-top: -15px; + border-top: none; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.footnote td.label { + width: 0px; + padding: 0.3em 0 0.3em 0.5em; +} + +table.footnote td { + padding: 0.3em 0.5em; +} + +dl { + margin: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +blockquote { + margin: 0 0 0 30px; + padding: 0; +} + +ul, ol { + margin: 10px 0 10px 30px; + padding: 0; +} + +pre { + background: #eee; + padding: 7px 30px; + margin: 15px -30px; + line-height: 1.3em; +} + +dl pre, blockquote pre, li pre { + margin-left: -60px; + padding-left: 60px; +} + +dl dl pre { + margin-left: -90px; + padding-left: 90px; +} + +tt { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, a tt { + background-color: #FBFBFB; + border-bottom: 1px solid white; +} + +a.reference { + text-decoration: none; + border-bottom: 1px dotted #004B6B; + color: #800000; +} + +a.reference:visited { + color: #806060; +} + +a.reference:hover { + border-bottom: 1px solid #6D4100; +} + +a.footnote-reference { + text-decoration: none; + font-size: 0.7em; + vertical-align: top; + border-bottom: 1px dotted #004B6B; +} + +a.footnote-reference:hover { + border-bottom: 1px solid #6D4100; +} + +a:hover tt { + background: #EEE; +} + + +@media screen and (max-width: 870px) { + + div.sphinxsidebar { + display: none; + } + + div.document { + width: 100%; + + } + + div.documentwrapper { + margin-left: 0; + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + } + + div.bodywrapper { + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + margin-left: 0; + } + + ul { + margin-left: 0; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .bodywrapper { + margin: 0; + } + + .footer { + width: auto; + } + + .github { + display: none; + } + + + +} + + + +@media screen and (max-width: 875px) { + + body { + margin: 0; + } + + div.documentwrapper { + float: none; + background: white; + } + + div.sphinxsidebar { + display: block; + float: none; + width: 102.5%; + margin: 50px -30px -20px -30px; + padding: 10px 20px; + background: #333; + color: white; + } + + div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, + div.sphinxsidebar h3 a { + color: white; + } + + div.sphinxsidebar a { + color: #aaa; + } + + div.sphinxsidebar p.logo { + display: none; + } + + div.document { + width: 100%; + margin: 0; + padding: 0px 0px 30px 20px; + } + + div.related { + display: block; + margin: 0; + padding: 10px 0 20px 20px; + } + + div.related ul, + div.related ul li { + margin: 0; + padding: 0; + } + + div.footer { + display: none; + } + + div.bodywrapper { + margin: 0; + } + + div.body { + min-height: 0; + padding: 0; + } + + .rtd_doc_footer { + display: none; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .footer { + width: auto; + } + + .github { + display: none; + } +} + + +/* scrollbars */ + +::-webkit-scrollbar { + width: 6px; + height: 6px; +} + +::-webkit-scrollbar-button:start:decrement, +::-webkit-scrollbar-button:end:increment { + display: block; + height: 10px; +} + +::-webkit-scrollbar-button:vertical:increment { + background-color: #fff; +} + +::-webkit-scrollbar-track-piece { + background-color: #eee; + -webkit-border-radius: 3px; +} + +::-webkit-scrollbar-thumb:vertical { + height: 50px; + background-color: #ccc; + -webkit-border-radius: 3px; +} + +::-webkit-scrollbar-thumb:horizontal { + width: 50px; + background-color: #ccc; + -webkit-border-radius: 3px; +} + +/* misc. */ + +.revsys-inline { + display: none!important; +} \ No newline at end of file diff --git a/v5.10.x/_static/flowcharts/AMRClawMonsterFlowchart.pdf b/v5.10.x/_static/flowcharts/AMRClawMonsterFlowchart.pdf new file mode 100644 index 0000000000..49be7282d5 Binary files /dev/null and b/v5.10.x/_static/flowcharts/AMRClawMonsterFlowchart.pdf differ diff --git a/v5.10.x/_static/flowcharts/AMRDiagram.pdf b/v5.10.x/_static/flowcharts/AMRDiagram.pdf new file mode 100644 index 0000000000..fdea07d121 Binary files /dev/null and b/v5.10.x/_static/flowcharts/AMRDiagram.pdf differ diff --git a/v5.10.x/_static/flowcharts/RegridDiagram.pdf b/v5.10.x/_static/flowcharts/RegridDiagram.pdf new file mode 100644 index 0000000000..6380988499 Binary files /dev/null and b/v5.10.x/_static/flowcharts/RegridDiagram.pdf differ diff --git a/v5.10.x/_static/flowcharts/StepgridDiagram.pdf b/v5.10.x/_static/flowcharts/StepgridDiagram.pdf new file mode 100644 index 0000000000..f8b5e5c2b1 Binary files /dev/null and b/v5.10.x/_static/flowcharts/StepgridDiagram.pdf differ diff --git a/v5.10.x/_static/graphviz.css b/v5.10.x/_static/graphviz.css new file mode 100644 index 0000000000..19e7afd385 --- /dev/null +++ b/v5.10.x/_static/graphviz.css @@ -0,0 +1,19 @@ +/* + * graphviz.css + * ~~~~~~~~~~~~ + * + * Sphinx stylesheet -- graphviz extension. + * + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +img.graphviz { + border: 0; + max-width: 100%; +} + +object.graphviz { + max-width: 100%; +} diff --git a/v5.10.x/_static/jquery-3.6.0.js b/v5.10.x/_static/jquery-3.6.0.js new file mode 100644 index 0000000000..fc6c299b73 --- /dev/null +++ b/v5.10.x/_static/jquery-3.6.0.js @@ -0,0 +1,10881 @@ +/*! + * jQuery JavaScript Library v3.6.0 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright OpenJS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2021-03-02T17:08Z + */ +( function( global, factory ) { + + "use strict"; + + if ( typeof module === "object" && typeof module.exports === "object" ) { + + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 +// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode +// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common +// enough that all such attempts are guarded in a try block. +"use strict"; + +var arr = []; + +var getProto = Object.getPrototypeOf; + +var slice = arr.slice; + +var flat = arr.flat ? function( array ) { + return arr.flat.call( array ); +} : function( array ) { + return arr.concat.apply( [], array ); +}; + + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var fnToString = hasOwn.toString; + +var ObjectFunctionString = fnToString.call( Object ); + +var support = {}; + +var isFunction = function isFunction( obj ) { + + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 + // Plus for old WebKit, typeof returns "function" for HTML collections + // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) + return typeof obj === "function" && typeof obj.nodeType !== "number" && + typeof obj.item !== "function"; + }; + + +var isWindow = function isWindow( obj ) { + return obj != null && obj === obj.window; + }; + + +var document = window.document; + + + + var preservedScriptAttributes = { + type: true, + src: true, + nonce: true, + noModule: true + }; + + function DOMEval( code, node, doc ) { + doc = doc || document; + + var i, val, + script = doc.createElement( "script" ); + + script.text = code; + if ( node ) { + for ( i in preservedScriptAttributes ) { + + // Support: Firefox 64+, Edge 18+ + // Some browsers don't support the "nonce" property on scripts. + // On the other hand, just using `getAttribute` is not enough as + // the `nonce` attribute is reset to an empty string whenever it + // becomes browsing-context connected. + // See https://github.com/whatwg/html/issues/2369 + // See https://html.spec.whatwg.org/#nonce-attributes + // The `node.getAttribute` check was added for the sake of + // `jQuery.globalEval` so that it can fake a nonce-containing node + // via an object. + val = node[ i ] || node.getAttribute && node.getAttribute( i ); + if ( val ) { + script.setAttribute( i, val ); + } + } + } + doc.head.appendChild( script ).parentNode.removeChild( script ); + } + + +function toType( obj ) { + if ( obj == null ) { + return obj + ""; + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; +} +/* global Symbol */ +// Defining this global in .eslintrc.json would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module + + + +var + version = "3.6.0", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + + // Return all the elements in a clean array + if ( num == null ) { + return slice.call( this ); + } + + // Return just the one element from the set + return num < 0 ? this[ num + this.length ] : this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + even: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return ( i + 1 ) % 2; + } ) ); + }, + + odd: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return i % 2; + } ) ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // Skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !isFunction( target ) ) { + target = {}; + } + + // Extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + copy = options[ name ]; + + // Prevent Object.prototype pollution + // Prevent never-ending loop + if ( name === "__proto__" || target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = Array.isArray( copy ) ) ) ) { + src = target[ name ]; + + // Ensure proper type for the source value + if ( copyIsArray && !Array.isArray( src ) ) { + clone = []; + } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { + clone = {}; + } else { + clone = src; + } + copyIsArray = false; + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + isPlainObject: function( obj ) { + var proto, Ctor; + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if ( !obj || toString.call( obj ) !== "[object Object]" ) { + return false; + } + + proto = getProto( obj ); + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if ( !proto ) { + return true; + } + + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; + return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; + }, + + isEmptyObject: function( obj ) { + var name; + + for ( name in obj ) { + return false; + } + return true; + }, + + // Evaluates a script in a provided context; falls back to the global one + // if not specified. + globalEval: function( code, options, doc ) { + DOMEval( code, { nonce: options && options.nonce }, doc ); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return flat( ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; +} + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), + function( _i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); + } ); + +function isArrayLike( obj ) { + + // Support: real iOS 8.2 only (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = toType( obj ); + + if ( isFunction( obj ) || isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.3.6 + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://js.foundation/ + * + * Date: 2021-02-16 + */ +( function( window ) { +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + nonnativeSelectorCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // Instance methods + hasOwn = ( {} ).hasOwnProperty, + arr = [], + pop = arr.pop, + pushNative = arr.push, + push = arr.push, + slice = arr.slice, + + // Use a stripped-down indexOf as it's faster than native + // https://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[ i ] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + + "ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram + identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + + // "Attribute values must be CSS identifiers [capture 5] + // or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + + whitespace + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + + "*" ), + rdescend = new RegExp( whitespace + "|>" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rhtml = /HTML$/i, + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + + // CSS escapes + // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), + funescape = function( escape, nonHex ) { + var high = "0x" + escape.slice( 1 ) - 0x10000; + + return nonHex ? + + // Strip the backslash prefix from a non-hex escape sequence + nonHex : + + // Replace a hexadecimal escape sequence with the encoded Unicode code point + // Support: IE <=11+ + // For values outside the Basic Multilingual Plane (BMP), manually construct a + // surrogate pair + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // CSS string/identifier serialization + // https://drafts.csswg.org/cssom/#common-serializing-idioms + rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, + fcssescape = function( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }, + + inDisabledFieldset = addCombinator( + function( elem ) { + return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; + }, + { dir: "parentNode", next: "legend" } + ); + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + ( arr = slice.call( preferredDoc.childNodes ) ), + preferredDoc.childNodes + ); + + // Support: Android<4.0 + // Detect silently failing push.apply + // eslint-disable-next-line no-unused-expressions + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + pushNative.apply( target, slice.call( els ) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + + // Can't trust NodeList.length + while ( ( target[ j++ ] = els[ i++ ] ) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var m, i, elem, nid, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + setDocument( context ); + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { + + // ID selector + if ( ( m = match[ 1 ] ) ) { + + // Document context + if ( nodeType === 9 ) { + if ( ( elem = context.getElementById( m ) ) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && ( elem = newContext.getElementById( m ) ) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[ 2 ] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !nonnativeSelectorCache[ selector + " " ] && + ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && + + // Support: IE 8 only + // Exclude object elements + ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { + + newSelector = selector; + newContext = context; + + // qSA considers elements outside a scoping root when evaluating child or + // descendant combinators, which is not what we want. + // In such cases, we work around the behavior by prefixing every selector in the + // list with an ID selector referencing the scope context. + // The technique has to be used as well when a leading combinator is used + // as such selectors are not recognized by querySelectorAll. + // Thanks to Andrew Dupont for this technique. + if ( nodeType === 1 && + ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + + // We can use :scope instead of the ID hack if the browser + // supports it & if we're not changing the context. + if ( newContext !== context || !support.scope ) { + + // Capture the context ID, setting it first if necessary + if ( ( nid = context.getAttribute( "id" ) ) ) { + nid = nid.replace( rcssescape, fcssescape ); + } else { + context.setAttribute( "id", ( nid = expando ) ); + } + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + while ( i-- ) { + groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + + toSelector( groups[ i ] ); + } + newSelector = groups.join( "," ); + } + + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + nonnativeSelectorCache( selector, true ); + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return ( cache[ key + " " ] = value ); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */ +function assert( fn ) { + var el = document.createElement( "fieldset" ); + + try { + return !!fn( el ); + } catch ( e ) { + return false; + } finally { + + // Remove from its parent by default + if ( el.parentNode ) { + el.parentNode.removeChild( el ); + } + + // release memory in IE + el = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split( "|" ), + i = arr.length; + + while ( i-- ) { + Expr.attrHandle[ arr[ i ] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + a.sourceIndex - b.sourceIndex; + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( ( cur = cur.nextSibling ) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return ( name === "input" || name === "button" ) && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */ +function createDisabledPseudo( disabled ) { + + // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function( elem ) { + + // Only certain elements can match :enabled or :disabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled + if ( "form" in elem ) { + + // Check for inherited disabledness on relevant non-disabled elements: + // * listed form-associated elements in a disabled fieldset + // https://html.spec.whatwg.org/multipage/forms.html#category-listed + // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled + // * option elements in a disabled optgroup + // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled + // All such elements have a "form" property. + if ( elem.parentNode && elem.disabled === false ) { + + // Option elements defer to a parent optgroup if present + if ( "label" in elem ) { + if ( "label" in elem.parentNode ) { + return elem.parentNode.disabled === disabled; + } else { + return elem.disabled === disabled; + } + } + + // Support: IE 6 - 11 + // Use the isDisabled shortcut property to check for disabled fieldset ancestors + return elem.isDisabled === disabled || + + // Where there is no isDisabled, check manually + /* jshint -W018 */ + elem.isDisabled !== !disabled && + inDisabledFieldset( elem ) === disabled; + } + + return elem.disabled === disabled; + + // Try to winnow out elements that can't be disabled before trusting the disabled property. + // Some victims get caught in our net (label, legend, menu, track), but it shouldn't + // even exist on them, let alone have a boolean value. + } else if ( "label" in elem ) { + return elem.disabled === disabled; + } + + // Remaining elements are neither :enabled nor :disabled + return false; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction( function( argument ) { + argument = +argument; + return markFunction( function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ ( j = matchIndexes[ i ] ) ] ) { + seed[ j ] = !( matches[ j ] = seed[ j ] ); + } + } + } ); + } ); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + var namespace = elem && elem.namespaceURI, + docElem = elem && ( elem.ownerDocument || elem ).documentElement; + + // Support: IE <=8 + // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes + // https://bugs.jquery.com/ticket/4833 + return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, subWindow, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + + // Support: IE 9 - 11+, Edge 12 - 18+ + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( preferredDoc != document && + ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { + + // Support: IE 11, Edge + if ( subWindow.addEventListener ) { + subWindow.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( subWindow.attachEvent ) { + subWindow.attachEvent( "onunload", unloadHandler ); + } + } + + // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, + // Safari 4 - 5 only, Opera <=11.6 - 12.x only + // IE/Edge & older browsers don't support the :scope pseudo-class. + // Support: Safari 6.0 only + // Safari 6.0 supports :scope but it's an alias of :root there. + support.scope = assert( function( el ) { + docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); + return typeof el.querySelectorAll !== "undefined" && + !el.querySelectorAll( ":scope fieldset div" ).length; + } ); + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert( function( el ) { + el.className = "i"; + return !el.getAttribute( "className" ); + } ); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert( function( el ) { + el.appendChild( document.createComment( "" ) ); + return !el.getElementsByTagName( "*" ).length; + } ); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( document.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programmatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert( function( el ) { + docElem.appendChild( el ).id = expando; + return !document.getElementsByName || !document.getElementsByName( expando ).length; + } ); + + // ID filter and find + if ( support.getById ) { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute( "id" ) === attrId; + }; + }; + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var elem = context.getElementById( id ); + return elem ? [ elem ] : []; + } + }; + } else { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode( "id" ); + return node && node.value === attrId; + }; + }; + + // Support: IE 6 - 7 only + // getElementById is not reliable as a find shortcut + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var node, i, elems, + elem = context.getElementById( id ); + + if ( elem ) { + + // Verify the id attribute + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + + // Fall back on getElementsByName + elems = context.getElementsByName( id ); + i = 0; + while ( ( elem = elems[ i++ ] ) ) { + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + } + } + + return []; + } + }; + } + + // Tag + Expr.find[ "TAG" ] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See https://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { + + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert( function( el ) { + + var input; + + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // https://bugs.jquery.com/ticket/12359 + docElem.appendChild( el ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !el.querySelectorAll( "[selected]" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push( "~=" ); + } + + // Support: IE 11+, Edge 15 - 18+ + // IE 11/Edge don't find elements on a `[name='']` query in some cases. + // Adding a temporary attribute to the document before the selection works + // around the issue. + // Interestingly, IE 10 & older don't seem to have the issue. + input = document.createElement( "input" ); + input.setAttribute( "name", "" ); + el.appendChild( input ); + if ( !el.querySelectorAll( "[name='']" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + + whitespace + "*(?:''|\"\")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !el.querySelectorAll( ":checked" ).length ) { + rbuggyQSA.push( ":checked" ); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibling-combinator selector` fails + if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push( ".#.+[+~]" ); + } + + // Support: Firefox <=3.6 - 5 only + // Old Firefox doesn't throw on a badly-escaped identifier. + el.querySelectorAll( "\\\f" ); + rbuggyQSA.push( "[\\r\\n\\f]" ); + } ); + + assert( function( el ) { + el.innerHTML = "" + + ""; + + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement( "input" ); + input.setAttribute( "type", "hidden" ); + el.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( el.querySelectorAll( "[name=d]" ).length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: IE9-11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + docElem.appendChild( el ).disabled = true; + if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: Opera 10 - 11 only + // Opera 10-11 does not throw on post-comma invalid pseudos + el.querySelectorAll( "*,:x" ); + rbuggyQSA.push( ",.*:" ); + } ); + } + + if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector ) ) ) ) { + + assert( function( el ) { + + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( el, "*" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( el, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + } ); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + ) ); + } : + function( a, b ) { + if ( b ) { + while ( ( b = b.parentNode ) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { + + // Choose the first element that is related to our preferred document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( a == document || a.ownerDocument == preferredDoc && + contains( preferredDoc, a ) ) { + return -1; + } + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( b == document || b.ownerDocument == preferredDoc && + contains( preferredDoc, b ) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + return a == document ? -1 : + b == document ? 1 : + /* eslint-enable eqeqeq */ + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( ( cur = cur.parentNode ) ) { + ap.unshift( cur ); + } + cur = b; + while ( ( cur = cur.parentNode ) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[ i ] === bp[ i ] ) { + i++; + } + + return i ? + + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[ i ], bp[ i ] ) : + + // Otherwise nodes in our document sort first + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + ap[ i ] == preferredDoc ? -1 : + bp[ i ] == preferredDoc ? 1 : + /* eslint-enable eqeqeq */ + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + setDocument( elem ); + + if ( support.matchesSelector && documentIsHTML && + !nonnativeSelectorCache[ expr + " " ] && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch ( e ) { + nonnativeSelectorCache( expr, true ); + } + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( context.ownerDocument || context ) != document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( elem.ownerDocument || elem ) != document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; +}; + +Sizzle.escape = function( sel ) { + return ( sel + "" ).replace( rcssescape, fcssescape ); +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + + // If no nodeType, this is expected to be an array + while ( ( node = elem[ i++ ] ) ) { + + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[ 1 ] = match[ 1 ].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[ 3 ] = ( match[ 3 ] || match[ 4 ] || + match[ 5 ] || "" ).replace( runescape, funescape ); + + if ( match[ 2 ] === "~=" ) { + match[ 3 ] = " " + match[ 3 ] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[ 1 ] = match[ 1 ].toLowerCase(); + + if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { + + // nth-* requires argument + if ( !match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[ 4 ] = +( match[ 4 ] ? + match[ 5 ] + ( match[ 6 ] || 1 ) : + 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); + match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); + + // other types prohibit arguments + } else if ( match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[ 6 ] && match[ 2 ]; + + if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[ 3 ] ) { + match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + + // Get excess from tokenize (recursively) + ( excess = tokenize( unquoted, true ) ) && + + // advance to the next closing parenthesis + ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { + + // excess is a negative index + match[ 0 ] = match[ 0 ].slice( 0, excess ); + match[ 2 ] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { + return true; + } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + ( pattern = new RegExp( "(^|" + whitespace + + ")" + className + "(" + whitespace + "|$)" ) ) && classCache( + className, function( elem ) { + return pattern.test( + typeof elem.className === "string" && elem.className || + typeof elem.getAttribute !== "undefined" && + elem.getAttribute( "class" ) || + "" + ); + } ); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + /* eslint-disable max-len */ + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + /* eslint-enable max-len */ + + }; + }, + + "CHILD": function( type, what, _argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, _context, xml ) { + var cache, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( ( node = node[ dir ] ) ) { + if ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) { + + return false; + } + } + + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( ( node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + + // Use previously-cached element index if available + if ( useCache ) { + + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + + // Use the same loop as above to seek `elem` from the start + while ( ( node = ++nodeIndex && node && node[ dir ] || + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + if ( ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || + ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + uniqueCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction( function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[ i ] ); + seed[ idx ] = !( matches[ idx ] = matched[ i ] ); + } + } ) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + + // Potentially complex pseudos + "not": markFunction( function( selector ) { + + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction( function( seed, matches, _context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( ( elem = unmatched[ i ] ) ) { + seed[ i ] = !( matches[ i ] = elem ); + } + } + } ) : + function( elem, _context, xml ) { + input[ 0 ] = elem; + matcher( input, null, xml, results ); + + // Don't keep the element (issue #299) + input[ 0 ] = null; + return !results.pop(); + }; + } ), + + "has": markFunction( function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + } ), + + "contains": markFunction( function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; + }; + } ), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + + // lang value must be a valid identifier + if ( !ridentifier.test( lang || "" ) ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( ( elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); + return false; + }; + } ), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && + ( !document.hasFocus || document.hasFocus() ) && + !!( elem.type || elem.href || ~elem.tabIndex ); + }, + + // Boolean properties + "enabled": createDisabledPseudo( false ), + "disabled": createDisabledPseudo( true ), + + "checked": function( elem ) { + + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return ( nodeName === "input" && !!elem.checked ) || + ( nodeName === "option" && !!elem.selected ); + }, + + "selected": function( elem ) { + + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + // eslint-disable-next-line no-unused-expressions + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos[ "empty" ]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( ( attr = elem.getAttribute( "type" ) ) == null || + attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo( function() { + return [ 0 ]; + } ), + + "last": createPositionalPseudo( function( _matchIndexes, length ) { + return [ length - 1 ]; + } ), + + "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + } ), + + "even": createPositionalPseudo( function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "odd": createPositionalPseudo( function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? + argument + length : + argument > length ? + length : + argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ) + } +}; + +Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || ( match = rcomma.exec( soFar ) ) ) { + if ( match ) { + + // Don't consume trailing commas as valid + soFar = soFar.slice( match[ 0 ].length ) || soFar; + } + groups.push( ( tokens = [] ) ); + } + + matched = false; + + // Combinators + if ( ( match = rcombinators.exec( soFar ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + + // Cast descendant combinators to space + type: match[ 0 ].replace( rtrim, " " ) + } ); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || + ( match = preFilters[ type ]( match ) ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + type: type, + matches: match + } ); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[ i ].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + skip = combinator.next, + key = skip || dir, + checkNonElements = base && key === "parentNode", + doneName = done++; + + return combinator.first ? + + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + return false; + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, uniqueCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || ( elem[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || + ( outerCache[ elem.uniqueID ] = {} ); + + if ( skip && skip === elem.nodeName.toLowerCase() ) { + elem = elem[ dir ] || elem; + } else if ( ( oldCache = uniqueCache[ key ] ) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return ( newCache[ 2 ] = oldCache[ 2 ] ); + } else { + + // Reuse newcache so results back-propagate to previous elements + uniqueCache[ key ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { + return true; + } + } + } + } + } + return false; + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[ i ]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[ 0 ]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[ i ], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( ( elem = unmatched[ i ] ) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction( function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( + selector || "*", + context.nodeType ? [ context ] : context, + [] + ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( ( elem = temp[ i ] ) ) { + matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) ) { + + // Restore matcherIn since elem is not yet a final match + temp.push( ( matcherIn[ i ] = elem ) ); + } + } + postFinder( null, ( matcherOut = [] ), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) && + ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { + + seed[ temp ] = !( results[ temp ] = elem ); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + } ); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[ 0 ].type ], + implicitRelative = leadingRelative || Expr.relative[ " " ], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + ( checkContext = context ).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { + matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; + } else { + matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[ j ].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens + .slice( 0, i - 1 ) + .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), + + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), + len = elems.length; + + if ( outermost ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + outermostContext = context == document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( !context && elem.ownerDocument != document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( ( matcher = elementMatchers[ j++ ] ) ) { + if ( matcher( elem, context || document, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + + // They will have gone through all possible matchers + if ( ( elem = !matcher && elem ) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( ( matcher = setMatchers[ j++ ] ) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !( unmatched[ i ] || setMatched[ i ] ) ) { + setMatched[ i ] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[ i ] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( + selector, + matcherFromGroupMatchers( elementMatchers, setMatchers ) + ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( ( selector = compiled.selector || selector ) ); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[ 0 ] = match[ 0 ].slice( 0 ); + if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { + + context = ( Expr.find[ "ID" ]( token.matches[ 0 ] + .replace( runescape, funescape ), context ) || [] )[ 0 ]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[ i ]; + + // Abort if we hit a combinator + if ( Expr.relative[ ( type = token.type ) ] ) { + break; + } + if ( ( find = Expr.find[ type ] ) ) { + + // Search, expanding context for leading sibling combinators + if ( ( seed = find( + token.matches[ 0 ].replace( runescape, funescape ), + rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || + context + ) ) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert( function( el ) { + + // Should return 1, but returns 4 (following) + return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; +} ); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert( function( el ) { + el.innerHTML = ""; + return el.firstChild.getAttribute( "href" ) === "#"; +} ) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + } ); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert( function( el ) { + el.innerHTML = ""; + el.firstChild.setAttribute( "value", "" ); + return el.firstChild.getAttribute( "value" ) === ""; +} ) ) { + addHandle( "value", function( elem, _name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + } ); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert( function( el ) { + return el.getAttribute( "disabled" ) == null; +} ) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; + } + } ); +} + +return Sizzle; + +} )( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; + +// Deprecated +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; +jQuery.escapeSelector = Sizzle.escape; + + + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + + + +function nodeName( elem, name ) { + + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + +} +var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); + + + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + return !!qualifier.call( elem, i, elem ) !== not; + } ); + } + + // Single element + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + } + + // Arraylike of elements (jQuery, arguments, Array) + if ( typeof qualifier !== "string" ) { + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not; + } ); + } + + // Filtered directly for both simple and complex selectors + return jQuery.filter( qualifier, elements, not ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + if ( elems.length === 1 && elem.nodeType === 1 ) { + return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; + } + + return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, ret, + len = this.length, + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); + } + + ret = this.pushStack( [] ); + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + return len > 1 ? jQuery.uniqueSort( ret ) : ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); + }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +} ); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + // Shortcut simple #id case for speed + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, + + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Method init() accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[ 0 ] === "<" && + selector[ selector.length - 1 ] === ">" && + selector.length >= 3 ) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // Option to run scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + if ( elem ) { + + // Inject the element directly into the jQuery object + this[ 0 ] = elem; + this.length = 1; + } + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( isFunction( selector ) ) { + return root.ready !== undefined ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // Methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter( function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + targets = typeof selectors !== "string" && jQuery( selectors ); + + // Positional selectors never match, since there's no _selection_ context + if ( !rneedsContext.test( selectors ) ) { + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( targets ? + targets.index( cur ) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within the set + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // Index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + } +} ); + +function sibling( cur, dir ) { + while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} + return cur; +} + +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, _i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, _i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, _i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + if ( elem.contentDocument != null && + + // Support: IE 11+ + // elements with no `data` attribute has an object + // `contentDocument` with a `null` prototype. + getProto( elem.contentDocument ) ) { + + return elem.contentDocument; + } + + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } + + return jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.uniqueSort( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +} ); +var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { + object[ flag ] = true; + } ); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions( options ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = locked || options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && toType( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; + } + } + } ); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = queue = []; + if ( !memory && !firing ) { + list = memory = ""; + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +function Identity( v ) { + return v; +} +function Thrower( ex ) { + throw ex; +} + +function adoptValue( value, resolve, reject, noValue ) { + var method; + + try { + + // Check for promise aspect first to privilege synchronous behavior + if ( value && isFunction( ( method = value.promise ) ) ) { + method.call( value ).done( resolve ).fail( reject ); + + // Other thenables + } else if ( value && isFunction( ( method = value.then ) ) ) { + method.call( value, resolve, reject ); + + // Other non-thenables + } else { + + // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: + // * false: [ value ].slice( 0 ) => resolve( value ) + // * true: [ value ].slice( 1 ) => resolve() + resolve.apply( undefined, [ value ].slice( noValue ) ); + } + + // For Promises/A+, convert exceptions into rejections + // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in + // Deferred#then to conditionally suppress rejection. + } catch ( value ) { + + // Support: Android 4.0 only + // Strict mode functions invoked without .call/.apply get global-object context + reject.apply( undefined, [ value ] ); + } +} + +jQuery.extend( { + + Deferred: function( func ) { + var tuples = [ + + // action, add listener, callbacks, + // ... .then handlers, argument index, [final state] + [ "notify", "progress", jQuery.Callbacks( "memory" ), + jQuery.Callbacks( "memory" ), 2 ], + [ "resolve", "done", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 0, "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 1, "rejected" ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + "catch": function( fn ) { + return promise.then( null, fn ); + }, + + // Keep pipe for back-compat + pipe: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( _i, tuple ) { + + // Map tuples (progress, done, fail) to arguments (done, fail, progress) + var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; + + // deferred.progress(function() { bind to newDefer or newDefer.notify }) + // deferred.done(function() { bind to newDefer or newDefer.resolve }) + // deferred.fail(function() { bind to newDefer or newDefer.reject }) + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + then: function( onFulfilled, onRejected, onProgress ) { + var maxDepth = 0; + function resolve( depth, deferred, handler, special ) { + return function() { + var that = this, + args = arguments, + mightThrow = function() { + var returned, then; + + // Support: Promises/A+ section 2.3.3.3.3 + // https://promisesaplus.com/#point-59 + // Ignore double-resolution attempts + if ( depth < maxDepth ) { + return; + } + + returned = handler.apply( that, args ); + + // Support: Promises/A+ section 2.3.1 + // https://promisesaplus.com/#point-48 + if ( returned === deferred.promise() ) { + throw new TypeError( "Thenable self-resolution" ); + } + + // Support: Promises/A+ sections 2.3.3.1, 3.5 + // https://promisesaplus.com/#point-54 + // https://promisesaplus.com/#point-75 + // Retrieve `then` only once + then = returned && + + // Support: Promises/A+ section 2.3.4 + // https://promisesaplus.com/#point-64 + // Only check objects and functions for thenability + ( typeof returned === "object" || + typeof returned === "function" ) && + returned.then; + + // Handle a returned thenable + if ( isFunction( then ) ) { + + // Special processors (notify) just wait for resolution + if ( special ) { + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ) + ); + + // Normal processors (resolve) also hook into progress + } else { + + // ...and disregard older resolution values + maxDepth++; + + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ), + resolve( maxDepth, deferred, Identity, + deferred.notifyWith ) + ); + } + + // Handle all other returned values + } else { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Identity ) { + that = undefined; + args = [ returned ]; + } + + // Process the value(s) + // Default process is resolve + ( special || deferred.resolveWith )( that, args ); + } + }, + + // Only normal processors (resolve) catch and reject exceptions + process = special ? + mightThrow : + function() { + try { + mightThrow(); + } catch ( e ) { + + if ( jQuery.Deferred.exceptionHook ) { + jQuery.Deferred.exceptionHook( e, + process.stackTrace ); + } + + // Support: Promises/A+ section 2.3.3.3.4.1 + // https://promisesaplus.com/#point-61 + // Ignore post-resolution exceptions + if ( depth + 1 >= maxDepth ) { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Thrower ) { + that = undefined; + args = [ e ]; + } + + deferred.rejectWith( that, args ); + } + } + }; + + // Support: Promises/A+ section 2.3.3.3.1 + // https://promisesaplus.com/#point-57 + // Re-resolve promises immediately to dodge false rejection from + // subsequent errors + if ( depth ) { + process(); + } else { + + // Call an optional hook to record the stack, in case of exception + // since it's otherwise lost when execution goes async + if ( jQuery.Deferred.getStackHook ) { + process.stackTrace = jQuery.Deferred.getStackHook(); + } + window.setTimeout( process ); + } + }; + } + + return jQuery.Deferred( function( newDefer ) { + + // progress_handlers.add( ... ) + tuples[ 0 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onProgress ) ? + onProgress : + Identity, + newDefer.notifyWith + ) + ); + + // fulfilled_handlers.add( ... ) + tuples[ 1 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onFulfilled ) ? + onFulfilled : + Identity + ) + ); + + // rejected_handlers.add( ... ) + tuples[ 2 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onRejected ) ? + onRejected : + Thrower + ) + ); + } ).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 5 ]; + + // promise.progress = list.add + // promise.done = list.add + // promise.fail = list.add + promise[ tuple[ 1 ] ] = list.add; + + // Handle state + if ( stateString ) { + list.add( + function() { + + // state = "resolved" (i.e., fulfilled) + // state = "rejected" + state = stateString; + }, + + // rejected_callbacks.disable + // fulfilled_callbacks.disable + tuples[ 3 - i ][ 2 ].disable, + + // rejected_handlers.disable + // fulfilled_handlers.disable + tuples[ 3 - i ][ 3 ].disable, + + // progress_callbacks.lock + tuples[ 0 ][ 2 ].lock, + + // progress_handlers.lock + tuples[ 0 ][ 3 ].lock + ); + } + + // progress_handlers.fire + // fulfilled_handlers.fire + // rejected_handlers.fire + list.add( tuple[ 3 ].fire ); + + // deferred.notify = function() { deferred.notifyWith(...) } + // deferred.resolve = function() { deferred.resolveWith(...) } + // deferred.reject = function() { deferred.rejectWith(...) } + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); + return this; + }; + + // deferred.notifyWith = list.fireWith + // deferred.resolveWith = list.fireWith + // deferred.rejectWith = list.fireWith + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( singleValue ) { + var + + // count of uncompleted subordinates + remaining = arguments.length, + + // count of unprocessed arguments + i = remaining, + + // subordinate fulfillment data + resolveContexts = Array( i ), + resolveValues = slice.call( arguments ), + + // the primary Deferred + primary = jQuery.Deferred(), + + // subordinate callback factory + updateFunc = function( i ) { + return function( value ) { + resolveContexts[ i ] = this; + resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( !( --remaining ) ) { + primary.resolveWith( resolveContexts, resolveValues ); + } + }; + }; + + // Single- and empty arguments are adopted like Promise.resolve + if ( remaining <= 1 ) { + adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject, + !remaining ); + + // Use .then() to unwrap secondary thenables (cf. gh-3000) + if ( primary.state() === "pending" || + isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { + + return primary.then(); + } + } + + // Multiple arguments are aggregated like Promise.all array elements + while ( i-- ) { + adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject ); + } + + return primary.promise(); + } +} ); + + +// These usually indicate a programmer mistake during development, +// warn about them ASAP rather than swallowing them by default. +var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; + +jQuery.Deferred.exceptionHook = function( error, stack ) { + + // Support: IE 8 - 9 only + // Console exists when dev tools are open, which can happen at any time + if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { + window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); + } +}; + + + + +jQuery.readyException = function( error ) { + window.setTimeout( function() { + throw error; + } ); +}; + + + + +// The deferred used on DOM ready +var readyList = jQuery.Deferred(); + +jQuery.fn.ready = function( fn ) { + + readyList + .then( fn ) + + // Wrap jQuery.readyException in a function so that the lookup + // happens at the time of error handling instead of callback + // registration. + .catch( function( error ) { + jQuery.readyException( error ); + } ); + + return this; +}; + +jQuery.extend( { + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + } +} ); + +jQuery.ready.then = readyList.then; + +// The ready event handler and self cleanup method +function completed() { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + jQuery.ready(); +} + +// Catch cases where $(document).ready() is called +// after the browser event has already occurred. +// Support: IE <=9 - 10 only +// Older IE sometimes signals "interactive" too soon +if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + +} else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); +} + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( toType( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, _key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < len; i++ ) { + fn( + elems[ i ], key, raw ? + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } + + if ( chainable ) { + return elems; + } + + // Gets + if ( bulk ) { + return fn.call( elems ); + } + + return len ? fn( elems[ 0 ], key ) : emptyGet; +}; + + +// Matches dashed string for camelizing +var rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g; + +// Used by camelCase as callback to replace() +function fcamelCase( _all, letter ) { + return letter.toUpperCase(); +} + +// Convert dashed to camelCase; used by the css and data modules +// Support: IE <=9 - 11, Edge 12 - 15 +// Microsoft forgot to hump their vendor prefix (#9572) +function camelCase( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); +} +var acceptData = function( owner ) { + + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + + + +function Data() { + this.expando = jQuery.expando + Data.uid++; +} + +Data.uid = 1; + +Data.prototype = { + + cache: function( owner ) { + + // Check if the owner object already has a cache + var value = owner[ this.expando ]; + + // If not, create one + if ( !value ) { + value = {}; + + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return an empty object. + if ( acceptData( owner ) ) { + + // If it is a node unlikely to be stringify-ed or looped over + // use plain assignment + if ( owner.nodeType ) { + owner[ this.expando ] = value; + + // Otherwise secure it in a non-enumerable property + // configurable must be true to allow the property to be + // deleted when data is removed + } else { + Object.defineProperty( owner, this.expando, { + value: value, + configurable: true + } ); + } + } + } + + return value; + }, + set: function( owner, data, value ) { + var prop, + cache = this.cache( owner ); + + // Handle: [ owner, key, value ] args + // Always use camelCase key (gh-2257) + if ( typeof data === "string" ) { + cache[ camelCase( data ) ] = value; + + // Handle: [ owner, { properties } ] args + } else { + + // Copy the properties one-by-one to the cache object + for ( prop in data ) { + cache[ camelCase( prop ) ] = data[ prop ]; + } + } + return cache; + }, + get: function( owner, key ) { + return key === undefined ? + this.cache( owner ) : + + // Always use camelCase key (gh-2257) + owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; + }, + access: function( owner, key, value ) { + + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ( ( key && typeof key === "string" ) && value === undefined ) ) { + + return this.get( owner, key ); + } + + // When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, + cache = owner[ this.expando ]; + + if ( cache === undefined ) { + return; + } + + if ( key !== undefined ) { + + // Support array or space separated string of keys + if ( Array.isArray( key ) ) { + + // If key is an array of keys... + // We always set camelCase keys, so remove that. + key = key.map( camelCase ); + } else { + key = camelCase( key ); + + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + key = key in cache ? + [ key ] : + ( key.match( rnothtmlwhite ) || [] ); + } + + i = key.length; + + while ( i-- ) { + delete cache[ key[ i ] ]; + } + } + + // Remove the expando if there's no more data + if ( key === undefined || jQuery.isEmptyObject( cache ) ) { + + // Support: Chrome <=35 - 45 + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) + if ( owner.nodeType ) { + owner[ this.expando ] = undefined; + } else { + delete owner[ this.expando ]; + } + } + }, + hasData: function( owner ) { + var cache = owner[ this.expando ]; + return cache !== undefined && !jQuery.isEmptyObject( cache ); + } +}; +var dataPriv = new Data(); + +var dataUser = new Data(); + + + +// Implementation Summary +// +// 1. Enforce API surface and semantic compatibility with 1.9.x branch +// 2. Improve the module's maintainability by reducing the storage +// paths to a single mechanism. +// 3. Use the same single mechanism to support "private" and "user" data. +// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 5. Avoid exposing implementation details on user objects (eg. expando properties) +// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /[A-Z]/g; + +function getData( data ) { + if ( data === "true" ) { + return true; + } + + if ( data === "false" ) { + return false; + } + + if ( data === "null" ) { + return null; + } + + // Only convert to a number if it doesn't change the string + if ( data === +data + "" ) { + return +data; + } + + if ( rbrace.test( data ) ) { + return JSON.parse( data ); + } + + return data; +} + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = getData( data ); + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + dataUser.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend( { + hasData: function( elem ) { + return dataUser.hasData( elem ) || dataPriv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return dataUser.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + dataUser.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to dataPriv methods, these can be deprecated. + _data: function( elem, name, data ) { + return dataPriv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + dataPriv.remove( elem, name ); + } +} ); + +jQuery.fn.extend( { + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = dataUser.get( elem ); + + if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE 11 only + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + dataPriv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each( function() { + dataUser.set( this, key ); + } ); + } + + return access( this, function( value ) { + var data; + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + + // Attempt to get data from the cache + // The key will always be camelCased in Data + data = dataUser.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, key ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each( function() { + + // We always store the camelCased key + dataUser.set( this, key, value ); + } ); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each( function() { + dataUser.remove( this, key ); + } ); + } +} ); + + +jQuery.extend( { + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = dataPriv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || Array.isArray( data ) ) { + queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // Clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // Not public - generate a queueHooks object, or return the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + dataPriv.remove( elem, [ type + "queue", key ] ); + } ) + } ); + } +} ); + +jQuery.fn.extend( { + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[ 0 ], type ); + } + + return data === undefined ? + this : + this.each( function() { + var queue = jQuery.queue( this, type, data ); + + // Ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + } ); + }, + dequeue: function( type ) { + return this.each( function() { + jQuery.dequeue( this, type ); + } ); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +} ); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var documentElement = document.documentElement; + + + + var isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ); + }, + composed = { composed: true }; + + // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only + // Check attachment across shadow DOM boundaries when possible (gh-3504) + // Support: iOS 10.0-10.2 only + // Early iOS 10 versions support `attachShadow` but not `getRootNode`, + // leading to errors. We need to check for `getRootNode`. + if ( documentElement.getRootNode ) { + isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ) || + elem.getRootNode( composed ) === elem.ownerDocument; + }; + } +var isHiddenWithinTree = function( elem, el ) { + + // isHiddenWithinTree might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + + // Inline style trumps all + return elem.style.display === "none" || + elem.style.display === "" && + + // Otherwise, check computed style + // Support: Firefox <=43 - 45 + // Disconnected elements can have computed display: none, so first confirm that elem is + // in the document. + isAttached( elem ) && + + jQuery.css( elem, "display" ) === "none"; + }; + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, scale, + maxIterations = 20, + currentValue = tween ? + function() { + return tween.cur(); + } : + function() { + return jQuery.css( elem, prop, "" ); + }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = elem.nodeType && + ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Support: Firefox <=54 + // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) + initial = initial / 2; + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + while ( maxIterations-- ) { + + // Evaluate and update our best guess (doubling guesses that zero out). + // Finish if the scale equals or crosses 1 (making the old*new product non-positive). + jQuery.style( elem, prop, initialInUnit + unit ); + if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { + maxIterations = 0; + } + initialInUnit = initialInUnit / scale; + + } + + initialInUnit = initialInUnit * 2; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +var defaultDisplayMap = {}; + +function getDefaultDisplay( elem ) { + var temp, + doc = elem.ownerDocument, + nodeName = elem.nodeName, + display = defaultDisplayMap[ nodeName ]; + + if ( display ) { + return display; + } + + temp = doc.body.appendChild( doc.createElement( nodeName ) ); + display = jQuery.css( temp, "display" ); + + temp.parentNode.removeChild( temp ); + + if ( display === "none" ) { + display = "block"; + } + defaultDisplayMap[ nodeName ] = display; + + return display; +} + +function showHide( elements, show ) { + var display, elem, + values = [], + index = 0, + length = elements.length; + + // Determine new display value for elements that need to change + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + display = elem.style.display; + if ( show ) { + + // Since we force visibility upon cascade-hidden elements, an immediate (and slow) + // check is required in this first loop unless we have a nonempty display value (either + // inline or about-to-be-restored) + if ( display === "none" ) { + values[ index ] = dataPriv.get( elem, "display" ) || null; + if ( !values[ index ] ) { + elem.style.display = ""; + } + } + if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { + values[ index ] = getDefaultDisplay( elem ); + } + } else { + if ( display !== "none" ) { + values[ index ] = "none"; + + // Remember what we're overwriting + dataPriv.set( elem, "display", display ); + } + } + } + + // Set the display of the elements in a second loop to avoid constant reflow + for ( index = 0; index < length; index++ ) { + if ( values[ index ] != null ) { + elements[ index ].style.display = values[ index ]; + } + } + + return elements; +} + +jQuery.fn.extend( { + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each( function() { + if ( isHiddenWithinTree( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + } ); + } +} ); +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); + +var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); + + + +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + + // Support: IE <=9 only + // IE <=9 replaces "; + support.option = !!div.lastChild; +} )(); + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + + // XHTML parsers do not magically insert elements in the + // same way that tag soup parsers do. So we cannot shorten + // this by omitting or other required elements. + thead: [ 1, "", "
    " ], + col: [ 2, "", "
    " ], + tr: [ 2, "", "
    " ], + td: [ 3, "", "
    " ], + + _default: [ 0, "", "" ] +}; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// Support: IE <=9 only +if ( !support.option ) { + wrapMap.optgroup = wrapMap.option = [ 1, "" ]; +} + + +function getAll( context, tag ) { + + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (#15151) + var ret; + + if ( typeof context.getElementsByTagName !== "undefined" ) { + ret = context.getElementsByTagName( tag || "*" ); + + } else if ( typeof context.querySelectorAll !== "undefined" ) { + ret = context.querySelectorAll( tag || "*" ); + + } else { + ret = []; + } + + if ( tag === undefined || tag && nodeName( context, tag ) ) { + return jQuery.merge( [ context ], ret ); + } + + return ret; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/; + +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, attached, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( toType( elem ) === "object" ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + continue; + } + + attached = isAttached( elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( attached ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; +} + + +var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE <=9 - 11+ +// focus() and blur() are asynchronous, except when they are no-op. +// So expect focus to be synchronous when the element is already active, +// and blur to be synchronous when the element is not already active. +// (focus and blur are always synchronous in other supported browsers, +// this just defines when we can count on it). +function expectSync( elem, type ) { + return ( elem === safeActiveElement() ) === ( type === "focus" ); +} + +// Support: IE <=9 only +// Accessing document.activeElement can throw unexpectedly +// https://bugs.jquery.com/ticket/13393 +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.get( elem ); + + // Only attach events to objects that accept data + if ( !acceptData( elem ) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if ( selector ) { + jQuery.find.matchesSelector( documentElement, selector ); + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = Object.create( null ); + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove data and the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + dataPriv.remove( elem, "handle events" ); + } + }, + + dispatch: function( nativeEvent ) { + + var i, j, ret, matched, handleObj, handlerQueue, + args = new Array( arguments.length ), + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( nativeEvent ), + + handlers = ( + dataPriv.get( this, "events" ) || Object.create( null ) + )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + + for ( i = 1; i < arguments.length; i++ ) { + args[ i ] = arguments[ i ]; + } + + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // If the event is namespaced, then each handler is only invoked if it is + // specially universal or its namespaces are a superset of the event's. + if ( !event.rnamespace || handleObj.namespace === false || + event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, handleObj, sel, matchedHandlers, matchedSelectors, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + if ( delegateCount && + + // Support: IE <=9 + // Black-hole SVG instance trees (trac-13180) + cur.nodeType && + + // Support: Firefox <=42 + // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) + // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click + // Support: IE 11 only + // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) + !( event.type === "click" && event.button >= 1 ) ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { + matchedHandlers = []; + matchedSelectors = {}; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matchedSelectors[ sel ] === undefined ) { + matchedSelectors[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matchedSelectors[ sel ] ) { + matchedHandlers.push( handleObj ); + } + } + if ( matchedHandlers.length ) { + handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + cur = this; + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + addProp: function( name, hook ) { + Object.defineProperty( jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, + + get: isFunction( hook ) ? + function() { + if ( this.originalEvent ) { + return hook( this.originalEvent ); + } + } : + function() { + if ( this.originalEvent ) { + return this.originalEvent[ name ]; + } + }, + + set: function( value ) { + Object.defineProperty( this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + } ); + } + } ); + }, + + fix: function( originalEvent ) { + return originalEvent[ jQuery.expando ] ? + originalEvent : + new jQuery.Event( originalEvent ); + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + click: { + + // Utilize native event to ensure correct state for checkable inputs + setup: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Claim the first handler + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + // dataPriv.set( el, "click", ... ) + leverageNative( el, "click", returnTrue ); + } + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Force setup before triggering a click + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + leverageNative( el, "click" ); + } + + // Return non-false to allow normal event-path propagation + return true; + }, + + // For cross-browser consistency, suppress native .click() on links + // Also prevent it if we're currently inside a leveraged native-event stack + _default: function( event ) { + var target = event.target; + return rcheckableType.test( target.type ) && + target.click && nodeName( target, "input" ) && + dataPriv.get( target, "click" ) || + nodeName( target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + } +}; + +// Ensure the presence of an event listener that handles manually-triggered +// synthetic events by interrupting progress until reinvoked in response to +// *native* events that it fires directly, ensuring that state changes have +// already occurred before other listeners are invoked. +function leverageNative( el, type, expectSync ) { + + // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add + if ( !expectSync ) { + if ( dataPriv.get( el, type ) === undefined ) { + jQuery.event.add( el, type, returnTrue ); + } + return; + } + + // Register the controller as a special universal handler for all event namespaces + dataPriv.set( el, type, false ); + jQuery.event.add( el, type, { + namespace: false, + handler: function( event ) { + var notAsync, result, + saved = dataPriv.get( this, type ); + + if ( ( event.isTrigger & 1 ) && this[ type ] ) { + + // Interrupt processing of the outer synthetic .trigger()ed event + // Saved data should be false in such cases, but might be a leftover capture object + // from an async native handler (gh-4350) + if ( !saved.length ) { + + // Store arguments for use when handling the inner native event + // There will always be at least one argument (an event object), so this array + // will not be confused with a leftover capture object. + saved = slice.call( arguments ); + dataPriv.set( this, type, saved ); + + // Trigger the native event and capture its result + // Support: IE <=9 - 11+ + // focus() and blur() are asynchronous + notAsync = expectSync( this, type ); + this[ type ](); + result = dataPriv.get( this, type ); + if ( saved !== result || notAsync ) { + dataPriv.set( this, type, false ); + } else { + result = {}; + } + if ( saved !== result ) { + + // Cancel the outer synthetic event + event.stopImmediatePropagation(); + event.preventDefault(); + + // Support: Chrome 86+ + // In Chrome, if an element having a focusout handler is blurred by + // clicking outside of it, it invokes the handler synchronously. If + // that handler calls `.remove()` on the element, the data is cleared, + // leaving `result` undefined. We need to guard against this. + return result && result.value; + } + + // If this is an inner synthetic event for an event with a bubbling surrogate + // (focus or blur), assume that the surrogate already propagated from triggering the + // native event and prevent that from happening again here. + // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the + // bubbling surrogate propagates *after* the non-bubbling base), but that seems + // less bad than duplication. + } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { + event.stopPropagation(); + } + + // If this is a native event triggered above, everything is now in order + // Fire an inner synthetic event with the original arguments + } else if ( saved.length ) { + + // ...and capture the result + dataPriv.set( this, type, { + value: jQuery.event.trigger( + + // Support: IE <=9 - 11+ + // Extend with the prototype to reset the above stopImmediatePropagation() + jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), + saved.slice( 1 ), + this + ) + } ); + + // Abort handling of the native event + event.stopImmediatePropagation(); + } + } + } ); +} + +jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } +}; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: Android <=2.3 only + src.returnValue === false ? + returnTrue : + returnFalse; + + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (#504, #13143) + this.target = ( src.target && src.target.nodeType === 3 ) ? + src.target.parentNode : + src.target; + + this.currentTarget = src.currentTarget; + this.relatedTarget = src.relatedTarget; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || Date.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + isSimulated: false, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && !this.isSimulated ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Includes all common event props including KeyEvent and MouseEvent specific props +jQuery.each( { + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + "char": true, + code: true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + which: true +}, jQuery.event.addProp ); + +jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { + jQuery.event.special[ type ] = { + + // Utilize native event if possible so blur/focus sequence is correct + setup: function() { + + // Claim the first handler + // dataPriv.set( this, "focus", ... ) + // dataPriv.set( this, "blur", ... ) + leverageNative( this, type, expectSync ); + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function() { + + // Force setup before trigger + leverageNative( this, type ); + + // Return non-false to allow normal event-path propagation + return true; + }, + + // Suppress native focus or blur as it's already being fired + // in leverageNative. + _default: function() { + return true; + }, + + delegateType: delegateType + }; +} ); + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + } +} ); + + +var + + // Support: IE <=10 - 11, Edge 12 - 13 only + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g; + +// Prefer a tbody over its parent table for containing new rows +function manipulationTarget( elem, content ) { + if ( nodeName( elem, "table" ) && + nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { + + return jQuery( elem ).children( "tbody" )[ 0 ] || elem; + } + + return elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { + elem.type = elem.type.slice( 5 ); + } else { + elem.removeAttribute( "type" ); + } + + return elem; +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.get( src ); + events = pdataOld.events; + + if ( events ) { + dataPriv.remove( dest, "handle events" ); + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + dataUser.set( dest, udataCur ); + } +} + +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = flat( args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + valueIsFunction = isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( valueIsFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( valueIsFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl && !node.noModule ) { + jQuery._evalUrl( node.src, { + nonce: node.nonce || node.getAttribute( "nonce" ) + }, doc ); + } + } else { + DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); + } + } + } + } + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && isAttached( node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html; + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = isAttached( elem ); + + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + cleanData: function( elems ) { + var data, elem, type, + special = jQuery.event.special, + i = 0; + + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; + } + if ( elem[ dataUser.expando ] ) { + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; + } + } + } + } +} ); + +jQuery.fn.extend( { + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each( function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + } ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); +var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); + +var getStyles = function( elem ) { + + // Support: IE <=11 only, Firefox <=30 (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; + } + + return view.getComputedStyle( elem ); + }; + +var swap = function( elem, options, callback ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.call( elem ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + + +var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); + + + +( function() { + + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests() { + + // This is a singleton, we need to execute it only once + if ( !div ) { + return; + } + + container.style.cssText = "position:absolute;left:-11111px;width:60px;" + + "margin-top:1px;padding:0;border:0"; + div.style.cssText = + "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + + "margin:auto;border:1px;padding:1px;" + + "width:60%;top:1%"; + documentElement.appendChild( container ).appendChild( div ); + + var divStyle = window.getComputedStyle( div ); + pixelPositionVal = divStyle.top !== "1%"; + + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; + + // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 + // Some styles come back with percentage values, even though they shouldn't + div.style.right = "60%"; + pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; + + // Support: IE 9 - 11 only + // Detect misreporting of content dimensions for box-sizing:border-box elements + boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; + + // Support: IE 9 only + // Detect overflow:scroll screwiness (gh-3699) + // Support: Chrome <=64 + // Don't get tricked when zoom affects offsetWidth (gh-4029) + div.style.position = "absolute"; + scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; + + documentElement.removeChild( container ); + + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null; + } + + function roundPixelMeasures( measure ) { + return Math.round( parseFloat( measure ) ); + } + + var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, + reliableTrDimensionsVal, reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (#8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + jQuery.extend( support, { + boxSizingReliable: function() { + computeStyleTests(); + return boxSizingReliableVal; + }, + pixelBoxStyles: function() { + computeStyleTests(); + return pixelBoxStylesVal; + }, + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; + }, + reliableMarginLeft: function() { + computeStyleTests(); + return reliableMarginLeftVal; + }, + scrollboxSize: function() { + computeStyleTests(); + return scrollboxSizeVal; + }, + + // Support: IE 9 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Behavior in IE 9 is more subtle than in newer versions & it passes + // some versions of this test; make sure not to make it pass there! + // + // Support: Firefox 70+ + // Only Firefox includes border widths + // in computed dimensions. (gh-4529) + reliableTrDimensions: function() { + var table, tr, trChild, trStyle; + if ( reliableTrDimensionsVal == null ) { + table = document.createElement( "table" ); + tr = document.createElement( "tr" ); + trChild = document.createElement( "div" ); + + table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; + tr.style.cssText = "border:1px solid"; + + // Support: Chrome 86+ + // Height set through cssText does not get applied. + // Computed height then comes back as 0. + tr.style.height = "1px"; + trChild.style.height = "9px"; + + // Support: Android 8 Chrome 86+ + // In our bodyBackground.html iframe, + // display for all div elements is set to "inline", + // which causes a problem only in Android 8 Chrome 86. + // Ensuring the div is display: block + // gets around this issue. + trChild.style.display = "block"; + + documentElement + .appendChild( table ) + .appendChild( tr ) + .appendChild( trChild ); + + trStyle = window.getComputedStyle( tr ); + reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) + + parseInt( trStyle.borderTopWidth, 10 ) + + parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight; + + documentElement.removeChild( table ); + } + return reliableTrDimensionsVal; + } + } ); +} )(); + + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + style = elem.style; + + computed = computed || getStyles( elem ); + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) + if ( computed ) { + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( ret === "" && !isAttached( elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret !== undefined ? + + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ret + "" : + ret; +} + + +function addGetHookIf( conditionFn, hookFn ) { + + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function() { + if ( conditionFn() ) { + + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get; + return; + } + + // Hook needed; redefine it so that the support test is not executed again. + return ( this.get = hookFn ).apply( this, arguments ); + } + }; +} + + +var cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style, + vendorProps = {}; + +// Return a vendor-prefixed property or undefined +function vendorPropName( name ) { + + // Check for vendor prefixed names + var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in emptyStyle ) { + return name; + } + } +} + +// Return a potentially-mapped jQuery.cssProps or vendor prefixed property +function finalPropName( name ) { + var final = jQuery.cssProps[ name ] || vendorProps[ name ]; + + if ( final ) { + return final; + } + if ( name in emptyStyle ) { + return name; + } + return vendorProps[ name ] = vendorPropName( name ) || name; +} + + +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rcustomProp = /^--/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }; + +function setPositiveNumber( _elem, value, subtract ) { + + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec( value ); + return matches ? + + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : + value; +} + +function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { + var i = dimension === "width" ? 1 : 0, + extra = 0, + delta = 0; + + // Adjustment may not be necessary + if ( box === ( isBorderBox ? "border" : "content" ) ) { + return 0; + } + + for ( ; i < 4; i += 2 ) { + + // Both box models exclude margin + if ( box === "margin" ) { + delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); + } + + // If we get here with a content-box, we're seeking "padding" or "border" or "margin" + if ( !isBorderBox ) { + + // Add padding + delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // For "border" or "margin", add border + if ( box !== "padding" ) { + delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + + // But still keep track of it otherwise + } else { + extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + + // If we get here with a border-box (content + padding + border), we're seeking "content" or + // "padding" or "margin" + } else { + + // For "content", subtract padding + if ( box === "content" ) { + delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // For "content" or "padding", subtract border + if ( box !== "margin" ) { + delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + // Account for positive content-box scroll gutter when requested by providing computedVal + if ( !isBorderBox && computedVal >= 0 ) { + + // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border + // Assuming integer scroll gutter, subtract the rest and round down + delta += Math.max( 0, Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + computedVal - + delta - + extra - + 0.5 + + // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter + // Use an explicit zero to avoid NaN (gh-3964) + ) ) || 0; + } + + return delta; +} + +function getWidthOrHeight( elem, dimension, extra ) { + + // Start with computed style + var styles = getStyles( elem ), + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). + // Fake content-box until we know it's needed to know the true value. + boxSizingNeeded = !support.boxSizingReliable() || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + valueIsBorderBox = isBorderBox, + + val = curCSS( elem, dimension, styles ), + offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); + + // Support: Firefox <=54 + // Return a confounding non-pixel value or feign ignorance, as appropriate. + if ( rnumnonpx.test( val ) ) { + if ( !extra ) { + return val; + } + val = "auto"; + } + + + // Support: IE 9 - 11 only + // Use offsetWidth/offsetHeight for when box sizing is unreliable. + // In those cases, the computed value can be trusted to be border-box. + if ( ( !support.boxSizingReliable() && isBorderBox || + + // Support: IE 10 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Interestingly, in some cases IE 9 doesn't suffer from this issue. + !support.reliableTrDimensions() && nodeName( elem, "tr" ) || + + // Fall back to offsetWidth/offsetHeight when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + val === "auto" || + + // Support: Android <=4.1 - 4.3 only + // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) + !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && + + // Make sure the element is visible & connected + elem.getClientRects().length ) { + + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // Where available, offsetWidth/offsetHeight approximate border box dimensions. + // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the + // retrieved value as a content box dimension. + valueIsBorderBox = offsetProp in elem; + if ( valueIsBorderBox ) { + val = elem[ offsetProp ]; + } + } + + // Normalize "" and auto + val = parseFloat( val ) || 0; + + // Adjust for the element's box model + return ( val + + boxModelAdjustment( + elem, + dimension, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles, + + // Provide the current computed size to request scroll gutter calculation (gh-3589) + val + ) + ) + "px"; +} + +jQuery.extend( { + + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "animationIterationCount": true, + "columnCount": true, + "fillOpacity": true, + "flexGrow": true, + "flexShrink": true, + "fontWeight": true, + "gridArea": true, + "gridColumn": true, + "gridColumnEnd": true, + "gridColumnStart": true, + "gridRow": true, + "gridRowEnd": true, + "gridRowStart": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: {}, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ), + style = elem.style; + + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Gets hook for the prefixed version, then unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // Convert "+=" or "-=" to relative numbers (#7345) + if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { + value = adjustCSS( elem, name, ret ); + + // Fixes bug #9237 + type = "number"; + } + + // Make sure that null and NaN values aren't set (#7116) + if ( value == null || value !== value ) { + return; + } + + // If a number was passed in, add the unit (except for certain CSS properties) + // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append + // "px" to a few hardcoded values. + if ( type === "number" && !isCustomProp ) { + value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); + } + + // background-* props affect original clone's values + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !( "set" in hooks ) || + ( value = hooks.set( elem, value, extra ) ) !== undefined ) { + + if ( isCustomProp ) { + style.setProperty( name, value ); + } else { + style[ name ] = value; + } + } + + } else { + + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && + ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { + + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ); + + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Try prefixed name followed by the unprefixed name + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + // Convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Make numeric if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || isFinite( num ) ? num || 0 : val; + } + + return val; + } +} ); + +jQuery.each( [ "height", "width" ], function( _i, dimension ) { + jQuery.cssHooks[ dimension ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + + // Support: Safari 8+ + // Table columns in Safari have non-zero offsetWidth & zero + // getBoundingClientRect().width unless display is changed. + // Support: IE <=11 only + // Running getBoundingClientRect on a disconnected node + // in IE throws an error. + ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, dimension, extra ); + } ) : + getWidthOrHeight( elem, dimension, extra ); + } + }, + + set: function( elem, value, extra ) { + var matches, + styles = getStyles( elem ), + + // Only read styles.position if the test has a chance to fail + // to avoid forcing a reflow. + scrollboxSizeBuggy = !support.scrollboxSize() && + styles.position === "absolute", + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) + boxSizingNeeded = scrollboxSizeBuggy || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + subtract = extra ? + boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ) : + 0; + + // Account for unreliable border-box dimensions by comparing offset* to computed and + // faking a content-box to get border and padding (gh-3699) + if ( isBorderBox && scrollboxSizeBuggy ) { + subtract -= Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + parseFloat( styles[ dimension ] ) - + boxModelAdjustment( elem, dimension, "border", false, styles ) - + 0.5 + ); + } + + // Convert to pixels if value adjustment is needed + if ( subtract && ( matches = rcssNum.exec( value ) ) && + ( matches[ 3 ] || "px" ) !== "px" ) { + + elem.style[ dimension ] = value; + value = jQuery.css( elem, dimension ); + } + + return setPositiveNumber( elem, value, subtract ); + } + }; +} ); + +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, + function( elem, computed ) { + if ( computed ) { + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; + } + } +); + +// These hooks are used by animate to expand properties +jQuery.each( { + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // Assumes a single number if not a string + parts = typeof value === "string" ? value.split( " " ) : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( prefix !== "margin" ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +} ); + +jQuery.fn.extend( { + css: function( name, value ) { + return access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; + + if ( Array.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + } +} ); + + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || jQuery.easing._default; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if ( tween.elem.nodeType !== 1 || + tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { + return tween.elem[ tween.prop ]; + } + + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. + result = jQuery.css( tween.elem, tween.prop, "" ); + + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.nodeType === 1 && ( + jQuery.cssHooks[ tween.prop ] || + tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 only +// Panic based approach to setting things on disconnected nodes +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p * Math.PI ) / 2; + }, + _default: "swing" +}; + +jQuery.fx = Tween.prototype.init; + +// Back compat <1.8 extension point +jQuery.fx.step = {}; + + + + +var + fxNow, inProgress, + rfxtypes = /^(?:toggle|show|hide)$/, + rrun = /queueHooks$/; + +function schedule() { + if ( inProgress ) { + if ( document.hidden === false && window.requestAnimationFrame ) { + window.requestAnimationFrame( schedule ); + } else { + window.setTimeout( schedule, jQuery.fx.interval ); + } + + jQuery.fx.tick(); + } +} + +// Animations created synchronously will run synchronously +function createFxNow() { + window.setTimeout( function() { + fxNow = undefined; + } ); + return ( fxNow = Date.now() ); +} + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + i = 0, + attrs = { height: type }; + + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right + includeWidth = includeWidth ? 1 : 0; + for ( ; i < 4; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { + + // We're done with this property + return tween; + } + } +} + +function defaultPrefilter( elem, props, opts ) { + var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, + isBox = "width" in props || "height" in props, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHiddenWithinTree( elem ), + dataShow = dataPriv.get( elem, "fxshow" ); + + // Queue-skipping animations hijack the fx hooks + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always( function() { + + // Ensure the complete handler is called before this completes + anim.always( function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + } ); + } ); + } + + // Detect show/hide animations + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.test( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { + hidden = true; + + // Ignore all other no-op show/hide data + } else { + continue; + } + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject( props ); + if ( !propTween && jQuery.isEmptyObject( orig ) ) { + return; + } + + // Restrict "overflow" and "display" styles during box animations + if ( isBox && elem.nodeType === 1 ) { + + // Support: IE <=9 - 11, Edge 12 - 15 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY and Edge just mirrors + // the overflowX value there. + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display; + if ( restoreDisplay == null ) { + restoreDisplay = dataPriv.get( elem, "display" ); + } + display = jQuery.css( elem, "display" ); + if ( display === "none" ) { + if ( restoreDisplay ) { + display = restoreDisplay; + } else { + + // Get nonempty value(s) by temporarily forcing visibility + showHide( [ elem ], true ); + restoreDisplay = elem.style.display || restoreDisplay; + display = jQuery.css( elem, "display" ); + showHide( [ elem ] ); + } + } + + // Animate inline elements as inline-block + if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { + if ( jQuery.css( elem, "float" ) === "none" ) { + + // Restore the original display value at the end of pure show/hide animations + if ( !propTween ) { + anim.done( function() { + style.display = restoreDisplay; + } ); + if ( restoreDisplay == null ) { + display = style.display; + restoreDisplay = display === "none" ? "" : display; + } + } + style.display = "inline-block"; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always( function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + } ); + } + + // Implement show/hide animations + propTween = false; + for ( prop in orig ) { + + // General show/hide setup for this element animation + if ( !propTween ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); + } + + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if ( toggle ) { + dataShow.hidden = !hidden; + } + + // Show elements before animating them + if ( hidden ) { + showHide( [ elem ], true ); + } + + /* eslint-disable no-loop-func */ + + anim.done( function() { + + /* eslint-enable no-loop-func */ + + // The final step of a "hide" animation is actually hiding the element + if ( !hidden ) { + showHide( [ elem ] ); + } + dataPriv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + } ); + } + + // Per-property setup + propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = propTween.start; + if ( hidden ) { + propTween.end = propTween.start; + propTween.start = 0; + } + } + } +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( Array.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = Animation.prefilters.length, + deferred = jQuery.Deferred().always( function() { + + // Don't match elem in the :animated selector + delete tick.elem; + } ), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + + // Support: Android 2.3 only + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ] ); + + // If there's more to do, yield + if ( percent < 1 && length ) { + return remaining; + } + + // If this was an empty animation, synthesize a final progress notification + if ( !length ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + } + + // Resolve the animation and report its conclusion + deferred.resolveWith( elem, [ animation ] ); + return false; + }, + animation = deferred.promise( { + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + + // If we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // Resolve when we played the last frame; otherwise, reject + if ( gotoEnd ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + } ), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length; index++ ) { + result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + if ( isFunction( result.stop ) ) { + jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = + result.stop.bind( result ); + } + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + // Attach callbacks from options + animation + .progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + } ) + ); + + return animation; +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweeners: { + "*": [ function( prop, value ) { + var tween = this.createTween( prop, value ); + adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); + return tween; + } ] + }, + + tweener: function( props, callback ) { + if ( isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.match( rnothtmlwhite ); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length; index++ ) { + prop = props[ index ]; + Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; + Animation.tweeners[ prop ].unshift( callback ); + } + }, + + prefilters: [ defaultPrefilter ], + + prefilter: function( callback, prepend ) { + if ( prepend ) { + Animation.prefilters.unshift( callback ); + } else { + Animation.prefilters.push( callback ); + } + } +} ); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !isFunction( easing ) && easing + }; + + // Go to the end state if fx are off + if ( jQuery.fx.off ) { + opt.duration = 0; + + } else { + if ( typeof opt.duration !== "number" ) { + if ( opt.duration in jQuery.fx.speeds ) { + opt.duration = jQuery.fx.speeds[ opt.duration ]; + + } else { + opt.duration = jQuery.fx.speeds._default; + } + } + } + + // Normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.fn.extend( { + fadeTo: function( speed, to, easing, callback ) { + + // Show any hidden elements after setting opacity to 0 + return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() + + // Animate to the value specified + .end().animate( { opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || dataPriv.get( this, "finish" ) ) { + anim.stop( true ); + } + }; + + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue ) { + this.queue( type || "fx", [] ); + } + + return this.each( function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = dataPriv.get( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && + ( type == null || timers[ index ].queue === type ) ) { + + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + } ); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each( function() { + var index, + data = dataPriv.get( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // Enable finishing flag on private data + data.finish = true; + + // Empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // Look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // Look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // Turn off finishing flag + delete data.finish; + } ); + } +} ); + +jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +} ); + +// Generate shortcuts for custom animations +jQuery.each( { + slideDown: genFx( "show" ), + slideUp: genFx( "hide" ), + slideToggle: genFx( "toggle" ), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +} ); + +jQuery.timers = []; +jQuery.fx.tick = function() { + var timer, + i = 0, + timers = jQuery.timers; + + fxNow = Date.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + + // Run the timer and safely remove it when done (allowing for external removal) + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + jQuery.timers.push( timer ); + jQuery.fx.start(); +}; + +jQuery.fx.interval = 13; +jQuery.fx.start = function() { + if ( inProgress ) { + return; + } + + inProgress = true; + schedule(); +}; + +jQuery.fx.stop = function() { + inProgress = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + + // Default speed + _default: 400 +}; + + +// Based off of the plugin by Clint Helfers, with permission. +// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ +jQuery.fn.delay = function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = window.setTimeout( next, time ); + hooks.stop = function() { + window.clearTimeout( timeout ); + }; + } ); +}; + + +( function() { + var input = document.createElement( "input" ), + select = document.createElement( "select" ), + opt = select.appendChild( document.createElement( "option" ) ); + + input.type = "checkbox"; + + // Support: Android <=4.3 only + // Default value for a checkbox should be "on" + support.checkOn = input.value !== ""; + + // Support: IE <=11 only + // Must access selectedIndex to make default options select + support.optSelected = opt.selected; + + // Support: IE <=11 only + // An input loses its value after becoming a radio + input = document.createElement( "input" ); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; +} )(); + + +var boolHook, + attrHandle = jQuery.expr.attrHandle; + +jQuery.fn.extend( { + attr: function( name, value ) { + return access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each( function() { + jQuery.removeAttr( this, name ); + } ); + } +} ); + +jQuery.extend( { + attr: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set attributes on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + // Attribute hooks are determined by the lowercase version + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + hooks = jQuery.attrHooks[ name.toLowerCase() ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); + } + + if ( value !== undefined ) { + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + } + + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + elem.setAttribute( name, value + "" ); + return value; + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !support.radioValue && value === "radio" && + nodeName( elem, "input" ) ) { + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + removeAttr: function( elem, value ) { + var name, + i = 0, + + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + attrNames = value && value.match( rnothtmlwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( ( name = attrNames[ i++ ] ) ) { + elem.removeAttribute( name ); + } + } + } +} ); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } +}; + +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { + var getter = attrHandle[ name ] || jQuery.find.attr; + + attrHandle[ name ] = function( elem, name, isXML ) { + var ret, handle, + lowercaseName = name.toLowerCase(); + + if ( !isXML ) { + + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[ lowercaseName ]; + attrHandle[ lowercaseName ] = ret; + ret = getter( elem, name, isXML ) != null ? + lowercaseName : + null; + attrHandle[ lowercaseName ] = handle; + } + return ret; + }; +} ); + + + + +var rfocusable = /^(?:input|select|textarea|button)$/i, + rclickable = /^(?:a|area)$/i; + +jQuery.fn.extend( { + prop: function( name, value ) { + return access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + return this.each( function() { + delete this[ jQuery.propFix[ name ] || name ]; + } ); + } +} ); + +jQuery.extend( { + prop: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set properties on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + return ( elem[ name ] = value ); + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + return elem[ name ]; + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + if ( tabindex ) { + return parseInt( tabindex, 10 ); + } + + if ( + rfocusable.test( elem.nodeName ) || + rclickable.test( elem.nodeName ) && + elem.href + ) { + return 0; + } + + return -1; + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + } +} ); + +// Support: IE <=11 only +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup +// eslint rule "no-unused-expressions" is disabled for this code +// since it considers such accessions noop +if ( !support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; + } + return null; + }, + set: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + }; +} + +jQuery.each( [ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +} ); + + + + + // Strip and collapse whitespace according to HTML spec + // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace + function stripAndCollapse( value ) { + var tokens = value.match( rnothtmlwhite ) || []; + return tokens.join( " " ); + } + + +function getClass( elem ) { + return elem.getAttribute && elem.getAttribute( "class" ) || ""; +} + +function classesToArray( value ) { + if ( Array.isArray( value ) ) { + return value; + } + if ( typeof value === "string" ) { + return value.match( rnothtmlwhite ) || []; + } + return []; +} + +jQuery.fn.extend( { + addClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( !arguments.length ) { + return this.attr( "class", "" ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) > -1 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isValidValue = type === "string" || Array.isArray( value ); + + if ( typeof stateVal === "boolean" && isValidValue ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( isFunction( value ) ) { + return this.each( function( i ) { + jQuery( this ).toggleClass( + value.call( this, i, getClass( this ), stateVal ), + stateVal + ); + } ); + } + + return this.each( function() { + var className, i, self, classNames; + + if ( isValidValue ) { + + // Toggle individual class names + i = 0; + self = jQuery( this ); + classNames = classesToArray( value ); + + while ( ( className = classNames[ i++ ] ) ) { + + // Check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( value === undefined || type === "boolean" ) { + className = getClass( this ); + if ( className ) { + + // Store className if set + dataPriv.set( this, "__className__", className ); + } + + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if ( this.setAttribute ) { + this.setAttribute( "class", + className || value === false ? + "" : + dataPriv.get( this, "__className__" ) || "" + ); + } + } + } ); + }, + + hasClass: function( selector ) { + var className, elem, + i = 0; + + className = " " + selector + " "; + while ( ( elem = this[ i++ ] ) ) { + if ( elem.nodeType === 1 && + ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { + return true; + } + } + + return false; + } +} ); + + + + +var rreturn = /\r/g; + +jQuery.fn.extend( { + val: function( value ) { + var hooks, ret, valueIsFunction, + elem = this[ 0 ]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || + jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && + "get" in hooks && + ( ret = hooks.get( elem, "value" ) ) !== undefined + ) { + return ret; + } + + ret = elem.value; + + // Handle most common string cases + if ( typeof ret === "string" ) { + return ret.replace( rreturn, "" ); + } + + // Handle cases where value is null/undef or number + return ret == null ? "" : ret; + } + + return; + } + + valueIsFunction = isFunction( value ); + + return this.each( function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( valueIsFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + + } else if ( typeof val === "number" ) { + val += ""; + + } else if ( Array.isArray( val ) ) { + val = jQuery.map( val, function( value ) { + return value == null ? "" : value + ""; + } ); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + } ); + } +} ); + +jQuery.extend( { + valHooks: { + option: { + get: function( elem ) { + + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + + // Support: IE <=10 - 11 only + // option.text throws exceptions (#14686, #14858) + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + stripAndCollapse( jQuery.text( elem ) ); + } + }, + select: { + get: function( elem ) { + var value, option, i, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one", + values = one ? null : [], + max = one ? index + 1 : options.length; + + if ( index < 0 ) { + i = max; + + } else { + i = one ? index : 0; + } + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + + // Don't return options that are disabled or in a disabled optgroup + !option.disabled && + ( !option.parentNode.disabled || + !nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + + /* eslint-disable no-cond-assign */ + + if ( option.selected = + jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 + ) { + optionSet = true; + } + + /* eslint-enable no-cond-assign */ + } + + // Force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + } +} ); + +// Radios and checkboxes getter/setter +jQuery.each( [ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( Array.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); + } + } + }; + if ( !support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + return elem.getAttribute( "value" ) === null ? "on" : elem.value; + }; + } +} ); + + + + +// Return jQuery for attributes-only inclusion + + +support.focusin = "onfocusin" in window; + + +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + stopPropagationCallback = function( e ) { + e.stopPropagation(); + }; + +jQuery.extend( jQuery.event, { + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = lastElement = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + lastElement = cur; + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] && + dataPriv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( ( !special._default || + special._default.apply( eventPath.pop(), data ) === false ) && + acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + + if ( event.isPropagationStopped() ) { + lastElement.addEventListener( type, stopPropagationCallback ); + } + + elem[ type ](); + + if ( event.isPropagationStopped() ) { + lastElement.removeEventListener( type, stopPropagationCallback ); + } + + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + } + ); + + jQuery.event.trigger( e, null, elem ); + } + +} ); + +jQuery.fn.extend( { + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +// Support: Firefox <=44 +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + + // Handle: regular nodes (via `this.ownerDocument`), window + // (via `this.document`) & document (via `this`). + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + dataPriv.remove( doc, fix ); + + } else { + dataPriv.access( doc, fix, attaches ); + } + } + }; + } ); +} +var location = window.location; + +var nonce = { guid: Date.now() }; + +var rquery = ( /\?/ ); + + + +// Cross-browser xml parsing +jQuery.parseXML = function( data ) { + var xml, parserErrorElem; + if ( !data || typeof data !== "string" ) { + return null; + } + + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. + try { + xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); + } catch ( e ) {} + + parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; + if ( !xml || parserErrorElem ) { + jQuery.error( "Invalid XML: " + ( + parserErrorElem ? + jQuery.map( parserErrorElem.childNodes, function( el ) { + return el.textContent; + } ).join( "\n" ) : + data + ) ); + } + return xml; +}; + + +var + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( Array.isArray( obj ) ) { + + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", + v, + traditional, + add + ); + } + } ); + + } else if ( !traditional && toType( obj ) === "object" ) { + + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + + // Serialize scalar item. + add( prefix, obj ); + } +} + +// Serialize an array of form elements or a set of +// key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, valueOrFunction ) { + + // If value is a function, invoke it and use its return value + var value = isFunction( valueOrFunction ) ? + valueOrFunction() : + valueOrFunction; + + s[ s.length ] = encodeURIComponent( key ) + "=" + + encodeURIComponent( value == null ? "" : value ); + }; + + if ( a == null ) { + return ""; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + } ); + + } else { + + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ); +}; + +jQuery.fn.extend( { + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map( function() { + + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + } ).filter( function() { + var type = this.type; + + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !rcheckableType.test( type ) ); + } ).map( function( _i, elem ) { + var val = jQuery( this ).val(); + + if ( val == null ) { + return null; + } + + if ( Array.isArray( val ) ) { + return jQuery.map( val, function( val ) { + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ); + } + + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ).get(); + } +} ); + + +var + r20 = /%20/g, + rhash = /#.*$/, + rantiCache = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat( "*" ), + + // Anchor tag for parsing the document origin + originAnchor = document.createElement( "a" ); + +originAnchor.href = location.href; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; + + if ( isFunction( func ) ) { + + // For each dataType in the dataTypeExpression + while ( ( dataType = dataTypes[ i++ ] ) ) { + + // Prepend if requested + if ( dataType[ 0 ] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); + + // Otherwise append + } else { + ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if ( typeof dataTypeOrTransport === "string" && + !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + } ); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while ( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s.throws ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { + state: "parsererror", + error: conv ? e : "No conversion from " + prev + " to " + current + }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} + +jQuery.extend( { + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: location.href, + type: "GET", + isLocal: rlocalProtocol.test( location.protocol ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": JSON.parse, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var transport, + + // URL without anti-cache param + cacheURL, + + // Response headers + responseHeadersString, + responseHeaders, + + // timeout handle + timeoutTimer, + + // Url cleanup var + urlAnchor, + + // Request state (becomes false upon send and true upon completion) + completed, + + // To know if global events are to be dispatched + fireGlobals, + + // Loop variable + i, + + // uncached part of the url + uncached, + + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + + // Callbacks context + callbackContext = s.context || s, + + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && + ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + + // Status-dependent callbacks + statusCode = s.statusCode || {}, + + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + + // Default abort message + strAbort = "canceled", + + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( completed ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[ 1 ].toLowerCase() + " " ] = + ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) + .concat( match[ 2 ] ); + } + } + match = responseHeaders[ key.toLowerCase() + " " ]; + } + return match == null ? null : match.join( ", " ); + }, + + // Raw string + getAllResponseHeaders: function() { + return completed ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( completed == null ) { + name = requestHeadersNames[ name.toLowerCase() ] = + requestHeadersNames[ name.toLowerCase() ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( completed == null ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( completed ) { + + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } else { + + // Lazy-add the new callbacks in a way that preserves old ones + for ( code in map ) { + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ); + + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || location.href ) + "" ) + .replace( rprotocol, location.protocol + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; + + // A cross-domain request is in order when the origin doesn't match the current origin. + if ( s.crossDomain == null ) { + urlAnchor = document.createElement( "a" ); + + // Support: IE <=8 - 11, Edge 12 - 15 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url; + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href; + s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== + urlAnchor.protocol + "//" + urlAnchor.host; + } catch ( e ) { + + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true; + } + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( completed ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + fireGlobals = jQuery.event && s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + // Remove hash to simplify url manipulation + cacheURL = s.url.replace( rhash, "" ); + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // Remember the hash so we can put it back + uncached = s.url.slice( cacheURL.length ); + + // If data is available and should be processed, append data to url + if ( s.data && ( s.processData || typeof s.data === "string" ) ) { + cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; + + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add or update anti-cache param if needed + if ( s.cache === false ) { + cacheURL = cacheURL.replace( rantiCache, "$1" ); + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + + uncached; + } + + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached; + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? + s.accepts[ s.dataTypes[ 0 ] ] + + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && + ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { + + // Abort if not done already and return + return jqXHR.abort(); + } + + // Aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + + // If request was aborted inside ajaxSend, stop there + if ( completed ) { + return jqXHR; + } + + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = window.setTimeout( function() { + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + completed = false; + transport.send( requestHeaders, done ); + } catch ( e ) { + + // Rethrow post-completion exceptions + if ( completed ) { + throw e; + } + + // Propagate others as results + done( -1, e ); + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Ignore repeat invocations + if ( completed ) { + return; + } + + completed = true; + + // Clear timeout if it exists + if ( timeoutTimer ) { + window.clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Use a noop converter for missing script but not if jsonp + if ( !isSuccess && + jQuery.inArray( "script", s.dataTypes ) > -1 && + jQuery.inArray( "json", s.dataTypes ) < 0 ) { + s.converters[ "text script" ] = function() {}; + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader( "Last-Modified" ); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader( "etag" ); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + + // Extract error from statusText and normalize for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +} ); + +jQuery.each( [ "get", "post" ], function( _i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + + // Shift arguments if data argument was omitted + if ( isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + // The url can be an options object (which then must have .url) + return jQuery.ajax( jQuery.extend( { + url: url, + type: method, + dataType: type, + data: data, + success: callback + }, jQuery.isPlainObject( url ) && url ) ); + }; +} ); + +jQuery.ajaxPrefilter( function( s ) { + var i; + for ( i in s.headers ) { + if ( i.toLowerCase() === "content-type" ) { + s.contentType = s.headers[ i ] || ""; + } + } +} ); + + +jQuery._evalUrl = function( url, options, doc ) { + return jQuery.ajax( { + url: url, + + // Make this explicit, since user can override this through ajaxSetup (#11264) + type: "GET", + dataType: "script", + cache: true, + async: false, + global: false, + + // Only evaluate the response if it is successful (gh-4126) + // dataFilter is not invoked for failure responses, so using it instead + // of the default converter is kludgy but it works. + converters: { + "text script": function() {} + }, + dataFilter: function( response ) { + jQuery.globalEval( response, options, doc ); + } + } ); +}; + + +jQuery.fn.extend( { + wrapAll: function( html ) { + var wrap; + + if ( this[ 0 ] ) { + if ( isFunction( html ) ) { + html = html.call( this[ 0 ] ); + } + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map( function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + } ).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( isFunction( html ) ) { + return this.each( function( i ) { + jQuery( this ).wrapInner( html.call( this, i ) ); + } ); + } + + return this.each( function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + } ); + }, + + wrap: function( html ) { + var htmlIsFunction = isFunction( html ); + + return this.each( function( i ) { + jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); + } ); + }, + + unwrap: function( selector ) { + this.parent( selector ).not( "body" ).each( function() { + jQuery( this ).replaceWith( this.childNodes ); + } ); + return this; + } +} ); + + +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); +}; +jQuery.expr.pseudos.visible = function( elem ) { + return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); +}; + + + + +jQuery.ajaxSettings.xhr = function() { + try { + return new window.XMLHttpRequest(); + } catch ( e ) {} +}; + +var xhrSuccessStatus = { + + // File protocol always yields status code 0, assume 200 + 0: 200, + + // Support: IE <=9 only + // #1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, + xhrSupported = jQuery.ajaxSettings.xhr(); + +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +support.ajax = xhrSupported = !!xhrSupported; + +jQuery.ajaxTransport( function( options ) { + var callback, errorCallback; + + // Cross domain only allowed if supported through XMLHttpRequest + if ( support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, + xhr = options.xhr(); + + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ); + + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + + // Callback + callback = function( type ) { + return function() { + if ( callback ) { + callback = errorCallback = xhr.onload = + xhr.onerror = xhr.onabort = xhr.ontimeout = + xhr.onreadystatechange = null; + + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + + // Support: IE <=9 only + // On a manual native abort, IE9 throws + // errors on any property access that is not readyState + if ( typeof xhr.status !== "number" ) { + complete( 0, "error" ); + } else { + complete( + + // File: protocol always yields status 0; see #8605, #14207 + xhr.status, + xhr.statusText + ); + } + } else { + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + + // Support: IE <=9 only + // IE9 has no XHR2 but throws on binary (trac-11426) + // For XHR2 non-text, let the caller handle it (gh-2498) + ( xhr.responseType || "text" ) !== "text" || + typeof xhr.responseText !== "string" ? + { binary: xhr.response } : + { text: xhr.responseText }, + xhr.getAllResponseHeaders() + ); + } + } + }; + }; + + // Listen to events + xhr.onload = callback(); + errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); + + // Support: IE 9 only + // Use onreadystatechange to replace onabort + // to handle uncaught aborts + if ( xhr.onabort !== undefined ) { + xhr.onabort = errorCallback; + } else { + xhr.onreadystatechange = function() { + + // Check readyState before timeout as it changes + if ( xhr.readyState === 4 ) { + + // Allow onerror to be called first, + // but that will not handle a native abort + // Also, save errorCallback to a variable + // as xhr.onerror cannot be accessed + window.setTimeout( function() { + if ( callback ) { + errorCallback(); + } + } ); + } + }; + } + + // Create the abort callback + callback = callback( "abort" ); + + try { + + // Do send the request (this may raise an exception) + xhr.send( options.hasContent && options.data || null ); + } catch ( e ) { + + // #14683: Only rethrow if this hasn't been notified as an error yet + if ( callback ) { + throw e; + } + } + }, + + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +} ); + + + + +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) +jQuery.ajaxPrefilter( function( s ) { + if ( s.crossDomain ) { + s.contents.script = false; + } +} ); + +// Install script dataType +jQuery.ajaxSetup( { + accepts: { + script: "text/javascript, application/javascript, " + + "application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /\b(?:java|ecma)script\b/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +} ); + +// Handle cache's special case and crossDomain +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + } +} ); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function( s ) { + + // This transport only deals with cross domain or forced-by-attrs requests + if ( s.crossDomain || s.scriptAttrs ) { + var script, callback; + return { + send: function( _, complete ) { + script = jQuery( " + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    About this software

    +

    Clawpack stands for “Conservation Laws Package” and was initially developed +for linear and nonlinear hyperbolic systems of conservation laws, with a +focus on implementing high-resolution Godunov type methods using limiters in +a general framework applicable to many applications. These finite volume +methods require a “Riemann solver” to resolve the jump discontinuity at the +interface between two grid cells into waves propagating into the neighboring +cells. The formulation used in Clawpack allows easy extension to +the solution of hyperbolic problems that are not in conservation form.

    +

    See Wave-propagation algorithms for a brief description of the finite volume +methods used in Clawpack and Riemann solvers for a description of the +subroutine(s) needed to specify the hyperbolic equation being solved.

    +

    Adaptive mesh refinement is included, see AMRClaw Description and Detailed Contents, and routines +specialized to depth-averaged geophysical flows can be found in +GeoClaw Description and Detailed Contents.

    +

    The PyClaw software provides a more pythonic interface and +parallelism that scales to tens of thousands of cores.

    +

    New users may wish to read Which Clawpack solver should I use? before starting.

    +

    The “wave propagation” algorithms implemented in Clawpack are discribed in +detail in the book Finite Volume Methods for Hyperbolic Problems +[LeVeque-FVMHP]. +Virtually all of the figures in this book were generated using Clawpack +(version 4.3). +See Examples from the book FVMHP for a list of available examples with pointers to the codes +and resulting plots.

    +

    See the Bibliography for some pointers to papers describing Clawpack and +the algorithms used in more detail.

    +
    +

    License

    +

    Clawpack is distributed under the terms of the +Berkeley Software Distribution (BSD) license.

    +

    See License for details.

    +
    +
    +

    Authors

    +

    Many people have contributed to the development of Clawpack since its +inception in 1994.

    +

    Major algorithmic and software design contributions have been made by the +following individuals:

    +
      +
    • Randall J. LeVeque, University of Washington, +@rjleveque.

    • +
    • Marsha Berger, Courant Institute, NYU, +@mjberger.

    • +
    • Jan Olav Langseth, Norwegian Defence Research Establishment.

    • +
    • David George, USGS Cascades Volcano Observatory, +@dlgeorge.

    • +
    • David Ketcheson, KAUST +@ketch.

    • +
    • Kyle Mandli, UT-Austin, +@mandli.

    • +
    +

    Other major contributors include:

    + +

    Numerous students and other users have also contributed towards this software, +by finding bugs, suggesting improvements, and exploring its use on new +applications. Thank you!

    +
    +
    +

    Citing this work

    +

    If you use Clawpack in publications, please cite the software itself as +well, with a citation similar to the following:

    +
    Clawpack Development Team (2020), Clawpack Version 5.7.1,
    +http://www.clawpack.org, doi: 10.5281/zenodo.4025432
    +
    +
    +

    Here’s the bibtex:

    +
    @misc{clawpack,
    +    title={Clawpack software},
    +    author={{Clawpack Development Team}},
    +    url={http://www.clawpack.org},
    +    note={Version 5.7.1},
    +    doi={https://doi.org/10.5281/zenodo.4025432},
    +    year={2020}}
    +
    +
    +

    Please fill in the version number that you used, and its year, with the +appropriate DOI from Zenodo, if available. +See Releases of Clawpack and release notes.

    +

    It is best to refer to the particular release used to obtain your results, +but if you need to refer to multiple past releases, +or to cite Clawpack more generally, you can also use the DOI +10.17605/osf.io/kmw6h.

    +

    Also please cite the recent article:

    +
    Mandli, K.T., Ahmadia, A.J., Berger, M.J., Calhoun, D.A., George, D.L.,
    +Hadjimichael, Y., Ketcheson, D.I., Lemoine, G.I., LeVeque, R.J., 2016.
    +Clawpack: building an open source ecosystem for solving hyperbolic PDEs.
    +PeerJ Computer Science. doi:10.7717/peerj-cs.68
    +
    +
    +

    Here’s the bibtex:

    +
    @article{mandli2016clawpack,
    +    title={Clawpack: building an open source ecosystem for solving hyperbolic PDEs},
    +    author={Mandli, Kyle T and Ahmadia, Aron J and Berger, Marsha and Calhoun, Donna
    +    and George, David L and Hadjimichael, Yiannis and Ketcheson, David I
    +    and Lemoine, Grady I and LeVeque, Randall J},
    +    journal={PeerJ Computer Science},
    +    volume={2},
    +    pages={e68},
    +    year={2016},
    +    publisher={PeerJ Inc.},
    +    doi={10.7717/peerj-cs.68} }
    +
    +
    +

    Please also cite at least one of the following regarding the algorithms used +in Clawpack (click the links for bibtex citations):

    + +
    +
    +

    Funding

    +

    Development of this software has been supported in part by

    +
    +
      +
    • NSF Grants DMS-8657319, DMS-9204329, DMS-9303404, DMS-9505021, +DMS-96226645, DMS-9803442, DMS-0106511, CMS-0245206, DMS-0609661, +DMS-0914942, DMS-1216732, EAR-1331412, CMMI-1536198.

    • +
    • DOE Grants DE-FG06-93ER25181, DE-FG03-96ER25292, DE-FG02-88ER25053, +DE-FG02-92ER25139, DE-FG03-00ER2592, DE-FC02-01ER25474.

    • +
    • AFOSR grant F49620-94-0132.

    • +
    • NIH grant 5R01AR53652-2.

    • +
    • ONR grant N00014-09-1-0649.

    • +
    • The Norwegian Research Council (NFR) through the program no. 101039/420.

    • +
    • The Scientific Computing Division at the National Center for Atmospheric +Research (NCAR).

    • +
    • The Boeing Professorship and the Founders Term Professorship in the +Department of Applied Mathematics, University of Washington.

    • +
    • University of Washington CoMotion Fellowship.

    • +
    • Grants from King Abdullah University of Science and Technology (KAUST).

    • +
    • Contracts from Washington State Emergency Management Division, with +funding from the National Tsunami Hazard Mitigation Program.

    • +
    • Contracts from the NASA Asteroid Threat Assessment Project, Planetary +Defense Coordination Office.

    • +
    +
    +

    Any opinions, findings, and conclusions or recommendations expressed in this +material are those of the author(s) and do not necessarily reflect the views +of these agencies.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/adjoint.html b/v5.10.x/adjoint.html new file mode 100644 index 0000000000..8e12df6e1f --- /dev/null +++ b/v5.10.x/adjoint.html @@ -0,0 +1,350 @@ + + + + + + + + + Guiding AMR with adjoint flagging — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Guiding AMR with adjoint flagging

    +

    A new approach to flagging cells for refinement was introduced in Clawpack +5.6.0 – using the solution to an adjoint problem to determine what cells in +the forward solution should be refined because these cells may have an impact +on the some specified functional of interest. This approach currently only +works for autonomous linear problems, in which case the adjoint problem needs +to be solved only once, and shifted versions of the adjoint solution can be +used at any time that flagging is performed. The adjoint problem is solved +first and snapshots of the adjoint are saved. These are read in at the start +of the forward solution, and space-time interpolation used as needed at each +regridding time.

    +

    The general approach is described in:

    + +

    See Using adjoint flagging in GeoClaw for discussion of the GeoClaw version.

    +

    Adjoint flagging is appropriate when you are not interested in computing an +accurate solution over the entire space-time domain, but rather are +interested only in some linear functional applied to the solution at each +time (or at a single time, or range of times). +In one space dimension this functional has the form

    +
    +\[J(t) = \int_a^b \phi(x)^T q(x,t)\,dx\]
    +

    where \(a\leq x \leq b\) is the full computational domain and +\(\phi(x)\) is specified by the user as initial data for the +adjoint problem that is solved backward in time. For example, if the +solution is of interest only over a small range of \(x\) values, say +\(x_1 \leq x \leq x_2\), then \(\phi(x)\) +might be a box function with value 1 in this interval and 0 elsewhere, or +\(\phi(x)\) could be a sharply peaked Gaussian about one location of +interest.

    +

    In order to calculate an accurate solution near the location of interest at +the final time \(T\) it may be necessary to refine the solution at other +places at earlier times. The adjoint helps to identify where refinement is +needed. The adjoint equation is first solved backward in time from the final +time \(T\) with initial data \(\hat q(x,T) = \phi(x)\) given by the +functional. The waves propagating backward from time \(T\) to some +regridding time \(t_r\) in the adjoint solution identify which +waves in the forward solution at time \(t_r\) will reach the location of +interest at time \(T\).

    +

    Some examples for AMRClaw are available in

    +
      +
    • $CLAW/amrclaw/examples/acoustics_1d_adjoint

    • +
    • $CLAW/amrclaw/examples/acoustics_2d_adjoint

    • +
    +

    In each case the main directory has a subdirectory named adjoint +that contains the code that must be run first in order to compute and save +snapshots of the adjoint solution.

    +

    The adjoint/Makefile must point to an appropriate Riemann solver for the adjoint +problem, which is a linear hyperbolic PDE with coefficient matrices that are +transposes of the coefficient matrices appearing in the forward problem.

    +

    For variable-coefficient problems it is important to note that if the forward +problem is in conservation form then the adjoint is not, and vice versa. For +example, in one space dimension, if the forward problem is +\(q_t + A(x)q_x = 0\), then the adjoint is +\(\hat q_t + (A(x)^T \hat q)_x = 0\). On the other hand if the +forward problem is +\(q_t + (A(x)q)_x = 0\), then the adjoint is +\(\hat q_t + A(x)^T \hat q_x = 0\).

    +

    Note that the eigenvalues of \(A\) are unchanged upon transforming but +the left eigenvectors of \(A\) are now the right eigenvectors of +\(A^T\), and these must be used in the adjoint Riemann solver. +See for example $CLAW/riemann/src/rp1_acoustics_variable_adjoint.f90, used +for the example in $CLAW/amrclaw/examples/acoustics_1d_adjoint/adjoint.

    +

    Boundary conditions conditions may also need to be adjusted in going from the +forward to adjoint equation. The guiding principle is that boundary +conditions must vanish during the integration by parts that is used to define +the adjoint PDE, as described in more detail in the references.

    +

    The functional of interest is defined in the adjoint/qinit.f file that +specifies “initial” conditions for the adjoint problem.

    +

    The adjoint/setrun.py file specifies the final time \(T\) (as +clawdata.tfinal) and the output interval via clawdata.num_output_times, +as usual. You should specify \(T\) at least as large as the final time +of interest in the forward problem, and frequent enough snapshots that +interpolation between them is reasonable.

    +

    You should set

    +
    clawdata.output_format = 'binary'
    +
    +
    +

    so that output is in binary format, since the code that reads in these +snapshots in solving the forward problem assumes this format.

    +

    After solving the adjoint equation by running the code in the adjoint +subdirectory in the usual manner (e.g. make .output), the code in the main +directory can now be used to solve the forward problem, with the adjoint +snapshots used to guide AMR.

    +

    Starting in v5.6.0 a new attribute of clawutil.data.ClawRunData +is available named adjointdata. This ia an object of class +amrclaw.data.AdjointData and has several attribures that should be set. +For example, in $CLAW/amrclaw/examples/acoustics_1d_adjoint they are set +as follows:

    +
    #------------------------------------------------------------------
    +# Adjoint specific data:
    +#------------------------------------------------------------------
    +# Also need to set flagging method and appropriate tolerances above
    +
    +adjointdata = rundata.adjointdata
    +adjointdata.use_adjoint = True
    +
    +# location of adjoint solution, must first be created:
    +adjointdata.adjoint_outdir = os.path.abspath('adjoint/_output')
    +
    +# time period of interest:
    +adjointdata.t1 = rundata.clawdata.t0
    +adjointdata.t2 = rundata.clawdata.tfinal
    +
    +if adjointdata.use_adjoint:
    +    # need an additional aux variable for inner product:
    +    rundata.amrdata.aux_type.append('center')
    +    rundata.clawdata.num_aux = len(rundata.amrdata.aux_type)
    +    adjointdata.innerprod_index = len(rundata.amrdata.aux_type)
    +
    +
    +

    The times adjointdata.t1 and adjointdata.t2 determine the time interval +over which the functional is of interest, and adjointdata.adjoint_outdir +specifies where the adjoint snapshots are found.

    +

    The flagging method and tolerances are set using, e.g.:

    +
    # set tolerances appropriate for adjoint flagging:
    +
    +# Flag for refinement based on Richardson error estimater:
    +amrdata.flag_richardson = False
    +amrdata.flag_richardson_tol = 1e-5
    +
    +# Flag for refinement using routine flag2refine:
    +amrdata.flag2refine = True
    +amrdata.flag2refine_tol = 0.01
    +
    +
    +

    If amrdata.flag_richardson is True then we attempt to use estimates of +the one-step error generated by Richardson extrapolation together with the +adjoint to perform flagging. This is still experimental. (Describe in more +detail).

    +

    Otherwise it is +simply inner products of the forward and adjoint solutions that are computed +and a cell is flagged for refinement in cells where the magnitude of the +inner project is greater than amrdata.flag2refine_tol.

    +
    +

    Using adjoint flagging in GeoClaw

    +

    The references above contain tsunami modeling examples, as does the paper

    + +

    An example can be found in

    +
      +
    • $CLAW/geoclaw/examples/tsunami/chile2010_adjoint

    • +
    +

    Note that GeoClaw solves the nonlinear shallow water equations while the +adjoint as implemented in GeoClaw is only suitable for linear problems. To +date the adjoint has only been used to guide refinement for waves propagating +across the ocean as a way to identify which waves will reach a target +location of interest (possibly after multiple reflections). In the deep +ocean the tsunami amplitude is very small compared to the water depth and so +GeoClaw is essentially solving the linear shallow water equations, +linearized about the ocean at rest. Hence the adjoint problem is also solved +about the ocean at rest and the adjoint equations take essentially the same +form as the forward equations. The adjoint Riemann solver can be found in

    +
      +
    • $CLAW/riemann/src/rpn2_geoclaw_adjoint_qwave.f

    • +
    • $CLAW/riemann/src/rpt2_geoclaw_adjoint_qwave.f

    • +
    +

    Note that since in the forward problem the adjoint equation is solved using +a f-wave formulation, the adjoint problem is a variable-coefficient problem +in non-conservation form and is solved using the q-wave formulation in which +jumps in the the solution vector are split into eigenvectors, rather than +jumps in the flux. See the comments in the rpn2 solver for more details.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/amr_algorithm.html b/v5.10.x/amr_algorithm.html new file mode 100644 index 0000000000..0beb83aa0c --- /dev/null +++ b/v5.10.x/amr_algorithm.html @@ -0,0 +1,335 @@ + + + + + + + + + Adaptive mesh refinement (AMR) algorithms — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Adaptive mesh refinement (AMR) algorithms

    +

    The basic adaptive refinment strategy used in AMRClaw Description and Detailed Contents is +to refine on logically rectangular patches. A single Level 1 grid covers +the entire domain (usually — if it is too large it may be split into +multiple Level 1 grids). Some rectangular portions of this grid are covered +by Level 2 grids refined by some refinement factor R in each direction +(anisotropic refinement is now allowed too — see Specifying AMRClaw run-time parameters in setrun.py). +Regions of each Level 2 grid may be covered by Level 3 grids, that are +further refined (perhaps with a different refinement ratio). And so on.

    +

    For the hyperbolic solvers in Clawpack the time step is limited by the +Courant number (see Section cfl), and so if the spatial resolution is +refined by a factor of R in each direction then the time step will +generally have to be reduced by a factor R as well.

    +

    The AMR code thus proceeds as follows:

    +
    +
      +
    • In each time step on the Level 1 grid(s), the values in all grid cells +(including those covered by finer grids) are advanced one time step. +Before this time step is taken, ghost cells around the boundary of the +full computational domain are filled based on the boundary conditions +specified in the library routine bcNamr.f (where N is the number of +space dimensions). Check the Makefile of an application to see where +this file can be found.

    • +
    • After a step on the Level 1 grid, R time steps must be taken on each +Level 2 grid, where R denotes the desired refinement ratio in +time from Level 1 to Level 2.

      +

      For each of these time step, ghost cell +values must be filled in around all boundaries of each Level 2 grid. +This procedure is defined below in Ghost cells and boundary conditions for AMR.

      +
    • +
    • After taking R steps on Level 2 grids, values on the Level 1 grid are +updated to be consistent with the Level 2 grids. Any cell on Level 1 +that is covered by a Level 2 grid has its q value replaced by the +average of all the Level 2 grid cells lying within this cell. This gives +a cell average that should be a better approximation to the true cell +average than the original value.

    • +
    • The updating just described can lead to a change in the total mass +calculated on the Level 1 grid. In order to restore global conservation, +it is necessary to do a conservation fix up. (To be described…)

    • +
    +
    +

    This style of AMR is often called Berger-Oliger-Colella adaptive +refinement, after the papers of Berger and Oliger [BergerOliger84] and +[BergerColella89].

    +

    The Fortran code in $CLAW/amrclaw is based on code +originally written by Marsha Berger for gas dynamics, and merged in Clawpack +in the early days of Clawpack development by MJB and RJL. The algorithms +used in AMRClaw are described more fully in [BergerLeVeque98].

    +
    +

    Ghost cells and boundary conditions for AMR

    +

    Consider a Level k > 1 grid for which we need ghost cells all around the +boundary at the start of each time step on this level. The same procedure +is used at other levels.

    +
    +
      +
    • Some Level k grids will be adjacent to other Level k grids and so any +ghost cell that is equivalent to a Level k cell on some other grid has +values copied from this this grid.

    • +
    • Some ghost cells will be in the interior of the full computational domain +but in regions where there is no adjacent Level k grid. There will be +a Level k-1 grid covering that region, however. In this case the ghost +cells are obtained by space-time interpolation from values on the Level +k-1 grid.

    • +
    • Some ghost cells will lie outside the full computational domain, where +the boundary of the Level k grid lies along the boundary of the full +domain. For these cells the subroutine bcNamr +(where N is the number of space dimensions) is used to fill ghost cell +values with the proper user-specified boundary conditions, unless +periodic boundary conditions are specified (see below).

    • +
    +
    +

    For many standard boundary conditions it is not necessary for the user to do +anything beyond setting appropriate parameters in setrun.py (see +Specifying classic run-time parameters in setrun.py). Only if user-specified boundary conditions are +specified is it necessary to modify the library +routine bcNamr.f (after copying to your application directory so as not to +damage the library version, and modifying the Makefile to point to the new +version).

    +

    There some differences between the bcNamr.f routine and the bcN.f +routine used for the single-grid classic Clawpack routines (which are found in +$CLAW/classic/src/Nd/bcN.f). In particular, it is necessary to check +whether a ghost cell actually lies outside the full computational domain +and only set ghost cell values for those that do. It should be clear how to +do this from the library version of the routine.

    +

    If periodic boundary +conditions are specified, this is handled by the AMRClaw software along +with all internal boundaries, rather than in bcNamr.f. With AMR it is not +so easy to apply periodic boundary conditions as it is in the case of a +single grid, since it is necessary to determine whether there is a grid at +the same refinement level at the opposite side of the domain to copy ghost +cell values from, and if so which grid and what index corresponds to the +desired location.

    +
    +
    +

    Choosing and initializing finer grids

    +

    Every few time steps on the coarsest level it is generally necessary to +revise modify the regions of refinement at all levels, for example to follow +a propagating shock wave. This is done by

    +
    +
      +
    1. Flagging cells that need refinement according to some criteria.

    2. +
    3. Clustering the flagged cells into rectangular patches that will form the +new set of grids at the next higher level.

    4. +
    5. Creating the new grids and initializing the values of q and also any +aux arrays for each new grid.

    6. +
    +
    +

    Clustering is done using and algorithm developed by Berger and Rigoutsis +[BergerRigoutsis91] that finds a nonoverlapping set of rectangles that +cover all flagged points and balances the following conflicting goals:

    +
    +
      +
    • Cover as few points as possible that are not flagged, +to reduce the number of grid cells that must be advanced in each time +step.

    • +
    • Create as few new grids as possible, to minimize the overhead associated +with filling ghost cells and doing the conservation fix-up around edges +of grids.

    • +
    +
    +

    A parameter cutoff can be specified (see Specifying AMRClaw run-time parameters in setrun.py) to control +clustering. The algorithm will choose the grids in such a way that at least +this fraction of all the grid points in all the new grids will be in cells +that were flagged as needing refinement. Usually cutoff = 0.7 is used, so +at least 70% of all grid cells in a computation are in regions where they +are really needed.

    +

    Initializing the new grids at Level k+1 is done as follows:

    +
    +
      +
    • At points where there was already a Level k+1 grid present, this value is +copied over.

    • +
    • At points where there was not previously a Level k+1 grid, bilinear +interpolation is performed based on the Level k grids.

    • +
    +
    +
    +
    +

    Flagging cells for refinement

    +

    The user can control the criteria used for flagging cells for refinement.

    +

    See AMR refinement criteria for details.

    +
    +
    +

    For more details

    +

    See

    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/amrclaw.html b/v5.10.x/amrclaw.html new file mode 100644 index 0000000000..54130c1095 --- /dev/null +++ b/v5.10.x/amrclaw.html @@ -0,0 +1,267 @@ + + + + + + + + + AMRClaw Description and Detailed Contents — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    AMRClaw Description and Detailed Contents

    +

    The AMRClaw version of Clawpack provides Adaptive Mesh Refinement (AMR) +capabilities in 2 and 3 space dimensions. (The two-dimensional code can +also be used for 1-dimensional problems, see AMRClaw for 1d problems.)

    +

    See also:

    + +

    Block-structured AMR is implemented, in which rectangular patches of the +grid at level L are refined to level L+1. +See Specifying AMRClaw run-time parameters in setrun.py for a list of the input parameters that can be +specified to help control how refinement is done. +The general algorithms are described in [BergerLeVeque98].

    +

    See ClawPlotItem for a list of 2d plot types that can be used to +create a setplot function to control plotting of two-dimensional results. +Some of the attribute names start with the string amr_, indicating that a +list of different values can be specified for each AMR level. +See Plotting with Visclaw and Using setplot.py to specify the desired plots for more about plotting.

    +

    Python plotting tools for 3d are still under development. For now, the +Matlab tools from Clawpack 4.3 can still be used, see +Plotting using Matlab.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/amrclaw1d.html b/v5.10.x/amrclaw1d.html new file mode 100644 index 0000000000..1349756ac5 --- /dev/null +++ b/v5.10.x/amrclaw1d.html @@ -0,0 +1,204 @@ + + + + + + + + + AMRClaw for 1d problems — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    AMRClaw for 1d problems

    +

    New in Version 5.4.1

    +

    AMRClaw has been extended to support one-dimensional AMR directly.

    +

    The setrun.py file has the same form as for 2d AMRClaw, with the obvious +changes to eliminate the y-direction. See Sample setrun.py module for AMRClaw.

    +

    For some examples, see the 1d examples in $CLAW/amrclaw/examples/ and in +gallery_classic_amrclaw.

    +
    +

    Old approach, deprecated:

    +

    The two-dimensional code can also be used for 1-dimensional problems, by +setting num_cells[1] = 1 so there is only one cell in the y direction. +Also set refinement_ratios_y = [1,1,1, …] so that refinement is not done +in this direction.

    +

    In this case the code will automatically do sweeps only in the x-direction +and not attempt to solve any Riemann problems in the y-direction, or +transverse Riemann problems.

    +

    The output in the fort.q000N files will be suitable for plotting with the +one-dimensional Python plotting tools, e.g. these files will list the number +of cells in x but not in y.

    +

    This appears to still have bugs and is being worked on.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/amrclaw_doxygen.html b/v5.10.x/amrclaw_doxygen.html new file mode 100644 index 0000000000..63c7d7393d --- /dev/null +++ b/v5.10.x/amrclaw_doxygen.html @@ -0,0 +1,182 @@ + + + + + + + + + Doxygen documentation of AMRClaw — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Doxygen documentation of AMRClaw

    +

    Starting in Version 5.4.1, the Fortran files in AMRClaw have been modified so +that documentation can be generated using Doxygen.

    +

    The resulting documentation pages give a description of the parameters and +also show call graphs to help understand what other subroutines call a +subroutine or are called by it. For an example, see +filpatch.f90.

    +

    See the file list for +a list of the AMRClaw files.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/amrclaw_flowcharts.html b/v5.10.x/amrclaw_flowcharts.html new file mode 100644 index 0000000000..efb1e0d59b --- /dev/null +++ b/v5.10.x/amrclaw_flowcharts.html @@ -0,0 +1,187 @@ + + + + + + + + + AMRClaw Flowcharts — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    AMRClaw Flowcharts

    +

    Several flowcharts are available that give some idea of the structure of +AMRClaw.

    + +

    For those who want to get into the gory details, this might be useful:

    + +

    The left column shows the basic steps, with subsequent columns providing more +details.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/application_documentation.html b/v5.10.x/application_documentation.html new file mode 100644 index 0000000000..7ae7e9e55c --- /dev/null +++ b/v5.10.x/application_documentation.html @@ -0,0 +1,209 @@ + + + + + + + + + Application documentation — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Application documentation

    +
    +

    Converting README.rst to README.html

    +

    In Fortran versions of Clawpack-5, the main documentation page +for an application is often found +in a file named README.rst, which can be written using the markup language +reStructured Text. +This is the markup language used by Sphinx for +all of the Clawpack documentation.

    +

    The README.rst file can be coverted into a README.html file by doing:

    +
    python $CLAW/clawutil/src/python/clawutil/convert_readme.py
    +
    +
    +

    This is also automatically done by the command:

    +
    make .htmls
    +
    +
    +

    which also converts code files into html files for easy browsing. +A list of code files in the directory is automatically generated by +convert_readme.py and links inserted in README.html.

    +
    +
    +

    Converting code to html with clawcode2html

    +

    The Python script $CLAW/clawutil/src/python/clawutil/clawcode2html.py is +invoked by “make .htmls” (in applications directories having Makefiles).

    +

    This script does minor syntax highlighting by attempting to put comments in +blue and adds a header at the top.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/apps.html b/v5.10.x/apps.html new file mode 100644 index 0000000000..7bc7b9eac1 --- /dev/null +++ b/v5.10.x/apps.html @@ -0,0 +1,249 @@ + + + + + + + + + Clawpack Applications repository — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Clawpack Applications repository

    +

    More complex examples and applications are archived in the Github +clawpack/apps repository found at +https://github.com/clawpack/apps.

    +

    In particular, the directory apps/fvmbook contains many Examples from the book FVMHP.

    +

    The Clawpack Gallery +shows results/animations from some selected examples in the apps repository.

    +

    These examples are not included in the basic Clawpack installation. +Users interested in obtaining this collection of applications can either +clone the repository using git:

    +
    git clone https://github.com/clawpack/apps
    +
    +
    +

    or navigate to https://github.com/clawpack/apps +and click on the green “Code” button to see other options, such as downloading +a zip file.

    +
    +

    Jupyter Notebooks

    +

    The directory apps/notebooks contains a number of notebooks that illustrate +various aspects of Clawpack. Many of these are also visible in rendered html +form in the +Gallery of Notebooks.

    +
    +
    +

    Submodules

    +

    The apps repository contains several +git submodules +for collections of examples specific to some application. +This has the advantage that the submodules can be managed independent of the +main apps repository, perhaps by people who are not core Clawpack +developers. (Contact us if you have a repository of examples you would like +to see added.) +Also each submodule may be of limited interest, and could contain some large +files that not every Clawpack user wants to download.

    +

    For example, after cloning the apps repository you will see a subdirectory +for storm surge modeling examples using GeoClaw named +apps/surge-examples, which initially is an empty directory. The file +apps/.gitmodules shows that this is a submodule. +It also shows the url to the GitHub repository corresponding to this module +(where you could do a pull request, for example, if you find a bug).

    +

    If you want to add only the surge-examples, and not other submodules, +you can do:

    +
    git submodule update --init surge-examples
    +
    +
    +

    If you want to add all available submodules, leave off the submodule name:

    +
    git submodule update --init
    +
    +
    +

    The –init flag is not needed (but won’t hurt) if you are updating +a submodule that you have already initialized and cloned, e.g. if +the submodule maintainer has added new examples to it.

    +
    +
    +

    Examples included with Clawpack

    +

    Recall also that a few examples of how to use different flavors of +Clawpack are included in every distribution of Clawpack, in the directories

    +
      +
    • $CLAW/classic/examples

    • +
    • $CLAW/amrclaw/examples

    • +
    • $CLAW/geoclaw/examples

    • +
    • $CLAW/pyclaw/examples

    • +
    +

    These examples demonstrate some of the basic capabilities. +The plots resulting from running these examples should agree with those seen +in the Clawpack Gallery.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/aws.html b/v5.10.x/aws.html new file mode 100644 index 0000000000..720555d748 --- /dev/null +++ b/v5.10.x/aws.html @@ -0,0 +1,413 @@ + + + + + + + + + Amazon Web Services EC2 Clawpack AMI — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Amazon Web Services EC2 Clawpack AMI

    +
    +

    Warning

    +

    This has not been updated for Clawpack-5 yet, +but it should still work if you start up an instance as described below +and then install Clawpack-5 by following the +Installing Clawpack.

    +
    +

    To run Clawpack in the Cloud using Amazon Web Services Elastic Cloud +Computing (EC2), first sign up for an account. Note that +you can get 750 hours free micro instance usage +(which may be sufficient for many things) in the +free usage tier.

    +

    For general information and a guide to getting started:

    + +
    +

    Finding the Clawpack AMI

    +

    Once you have an AWS account, sign in to the +management console +and click on the +EC2 tab, and then select Region US East (which has cheaper rates) and click +on AMIs on the menu to the left.

    +

    Change Viewing: to All Images and All Platforms and then after it +has finished loading the database start typing +uwamath-clawpack in the search bar. You +should find at least one AMI, as shown in this screen shapshot:

    +_images/aws1.png +
    +
    +

    Launching an instance

    +

    Select the Clawpack image and then +click on the Launch button on this page to start launching an instance +based on this AMI. This means a virtual machine will be started for you, +initialized with this disk image (which is a Ubuntu linux distribution with +Clawpack and its dependencies).

    +

    This should give a popup page that looks like this:

    +_images/aws2.png +

    Here you can select what sort of instance you wish to start (larger +instances cost more per hour).

    +

    Click Continue on the next few screens and eventually you get to one that +looks like:

    +_images/aws3.png +

    If you don’t already have a key pair, create a new one and then +select this key pair here.

    +

    Click Continue and you will get a screen to set Security Groups. Select +the quick-start-1 option. On the next screen click Launch.

    +
    +
    +

    Logging on to your instance

    +

    Click Close on the next page to +go back to the Management Console. Click on Instances on the left menu +and you should see a list of instance you +have created, in your case only one. If the status is not yet running +then wait until it is (click on the Refresh button if necessary).

    +

    Click on the instance and information about it should appear at the bottom +of the screen. Scroll down until you find the Public DNS information, +highlighted on the screenshot below:

    +_images/aws4.png +

    Go into the directory where your key pair is stored, in a file with a name +like rjlkey.pem and you should be able to ssh into your instance using +the name of the public DNS, with format like:

    +
    $ ssh -i KEYPAIR-FILE  ubuntu@DNS
    +
    +
    +

    where KEYPAIR-FILE and DNS must be replaced by the appropriate +things, e.g. for the above example:

    +
    $ ssh -i rjlkey.pem ubuntu@ec2-50-19-75-229.compute-1.amazonaws.com
    +
    +
    +

    Note:

    +
      +
    • You must include -i keypair-file

    • +
    • You must log in as user ubuntu.

    • +
    +
    +
    +

    Using Clawpack

    +

    Once you have logged into your instance, you are on Ubuntu Linux that has +software needed for Clawpack pre-installed, including:

    +
      +
    • gfortran

    • +
    • Ipython, numpy, scipy, matplotlib

    • +
    • make

    • +
    • git

    • +
    • netcdf

    • +
    • apache web server

    • +
    +

    Other software is easily installed using apt-get install.

    +

    The current development version of Clawpack is installed in +/claw/clawpack-4.x. If you want to use this version, you might want to:

    +
    $ cd /claw/clawpack-4.x
    +$ git fetch origin   # bring over any recent changes
    +$ git merge origin/master  # merge them in
    +$ python python/make_libs.py  # compile libraries
    +
    +
    +

    The $CLAW variable is set to point to this version of Clawpack (in the +.bashrc file).

    +

    Of course you could instead download a tar file of Clawpack and install +following the instructions at Installing Clawpack. At any rate, see that +section for instructions on what to do next if you are new to Clawpack.

    +
    +

    Warning

    +

    If you want to use Clawpack-5, instead follow the +Installing Clawpack.

    +
    +
    +
    +

    Viewing plots of results

    +

    If you run Clawpack on your instance then you will probably want to view the +results. There are at least three possible approaches (see Plotting with Visclaw +for general information about plotting in Clawpack):

    +
      +
    • If you are on a computer that supports X windows and you +add the -X flag to your ssh command, then you should be able to +plot interactively (see Interactive plotting with Iplotclaw). +Response may be pretty slow, however.

    • +
    • If you create plots using

      +
      $ make .plots
      +
      +
      +

      then you will have a directory (named _plots by default) that contains +.png +figures and .html files for viewing them. You can tar this directory up +and transfer it to your local machine using sftp, and then view locally.

      +

      Note that the plot files are often much smaller than the Fortran +output files in _output, and so much quicker to transfer.

      +
    • +
    • You can view the plots directly using a web browser as explained in the +next section.

    • +
    +
    +
    +

    Viewing webpages directly from your instance

    +

    If you use

    +
    $ make .plots
    +
    +
    +

    to make a set of plot files and html files for viewing them, you can view +them directly by opening a web browser to an appropriate path on your +instance.

    +

    The apache webserver should already be running, but to allow people to view +webpages you will need to adjust the security settings. Go back to the +Management Console and click on Security Groups on the left menu. Select +quick-start-1 and then click on Inbound. You should see a list of ports +that only lists 22 (SSH). You want to add port 80 (HTTP). Select HTTP from +the drop-down menu that says Custom TCP Rule and type 80 for the Port +range. Then click Apply Rule Changes. This should give something like +the next screen shot:

    +_images/aws5.png +

    Now you should be able to point your browser to http://DNS where DNS is +replaced by the Public DNS name of your instance, the same as used for the +ssh command. So for the example above, this would be

    +
    `http://ec2-50-19-75-229.compute-1.amazonaws.com`.
    +
    +
    +

    You should see this page:

    +_images/aws6.png +

    The page being displayed can be found in /var/www/index.html on your +instance. Any files you want to be visible on the web should be in +/var/www, or it is sufficient to have a link from this directory to where +they are located (created with the ln -s command in linux).

    +

    So, for example, if you do the following:

    +
    $ cd /var/www
    +$ ln -s /claw/clawpack-4.x/apps ./apps
    +
    +
    +

    Then you should be able to see the apps directory in your web browser, +which would be at

    +
    http://ec2-50-19-75-229.compute-1.amazonaws.com/apps/
    +
    +
    +

    for the above example. You will have to replace the DNS with that of your +instance.

    +

    If you want to expose all of your home directory to the web:

    +
    $ cd /var/www
    +$ ln -s /home/ubuntu ./home
    +
    +
    +
    +
    +

    Transferring files to/from your instance

    +

    You can use scp to transfer files between a running instance and +the computer on which the ssh key is stored.

    +

    From your computer (not from the instance):

    +
    $ scp -i KEYPAIR-FILE FILE-TO-SEND ubuntu@DNS:REMOTE-DIRECTORY
    +
    +
    +

    where DNS is the public DNS of the instance and REMOTE-DIRECTORY is +the path (relative to home directory) +where you want the file to end up. You can leave off +:REMOTE-DIRECTORY if you want it to end up in your home directory.

    +

    Going the other way, you can download a file from your instance to +your own computer via:

    +
    $ scp -i KEYPAIR-FILE ubuntu@DNS:FILE-TO-GET .
    +
    +
    +

    to retrieve the file named FILE-TO-GET (which might include a path +relative to the home directory) into the current directory.

    +
    +
    +

    Stopping your instance

    +

    Once you are done computing for the day, you will probably want to stop your +instance so you won’t be charged while it’s sitting idle. You can do this +by selecting the instance from the Management Console / Instances, and then +select Stop from the Instance Actions menu.

    +

    You can restart it later and it will be in the same state you left it in. +But note that it will probably have a new Public DNS!

    +
    +
    +

    Creating your own AMI

    +

    If you add additional software and want to save a disk image of your +improved virtual machine (e.g. in order to launch additional images in the +future to run multiple jobs at once), simply click on Create Image (EBS +AMI) from the Instance Actions menu.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/b4run.html b/v5.10.x/b4run.html new file mode 100644 index 0000000000..76355eb2bb --- /dev/null +++ b/v5.10.x/b4run.html @@ -0,0 +1,198 @@ + + + + + + + + + b4run function — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    b4run function

    +

    When using the Fortran code, the command:

    +
    make output
    +
    +
    +

    invokes the runclaw function from +$CLAW/clawutil/src/python/clawutil/runclaw.py +to run the Fortran executable.

    +

    Starting in v5.7.1, this function has been modified to look for a Python b4run +function to be executed before running the Fortran code. This can be used, +for example, to:

    +
    +
      +
    • automate copying certain files into the _output directory +(e.g. you might want to keep the Makefile and setrun.py +that were used for the run along with the output),

    • +
    • generate a log file with more information about the run, e.g. +what time the run was started and what directory the input files came +from (the rundir).

    • +
    +
    +

    The file $CLAW/clawutil/src/python/clawutil/b4run.py +is a sample file showing the format it should have, and implements +the sample actions described above.

    +

    To search for a b4run.py file, the current rundir directory is +first checked and if there is no such file in this directory then +the environment variable B4RUN is checked, which can be set to +the full path of a b4run.py file that you wish to use globally, for example.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/b4step_defaults.html b/v5.10.x/b4step_defaults.html new file mode 100644 index 0000000000..e0bfa984fb --- /dev/null +++ b/v5.10.x/b4step_defaults.html @@ -0,0 +1,193 @@ + + + + + + + + + b4step default routines — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    b4step default routines

    +

    Below are linkes to the default b4step library routines for Classic and AMRClaw. +By default these do nothing. If you wish to specify aux arrays you will +need to copy one of these files to your application directory and modify it +as needed. Remember to change to Makefile to point to the proper version.

    + +

    (Note: these links are for the version checked in to the master branch. +You can select a different branch or tag from the GitHub page.)

    +
    +

    b4step routine in GeoClaw

    +

    In GeoClaw, there is a library routine that sets aux(1,i,j) to the cell +average of the bathymetry, aux(2,i,j) to the ratio of the true cell area +to dx*dy (the capacity function), and aux(3,i,j) to the length ratio of +the bottom edge to dx (The latter two quantities vary +with latitude when coordinate_system == 2).

    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/bc.html b/v5.10.x/bc.html new file mode 100644 index 0000000000..f5a175c8ff --- /dev/null +++ b/v5.10.x/bc.html @@ -0,0 +1,315 @@ + + + + + + + + + Boundary conditions — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Boundary conditions

    +

    Boundary conditions are imposed each time step by filling ghost cells +adjacent to the edge of each grid patch. See Chapter 4 of [LeVeque-FVMHP] +for more details.

    +

    Boundary conditions are set by the library routines:

    +
      +
    • $CLAW/classic/src/Nd/bcN.f for the classic code (N = 1, 2, 3).

    • +
    • $CLAW/amrclaw/src/Nd/bcNamr.f for the amrclaw code (N = 2, 3).

    • +
    +

    Several standard choices of boundary condition procedures are provided in +these routines, and can be +selected at each boundary by setting the input parameters bc_lower and +bc_upper in each dimension (see Specifying classic run-time parameters in setrun.py) to one of the following:

    +
      +
    • 1 or ‘extrap’ : extrapolation (non-reflecting outflow)

      +

      In this case values from the grid cell adjacent to the boundary +are copied into all ghost cells moving in the direction normal to +the boundary. This gives a fairly good approximation to a +non-reflecting or outgoing boundary condition that lets waves pass +out of the boundary without reflection, particularly in one space +dimension. In more than one direction this is not perfect for waves +that hit the boundary at an oblique angle.

      +
    • +
    • 2 or ‘periodic’ : periodic boundary conditions

      +

      In this case ghost cell values are set by copying from interior +cells at the opposite boundary so that periodic boundary conditions +are perfectly imposed. Normally periodic boundary conditions would +be imposed by setting this value for both bc_lower and bc_upper +in some dimension, but this is not required.

      +
    • +
    • 3 or ‘wall’ : solid wall boundary conditions are imposed +for systems where the second component of q is the x velocity +or momentum in one dimension (and where the third component +of q is also the y velocity/momentum in more dimensions, +etc.) This is true, for example, if the acoustics equations +are solved with components q = (p, u, v) or shallow water +equations with q = (h, hu, hv).

      +

      In this case the normal velocity/momentum at a wall is +reflected about the boundary (copied to a ghost cell from +the cell equally far from the boundary on the interior side) +while all other components are extrapolated.

      +

      Reflecting boundary conditions can also often be used on a line of +symmetry of a solution in order to reduce the computational domain +to be only half of the physical domain.

      +

      Note that this option does not work on a mapped grid… +Add pointer to modified version

      +
    • +
    +

    If none of the above boundary conditions are desired, the user can modify +the subroutine bcN so that setting the appropriate component of bc_lower +or bc_upper to 0 will execute code added by the user. In this case it is +best to put the modified version of bcN.f in the application directory and +modify the Makefile to point to the modified version. +See User-defined boundary conditions below.

    +
    +

    Boundary conditions for adaptive refinement

    +

    When AMR is used, any interior patch edges (not at a domain boundary) are +filled automatically each time step, either by copying from adjacent +patches at the same level or by interpolating (in both space and +time) from coarser levels if needed.

    +

    The user must still specify boundary conditions at the edges of the +computational domain. The same set of choices for standard boundary +conditions as described above are implemented in the library routine +bcNamr.f, and so specifying these boundary conditions requires no change +to setrun.py when going from Classic Clawpack to AMRClaw. However, if +special boundary conditions have been implemented in a custom version of +bcN.f then the same procedure for setting ghost cells will have to be +implemented in a custom version of bcNamr.f. This routine is slightly +more complicated than the single-grid Classic version, since one must always +check whether each ghost cell lies outside the computational domain (in +which case the custom boundary condition procedure must be applied) or lies +within the domain (in which case ghost cell values are automatically set by +the AMR code and the user bcNamr routine should leave these values +alone.

    +
    +
    +

    Boundary conditions for GeoClaw

    +

    For tsunami modeling or other geophysical flows over topography the +computational domain has artificial boundaries that are placed sufficiently +far from the region of interest that any flow or waves leaving the domain +can be ignored and there should be no incoming waves. Extrapolation +boundary conditions are then appropriate. If the ocean is truncated at some +point then these generally have been found to give very small spurious +reflection of outgoing tsunami waves. Extroplation boundary conditions can +also be used on dry land (where the depth h is zero).

    +

    In some cases reflecting boundary conditions might be more appropriate, +e.g. along the walls of a wave tank.

    +

    The library routine $CLAW/geoclaw/src/2d/shallow/bc2amr.f is modified from +the amrclaw version only by extrapolating the depth at the boundaries +into ghost cells.

    +
    +
    +

    Boundary conditions for clamshell grids on the sphere

    +

    In 2D AMRClaw and GeoClaw, an additional option is available for bc_lower +and bc_upper that is implemented in the library routines:

    +
      +
    • 4 or ‘sphere’ : sphere boundary conditions

      +

      Must set bc_lower[0:2] = bc_upper[0:2] = 4 (i.e. at all 4 boundaries)

      +

      These boundary conditions are similar to periodic boundary conditions, +but for the clamshell grid introduced in [CalhounHelzelLeVeque] +for solving problems on the sphere using a single logically rectangular +grid. This is best envisioned by folding a rectangular piece of paper +in half, gluing the edges together, and inflating to a sphere. See the +animations on the website for the original paper +See also [BergerCalhounHelzelLeVeque] for further examples.

      +
    • +
    +
    +
    +

    User-defined boundary conditions

    +

    If none of the boundary conditions described above is suitable at one or +more boundaries of the domain, then you will have to modify the library +routine to implement the desired boundary condition. +See Chapter 4 of [LeVeque-FVMHP] for hints on how to specify the ghost cell +values each time step.

    +

    Suppose you need to specify different boundary conditions at the boundary +xlower, for example. Then in setrun.py you should set +bc_lower[0] = 0 and modify the library boundary condition routine to +insert your desired boundary conditions at the point indicated in the code, +where it says:

    +
    c     # user-specified boundary conditions go here in place of error output
    +
    +
    +

    in the section marked left boundary. The details of how this is done +differ a bit between the classic and AMR codes and also depend on the number +of space dimensions. Examine the way other boundary conditions are +implemented and follow the model in your own code.

    +

    TODO: Give some hints on how things work in AMR code – must check which ghost +cells extend outside the physical domain and which are filled automatically +from adjacent grid patches or by interpolation from coarser patches if they +are interior to the domain.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/biblio.html b/v5.10.x/biblio.html new file mode 100644 index 0000000000..0a32d9d2ee --- /dev/null +++ b/v5.10.x/biblio.html @@ -0,0 +1,509 @@ + + + + + + + + + Bibliography — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Bibliography

    +

    See also www.geoclaw.org for papers, posters, and +other resources for GeoClaw.

    +
    +

    Papers describing the Clawpack software and algorithms

    +
    +
    +[BaleLevMitRoss02] +

    D. S. Bale, R. J. LeVeque, S. Mitran, and J. A. Rossmanith. +A wave-propagation method for conservation laws with spatially varying +flux functions, +SIAM J. Sci. Comput 24 (2002), 955-978.

    +
    @article{BaleLevMitRoss02,
    +    Author = {D. Bale and R. J. LeVeque and S. Mitran and J. A. Rossmanith},
    +    Title = {A wave-propagation method for conservation laws and balance laws
    +            with spatially varying flux functions},
    +    Journal = {SIAM J. Sci. Comput.},
    +    Pages = {955--978},
    +    Volume = {24},
    +    Year = {2002}}
    +
    +
    +
    +
    +[BergerColella89] +

    M. J. Berger and P Colella. 1989. Local adaptive mesh refinement for +shock hydrodynamics. J. Comput. Phys. 82, 64–84.

    +
    +
    +[BergerGeorgeLeVequeMandli11] +

    M. J. Berger, D. L. George, R. J. LeVeque and K. M. Mandli, +The GeoClaw software for depth-averaged flows with adaptive refinement, +Advances in Water Resources 34 (2011), pp. 1195-1206.

    +
    @article{BergerGeorgeLeVequeMandli11,
    + Author = {M. J. Berger and D. L. George and R. J. LeVeque and K. T.  Mandli},
    + Journal = {Adv. Water Res.},
    + Pages = {1195-1206},
    + Title = {The {GeoClaw} software for depth-averaged flows with adaptive refinement},
    + Volume = {34},
    + Year = {2011},
    + Url = {\url{www.clawpack.org/links/papers/awr11}}}
    +
    +
    +
    +
    +[BergerLeVeque98] +

    M. J. Berger and R. J. LeVeque. 1998. +Adaptive Mesh Refinement using +Wave-Propagation Algorithms for Hyperbolic Systems. +SIAM J. Numer. Anal. 35, 2298–2316.

    +
    @article{BergerLeVeque98,
    +    Author = {M. J. Berger and R. J. LeVeque},
    +    Journal = {SIAM J. Numer. Anal.},
    +    Pages = {2298--2316},
    +    Title = {Adaptive Mesh Refinement using Wave-Propagation Algorithms for Hyperbolic Systems},
    +    Volume = {35},
    +    Year = {1998}}
    +
    +
    +
    +
    +[BergerLeVeque2023] +

    M. J. Berger and R. J. LeVeque. 2023 +Implicit Adaptive Mesh Refinement for Dispersive Tsunami Propagation +Submitted for publication

    +
    +
    +[BergerOliger84] +

    M. J. Berger and J. Oliger. 1984. Adaptive mesh refinement for +hyperbolic partial differential equations. J. Comput. Phys. 53, +484–512.

    +
    +
    +[BergerRigoutsis91] +

    M. J. Berger and I. Rigoutsos. 1991. An Algorithm for Point Clustering +and Grid Generation. IEEE Trans. Sys. Man & Cyber. 21, 1278–1286.

    +
    +
    +[Davis2018] +

    B. N. Davis, 2018. Adjoint-Guided Adaptive Mesh Refinement for +Hyperbolic Systems of Equations, +PhD Thesis, University of Washington. +link

    +
    +
    +[DavisLeVeque2016] +

    B. N. Davis and R. J. LeVeque. 2016. Adjoint Methods for Guiding +Adaptive Mesh Refinement in Tsunami Modeling, 2016. +Pure Appl. Geophys. 173 (2016), pp. 4055-4074. +More info

    +
    +
    +[DavisLeVeque2018] +

    B. N. Davis and R. J. LeVeque. 2018. Analysis and Performance Evaluation of +Adjoint-Guided Adaptive Mesh Refinement for Linear Hyperbolic PDEs +Using Clawpack, Preprint, +More info

    +
    +
    +[LangsethLeVeque00] +

    J. O. Langseth and R. J. LeVeque. 2000. +A wave-propagation method for +three-dimensional hyperbolic conservation laws. +J. Comput. Phys. +165, 126–166.

    +
    @article{LangsethLeVeque00,
    +    Author = {J. O. Langseth and R. J. LeVeque},
    +    Title = {A wave-propagation method for three-dimensional hyperbolic conservation laws},
    +    Journal = {J. Comput. Phys.},
    +    Pages = {126--166},
    +    Volume = {165},
    +    Year = {2000}}
    +
    +
    +
    +
    +[LeVeque96] +

    R. J. LeVeque, 1996. +High-resolution conservative algorithms for advection in +incompressible flow,

    +
    @article{LeVeque1996,
    +  author="R. J. LeVeque",
    +  title="High-resolution conservative algorithms for advection in
    +  incompressible flow",
    +  journal="SIAM J. Numer. Anal.",
    +  volume="33",
    +  year="1996",
    +  pages="627-665"
    +}
    +
    +
    +
    +
    +[LeVeque97] +

    R. J. LeVeque, 1997. +Wave propagation algorithms for multi-dimensional +hyperbolic systems. +J. Comput. Phys. 131, 327–353.:

    +
    @article{rjl:wpalg,
    +    Author = {R. J. LeVeque},
    +    Title = {Wave propagation algorithms for multi-dimensional hyperbolic systems},
    +    Journal = {J. Comput. Phys.},
    +    Pages = {327--353},
    +    Volume = {131},
    +    Year = {1997}}
    +
    +
    +
    +
    +[LeVeque-FVMHP] +

    R. J. LeVeque. +Finite Volume Methods for Hyperbolic Problems. +Cambridge University Press, Cambridge, UK, 2002.

    +
    @book{LeVeque-FVMHP,
    +    Author = {R. J. LeVeque},
    +    Title = {Finite Volume Methods for Hyperbolic Problems},
    +    Publisher = {Cambridge University Press},
    +    Year = {2002},
    +    Url = {https://www.clawpack.org/fvmhp_materials/}}
    +
    +
    +

    See the Gallery of fvmbook applications +for some sample results from this book.

    +
    +
    +[LeVequeGeorgeBerger] +

    R. J. LeVeque, D. L. George, and M. J. Berger, 2011, +Tsunami modelling with adaptively refined finite volume methods, +Acta Numerica, pp. 211-289.

    +
    @article{mjb-dg-rjl:actanum2011,
    +    Author = {R.J. LeVeque  and D. L. George and M. J. Berger},
    +    Title = {Adaptive Mesh Refinement Techniques for Tsunamis and Other
    +            Geophysical Flows Over Topography},
    +    Journal = {Acta Numerica},
    +    Pages = {211-289},
    +    Year = {2011}}
    +
    +
    +
    +
    +[KetParLev13] +

    D. I. Ketcheson, Matteo Parsani, and R J LeVeque, 2013, +High-order Wave Propagation Algorithms for Hyperbolic Systems, +SIAM Journal on Scientific Computing, 35(1):A351-A377 (2013)

    +
    @article{KetParLev13,
    +        Author = {Ketcheson, David I. and Parsani, Matteo and LeVeque,
    +        Randall J.},
    +        Journal = {SIAM Journal on Scientific Computing},
    +        Number = {1},
    +        Pages = {A351--A377},
    +        Title = {{High-order Wave Propagation Algorithms for Hyperbolic Systems}},
    +        Volume = {35},
    +        Year = {2013}}
    +
    +
    +
    +
    +[KetchesonMandliEtAl] +

    David I. Ketcheson, Kyle T. Mandli, Aron J. Ahmadia, Amal Alghamdi, Manuel +Quezada de Luna, Matteo Parsani, Matthew G. Knepley, and Matthew Emmett, 2012, +PyClaw: Accessible, Extensible, Scalable Tools for Wave Propagation Problems, +SIAM Journal on Scientific Computing, 34(4):C210-C231

    +
    @article{pyclaw-sisc,
    +    Author = {Ketcheson, David I. and Mandli, Kyle T. and Ahmadia, Aron J. and
    +        Alghamdi, Amal and {Quezada de Luna}, Manuel and Parsani, Matteo and
    +        Knepley, Matthew G. and Emmett, Matthew},
    +    Title = {{PyClaw: Accessible, Extensible, Scalable Tools for Wave Propagation Problems}},
    +    Journal = {SIAM Journal on Scientific Computing},
    +    Month = nov,
    +    Number = {4},
    +    Pages = {C210--C231},
    +    Volume = {34},
    +    Year = {2012}}
    +
    +
    +
    +
    +[KimEtAl2017] +

    J. Kim, G. K. Pedersen, and F. Lovholt, and R. J. LeVeque, +A Boussinesq type extension of the GeoClaw model - a study of wave +breaking phenomena applying dispersive long wave models, +Coastal Engineering 122 (2017), pp. 75-86. +DOI 10.1016/j.coastaleng.2017.01.005

    +
    @article{Kim201775,
    +  title = "A Boussinesq type extension of the GeoClaw model - a study of wave
    +          breaking phenomena applying dispersive long wave models ",
    +  author = "Jihwan Kim and Geir K. Pedersen and Finn L{\o}vholt and Randall J.  LeVeque",
    +  journal = "Coastal Engineering ",
    +  volume = "122",
    +  pages = "75 - 86",
    +  year = "2017",
    +  doi = "http://dx.doi.org/10.1016/j.coastaleng.2017.01.005",
    +  }
    +
    +
    +
    +
    +[MandliEtAl2016] +

    Kyle T. Mandli, Aron J. Ahmadia, Marsha Berger, Donna Calhoun, David L. +George, Yiannis Hadjimichael, David I. Ketcheson, Grady I. Lemoine, Randall J. LeVeque, +Clawpack: building an open source ecosystem for solving hyperbolic PDEs +PeerJ Computer Science 2 (2016), e68:

    +
    @article{mandli2016clawpack,
    +  title={Clawpack: building an open source ecosystem for solving hyperbolic PDEs},
    +  author={Mandli, Kyle T and Ahmadia, Aron J and Berger, Marsha and Calhoun, Donna
    +    and George, David L and Hadjimichael, Yiannis and Ketcheson, David I
    +    and Lemoine, Grady I and LeVeque, Randall J},
    +  journal={PeerJ Computer Science},
    +  volume={2},
    +  pages={e68},
    +  year={2016},
    +  publisher={PeerJ Inc.},
    +  doi={10.7717/peerj-cs.68} }
    +
    +
    +
    +
    +
    +
    +

    Papers describing applications

    +

    This list is very out of date! A +Google Scholar search on “clawpack software” +gives hundreds of hits that may be of interest.

    +

    For GeoClaw applications, see also www.geoclaw.org for additional references and other links.

    +
    +
    +[CalHelLeV08] +

    D. A. Calhoun, C. Helzel, and R. J. LeVeque. +Logically Rectangular Grids and Finite Volume Methods for PDEs in +Circular and Spherical Domains, +SIAM Review 50 (2008), 723-752.

    +
    +
    +[LeVeque09] +

    R. J. LeVeque. +Python Tools for Reproducible Research on Hyperbolic Problems +Computing in Science and Engineering (CiSE) 11(2009), pp. 19-27.

    +
    +
    +[LeVYon03] +

    R. J. LeVeque and Darryl H. Yong. +Solitary Waves in Layered Nonlinear Media, +SIAM J. Appl. Math 63 (2003) pp. 1539-1560.

    +
    +
    +[Mandli13a] +

    Mandli, K. T. +A Numerical Method for the Two Layer Shallow Water Equations with Dry States. Ocean Modelling 72, 80–91 (2013).

    +
    @article{Mandli:2013it,
    +         author = {Mandli, Kyle T},
    +         title = {{A Numerical Method for the Two Layer Shallow Water Equations with Dry States}},
    +         journal = {Ocean Modelling},
    +         year = {2013},
    +         volume = {72},
    +         pages = {80--91},
    +         month = aug
    +         }
    +
    +
    +
    +
    +[Mandli13b] +

    Mandli, K. T. & Dawson, C. N. +Adaptive Mesh Refinement for Storm Surge. +Ocean Modelling 75, 36–50 (2014).

    +
    @article{Mandli:ws,
    +         author = {Mandli, Kyle T and Dawson, Clint N},
    +         title = {{Adaptive Mesh Refinement for Storm Surge}},
    +         journal = {Ocean Modelling},
    +         year = {2014},
    +         volume = {75},
    +         pages = {36--50}}
    +
    +
    +
    +
    +
    +

    Note

    +

    Add more…

    +
    +
    +
    +

    Other references

    +
    +
    +[Okada85] +

    Y. Okada. +Surface deformation due to shear and tensile faults in a half-space, +Bull. Seism. Soc. Am.* 75 (1985), pp. 1135-1154.

    +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/bouss1d.html b/v5.10.x/bouss1d.html new file mode 100644 index 0000000000..13fd7e94f0 --- /dev/null +++ b/v5.10.x/bouss1d.html @@ -0,0 +1,285 @@ + + + + + + + + + Boussinesq solvers in One Space Dimension — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Boussinesq solvers in One Space Dimension

    +

    As of Version 5.10.0, the geoclaw repository contains some code for solving +problems in one space dimension, as described more generally in +GeoClaw in One Space Dimension. This 1d 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 (SWE) 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 second-order derivatives in xx but no time derivatives. +In one space dimension, solving this equation requires solving a tridiagonal +linear system of equations in each time step.

    +

    See Boussinesq solvers in Two Space Dimensions and [BergerLeVeque2023] for more discussion +of the Boussinesq-type equations SGN and MS that are implemented in GeoClaw. +We recommend using the Serre-Green-Naghdi (SGN) equations rather than +Madsen-Sorensen (MS), which has similar dispersive properties but +is less stable.

    +
    +

    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 +GeoClaw in One Space Dimension.

    +

    The Makefile and setrun.py files must be modified from those used +for SWE as described below. +See the examples with names like $CLAW/geoclaw/examples/1d/bouss_* +for sample files to use as a template.

    +
    +

    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, which in one space dimension yields 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 libraries 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 +$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 FFLAGS environment variable.

    +
    +
    +

    setrun.py

    +

    To use the Boussinesq solvers, somewhere in the setrun function you +must include

    +
    from clawpack.geoclaw.data import BoussData1D
    +rundata.add_data(BoussData1D(),'bouss_data')
    +
    +
    +

    and then the following parameters can be adjusted (the values shown here +are the default values that will be used if you do not specify a value +directly):

    +
    rundata.bouss_data.equations = 2   # 0=SWE, 1=MS, 2=SGN
    +rundata.bouss_data.deepBouss = 5.  # depth (meters) to switch to SWE
    +
    +
    +

    The rundata.bouss_data object has attributes:

    +
      +
    • bouss_equations: The system of equations being solved. Setting this to 2 +gives the recommended SGN equations.

      +

      The value alpha = 1.153 recommended for SGN is +hardwired into $CLAW/geoclaw/src/2d/bouss/bouss_module.f90. To change +this value, you must modify this module. (See Library routines in Makefiles +for tips on modifying a library routine.) Similarly, if you set +bouss_equations = 1 for the Madsen-Sorensen equations, the recommended +parameter value Bparam = 1/15 is set in bouss_module.f90.

      +

      Setting bouss_equations = 0 causes the code to revert to the shallow +water equations, useful for comparing dispersive and nondispersive results.

      +
    • +
    • bouss_min_depth: The criterion used for switching from Boussinesq to SWE +in shallow water and onshore. If the original water depth h at time t0 +is less than bouss_min_depth in a cell or any of its nearest neighbors, +then this cell is omitted from set of unknowns in the elliptic equation +solve and no dispersive correction terms are calculated for this cell.

    • +
    +

    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. +See Wave breaking and switching to SWE for more discussion.

    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/bouss2d.html b/v5.10.x/bouss2d.html new file mode 100644 index 0000000000..c98102c746 --- /dev/null +++ b/v5.10.x/bouss2d.html @@ -0,0 +1,448 @@ + + + + + + + + + Boussinesq solvers in Two Space Dimensions — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Boussinesq solvers in Two Space Dimensions

    +

    As of Version 5.10.0, GeoClaw includes the option to solve a +dispersive Boussinesq-type equation known as Serre-Green-Naghdi (SGN) +instead of the usual shallow water equations (SWE). +This equation and related depth-averaged equations have been used +extensively in the literature +to better model wave propagation in situations where the wavelength is not +sufficiently long relative to the fluid depth for the SWE +approximation to be accurate. Applications include the study +of tsunamis generated by landslides, asteroid impacts, or other localized +phenomena. Including dispersive terms has also been found to give more +realistic results for earthquake-generated tsunamis in some situations. +See [BergerLeVeque2023] for references to some of this literature along +with more discussion of the GeoClaw implementation and test problems.

    +

    The one-dimensional version of these capabilities are +described in Boussinesq solvers in One Space Dimension.

    +

    The SGN equations are still depth-averaged equations, with the same +conserved quantities (fluid depth h and momenta hu and hv in 2D) as the +shallow water equations (SWE), but the +equations contain higher order derivative terms and so they are no longer +hyperbolic and require implicit methods for efficient solution with a +physically reasonable time step. This adds considerable complexity to the +code since adaptive mesh refinement (AMR) is still supported. +The implementation proceeds by alternating time +steps on the shallow water equations (SWE) with the solution of elliptic +equations where the operator involves second order derivatives in x and y +of a new set of variables used to modify the momenta each time step. +The right hand side also involves third order derivatives of the topography.

    +

    In two space dimensions, solving this +elliptic equation requires setting up and solving a sparse +linear system of equations in each time step, at each refinement level when +AMR is being used. All grid cells from all patches at +the same refinement level +are included in the linear system. Boundary conditions at the edge of +patches must be interpolated from coarser level solutions, in much the same +way that the boundary conditions for h, hu, and hv are interpolated +when solving the SWE with AMR. Because the solution of the elliptic system +yields correction terms to the momenta (denoted here by huc and hvc), +when solving the Boussinesq equations the array q of state variables +is expanded to include these correction terms as well, and so the number of +equations and variables is 5 instead of 3. This change must be made in +setrun.py, along with other changes discussed below, in order to use +the Boussinesq solvers.

    +

    Currently the only linear system solver supported for solving the large +sparse elliptic systems is PETSc, +which can use MPI to solve these these systems. Using the Boussinesq solvers +requires these prerequesites, as discussed further in Prerequisites for the 2d Boussinesq code.

    +

    See [BergerLeVeque2023] for more discussion of the equations solved and the +AMR algorithms developed for these equations.

    +
    +

    Boussinesq-type dispersive equations

    +

    The equations we solve are not the original depth-averaged dispersive +equations derived by Boussinesq, but for simplicity +in this documentation and the code, we often refer to the +equations simply as “Boussinesq equations”, following common practice. +Many variants of these equations have been derived and fine-tuned to +better match the dispersion relation of the linearized +Airy wave theory +and to incorporate variable bottom topography.

    +

    Two variants are currently implement in GeoClaw, described below. +In practice we recommend using only the SGN equations, which we have found +to be more stable.

    +
    +
    +

    The SGN equations

    +

    The Serre-Green-Naghdi (SGN) equations implemented in GeoClaw +are generalized to include 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]. +The value 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. +This value is +hardwired into $CLAW/geoclaw/src/2d/bouss/bouss_module.f90. To change +this value, you must modify this module. (See Library routines in Makefiles +for tips on modifying a library routine.) +Setting alpha = 1 gives the original SGN equations.

    +
    +
    +

    The Madsen-Sorensen (MS) equations

    +

    Primarily for historical reasons, GeoClaw also includes an implementation of +another Boussinesq-type dispersive system, the Madsen-Sorensen (MS) equations. +These equations also give a good approximation to the linear dispersion +relation of the Airy solution when the parameter Bparam = 1/15 is used, +which is hardwired into $CLAW/geoclaw/src/2d/bouss/bouss_module.f90. +These equations were used in an earlier GeoClaw implementation +by Jihwan Kim, known as BoussClaw [KimEtAl2017]. +This implementation was successfully used in a number of studies +(see [BergerLeVeque2023] for some citations). +However, extensive tests with these equations have revealed stability issues, +particularly with the use of AMR, which have also been reported by others. +Implementations of MS in both 1D and 2D are included in GeoClaw, +but are generally not +recommended except for those interested in comparing different +formulations for small numbers of time steps, +and perhaps further investigating the stability issues.

    +
    +
    +

    Using the 2d Boussinesq code

    +

    Provided the Prerequisites for the 2d Boussinesq code have been installed, switching from the +SWE to a Boussinesq solver in GeoClaw requires only minor changes to +setrun.py and the Makefile.

    +

    See the files in $CLAW/geoclaw/examples/bouss/radial_flat for an example.

    +
    +

    setrun.py

    +

    As mentioned above, it is necessary to set:

    +
    clawdata.num_eqn = 5
    +
    +
    +

    instead of the usual value 3 used for SWE, since correction terms for the +momenta are also stored in the q arrays to facilitate interpolation to +ghost cells of finer level patches each time step.

    +

    It is also necessary to set some parameters that are specific to the +Boussinesq solvers. Somewhere in the setrun function you must include

    +
    from clawpack.geoclaw.data import BoussData
    +rundata.add_data(BoussData(),'bouss_data')
    +
    +
    +

    and then the following parameters can be adjusted (the values shown here +are the default values that will be used if you do not specify a value +directly):

    +
    rundata.bouss_data.bouss_equations = 2    # 0=SWE, 1=MS, 2=SGN
    +rundata.bouss_data.bouss_min_level = 1    # coarsest level to apply bouss
    +rundata.bouss_data.bouss_max_level = 10   # finest level to apply bouss
    +rundata.bouss_data.bouss_min_depth = 10.  # depth (meters) to switch to SWE
    +rundata.bouss_data.bouss_solver = 3       # 3=PETSc
    +rundata.bouss_data.bouss_tstart = 0.      # time to switch from SWE
    +
    +
    +

    These parameters are described below:

    +
      +
    • bouss_equations: The system of equations being solved. Setting this to 2 +gives the recommended SGN equations, while 1 gives Madsen-Sorensen.

      +

      Setting bouss_equations = 0 causes the code to revert to the shallow +water equations, useful for comparing dispersive and nondispersive results. +(But if bouss_data is being set, it still requires clawdata.num_eqn = 5 +and the two new components in q are always 0 in this case, so this is +slightly less efficient than using the standard GeoClaw.)

      +
    • +
    • bouss_min_level: The minimum AMR level on which Boussinesq correction +terms should be applied. In some cases it may be desirable to use the SWE +on the coarsest grids in the ocean while Boussinesq corrections are only +applied on fine levels near shore, for example.

    • +
    • bouss_max_level: The finest AMR level on which Boussinesq correction +terms should be applied. In some cases it may be desirable to use the SWE +only on coarser grids if the finest level grid only exists in very shallow +regions or onshore, where the the equations switch to SWE for inundation +modeling. Since much of the computational work is often on the finest level, +avoiding the Boussinesq terms altogether on these levels may be advantageous +in some situations.

    • +
    • bouss_min_depth: The criterion used for switching from Boussinesq to SWE +in shallow water and onshore. If the original water depth h at time t0 +is less than bouss_min_depth in a cell or any of its nearest +neighbors in a 3-by-3 neighborhood, +then this cell is omitted from set of unknowns in the elliptic equation +solve and no dispersive correction terms are calculated for this cell. +This is discussed further below in Wave breaking and switching to SWE.

    • +
    • bouss_solver: What linear system solver to use. Currently only the value +3 for PETSc is recognized.

    • +
    • bouss_tstart: The time t at which to start applying Boussinesq terms. +Normally you will want this to be less than or equal to t0, the starting +time of the calculation (which is not always 0). However, +there are some cases in which the initial data results in extreme +motion in the first few time steps and it is necessary to get things going +with the SWE. For most applications this is not necessary and you need +only change this parameter if you are solving a problem for which t0 < 0.

    • +
    +
    +
    +

    Makefile

    +

    You can copy the Makefile from +$CLAW/geoclaw/examples/bouss/radial_flat/Makefile and make any adjustments +needed.

    +

    This Makefile reads in the standard Boussinesq solver file +$CLAW/geoclaw/src/2d/bouss/Makefile.bouss, which lists the Fortran modules +and source code files that are used by default from the library +$CLAW/geoclaw/src/2d/bouss, or from $CLAW/amrclaw/src/2d or +$CLAW/geoclaw/src/2d/shallow in the case of files that did not need to +be modified for the Boussinesq code.

    +

    Two Makefile variables PETSC_DIR and PETSC_ARCH must be set (perhaps as +environment variables in the shell from which make is invoked). These are +described further below in Prerequisites for the 2d Boussinesq code.

    +

    The FFLAGS specified in the Makefile should include -DHAVE_PETSC +to indicate that PETSc is being used, necessary when compiling the +source code for Boussinesq solvers.

    +

    The Makefile should also include a line of the form:

    +
    PETSC_OPTIONS=-options_file $(CLAW)/geoclaw/examples/bouss/petscMPIoptions
    +
    +
    +

    with a pointer to the file that sets various PETSc options. The file +$CLAW/geoclaw/examples/bouss/petscMPIoptions gives the options used in +the examples, which may be adequate for other problems too. +This file includes some comments briefly explaining the options set. +We use a GMRES Krylov space method as the main solver +and algebraic multigrid as the preconditioner. +For more about the options for these methods, see:

    +
    +
    +

    In addition to a line of the form

    +
    EXE = xgeoclaw
    +
    +
    +

    that specifies the name and location of the executable to be generated, the +Makefile should also contain a line of the form:

    +
    RUNEXE="${PETSC_DIR}/${PETSC_ARCH}/bin/mpiexec -n 6"
    +
    +
    +

    This is the command that should be used in order to run the executable. +In other words, if you set PETSC_DIR and PETSC_ARCH as environment +variables, and the executable is named xgeoclaw as usual, then the command

    +
    $PETSC_DIR/$PETSC_ARCH/bin/mpiexec -n 6 xgeoclaw
    +
    +
    +

    given in the shell should run the executable (invoking MPI with 6 processes in +this example). If this does not work then one of the environment variables +may be set incorrectly to find the mpiexec command.

    +
    +
    +
    +

    Prerequisites for the 2d Boussinesq code

    +

    Currently the only linear solver supported is PETSc, so this must be +installed, see https://petsc.org/release/install/ for instructions +and also note the PETSc prerequisites. +Note that MPI, LAPACK, and the BLAS are required and will be installed as +part of installing PETSc. If you already have some of the prerequisites +installed, be sure to read Configuring PETSc +before installing.

    +

    The environment variables $PETSC_DIR and $PETSC_ARCH must be set +appropriately based on your PETSc installation, either as environment +variables or directly in the Makefile. +See the PETSc documentation page +Environmental Variables $PETSC_DIR And $PETSC_ARCH.

    +
    +
    +

    Wave breaking and switching to SWE

    +

    The bouss_min_depth 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 commonly used 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.

    +
    +
    +

    Examples

    +

    In addition to one example application included in GeoClaw, found in the +directory $CLAW/geoclaw/examples/bouss/radial_flat, several other examples +of usage can be found in the code repository +https://github.com/rjleveque/ImplicitAMR-paper, which was +developed to accompany the paper [BergerLeVeque2023].

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/changes_to_master.html b/v5.10.x/changes_to_master.html new file mode 100644 index 0000000000..537c283d05 --- /dev/null +++ b/v5.10.x/changes_to_master.html @@ -0,0 +1,232 @@ + + + + + + + + + Changes to master since v5.9.2 — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Changes to master since v5.9.2

    +

    Follow the links to see changes that have been made to the master branch of +each repository since the last release (v5.9.2) on November 4, 2023.

    +

    These changes should appear in the next release. If you need them now, +see Developers’ Guide for instructions on cloning and installing from the +master branch.

    +

    To see documentation that has already been developed to accompany any new +features listed below, click on the “dev” branch of the documentation, in +the menu on the left hand side of this page.

    +
    +

    Changes that are not backward compatible

    +
    +
    +

    General changes

    +
    +
    +

    Changes to classic

    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    See pyclaw diffs

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/claw43to46.html b/v5.10.x/claw43to46.html new file mode 100644 index 0000000000..f7995d48e4 --- /dev/null +++ b/v5.10.x/claw43to46.html @@ -0,0 +1,191 @@ + + + + + + + + + Converting from Clawpack 4.3 to 4.6 — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Converting from Clawpack 4.3 to 4.6

    +

    For users who want to migrate code from 4.3 to 5.0, this may be a useful +intermediate step, followed by migration from 4.6 to 5.0 using the script +described at Converting from Clawpack 4.6 to 5.0.

    +

    The Python interface (using setrun.py and setplot.py) was first +introduced in 4.4, so the main step needed to convert from 4.3 is to create +these files, and to make a number of changes to the Makefile.

    +

    If you are doing this by hand, you should convert directly to 5.0 form.

    +

    In some cases it will be easiest to do the bulk of the work using scripts. +A first pass of conversion to 4.6 form can be done by executing:

    +
    $ python $CLAW/clawutil/src/python/clawutil/conversion/convert43to46.py
    +
    +
    +

    in your application directory. You should then inspect the files generated +and fix any broken links, etc.

    +

    After this, see Converting from Clawpack 4.6 to 5.0.

    +
    +

    Warning

    +

    This migration script from 4.3 to 4.6 only works for classic +(single grid) codes in 1d and 2d, not AMRClaw codes.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/claw46to50.html b/v5.10.x/claw46to50.html new file mode 100644 index 0000000000..e76be26d49 --- /dev/null +++ b/v5.10.x/claw46to50.html @@ -0,0 +1,234 @@ + + + + + + + + + Converting from Clawpack 4.6 to 5.0 — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Converting from Clawpack 4.6 to 5.0

    +

    (If you are converting code from Clawpack 4.3, see Converting from Clawpack 4.3 to 4.6.)

    +

    Many input parameters have been renamed and some new options have been +added in Clawpack 5.0. See Changes to input parameters in setrun.py from 4.x to 5.0.

    +
    +

    Python conversion tool

    +

    A first pass at the conversion of setrun.py, setplot.py and the +Makefile can often be achieved by typing:

    +
    $ python $CLAW/clawutil/src/python/clawutil/conversion/convert46to50.py
    +
    +
    +

    in your application directory. You should then inspect the files generated +and fix any broken links, etc.

    +

    The original versions of various files will have _4.x appended to the file +name for reference. When conversion is complete, these files can be +deleted.

    +

    Notes:

    +

    This does not yet work for all variants of the code.

    +

    Old AMRClaw codes are often in a subdirectory amr of an application +directory, and the directory above may contain Fortran files or other files +used by the AMR code. Typically you will want to combine these in one +directory.

    +

    The Makefile is currently not converted properly – a generic Makefile +is added to the directory but must be customized to point to any local +Fortran codes, for example. In particular, make sure the Makefile points to +the correct Riemann solver(s), either a local file or a library routine from +the $CLAW/riemann/src directory.

    +

    The indices in q and aux arrays were permuted in Clawpack 5.0 relative +to early versions, e.g. the m`th component of `q in grid cell (i,j) is +now q(m,i,j) rather than q(i,j,m). The conversion script attempts to do +this reordering if it sees a pattern of a suitable form, but you should +carefully check your own local routines such as qinit or setaux to make +sure this has been done properly.

    +

    Calling sequences of several routines have also been changed and will need +to be adjusted by hand for any Fortran routines in your application directory. +See User files required for the Fortran code for calling sequences of the routines that +most frequently are provided by users. If you specify your own +Riemann solver, see also Riemann solvers, and if you have custom +boundary conditions, see Boundary conditions.

    +

    Note in particular that parameter maxmx (and maxmy, maxmz in more +dimensions) is no longer in the calling sequence. In earlier versions of +Clawpack this indicated the declared dimension of the q and aux arrays. +It is now assumed the arrays are dimensioned properly since dynamic memory +allocation is generally used at run time based on mx (resp. my, mz). +You should remove these from the calling sequence and also modify the +declaration of input parameters to use mx in place of maxmx, etc.

    +

    The classic code no longer requires a driver routine driver.f. In earlier +versions of Clawpack this was used to declare the q and aux arrays to be +sufficiently large for the size of the problem to be solved. (And +specifying a larger value for mx led to a run-time error.) In Clawpack-5, +a library routine driver.f90 is provided that calls the Clawpack routines, +which now use dynamic memory allocation to allocate the required arrays at +run time.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/claw4x.html b/v5.10.x/claw4x.html new file mode 100644 index 0000000000..d76ef495d1 --- /dev/null +++ b/v5.10.x/claw4x.html @@ -0,0 +1,165 @@ + + + + + + + + + Clawpack 4.x links — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + + + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/clawdev2013/index.html b/v5.10.x/clawdev2013/index.html new file mode 100644 index 0000000000..1e250b139e --- /dev/null +++ b/v5.10.x/clawdev2013/index.html @@ -0,0 +1,242 @@ + + + +Clawpack Developers Workshop + + + + +
    + + CLAWPACK + +

    Developers Workshop and Hackathon

    +

    University of Washington

    +

    July 22 - 26, 2013

    +

    +Note the change in venue, to +Odegaard Undergraduate Library 141 + + +

    + +

    Description of the workshop

    +This informal workshop will be held the week of July 22-26, 2013 at +the University of Washington in Seattle. Some talks will be scheduled Monday +through Thursday mornings that will focus on current and future +developments of the software and open problems. The emphasis will be on +discussion of issues of broad interest and new developments needed to make +the software more powerful and/or easily usable. Afternoons and evenings +will be devoted to informal discussion groups and coding sprints to make +progress in several specific +directions, to be organized in regard to the interests of the +participants. Some general goals for the week include: + +
      + +
    • Testing a number of recent changes to the proposed +Clawpack 5.0 code base, in preparation for an official release. + +
    • Discussion of better distribution / installation tools. + +
    • Conversion of a number of previous examples from Clawpack 4.x to +the format required for 5.0. + +
    • Future development of Riemann solvers with increased flexibility for +Fortran / Python / C applications. + +
    • Updating of 3d codes and visualization tools. + +
    • Progress on several variants of Clawpack, such as +PyClaw, +GeoClaw, +ManyClaw, and +ForestClaw. + +
    • Organization of apps / examples and regular regression tests. + +
    • Organization of documentation and galleries for multiple projects. + +
    • Discussion and/or documentation of coding standards. +
    +

    +

    +Some useful links at the bottom of this page. +

    + +

    Schedule

    + +Morning talks and afternoon discussions will take place in +Odegaard Undergraduate Library 141, +followed by break-out groups. +
    +This is an exciting new +Active +Learning Classroom that should be great for our purposes. +

    +

    +Some tutorials are also planned for interested participants, schedule TBD. + +

    Monday, July 22: Overview

    + +8:30 - 9:00 Registration and coffee just inside the entrance of +Odegaard Library, to the right. (No registration fee) +

    +9:00 - 9:20 Randy LeVeque, Overview of Clawpack 5.0. +

    +9:40 - 10:00 David Ketcheson, Overview of PyClaw. +

    +10:20 - 10:30 Break +

    +10:30 - 11:45 Lightning talks by all: short introduction to +interests, issues, and goals for the week. (2 slides max) +

    +11:45 - 1:00 Lunch +

    +1:00 - 2:00 Informal discussion: +Organization of repositories and tools for distribution / installing. +

    +6:30 - Reception + + +

    Tuesday, July 23: Major project directions

    +

    +9:00 - 9:20 Grady Lemoine, 3D and geometry +

    +9:40 - 10:00 Donna Calhoun, ForestClaw and adaptive mapped multiblock +

    +10:20 - 10:30 Break +

    +10:30 - 10:50 Andy Terrel, ManyClaw and automatic code generation +

    +11:10 - 11:30 Kyle Mandli, Classic 5.0 (Single grid, refactored) +

    +11:50 - 1:00 Lunch +

    +1:00 - 2:00 Informal discussion: + Riemann solvers, coding practices +

    + + +

    Wednesday, July 24: software tools

    +

    +9:00 - 9:20 Aron Ahmadia, Travis CI for Continuous Integration +

    +9:40 - 10:00 Bill Howe, SQLShare for scientific data +

    +10:20 - 10:30 Break +

    +10:30 - 10:50 Jake VanderPlas, IPython Notebooks and Other Interactive Tools +

    +11:10 - 11:30 TBD +

    +11:50 - 1:00 Lunch +

    +1:00 - 2:00 Informal discussion: TBD +

    +7:15pm No-host dinner at + +Ivar's Salmon House + +

    + +

    Thursday, July 25: GeoClaw applications

    +

    +8:30 - 8:50 Jihwan Kim, submarine landslides and dispersive terms +

    +9:00 - 9:20 David George, debris flows +

    +9:30 - 9:50 Roger Denlinger, Delineating wave propagation and tremor +in waveguides +

    +10:00 - 10:20 Break +

    +10:20 - 10:40 Kate Huntington / Mike Turzewski, Quaternary megafloods +and erosion of the Tsangpo River gorge + +

    +10:50 - 11:10 Daniel Shapero, Shallow ice and shallow shelf equations for glaciers +

    +11:20 - 11:40 Kyle Mandli, storm surge +

    +11:50 - 1:00 Lunch +

    +1:30 - 2:30 Informal discussion: GeoClaw development + +

    +

    Friday, July 26

    +

    +9:00 - 12:00 Presentations by working groups on progress made, and general +discussion of next steps. +

    +Afternoon: Continue working on projects and pull together loose ends. + +

    + +

    Some useful links

    +

    +

    +

    Working group work areas

    + +
      +
    • There are some collaboration +tables with large screens on the first floor of Odegaard library (OUGL). +

      +

    • Some small rooms and other collaboration spaces are available by +reservation (by UW students or faculty) in OUGL and Suzzallo libraries, +and in the Research Commons +area of Allen Library. +

      +

    • Several rooms in +Lewis Hall (new home of the Applied +Math Department) are available for our use: the conference room 208 and the +rooms 212, 115, and 130. If they are locked, see Derek in the reception +area on the second floor. (If anyone wants a desk to work at or a place to +leave things in Lewis, some PhD student desks are available and Derek can +give you a key to an office.) +

      +Note: Monday it is best to avoid Lewis since movers will be reorganizing +furniture between some of the offices. +

      +

    • Working groups will tackle some of the topics listed on the +Trello +board. +
    + + + diff --git a/v5.10.x/clawpack5.html b/v5.10.x/clawpack5.html new file mode 100644 index 0000000000..75acf48c28 --- /dev/null +++ b/v5.10.x/clawpack5.html @@ -0,0 +1,383 @@ + + + + + + + + + Changes in Clawpack 5.0 — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Changes in Clawpack 5.0

    +

    Clawpack 5.0 is a major reorganization of the Clawpack code base that has +been going on for several years.

    +
    +

    PyClaw in 5.0

    +

    The extensive PyClaw code base is now incorporated into Clawpack. See +Which Clawpack solver should I use? for more about how PyClaw relates to the other +Clawpack components. For recent changes in PyClaw, see the +PyClaw changelog.

    +
    +
    +

    Fortran package changes

    +

    The rest of this page concerns the Fortran components of Clawpack.

    +

    There is no complete list of changes since it has evolved to be very +different from the 4.x version of Clawpack in organization, but some of +major changes that affect users are listed below.

    +

    Some tools are available to assist users in converting code from earlier +versions. To go from Clawpack 4.6 to 5.0, see +Converting from Clawpack 4.6 to 5.0. Some older Clawpack 4.3 code can be first converted +to 4.6 form using Converting from Clawpack 4.3 to 4.6.

    +

    If you wish to view recent changes on GitHub, +note that Clawpack is an organization, meaning that it is +comprised of several repositories. Go to the +Clawpack GitHub +webpage to view all the repositories. Major changes that are specific +to PyClaw since its initial release in 2012 are listed in the +PyClaw changelog.

    +

    You might also view the +issues +associated with each Clawpack repository on +GitHub to see what bugs and features we are working on.

    +

    Some of the major changes:

    +
      +
    • In all of the Clawpack codes, indices of the primary arrays q (for +the solution) and aux (for auxiliary variables) have been reordered for +better cache performance and to interface better with the PETSc code (used +in as an option in PyClaw). For example, in the two-dimensional Clawpack +4.x code, q(i,j,m) denoted the m’th component of the solution vector in +the (i,j) grid cell. With this convention the various components of the +solution in a single grid cell are scattered in memory with a stride of +mx*my. +In Clawpack 5.0, the indexing for the same value is q(m,i,j) so that +the components of q in a single grid cell are continguous in memory.

      +

      Note that this means user routines such as qinit.f, setaux.f, +and Riemann solvers must be modified.

      +
    • +
    • The calling sequence of Riemann solvers has been modified by adding +maux (the number of auxiliary variables) as another parameter. +This is required because of the reordering of indices so that +aux(ma,i,j) is now the ma element of the aux vector in the (i,j) +cell. The leading dimension of aux is assumed to be maux and is +required in declaring this variable.

    • +
    • Calling sequences of many subroutines have changed, so users converting +code from Clawpack 4.x should carefully compare the calling sequences in +any custom Fortran code to those in relevant examples, or to the default +versions in the libraries.

    • +
    • Many Riemann solvers for different applications are now found in the +riemann repository. +In the future major changes may be made to the form of the Riemann solvers +to allow more flexibility.

    • +
    • The names of many input variables in setrun.py have been changed to +clean things up and be more systematic. Several options that used to be +specified by obscure means have been clarified, and some new options have been +added. For details and documentation on the new parameters, see:

      +
      +
      +
    • +
    • The directory structure has been reorganized. See +Clawpack components.

    • +
    • Some regression tests have been added to the classic, amrclaw, +and geoclaw directories in subdirectories named tests. +Travis is now used for continuous integration +testing during development.

    • +
    • The 3d single-grid and AMRClaw code, missing since Version 4.3, +has been updated to conform with 1d and 2d style. In particular, +the inputs can now be specified using setrun.py.

    • +
    • Three-dimensional plotting routines in Python are still under +construction, so currently there is no capability to use setplot.py +to specify the desired plots or make plots to produce them. However, +the Matlab plotting routines have been updated and are now found in +Visclaw. See Plotting using Matlab. It is also possible to render 3d +plots using the VisIt GUI, see Plotting with VisIt.

    • +
    • The classic single-grid Clawpack code (without AMR) is now in the +classic directory and the classic repository on GitHub. Some new +capabilities have been added, e.g.:

      +
        +
      • OpenMP parallelization has been added to the 3d codes. +See Using OpenMP.

      • +
      +
    • +
    • The AMRClaw code is now in the +amrclaw repository. +Some new capabilities have been added, e.g.:

      +
        +
      • It is now possible to specify refinement regions, previously only +supported in GeoClaw. For a description, see Specifying AMR regions.

      • +
      +
    • +
    • The GeoClaw code is now in the +geoclaw repository. +Some new capabilities have been added, e.g.:

      +
        +
      • There is an improved set of tools for monitoring the maximum depth or +surface elevation seen over a fixed grid, and the first arrival times. +See Fixed grid monitoring (fgmax).

      • +
      +
    • +
    +
    +
    +

    Changes to input parameters in setrun.py from 4.x to 5.0

    +
    +

    Changes to general parameters

    +
      +
    • Many names have been changed, e.g.

      +
        +
      • ndim to num_dim

      • +
      • xlower, ylower, zlower are now lower[0], lower[1], lower[2].

      • +
      • xupper, yupper, zupper are now upper[0], upper[1], upper[2].

      • +
      • mx, my, mz are now num_cells[0:3].

      • +
      +

      There are many other such changes. It is best to take a look at the +setrun.py for an example in $CLAW/classic/examples.

      +
    • +
    +

    See also:

    +
    +
    +
    +
    +

    Changes to AMR parameters

    +
      +
    • The rundata object generally defined in setrun.py now has an +attribute rundata.amrdata and AMR parameters are attributes of this +object. Most names of attributes have changed from those used in 4.x.

    • +
    • Setting mxnest negative to indicate that anisotropic refinement +in different directions might be used has been eliminated. +Now this is always assumed and one must always specify +refinement ratios in each direction and in time.

    • +
    • New attributes have been added to indicate whether Richardson +extrapolation and/or the routine ins flag2refine should be used +to flag cells for refinement. See AMR refinement criteria.

    • +
    • The capability of using “regions” to specify areas where refinement is +forced or prohibited has been extended from GeoClaw to AMRClaw. +See Specifying AMR regions.

    • +
    +

    See also:

    +
    +
    +
    +
    +

    Changes to GeoClaw parameters

    +

    A number of changes have been made to parameter names and also functionality +in some cases.

    +

    See also:

    +
    +
    +
    +
    +
    +

    Changes to plotting routines

    +

    The plotting routines are now in Visclaw, see Plotting with Visclaw.

    +

    The Matlab tools from version 4.x have been updated a bit and many examples +once again include .m files for users who wish to plot using Matlab.

    +

    The Python routines have also been updated. For the most part older +versions of setplot.py should still work, with a few exceptions:

    +
    +
      +
    • In AMR the individual grids are now called “patches” rather than “grids”. +This caused a few changes in attribute names in ClawPlotItem:

      +
      +
        +
      • The old plot_type named 2d_grid has been renamed 2d_patch

      • +
      • The old attirbute gridlines_show has been renamed celledges_show

      • +
      • The old attirbute grideges_show has been renamed patchedges_show

      • +
      +
      +
    • +
    +
    +

    To use the interactive plotting tool Iplotclaw, you now need to import +this via:

    +
    from clawpack.visclaw.Iplotclaw import Iplotclaw
    +
    +
    +

    See Plotting options in Python for more information.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/clawpack_components.html b/v5.10.x/clawpack_components.html new file mode 100644 index 0000000000..6d566da247 --- /dev/null +++ b/v5.10.x/clawpack_components.html @@ -0,0 +1,216 @@ + + + + + + + + + Clawpack components — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Clawpack components

    +

    Clawpack is developed using the git version control +system and all the source code is openly available via the +Clawpack GitHub Organization.

    +

    The code is organized in several independent git repositories. One of these +is the clawpack/clawpack +super-repository that is used to coordinate versions between other +repositories. If you are interested in cloning the code directly from +GitHub and/or helping develop Clawpack, see Developers’ Guide.

    +

    After installing Clawpack, you should have a top level directory that has the +following subdirectories:

    + +

    These correspond to individual GitHub repositories in the +Clawpack GitHub Organization.

    +
    +

    Other repositories

    +

    Other repositories in the +Clawpack GitHub Organization +may be of interest to some users:

    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/community.html b/v5.10.x/community.html new file mode 100644 index 0000000000..dbd098dc39 --- /dev/null +++ b/v5.10.x/community.html @@ -0,0 +1,317 @@ + + + + + + + + + Clawpack Community — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Clawpack Community

    +

    We welcome new users!

    +

    We also welcome new contributors; see Developers’ Guide for tips on +contributing code or new examples.

    +

    If you run into problems or can’t find the answer to +your question in these docs, please send a note to the +claw-users google group.

    +

    Slack channel. +Along with the google group we also have created a slack +workspace. If you would like to join please fill out this +form.

    +

    We are also starting to experiment with the following: +(Warning: they are not actively used.)

    + +

    Bug reports and suggested improvements

    +

    If you find a bug or want to suggest an improvement, please raise an issue +on the appropriate GitHub repository, for example:

    + +

    We welcome new contributors and developers!

    +

    See Clawpack Community Photos for some photos of the team.

    +

    The pages below give some tips for those who want to get involved.

    + +
    +

    User Workshops, Clinics, and Tutorials

    +
    +

    Available for streaming

    + +
    +
    +

    Upcoming

    +

    Please join us at one of the upcoming sessions, or help plan one elsewhere…

    +
      +
    • None currently scheduled.

    • +
    +
    +
    +

    Recent

    + +
    +
    +
    +

    Developer Workshops and Sprint Sessions

    +
    +

    Upcoming

    +

    Please join us at one of the upcoming sessions, or help plan one elsewhere…

    +
      +
    • None currently scheduled.

    • +
    +
    +
    +

    Previous

    +

    See the links below for summaries of some projects that +have been tackled (and/or are still work in progress).

    + +
    +
    +
    +

    Other Clawpack events

    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/contents.html b/v5.10.x/contents.html new file mode 100644 index 0000000000..33461d2402 --- /dev/null +++ b/v5.10.x/contents.html @@ -0,0 +1,488 @@ + + + + + + + + + Full Table of Contents — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +

    The Clawpack Homepage contains a general introduction to +the Clawpack open source software project.

    + +
    +

    Full Table of Contents

    +

    This is the documentation for the latest version of Clawpack. +For documentation corresponding to older versions see the list of +past releases in the menu to the left. The future version refers +to new documentation for features that have been merged into the +master branch of a Clawpack repository, but have not yet been +released. To use one of these features, see Installation instructions for developers.

    +

    What’s New?? For release notes, summaries of changes between releases, +and links to all the Github commit logs, see Releases of Clawpack and release notes.

    +
    +

    Overview and Getting Started

    + + + +
    +
    +

    Examples and Applications

    + +
    +
    +

    Classic, AMRClaw, and GeoClaw

    +
    +

    Using the Fortran codes

    +

    General information that applies to Classic, AMRClaw, and GeoClaw.

    + +
    +
    +

    AMRClaw: adaptive mesh refinement

    + +
    +
    +

    GeoClaw: geophysical flows

    + +
    +
    +
    +

    PyClaw

    + +
    +
    +

    Riemann

    +

    All Clawpack packages make use of the same collection of Riemann solvers.

    +

    See also the new book Riemann Problems and Jupyter Solutions (SIAM, 2020), +which consists of a set of Jupyter notebooks illustrating +the basic concepts of Riemann problems and approximate solvers.

    + +
    +
    +

    VisClaw: Plotting and Visualization Tools

    + +
    +
    +

    Migrating applications from older versions of Clawpack

    +

    If you are looking to run an application that was written +for Clawpack 4.x, this may be helpful.

    + +
    +
    +

    Developers’ resources

    + +

    See also Installation instructions for developers

    +
    +
    +

    References

    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/contribute_apps.html b/v5.10.x/contribute_apps.html new file mode 100644 index 0000000000..553062e12e --- /dev/null +++ b/v5.10.x/contribute_apps.html @@ -0,0 +1,180 @@ + + + + + + + + + Contributing examples and applications — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Contributing examples and applications

    +

    The Clawpack Applications repository contains a few examples of applications that can be solved +using Clawpack. We hope to greatly expand this repository in the future.

    +

    Contributions from users are desired. We are still working out the best way +to collect applications. One possibility is to use git submodules. +For now you can issue a pull request to +https://github.com/clawpack/apps.

    +

    Stay tuned for more details….

    +

    Of course you can always post your results using the techniques described in +Saving and sharing results.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/current_data.html b/v5.10.x/current_data.html new file mode 100644 index 0000000000..f458468507 --- /dev/null +++ b/v5.10.x/current_data.html @@ -0,0 +1,306 @@ + + + + + + + + + current_data — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    current_data

    +

    The Python plotting routines often allow the user to specify a call back +function as plotting parameters, for example ClawPlotAxes has an +attribute afteraxes that can be set to a function to be executed after +performing all plots on the specified axes. This is useful for setting +parameters for these axes that are not covered by the provided attributes, +for annotating the plots on these axes, for adding a plot of the true +solution, etc.

    +

    Call back functions include:

    +
    +
    +
    +

    All of these functions are designed to take a single argument +current_data, an object with attributes that may be useful to the user in +evaluating the function.

    +
    +

    Warning

    +

    The mapc2p function is one exception that does not take argument current_data.

    +
    +
    +

    Attributes of current_data:

    +

    Some of these may be unavailable because they don’t make sense in the +current context, e.g. in a beforeframe function.

    +
    +
    +plotdata :
    +

    parent ClawPlotData object. From this object virtually any +relevant data can be accessed. Other attributes are defined for +convenience. If you find you frequently +need something else, you could modify pyclaw.plotters.frametools +to add this to current_data.

    +
    + +
    +
    +frameno :
    +

    The current frame number

    +
    + +
    +
    +patch :
    +

    Object of pyclaw.solution.patch with data for the last patch +plotted.

    +
    + +
    +
    +patchno :
    +

    Grid number of this patch, of interest only in AMR calculations.

    +
    + +
    +
    +q :
    +

    q array for current frame, so for example the in a scalar 2d problem the +value in the (i,j) cell would be current_data.q[0,i,j] (remember that +Python always indexes starting at 0).

    +

    In an AMR calculation q will be from the last patch plotted.

    +
    + +
    +
    +aux :
    +

    aux array for current frame, provided these have been output by the +Fortran code. At the moment this requires modifying the library routine +outN.f to set outaux = .true. so that fort.a files are produced along +with fort.q files. [This should be an input parameter!]

    +

    If fort.a files are not found then current_data.aux will be None.

    +

    In an AMR calculation aux will be from the last patch plotted.

    +
    + +
    +
    +var :
    +

    array of the variable actually plotted most recently, e.g. if +plotitem.plot_var == 0 then in 2d current_data.var[i,j] == +current_data.q[0,i,j].

    +
    + +
    +
    +level :
    +

    For AMR computations, where current_data.patch is for the last patch plotted, +current_data.level is the AMR level of this patch. Particularly useful +in afterpatch functions.

    +
    + +
    +
    +t :
    +

    the current time t.

    +
    + +
    +
    +x :
    +

    x array of cell centers corresponding to current_data.q.

    +
    + +
    +
    +y :
    +

    y array of cell centers corresponding to current_data.q (only in 2d).

    +
    + +
    +
    +xlower :
    +

    left edge of current patch.

    +
    + +
    +
    +ylower :
    +

    left edge of current patch in y (only in 2d).

    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/developers.html b/v5.10.x/developers.html new file mode 100644 index 0000000000..10fa4e78fc --- /dev/null +++ b/v5.10.x/developers.html @@ -0,0 +1,601 @@ + + + + + + + + + Developers’ Guide — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Developers’ Guide

    +

    See also the following pages from Developers’ resources:

    + + +
    +

    Guidelines for contributing

    +

    When preparing contributions, please follow the guidelines in +contribution. Also:

    +
    +
      +
    • If the planned changes are substantial or will be backward-incompatible, +it’s best to discuss them on the claw-dev Google group before starting.

    • +
    • Make sure all tests pass and all the built-in examples run correctly.

    • +
    • Be verbose and detailed in your commit messages and your pull request.

    • +
    • It may be wise to have one of the maintainers look at your changes before +they are complete +(especially if the changes will necessitate modifications of tests +and/or examples).

    • +
    • If your changes are not backward-compatible, your pull request should +include instructions for users to update their own application codes.

    • +
    +
    +
    +

    Reporting and fixing bugs

    +

    If you find a bug, post an issue with as much explanation as possible on the +appropriate issue tracker (for instance, the PyClaw issue tracker is at +https://github.com/clawpack/pyclaw/issues. If you’re looking +for something useful to do, try tackling one of the issues listed there.

    +
    +
    +

    Developer communication

    +

    Developer communication takes place on the google group at +http://groups.google.com/group/claw-dev/, and (increasingly) within the issue +trackers on Github.

    +
    +
    +
    +

    Installation instructions for developers

    +
    +

    Cloning the most recent code from Github

    +

    You can create a read-only development version of Clawpack via:

    +
    git clone https://github.com/clawpack/clawpack.git
    +cd clawpack
    +git submodule init
    +git submodule update
    +
    +
    +

    Note: The https://github.com… form of specifying a remote +clones the repository in a form that does not allow pushing to it +(unlike the git@github.com:… form). This is good practice, so +you do not accidently try to push to the main clawpack repository +rather than to your own fork (see Adding your fork as a remote below if you +need your own fork, e.g. for issuing pull requests).

    +

    The commands above download the following clawpack modules as subrepositories +checked out at specific commits (as opposed to the tip of a branch).

    + +

    This should give a snapshot of the repositories that work well together. +(Note that there are many inter-dependencies between code in the +repositories and checking out a different commit in one repository may break +things in a different repository.)

    +

    Before proceeding, it is necessary to make sure you have a few +other packages installed that are now listed in $CLAW/requirements-dev.txt +(currently on the master branch and to appear in v5.10.0):

    +
    pip install -r requirements-dev.txt
    +
    +
    +

    Now install this version of Clawpack using:

    +
    pip install --no-build-isolation -e ./
    +
    +
    +

    The -e flag means that this is an editabl version of the Clawpack code +(rather than installing the original version in the site-packages +directory).

    +

    If you want to use the Fortran versions in classic, amrclaw, geoclaw, +etc., you need to set environment variables and proceed as described at +Set environment variables.

    +
    +
    +

    Checking out the master branch on each repository

    +

    Following the instructions above gives you a top level $CLAW directory +that is checked out to the tip of the master branch, and each subrepository +will be checked out to a particular commit as specified by this master +branch. For development work, You probably want to check out each +subrepository to the master branch as well. The shell script +$CLAW/pull_all.sh can be used to do this for all subrepositories (or look +at this file to see how to do it more selectively). At a shell prompt, +type:

    +
    source pull_all.sh
    +
    +
    +

    which will check out master on each repository and then do a git pull to +make sure it is up to date. If you do this shortly after cloning all the +repositories, they should all have been up to date already.

    +
    +
    +

    Updating to the latest master branch

    +

    The script pull_all.sh can be used at any time to check out all +subrepositories to master and do a git pull. This is handy if you want to +make sure your version of master is up to date in every repository.

    +

    You should first make sure that you do not have uncommitted changes in any +repository that might conflict with the git checkout master or +git pull commands. You can do this easily with the command:

    +
    python $CLAW/clawutil/src/python/clawutil/claw_git_status.py
    +
    +
    +

    and then check the files claw_git_status.txt and claw_git_diffs.txt, +which summarize the status of each subrepository.

    +
    +
    +

    Never commit to master

    +

    You should never commit to master, only to a feature branch, so +the master branch should always reflect what’s in the master branch on +the primary Github repositories.

    +

    You can update master to reflect any changes via the above approach (for +all subrepositories at once), or do git checkout master and then git +pull within any of the subrepositories separately.

    +
    +
    +

    Adding your fork as a remote

    +

    If you plan to make changes and issue pull requests to one or more +repositories, you will need to do the following steps for each such +repository:

    +
      +
    1. Go to http://github.com/clawpack and fork the repository to your own +Github account. (Click on the repository name and then the Fork button +at the top of the screen.)

    2. +
    3. Add a remote pointing to your repository. For example, if you have +forked the amrclaw repository to account username, you would do:

      +
      cd amrclaw
      +git remote add username git@github.com:username/amrclaw.git
      +
      +
      +

      provided you have ssh keys set up, or else:

      +
      +

      git remote add username https://github.com/username/amrclaw.git

      +
      +

      if you don’t mind having to type your password whenever you push or pull.

      +

      You should push only to this remote, not to origin, e.g.:

      +
      git push username
      +
      +
      +
    4. +
    +

    You might also want to clone some or all of the following repositories:

    + +

    These are not brought over by cloning the top clawpack super-repository. +You can get one of these in read-only mode by doing, e.g.:

    +
    git clone https://github.com/clawpack/doc.git
    +
    +
    +

    Then go through the above steps to add your own fork as a remote +if you plan to modify code and issue pull requests.

    +

    Note: The https://github.com… form of specifying a remote +clones the repository in a form that does not allow pushing to it +(unlike the git@github.com:… form). This is good practice, so +you do not accidently try to push to the main clawpack repository +rather than to your own fork.

    +
    +
    +
    +

    Modifying code

    +

    Before making changes, make sure master is up to date:

    +
    git checkout master
    +git pull
    +
    +
    +

    Then create a new branch based on master for any new commits:

    +
    git checkout -b new_feature master
    +
    +
    +

    Now make changes, add and commit them, +and then push to your own fork:

    +
    # make some changes
    +# git add the modified files
    +git commit -m "describe the changes"
    +
    +git push username new_feature
    +
    +
    +

    If you want these changes pulled into master, +you can issue a pull request from the github page for your fork of this +repository (make sure to select the correct branch of your repository).

    +

    Note: If you accidentally commit to master rather than creating a +feature branch first, you can easily recover:

    +
    git checkout -b new_feature
    +
    +
    +

    will create a new branch based on the current state and history (including +your commits to master) and you can just continue adding additional +commits.

    +

    The only problem is your master branch no longer agrees with the history +on Github and you want to throw away the commits you made to master. The +easiest way to do this is just to make sure you’re on a different branch, +e.g.,

    +
    git checkout new_feature
    +
    +
    +

    and then:

    +
    git branch -D master
    +git checkout -b master origin/master
    +
    +
    +

    This deletes your local branch named master and recreates a branch with +the same name based on origin/master, which is what you want.

    +
    +

    Issuing a pull request

    +

    Before issuing a pull request, you should make sure you have not broken +anything:

    +
      +
    1. Make sure you are up to date with master:

      +
      git checkout master
      +git pull
      +
      +
      +

      If this does not say “Already up-to-date” then you might want to rebase +your modified code onto the updated master. With your feature branch +checked out, you can see what newer commits have been added to master +via:

      +
      git checkout new_feature
      +git log HEAD..master
      +
      +
      +

      If your new feature can be added on to the updated master, you can rebase:

      +
      git rebase master
      +
      +
      +

      which gives a cleaner history than merging the branches.

      +
    2. +
    3. Run the appropriate regression tests. If you have modified code +in pyclaw or riemann, then you should run the pyclaw tests. First, +if you have modified any Fortran code, you need to recompile:

      +
      cd clawpack/
      +pip install --user --no-build-isolation -e ./
      +
      +
      +

      Then run the tests:

      +
      cd pyclaw
      +nosetests
      +
      +
      +

      If any tests fail, you should fix them before issuing a pull request.

      +
    4. +
    +

    To issue a pull request (PR), go to the Github page for your fork of the +repository in question, select the branch from which you want the pull +request to originate, and then click the Pull Request button.

    +
    +
    +

    Testing a pull request

    +

    To test out someone else’s pull request, follow these instructions: +For +example, if you want to try out a pull request coming from a branch named +bug-fix from user rjleveque to the master branch of +the amrclaw repository, you would do:

    +
    cd $CLAW/amrclaw   # (and make sure you don't have uncommitted changes)
    +git checkout master
    +git pull  # to make sure you are up to date
    +
    +git checkout -b rjleveque-bug-fix master
    +git pull https://github.com/rjleveque/amrclaw.git bug-fix
    +
    +
    +

    This puts you on a new branch of your own repository named +rjleveque-bug-fix that has the proposed changes pulled into it.

    +

    Once you are done testing, you can get rid of this branch via:

    +
    git checkout master
    +git branch -D rjleveque-bug-fix
    +
    +
    +
    +
    +

    Top-level pull requests

    +

    The top level clawpack repository keeps track of what versions of the +subrepositories work well together.

    +

    If you make pull requests in two different repositories that are linked, say +to both pyclaw and riemann, then you should also push these changes to +the top-level clawpack repository and issue a PR for this change:

    +
    cd $CLAW   # top-level clawpack repository
    +git checkout master
    +git pull
    +git checkout -b pyclaw-riemann-changes
    +git add pyclaw riemann
    +git commit -m "Cross-update pyclaw and riemann."
    +git push username pyclaw-riemann-changes
    +
    +
    +
    +
    +

    Git workflow

    +

    See git-resources for useful links.

    +
    +
    +
    +

    Catching errors with Pyflakes and Pylint

    +

    Pyflakes and Pylint are Python packages designed to help you catch errors or +poor coding practices. To run pylint on the whole PyClaw package, do:

    +
    cd $PYCLAW
    +pylint -d C pyclaw
    +
    +
    +

    The -d option suppresses a lot of style warnings, since PyClaw doesn’t +generally conform to PEP8. To run pylint on just one module, use something +like:

    +
    pylint -d C pyclaw.state
    +
    +
    +

    Since pylint output can be long, it’s helpful to write it to an html file +and open that in a web browser:

    +
    pylint -d C pyclaw.state -f html > pylint.html
    +
    +
    +

    Pyflakes is similar to pylint but aims only to catch errors. If you +use Vim, there is a nice extension package +pyflakes.vim +that will catch errors as you code and underline them in red.

    +
    +
    +

    Checking test coverage

    +

    You can use nose to see how much of the code is covered by the current +suite of tests and track progress if you add more tests

    +
    nosetests --with-coverage --cover-package=pyclaw --cover-html
    +
    +
    +

    This creates a set of html files in ./cover, showing exactly which lines +of code have been tested.

    +
    +
    +

    Trouble-Shooting Tips

    +

    If you are having trouble installing or building Clawpack try out some of the +following tips:

    +
    +
      +
    • Check to see if you have set the environment variable FFLAGS which may be +overriding flags that need to be set. This is especially important to check +when building the PyClaw fortran libraries as a number of flags must be set +for the Python bindings and will override the defaults.

    • +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/docker_image.html b/v5.10.x/docker_image.html new file mode 100644 index 0000000000..b1a4fb128b --- /dev/null +++ b/v5.10.x/docker_image.html @@ -0,0 +1,338 @@ + + + + + + + + + Docker for Clawpack — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Docker for Clawpack

    +

    Rather than installing Clawpack and all its dependencies on your computer, if +you have Docker installed then you can now use a +docker image from the DockerHub Clawpack repositories.

    +
    +

    Using Version 5.9.0 or above

    +

    A new docker image has been created for v5.9.x. This image includes +Clawpack v5.9.0 and a number of packages of primary interest to GeoClaw users.

    +

    It also now includes the packages and files needed to execute the +Jupyter notebooks from the book +Riemann Problems and Jupyter Solutions. +These notebooks can be found in the riemann_book directory.

    +
    +
    +

    Getting started

    +

    To download an image:

    +
    $ docker pull clawpack/v5.9.0_dockerimage:release
    +
    +
    +

    To create a container and run it:

    +
    $ docker run -i -t -p 8889:8889 --name clawpack-v5.9.0_container \
    +    clawpack/v5.9.0_dockerimage:release
    +
    +
    +

    You can change the container name if you wish, and also the port 8889 (on +which jupyter notebooks might be served, see below).

    +

    You should now see a prompt like:

    +
    jovyan $
    +
    +
    +

    indicating that you are in the container, logged in as user jovyan.

    +

    Once logged in to the container, you should find a directory +$HOME/clawpack-v5.9.0 that contains the Clawpack installation (including the +current master branch of the Clawpack Applications repository).

    +
    +
    +

    Stopping a container

    +

    You can exit a container (after using ctrl-C to quit the jupyter server if +one is running) via:

    +
    exit
    +
    +
    +

    at the jovyan $ prompt.

    +
    +
    +

    Restarting a container

    +

    You can restart the container via:

    +
    docker start -a -i clawpack-v5.9.0_container
    +
    +
    +
    +
    +

    Running Jupyter notebooks

    +

    The form of run command suggested above also allows you to run Jupyter +notebooks from port 8889 on your own computer (or whatever port you +specified when creating the container).

    +

    To start the sever, in the docker container (at the jovyan $ prompt) +run this command:

    +
    jupyter notebook --ip=0.0.0.0 --port=8889 --no-browser
    +
    +
    +

    Then open a browser (on the host machine) to:

    +
    http://localhost:8889/?token=TOKEN
    +
    +
    +

    replacing TOKEN with the token that should have printed out when you started +the server.

    +

    This will open to the top level of $HOME, and you can then navigate to +wherever the notebooks are you want to run, e.g. the sample ones in the +apps repository can be found at clawpack-v5.9.0/apps/notebooks.

    +

    PyClaw users might want to start with +clawpack-v5.9.0/apps/notebooks/pyclaw/Acoustics-1D.ipynb.

    +

    GeoClaw users might want to try running +clawpack-v5.9.0/apps/notebooks/geoclaw/chile2010a.ipynb, +which exercises most aspects of GeoClaw.

    +
    +
    +

    Moving files between the docker container and the host machine

    +

    Often you want to run the code on Docker and then transfer the resulting output +files, and/or the plots generated, back to the host machine (e.g. some +directory on your laptop). You can use the –volume flag when running a +container to accomplish this, see +docker volume documentation.

    +

    For example, if you have created a directory $HOME/docker/volumes/work +on your computer (it can have a different name but should be in +$HOME/docker/volumes/) then adding:

    +
    -v $HOME/docker/volumes/work:/home/jovyan/work
    +
    +
    +

    to your docker run command will map this directory to /home/jovyan/work in +the docker container. So you can move Clawpack output or plots to that directory +in order to have access to them from your host computer.

    +

    Putting this together with previous options, here’s a sample command +that creates and runs a geoclaw-based container with this mapping +and also allowing us to start a Jupyter server:

    +
    $ docker run -i -t -p 8889:8889 \
    +  -v $HOME/docker/volumes/work:/home/jovyan/work \
    +  --name clawpack-v5.9.0_container \
    +  clawpack/v5.9.0_geoclaw_dockerimage
    +
    +
    +
    +
    +

    Some other useful docker commands

    +

    See the docker command line documentation +or any of the tutorials available on-line for more details, but here are a +few particularly useful commands:

    +
    docker help
    +docker info
    +
    +docker ps -a  # list all containsers
    +docker rm clawpack-v5.7.1_container  # remove a container
    +
    +docker images -a  # list all images
    +docker rmi clawpack/v5.7.1_dockerimage:release  # remove an image
    +docker prune  # remove all images not used by any container
    +
    +
    +
    +
    +

    Creating your own docker image

    +

    If you want to create a new docker image that includes other software in +addition to Clawpack, you can find the Dockerile used to create the docker +image on dockerhub in the repository +https://github.com/clawpack/docker-files.

    +

    This might be useful if you want to distribute your own code that depends on +Clawpack in a form that’s easy for others to use.

    +

    You can also create a Dockerfile that uses the already-build Clawpack 5.9.0 +on Dockerhub by starting the Dockerfile with:

    +
    FROM clawpack/v5.9.0_dockerimage:release
    +
    +
    +

    and then adding anything addition you want in the image, +such as other Python modules you need or your own application code. +You may need to specify USER root in order to install some things, and +then switch back to USER jovyan at the end. For an example, see how +clawpack/docker-files/Dockerfile_v5.7.0_geoclaw +is built on top of clawpack/v5.7.0_dockerimage:release.

    +
    +
    +

    Dockerfiles for binder

    +

    The username jovyan was chosen so that you can use this docker image also for +starting up a Jupyter notebook server on binder. You can do this by +including a simple Dockerfile at the top level of your repository that +uses the dockerhub image, as above. See this repository for a simple example: +https://github.com/rjleveque/test_binder.

    +

    The repository for the book Riemann Problems and Jupyter Solutions also uses this approach.

    +

    See the binder documentation +for more details on using Dockerfiles there.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/dtopotools_module.html b/v5.10.x/dtopotools_module.html new file mode 100644 index 0000000000..9b0cb3377e --- /dev/null +++ b/v5.10.x/dtopotools_module.html @@ -0,0 +1,1153 @@ + + + + + + + + + dtopotools module for moving topography — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    dtopotools module for moving topography

    +

    See also Earthquake sources: Fault slip and the Okada model for a discussion of the subfault parameters required +for the Okada model of seafloor deformation resulting from slip on a +specified fault plane.

    +
    +

    Warning

    +

    Starting in Version 5.5.0, the subfault parameter rise_time +now refers to the total rise time of a subfault, while rise_time_starting +is the rise time up to the break in the piecewise quadratic +function defining the rise. By default rise_time_ending is set equal to +rise_time_starting. See the module function rise_fraction below +for more description. (In earlier versions, rise_time read in from csv +files, for example, was erroneously interpreted as rise_time_starting +is now.)

    +
    +

    The notebook dtopotools_examples.ipynb +illustrates how to use some of the tools.

    +

    The notebook Okada.ipynb +illustrates the Okada model using some of these tools.

    +

    The file $CLAW/geoclaw/tests/test_dtopotools.py contains some tests of these +tools. Looking at these test routines may also give some ideas on +how to use them.

    +
    +

    Documentation auto-generated from the module docstrings

    +

    GeoClaw dtopotools Module $CLAW/geoclaw/src/python/geoclaw/dtopotools.py

    +

    Module provides several functions for dealing with changes to topography +(usually due to earthquakes) including reading sub-fault specifications, +writing out dtopo files, and calculating Okada based deformations.

    +
    +
    Classes:
    +
      +
    • DTopography

    • +
    • SubFault

    • +
    • Fault

    • +
    • UCSBFault

    • +
    • CSVFault

    • +
    • SiftFault

    • +
    • SegmentedPlaneFault

    • +
    • Fault1d

    • +
    • SubFault1d

    • +
    • DTopography1d

    • +
    +
    +
    Functions:
    +
      +
    • plot_dz_contours

    • +
    • plot_dz_colors

    • +
    • Mw

    • +
    • strike_direction

    • +
    • rise_fraction

    • +
    +
    +
    +
    +
    +class clawpack.geoclaw.dtopotools.CSVFault(subfaults=None, input_units={}, coordinate_specification=None)
    +

    Fault subclass for reading in CSV formatted files

    +

    Assumes that the first row gives the column headings

    +
    +
    +read(path, input_units={}, coordinate_specification='top center', rupture_type='static', verbose=False)
    +

    Read in subfault specification at path.

    +

    Creates a list of subfaults from the subfault specification file at +path.

    +
    + +
    + +
    +
    +class clawpack.geoclaw.dtopotools.DTopography(path=None, dtopo_type=None)
    +

    Basic object representing moving topography

    +
    +
    +dZ_at_t(t)
    +

    Interpolate dZ to specified time t and return deformation.

    +
    + +
    +
    +dZ_max()
    +

    Return max(abs(dZ)) over all dz in self.dZ, the maximum +surface deformation for this dtopo. +DEPRECATE? – it’s now a 1-liner

    +
    + +
    +
    +plot_dZ_colors(t, axes=None, cmax_dZ=None, dZ_interval=None, colorbar_ticksize=10, colorbar_labelsize=10, fig_kwargs={})
    +

    Interpolate self.dZ to specified time t and then call module function +plot_dZ_colors.

    +
    + +
    +
    +plot_dZ_contours(t, dZ_interval=0.5, axes=None, fig_kwargs={})
    +

    Interpolate self.dZ to specified time t and then call module function +plot_dZ_contours.

    +
    + +
    +
    +read(path=None, dtopo_type=None, verbose=False)
    +

    Read in a dtopo file and use to set attributes of this object.

    +
    +
    Input:
    +
      +
    • path (path) - Path to existing dtopo file to read in.

    • +
    • +
      dtopo_type (int) - Type of topography file to read. Default is 3

      if not specified or apparent from file extension.

      +
      +
      +
    • +
    +
    +
    +
    + +
    +
    +write(path=None, dtopo_type=None)
    +

    Write out subfault resulting dtopo to file at path.

    +
    +
    Input:
    +
      +
    • path (path) - Path to the output file to written to.

    • +
    • dtopo_type (int) - Type of topography file to write out. Default +is 3.

    • +
    +
    +
    +
    + +
    + +
    +
    +class clawpack.geoclaw.dtopotools.DTopography1d(path=None, dtopo_type=None)
    +

    Basic object representing moving topography in 1d

    +
    +
    +dZ_at_t(t)
    +

    Interpolate dZ to specified time t and return deformation.

    +
    + +
    +
    +dZ_cellave_at_t(t, celledges)
    +

    Interpolate dZ to specified time t and return deformation.

    +
    + +
    +
    +read(path=None, dtopo_type=None, verbose=False)
    +

    Read in a dtopo file and use to set attributes of this object.

    +
    +
    Input:
    +
      +
    • path (path) - Path to existing dtopo file to read in.

    • +
    • +
      dtopo_type (int) - Type of topography file to read. Default is 3

      if not specified or apparent from file extension.

      +
      +
      +
    • +
    +
    +
    +
    + +
    +
    +write(path=None, dtopo_type=None)
    +

    Write out subfault resulting dtopo to file at path.

    +
    +
    Input:
    +
      +
    • path (path) - Path to the output file to written to.

    • +
    • dtopo_type (int) - Type of topography file to write out. Default +is 3.

    • +
    +
    +
    +
    + +
    + +
    +
    +class clawpack.geoclaw.dtopotools.Fault(subfaults=None, input_units={}, coordinate_specification=None)
    +

    Base Fault class

    +

    A class describing a fault possibly composed of subfaults.

    +
    +
    Properties:
    +

    +
    Initialization:
    +

    +
    Examples:
    +

    +
    +
    +
    +Mo()
    +

    Calculate the seismic moment for a fault composed of subfaults, +in units N-m.

    +
    + +
    +
    +Mw()
    +

    Calculate the moment magnitude for a fault composed of subfaults.

    +
    + +
    +
    +containing_rect()
    +

    Find containing rectangle of fault in x-y plane.

    +

    Returns tuple of x-limits and y-limits.

    +
    + +
    +
    +create_dtopo_xy(rect=None, dx=0.016666666666666666, buffer_size=0.5)
    +

    Create coordinate arrays containing fault with a buffer.

    +
    +
    Input:
    +
      +
    • +
      rect - if None, use self.containing_rect

      Otherwise a list [x1,x2,y1,y2]

      +
      +
      +
    • +
    • dx (int) - Spatial resolution. Defaults to 1” resolution.

    • +
    • buffer_size (float) - Buffer distance around edge of fault in +degrees, defaults to 0.5 degrees.

    • +
    +
    +
    Output:
    +
      +
    • x,y 1-dimensional arrays that cover the desired rect. +They start at (x1,y1) and may go a bit beyond (x2,y2) depending on dx

    • +
    +
    +
    +
    + +
    +
    +create_dtopography(x, y, times=[0.0, 1.0], verbose=False)
    +

    Compute change in topography and construct a dtopography object.

    +

    Use subfaults’ okada routine and add all +deformations together.

    +

    Raises a ValueError exception if the rupture_type is an unknown type.

    +

    returns a :class`DTopography` object.

    +
    + +
    +
    +plot_subfaults(axes=None, plot_centerline=False, slip_color=False, cmap_slip=None, cmin_slip=None, cmax_slip=None, slip_time=None, plot_rake=False, xylim=None, plot_box=True, colorbar_shrink=1, verbose=False, colorbar_labelsize=10, colorbar_ticksize=10)
    +

    Plot each subfault projected onto the surface.

    +

    axes can be passed in to specify the matplotlib.axes.AxesSubplot +on which to add this plot. If axes == None, a new figure window +will be opened. The axes on which it is plotted is the return +value of this call.

    +

    If plot_centerline == True, plot a line from the centroid to the +top center of each subfault to show what direction is up-dip.

    +

    If slip_color == True then use the color map cmap_slip +(which defaults to matplotlib.cm.jet) to color the subplots based +on the magnitude of slip, scaled between cmin_slip and cmax_slip. +(If these are None then scaled automatically based on range of slip.) +If slip_time == None then colors are based on the final slip. +For dynamic faults, slip_time can be set to a time and the +dynamic timing of each subfault will be used to compute and +plot the slip at this time.

    +

    If plot_rake == True, plot a line from the centroid pointing in +the direction of the rake (the direction in which the top block is +moving relative to the lower block. The distance it moves is given +by the slip.)

    +

    xylim can be set to a list or tuple of length 4 of the form +[x1,x2,y1,y2] to specify the x- and y-axis limits.

    +

    If plot_box == True, a box will be drawn around each subfault.

    +
    + +
    +
    +plot_subfaults_depth(axes=None)
    +

    Plot the depth of each subfault vs. x and vs. y in a second plot.

    +
    + +
    +
    +read(path, column_map, coordinate_specification='centroid', rupture_type='static', skiprows=0, delimiter=None, input_units={}, defaults=None)
    +

    Read in subfault specification at path.

    +

    Creates a list of subfaults from the subfault specification file at +path.

    +
    +
    Inputs:
    +
      +
    • path (str) file to read in, should contain subfaults, one per line

    • +
    • column_map (dict) specifies mapping from parameter to the column +of the input file that contains values for this parameter, e.g.

      +
      +

      column_map = {“latitude”:0, “longitude”:1, “depth”:2, “slip”:3, +“rake”:4, “strike”:5, “dip”:6}

      +
      +
    • +
    • coordinate_specification (str) specifies the location on each +subfault that corresponds to the (longitude,latitude) and depth +of the subfault. See the documentation for +SubFault.calculate_geometry.

    • +
    • rupture_type (str) either “static” or “kinematic”

    • +
    • skiprows (int) number of header lines to skip before data

    • +
    • delimiter (str) e.g. ‘,’ for csv files

    • +
    • +
      input_units (dict) indicating units for length, width, slip, depth,

      and for rigidity mu as specified in file. These +will be converted to “standard units”.

      +
      +
      +
    • +
    • +
      defaults (dict) default values for all subfaults, for values not

      included in subfault file on each line.

      +
      +
      +
    • +
    +
    +
    +
    + +
    +
    +set_dynamic_slip(t)
    +

    Set slip_at_dynamic_t attribute of all subfaults to slip at the +requested time t.

    +
    +
    Input:
    +
      +
    • t (float) -

    • +
    +
    +
    +

    Raises a ValueError exception if this object’s rupture_type attribute +is set to static.

    +
    + +
    +
    +write(path, style=None, column_list=None, output_units={}, delimiter='  ')
    +

    Write subfault format file with one line for each subfault. +Can either specify a style that determines the columns, +or a column_list. Must specify one but not both. See below for +details.

    +
    +
    Inputs:
      +
    • path (str) file to write to.

    • +
    • style (str) to write in a style that matches standard styles +adopted by various groups. One of the following:

      +
      +
        +
      • “usgs” (Not implemented)

      • +
      • “noaa sift” (Not implemented)

      • +
      • “ucsb” (Not implemented)

      • +
      +
      +
    • +
    • column_list (list) specifies what order the parameters should +be written in the output file, e.g.

      +
      +

      column_list = [‘longitude’,’latitude’,’length’,’width’, +‘depth’,’strike’,’rake’,’dip’,’slip’]

      +
      +
    • +
    • output_units (dict) specifies units to convert to before writing. +Defaults to “standard units”.

    • +
    • delimiter (str) specifies delimiter between columns, e.g. +“,” to create a csv file. Defaults to “ “.

    • +
    +
    +
    +
    + +
    + +
    +
    +class clawpack.geoclaw.dtopotools.Fault1d(subfaults=None, input_units={}, coordinate_specification=None)
    +

    Base Fault1d class

    +

    A class describing a 1d fault possibly composed of subfaults.

    +
    + +
    +
    +clawpack.geoclaw.dtopotools.Mw(Mo, units='N-m')
    +

    Calculate moment magnitude based on seismic moment Mo. +Follows USGS recommended definition from

    +
    +
    +

    The SubFault and Fault classes each have a function Mo to compute +the seismic moment for a single subfault or collection respectively.

    +
    + +
    +
    +class clawpack.geoclaw.dtopotools.SiftFault(sift_slip=None, longitude_shift=0.0)
    +

    Define a fault by specifying the slip on a subset of the SIFT unit sources. +The database is read in by load_sift_unit_sources. +See http://www.pmel.noaa.gov/pubs/PDF/gica2937/gica2937.pdf +for a discussion of these unit sources, although the database used +is more recent than what is reported in that paper and uses different +notation for the subfault names. +The subfault database used was downloaded from

    +
    +
    +

    Example:

    +
    >>> sift_slip = {'acsza1':2, 'acszb1':3}
    +>>> fault = SiftFault(sift_slip)
    +
    +
    +

    results in a fault with two specified subfaults with slip of 2 and 3 meters.

    +
    +
    +set_subfaults(sift_slip)
    +
    +
    sift_slip (dict) is a dictionary with key = name of unit source

    and value = magnitude of slip to assign (in meters).

    +
    +
    +
    + +
    + +
    +
    +class clawpack.geoclaw.dtopotools.SubFault
    +

    Basic sub-fault specification.

    +

    Locate fault plane in 3D space +Note that the coodinate specification is in reference to the fault

    +
    +
    Coordinates of Fault Plane:
    +

    +
    +

    The attributes centers and corners are described by the figure below.

    +
    +
    centers[0,1,2] refer to the points labeled 0,1,2 below.

    In particular the centroid is given by centers[1]. +Each will be a tuple (x, y, depth).

    +
    +
    corners[0,1,2,3] refer to the points labeled a,b,c,d resp. below.

    Each will be a tuple (x, y, depth).

    +
    Top edge    Bottom edge
    +  a ----------- b          ^ 
    +  |             |          |         ^
    +  |             |          |         |
    +  |             |          |         | along-strike direction
    +  |             |          |         |
    +  0------1------2          | length  |
    +  |             |          |
    +  |             |          |
    +  |             |          |
    +  |             |          |
    +  d ----------- c          v
    +  <------------->
    +       width
    +
    +  <-- up dip direction
    +
    +
    +
    +
    +
    +
    +Mo()
    +

    Calculate the seismic moment for a single subfault

    +

    Returns in units of N-m and assumes mu is in Pascals.

    +
    + +
    +
    +calculate_geometry()
    +

    Calculate the fault geometry.

    +

    Routine calculates the class attributes corners and +centers which are the corners of the fault plane and +points along the centerline respecitvely in 3D space.

    +

    Note: self.coordinate_specification specifies the location on each +subfault that corresponds to the (longitude,latitude) and depth +of the subfault. +Currently must be one of these strings:

    +
    +
      +
    • “bottom center”: (longitude,latitude) and depth at bottom center

    • +
    • “top center”: (longitude,latitude) and depth at top center

    • +
    • “centroid”: (longitude,latitude) and depth at centroid of plane

    • +
    • +
      “noaa sift”: (longitude,latitude) at bottom center, depth at top,

      This mixed convention is used by the NOAA SIFT +database and “unit sources”, see: +http://nctr.pmel.noaa.gov/propagation-database.html

      +
      +
      +
    • +
    • +
      “top upstrike corner”: (longitude,latitude) and depth at

      corner of fault that is both updip and upstrike.

      +
      +
      +
    • +
    +
    +

    The Okada model is expressed assuming (longitude,latitude) and depth +are at the bottom center of the fault plane, so values must be +shifted or other specifications.

    +
    + +
    +
    +calculate_geometry_triangles()
    +

    Calculate geometry for triangular subfaults

    +
      +
    • Uses corners to calculate centers, longitude, latitude, +depth, strike, dip, length, width.

    • +
    • sets coordinate_specification as “triangular”

    • +
    • Note that calculate_geometry() computes +long/lat/strike/dip/length/width to calculate centers/corners

    • +
    +
    + +
    +
    +property centers
    +

    Coordinates along the center-line of the fault plane.

    +
    + +
    +
    +convert_to_standard_units(input_units, verbose=False)
    +

    Convert parameters from the units used for input into the standard +units used in this module.

    +
    + +
    +
    +coordinate_specification
    +

    Specifies where the latitude, longitude and depth are measured from.

    +
    + +
    +
    +property corners
    +

    Coordinates of the corners of the fault plane.

    +
    + +
    +
    +depth
    +

    Depth of subfault based on coordinate_specification in meters.

    +
    + +
    +
    +dip
    +

    Subfault’s angle of dip

    +
    + +
    +
    +dynamic_slip(t)
    +

    For a dynamic fault, compute the slip at time t. +Assumes the following attributes are set:

    +
    +
      +
    • rupture_time

    • +
    • rise_time

    • +
    • rise_time_starting: optional, defaults to rise_time/2

    • +
    • rise_shape: optional, defaults to quadratic

    • +
    +
    +
    + +
    +
    +property gauss_pts
    +

    Coordinates along the center-line of the fault plane.

    +
    + +
    +
    +latitude
    +

    Latitutde of the subfault based on coordinate_specification.

    +
    + +
    +
    +length
    +

    Length of subfault in meters.

    +
    + +
    +
    +longitude
    +

    Longitude of the subfault based on coordinate_specification.

    +
    + +
    +
    +mu
    +

    Rigidity (== shear modulus) in Pascals.

    +
    + +
    +
    +okada(x, y)
    +

    Apply Okada to this subfault and return a DTopography object.

    +
    +
    Input:
    +
      +
    • x,y are 1d arrays

    • +
    +
    +
    Output:
    +
      +
    • +
      DTopography object with dZ array of shape (1,len(x),len(y))

      with single static displacement and times = [0.].

      +
      +
      +
    • +
    +
    +
    +

    Currently only calculates the vertical displacement.

    +

    Okada model is a mapping from several fault parameters +to a surface deformation. +See Okada 1985 [Okada85], or Okada 1992, Bull. Seism. Soc. Am.

    +

    okadamap function riginally written in Python by Dave George for +Clawpack 4.6 okada.py routine, with some routines adapted +from fortran routines written by Xiaoming Wang.

    +

    Rewritten and made more flexible by Randy LeVeque

    +

    Note: self.coordinate_specification (str) specifies the location on +each subfault that corresponds to the (longitude,latitude) and depth +subfault.

    +

    See the documentation for SubFault.calculate_geometry for dicussion of the +possible values self.coordinate_specification can take.

    +
    + +
    +
    +rake
    +

    Rake of subfault movement in degrees.

    +
    + +
    +
    +rise_shape
    +

    Shape of rise, ‘linear’ or ‘quadratic’ (piecewise)

    +
    + +
    +
    +rise_time
    +

    Total rise time of subfault (sec)

    +
    + +
    +
    +rise_time_starting
    +

    Optional time of first part of rise, before break in pw smooth rise

    +
    + +
    +
    +rupture_time
    +

    Time subfault starts to rupture (sec)

    +
    + +
    +
    +rupture_type
    +

    Either ‘static’ or ‘kinematic’

    +
    + +
    +
    +set_corners(corners, projection_zone=None)
    +

    Set three corners for a triangular fault. +:Inputs:

    +
      +
    • corners should be iterable of length 3.

    • +
    • rake should be between -180. and 180.

    • +
    +
    + +
    +
    +slip
    +

    Slip on subfault in strike direction in meters.

    +
    + +
    +
    +strike
    +

    Strike direction of subfault in degrees.

    +
    + +
    +
    +width
    +

    Width of subfault in meters.

    +
    + +
    + +
    +
    +class clawpack.geoclaw.dtopotools.SubFault1d(strike=0, length=1000000.0)
    +
    +
    +coordinate_specification
    +

    location of x0: ‘top center’, ‘centroid’, or ‘bottom center’

    +
    + +
    +
    +latitude
    +

    latitude where placed on sphere to use 2d routines

    +
    + +
    +
    +length
    +

    length (m) in strike direction orthogonal to x

    +
    + +
    +
    +longitude
    +

    longitude at location specified by coordinate_specification

    +
    + +
    +
    +rake
    +

    rake=90 ==> top at right if strike=0, at left if strike=180

    +
    + +
    +
    +strike
    +

    rake=90, so top at right if strike=0, at left if strike=180

    +
    + +
    + +
    +
    +class clawpack.geoclaw.dtopotools.SubdividedPlaneFault(base_subfault, nstrike=1, ndip=1, slip_function=None, Mo=None)
    +

    Define a fault by starting with a single fault plane (specified as +base_subfault of class SubFault) and subdividing the fault plane +into a rectangular array of nstrike by ndip equally sized subfaults.

    +

    By default,the slip on each subfault will be initialized to +base_subfault.slip so that the slip is uniform over the original plane +and the seismic moment is independent of the number of subdivisions.

    +

    Alternatively, the slip distribution can be specified by providing a +function slip_distribution, which should be a function of (xi,eta) +with each variable ranging from 0 to 1. xi varies from 0 at the top +of the fault to 1 at the bottom in the down-dip direction. +eta varies from one edge of the fault to the other moving in the +strike direction. This function will be evaluated at the centroid of +each subfault to set the slip.

    +

    Can also specify a desired seismic moment Mo in which case the slips will +be rescaled at the end so the total seismic moment is Mo. In this case +the slip_distribution function only indicates the relative slip +between subfaults.

    +
    +
    +subdivide(nstrike=1, ndip=1, slip_function=None, Mo=None)
    +

    Subdivide the fault plane into nstrike * ndip subfaults.

    +
    + +
    + +
    +
    +class clawpack.geoclaw.dtopotools.TensorProductFault(fault_plane, slip_along_strike=None, slip_down_dip=None, nstrike=1, ndip=1, Mo=None)
    +

    Define a fault by starting with a single fault plane (specified as +fault_plane of class SubFault) and subdividing the fault plane +into a rectangular array of nstrike by ndip equally sized subfaults.

    +

    Then define the slip on each subfault via +two one-dimensional functions slip_along_strike and +slip_down_dip that specify the slip as a function of fractional +distance in the along-strike and down-dip direction respectively +(i.e. the argument of each goes from 0 to 1).

    +

    Setting either to None defaults to constant function 1.

    +

    The slip is set by evaluating the tensor product at the centroid of +each subfault.

    +

    Can specify a desired seismic moment Mo in which case the slips will +be rescaled at the end.

    +
    + +
    +
    +class clawpack.geoclaw.dtopotools.UCSBFault(path=None, **kwargs)
    +

    Fault subclass for reading in subfault format models from UCSB

    +

    Read in subfault format models produced by Chen Ji’s group at UCSB, +downloadable from:

    +
    +
    +
    +
    +read(path, rupture_type='static')
    +

    Read in subfault specification at path.

    +

    Creates a list of subfaults from the subfault specification file at +path.

    +

    Subfault format contains info for dynamic rupture, so can specify +rupture_type = ‘static’ or ‘kinematic’ (or ‘dynamic’ for backward +compatibility).

    +
    + +
    + +
    +
    +clawpack.geoclaw.dtopotools.plot_dZ_colors(x, y, dZ, axes=None, cmax_dZ=None, dZ_interval=None, add_colorbar=True, verbose=False, colorbar_labelsize=10, colorbar_ticksize=10, fig_kwargs={})
    +

    Plot sea floor deformation dZ as colormap with contours

    +
    + +
    +
    +clawpack.geoclaw.dtopotools.plot_dZ_contours(x, y, dZ, axes=None, dZ_interval=0.5, verbose=False, fig_kwargs={})
    +

    For plotting seafloor deformation dZ

    +
    + +
    +
    +clawpack.geoclaw.dtopotools.rise_fraction(t, rupture_time, rise_time, rise_time_starting=None, rise_shape='quadratic')
    +

    A continuous piecewise quadratic or linear function of t that is

    +
    +
      +
    • 0 for t <= rupture_time,

    • +
    • 1 for t >= rupture_time + rise_time

    • +
    +
    +
    +
    Inputs:
    +

    +
    +
      +
    • t (scalar, list, or np.array): times at which to evaluate the +rise function.

    • +
    • rupture_time (float): time (seconds) when rupture starts.

    • +
    • rise_time (float): duration of rupture (seconds).

    • +
    • rise_time_starting (float or None): If None, it is internally set to +rise_time/2.

    • +
    • rise_shape (str): +If rise_shape == “quadratic”, the rise time function is piecewise quadratic, +continuously differentiable, with maximum slope at +t = rupture_time + rise_time_starting +and zero slope at t = rupture_time and t = rupture_time + rise_time. +If rise_shape == “linear”, the rise time function is piecewise linear, +with value 0.5 at +t = rupture_time + rise_time_starting.

    • +
    +
    +
    Outputs:
    +

    +
    +

    rf (float or np.array): The rise time function evaluated at t. +If the input is a list or tuple of times, returns a numpy array.

    +
    + +
    +
    +clawpack.geoclaw.dtopotools.strike_direction(x1, y1, x2, y2)
    +

    Calculate strike direction between two points. +Actually calculates “initial bearing” from (x1,y1) in direction +towards (x2,y2), following +http://www.movable-type.co.uk/scripts/latlong.html

    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/f77_vs_f90.html b/v5.10.x/f77_vs_f90.html new file mode 100644 index 0000000000..e907e9b8d5 --- /dev/null +++ b/v5.10.x/f77_vs_f90.html @@ -0,0 +1,176 @@ + + + + + + + + + Fortran 77 vs. Fortran 90 files — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Fortran 77 vs. Fortran 90 files

    +
      +
    • Summarize differences between .f and .f90 files.

    • +
    • Describe what happens if filename.f and filename.f90 exist in the same +directory.

    • +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/fgmax.html b/v5.10.x/fgmax.html new file mode 100644 index 0000000000..445eb630d5 --- /dev/null +++ b/v5.10.x/fgmax.html @@ -0,0 +1,572 @@ + + + + + + + + + Fixed grid monitoring (fgmax) — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Fixed grid monitoring (fgmax)

    +
    +

    Warning

    +

    This feature has been modified and this documentation describes +the version introduced in 5.7.0.

    +
    +

    See also:

    +
    +
    +
    +

    GeoClaw has the capability to monitor the maximum value of +certain quantities on a specified fixed +“fgmax grid” by interpolating from the AMR grids active at each time step, +or at specified time increments. +This is useful in particular to record the maximum flow depth observed at +each point over the course of a computation, or the maximum flow velocity, +momentum, or momentum flux. These quantities are often of interest in +hazard modeling.

    +

    It is also possible to record the arrival time of a flow or wave at each +point on the grid.

    +

    The “grids” do not have to be rectangular grids aligned with the +coordinate directions, but can consist of an arbitrary list of points +that could also be points along a one-dimensional transect or points +following a coastline, for example. It is also possible to specify logically +rectangular grids of points covering an arbitrary quadrilateral.

    +

    New in v5.7.0: One can also specify a set of fgmax point by providing a +data file in the style of a topography DEM file with topo_type==3, but in +which the values provided are either 0 or 1 instead of topography values, with +1 indicating that a point should be used as an fgmax point, 0 indicating it +should not be used. This is particularly convenient if you want to select +fgmax points that are a subset of points on a DEM. This option is described +more below under point_style==4.

    +

    New in v5.7.0: Most fgmax information is now most easily set +in setrun.py and is written out to the file fgmax_grids.data +when this script is executed, e.g. by “make data”. The information +required is described below. See also Fixed grid maximum monitoring / arrival times.

    +

    This is an improved version of the algorithms used in much earlier versions of +GeoClaw, and now +correctly interpolates when a grid point lies near the junction of two +grid patches, which was not always handled properly before. +The earlier version can still be used for outputing results at intermediate +times on a fixed grid (see Fixed grid output (fgout)), but is not recommended for the purpose +of monitoring maxima or arrival times.

    +
    +

    Input file specification

    +

    (Changed in Clawpack 5.7.0.)

    +

    The GeoClaw Fortran code reads in one or more files that specify grid(s) for +monitoring values during the computation.

    +

    The fgmax grid(s) are specified to GeoClaw in +setrun.py by setting rundata.fgmax_data.fgmax_grids +to be a list of objects of class fgmax_tools.FGmaxGrid. +The order the files appear in this list determines the number assigned to +this grid (starting with 1) that may be needed for processing or plotting +the results. The output appears in files such as _output/fgmax0001.txt.

    +

    New in v5.7.0: You can now assign numbers to each fgmax gauge +using the fgno attribute, described below, rather than being numbered +sequentially by order specified in the setrun.py file.

    +

    Currently at most 50 fgmax grids are allowed by default. If you need more, +you can adjust the parameter FG_MAXNUM_FGRIDS in +$CLAW/geoclaw/src/2d/shallow/fgmax_module.f90 and the do make new to +recomile everything that depends on this module.

    +

    Each fgmax_tools.FGmaxGrid object (fg, for example) +describing a grid of points has the following attributes:

    +
    fg.fgno
    +fg.tstart_max
    +fg.tend_max
    +fg.dt_check
    +fg.min_level_check
    +fg.arrival_tol
    +fg.interp_method
    +fg.point_style
    +
    +
    +

    These are explained further below.

    +

    Additional attributes depend on the value of fg.point_style.

    +
    +

    Different point styles

    +

    If `fg.point_style == 0`, an arbitrary collection of (x,y) points is allowed. +In this case you can either set

    +
    +

    fg.npts

    +
    +

    to the number of points and

    +
    +

    fg.X +fg.Y

    +
    +

    to lists (or numpy arrays) of the coordinates, or you can set

    +
    +

    fg.npts = 0

    +
    +

    and set

    +
    +

    fg.xy_file

    +
    +

    to a string with the path to a file of the form:

    +
    +

    npts # number of points +x1 y1 # first point +x2 y2 # second point +… # etc.

    +
    +

    These points need not lie on a regular grid and can be specified in any order.

    +

    If `point_style == 1`, a 1-dimensional transect of points is specified by +the attributes:

    +
    fg.npts       # number of points to generate
    +fg.x1, fg.y1     # first point
    +fg.x2, fg.y2     # last point
    +
    +
    +

    If `point_style == 2`, a 2-dimensional cartesian of points is specified by +the attributes:

    +
    fg.nx, fg.ny     # number of points in x and y  (nx by ny grid)
    +fg.x1, fg.y1     # lower left corner of cartesian grid
    +fg.x2, fg.y2     # upper right corner of cartesian grid
    +
    +
    +

    If `point_style == 3`, a 2-dimensional logically rectangular array +of points is specified by the attributes:

    +
    fg.n12, fg.n23     # number of points along adjacent edges (see below)
    +fg.x1, fg.y1       # first corner of grid
    +fg.x2, fg.y2       # second corner of grid
    +fg.x3, fg.y3       # third corner of grid
    +fg.x4, fg.y4       # fourth corner of grid
    +
    +
    +

    The corners should define a convex quadrilateral (ordered clockwise around the +perimeter). An array of points will be defined as the intersection points of +two sets of lines. The first set is obtained by connecting n12 +equally spaced points on the side from (x1,y1) to (x2,y2) with the same +number of points equally spaced on the side from (x3,y3) to (x4,y4). +The second set of lines is obtained by connecting n23 equally spaced +points on the side from (x2,y2) to (x3,y3) with the same +number of points equally spaced on the side from (x4,y4) to (x1,y1)

    +

    If `point_style == 4`, a file is expected that has the form of a +topofile with topo_type == 3 as described in Topography data. +This file has a header that describes a uniform 2d grid of points, followed +by one line for each row of the grid (moving from north to south). +Unlike a standard topofile, the values are not topography elevations, +however, but are either 1 or 0, with the value 1 indicating that this point +should be used as an fgmax point.

    +

    Other tools are available to construct such a file by preprocessing a +topography DEM and selecting only the points that satisfy certain criteria. +For example, if we only want to capture onshore inundation depths and it is +known that regions above a certain elevation will always stay dry, then we +may want to select only points that are onshore and below this elevation. +See Marching Front algorithm for more details and examples.

    +
    +
    +

    Other attributes

    +

    The standard required attributes for any fgmax_tools.FGmaxGrid object are:

    +
    +
      +
    • fgno : int

      +

      The number of this fgmax grid, should be a positive integer with at most +4 digits since the output file will then have the form fgmax0001.txt, +for example, if fgno = 1. If these are not specified then they will +be numbered sequentially based on the order they are specified +in the fgmax_grids list.

      +
    • +
    • tstart_max : float

      +

      Starting time to monitor maximum. Often we only want to monitor on the +finest grids around the location of interest, and only after waves arrive, +and this can be chosen correspondingly.

      +
    • +
    • tend_max : float

      +

      Ending time to monitor maximum. Set to e.g. 1e9 to monitor until end +of simulation

      +
    • +
    • dt_check : float

      +

      Time increment for monitoring maximum and arrivals. +Interpolate to fixed grid and +update values only if the time since the last updating exceeds this time +increment. Set to 0 to monitor every time step.

      +
    • +
    • min_level_check : integer

      +

      Minimum AMR level to check for updating the maximum value observed and +the arrival time. +Care must be taken in selecting this value since the maximum observed +when interpolating to a point from a coarse AMR level may be much larger +than the value that would be seen on a fine grid that better resolves the +topography at this point. Often AMR “regions” are used to specify that a +fine grid at some level L should always be used in the region of +interest over the time period from start_max to tend_max, and then +it is natural to set min_level_check to L.

      +

      But also note that if we monitor over multiple levels then we also keep +track of what level the current maximum was computed on. If the level +at this point is greater than the level used for the current maximum +(because new finer grids were introduced since the last monitor time) +then the old maximum is discarded and the current value as used as to +reinitialize the maximum at this point.

      +
    • +
    • arrival_tol : float

      +

      The time reported as the “arrival time” is the first time the value +of the surface elevation is greater than sea_level + arrival_tol.

      +

      Note that this captures the first positive wave but doesn’t capture +the time of arrival of the first wave if it is a leading depression +rather than a positive wave.

      +
    • +
    • interp_method : int

      +

      The method to be used to interpolate from finite volume cell averages +in GeoClaw to pointwise values at the fgmax points.

      +

      The default is 0, meaning we take the value directly from the cell +average in the grid cell containing the fgmax point (zero-order piecewise +constant interpolation).

      +

      Setting to 1 will instead use bilinear interpolation between 4 cell +centers. This is not recommended since it can give spurious results near +the margins of the flow. See below, Choice of interpolation procedure.

      +
    • +
    +
    +
    +
    +
    +

    Values to monitor

    +

    The values to be monitored are specified by the subroutine fgmax_values. +The default subroutine found in the library +$CLAW/geoclaw/src/2d/shallow/fgmax_values.f90 +is now set up to monitor the +depth h (rather than the value eta_tilde used in Version 5.1) +and optionally will also monitor the speed \(s = \sqrt{u^2 + v^2}\) +and three other quantities (the momentum \(hs\), +the momentum flux \(hs^2\), and \(-h\), which is useful to monitor +the minimum depth at each point, e.g. in a harbor where ships may be grounded).

    +

    The values monitored by the default routine described above is determined +by the value of the fgmax_module variable FG_NUM_VAL, which can be set +to 1, 2, or 5. This value is read in from the data file fgmax_grids.data +and can be set by specifying the value of +rundata.fgmax_data.num_fgmax_val in setrun.py.

    +
    +
    +

    Choice of interpolation procedure

    +

    Before v5.7.0, the choice of interpolation procedure was governed by use of +the library routine geoclaw/src/2d/shallow/fgmax_interpolate.f90 (for +bilinear interpolation) or geoclaw/src/2d/shallow/fgmax_interpolate0.f90 (for +constant interpolation).

    +

    Starting in v5.7.0, there is a single library routine +geoclaw/src/2d/shallow/fgmax_interp.f90 and the choice is controlled by +the fg.interp_method parameter described above.

    +

    Setting fg.interp_method = 0 is recommended since +interpolating the fluid depth and the topography +separately and then computing the surface elevation by adding these +may give unrealistic high values. See Nearshore interpolation.

    +
    +
    +

    A simple example

    +

    This is taken from +$CLAW/geoclaw/examples/tsunami/radial-ocean-island-fgmax/setrun.py, where +other point styles are also illustrated:

    +
    from clawpack.geoclaw import fgmax_tools
    +
    +# Points on a uniform 2d grid:
    +fg = fgmax_tools.FGmaxGrid()
    +fg.point_style = 2  # uniform rectangular x-y grid
    +fg.x1 = 14.25
    +fg.x2 = 14.65
    +fg.y1 = 50.10
    +fg.y2 = 50.35
    +fg.dx = 15/ 3600.  # desired resolution of fgmax grid
    +fg.min_level_check = amrdata.amr_levels_max # which levels to monitor max on
    +fg.tstart_max = 8000.  # just before wave arrives
    +fg.tend_max = 1.e10    # when to stop monitoring max values
    +fg.dt_check = 20.      # how often to update max values
    +fg.interp_method = 0   # 0 ==> pw const in cells, recommended
    +rundata.fgmax_data.fgmax_grids.append(fg)  # written to fgmax_grids.data
    +
    +
    +
    +
    +

    Processing and plotting fgmax output

    +

    After GeoClaw has run, the output directory should contain +files of this form for each fgmax grid:

    +
    +
      +
    • fgmax0001.txt

    • +
    +
    +

    Note: This file format is new in Version 5.7.0. Previously two files +such as fort.FG1.valuemax and fort.FG1.aux1 were created to each +fgmax grid. Now the topo value at each grid point is included along with +the max values in the single file.

    +

    If more than one fgmax grid was specified by rundata.fgmax_data.fgmax_grids +then there will be similar files fgmax0002.txt, etc. +They will be numbered in the order they appear in the list of input files in +setrun.py unless you explicitly set fg.fgno in which case these numbers +will be used.

    +

    These files are most easily dealt with using fgmax_tools module for working with fgmax grids by +defining an object of class fgmax_tools.FGmaxGrid and using the +class function read_output to read the output.

    +

    For examples, see fgmax examples.

    +
    +
    +

    Format of the output files

    +

    The paragraphs below describe in more detail the structure of the output files +for users who need to process them differently.

    +

    If point_style == 0 for a grid then the points will be listed in the same +order as specified in the input file. For other values of point_style +(1-dimensional transects or 2-dimensional arrays) the values will be output in +a natural order.

    +

    In all cases the first two columns of each output file are +the longitude and latitude of the point.

    +

    The columns of fgmax0001.txt contain the following values, where N refers +to the number of quantities of interest being monitored, as specified +by rundata.fgmax_data.num_fgmax_val and described further below:

    +
    +
      +
    • Column 1: longitude

    • +
    • Column 2: latitude

    • +
    • Column 3: AMR level

    • +
    • Column 4: topo value B

    • +
    • Columns 5 to 5+N: maximum value recorded of each QoI

    • +
    • Columns 6+N to 5+2N: time max value was recorded

    • +
    • Column 6+2N: arrival time

    • +
    +
    +

    The AMR level is the level of finest level grids covering this fgmax point +at the time the maximum was recorded.

    +

    The “topo value B” is the value of the GeoClaw topography B +interpolated to the fgmax point on this AMR level (with the method +of interpolation being specified by fg.interp_method, as for the values).

    +

    The value of N above is assumed to be 1, 2, or 5 in the default +routines, as specified in setrun.py by the value of +rundata.fgmax_data.num_fgmax_val. The quantities monitored are:

    +
    +
      +
    • +
      If rundata.fgmax_data.num_fgmax_val == 1:
        +
      • Column 5 contains maximum value of depth h,

      • +
      • Column 6 contains time of maximum h.

      • +
      +
      +
      +
    • +
    • +
      If rundata.fgmax_data.num_fgmax_val == 2:
        +
      • Column 5 contains maximum value of depth h,

      • +
      • Column 6 contains maximum value of speed,

      • +
      • Column 7 contains time of maximum h,

      • +
      • Column 8 contains time of maximum speed.

      • +
      +
      +
      +
    • +
    • +
      If rundata.fgmax_data.num_fgmax_val == 5:
        +
      • Columns 5,6,7,8,9 contain maximum value depth, speed, momentum, momentum +flux, and hmin, respectively,

      • +
      • Columns 10,11,12,13,14 contain times the maximum was recorded, for each +value above.

      • +
      +
      +
      +
    • +
    +
    +

    The last column of fgmax0001.txt contains the arrival time of the wave +at this grid point, as determined by the tolerance arrival_tol specified in +the input file. The time reported as the “arrival time” is the first time the +value of the surface elevation is greater than sea_level + arrival_tol. +Points where this value is -0.99999000E+99 never met this criterion, perhaps +because the point was never inundated.

    +
    +
    +

    fgmax examples

    +

    For an example of how to process and plot the fgmax results, see the +notebook make_input_files.ipynb in the directory +$CLAW/geoclaw/examples/tsunami/radial-ocean-island-fgmax +or the rendered version linked from the +README +in the GeoClaw Gallery

    +

    For another examples, see +$CLAW/geoclaw/examples/tsunami/chile2010_fgmax-fgout and +its README.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/fgmax_tools_module.html b/v5.10.x/fgmax_tools_module.html new file mode 100644 index 0000000000..ce0740d19f --- /dev/null +++ b/v5.10.x/fgmax_tools_module.html @@ -0,0 +1,291 @@ + + + + + + + + + fgmax_tools module for working with fgmax grids — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    fgmax_tools module for working with fgmax grids

    + +
    +

    Documentation auto-generated from the module docstrings

    +

    fgmax_tools module: $CLAW/geoclaw/src/python/geoclaw/fgmax_tools.py

    +

    Tools to specify an fgmax grid for keeping track of maximum flow depth, etc. +and to read in the fgmax output after doing a GeoClaw run.

    +
    +
    +class clawpack.geoclaw.fgmax_tools.FGmaxGrid
    +

    New class introduced in 5.2.1 to keep store information both about the +fgmax input data and the output generated by a GeoClaw run.

    +
    +
    +bounding_box()
    +

    Return the bounding box of the grid as a list [x1,x2,y1,y2]

    +
    + +
    +
    +interp_dz(dtopo_path, dtopo_type)
    +

    Compute approximate values of deformation dz on X,Y grid using +a specified dtopo file. +Also calculates B0 = B - dz, attempting to recover the pre-event +topography from the GeoClaw run topography stored in B.

    +
    + +
    +
    +ps4_to_arrays(verbose=True)
    +

    for point_style==4, convert lists of fgmax values into masked arrays +based on the topo_style==3 file self.xy_fname that was used to specify +the fgmax points in the GeoClaw run.

    +
    + +
    +
    +read_fgmax_grids_data(fgno, data_file='fgmax_grids.data')
    +

    Read input info for fgmax grid number fgno from the data file +fgmax_grids.data, which should have been created by setrun.py. +This file now contains info about all fgmax grids.

    +
    + +
    +
    +read_output(fgno=None, outdir=None, verbose=True, indexing='ij')
    +

    Read the GeoClaw results on the fgmax grid numbered fgno.

    +
    +
    indexing=’ij’ gives backward compatibility.

    X[i,j],Y[i,j] corresponds to point x[i],y[j]

    +
    +
    +

    Alternatively, can set indexing==’xy’ so that X,Y and other +arrays have same layout as topo arrays:

    + +
    +

    X[j,i],Y[j,i] corresponds to point x[i],y[j]

    +
    + +

    This is useful if you want to save the fgmax results in same format as +topofiles, using topotools.Topography.write().

    +
    + +
    +
    +write_to_fgmax_data(fid)
    +

    Write the fgmax grid data to the file specified by fid, normally +the fgmax_grids.data file that is read in by the GeoClaw Fortran code.

    +
    + +
    + +
    +
    +clawpack.geoclaw.fgmax_tools.adjust_fgmax_1d(x1_desired, x2_desired, x1_domain, dx)
    +

    Adjust the upper and lower limits of a grid so that equally spaced +grid points with spacing dx lie exactly at cell centers, so that +no interpolation is needed for fgmax values. Note that parameter +names refer to x limits, but works equally well for y values.

    +
    +
    Input:
    +
      +
    • x1_desired, x2_desired: approximate desired limits of fgmax grid

    • +
    • x1_domain: lower edge of computational domain

    • +
    • dx: Mesh spacing on fine grid that fgmax grid should conform to

    • +
    +
    +
    Output:
    +
      +
    • x1_new, x2_new: limits to set so (x2-x1) is integer multiple +of dx and points are at cell centers of computational grid

    • +
    • npoints: number of points to specify, so that +linspace(x1_new, x2_new, npoints) gives points with spacing `dx.

    • +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/fgout.html b/v5.10.x/fgout.html new file mode 100644 index 0000000000..58abed49e4 --- /dev/null +++ b/v5.10.x/fgout.html @@ -0,0 +1,436 @@ + + + + + + + + + Fixed grid output (fgout) — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Fixed grid output (fgout)

    +

    New in v5.9.0:

    +

    See also:

    +
    +
    +
    +

    GeoClaw has the capability to output the results at specified output times +on a specified “fixed grid” by interpolating from the AMR grids active at each +output time.

    +

    This complements the normal output frame capabilities of Clawpack, +and has several advantages for some applications, particularly when +making animations or when using the GeoClaw solution as input to +another process, such as particle tracking.

    +

    Advantages include:

    +
    +

    1. The solution is output on a fixed uniform grid at each fgout +time, independent of the AMR structure. This is useful in order +to produce a set of frames for an animation that are all the same +resolution with the same size array.

    +

    2. It is possible to produce fgout outputs at times that do not +coincide with the time steps of the computation, whereas standard +frame output can only occur at the end of a time step on the coarsest +level. Hence fgout output does not require reducing the time step to hit +the fgout times exactly, which would cause significant increase in +computing time and possible degradation of the computed solution +if the coarse grid time steps had to be greatly reduced to match +frequent output times in a finely resolved region.

    +

    3. When exploring the solution or making an animation over one +small portion of the computational domain, it is possible to +create an fgout grid that only covers this region at the desired +resolution and does not require output of the entire AMR structure +over the entire computational domain at each output time. +This can greatly reduce the size of the output in some cases.

    +

    4. If an fgout grid is output with sufficiently fine temporal resolution, +then this set of data can be used to explore the solution in various ways +using post-processing. For example, it is possible to spatially +interpolate to any desired location within the grid and produce a time +series of the solution at this point. This would be similar to the gauge +output produced by GeoClaw, but would allow specifying the point of +interest after the fact, whereas standard gauages must be specified in +advance of the GeoClaw run (see Gauges). Similarly, the fluid +velocities computed from GeoClaw can be used to track particles (as +massless tracer particles for visualization purposes, or with more +complex dynamics for debris tracking). The Python module +fgout_tools module for working with fgout grids provides some tools for interpolating +from fgout frames to arbitrary points (x,y,t).

    +
    +

    The original version of this, capability, originally called fixedgrid +output in Clawpack 4.6 was carried over and existed through v5.8.x, but has +been removed as of Version 5.9.0.

    +

    An improved version for monitoring maximum values and arrival times was +added in v5.7.0, referred to as fgmax grids; see Fixed grid monitoring (fgmax).

    +

    An improved version of the capability to output on a fixed grid at more +frequent times than the standard AMR output has been introduced in v5.9.0, +and these are now called fgout grids to complement the fgmax grids. +These fgout grids are described further below.

    +
    +

    Input file specification

    +

    The GeoClaw Fortran code reads in one or more files that specify fgout grids +grid(s) for writing out the solution on a fixed grid throughout +the computation.

    +

    The desired fgout grid(s) are specified to GeoClaw in setrun.py, +by setting rundata.fgout_data.fgout_grids to be a list of objects +of class fgout_tools.FGoutGrid. +After doing make data or make .output, these are written out +to fgout_grids.data, the file that is read by the Fortran code at runtime.

    +

    More than one fgout grid can be specified, and an integer label with at +most 4 digits can be assigned to each grid. You can assign numbers +to each fgout grid using the fgno attribute, described below. +If you do not assign numbers, they will be numbered sequentially (1,2, etc.) +based on the order they are specified in the setrun.py file.

    +
    +
    +

    A simple example

    +

    Here’s an example of how one grid can be set up:

    +
    from clawpack.geoclaw import fgout_tools
    +
    +fgout_grids = rundata.fgout_data.fgout_grids  # empty list initially
    +
    +fgout = fgout_tools.FGoutGrid()
    +fgout.fgno = 1
    +fgout.output_format = 'binary32'
    +fgout.nx = 200
    +fgout.ny = 250
    +fgout.x1 = -115.
    +fgout.x2 = -70.
    +fgout.y1 = -55.
    +fgout.y2 = -10.
    +fgout.tstart = 0.
    +fgout.tend = 6.*3600
    +fgout.nout = 37
    +fgout_grids.append(fgout)
    +
    +
    +

    This specifies output on a 200 by 250 grid of equally spaced points on the +rectangle [-115, -70] x [-55, -10]. (Note that these values are cell +edges, the actual fgout points will be at cell centers, +displaced from these edges. See fgout grid registration below.)

    +

    The output times are equally spaced +from tstart = 0 to tend = 6*3600 (6 hours). +There will be 37 total outputs, so one every 10 minutes.

    +

    The parameter fgout.output_format can be set to ‘ascii’, ‘binary32’, +or ‘binary64’, the same options as supported for the standard output in +geoclaw as of v5.9.0. +Usually`’binary32’` is best, which truncates the float64 (kind=8) +computated values in the fortran code to float32 (kind=4) before dumping the +raw binary. This is almost always sufficient precision for plotting or +post-processing needs, and results in smaller files than either of the other +options. This may be particularly important if hundreds of fgout frames +are saved for making an animation or doing particle tracking.

    +
    +
    +

    Format of fgout output

    +

    After GeoClaw has run, the output directory should contain +files of this form for each fgout grid:

    +
    +
      +
    • fgout0001.t0000 # containing info about this output time

    • +
    • fgout0001.q0000 # header (and also data if output_format==’ascii’)

    • +
    • fgout0001.b0000 # data in binary format (only if +output_format==’binary32’ or ‘binary64’)

    • +
    +
    +

    These would be for fgout grid number fgno = 1 at the first output time.

    +

    These files have exactly the same format as the output files produced at +each output time for standard GeoClaw output (and more generally for any +Clawpack output), as described at Output data sytles and formats. The style allows +specifying AMR output in which there are many grids at each output time, +possibly at various refinement levels. +In the case of fgout grids there will always be only a single grid at each +output time, with AMR_level set to 0 in the header files to indicate +that these grids are not part of the general AMR hierarchy.

    +
    +
    +

    Using setplot.py to produce plots

    +

    Since the files have the same format as the usual fort.t, fort.q, and +fort.b files for Clawpack output, it is possible to use a setplot.py +file to set up plotting this sequence of fgout frames in exactly the same +manner as for standard output. The only difference is that it is necessary +to specify that the file names start with fgout… rather than fort.. +This can be done in setplot.py via:

    +
    plotdata.file_prefix = 'fgout0001'  # for fgout grid fgno==1
    +plotdata.format = 'binary32'    # set to match fgout.output_format
    +
    +
    +

    An example is provided in +$CLAW/geoclaw/examples/tsunami/chile2010_fgmax-fgout.

    +
    +
    +

    Reading and plotting fgout arrays directly

    +

    Alternatively, since every output frame consists of only a single uniform +grid of data, it is much easier to manipulate or plot this data directly than +for general AMR data. The fgout_tools.py module described at +fgout_tools module for working with fgout grids provides tools for reading frames and producing +arrays that can then be worked with directly. It also contains tools for +interpolating within these grids in both space and time.

    +

    For example, here’s how to read a frame 5 of an fgout grid set up as above:

    +
    fgno = 1
    +outdir = '_output'
    +output_format = 'binary32'  # format of fgout grid output
    +fgout_grid = fgout_tools.FGoutGrid(fgno, outdir, output_format)
    +
    +fgframe = 5
    +fgout = fgout_grid.read_frame(fgframe)
    +
    +
    +

    Then fgout.X and fgout.Y are 2-dimensional arrays defining the grid +and fgout.q defines the standard GeoClaw q array, with q[0:4,:,:] +corresponding to h, hu, hv, eta, where eta = h+B and B is the topography. +For convenience, additional attributes are defined using lazy +evaluation only if requested by the user, including +h, hu, hv, eta, u, v, s, hss, where s is the speed and +hss is the momentum flux.

    +

    The values in fgout.X and fgout.Y are the cell centers of the fgout +grid, and if you want to plot the q values on this grid you should use +clawpack.visclaw.plottools.pcolorcells, as described at +pcolorcells. For example, here’s a minimalist example of plotting +the water surface eta on top of topography for a single frame of fgout data +as read above:

    +
    from clawpack.visclaw import plottools, geoplot
    +from numpy import ma
    +
    +plottools.pcolorcells(fgout.X,fgout.Y,fgout.B, cmap=geoplot.land_colors)
    +eta = ma.masked_where(fgout.h<0.001, fgout.eta)
    +eta_plot = plottools.pcolorcells(fgout.X,fgout.Y,eta, cmap=geoplot.tsunami_colormap)
    +
    +
    +

    For more detailed examples of plotting, including making animations, +see $CLAW/geoclaw/examples/tsunami/chile2010_fgmax-fgout.

    +
    +
    +

    fgout grid registration

    +

    Note above that fgout points are specified by setting e.g. fgout.x1, +fgout.x2 and fgout.nx in setrun.py. For consistency with the way the +finite volume computational grid is specified in setrun.py +(and written to the output files), +the values x1, x2 are viewed as cell edges and nx is the desired number +of cells (in the x direction). The actual fgout points will be at the +cell centers. So the cell width (= distance between points) +is dx = (x2-x1)/nx, and the first fgout point (cell center) +will have x coordinate x1 + dx/2.

    +

    Solution values at these points are interpolated from the finite volume +GeoClaw solution as described in the next section.

    +
    +
    +

    Choice of interpolation procedure

    +

    The fgout grid need not be aligned with any computational grid, and in general +it may overlap several grids at different AMR resolutions. At each fgout time +requested, the solution is interpolated from the finest available AMR grid +covering each fgout point, at both the last time step before the fgout time +and the first time step after the fgout time.

    +

    The default spatial interpolation method used to assign values to fgout points +at each time step is to assume the computational solution is constant in each +finite volume cell and simply evaluate this value in the finest AMR level +grid cell that includes +the fgout point. This is controlled by the parameter method = 0 in +subroutine fgout_interp in $CLAW/geoclaw/src/2d/shallow/fgout_module.f90. +This is generally recommended rather than setting method = 1, which gives +linear interpolation between finite volume cell centers, because interpolating +h, B, and eta separately near the shore can lead to unphysically large +values of h and/or eta (see Nearshore interpolation).

    +

    Similarly, the temporal intepolation between the two neighboring time steps is +done by simply using the value at the later time step, as controlled by the +parameter method = 0 in the +subroutine fgout_write in $CLAW/geoclaw/src/2d/shallow/fgout_module.f90. +This is generally recommended rather than setting method = 1, which gives +linear interpolation between the times, because interpolating +h, B, and eta separately near the shore can lead to unphysically large +values of h and/or eta (see Nearshore interpolation).

    +

    If you want to change one of these methods, you can make your own version of +fgout_module.f90 and point to this in the Makefile under MODULES= +(see Replacing files with the same name as library files).

    +
    +
    +

    fgout examples

    +

    For some examples, see +$CLAW/geoclaw/examples/tsunami/chile2010_fgmax-fgout. +Sample results appear in the GeoClaw Gallery; +see the +README +for a description and links to the plots and a script for making an animation.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/fgout_tools_module.html b/v5.10.x/fgout_tools_module.html new file mode 100644 index 0000000000..f4e225163c --- /dev/null +++ b/v5.10.x/fgout_tools_module.html @@ -0,0 +1,503 @@ + + + + + + + + + fgout_tools module for working with fgout grids — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    fgout_tools module for working with fgout grids

    +
    +

    See also

    + +
    +
    +

    Documentation auto-generated from the module docstrings

    +

    fgout_tools module: $CLAW/geoclaw/src/python/geoclaw/fgout_tools.py

    +

    Tools to specify and work with fgout grids, used to output GeoClaw solutions +on a fixed grid at a sequence of times, regardless of the AMR structure.

    +

    Includes:

    +
      +
    • class FGoutFrame: used to hold a single frame of fgout output data

    • +
    • +
      class FGoutGrid: used to specify and store info about an fgout grid, with

      methods to read and write info to fgout_grids.data

      +
      +
      +
    • +
    • +
      function make_fgout_fcn_xy: Takes an FGoutFrame object and produces an

      interpolating function that can be evaluated for any (x,y).

      +
      +
      +
    • +
    • +
      function make_fgout_fcn_xyt: Takes 2 FGoutFrame objects and produces an

      interpolating function that can be evaluated for any (x,y,t) +at intermediate times.

      +
      +
      +
    • +
    • +
      function write_netcdf: Write a specified set of qoi’s from a list of

      fgout frames, as a single netCDF file

      +
      +
      +
    • +
    • +
      function read_netcdf: Read a netCDF file and return a list of fgout frames,

      assuming the file contains all the qoi’s needed to reconstruct q.

      +
      +
      +
    • +
    • +
      function read_netcdf_arrays: Read a netCDF file and extract the

      requested quantities of interest as numpy arrays.

      +
      +
      +
    • +
    • +
      print_netcdf_info: Print info about the contents of a netCDF file containing

      some fgout frames.

      +
      +
      +
    • +
    +
    +
    +class clawpack.geoclaw.fgout_tools.FGoutFrame(fgout_grid, frameno=None)
    +

    Class to hold a single frame of fgout data at one output time. +Several attributes are defined as properties that can be evaluated +and stored only when needed by the user.

    +
    +
    +property B
    +

    topography

    +
    + +
    +
    +property eta
    +

    surface eta = h+B

    +
    + +
    +
    +property h
    +

    depth

    +
    + +
    +
    +property hss
    +

    momentum flux h*s**2

    +
    + +
    +
    +property hu
    +

    momentum h*u

    +
    + +
    +
    +property hv
    +

    momentum h*v

    +
    + +
    +
    +property s
    +

    speed s = sqrt(u**2 + v**2)

    +
    + +
    +
    +property u
    +

    speed u, computed as hu/h or set to 0 if h<self.drytol

    +
    + +
    +
    +property v
    +

    speed v, computed as hv/h or set to 0 if h<self.drytol

    +
    + +
    + +
    +
    +class clawpack.geoclaw.fgout_tools.FGoutGrid(fgno=None, outdir=None, output_format=None)
    +

    New class introduced in 5.9.0 to keep store information both about the +fgout input data and the output generated by a GeoClaw run.

    +
    +
    +property X
    +

    2D array X of longitudes (cell centers)

    +
    + +
    +
    +property Y
    +

    2D array Y of latitudes (cell centers)

    +
    + +
    +
    +property extent_centers
    +

    Extent of cell centers [xmin,xmax,ymin,ymax]

    +
    + +
    +
    +property extent_edges
    +

    Extent of cell edges [xmin,xmax,ymin,ymax]

    +
    + +
    +
    +read_fgout_grids_data(fgno=None, data_file='fgout_grids.data')
    +

    Read input info for fgout grid number fgno from the data file +fgout_grids.data, which should have been created by setrun.py. +This file now contains info about all fgout grids.

    +
    + +
    +
    +read_frame(frameno)
    +

    Read a single frame of fgout data.

    +
    + +
    +
    +set_plotdata()
    +

    Create a plotdata, assuming attributes fgno, outdir, output_format +have all been set.

    +
    + +
    +
    +write_to_fgout_data(fid)
    +

    Convert fgout data specified in setrun.py to file fgout_grids.data +read in by GeoClaw fortran code.

    +
    + +
    +
    +property x
    +

    1D array x of longitudes (cell centers)

    +
    + +
    +
    +property y
    +

    1D array y of latitudes (cell centers)

    +
    + +
    + +
    +
    +clawpack.geoclaw.fgout_tools.get_as_array(var, rootgrp, verbose=True)
    +

    Utility function to retrieve variable from netCDF file and convert to +numpy array.

    +
    + +
    +
    +clawpack.geoclaw.fgout_tools.make_fgout_fcn_xy(fgout, qoi, method='nearest', bounds_error=False, fill_value=nan)
    +

    Create a function that can be called at (x,y) and return the qoi +interpolated in space from the fgout array.

    +

    qoi should be a string (e.g. ‘h’, ‘u’ or ‘v’) corresponding to +an attribute of fgout.

    +

    The function returned takes arguments x,y that can be floats or +(equal length) 1D arrays of values that lie within the spatial +extent of fgout.

    +

    bounds_error and fill_value determine the behavior if (x,y) is not in +the bounds of the data, as in scipy.interpolate.RegularGridInterpolator.

    +
    + +
    +
    +clawpack.geoclaw.fgout_tools.make_fgout_fcn_xyt(fgout1, fgout2, qoi, method_xy='nearest', method_t='linear', bounds_error=False, fill_value=nan)
    +

    Create a function that can be called at (x,y,t) and return the qoi +interpolated in space and time between the two frames fgout1 and fgout2.

    +

    qoi should be a string (e.g. ‘h’, ‘u’ or ‘v’) corresponding to +an attribute of fgout.

    +

    method_xy is the method used in creating the spatial interpolator, +and is passed to make_fgout_fcn_xy.

    +

    method_t is the method used for interpolation in time, currently only +‘linear’ is supported, which linearly interpolates.

    +

    bounds_error and fill_value determine the behavior if (x,y,t) is not in +the bounds of the data.

    +

    The function returned takes arguments x,y (floats or equal-length 1D arrays) +of values that lie within the spatial extent of fgout1, fgout2 +(which are assumed to cover the same uniform grid at different times) +and t should be a float that lies between fgout1.t and fgout2.t.

    +
    + +
    +
    +clawpack.geoclaw.fgout_tools.print_netcdf_info(fname_nc)
    +

    Print out info about the contents of a netCDF file contining fgout frames, +written using write_netcdf.

    +
    + +
    +
    +clawpack.geoclaw.fgout_tools.read_netcdf(fname_nc, fgout_grid=None, verbose=True)
    +

    Read a netCDF file and return a list of FGoutFrame instances. +This will only be possible if the netCDF file contains at least +the qoi’s ‘h’,’hu’,’hv’,’eta’ required to reconstruct the q array +as output by GeoClaw.

    +
    + +
    +
    +clawpack.geoclaw.fgout_tools.read_netcdf_arrays(fname_nc, qois, verbose=True)
    +

    Read a netCDF file and extract the quantities of interest denoted by +strings in the list qois, which can include:

    +
    +

    ‘h’, ‘eta’, ‘hu’, ‘hv’, ‘u’, ‘v’, ‘s’, ‘hss’, ‘B’.

    +
    +

    qois can also include the time-independent ‘B0’ and/or ‘Bfinal’

    +

    Returns

    +
    +

    x, y, t, qoi_arrays

    +
    +

    where x,y define the longitude, latitudes, t is the times of the frames, +and qoi_arrays is a dictionary indexed by the strings from qois.

    +

    Each dict element is an array with shape (len(t), len(x), len(y)) +for time-dependent qoi’s, or (len(x), len(y)) for B0 or Bfinal, +or None if that qoi was not found in the netCDF file.

    +
    + +
    +
    +clawpack.geoclaw.fgout_tools.write_netcdf(fgout_frames, fname_nc='fgout_frames.nc', qois=['h', 'hu', 'hv', 'eta'], datatype='f4', include_B0=False, include_Bfinal=False, description='', verbose=True)
    +

    Write a list of fgout frames (at different times on the same rectangular +grid) to a single netCDF file, with some metadata and the topography, +if desired.

    +

    fgout_frames should be a list of FGoutFrame objects, all of the same size +and at increasing times.

    +

    fname_nc is the name of the file to write.

    +
    +
    qois is a list of strings, the quantities of interest to include in file.

    This could include any of:

    +
    +

    ‘h’, ‘eta’, ‘hu’, ‘hv’, ‘u’, ‘v’, ‘s’, ‘hss’, ‘B’.

    +
    +

    All other quantities can be computed from h, hu, hv, eta, +the original fgout variables from GeoClaw, but for some applications +you might only want to save ‘h’ and ‘s’, for example.

    +
    +
    datatype should be ‘f4’ [default] or ‘f8’, specifying bytes per qoi value.

    ‘f8’ has full precision of the original data, but the file will be +twice as large and may not be needed for downstream applications.

    +
    +
    +

    Note that the topography B = eta - h, so it is not necessary to store all +three of these. Also, B is often the same for all frames, so rather than +storing B at each frame as a qoi, two other options are also provided +(and then storing eta or h for all frames allows calculating the other):

    +

    include_Bfinal: If True, include the topography B array from the final frame +as the Bfinal array.

    +

    include_B0: If True, include the topography B array from the first frame +as the B0 array. This is only useful if, e.g., the first frame is initial +topography before co-seismic deformation, and at later times the topography +is always equal to Bfinal.

    +

    description is a string that will be added as metadata. +A metadata field history will also be added, which includes the +time the file was created and the path to the directory where it was made.

    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/first_run.html b/v5.10.x/first_run.html new file mode 100644 index 0000000000..fb8d48adb8 --- /dev/null +++ b/v5.10.x/first_run.html @@ -0,0 +1,270 @@ + + + + + + + + + Running an example — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Running an example

    +

    Many examples of Clawpack simulations can be seen in the Clawpack Gallery.

    +

    See also first_tests.

    +
    +

    PyClaw

    +

    To run an example and plot the results using PyClaw, simply do the following +(starting from your clawpack directory):

    +
    cd pyclaw/examples/euler_2d
    +python shock_bubble_interaction.py iplot=1
    +
    +
    +

    That’s it. For next steps with PyClaw, see PyClaw Basics.

    +
    +
    +

    Classic

    +

    First ensure that you have Set environment variables +and that you have the install_prerequisites.

    +

    A simple 1-dimensional acoustics equations can be solved +using the code in $CLAW/classic/examples/acoustics_1d_example1, as +illustrated in the Gallery of Classic and AMRClaw applications

    +

    Move to this directory via:

    +
    cd $CLAW/classic/examples/acoustics_1d_example1
    +
    +
    +

    You can try the following test in this directory, or you may want to first +make a copy of it (see the instructions in Copying an existing example).

    +

    The Makefiles are set up to do dependency checking so that in many +application directories you can simply type:

    +
    $ make .plots
    +
    +
    +

    and the Fortran code will be compiled, data files created, the code +run, and the results plotted automatically, resulting in a set of webpages +showing the results.

    +

    However, if this is your first attempt to run a code, it is useful to go +through these steps one at a time, both to understand the steps and so that +any problems with your installation can be properly identified.

    +

    You might want to start by examining the Makefile. This sets a number of +variables, which at some point you might need to modify for other examples, +see Clawpack Makefiles for more about this. At the bottom of the Makefile is +an include statement that points to a common Makefile that is used by most +applications, and where all the details of the make process can be found.

    +

    To compile the code, type:

    +
    $ make .exe
    +
    +
    +

    If this gives an error, see Trouble running “make .exe”.

    +

    This should compile the example code (after first compiling the required +library routines) and produce an executable named xclaw in this directory.

    +

    Before running the code, it is necessary to also create a set of data files +that are read in by the Fortran code. This can be done via:

    +
    $ make .data
    +
    +
    +

    If this gives an error, see Trouble running “make .data”.

    +

    This uses the Python code in setrun.py to create data files that have the +form *.data.

    +

    Once the executable and the data files all exist, we can run the code. The +recommended way to do this is to type:

    +
    $ make .output
    +
    +
    +

    If this gives an error, see Trouble running “make .output”.

    +

    Before running the code a subdirectory _output is created +and the output of the code (often a large number of files) is directed to +this subdirectory. This is convenient if you want to do several runs with +different parameter values and keep the results organized. After the code +has run you can rename the subdirectory, or you can modify the variable +OUTDIR in the Makefile to direct results to a different directory. See +Clawpack Makefiles for more details. Copies of all the data files are also +placed in the output directory for future reference.

    +

    Plotting the results. +Once the code has run and the files listed above have been created, there are several +options for plotting the results.

    +

    To try the Python tools, type:

    +
    $ make .plots
    +
    +
    +

    If this gives an error, see Trouble running “make .plots”.

    +

    If this works, it will create a subdirectory named _plots that contains a number of +image files (the *.png files) and a set of html files that can be used to view the +results from a web browser. See plotting_makeplots for more details.

    +

    An alternative is to view the plots from an interactive Python session, as described in +the section Interactive plotting with Iplotclaw.

    +

    If you wish to use Matlab instead, see Plotting using Matlab.

    +

    Other visualization packages could also be used to display the results, but you will need +to figure out how to read in the data. See fortfiles for information about the +format of the files produced by Clawpack.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/first_run_fortran.html b/v5.10.x/first_run_fortran.html new file mode 100644 index 0000000000..f43b4ba43c --- /dev/null +++ b/v5.10.x/first_run_fortran.html @@ -0,0 +1,299 @@ + + + + + + + + + Testing your Fortran installation and running an example — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Testing your Fortran installation and running an example

    +

    This assumes that you have downloaded the Fortran components of Clawpack, +see install_fortran.

    +

    First ensure that you have Set environment variables +and that you have the Installation Prerequisites.

    +

    As a first test of the Fortran code, try the following:

    +
    cd $CLAW/classic/tests
    +nosetests -sv
    +
    +
    +

    (You may need to install nose +if nosetests is not on your system.)

    +

    This will run several tests and compare a few numbers from the solution with +archived results. The tests should run in a few seconds and +you should see output similar to this:

    +
    runTest (tests.acoustics_1d_heterogeneous.regression_tests.Acoustics1DHeterogeneousTest) ... ok
    +runTest (tests.acoustics_3d_heterogeneous.regression_tests.Acoustics3DHeterogeneousTest) ... ok
    +runTest (tests.advection_2d_annulus.regression_tests.Advection2DAnnulusTest) ... ok
    +
    +----------------------------------------------------------------------
    +Ran 3 tests in 4.639s
    +OK
    +
    +
    +

    There are similar tests subdirectories of $CLAW/amrclaw and +$CLAW/geoclaw to do quick tests of these codes.

    +
    +

    Running an example

    +

    Many examples of Clawpack simulations can be seen in the +gallery.

    +
    +
    +

    Classic

    +

    A simple 1-dimensional acoustics equations can be solved +using the code in $CLAW/classic/examples/acoustics_1d_example1.

    +

    Move to this directory via:

    +
    cd $CLAW/classic/examples/acoustics_1d_example1
    +
    +
    +

    You can try the following test in this directory, or you may want to first +make a copy of it (see the instructions in Copying an existing example).

    +

    The Makefiles are set up to do dependency checking so that in many +application directories you can simply type:

    +
    $ make .plots
    +
    +
    +

    and the Fortran code will be compiled, data files created, the code +run, and the results plotted automatically, resulting in a set of webpages +showing the results.

    +

    However, if this is your first attempt to run a code, it is useful to go +through these steps one at a time, both to understand the steps and so that +any problems with your installation can be properly identified.

    +

    You might want to start by examining the Makefile. This sets a number of +variables, which at some point you might need to modify for other examples, +see Clawpack Makefiles for more about this. At the bottom of the Makefile is +an include statement that points to a common Makefile that is used by most +applications, and where all the details of the make process can be found.

    +

    To compile the code, type:

    +
    $ make .exe
    +
    +
    +

    If this gives an error, see Trouble running “make .exe”.

    +

    This should compile the example code (after first compiling the required +library routines) and produce an executable named xclaw in this directory.

    +

    Before running the code, it is necessary to also create a set of data files +that are read in by the Fortran code. This can be done via:

    +
    $ make .data
    +
    +
    +

    If this gives an error, see Trouble running “make .data”.

    +

    This uses the Python code in setrun.py to create data files that have the +form *.data.

    +

    Once the executable and the data files all exist, we can run the code. The +recommended way to do this is to type:

    +
    $ make .output
    +
    +
    +

    If this gives an error, see Trouble running “make .output”.

    +

    Before running the code a subdirectory _output is created +and the output of the code (often a large number of files) is directed to +this subdirectory. This is convenient if you want to do several runs with +different parameter values and keep the results organized. After the code +has run you can rename the subdirectory, or you can modify the variable +OUTDIR in the Makefile to direct results to a different directory. See +Clawpack Makefiles for more details. Copies of all the data files are also +placed in the output directory for future reference.

    +

    Plotting the results. +Once the code has run and the files listed above have been created, there are several +options for plotting the results.

    +

    To try the Python tools, type:

    +
    $ make .plots
    +
    +
    +

    If this gives an error, see Trouble running “make .plots”.

    +

    If this works, it will create a subdirectory named _plots that contains a number of +image files (the *.png files) and a set of html files that can be used to view the +results from a web browser. See plotting_makeplots for more details.

    +

    An alternative is to view the plots from an interactive Python session, as described in +the section Interactive plotting with Iplotclaw.

    +

    If you wish to use Matlab instead, see Plotting using Matlab.

    +

    Other visualization packages could also be used to display the results, but you will need +to figure out how to read in the data. See fortfiles for information about the +format of the files produced by Clawpack.

    +
    +
    +

    More examples

    +

    There are additional examples in these directories:

    +
    +
      +
    • $CLAW/classic/examples

    • +
    • $CLAW/amrclaw/examples

    • +
    • $CLAW/geoclaw/examples

    • +
    +
    +

    You might also want to download the Clawpack Applications repository, which contains additional +examples.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/first_run_pyclaw.html b/v5.10.x/first_run_pyclaw.html new file mode 100644 index 0000000000..da28262f5d --- /dev/null +++ b/v5.10.x/first_run_pyclaw.html @@ -0,0 +1,231 @@ + + + + + + + + + Testing a PyClaw installation and running an example — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Testing a PyClaw installation and running an example

    +

    First ensure that you have Set environment variables and that you have the Installation Prerequisites.

    +

    If you downloaded Clawpack manually, you can test your PyClaw +installation as follows (starting from your clawpack directory):

    +
    cd pyclaw/examples
    +nosetests
    +
    +
    +

    This should return ‘OK’. +(You may need to install nose +if nosetests is not on your system.)

    +
    +

    Running an example

    +

    Many examples of PyClaw simulations can be seen in the +PyClaw gallery +and Jupyter notebook examples.

    +

    You might also want to download the Clawpack Applications repository, which contains additional +examples in apps/notebooks/pyclaw.

    +
    +

    From the Jupyter notebook

    +

    Try any of the notebooks listed under PyClaw in the notebooks.

    +
    +
    +

    From the IPython interpreter

    +

    Launch an IPython session and then:

    +
    from clawpack.pyclaw import examples
    +claw = examples.shock_bubble_interaction.setup()
    +claw.run()
    +claw.plot()
    +
    +
    +
    +
    +

    From the command line

    +

    To run an example and plot the results using PyClaw, simply do the following +(starting from your clawpack directory):

    +
    cd pyclaw/examples/euler_2d
    +python shock_bubble_interaction.py iplot=1
    +
    +
    +

    That’s it. For next steps with PyClaw, see PyClaw Basics.

    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/flagregions.html b/v5.10.x/flagregions.html new file mode 100644 index 0000000000..a53295b32f --- /dev/null +++ b/v5.10.x/flagregions.html @@ -0,0 +1,269 @@ + + + + + + + + + Specifying flagregions for adaptive refinement — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Specifying flagregions for adaptive refinement

    +

    New in Version 5.7.0.

    +

    AMRClaw and GeoClaw version 5.6.1 (and earlier) allow specifying +rectangular refinement regions (see Specifying AMR regions) +in setrun.py, in the form of a list that is appended to +rundata.regiondata.regions:

    +
    rundata.regiondata.regions.append([minlevel,maxlevel,t1,t2,x1,x2,y1,y2])
    +
    +
    +

    This is a region that is active from time t1 to t2 over the +spatial extent [x1,x2,y1,y2].

    +

    Starting in v5.7.0 of AMRClaw/GeoClaw we now support a new approach to +specifying regions that are now called flagregions for more clarity +regarding what they are used for. The new data structure +also supports simple rectangles and so should ultimately replace +regions in both AMRClaw and GeoClaw, but currently you can mix and match.

    +

    The new way of specifying a flag region in setrun.py is to first +define an object flagregion of class clawpack.amrclaw.data.FlagRegion, +set various +attributes of this object (including minlevel, maxlevel, t1, +t2, and a spatial extent), and then append this object to the list +rundata.flagregiondata.flagregions.

    +

    Here is how you would specify a simple rectangle as above in the new +style, chosen to cover the entire spatial domain and to allow only 1 level +everywhere (which might be supplemented by other regions where more levels +are allowed):

    +
    x1,x2,y1,y2 = [rundatat.clawdata.lower[0], rundatat.clawdata.upper[0],
    +               rundatat.clawdata.lower[1], rundatat.clawdata.upper[1]]
    +
    +from clawpack.amrclaw.data import FlagRegion
    +flagregion = FlagRegion(num_dim=2)  # so far only 2D supported
    +flagregion.name = 'Region_domain'
    +flagregion.minlevel = 1
    +flagregion.maxlevel = 1
    +flagregion.t1 = 0.
    +flagregion.t2 = 1e9
    +flagregion.spatial_region_type = 1  # Rectangle
    +flagregion.spatial_region = [x1,x2,y1,y2]
    +rundata.flagregiondata.flagregions.append(flagregion)
    +
    +
    +

    Note that flagregion.spatial_region_type == 1 indicates that the +flagregion is a rectangle.

    +
    +

    Using ruled rectangles as flagregions

    +

    In addition to simple rectangles, more general ruled rectangles can also be +used as flagregions. These are a restricted set of polygons for which it is +easy to test if a point is inside or outside, as described in more detail in +Ruled Rectangles.

    +

    To specify a ruled rectangle, use flagregion.spatial_region_type == 2 +and provide a path to a data file that describes the ruled rectangle. +For simple ruled rectangles the code to create the data file can also be +included in setrun.py.

    +

    Here is an example where a simple ruled rectangle is defined and used as a +flagregion. In this case the flagregion is a trapezoid with vertices +\((1,3),~ (1,6),~ (2,4),~ (2,7)\):

    +
    from clawpack.amrclaw.data import FlagRegion
    +flagregion = FlagRegion(num_dim=2)
    +flagregion.name = 'Region_Trapezoid'
    +flagregion.minlevel = 2
    +flagregion.maxlevel = 3
    +flagregion.t1 = 0.
    +flagregion.t2 = 1e9
    +flagregion.spatial_region_type = 2  # Ruled Rectangle
    +flagregion.spatial_region_file = \
    +    os.path.abspath('RuledRectangle_Trapezoid.data')
    +rundata.flagregiondata.flagregions.append(flagregion)
    +
    +# code to make RuledRectangle_Trapezoid.data:
    +from clawpack.amrclaw import region_tools
    +rr = region_tools.RuledRectangle()
    +rr.method = 1 # piecewiselinear edges between s values
    +rr.ixy = 'x'  # so s refers to x, lower & upper are limits in y
    +rr.s = np.array([1,2])
    +rr.lower = np.array([3,6])
    +rr.upper = np.array([4,7])
    +rr.write('RuledRectangle_Trapezoid.data')  # creates data file
    +
    +
    +

    See the setrun.py file in +$CLAW/amrclaw/examples/advection_2d_flagregions for additional examples.

    +

    See Creating an AMR flag region for a more complex example where a ruled rectangle is +defined that covers a set of fgmax points (see Fixed grid monitoring (fgmax)) defined with the +Marching Front algorithm.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/force_dry.html b/v5.10.x/force_dry.html new file mode 100644 index 0000000000..171078f1e4 --- /dev/null +++ b/v5.10.x/force_dry.html @@ -0,0 +1,500 @@ + + + + + + + + + Force Cells to be Dry Initially — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Force Cells to be Dry Initially

    +

    New in Version 5.7.0.

    +

    Adapted from this notebook.

    +

    See also Marching Front algorithm, which describes a +tool to select points from a topography DEM that satisfy given +constraints on elevation, and how this can be used to determine dry land +behind dikes.

    +

    This can then be used to define an array +that can be read into GeoClaw and used when initializing the water depth +during the creation of new grid patches. +See the section Usage in GeoClaw Fortran code +for instructions on how to specify this in setrun.py.

    +

    We define an rectangular array force_dry_init that is aligned with +cell centers of the computational grid at some resolution (typically the +finest resolution) and that has the value force_dry_init[i,j] = 1 to +indicate cells that should be initialized to dry (h[i,j] = 0) +regardless of the value of the GeoClaw topography B[i,j] in this +cell. If force_dry_init[i,j] = 0 the the cell is initialized in the +usual manner, which generally means

    +

    h[i,j] = max(0, sea_level - B[i,j]).

    +

    Notes:

    +
      +
    • Another new feature allows initializing the depth so that the surface +elevation eta is spatially varying rather than using a single +scalar value sea_level everywhere. That feature is described in +Set Eta Init – spatially varying initial surface elevation. If that is used in +conjunction with a force_dry_init array, +force_dry_init[i,j] = 1 still indicates that the cell should be +dry while elsewhere the “usual” thing is done.

    • +
    • The current implementation allows only one force_dry_init array +but in the future this may be generalized to allow multiple arrays +covering different subsets of the domain, and perhaps at different grid +resolutions.

    • +
    • Typically the force_dry_init array is computed from a DEM file at +the desired resolution, using the marching front algorithm defined in +Marching Front algorithm. But recall that the +GeoClaw topography value B[i,j] does not agree with the DEM value +Z[i,j] even if the cell center is aligned with the DEM point due +to the way B is computed by averaging over piecewise bilinear +functions that interpolate the Z values. So one has to be careful +not to set force_dry_init[i,j] = 1 in a cell close to the shore +simply because Z > 0 at this point since the B value might be +negative in the cell. This is dealt with in the examples below by +doing some buffering.

    • +
    +
    +

    Contents

    + +
    +
    +

    Examples

    +

    First import some needed modules and set up color maps.

    +
    %matplotlib inline
    +
    +
    +
    from pylab import *
    +import os,sys
    +from numpy import ma # masked arrays
    +from clawpack.visclaw import colormaps
    +
    +from clawpack.geoclaw import marching_front, topotools
    +from clawpack.amrclaw import region_tools
    +from clawpack.visclaw import plottools
    +
    +
    +
    zmin = -60.
    +zmax = 40.
    +
    +land_cmap = colormaps.make_colormap({ 0.0:[0.1,0.4,0.0],
    +                                     0.25:[0.0,1.0,0.0],
    +                                      0.5:[0.8,1.0,0.5],
    +                                      1.0:[0.8,0.5,0.2]})
    +
    +sea_cmap = colormaps.make_colormap({ 0.0:[0,0,1], 1.:[.8,.8,1]})
    +
    +cmap, norm = colormaps.add_colormaps((land_cmap, sea_cmap),
    +                                     data_limits=(zmin,zmax),
    +                                     data_break=0.)
    +
    +sea_cmap_dry = colormaps.make_colormap({ 0.0:[1.0,0.7,0.7], 1.:[1.0,0.7,0.7]})
    +cmap_dry, norm_dry = colormaps.add_colormaps((land_cmap, sea_cmap_dry),
    +                                     data_limits=(zmin,zmax),
    +                                     data_break=0.)
    +
    +
    +
    +
    +

    Sample topography from a 1/3 arcsecond DEM

    +

    We consider a small region on the SW coast of Whidbey Island north of +Maxwelton Beach as an example, as was used in +MarchingFront.ipynb.

    +
    region1_png = imread('region1.png')
    +extent = [-122.46, -122.38, 47.93, 47.96]
    +
    +figure(figsize=(12,6))
    +imshow(region1_png, extent=extent)
    +gca().set_aspect(1./cos(48*pi/180.))
    +
    +
    +_images/output_9_0.png +

    We read this small portion of the 1/3 arcsecond Puget Sound DEM, +available from the NCEI thredds server:

    +
    path = 'https://www.ngdc.noaa.gov/thredds/dodsC/regional/puget_sound_13_mhw_2014.nc'
    +topo = topotools.read_netcdf(path, extent=extent)
    +
    +
    +

    Plot the topo we downloaded:

    +
    figure(figsize=(12,6))
    +plottools.pcolorcells(topo.X, topo.Y, topo.Z, cmap=cmap, norm=norm)
    +colorbar(extend='both')
    +gca().set_aspect(1./cos(48*pi/180.))
    +
    +
    +_images/output_13_0.png +

    This plot shows that there is a region with elevation below MHW (0 in +the DEM) where the Google Earth image shows wetland that should not be +initialized as a lake. We repeat the code used in Marching Front algorithm +to identify dry land below MHW:

    +
    wet_points = marching_front.select_by_flooding(topo.Z, Z1=-5., Z2=0., max_iters=None)
    +
    +Zdry = ma.masked_array(topo.Z, wet_points)
    +
    +figure(figsize=(12,6))
    +plottools.pcolorcells(topo.X, topo.Y, Zdry, cmap=cmap, norm=norm)
    +colorbar(extend='both')
    +gca().set_aspect(1./cos(48*pi/180.))
    +title('Dry land');
    +
    +
    +
    Selecting points with Z1 = -5, Z2 = 0, max_iters=279936
    +Done after 112 iterations with 59775 points chosen
    +
    +
    +_images/output_15_2.png +

    Now the blue region above is properly identified as being dry land.

    +

    The colors are misleading, so here’s a way to plot with the dry land +that is below MHW colored pink to distinguish it from the water better:

    +
    # Create a version of topo.Z with all wet points masked out:
    +mask_dry = logical_not(wet_points)
    +Z_dry = ma.masked_array(topo.Z, wet_points)
    +
    +# Create a version of topo.Z with only dry points below MHW masked out:
    +mask_dry_onshore = logical_and(mask_dry, topo.Z<0.)
    +Z_allow_wet= ma.masked_array(topo.Z, mask_dry_onshore)
    +
    +figure(figsize=(10,12))
    +
    +# first plot all dry points as pink:
    +plottools.pcolorcells(topo.X, topo.Y, Z_dry, cmap=cmap_dry, norm=norm_dry)
    +
    +# then plot colored by topography except at dry points below MHW:
    +plottools.pcolorcells(topo.X, topo.Y, Z_allow_wet, cmap=cmap, norm=norm)
    +
    +gca().set_aspect(1./cos(48*pi/180.))
    +ticklabel_format(useOffset=False)
    +xticks(rotation=20);
    +
    +
    +_images/output_17_0.png +
    +
    +

    Creating the force_dry_init array

    +

    The array wet_points generated above has the value 1 at DEM points +identified as wet and 0 at points identified as dry, so if we set

    +
    dry_points = 1 - wet_points
    +
    +
    +

    then dry_points[i,j] = 1 at the DEM points determined to be dry. We +do not necessarily want to force the GeoClaw cell to be dry however at +all these dry points, because the GeoClaw topography value B may be +slightly negative even if the DEM value Z was positive at the same +point, due to the way B is computed, and so this might force some +cells near the shore to have h = 0 even though B < 0.

    +

    Instead we will set force_dry_init[i,j] = 1 only if +dry_points[i,j] = 1 and the same is true of all its 8 nearest +neighbors. This avoids problems near the proper shoreline while forcing +cells inland to be dry where they should be.

    +

    We also assume it is fine to set force_dry_init[i,j] = 0 around the +boundary of the grid on which dry_points has been defined, so that +the usual GeoClaw procedure is used to initialize these points. If there +are points at the boundary that must be forced to be dry that we should +have started with a large grid patch.

    +

    So we can accomplish this by summing the dry_points array over 3x3 +blocks and setting force_dry_init[i,j] = 1 only at points where this +sum is 9:

    +
    dry_points_sum = dry_points[1:-1,1:-1] + dry_points[0:-2,1:-1] + dry_points[2:,1:-1] + \
    +                 dry_points[1:-1,0:-2] + dry_points[0:-2,0:-2] + dry_points[2:,0:-2] + \
    +                 dry_points[1:-1,2:] + dry_points[0:-2,2:] + dry_points[2:,2:]
    +
    +# initialize array to 0 everywhere:
    +force_dry_init = zeros(dry_points.shape)
    +# reset in interior to 1 if all points in the 3x3 block around it are dry:
    +force_dry_init[1:-1,1:-1] = where(dry_points_sum == 9, 1, 0)
    +
    +
    +

    If we use 1-force_dry_init as a mask then we see only the points +forced to be dry:

    +
    Zdry = ma.masked_array(topo.Z, 1-force_dry_init)
    +
    +figure(figsize=(12,6))
    +plottools.pcolorcells(topo.X, topo.Y, Zdry, cmap=cmap, norm=norm)
    +colorbar(extend='both')
    +gca().set_aspect(1./cos(48*pi/180.))
    +title('Points with force_dry_init==1')
    +
    +
    +_images/output_23_1.png +

    This looks a lot like the plot above where we masked with +wet_points. However, if we plot dry_points - force_dry_init we +see that this is not identically zero – and there are points along the +shore and the boundaries where the point was identified as dry but will +not be forced to be dry:

    +
    figure(figsize=(12,6))
    +plottools.pcolorcells(topo.X, topo.Y, dry_points - force_dry_init,
    +                      cmap=colormaps.white_red)
    +colorbar()
    +gca().set_aspect(1./cos(48*pi/180.))
    +axis([-122.461, -122.379, 47.929, 47.961]) # expanded domain
    +title('Points with dry_points - force_dry_init==1');
    +
    +
    +_images/output_25_1.png +
    +
    +

    Create file to read into GeoClaw

    +

    The array force_dry_init can now be saved in the same format as topo +files, using topo_type=3 and specifying Z_format=’%1i’ so that +the data values from the array, which are all either 0 or 1, are printed +as single digits to help reduce the file size.

    +

    Note we also use the new convenience fuction set_xyZ introduced in +topotools.Topography.

    +
    force_dry_init_topo = topotools.Topography()
    +force_dry_init_topo.set_xyZ(topo.x, topo.y, force_dry_init)
    +
    +# Old way of setting x,y,Z:
    +#force_dry_init_topo._x = topo.x
    +#force_dry_init_topo._y = topo.y
    +#force_dry_init_topo._Z = force_dry_init
    +#force_dry_init_topo.generate_2d_coordinates()
    +
    +fname_force_dry_init = 'force_dry_init.data'
    +force_dry_init_topo.write(fname_force_dry_init, topo_type=3, Z_format='%1i')
    +print('Created %s' % fname_force_dry_init)
    +
    +
    +
    Created force_dry_init.data
    +
    +
    +

    As usual, the first 6 lines of this file are the header, which is then +followed by the data:

    +
    864                              ncols
    +324                              nrows
    +-1.224599074275750e+02              xlower
    +4.793009258334999e+01              ylower
    +9.259259000800000e-05              cellsize
    +-9999                          nodata_value
    +
    +
    +
    +
    +

    Usage in GeoClaw Fortran code

    +

    To use a force_dry_init.data file of the sort created above, when +setting up a GeoClaw run the setrun.py file must be modified to +indicate the name of this file along with a time tend. The array is +used when initializing new grid patches only if t < tend, so this +time should be set to a time after the finest grids are initialized, but +before the tsunami arrives.

    +

    For example, to use the file force_dry_init.data to indicate cells that +should be forced to be dry for times up to 15 minutes, we could specify:

    +
    from clawpack.geoclaw.data import ForceDry
    +force_dry = ForceDry()
    +force_dry.tend = 15*60.
    +force_dry.fname = 'force_dry_init.data'
    +rundata.qinit_data.force_dry_list.append(force_dry)
    +
    +
    +
    +

    Internal GeoClaw modifications

    +

    The following files in geoclaw/src/2d/shallow have been modified to +handle the force_dry_init array:

    +
      +
    • setprob.f90 to read in a parameter indicating that there is such +an array,

    • +
    • qinit_module.f90 with code to read the array,

    • +
    • qinit.f90 to initialize dry land properly at the initial time,

    • +
    • filpatch.f90 to initialize new grid patches properly at later +times,

    • +
    • filval.f90 to initialize new grid patches properly at later +times.

    • +
    +

    The force_dry_init array is used when initializing new patches only +if:

    +
      +
    • The resolution of the patch agrees with that of the +force_dry_init array, and it is then assumed that the points in +the array are aligned with cell centers on the patch.

    • +
    • The simulation time t is less than t_stays_dry, a time set to +be after the relevant level is introduced in the region of interest +but before the main tsunami wave has arrived. At later times the +tsunami may have gotten a region wet even if force_dry_init +indicates is should be initially dry.

    • +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/fortran.html b/v5.10.x/fortran.html new file mode 100644 index 0000000000..38f3e3c73b --- /dev/null +++ b/v5.10.x/fortran.html @@ -0,0 +1,249 @@ + + + + + + + + + Fortran version — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Fortran version

    +

    Input parameters are generally specified in a Python script setrun.py +and then:

    +
    $ make .data
    +
    +
    +

    creates the *.data files that the Fortran code requires.

    +
    +

    Makefiles

    +

    Most example directories contain a Makefile that offers several +options. Type:

    +
    $ make help
    +
    +
    +

    for a list. +Often:

    +
    $ make .plots
    +
    +
    +

    is all you need to type to create the data files, +compile the code, run it, and produce plots as png and html files.

    +

    Or, if you just want to run the code and produce output without making +all the plots (and then do the plotting interactively, for example):

    +
    $ make .output
    +
    +
    +

    Note: There is a dot before plots and output in the above +commands.

    +

    The directory where output and plots are stored is specified in the Makefile.

    +

    The Makefile in most directories includes a common Makefile found at +$CLAW/clawutil/src/Makefile.common that does most of the work. +If you get the error message:

    +
    Makefile:  /clawutil/src/Makefile.common: No such file or directory
    +
    +
    +

    then the environment variable CLAW is not set properly. +See Set environment variables.

    +
    +
    +

    More tips

    +
      +
    • The “make .output” +command runs the code and stores the name of the output directory in the +file .output and it is the modification time of this file that is checked +relative to the dependencies. (Note: the unix command ls generally does +not display files that start with a dot so this file may be invisible +unless you use “ls -a”.)

      +

      If you want to re-run the code and encounter:

      +
      $ make .output
      +$ make: `.output' is up to date.
      +
      +
      +

      you can remove the file .output to force the code to be run again.

      +
    • +
    • Similarly, remove the file .plots to force the plots to be recreated.

    • +
    • If you change the compiler flags FFLAGS in the Makefile or as an +environment variable, then you should +make sure that all files used are recompiled with the new flags. The +Makefiles as written do not catch this dependency and will not recompile +all the .o files when the Makefile changes. To force recompilation, +use:

      +
      $ make new
      +
      +
      +

      See Fortran Compilers for more about compiler flags.

      +
    • +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/fortran_compilers.html b/v5.10.x/fortran_compilers.html new file mode 100644 index 0000000000..cbb865c268 --- /dev/null +++ b/v5.10.x/fortran_compilers.html @@ -0,0 +1,308 @@ + + + + + + + + + Fortran Compilers — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Fortran Compilers

    +

    This section is relevant to users who want to compile the fortran code in +the classic, amrclaw, or geoclaw branches.

    +
    +

    FC environment variable

    +

    Users should set the environment variable FC to point to the correct +compiler, e.g. in bash via:

    +
    $ export FC=gfortran
    +
    +
    +

    Note that some versions of make will set FC=f77 by default if no value +is specified, and adding a line to the Makefile such as:

    +
    FC ?= gfortran
    +
    +
    +

    will not override this. The common Makefile in +$CLAW/clawutil/src/Makefile.common now tests to see if FC is set to +f77 and if so resets it to gfortran since much of Clawpack is not f77 +compliant. However, it is best to set the FC environment variable +yourself, e.g. in your .bashrc file.

    +
    +
    +

    FFLAGS environment variable

    +

    Compiler flags can be specified using the FFLAGS variable that can be set +in an application Makefile. By default sample Makefiles now specify:

    +
    FFLAGS ?=
    +
    +
    +

    so that no flags are used unless the +environment variable FFLAGS is set already. This line can be changed in +the Makefile, but it is often easiest to set an environment variable for the +flags you generally want to use.

    +

    Note: If you change the flags you generally have to recompile all the +code, and this dependency is not handled automatically. So always do:

    +
    $ make new
    +
    +
    +

    before rerunning an example with make .output or make .plots.

    +
    +
    +

    LFLAGS environment variable

    +

    The LFLAGS environment variable is used to provide flags that are needed when +linking the final binary. The most likely use for this flag would be to link a +particular library with the binary (such as a NetCDF library) or provide a path +to a compiled module. If this variable is not set in the environment then +LFLAGS defaults to the relevant flags in FFLAGS.

    +
    +
    +

    Pre-Processor and the PPFLAGS environment variable

    +

    Compilers often provide a pre-processor that can scan source code before +compilation providing some ability to define variables at compile time or +transform the code. Currently the pre-processor is always called before +Clawpack compilation to support optional dependencies, such as NetCDF support, +and some testing abilities. The PPFLAGS environment variable is meant to +provide further control of the pre-processor.

    +
    +
    +

    gfortran compiler

    +

    Some useful flags:

    +
      +
    • For debugging:

      +
      FFLAGS = -g -Wall -pedantic -fbounds-check -ffpe-trap=invalid,overflow,zero
      +
      +
      +
    • +
    • For optimizing:

      +
      FFLAGS = -O2
      +
      +
      +
    • +
    • For using OpenMP:

      +
      FFLAGS = -O2 -fopenmp
      +
      +
      +

      In this case you should also set some environment variables. See +Using OpenMP for details.

      +

      Note: Versions of gfortran before 4.6 are known to have OpenMP bugs.

      +
    • +
    • For using NetCDF:

      +
      FFLAGS = -DNETCDF -lnetcdf -I$(NETCDF4_DIR)/include
      +LFLAGS = -lnetcdf
      +
      +
      +

      The FFLAGS can also be put into PPFLAGS. Note that the variable +NETCDF4_DIR should be defined in the environment.

      +
    • +
    +
    +
    +

    Intel fortran compiler

    +

    Set the FC environment variable to ifort.

    +

    Some useful flags:

    +
      +
    • For debugging:

      +
      FFLAGS = -g -C -CB -CU -fpe0 -ftrapuv -fp-model precise
      +
      +
      +
    • +
    • For optimizing:

      +
      FFLAGS = -O2
      +
      +
      +
    • +
    • For using OpenMP:

      +
      FFLAGS = -O2 -qopenmp
      +
      +
      +

      In this case you should also set the environment variable OMP_NUM_THREADS +to indicate how many threads to use.

      +

      For older versions of the ifort compiler, you may instead need:

      +
      FFLAGS = -O2 -openmp
      +
      +
      +
    • +
    • For using NetCDF:

      +
      FFLAGS = -DNETCDF -lnetcdf -I$(NETCDF4_DIR)/include
      +LFLAGS = -lnetcdf
      +
      +
      +

      Same as for gfortran above.

      +
    • +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/fvmbook.html b/v5.10.x/fvmbook.html new file mode 100644 index 0000000000..1c7c94f0bc --- /dev/null +++ b/v5.10.x/fvmbook.html @@ -0,0 +1,213 @@ + + + + + + + + + Examples from the book FVMHP — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Examples from the book FVMHP

    +

    The book Finite Volume Methods for Hyperbolic Problems +contains many examples that link to Clawpack codes used to create the +figures in the book. These codes were originally developed for Clawpack +4.3 and these versions are still available from +this webpage, +but they will only run with Clawpack 4.3, which has not been developed since +2006.

    +

    Many of the examples have been converted to Clawpack 5.x form, with +a setrun.py file for setting run time data and a setplot.py +file for specifying plots with Python. See:

    +
    +
    +
    +

    Available examples

    +

    The examples converted to v5.x form so far can be found in the +directory apps/fvmbook if you clone the apps repository. +(See Clawpack Applications repository.)

    +

    You can also browse the examples and plots/animations of the results in the +Clawpack gallery of fvmbook applications

    +
    +
    +

    YouTube Videos

    +

    A set of 25 videos on material from the book were recorded in 2023 and are +available in this playlist +on the Clawpack YouTube channel. +For a summary of the contents of each video, see this webpage.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/galleries.html b/v5.10.x/galleries.html new file mode 100644 index 0000000000..4435d0a2b6 --- /dev/null +++ b/v5.10.x/galleries.html @@ -0,0 +1,193 @@ + + + + + + + + + Clawpack Gallery — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + + + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/gauges.html b/v5.10.x/gauges.html new file mode 100644 index 0000000000..d212323779 --- /dev/null +++ b/v5.10.x/gauges.html @@ -0,0 +1,430 @@ + + + + + + + + + Gauges — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Gauges

    +

    With AMRClaw in two space dimensions and GeoClaw +it is possible to specify gauge locations as points (x,y) where the values of all +components of q should be output every time step during the computation over some +time range (t1,t2).

    +

    Gauges are useful in several ways, e.g.:

    +
    +
      +
    1. To compare computational results to measurements from +physical gauges such as a pressure gauge or tide gauge that +record data as a function of time at a single point,

    2. +
    3. To better visualize how the solution behaves at a single point,

    4. +
    5. To better compare results obtained with different methods or grid resolutions. +Comparing two-dimensional pcolor or contour plots can be difficult whereas +comparing to curves that give the solution as a function of time often reveals +more clearly differences in accuracy or nonphysical oscillations.

    6. +
    +
    +

    Note: The capability of using Lagrangian gauges for particle tracking has been added to +GeoClaw in Version 5.7.0 (it is not available in AMRClaw at this time).

    +

    Note: One can also use the Fixed grid output (fgout) capabilities added to +GeoClaw in Version 5.9.0 in order to capture the solution over a specified +fixed grid at frequent output times. If this output is frequent enough, +then it is also possible to sample these outputs at a fixed location to give +a time series similar to a gauge output, but with the advantage that the +points need not be specified prior to the run (at least for any point that +can be spatially interpolated from the fgout grid(s) captured in the run). +The temporal resolution will be that specified for the fgout grids. +See Fixed grid output (fgout) for more details.

    +
    +

    Gauge parameters in setrun

    +

    See also Specifying AMRClaw run-time parameters in setrun.py.

    +

    Gauges are specified in setrun by adding lists of gauge data for each +desired gauge to the ClawRunData +object rundata.gaugedata.gauges. This is initialized as an empty list and +new gauges can be specified by:

    +
    rundata.gaugedata.gauges.append([gaugeno, x, y, t1, t2])
    +
    +
    +

    with values

    +
      +
    • gaugeno : integer

      +

      the number of this gauge

      +
    • +
    • x, y : floats

      +

      the location of this gauge

      +
    • +
    • t1, t2 : floats

      +

      the time interval over which gauge data should be output.

      +
    • +
    +

    During the computation the value of all components of q at all gauge locations will +be output to a single file fort.gauge in the output directory. Lines of this +file have the form:

    +
    gaugeno  level  t  q[0]  q[1] ...  q[meqn-1]
    +
    +
    +

    where level is the AMR level used to determine the q values at this time. +Internally the finest level available at each gauge is used, with bilinear +interpolation to the gauge locations from the 4 nearest cell centers.

    +

    Note: In GeoClaw, zero-order interpolation is used instead of piecewise +linear interpolation; see Nearshore interpolation.

    +

    New in 5.4.0. +The output that is in the gauge files can be controlled by a variety of +parameters. These can be specified on a per gauge basis or set for all gauges +specified. The output parameters are

    +
      +
    • file_format : Specifies the file format of the gauge data. Starting in +v5.9.0, this value can be “ascii”, “binary64”, or “binary32”. +The latter value generally results in the smallest file size and reduction +of the 8-byte computated values to 4-byte output still gives sufficient +precision for most applications.

    • +
    • display_format : Specifies the format of the numbers written to the gauge +file for each field, in the case file_format=”ascii”. +These are Fortran format strings defaulting to “e15.7”.

    • +
    • q_out_fields : Specifies which fields of the q array to output. Specify as +a list the indices that should be output. Defaults to “all”.

    • +
    • aux_out_fields : Specifies which fields of the aux array to output. +Specify as a list the indices that should be output. Defaults to “none”

    • +
    • min_time_increment : Specify a minimum amount of time that should pass +before recording the values at a gauge. This can be useful for decreasing +the amount of output at a gauge location that is currently being +time-stepped at small increments. The default is 0 which effectively +turns off this constraint.

    • +
    +

    Setting these values can be done in multiple ways for convenience. The most +direct way is via a dictionary with the keys as the gauge ids and the +corresponding parameter as the value. For example, if we had 3 gauges with +ids 3, 7, 13 we could specify that they all use the display format e26.16 by +setting:

    +
    rundata.gaugedata.display_format = "e26.16"
    +
    +
    +

    or:

    +
    rundata.gaugedata.display_format = {3:"e26.16", 13:"e8.6"}
    +
    +
    +

    to set gauge 3’s display format to “e26.16”, leave gauge 7 set to the default +and set 13’s to “e8.6”.

    +

    For the parameters q_out_fields and +aux_out_fields one can also specify “all” to output all fields or “none” +to specify none of them (equivalent to an empty list of indices). Both of +these arrays use Python indexing, i.e. they start at 0.

    +

    Note: For GeoClaw, the sea-surface value \(\eta = h + B\) (sum of +water depth and topography) is also output as another column after the q fields. +In the case of the multilayer code the eta for each surface follows the q +fields for that layer.

    +

    New in 5.4.0:

    +
    +
      +
    • Gauge output is accumulated in a buffer internally and written out +intermitently, instead of writing to disk every time step. +(The parameter MAX_BUFFER in the amrclaw library routines +gauges_module.f90 controls the size of this buffer.)

    • +
    • The gauge output for the gauges is written to distinct files in the +output directory, e.g. gauge00001.txt for gauge number 1. In previous +versions of Clawpack all gauges were written to a single file +fort.gauge. The new approach allows gauges to be written in parallel and +also facilitates reading in a single gauge more quickly.

    • +
    • Some header info appears in each of these files to describe the gauge +output.

    • +
    • New in 5.9.0: If binary output is requested (see below) then files +such as gauge00001.txt contain only a header for each gauge, but the +data is all in a corresponding binary file such as gauge00001.bin.

    • +
    • When doing a restart (see Checkpointing and restarting), gauge output from the original run +is no longer overwritten by the second run. Instead gauge +output from the restart run will be appended to the end of each +gaugeXXXXX.txt file (or gaugeXXXXX.bin in the case of binary output). +Note that if you restart from a time earlier than the end of the previous +computation, or do multiple restarts from the same checkpoint file, +the appended data will not be at monotonically increasing times.

    • +
    +
    +
    +
    +

    Plotting tools

    +

    Several Python plotting tools are available to plot the gauge data, so you do not +have to parse the file fort.gauge yourself.

    +

    If you want to read in the data for a particular gauge to manipulate it +yourself, you can do, for example:

    +
    from clawpack.pyclaw.gauges import GaugeSolution
    +g = GaugeSolution(gauge_id=1, path='_output')
    +
    +
    +

    to examine gauge number 1, for example.

    +

    Then:

    +
      +
    • g.t is the array of times,

    • +
    • g.q is the array of values recorded at the gauges (g.q[m,n] is the m`th +variable at time `t[n])

    • +
    +

    Alternatively, you can use the getgauge method of a ClawPlotData object, +e.g.:

    +
    from clawpack.visclaw.data import ClawPlotData
    +plotdata = ClawPlotData()
    +plotdata.outdir = '_output'   # set to the proper output directory
    +gaugeno = 1                   # gauge number to examine
    +g = plotdata.getgauge(gaugeno)
    +
    +
    +

    In the setplot Python script you +can specify plots that are to be done for each gauge, similar to the manner in +which you can specify plots that are to be done for each time frame. For example, +to plot the component q[0] at each gauge, include in setplot lines of this form:

    +
    plotfigure = plotdata.new_plotfigure(name='q[0] at gauges', figno=300, \
    +                type='each_gauge')
    +
    +# Set up for axes in this figure:
    +plotaxes = plotfigure.new_plotaxes()
    +plotaxes.xlimits = 'auto'
    +plotaxes.ylimits = [-1.5, 1.5]
    +plotaxes.title = 'q[0]'
    +
    +# Plot q[0] as blue line:
    +plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
    +plotitem.plot_var = 0
    +plotitem.plotstyle = 'b-'
    +
    +
    +

    Note that plotdata.new_plotfigure is called with type=’each_gauge’ which +denotes that this plot is to be produced for each gauge found in setgauges.data. +(When type is not specified, the default is type=’each_frame’ for time frame data).

    +

    If you type:

    +
    $ make .plots
    +
    +
    +

    then html files will be created for the gauge plots along with the time frame plots +and will all show up in the index (usually in _plots/_PlotIndex.html).

    +

    When using Iplotclaw to interactively view plots, try:

    +
    PLOTCLAW> plotgauge 1
    +
    +
    +

    to produce the plot for gauge 1, or simply:

    +
    PLOTCLAW> plotgauge
    +
    +
    +

    to loop through all gauges. If you rerun the code without re-executing +Iplotclaw, you can refresh the gauge data via:

    +
    PLOTCLAW> cleargauges
    +
    +
    +

    You can of course specify more than one plotitem on each plotaxes if you want. For +example to plot the each gauge from the current run as a blue line and the same +gauge from some previous run (perhaps with a different grid resolution) +as a red line, you could add the following lines to the above example:

    +
    # Plot q[0] from previous run as red line:
    +plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
    +plotitem.plot_var = 0
    +plotitem.plotstyle = 'r-'
    +plotitem.outdir = '_output_from_previous_run'
    +
    +
    +
    +
    +

    Plotting gauge locations

    +

    It is often convenient to plot the locations of the gauges on pcolor or contour +plots each time frame. You can do this as follows, for example:

    +
    plotfigure = plotdata.new_plotfigure(name='pcolor', figno=0)
    +plotaxes = plotfigure.new_plotaxes('pcolor')
    +plotitem = plotaxes.new_plotitem(plot_type='2d_pcolor')
    +# set other attributes as desired
    +
    +def addgauges(current_data):
    +    from clawpack.visclaw import gaugetools
    +    gaugetools.plot_gauge_locations(current_data.plotdata, \
    +         gaugenos='all', format_string='ko', add_labels=True)
    +
    +plotaxes.afteraxes = addgauges
    +
    +
    +

    You can replace gaugenos=’all’ by gaugenos=[1,2] or other list of specific +gauges to plot. The format_string above specifies a black dot at each gauge +location and add_labels=True means that the gauge number will appear next to each +gauge.

    +

    If you want more control over this plotting you can of course copy the function +plot_gauge_locations from clawpack.visclaw.gaugetools.py +to your setplot.py file and modify at will.

    +
    +
    +

    Examples

    +

    Several of the examples found in $CLAW/amrclaw/examples/ +and $CLAW/geoclaw/examples/ contain the specification of gauges.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/genindex.html b/v5.10.x/genindex.html new file mode 100644 index 0000000000..f7e7bcb917 --- /dev/null +++ b/v5.10.x/genindex.html @@ -0,0 +1,1499 @@ + + + + + + + + Index — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + + +

    Index

    + +
    + A + | B + | C + | D + | E + | F + | G + | H + | I + | K + | L + | M + | N + | O + | P + | Q + | R + | S + | T + | U + | V + | W + | X + | Y + | Z + +
    +

    A

    + + + +
    + +

    B

    + + + +
    + +

    C

    + + + +
    + +

    D

    + + + +
    + +

    E

    + + + +
    + +

    F

    + + + +
    + +

    G

    + + + +
    + +

    H

    + + + +
    + +

    I

    + + + +
    + +

    K

    + + + +
    + +

    L

    + + + +
    + +

    M

    + + + +
    + +

    N

    + + + +
    + +

    O

    + + + +
    + +

    P

    + + + +
    + +

    Q

    + + + +
    + +

    R

    + + + +
    + +

    S

    + + + +
    + +

    T

    + + + +
    + +

    U

    + + + +
    + +

    V

    + + + +
    + +

    W

    + + + +
    + +

    X

    + + + +
    + +

    Y

    + + + +
    + +

    Z

    + + + +
    + + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/geoclaw.html b/v5.10.x/geoclaw.html new file mode 100644 index 0000000000..ce5ef4a092 --- /dev/null +++ b/v5.10.x/geoclaw.html @@ -0,0 +1,353 @@ + + + + + + + + + GeoClaw Description and Detailed Contents — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    GeoClaw Description and Detailed Contents

    +

    See www.geoclaw.org for more overview of the +GeoClaw software and links to references and uses.

    +
    +

    Warning

    +

    As with all of Clawpack, this code is provided as a research +and teaching tool with no guarantee of suitability for any particular +purpose, and no liability on the part of the authors. See the +License for more details and Cautionary Hints on using GeoClaw for tips on +exercising appropriate care in using the code.

    +
    +

    The $CLAW/geoclaw directory contains a specialized version of some Clawpack +and AMRClaw routines that have been modified to work well for certain +geophysical flow problems.

    +

    Currently the focus is on 2d depth-averaged +shallow water equations for flow over varying topography. The term +bathymetry is often used for underwater topography (sea floor or lake +bottom), but in this documentation and in the code the term topography is +often used to refer to either.

    +

    A primary concern with such flows is handling the margins of the flow where +the depth goes to 0, for example at the shore line. In GeoClaw this is +handled by letting the depth variable h in the shallow water equations be +0 in some cells. Robust Riemann solvers are used that allow for dry cells +adjacent to wet cells and that allow wetting and drying, for example as a +tsunami inundates dry land.

    +

    Some sample calculations can be viewed in the gallery_geoclaw. +illustrated in the Gallery of GeoClaw applications. +See also the sample Jupyter notebooks. +More will eventually appear in the Clawpack Applications repository.

    +
    + +
    +
      +
    • Links +to relevant papers and sample codes (some are based on the Clawpack 4.x +version of GeoClaw).

    • +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/geoclaw1d.html b/v5.10.x/geoclaw1d.html new file mode 100644 index 0000000000..a64b40781c --- /dev/null +++ b/v5.10.x/geoclaw1d.html @@ -0,0 +1,354 @@ + + + + + + + + + GeoClaw in One Space Dimension — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    GeoClaw in One Space Dimension

    +

    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 Coordinate systems).

    +

    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 Boussinesq solvers in One Space Dimension. +(Two-dimensional Boussinesq solvers have also recently been implemented, +with AMR, and will appear in a future release; see Boussinesq solvers in Two Space Dimensions.)

    • +
    • Topography data (topo files) and moving topography (dtopo files) can be +specified much as in 2d GeoClaw; see 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 GeoClaw Gallery

    +
    +

    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 [BergerLeVeque2023]. +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.

      +
    • +
    +
    +
    +

    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 The mapc2p function. In this case 0 <= x <= 1 is used in the examples, +but any computational grid interval can be used as long as mapc2p +maps equally spaced points on this interval to te desired physical grid.

    • +
    • 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. +A mapc2p function that maps the unit interval to the physical grid +must then be specified in setplot.py, and can be generated using the +function clawpack.geoclaw.nonuniform_grid_tools.make_mapc2p().

      +

      The module clawpack.geoclaw.nonuniform_grid_tools.py +also includes tools to create a nonuniform grid with the property that +a specified uniform grid width is used onshore an in very shallow +water, but are much larger in deeper water, with the physical grid widths +chosen so that the CFL number is roughly uniform (based on the propagation +speed sqrt(g*h)). +Most of the examples in $CLAW/geoclaw/examples/1d_classic/ +illustrate this.

      +
    • +
    +

    Note that when using grid_type 1 or 2, any gauges specified in setrun.py +must be specified in computational coordinates, not physical coordinates. +See, e.g. $CLAW/geoclaw/examples/1d_classic/ocean_shelf_beach/setrun.py +for an example.

    +
    +
    +

    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.

    +
    +
    +

    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 Earthquake sources: Fault slip and the Okada model) +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.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/geoclaw_started.html b/v5.10.x/geoclaw_started.html new file mode 100644 index 0000000000..efcecb0b97 --- /dev/null +++ b/v5.10.x/geoclaw_started.html @@ -0,0 +1,234 @@ + + + + + + + + + Getting started with GeoClaw — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Getting started with GeoClaw

    +
    +

    Running a GeoClaw code

    +

    Setting up, running, and plotting a GeoClaw application follows the same pattern +as other AMRClaw applications, which in turn use many of the same +conventions as the classic single grid Clawpack code, in particular:

    +
    +
    +
    +
    +
    +

    Topography

    +

    To simulate flow over topography it is of course necessary to specify +the topography. This is usually done by providing one or more files of +surface elevation (relative to some reference, e.g. sea level) at a set of +points on a rectangular grid (with x-y locations in Cartesian units or in +latitude-longitude, depending on the application).

    +

    Several file formats are recognized by GeoClaw. See Topography data for more +information on how to specify topography and some on-line resources for +obtaining topography.

    +
    +
    +

    Plotting GeoClaw results

    +

    GeoClaw results can be plotted with the usual Python plotting tools (see +Plotting with Visclaw).

    +

    Some special tools and colormaps are available, see GeoClaw plotting tools.

    +
    +
    +

    Setting up a new example

    +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/geoclaw_util_module.html b/v5.10.x/geoclaw_util_module.html new file mode 100644 index 0000000000..29e38adf9d --- /dev/null +++ b/v5.10.x/geoclaw_util_module.html @@ -0,0 +1,363 @@ + + + + + + + + + geoclaw.util module of utility functions — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    geoclaw.util module of utility functions

    +

    This describes new tools added in Clawpack 5.2.1.

    +
    +

    Documentation auto-generated from the module docstrings

    +

    GeoClaw util Module $CLAW/geoclaw/src/python/geoclaw/util.py

    +

    Module provides provides utility functions.

    +
    +
    Functions:
    +
      +
    • dms2decimal - Convert (degrees, minutes, seconds) to decimal degrees

    • +
    • dist_meters2latlong - Convert dx, dy distance in meters to degrees

    • +
    • dist_latlong2meters - Convert dx, dy distance in degrees to meters

    • +
    • haversine - Calculate the haversine based great circle distance

    • +
    • inv_haversine - Inverts the haversine distance

    • +
    • bearing - Compute the bearing from on location to another

    • +
    • gctransect - Compute a set of points on the great circle between two points

    • +
    • fetch_noaa_tide_data - Fetches water levels and tide predictions

    • +
    +
    +
    +
    +
    +clawpack.geoclaw.util.bearing(x0, y0, x1, y1, units='degrees', bearing_units='degrees')
    +

    Compute the bearing from (x0,y0) to (x1,y1), i.e., the angle clockwise from +due North of the great circle path from point 0 to 1.

    +

    The value returned is thus between 0 and 360 if bearing_units=’degrees’, +or between 0 and 2*pi if bearing_units=’radians’.

    +

    Note: If using this to initialize a radially-symmetric 2d velocity on the +sphere based on a radial velocity U(r), symmetric about (x0, y0), set:

    + +
    +

    # lat-long assumed to be in degrees, r in meters +r = haversine(x0,y0,x,y) +beta = bearing(x0,y0,x,y,bearing_units=’radians’) +u = U(r) * sin(beta) # beta measured from North! +v = U(r) * cos(beta)

    +
    +
    + +
    +
    +clawpack.geoclaw.util.dist_latlong2meters(dx, dy, latitude=0.0)
    +

    Convert distance from degrees longitude-latitude to meters.

    +

    Takes the distance described by dx and dy in degrees and converts it into +distances in meters.

    +

    returns (float, float)

    +
    + +
    +
    +clawpack.geoclaw.util.dist_meters2latlong(dx, dy, latitude=0.0)
    +

    Convert distance from meters to degrees of longitude-latitude.

    +

    Takes the distance described by dx and dy in meters and converts it into +distances in the longitudinal and latitudinal directions in degrees.

    +

    returns (float, float)

    +
    + +
    +
    +clawpack.geoclaw.util.dms2decimal(d, m, s, coord='N')
    +

    Convert coordinates in (degrees, minutes, seconds) to decimal form.

    +

    If coord == ‘S’ or coord == ‘W’ then value is negated too.

    +
    +
    Example:
    +
    >>> topotools.dms2decimal(7,30,36,'W')
    +-7.51
    +
    +
    +
    +
    +

    (Note that you might want to add 360 to resulting W coordinate +if using E coordinates everywhere in a computation spanning date line.)

    +
    +
    Returns:
    +

    float

    +
    +
    +
    + +
    +
    +clawpack.geoclaw.util.fetch_noaa_tide_data(station, begin_date, end_date, time_zone='GMT', datum='STND', units='metric', cache_dir=None, verbose=True)
    +

    Fetch water levels and tide predictions at given NOAA tide station.

    +

    The data is returned in 6 minute intervals between the specified begin and +end dates/times. A complete specification of the NOAA CO-OPS API for Data +Retrieval used to fetch the data can be found at:

    +
    +
    +

    By default, retrieved data is cached in the geoclaw scratch directory +located at:

    +
    +

    $CLAW/geoclaw/scratch

    +
    +
    +
    Required Arguments:
    +
      +
    • station (string): 7 character station ID

    • +
    • begin_date (datetime): start of date/time range of retrieval

    • +
    • end_date (datetime): end of date/time range of retrieval

    • +
    +
    +
    Optional Arguments:
    +
      +
    • time_zone (string): see NOAA API documentation for possible values

    • +
    • datum (string): see NOAA API documentation for possible values

    • +
    • units (string): see NOAA API documentation for possible values

    • +
    • cache_dir (string): alternative directory to use for caching data

    • +
    • verbose (bool): whether to output informational messages

    • +
    +
    +
    Returns:
    +
      +
    • date_time (numpy.ndarray): times corresponding to retrieved data

    • +
    • water_level (numpy.ndarray): preliminary or verified water levels

    • +
    • prediction (numpy.ndarray): tide predictions

    • +
    +
    +
    +
    + +
    +
    +clawpack.geoclaw.util.gctransect(x1, y1, x2, y2, npts, coords='W', units='degrees', Rearth=6367500.0)
    +

    Given (longitude,latitude) pairs (x1,y1), (x2,y2) and npts +Compute (x,y) for npts equally spaced points on the great circle connecting +them.

    +

    If coords=’W’ the points will all have -2*pi < x <= 0. +If coords=’E’ the points will all have -0 <= x < 2*pi. +With continuity at the date line x = pm pi.

    +

    Sample usage for 50 points on great circle from Tohoku to Crescent City:

    +
    +

    from clawpack.geoclaw import util,kmltools +xtrans,ytrans = util.gctransect(142,37,-124.2,41.74,50,’W’) +kmltools.transect2kml(xtrans,ytrans) +# then open transect.kml to view on Google Earth

    +
    +
    +
    Based in part on formulas in

    https://math.stackexchange.com/questions/1783746

    +
    +
    +
    + +
    +
    +clawpack.geoclaw.util.haversine(x0, y0, x1=None, y1=None, units='degrees')
    +

    x0,y0 is assumed to be a point (or an array with the same shapes as x1,y1) +x1,y1 is a point or two arrays of points (of the same dimension) +returns array with same shape as x1 and y1 containing distance of each point +from (x0,y0).

    +

    For backward compatibility, also allows x0,y0 to be 2-tuples specifying +two points, but this is not suggested since the notation is not consistent.

    +
    + +
    +
    +clawpack.geoclaw.util.inv_haversine(d, x1, y1, y2, Rsphere=6367500.0, units='degrees')
    +

    Invert the Haversine function to find dx given a distance and point.

    +

    Invert the haversine function to find dx given distance d and (x1,y1) and y2. +The corresponding x2 can be x1+dx or x1-dx. +May return NaN if no solution.

    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/geohints.html b/v5.10.x/geohints.html new file mode 100644 index 0000000000..e37ae69fc6 --- /dev/null +++ b/v5.10.x/geohints.html @@ -0,0 +1,268 @@ + + + + + + + + + Cautionary Hints on using GeoClaw — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Cautionary Hints on using GeoClaw

    +

    As with all of Clawpack, the GeoClaw code is provided as a research +and teaching tool with no guarantee of suitability for any particular +purpose, and no liability on the part of the authors. See the +License for more details.

    +

    The authors believe that GeoClaw can be used for some real-world modeling of +geophysical hazards, but it is the responsibility of the user to fully +understand the model and its limitations and validate it for the intended +purpose.

    +
    +

    Tsunami hazard modeling

    +

    GeoClaw is currently in use for tsunami hazard assessment +by several research groups. Version 4.6.1 of the code was approved in 2012 +by the US National Tsunami Hazard +Mitigation Program (NHTMP) for use in +modeling work supported by the program, after an extensive benchmarking +project, the results of which can be found on the +NTHMP benchmarking page.

    +

    However, users who wish to apply GeoClaw to the real world should be aware +that doing so properly requires a good understanding of the capabilities and +limitations of the code, the equations they model, and the suitability of +using these equations to model any particular real-world scenario.

    +

    The authors of this code have invested considerable time in learning about +appropriate aspects of geohazard modeling, through reading the literature +and working directly with geoscientists who are domain experts. Even so we +are very cautious in using any results from GeoClaw without performing +sensitivity studies, grid refinement studies, etc., and if possible comparing +results with those obtained by other modeling groups and confirming with +experts that the results are reasonable. +It is impossible to encapsulate the knowledge needed to deal with all the +inaccuracies and uncertainties of geohazard modeling in any piece of +software or its documentation, and there is +no replacement for extensively reading the +literature and working with domain experts.

    +

    It is also important to understand the various parameters in GeoClaw and if +necessary experiment with different settings and perform sensitivity studies. +See Specifying GeoClaw parameters in setrun.py.

    +

    Here are a few of the things that should be considered in any GeoClaw +simulation:

    +
      +
    • The depth-averaged shallow water equations are a fairly good model for the +fluid dynamics of tsunamis provided the wave length is long relative to +the depth of the water. In particular, for large tsunamis generated by +subduction zone earthquakes propagating over the ocean, these equations +may be adequate. However, even then, they are only an approximation. +More accurate depth-averaged equations such as Boussinesq equations that +include dispersive terms may be more accurate.

    • +
    • For short wavelength tsunamis such as those generated by landslides, +shallow water equations are less accurate since dispersive terms can be very +important. Incorporating dispersive terms in GeoClaw is planned for the +future but not yet available. These limitations should be clearly +understood.

    • +
    • GeoClaw solves the nonlinear shallow water equations and can capture +turbulent bore formation to some extent via the formation of shock waves. +It does not model wave breaking directly and in the nearshore region the +use of depth-averaged equations may be inaccurate since the flow becomes +fully three-dimensional. Reasonable agreement with observations from +historic events and wave tank experiments have been seen in validation +studies, both of GeoClaw and other shallow water codes, but caution is +required.

    • +
    • The empirical Manning formulation is used to model bottom friction, as +described further in the section Manning friction term, where some limitations +are discussed.

    • +
    • For most tsunami simulations including the Coriolis terms in the momentum +equations makes little difference in the observed results and so these +terms are often turned off for efficiency (coriolis_forcing = False).

    • +
    • The geoclaw parameter sea_level determines the initial fluid depth +relative to the topography, as specified by the topo files. +It is important to know what +vertical datum +the topography is relative to. Coastal bathymetry developed for tsunami +modeling is often relative to Mean High Water (MHW) at some point, in +which case setting sea_level = 0. corresponds to assuming the water level +being initially at MHW. See sea_level for more information.

    • +
    • Tsunami modeling generally requires specifying a seafloor displacement in +order to initiate the tsunami, by specifying a dtopo file. This may be a +time-dependent displacement, as explained in dtopo. However, it is +important to understand that any displacement of the seafloor causes the +entire water column above this point to be shifted upwards by the same +amount (since the depth h is held constant), and so is immediately +observed in the sea surface elevation. In reality, displacement of the +seafloor leads to the propagation of acoustic waves that result in a +surface displacement

    • +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/geoplot.html b/v5.10.x/geoplot.html new file mode 100644 index 0000000000..23d28eab77 --- /dev/null +++ b/v5.10.x/geoplot.html @@ -0,0 +1,214 @@ + + + + + + + + + GeoClaw plotting tools — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    GeoClaw plotting tools

    +

    Needs updating

    +

    The module $CLAW/visclaw/geoplot.py contains some useful tools for +plotting GeoClaw output.

    +

    To be continued. See comments in the module.

    +
    +

    Plotting water depth or surface elevation

    +

    For information on using masked arrays, see:

    +
    +
    +
    +
    +

    Tips on latitude-longitude coordinate axes

    +

    With the default style, matplotlib axis labels are often hard to read when +plotting in latitude and longitude. It may help to disable offset labeling +and to rotate the longitude labels:

    +
    ticklabel_format(format='plain',useOffset=False)
    +xticks(rotation=20)
    +
    +
    +

    To set the aspect ratio so that latitude and longitude are scaled +appropriately, set mean_latitude to some average latitude value in the +region of interest and then:

    +
    gca().set_aspect(1./cos(mean_latitude*pi/180.))
    +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/git_versions.html b/v5.10.x/git_versions.html new file mode 100644 index 0000000000..e16fc1016b --- /dev/null +++ b/v5.10.x/git_versions.html @@ -0,0 +1,201 @@ + + + + + + + + + Keeping track of repository versions with Git — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Keeping track of repository versions with Git

    +

    The command:

    +
    python $CLAW/clawutil/src/python/clawutil/claw_git_status.py
    +
    +
    +

    will report on the status of all Clawpack repositories found, e.g. what +branch is checked out, the hash of the most recent commit, and any tracked +files with uncommitted changes. This information will be saved to a file +claw_git_status.txt and any diffs found for uncommitted changes will be +saved to a file claw_git_diffs.txt.

    +

    An optional command line argument allows you to save these files in a +different directory, e.g.

    +
    python $CLAW/clawutil/src/python/clawutil/claw_git_status.py _output
    +
    +
    +

    This is often useful to do when running a code if you want to later +determine exactly what version of the code was used, particularly when doing +regression testing.

    +

    The function $CLAW/clawutil/src/python/clawutil/runclaw.py +now has an argument print_git_status (with default value False). +Calling runclaw with print_git_status == True will write these files to +the output directory specified by the outdir argument.

    +

    Setting the environment variable GIT_STATUS to True will insure that +make .output creates output directories containing the claw_git_status +files.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/googleearth_plotting.html b/v5.10.x/googleearth_plotting.html new file mode 100644 index 0000000000..d30104a78c --- /dev/null +++ b/v5.10.x/googleearth_plotting.html @@ -0,0 +1,878 @@ + + + + + + + + + Visualizing GeoClaw results in Google Earth — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Visualizing GeoClaw results in Google Earth

    +

    The Google Earth browser is a powerful visualization tool for +viewing georeferenced data and images. The VisClaw visualization suite includes +tools that will produce georeferenced plots and associated KMZ files needed for +animating and browsing your GeoClaw simulation results in Google Earth. GeoClaw +tsunami simulations are particularly appropriate for the Google Earth +platform in that land topography, ocean bathymetry and wave +disturbances created by tsunamis or other inundation events can all be +viewed simultaneously.

    +

    The Google Earth browser is not a fully functional GIS tool, and so +while the simulations may look very realistic, one should not base +critical decisions on conclusions drawn from the Google Earth +visualization alone. Nevertheless, these realistic visualizations are +useful for setting up simulations and communicating your results.

    +
    +

    Basic requirements

    +

    To get started, you will need to install the Python packages lxml and +pykml. These libraries can be easily installed through Python +package managers PIP and conda:

    +
    % conda install lxml   # May also use PIP
    +% pip install pykml    # Not available through conda
    +
    +
    +

    Test your installation. You can test your installation by +importing these modules into Python:

    +
    % python -c "import lxml"
    +% python -c "import pykml"
    +
    +
    +
    +

    Optional GDAL library

    +

    To create a pyramid of images for faster loading in Google Earth, you +will also want to install the Geospatial Data Abstraction Library +(GDAL). The GDAL library (and associated Python bindings) +can be easily installed with conda:

    +
    % conda install gdal
    +
    +
    +

    On OSX, the GDAL library can also be installed through MacPorts or Homebrew.

    +

    Depending on your installation, you may also need to set the +environment variable GDAL_DATA to point to the directory containing +projection files (e.g. gcs.cvs, epsg.wkt) needed to +georeference and warp your PNG images. For example, in Anaconda +Python, these support files are installed under the share/gdal +directory. In bash, the GDAL_DATA environment variable can be exported +as

    +
    export GDAL_DATA=$ANACONDA/share/gdal
    +
    +
    +

    Note. It is important to use projection files that are packaged with your particular +installation of GDAL. Mixing installations and projection files can lead to unexpected +errors.

    +

    Test your installation. You can test your installation of the +GDAL library by downloading the script gdal_test.py and +associated image file frame0005fig1.png (to the same directory) and +running the command:

    +
    % python -c "import gdal_test"
    +
    +
    +

    You should get the output:

    +
    %  python -c "import gdal_test"
    +Input file size is 1440, 1440
    +Creating output file that is 1440P x 1440L.
    +Processing input file frame0005fig1_tmp.vrt.
    +Using band 4 of source image as alpha.
    +Using band 4 of destination image as alpha.
    +Generating Base Tiles:
    +0...10...20...30...40...50...60...70...80...90...100 - done.
    +Generating Overview Tiles:
    +0...10...20...30...40...50...60...70...80...90...100 - done.
    +
    +
    +

    This test will create an image pyramid in the directory frame0005fig1 and an associated +doc.kml file which you can open in Google Earth.

    +

    NOTE (8/1/16) The latest release of the Anaconda GDAL library is not fully version compatible with +its dependencies. If you receive an error that ends with:

    +
    % Reason: Incompatible library version: libgdal.20.dylib requires version 8.0.0 or later, but liblzma.5.dylib provides version 6.0.0
    +
    +
    +

    you should install a new version of the xz library:

    +
    % conda install xz
    +
    +
    +

    This bug can be tracked at GDAL install bug.

    +
    +
    +
    +

    An example : The Chile 2010 tsunami event

    +

    The Chile 2010 tsunami is included as an example in the GeoClaw module +of Clawpack. Once you have run this simulation, you can create the +KMZ file needed for visualizing your data in Google Earth by using the +command:

    +
    % make plots "SETPLOT_FILE=setplot_kml.py"
    +
    +
    +

    This runs the commands in setplot_kml.py. The resulting archive file +Chile_2010.kmz (created in your plots directory) can be opened in +Google Earth. An on-line version of the results from this example can +be viewed by opening the file Chile_2010.kml in Google Earth.

    +

    Use the time slider to step through the frames of the simulation, or +click on the “animate” button (also in the time slider panel) to animate +the frames.

    +
    +_images/GE_Chile.png +
    +

    Simulation of the Chile 2010 tsunami (see geoclaw/examples/tsunami/chile2010).

    +
    +
    +
    +

    Plotting attributes needed for Google Earth

    +

    The plotting parameters needed to instruct VisClaw to create plots +suitable for visualization in Google Earth are all set as attributes +of instances of the VisClaw classes ClawPlotData and ClawPlotFigure. +We describe each of the relevant attributes and refer to their +usage in the Chile 2010 example file setplot_kml.py file.

    +

    In what follows, we only refer to instances plotdata and plotfigure +of the ClawPlotData and ClawPlotFigure classes.

    +
    +
    +

    plotdata attributes

    +

    The following plotdata attributes apply to all VisClaw figures to be +visualized in Google Earth. These attributes are all optional and +have reasonable default values.

    +
    #-----------------------------------------
    +# plotdata attributes for KML
    +#-----------------------------------------
    +plotdata.kml_name = "Chile 2010"
    +plotdata.kml_starttime = [2010,2,27,6,34,0]  # Date and time of event in UTC [None]
    +plotdata.kml_tz_offset = 3    # Time zone offset (in hours) of event. [None]
    +
    +plotdata.kml_index_fname = "Chile_2010"  # name for .kmz and .kml files ["_GoogleEarth"]
    +
    +plotdata.kml_user_files.append(['Santiago.kml',True])  # Extra user defined file.
    +
    +# Set to a URL where KMZ file will be published.
    +# plotdata.kml_publish = None
    +
    +# plotdata.kml_map_topo_to_latlong = None  # Use if topo coords. are not lat/long [None]
    +
    +
    +
    +
    +kml_name : string
    +

    Name used in the Google Earth sidebar to identify the simulation. Default : “GeoClaw”

    +
    + +
    +
    +kml_starttime : [Y,M,D,H,M,S]
    +

    Start date and time, in UTC, of the event. The format is [year,month,day,hour, minute, second]. +By default, local time will be used.

    +
    + +
    +
    +kml_timezone : integer
    +

    Time zone offset, in hours, of the event from UTC. For example, the offset for Chile is +3 hours, +whereas the offset for Japan is -9 hours. Default : no time zone offset.

    +
    + +
    +
    +kml_index_fname : string
    +

    The name given to the KMZ file created in the plot directory. Default : “_GoogleEarth”

    +
    + +
    +
    +kml_publish : string
    +

    A URL address and path to a remote site hosting a +KMZ file you wish to make available on-line. Default : None

    +

    See Publishing your results for more details.

    +
    + +
    +
    +kml_map_topo_to_latlong : function
    +

    A function that maps computational coordinates (in meters, for +example) to latitude/longitude coordinates. This will be called to +position PNG overlays, gauges, patch boundaries, and regions boundaries to the +latitude longitude box specified in plotfigure.kml_xlimits and +plotfigure.kml_ylimits used by Google Earth. +Default : None.

    +

    See Mapping topography data to latitude/longitude coordinates +for details on how to set this function.

    +
    + +
    +
    +kml_use_figure_limits : boolean
    +

    Set to True to indicate that the plotfigure limits should be +used as axes limits when creating the PNG file. If set to False, +then axes limits set by an axes member of a plotfigure +(e.g. plotaxes) will be used. Default : True.

    +
    + +
    +
    +kml_user_files : list
    +

    A list of extra user KML files to be archived along with image +files and other plotting artifacts created by the VisClaw +GoogleEarth plotting routines. These user files can contain, for +example, additional placemarks, polygons, paths or other geographic +features of relevance to the simulation. These geographic features +will be copied to the KMZ archive and viewable in GoogleEarth, +along with the results of the GeoClaw simulation.

    +

    The additional files to be archived are assumed to exist in the +working directory (i.e. the directory containing the plots and +output directories). For each file to be included, append a list +of the form [filename, visibility] where filename is the KML +file name (with the .kml extension) and visibility is either True or +False. Append this list to the plotdata attribute, as in the +example above. Default : No user files are included.

    +
    + +
    +
    +

    plotfigure attributes

    +

    The following attributes apply to an individual figure created for visualization in Google Earth. +The first three attributes are required. The remaining attributes +are optional.

    +

    The name “Sea Surface” given to the new instance plotfigure, below, +will be used in the Google Earth sidebar to identify this figure.

    +
    #-----------------------------------------------------------
    +# Figure - Sea Surface
    +#----------------------------------------------------------
    +plotfigure = plotdata.new_plotfigure(name='Sea Surface',figno=1)
    +plotfigure.show = True
    +
    +# Required KML attributes for visualization in Google Earth
    +plotfigure.use_for_kml = True
    +plotfigure.kml_xlimits = [-120,-60]    # Longitude
    +plotfigure.kml_ylimits = [-60, 0.0]    # Latitude
    +
    +# Optional attributes
    +plotfigure.kml_use_for_initial_view = True
    +plotfigure.kml_figsize = [30.0,30.0]
    +plotfigure.kml_dpi = 12         # Resolve all three levels
    +plotfigure.kml_tile_images = False    # Tile images for faster loading.  Requires GDAL [False]
    +
    +
    +
    +
    +use_for_kml : boolean
    +

    Indicates to VisClaw that the PNG files created for this figure should be suitable for +visualization in Google Earth. With this set to True, all titles, axes labels, colorbars +and tick marks will be suppressed. Default : False.

    +
    + +
    +
    +kml_xlimits : [longitude_min, longitude_max]
    +

    Longitude range used to place PNG images on Google Earth. This setting will override +any limits set as plotaxes attributes. Required

    +
    + +
    +
    +kml_ylimits : [latitude_min, latitude_max]
    +

    Latitude range used to place the PNG images on Google Earth. +This setting will override any limits set as plotaxes attributes. Required

    +
    + +
    +
    +kml_use_for_initial_view : boolean
    +

    Set to True if this figure should be used to determine the initial +camera position in Google Earth. The initial camera position will +be centered over this figure at an elevation equal to approximately +twice the width of the figure, in meters. By default, the first +figure encountered with the use_for_kml attribute set to True +will be used to set the initial view.

    +
    + +
    +
    +kml_figsize :  [size_x_inches,size_y_inches]
    +

    The figure size, in inches, for the PNG file. See Removing +aliasing artifacts for tips on how to set the figure size and dpi +for best results. Default : 8 x 6 (chosen by Matplotlib).

    +
    + +
    +
    +kml_dpi : integer
    +

    Number of pixels per inch used in rendering PNG figures. For best +results, figure size and dpi should be set to respect the numerical +resolution of the the simulation. See Removing aliasing +artifacts below for more details on how to improve the quality of +the PNG files created by Matplotlib. Default : 200.

    +
    + +
    +
    +kml_tile_images : boolean
    +

    Set to True if you want to create a pyramid of images at different +resolutions for faster loading in Google Earth. Image tiling +requires the GDAL library. See Optional GDAL library, above, +for installation instructions. Default : False.

    +
    + +
    +
    +

    Creating the figures

    +

    All figures created for Google Earth are rendered as PNG files using +the Matplotlib backend. So in this sense, the resulting PNG files are +created in a manner that is no different from other VisClaw output +formats. Furthermore, there are no special plotaxes or plotitem +attributes to set for KML figures. But several attributes will either +be ignored by the KML output or should be suppressed for best results +in Google Earth.

    +
    # Create the figure
    +plotaxes = plotfigure.new_plotaxes('kml')
    +
    +# Create a pseudo-color plot.  Render the sea level height transparent.
    +plotitem = plotaxes.new_plotitem(plot_type='2d_pcolor')
    +plotitem.plot_var = geoplot.surface_or_depth
    +plotitem.cmin = -0.2
    +plotitem.cmap = 0.2
    +plotitem.pcolor_cmap = googleearth_transparent
    +
    +# Create a colorbar (appears as a Screen Overlay in Google Earth).
    +def kml_colorbar(filename):
    +  cmin = -0.2
    +  cmax = 0.2
    +  cmap = geoplot.googleearth_transparent
    +  geoplot.kml_build_colorbar(filename,cmap,cmin,cmax)
    +
    +plotfigure.kml_colorbar = kml_colorbar
    +
    +
    +
    +

    plotaxes attributes

    +

    The plotaxes attributes +colorbar, xlimits, ylimits and title will all be ignored by the KML plotting. +For best results, the attribute scaled should be set to its default value False. The +only plotaxes attribute that might be useful in some limited contexts is the afteraxes +setting, and only if the afteraxes function does not add plot features that cause +Matplotlib to alter the space occupied by the figure. In most cases, the afteraxes +commands should not be needed or should not be used.

    +
    +
    +

    plotitem attributes

    +

    The most useful plotitem type will probably be the 2d_pcolor type, although other +types including the filled contour contourf can also be used to good effect.

    +

    Colormaps that are designed to work well with Google Earth are

    +
      +
    • geoplot.googleearth_transparent

    • +
    • geoplot.googleearth_lightblue

    • +
    • geoplot.googleearth_darkblue

    • +
    +

    The transparent +colormap is particularly appealing visually when overlaid onto the Google Earth because +the ocean bathymetry is clearly visible, illustrating the effect that underwater ridges +and so on have on the propagating tsunami. The other two colormaps +are solid colormaps, where the sea level color is set to match that of lighter or darker +regions of the Google Earth ocean bathymetry.

    +
    +
    +

    Adding a colorbar overlay

    +

    A colorbar can be associated with each figure in the Google Earth +browser by setting the figure attribute kml_colorbar to point to a function +that creates the colorbar:

    +
    # Create a colorbar (appears as a Screen Overlay in Google Earth).
    +def kml_colorbar(filename):
    +  cmin = -0.2
    +  cmax = 0.2
    +  cmap = geoplot.googleearth_transparent
    +  geoplot.kml_build_colorbar(filename,cmap,cmin,cmax)
    +
    +plotfigure.kml_colorbar = kml_colorbar
    +
    +
    +

    The color axis range [cmin, cmax] and the colormap cmap should be +consistent with those set as plotitem attributes. By expanding the +figure folder in the Google Earth sidebar, you can use check boxes to +hide or show the colorbar screen overlay.

    +

    The input argument filename should be passed unaltered to the +routine geoplot.kml_build_colorbar.

    +
    +
    +
    +

    Gauge plots

    +

    There are no particular attributes for gauge plots and so they +can be created in the usual way. In the Google Earth browser, gauge locations +will be displayed as Placemarks. Clicking on gauge Placemarks will bring +up the individual gauge plots. The screenshot below shows the gauge plot +that appears when either the gauge Placemark or the gauge label in the sidebar is +clicked.

    +
    +_images/GE_screenshot.png +
    +

    Screenshot illustrating gauge plots.

    +
    +
    +

    If the computational coordinates are not in latitude/longitude coordinates, then you must +set the plotdata attribute map_topo_to_latlong to specify a mapping between the computational +coordinates and latitude longitude box which Google Earth will use to visualize your data. +See plotdata attributes.

    +
    +
    +

    Additional plotdata attributes

    +

    VisClaw has additional plotdata attributes indicating which figures and frames +to plot and which output style to create. When plotting for Google +Earth, one additional output parameter is necessary.

    +
    #-----------------------------------------
    +plotdata.print_format = 'png'      # file format
    +plotdata.print_framenos = 'all'    # list of frames to print
    +plotdata.print_fignos = 'all'      # list of figures to print
    +plotdata.html = False              # create html files of plots?
    +plotdata.latex = False             # create latex file of plots?
    +# ....
    +plotdata.kml = True        # <====== Set to True to create KML/KMZ output
    +
    +return plotdata   # end of setplot_kml.py file
    +
    +
    +
    +
    +kml : boolean
    +

    Set to True to indicate that a KML/KMZ file should be created. Default : False.

    +
    + +
    +
    +
    +

    Plotting tips

    +

    Below are tips for working with KML/KMZ files, creating zoomed images, +improving the quality of your images and publishing your results.

    +
    +

    KML and KMZ files

    +

    KML files are very similar to HTML files in that they contan +<tags>…</tags> describing data to be rendered by a suitable +rendering engine. Whereas as standard web browsers can render content +described by HTML tags, Google Earth renders the geospatial data +described by KML-specific tags.

    +

    The kml attributes described above will direct VisClaw to create +Google Earth suitable PNG files +for frames and colorbars and a hierarchy of linked KML files, +including a top level doc.kml file for the entire simulation, one +top level doc.kml file per figure, and additional referenced kml +files per frame. These KML and image files will not appear +individually in your plots directory, but are archived into a single +KMZ file that you can load in Google Earth.

    +

    If you would like to browse the individual images and KML files created +by VisClaw, you can extract them from the KMZ file using an un-archiving +utility. On OSX, for example, you can use unzip to extract one or +more individual files from the KMZ file. Other useful zip utilities +include zip (used to create the KMZ file initially) and zipinfo.

    +

    One reason you might wish to view the contents of an individual KMZ +file is to inspect the PNG images generated by Matplotlib and used as +GroundOverlays in the Google Earth browser. Another reason may be +that you wish to make minor edits the top level doc.kml file to add +additional Google Earth sidebar entries or to change visibility +defaults of individual folders.

    +

    The KMZ file can be posted to a website to share your results with others. +See Publishing your results, below.

    +
    +
    +

    Tiling images for faster loading

    +

    If you create several frames with relatively high dpi, you may find +that the resulting KMZ file is slow to load in Google Earth. In +extreme cases, large PNG files will not load at all. You can improve +Google Earth performance by creating an image hierarchy which loads +only a low resolution sampling of the data at low zoom levels and +higher resolution images suitable for close-up views. In VisClaw, +this image pyramid is created by setting the plotfigure attribute +kml_tile_images to True.

    +
    plotfigure.kml_tile_images = True
    +
    +
    +

    Note: This requires the GDAL library, which can be installed following the +Optional GDAL library instructions, above.

    +
    +
    +

    Removing aliasing artifacts

    +

    You may find that the transparent colormap leads to unappealing visual +artifacts. This can happen when the resolution of the PNG file does +not match the resolution of the data used to create the image. In the +Chile example, the number of grid cells on the coarsest level is 30 in +each direction. Two additional levels are created by refining first by +a factor of 2 and then by a factor of 6. But the default settings for +the figure size (kml_figsize) is 8x6 inches and dpi (kml_dpi) is +200, resulting in an image that is 1600 x 1200. But because 1600 is +not an even multiple of 30, noticeable vertical stripes appear at the +coarsest level. A more obvious plaid pattern appears at finer levels, +since neither 1600 or 1200 are evenly divisible by 30*2*6 = 360.

    +
    +_images/GE_aliased.png +
    +

    Aliasing effects resulting from default kml_dpi and kml_figsize settings

    +
    +
    +

    We can remove these aliasing effects by making the resolution of the +PNG file a multiple of 30*2*6 = 360. This can be done by setting the +figure size and dpi appropriately:

    +
    # Set dpi and figure size to resolve the 30x30 coarse grid, and two levels of refinement with
    +# refinement factors of 2 and 6.
    +plotfigure.kml_figsize = [30,30]
    +plotfigure.kml_dpi = 12
    +
    +
    +

    The resulting PNG file has a resolution of only 360x360, but in fact, is free of +the vertical and horizontal stripes that appeared in the much higher resolution image +created from the default settings.

    +
    +_images/GE_nonaliased.png +
    +

    Aliasing effects removed by properly setting kml_dpi and kml_figsize

    +
    +
    +

    This baseline dpi=12 is the minimum resolution that will remove +striped artifacts from your images. However, you may find that this +resolution is unacceptable, especially for close-up views of +shorelines and so on. In this case, you can increase the resolution of +the figure by integer factors of the baseline dpi. In the Chile +example, you might try increasing the dpi to 24 or even 48. The resulting +PNG file, when rendered in Google Earth, should be much sharper when +zoomed in for coastline views.

    +

    In some cases, it might not be possible to fully resolve all levels of +a large multi-level simulation because the resulting image resolution +would exceed the Matplotlib limit of 32768 pixels on a side. In this case, +you can limit the number of levels that are resolved by a particular +figure and create zoomed in figures to resolve finer levels. See +Creating multiple figures at different resolutions, below. +Alternatively, you can break the computational domain into several +figures, each covering a portion of the entire domain.

    +

    If you set kml_dpi to a value less than 10, Matplotlib will revert to +a dpi of 72 and change the figure size accordingly, so that the +total number of pixels in each direction will still be equal to +kml_figsize*kml_dpi, subject to round-off error. While you can +avoid aliasing effects if this happens (assuming the dpi is still +consistent with the resolution of the simulation), you can prevent +Matplotlib from switching to a 72 dpi by simply reducing your figure +size by a factor of 10 and increasing your dpi by a factor of 10.

    +
    +
    +

    Creating multiple figures at different resolutions

    +

    You can create several figures for visualization in Google Earth. +Each figure you create will show up as a separate named folder in the Google +Earth sidebar. The name will match that given to the VisClaw plotfigure.

    +

    For at least one figure, you will probably want to set +the kml_xlimits and kml_ylimits to match the computational domain. +To get higher resolution zoomed in figures, you will want to restrict +the x- and y-limits to a smaller region. For best results, these zoom +regions should be consistent with the resolution of your simulation. +In the Chile example, a 30x30 inch figure resolves two degrees per inch. +The x- and y-limits for the zoomed in figure should then span an even +number of degrees in each direction, and have boundaries that align +with even degree marks, i.e. -120, -118, -116, etc. In setplot_kml.py, +the zoomed in region is described as :

    +
    #-----------------------------------------------------------
    +# Figure for KML files (zoom)
    +#----------------------------------------------------------
    +plotfigure = plotdata.new_plotfigure(name='Sea Surface (zoom)',figno=2)
    +plotfigure.show = True
    +
    +plotfigure.use_for_kml = True
    +plotfigure.kml_use_for_initial_view = False  # Use large plot for view
    +
    +# Zoomed figure created for Chile example.
    +plotfigure.kml_xlimits = [-84,-74]    # 10 degrees
    +plotfigure.kml_ylimits = [-18,-4]     # 14 degrees
    +plotfigure.kml_figsize = [10,14]  # inches. (1 inch per degree)
    +
    +# Resolution
    +rcl = 10    # Over-resolve the coarsest level
    +plotfigure.kml_dpi = rcl*2*6       # Resolve all three levels
    +plotfigure.kml_tile_images = False  # Tile images for faster loading.
    +
    +
    +

    The resulting figure will have a resolution of 120 dots (i.e. pixels) per inch, compared to the +12 dpi in the larger PNG file covering the whole domain. The resolution of the zoomed +image is 1200x1680, compared to 360x360 for the larger domain.

    +

    This higher resolution figure shows up in the Google Earth sidebar as “Sea Surface (zoom)”.

    +

    See Removing aliasing artifacts for more details on how to set the zoom levels.

    +
    +
    +

    Mapping topography data to latitude/longitude coordinates

    +

    In many situations, your computational domain may not be conveniently +described in latitude/longitude coordinates. When simulating overland +flooding events, for example, topographic data may more easily be +described in rasterized distance increments (meters, for example). +VisClaw uses data stored in generated data files (gauges.data, +regions.data, and so on) to position objects on the Google Earth +browser. The coordinate system for these objects is, however, in +computational coordinates, and so to locate them in the Google Earth +browser, the user must provide VisClaw a function to convert from +computational to latitude/longtitude coordinates. This is done by +setting the plotdata attribute kml_map_topo_to_latlong to a +function describing your mapping between the two coordinate systems.

    +

    A crucial underlying assumption in setting the mapping function for +use with GoogleEarth is that the boundary of your physical domain is +approximately aligned with spherical (latitude/longitude) coordinate +lines.

    +

    The following example illustrates how to set a linear map between the +coordinates in [0,48000]x[0,17540] and the latitude/longitude +coordinates that Google Earth will use to visualize the results of +your simulation.

    +
    def map_cart_to_latlong(xc,yc):
    +    # Map x-coordinates
    +    topo_xlim = [0,48000]                     # x-limits, in meters
    +    ge_xlim = [-111.96132553, -111.36256443]  # longitude limits
    +    slope_x = (ge_xlim[1]-ge_xlim[0])/(topo_xlim[1]-topo_xlim[0])
    +    xp = slope_x*(xc-topo_xlim[0]) + ge_xlim[0]
    +
    +    # Map y-coordinates
    +    topo_ylim = [0,17500]                     # y-limits, in meters
    +    ge_ylim = [43.79453362, 43.95123268]      # latitude limits
    +    slope_y = (ge_ylim[1]-ge_ylim[0])/(topo_ylim[1]-topo_ylim[0])
    +    yp = slope_y*(yc-topo_ylim[0]) + ge_ylim[0]
    +
    +    return xp,yp
    +
    +# set plotdata attribute.
    +plotdata.kml_map_topo_to_latlong = map_cart_to_latlong
    +
    +
    +

    Figure limits plotfigure.kml_xlimits and plotfigure.kml_ylimits must still be set to +the latitude/longitude coordinates for your Google Earth figure. But to indicate that you +do not wish to use these coordinates for creating PNG files, you must set +the plotfigure.kml_use_figure_limits attribute to False. This will indicate that when +creating the PNG figure, the axes limits should be set to those specifed in the +plotaxes attribute. For example,

    +
    plotfigure = plotdata.new_plotfigure(name='Teton Dam',figno=1)
    +plotfigure.use_for_kml = True
    +
    +# Latlong box used for GoogleEarth
    +plotfigure.kml_xlimits = [-111.96132553, -111.36256443]  #  Lat/Long box use by Google Earth
    +plotfigure.kml_ylimits = [43.79453362, 43.95123268]
    +
    +# Use computational coordinates for plotting
    +plotfigure.kml_use_figure_limits = False   # Use plotaxes limits below
    +
    +# ....
    +
    +plotaxes.xlimits = [0,48000]   # Computational axes needed for creating PNG files.
    +plotaxes.ylimits = [0,17500]
    +
    +
    +

    The mapping function will be used to position PNG Overlays, locate gauge placemarks, +and plot patch and region boundaries on the Google Earth browser.

    +
    +
    +

    Publishing your results

    +

    You can easily share your results with collaborators +by providing links to your archive KMZ file in HTML webpages. Collaborators can +download the KMZ file and open it in a Google Earth browser.

    +

    If you find that the KMZ file is too large to make downloading +convenient, you can provide a light-weight KML file that contains a +link to your KMZ file stored on a host server. Collaborators can then +open this KML file in Google Earth and browse your results remotely.

    +

    VisClaw offers an option to automatically create a sample +KML file containing a link to your KMZ file. +To create this KML file, you should set the plotdata attribute +kml_publish to the url address of your host server where the KMZ +files will be stored. For example, the Chile file above is stored at:

    +
    plotdata.kml_publish = "http://math.boisestate.edu/~calhoun/visclaw/GoogleEarth/kmz"
    +
    +
    +

    VisClaw will detect that this plotdata attribute has been set and +automatically create a KML file that refers to the linked file +“Chile_2010.kmz”, stored at the above address. This KML file (see +Chile_2010.kml for an example) can be easily edited, shared or posted on webpages to allow +collaborators to view your results via links to your remotely stored +KMZ file.

    +

    By default, plotdata.kml_publish is set to None, in which case, no KML file will be created.

    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/gpu.html b/v5.10.x/gpu.html new file mode 100644 index 0000000000..673acca8ec --- /dev/null +++ b/v5.10.x/gpu.html @@ -0,0 +1,226 @@ + + + + + + + + + Using the GPU version of Clawpack — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Using the GPU version of Clawpack

    +

    GPU versions of the two-dimensional AmrClaw and GeoClaw codes have been +developed primarily by Xinsheng Qin, as described in the references below.

    +

    This is still under development and has not yet been fully merged +in Clawpack, but there is a gpu branch of most of the Clawpack +repositories and checking those out will give a working version of +the GPU code.

    +

    You can do this by checking out the gpu branch of the clawpack/clawpack +module and then doing git module update.

    +

    To create a new clone clawpack_gpu with the +proper branches checked out, you can use these commands:

    +
    git clone https://github.com/clawpack/clawpack.git clawpack_gpu
    +cd clawpack_gpu
    +git checkout -b gpu origin/gpu
    +git submodule init
    +git submodule update
    +
    +
    +

    Note that this version of the GPU code is roughly based on version 5.5.0 of +Clawpack but had some other changes merged in as well (in particular adjoint +flagging, see Guiding AMR with adjoint flagging), and so it is not exactly equivalent in +capabilities.

    +

    The GPU version has some new libraries of source code. In particular, +$CLAW/amrclaw/src/2d/GPU contains .H, .cpp and .f90 files for the +2d amrclaw code. Many of the .f90 files replace those normally used +from $CLAW/amrclaw/src/2d and those files are removed from this branch. +This means that the pure CPU version of amrclaw cannot be run from this +branch, instead check out a specific version such as v5.5.0 to +run the CPU code for comparisons.

    +

    Similarly, $CLAW/geoclaw/src/2d/shallow/GPU contains replacement .f90 +files for many of the library routines in $CLAW/geoclaw/src/2d/shallow.

    +
    +

    References

    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/grid_registration.html b/v5.10.x/grid_registration.html new file mode 100644 index 0000000000..33686659f2 --- /dev/null +++ b/v5.10.x/grid_registration.html @@ -0,0 +1,284 @@ + + + + + + + + + Grid registration — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Grid registration

    + +

    GeoClaw topo_type == 3 is +essentially the same as the ESRI ASCII Raster format +but it is important to note which grid registration is used. +(topo_type == 2 uses the same header conventions, so this discussion also +applies to these files.)

    +

    See this NOAA page +and the wikipedia ESRI grid page +for more about registration, with some useful figures.

    +

    The third and fourth lines of the header file contain labels that tell whether the +registration is llcorner (lower left corner) or llcenter (lower left center). +GeoClaw also recognizes lower, which is currently handled in a way +equivalent to llcenter. This is also the assumed default registration +if the string is not one of these recognized values.

    +

    According to the documentation linked above for ESRI raster format, the topography +data given in the file should be viewed as cell averages of the topography over +DEM cells of dimension dx by dy where in this format dx = dy and is given by the +cellsize parameter. (We use DEM cell to denote the cell in the Digital Elevation +Model provided in the topofile, not be be confused with the computational grid +cells used by the finite volume method.)

    +

    The registration +indicates whether the (x,y) (longitude, latitude) value given in the header +corresponds to the location of the lower left corner of the SW-most DEM cell, or to the +center of this cell. Using the example from Topography data, a file containing:

    +
    2         mx
    +2         my
    +0.        xllcenter
    +20.       yllcenter
    +10.       cellsize
    +-9999     nodatavalue
    +-1000.  -2000.
    +-3000.  -4000.
    +
    +
    +

    would specify DEM cells with centers at (0,30), (10,30), (0,20), (10,20), which +are the same points specified in the topo_type == 1 example on Topography data.

    +

    By contrast, the file:

    +
    2         mx
    +2         my
    +0.        xllcorner
    +20.       yllcorner
    +10.       cellsize
    +-9999     nodatavalue
    +-1000.  -2000.
    +-3000.  -4000.
    +
    +
    +

    would specify DEM cells with lower left corners at the 4 points listed above, and +hence cell centers at (5,35), (15,35), (5,25), (15,25).

    +

    In the GeoClaw Fortran code, we assume the DEM values are actually +pointwise values and these are used to construct a piecewise bilinear +function interpolating these values. This function is then integrated +over the computational grid cells in order to get the +cell-averaged topography values that are stored in aux(1,:,:) and +used in the finite volume method. The computational cells over +which this function is integrated can vary as adaptive refinement is performed.

    +

    If the topography is smoothly varying, then the cell average over a DEM cell +agrees with the pointwise value at the cell center, so for our purpose +it is best to view the DEM values as being located at cell centers. Hence if +llcorner registration is specified, the lower left corner (and all other (x,y) +points spaced according to cellsize) should all be shifted by cellsize/2 in +both x and y before being used.

    +

    Starting with Version 5.5.0, this is done in the Fortran code when the DEM topofile +is read in. It is also done in the Python topotools module at the time of +reading the file, so the internal representation has Topography.x and +Topography.y corresponding to the cell centers or points where the data should be +interpreted in a pointwise view. This is also best when producing contour plots, +for example. When writing a topography file using Topography.write(), a new +optional argument grid_registration has been added. The (x,y) values in the +header will be printed properly based on the registration chosen.

    +

    Note that if you use Topography.crop() with a coarsen parameter +in order to generate a coarser version of the DEM, this simply +subsamples the topography. This followed by Topography.write() +should print out the proper llcorner or llcenter value for the +coarsened topography based on the location of the subsamples, but +crop() does not currently average topography over large cells as +the ESRI standard suggests should be done. In the future a +coarsen_method parameter might be added to crop() to allow this.

    +

    Earlier versions of GeoClaw always viewed the (x,y) value in the header as the +location of the SW-most data point, i.e., always assumed llcenter == lower +registration. So if you rerun a previous example that had a topofile specifying +llcorner in the header, the results may change since the DEM data will now be (more +properly) viewed as specified at slightly different points. If you need to try to +reproduce your earlier results, you could change llcorner to lower in the +header lines, for example.

    +

    For GeoClaw topo_type=1, each row contains x, y, z data for a single +point and we interpret z as the pointwise data at the specified x, y.

    +
    +

    NetCDF files

    +

    For netCDF files the +data points are generally interpreted as pointwise values at the points +specified in the lat and lon arrays included in the file (or as +cell-averaged values with these points as the cell centers).

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/howto_doc.html b/v5.10.x/howto_doc.html new file mode 100644 index 0000000000..c6adf7ebd5 --- /dev/null +++ b/v5.10.x/howto_doc.html @@ -0,0 +1,465 @@ + + + + + + + + + Guide for updating this documentation — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Guide for updating this documentation

    +

    See also the README.md at https://github.com/clawpack/doc.

    +

    The clawpack/doc repository is not +included in the Clawpack distribution and must be cloned separately if you +want to work with these files.

    +

    After cloning into the $CLAW directory, the restructured text +files for the main documentation are in $CLAW/doc/doc. All files +related to the gallery are in $CLAW/doc/gallery. As of Version +5.4.1, these two subdirectories are separate Sphinx projects

    +

    They used to be connected using +intersphinx. +but this was dropped in v5.7.x.

    +
    +

    Git branches and tags

    +

    Older versions of the documentation used to be tagged for each minor +release, e.g. v5.6.1. Starting with v5.7.0, these are now only tagged +with the major release, e.g. v5.7.x.

    +

    The side menu on the Sphinx pages now lists only these major tags. The +assumption is that any changes within e.g. the 5.7 version are minor enough +that the documentation should not change substantially.

    +

    There are two active branches at any time, one for the current major +release, e.g. v5.7.x, and one named dev for the development of documenation +for features not yet released. When a new major release is done the +v5.7.x branch will be retired, creating a v5.7.x tag instead along with +a new v5.8.x branch.

    +

    As documents are improved, continue to update the current release branch, +e.g. v5.7.x, and also merge these changes in to the dev branch. In +general dev should be up to date with the current release branch along +with perhaps some new documentation for features not in the current +release.

    +

    Note that the file conf.py contains the version number. Please insure +that the dev branch and current release branch each have the correct +thing. This can easily get messed up when merging from one branch to the +other. One way to help avoid this is to always merge via, e.g.:

    +
    git checkout dev
    +git merge v5.7.x --no-ff --no-commit
    +
    +
    +

    and then check before doing the merge commit to make sure conf.py hasn’t +been improperly changed. If it has, and that’s the only change to this +file, you can do:

    +
    git reset HEAD conf.py
    +git checkout conf.py
    +
    +
    +

    and check that it’s correct before committing via e.g.:

    +
    git commit -m "merged recent v5.7.x changes into dev"
    +
    +
    +
    +
    +

    Configuration and style files

    +

    The general look of the documentation and various things that appear on each +page are controlled by the following files:

    +
    +
      +
    • conf.py includes the version number, sets the html_theme, as well as +setting paths to extensions and various other sphinx settings.

    • +
    • _themes/flask_local/layout.html determines the menus at the top

    • +
    • _static/clawlogo.jpg is the Clawpack logo put on each page

    • +
    • _static/clawicon.ico is the icon that appears on browser tabs

    • +
    • _templates/index.html contains the main landing page

    • +
    +
    +
    +
    +

    Updating the docs for a new release

    +

    When updating the documentation for a new release, see also +Updating the documentation for a list of necessary changes.

    +

    Before proceeding, first make sure other repositories are checked out to +master, since some pages now have literalinclude’s that bring in code +(e.g. setaux_defaults.rst, etc). +Note: This is no longer true.

    +

    To create html files from the dev branch only, for example:

    +
    cd $CLAW/doc/doc
    +git checkout dev
    +make html
    +
    +
    +

    The Makefile has been modified so that make html does this:

    +
    sphinx-build -b html . _build1/html
    +
    +
    +

    To view the files, point your browser to $CLAW/doc/doc/_build1/html/index.html

    +

    Note that we suggest using _build1 when building a single version so this +can be quickly rebuilt when writing and editing documentation.

    +
    +
    +

    To generate docs including previous versions

    +

    If you have just done a new major release, first see Updating for a new major version +below.

    +

    The instructions below make webpages that list v5.7.x, v5.8.x, etc. and allow +viewing docs that may be more relevant to a previous version of Clawpack.

    +

    This should be done when you are close to pushing changes to the website, +otherwise the above approach works fine and shows the current state of the +documentation based on files in your working directory.

    +

    This can take longer since it rebuilds pages for all versions.

    +

    As of v5.7.x, we are now using +sphinx-multiversion +instead of +sphinxcontrib-versioning.

    +

    To make pages that show previous Clawpack versions, first install +sphinx-multiversion.

    +

    Insure that any changes you want to show up in multiversion docs has been +committed to some branch (normally dev if you have been adding something new).

    +

    And then do this:

    +
    cd $CLAW/doc/doc
    +rm -rf _build   # recommended to make sure new versions are clean
    +make versions
    +
    +
    +

    The Makefile has been modified so that make versions does this:

    +
    sphinx-multiversion . _build/html
    +
    +
    +

    To view the files, point your browser to _build/html/dev/index.html +and from there you should be able to navigate to other versions.

    +

    Unlike sphinxcontrib-versioning, this now uses your local branches and tags +rather than the versions on Github. It lists only two branches under “Latest +Versions” and all tags as “Older Versions”. +The two branches are set to dev and the most +recent version, by this line of conf.py:

    +
    smv_branch_whitelist = r'v5.7.x|dev'
    +
    +
    +

    This should be updated for a new version.

    +

    Note that _build/html contains a subdirectory for each version, but there +are no .html files in the top level of _build/html. For the Clawpack +webpage we need to:

    + +

    This can be done as follows:

    +
    cd $CLAW/doc/doc/_build/html
    +cp -r v5.7.x/* .   # replacing v5.7.x with the current version
    +python ../../fix_links_top_level.py
    +
    +
    +

    If you like what you see, you can push back to your fork and then issue a +pull request to have these changes incorporated into the documentation.

    +

    Note: We are no longer using intersphinx to link the gallery and the +main doc pages together. Instead there are hard links to www.clawpack.org +to go from one to the other. So the old use of +the environment variable SPHINX_WEB is now deprecated.

    +
    +
    +

    Updating for a new major version

    +

    When updating a minor version, e.g. from v5.7.0 to v5.7.1, we will continue +to use the same branch v5.7.x. You should just make sure the v5.7.x and dev +are up to date with each other at the time of release.

    +

    When updating to the next major version, e.g. from v5.7.x to v5.8.x, it is +necessary to do the following:

    +
      +
    • Create a new branch v5.8.x from v5.7.x (or dev).

    • +
    • Delete branch v5.7.x and replace it with a tag, so that the proper +versions get included in the documentation when next it is built.

    • +
    +

    For example, this could be done as follows:

    +
    git checkout v5.7.x       # assuming up to date with dev
    +git checkout -b v5.8.x    # create new branch
    +git branch -d v5.7.x      # remove old branch
    +git push origin :v5.7.x   # delete branch on github
    +git tag v5.7.x            # create new tag
    +git push origin v5.8.x    # push new branch
    +git push origin --tags    # push new tag
    +
    +
    +
    + +
    +

    Updating the webpages

    +

    A few developers can push html files to the repository +clawpack/clawpack.github.com +which causes them to show up on the web at +http://clawpack.github.io.

    +

    To do so, first create the html files as described above, which should appear +in doc/doc/_build/html and doc/gallery/_build/html.

    +

    Commit any changed source files and +push to clawpack/doc.

    +

    Then do:

    +
    cd $CLAW/clawpack.github.com
    +git checkout v5.x.x
    +git pull origin  # make sure you are up to date before doing next steps!
    +
    +cd $CLAW/doc/doc
    +rsync -azv _build/html/ ../../clawpack.github.com/
    +
    +
    +

    If you have updated the gallery, also do:

    +
    rsync -azv ../gallery/_build/html/ ../../clawpack.github.com/gallery/
    +
    +
    +

    Then move to the clawpack.github.com repository and +add and commit any new or changed files. +All files are needed, so

    +
    cd $CLAW/clawpack.github.com
    +git add .
    +
    +
    +

    should work. For the commit message you might want to add the commit +hash of the most recent commit in $CLAW/doc/doc:

    +
    cd $CLAW/clawpack.github.com
    +git add .
    +git commit -m "changes from doc/doc commit <hash>"
    +
    +
    +

    And finally push to the web:

    +
    git push origin
    +
    +
    +

    which assumes that origin is +git@github.com:clawpack/clawpack.github.com.git.

    +

    It may take a few minutes for the updated webpages to appear at +http://clawpack.github.io/.

    +

    Note that http://clawpack.org and http://www.clawpack.com +should also resolve properly to http://clawpack.github.io/. +and that www.clawpack.org should appear in the browser address bar. The +file extra_files/CNAME combined with settings on the domain server +godaddy.com determine this behavior.

    +
    +
    +

    Extra files for webpages not built by Sphinx

    +

    Any files placed in $CLAW/doc/doc/extra_files will be copied verbatim +(recursively for subdirectories) to the directory +$CLAW/doc/doc/_build/html when Sphinx is used to build the documentation. +These will be copied to $CLAW/clawpack.github.com/ when the +rsync_clawpack.github.sh script is run and hence will appear on the +webpages.

    +

    For example, the file $CLAW/doc/doc/extra_files/clawdev2013/index.html +should appear at http://www.clawpack.org/clawdev2013/index.html.

    +

    The files in $CLAW/doc/doc/extra_files/links provide redirects so that +links like http://www.clawpack.org/links/an11 resolve properly to +webpages on the University of Washington server. Links of this nature have +been provided in published paper and some contain large amounts of data that +have not been copied to Github.

    +
    +
    +

    Pages from other clawpack repositories

    +

    Some webpages are created within other clawpack repositories. +For example, the page http://www.clawpack.org/geoclawdev-2020/ +is modified by pushing changes to the master branch of the repository +geoclawdev-2020. +This is configured in that repository, in the GitHub Pages section found +under Settings.

    +

    Other repositories that create webpages include:

    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/howto_release.html b/v5.10.x/howto_release.html new file mode 100644 index 0000000000..22643c9e31 --- /dev/null +++ b/v5.10.x/howto_release.html @@ -0,0 +1,437 @@ + + + + + + + + + Guide for doing a Clawpack release — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Guide for doing a Clawpack release

    +

    This is the procedure used to do a new official release of Clawpack.

    +
    +

    Preparation

    +

    Make sure all your subrepositories are up to date and clean:

    +
    cd $CLAW
    +git co master
    +git pull
    +source pull_all.sh  # to make sure all subrepos are up to date
    +
    +python $CLAW/clawutil/src/python/claw_git_status.py
    +
    +
    +

    Check the output of this last commands in the files claw_git_status.txt +and claw_git_diffs.txt to make sure you don’t have any uncommitted changes.

    +

    Run all the examples as described in CLAW/doc/gallery/README.md +as required for building the galleries, and check all the resulting plots to +make sure everything looks correct.

    +
    +
    +

    Version numbers

    +

    Change the version number in clawpack/clawpack/__init__.py. +Initially set it to e.g. v5.4.1rc-alpha, then to the final release number.

    +

    The version number is also set in clawpack/setup.py and should be changed +there to be consistent with clawpack/clawpack/__init__.py

    +
    +
    +

    Release candidates

    +

    Make sure all repositories are checked out to the master branch and are up to +date with the main Clawpack repositories and clean, as described in the +preparation step above.

    +

    After following the preparation instructions above, do the following:

    +
    cd $CLAW
    +git checkout -b v5.4.1rc-alpha    # change to appropriate name for this rc
    +git add -u .
    +git commit -m "v5.4.1rc-alpha release candidate"
    +git push <your fork>
    +
    +
    +

    Then do a PR on https://github.com/clawpack/clawpack.

    +
    +
    +

    Create a tar file and a Github release

    +

    We generally do this step for a release candidate first, and then +do the same for the final release. For release candidates, modify the +version number to include 5.4.1rc-alpha, for example.

    +

    NOTE: Once one or more release candidates have been tested, the final +such PR should contain a change of the version number in the file +$CLAW/setup.py and in $CLAW/clawpack/__init__.py to the full version, +e.g. 5.4.1.

    +

    Once the PR has been merged:

    +
    cd $CLAW
    +git co master
    +git pull
    +source pull_all.sh  # to make sure all subrepos are up to date
    +
    +
    +

    Create tar file (first install https://github.com/Kentzo/git-archive-all):

    +
    cd $CLAW
    +git-archive-all --prefix clawpack-v5.x.x/ clawpack-v5.x.x.tar
    +gzip clawpack-v5.x.x.tar
    +
    +
    +

    (Note: best to use v5.x.x rather than just 5.x.x to be consistent with the +directory name created if following pip install instructions.)

    +

    Draft a new release on the webpage +https://github.com/clawpack/clawpack/releases. +Indicate that it is pre-release if desired.

    +

    As a comment, add text such as:

    +
    Download the clawpack-v5.x.x.tar.gz file below, not the other tar
    +file of zip file. Those only include the top-level Clawpack directories and
    +not all the submodules.
    +
    +
    +

    Then attach the tar file clawpack-v5.x.x.tar.gz to be +included in the release by using the link “Attach binaries…” before +finalizing the release. (You can go back and “Edit release” if necessary.)

    +
    +
    +

    Final release

    +

    After the release has been finalized, tag all repositories. In the commands +below, it is assumed the remote upstream points to the main Github repos +(not your fork) and that you have push permission. Change 5.x.x to the +appropriate version number in these commands:

    +
    cd $CLAW
    +git checkout master; git pull # make sure up to date!
    +git tag v5.x.x
    +git push upstream v5.x.x
    +
    +cd ../pyclaw
    +git checkout master; git pull # make sure up to date!
    +git tag v5.x.x
    +git push upstream v5.x.x
    +
    +
    +

    Do the same in all other repos (classic, amrclaw, geoclaw, clawutil, visclaw, +riemann).

    +

    Note these tags are used in the documentation for pages like +Changes to master since v5.9.2 which generate diffs between the latest version and +the current master branch of each repository.

    +
    +
    +

    Pypi

    +

    To release on the pypi server (for installation via pip) we have to do a bit +of trickery. We can’t just follow the directions at https://packaging.python.org/tutorials/packaging-projects/ +because we have a very non-Pythonic directory structure; in particular, +the subdirectories clawpack/x/ do not have an __init__.py.

    +

    Here’s what to do, starting with a clean clone in some directory +referred to below as $TEMP (replace 5.x.x by the new version number):

    +
    cd $TEMP
    +git clone https://github.com/clawpack/clawpack.git
    +cd clawpack    # should now be in $TEMP/clawpack
    +source pull_all.sh
    +git submodule update --init --recursive
    +git-archive-all --prefix clawpack-5.x.x/ clawpack-5.x.x.tar
    +
    +mv clawpack-5.x.x.tar ..
    +cd ..
    +tar -xf clawpack-5.x.x.tar  # creates $TEMP/clawpack-5.x.x
    +
    +cd clawpack
    +python3 setup.py sdist  # creates $TEMP/clawpack/dist/clawpack-5.x.x.tar.gz
    +cd dist     # should be in $TEMP/clawpack/dist
    +tar -xzf clawpack-5.x.x.tar.gz
    +
    +cp clawpack-5.x.x/PKG-INFO ../../clawpack-5.x.x
    +rm -rf clawpack-5.x.x
    +
    +cd ../..   # should be in $TEMP
    +rm clawpack-5.x.x.tar
    +tar -cf clawpack-5.x.x.tar clawpack-5.x.x
    +gzip clawpack-5.x.x.tar
    +mv clawpack-5.x.x.tar.gz clawpack/dist
    +
    +
    +

    Upload to the testpypi server for testing +(you will need to have created an account there):

    +
    cd clawpack   # should be in $TEMP/clawpack
    +twine upload --repository-url https://test.pypi.org/legacy/ dist/*
    +
    +credentials: [[test pypi]]
    +
    +
    +

    Click the link and check that it looks okay. You can also test via:

    +
    pip3 uninstall clawpack
    +pip3 install —no-cache—dir —index-url https://test.pypi.org/simple/ clawpack
    +
    +
    +

    Once that works, do the real upload to pypi:

    +
    twine upload dist/*
    +
    +
    +
    +
    +

    Zenodo

    +

    Go to the the Zenodo page +and create a new upload for the latest tar file, following the framework of +https://doi.org/10.5281/zenodo.820730, for example. This will issue a new +DOI, which should be added to the page $CLAW/doc/doc/releases.rst.

    +

    Note that the Github repository is not linked to Zenodo for automatic uploading +on release since that would only archive a zip file of the main clawpack +repository. Instead we want to archive the tar file containing all +subrepositories too.

    +
    +
    +

    Open Science Framework (OSF)

    +

    Go to https://osf.io/kmw6h/files/ and upload the latest tarfile to the set +of versions that can be accessed with the single DOI +10.17605/osf.io/kmw6h.

    +
    +
    +

    Updating the documentation

    +

    See Guide for updating this documentation for general instructions on building the documentation +and galleries using Sphinx, and for how to push changes to Github so they +show up on the web.

    +

    Note that in the clawpack/doc repository there is no master branch. +There should be one corresponding to the latest release and +also a branch dev that has changes since the last release. For a new +release create a new branch from the dev branch with the version number, +and update conf.py for the new version.

    +

    When making changes for a new release, the following pages in the directory +$CLAW/doc/doc need to be updated:

    +
    +
      +
    • A page like v5.4.0 release notes needs to be created. Copy +changes_to_master.rst to release_5_x_x.rst for a new release 5.x.x +and then change master to 5_x_x in each link to Github, so they have +the form v5.4.0…v5.4.1, for example when going from 5.4.0 to 5.4.1.

    • +
    • Add to this page a brief summary of the major changes from the last +release, using the diffs that show up in changes_to_master.rst as a guide.

    • +
    • Add and commit this new page, and also add a link to it to the file +releases.rst (to show up in Releases of Clawpack and release notes).

    • +
    • Modify the page changes_to_master.rst by replacing the previous version +number (e.g. 5.y.y) by the version number of the new release +(e.g. 5.x.x) so that links are comparing e.g. v5.x.x…master

    • +
    • Update releases.rst to include a link to the new version on Zenodo. +Also update the bibtex and recommended citation in about.rst.

    • +
    • Modify several other files to point to the new version number, in particular +installing_pip.rst, installing_fortcodes.rst, +contents.rst, docker_image.rst.

    • +
    • Modify the main landing page _templates/index.html to cite the +proper version number and DOI. +(No longer necessary – This page has been changed to be more generic.)

    • +
    • Update conf.py to the new version number, and also +$CLAW/doc/gallery/conf.py (For a major release.)

    • +
    +
    +
    +
    +

    Updating the apps repository

    +

    Ideally all the apps in the Clawpack Applications repository should be rerun with the new release +and any issues fixed. If old apps are modified, add a note to the +README.rst file in the directory that indicates when it was last updated +and to what release. Some apps already have a section at the end of this +file of the form:

    +
    Version history:
    +----------------
    +
    +- Updated for Clawpack 5.3.0 on 15 Sept 2015
    +
    +- Updated for Clawpack 5.4.0 on 4 Jan 2017
    +
    +
    +
    +
    +

    Updating the Dockerfile

    +

    See Docker for Clawpack for instructions on using the docker image.

    +

    Note that unlike the tar file for a new release, the docker image includes +a clone of the apps repository, so it would be best to first update that +repository if necessary.

    +
    +
      +
    • Clone the repository https://github.com/clawpack/docker-files

    • +
    • Make a new Dockerfile for the new version by copying an old one +and changing the version numbers in it. Make any other changes needed +for this new release.

    • +
    • See the README.md file in that repo for instructions on building an +image and pushing it to dockerhub (which requires push permission).

    • +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/index.html b/v5.10.x/index.html new file mode 100644 index 0000000000..1ed2b40930 --- /dev/null +++ b/v5.10.x/index.html @@ -0,0 +1,301 @@ + + + + + + + + Clawpack documentation — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    + + + +

    Clawpack (Conservation Laws Package)

    + +

    +Clawpack is a collection of finite volume methods +for linear and nonlinear hyperbolic systems of conservation laws. +Clawpack employs high-resolution Godunov-type methods with limiters in a general +framework applicable to many kinds of waves. +Clawpack is written in Fortran and Python. +

    + +

    +If you use Clawpack in published work please cite this work, +with a citation similar to the following: + +

    +    Clawpack Development Team (YEAR), Clawpack Version X.Y.Z,
    +    http://www.clawpack.org, doi: 10.5281/zenodo.xxxxxxx
    +
    + +For the DOI corresponding to a particular release, see +Releases of Clawpack and release notes. +It is best to refer to the particular release used to obtain your results, +but if you need to refer to multiple past releases, +or to cite Clawpack more generally, you can also use the DOI +10.17605/osf.io/kmw6h, e.g. + +
    +    Clawpack Development Team (YEAR), Clawpack Software,
    +    http://www.clawpack.org, doi: 10.17605/osf.io/kmw6h
    +
    + + +

    +See also citing +Clawpack for the bibtex and some journal paper citations we +recommend. + +

    Releases

    +

    +For a list of 5.x releases, release notes, and Github commit logs, see +Releases of Clawpack and release notes. +

    +Clawpack-4 has not been maintained since 2013, but you can still find +some earlier versions and sample codes that rely on them on the +Clawpack-4 webpages. +

    + + + +

    Overview

    +

    +Originally developed in 1994 by Randall LeVeque, Clawpack is now contributed to +by +many developers +and includes a number of related projects. +See About this software and the +Bibliography +for more details. + + +

    Key features include: +

    + +
      +
    • Solution of general hyperbolic PDEs provided a Riemann solver + is given
    • +
    • Adaptive mesh refinement included in AMRClaw and GeoClaw
    • +
    • Parallelism scalable to tens of thousands of cores or more, included in PyClaw
    • +
    + +

    +Solution of a given PDE system with Clawpack requires specifying +an approximate Riemann solver for +that system. Solvers for many common applications are bundled with the +software. See Riemann solvers +for more information. +

    + +

    +New users may wish to first read +Which Clawpack solver should I use? + and +Installation instructions.

    + +

    +See Clawpack Community for links to +mailing lists, other sources of help, upcoming events, +and also instructions for raising an issue if you want to +report a bug or suggest an improvement. + +

    +We welcome new developers, see the +Developers' Guide +and the GitHub Clawpack +Organization. + +

    +Clawpack is a NumFOCUS affiliated project. +The development of Clawpack has been supported by many grants and +organizations over the years, see +Funding. +

    +Clawpack swag +is now available! + +

    Documentation

    + + + + + +
    + +

    Contents
    + for a complete overview

    +
    + +
    + + + + + +
    + + +

    Examples

    + + + + +
    + +
    + +
    + +

    Older versions

    + + + + +
    + +
    + + + +
    + + +
    +
    +
    +
    + +
    +
    + + + +
    + + + \ No newline at end of file diff --git a/v5.10.x/installing.html b/v5.10.x/installing.html new file mode 100644 index 0000000000..dc3b1f9507 --- /dev/null +++ b/v5.10.x/installing.html @@ -0,0 +1,231 @@ + + + + + + + + + Installing Clawpack — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Installing Clawpack

    +

    See also:

    + +

    Register: Please register +if you have not already done so. This is very useful in helping +us track the extent of usage, and important to the Funding agencies +who support this work.

    +

    Prerequisites: Before installing, check that you have the Installation Prerequisites.

    +

    Please see

    + +

    before installing, particularly if you are not sure whether you will +be using the Fortran versions of the PDE solvers +(Classic, AMRClaw, and GeoClaw) or the PyClaw version of the PDE solvers.

    +

    Then choose the best installation option for your needs from this list:

    + +
    +

    Next steps:

    +

    Once Clawpack is installed, you can go to one of the following pages to get +started:

    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/installing_fortcodes.html b/v5.10.x/installing_fortcodes.html new file mode 100644 index 0000000000..a4dc35041f --- /dev/null +++ b/v5.10.x/installing_fortcodes.html @@ -0,0 +1,249 @@ + + + + + + + + + Options for installing Clawpack Fortran codes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Options for installing Clawpack Fortran codes

    +

    This page describes ways to download and “install” Clawpack in a way that +the Fortran versions of the PDE solvers (Classic, AMRClaw, and GeoClaw) +can be used, along with Python codes that support these solvers, including +the visualization tools in VisClaw.

    +

    If you plan to use the PDE solvers directly from PyClaw, please +see Installing Clawpack for other options. If you are not sure, see +Which Clawpack solver should I use?

    +
    +

    tar file

    +

    You can download the most recent (or certain previous versions) of Clawpack +as a tar file. After untarring this, you can set environment variables +to point to this version.

    +

    Download a tar file from one of these sources:

    + +

    After downloading a tar file you can do, e.g.

    +
    tar -xzf clawpack-v5.9.2.tar.gz
    +cd clawpack-v5.9.2
    +export CLAW=/full/path/to/clawpack-v5.9.2  # in bash
    +
    +
    +

    The last command sets an environment variable when using the bash shell. +The syntax may be different in other shells. Replace /full/path/to +with the appropriate full path.

    +

    You must also add $CLAW to your PYTHONPATH environment variable, +see Python path.

    +
    +
    +

    git clone

    +

    You can clone the git repositories from https://github.com/clawpack. +This is particularly useful if you +want the latest development version or a branch that is not in a release yet, +and/or if you plan to contribute to the code yourself via a pull request. +See Developers’ Guide for more details, but the basic commands are:

    +
    git clone https://github.com/clawpack/clawpack.git
    +cd clawpack
    +git checkout v5.9.2     # or an older version; `git tag -l` to list options
    +git submodule init      # for repositories pyclaw, clawutil, visclaw, etc.
    +git submodule update    # clones all the submodule repositories
    +export CLAW=/full/path/to/clawpack    # in bash
    +
    +
    +

    The last command sets an environment variable when using the bash shell. +The syntax may be different in other shells. Replace /full/path/to +with the appropriate full path.

    +

    You must also add $CLAW to your PYTHONPATH environment variable, +see Python path.

    +

    Components: +See Clawpack components for a list of what is generally included +under the top level clawpack directory when using any of these approaches. +(And what is not included, e.g. the Clawpack Applications repository.)

    +
    +

    Next steps:

    +

    Once Clawpack is installed, you can get started:

    + +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/installing_pip.html b/v5.10.x/installing_pip.html new file mode 100644 index 0000000000..98397a45b2 --- /dev/null +++ b/v5.10.x/installing_pip.html @@ -0,0 +1,348 @@ + + + + + + + + + pip install instructions — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    pip install instructions

    +

    Note: If you only plan to use the Fortran versions of the solvers +(rather than PyClaw), and you run into problems with pip, +then you might want to try Options for installing Clawpack Fortran codes.

    +
    +

    Quick Installation of PyClaw with pip

    +

    Please see Which Clawpack solver should I use? before installing, particularly +if you are not sure whether you will +be using the Fortran versions of the PDE solvers +(Classic, AMRClaw, and GeoClaw) or the PyClaw version of the PDE solvers. +See Installing Clawpack for other installation options.

    +

    Prerequisites: Before installing, check that you have the Installation Prerequisites.

    +

    If you only want to use PyClaw (and associated Python +tools, e.g. VisClaw for visualization), then the simplest way to install +Clawpack is via:

    +
    pip install --user clawpack
    +
    +
    +

    or, more specifically,

    +
    pip install --user clawpack==v5.9.2
    +
    +
    +

    or you can choose a previous version from the PyPi history.

    +

    However, note that this does not download the Fortran codes in a way that they +can be used for Classic, AMRClaw, and GeoClaw.

    +

    If you think you might want to use the Fortran packages as well +(Classic, AMRClaw, GeoClaw) and/or want easier access to the Python source +code, it is recommended that you follow the pip instructions below.

    +
    +
    +

    Quick Installation of all packages with pip

    +

    The recommended way to install the latest release of Clawpack, for +using both PyClaw and the Fortran packages, is to use pip, e.g. with the +following command +(you might want to first read the notes below to see if you +want to change anything in this command):

    +
    pip install --src=$HOME/clawpack_src --user --no-build-isolation -e \
    +    git+https://github.com/clawpack/clawpack.git@v5.9.2#egg=clawpack
    +
    +
    +

    Notes:

    +
      +
    • With older versions of pip, the flag +–use-deprecated=legacy-resolver +may not be recognized and is not needed.

    • +
    • Using pip to install will also check some python +Installation Prerequisites and may update these on your system, and will use f2py to +convert Fortran Riemann solvers to Python versions. See +installing_options if you want more control.

    • +
    • This will download Clawpack (via a git clone) into the directory +$HOME/clawpack_src/clawpack-v5.9.2. The top +installation directory can be changed by modifying the --src target +(or omit this part to put it in your current working directory). +If you have already downloaded Clawpack via a different mechanism then +see Using pip to install a different version rather than using the above command.

    • +
    • See Clawpack components for a list of what’s included in this top +level directory.

    • +
    • The --user flag is necessary if you are installing on a shared computer +where you do not have root access. If you do have root access and want it +to be available to all users, you can omit this flag. See notes below for +more information.

    • +
    • The -e flag makes it an “editable” install, leaving the source code in +place and allowing you to modify it if desired. +(Otherwise, by default, pip would move the python code to some +site-packages directory and delete everything else.)

    • +
    • In order to use the Fortran codes within Clawpack (classic, +amrclaw, or geoclaw), you should then set the environment +variable CLAW to point to the clawpack-v5.9.2 directory within +the installation directory $HOME/clawpack_src, and FC to point +to the desired Fortran compiler, e.g. in the bash shell:

      +
      export CLAW=$HOME/clawpack_src/clawpack-v5.9.2
      +export FC=gfortran
      +
      +
      +
    • +
    • You may want to set CLAW even if you are only using PyClaw, since $CLAW is +sometimes used in this documentation to indicate the top level of the +Clawpack source directory structure.

    • +
    +

    Installing with pip also compiles Riemann solvers written in Fortran for +use in PyClaw. If you get a Fortran error message when installing, see +Setting the Fortran compiler to be used by f2py (pip).

    +

    See Set environment variables for more information, and Python path if you are +having problems with importing Python modules.

    +
    +

    Next steps:

    +

    Once Clawpack is installed, you can go to one of the following pages to get +started:

    + +
    +
    +

    Using pip to install a different version

    +

    Using pip to download and install actually clones Git repositories from +https://github.com/clawpack/clawpack. If you are comfortable with +Git you can use the same top repository to update Clawpack or switch +to other versions. However, if you have made any changes to files +that are tracked by Git in this set of directories and then try to +update or check out other branches, you may run into merge conflicts.

    +

    Instead, you can always install another branch by doing a new +pip install into a different subdirectory of clawpack_src, e.g.

    +
    export CLAW_VERSION=v5.3.1  # used several places in next commands
    +pip install --src=$HOME/clawpack_src --user --no-build-isolation -e \
    +    git+https://github.com/clawpack/clawpack.git@$CLAW_VERSION#egg=clawpack
    +export CLAW=$HOME/clawpack_src/clawpack-$CLAW_VERSION
    +
    +
    +

    If this version doesn’t already exist on your computer then it will clone +the necessary repositories.

    +

    If you already have a different version of Clawpack in some directory +obtained by any means (e.g. from a tarfile), then you can set the paths +properly via:

    +
    export CLAW=/full/path/to/desired/version/of/clawpack
    +cd $CLAW
    +pip install --user --no-build-isolation -e ./
    +
    +
    +

    See Python path if you are having problems with the wrong version +being imported.

    +
    +
    +

    Experimenting with code in the examples directories

    +

    We suggest that if you want to experiment extensively with examples or +modify an example to solve your own problem, you first copy a directory out +of the source code tree to a different location, in order to minimize +confusion if you later want to update to a different version of clawpack. See +Creating a new application directory for more details.

    +

    If you want to check out the master branch of the clawpack repositories or +work with other development versions, see Installation instructions for developers.

    +
    +
    +

    Troubleshooting pip install

    +

    In case you run into problems with pip install or with changing version, +here are some tips:

    +
      +
    • The -e flag (“editable”) results in the the source code +remaining in the directory $CLAW, which includes all the Fortran packages as +well as Python source.

    • +
    • When the –user flag is omitted, the pip install will modify a +system-wide file easy-install.pth to add the path. This requires +root permission. When the –user flag is used, this path will +instead be added to an easy-install.pth file that is within +your user directory structure. See Python path for information on +finding these files.

    • +
    • If you use pip to install or switch versions then you should not set +the environment variable PYTHONPATH. See Python path for more +information.

    • +
    • If you wish to point to a different version of the Clawpack Python tools, +you need to rerun pip install (or use pip uninstall clawpack to +remove clawpack from the search path controlled by pip).

    • +
    • If you get a Fortran error message when installing, see +Setting the Fortran compiler to be used by f2py (pip).

    • +
    +

    If you cannot get this to work, consider other Installing Clawpack and +raise an issue to let us know +what went wrong.

    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/kmltools_module.html b/v5.10.x/kmltools_module.html new file mode 100644 index 0000000000..9dfdf740eb --- /dev/null +++ b/v5.10.x/kmltools_module.html @@ -0,0 +1,664 @@ + + + + + + + + + kmltools module of utility functions — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    kmltools module of utility functions

    +

    This describes new tools added in Clawpack 5.2.1.

    +
    +

    Documentation auto-generated from the module docstrings

    +

    kmltools module: $CLAW/geoclaw/src/python/geoclaw/kmltools.py

    +

    Tools to make kml files to overlay on Google Earth. +Note that color is in KML format, BGR with 2 hex digits for each, e.g.

    +
    +

    FF0000 is blue, 00FF00 is green, 0000FF is red, 00FF00 is yellow.

    +
    +

    Actually it’s an 8 hex digit number, where the first two digits are +transparency, but in this module these default to ‘FF’ (but you can specify +the full 8 digits if you want it transparent).

    +
    +
    Functions:
    +
      +
    • deg2dms - convert decimal degrees to (degrees, minutes, seconds)

    • +
    • regions2kml - create a kml outline for each regions specified in setrun

    • +
    • box2kml - create a kml outline from a rectangular box

    • +
    • quad2kml - create a kml outline for an arbitrary quadrilateral

    • +
    • poly2kml - create a kml outline for an arbitrary polygon

    • +
    • line2kml - create a kml line connecting 2 points

    • +
    • gauges2kml - create a kml marker for each gauge specified in setrun

    • +
    • topo2kml - create a kml outline for each topo grid specified in setrun

    • +
    • dtopo2kml - create a kml outline for each dtopo grid specified in setrun

    • +
    • fgmax2kml - create a kml outline for each fgmax grid specified in setrun

    • +
    • fgout2kml - create a kml outline for each fgout grid specified in setrun

    • +
    • make_input_data_kmls - make kml files for many things specified in setrun

    • +
    • pcolorcells_for_kml - version of pcolormesh with appropriate dpi and size

    • +
    • png2kml - create kml file wrapping a png figure to be viewed on GE

    • +
    • kml_build_colorbar - create a colorbar to display on GE

    • +
    • topo2kmz - create kmz file showing onshore and offshore topography

    • +
    • transect2kml - create kml file showing a set of points on a transect

    • +
    • kml_header - used internally

    • +
    • kml_footer - used internally

    • +
    • kml_region - used internally

    • +
    • kml_gauge - used internally

    • +
    • kml_png - used internally

    • +
    • kml_cb - used internally

    • +
    +
    +
    +
    +
    +clawpack.geoclaw.kmltools.box2kml(xy, fname=None, name='box', color='FF0000', width=3, verbose=True)
    +

    Make a KML box with default color blue.

    +
    +
    Inputs:
    +
      +
    • +
      xy a tuple ((x1,x2),(y1,y2)) (preferred)

      or (x1,x2,y1,y2) (for backward compatibility)

      +
      +
      +
    • +
    • fname (str) name of resulting kml file

    • +
    • name (str) name to appear in box on Google Earth

    • +
    • color (str) Color in format aabbggrr

    • +
    • width (str) line width

    • +
    • verbose (bool) - If True, print out info

    • +
    +
    +
    +
    + +
    +
    +clawpack.geoclaw.kmltools.deg2dms(dy)
    +

    Convert decimal degrees to tuple (degrees, minutes, seconds)

    +
    + +
    +
    +clawpack.geoclaw.kmltools.dtopo2kml(dtopo_file_name, dtopo_type, color='8888FF')
    +

    Create a kml file putting a box around the region covered by a dtopofile. +Color is pink by default.

    +
    + +
    +
    +clawpack.geoclaw.kmltools.f2s(x, num_digits=6)
    +

    Convert float to string in fixed point notation with at most +num_digits digits of precision and trailing zeros removed, +for printing nicely in kml description boxes.

    +
    + +
    +
    +clawpack.geoclaw.kmltools.fgmax2kml(rundata=None, fname='fgmax_grids.kml', verbose=True, combined=False)
    +

    Create a KML box for each fgmax grid specified for a GeoClaw run.

    +
    +
    Inputs:
    +
      +
    • rundata - an object of class ClawRunData or None

      +

      If rundata==None, try to create based on executing function setrun +from the setrun.py file in the current directory.

      +
    • +
    • fname (str) - resulting kml file.

    • +
    • verbose (bool) - If True, print out info about each region found

    • +
    • combined (bool) - If True, combine into single kml file with +name given by fname. NOT YET IMPLEMENTED. +If False, fname is ignored and individual files are created for +each fgmax grid.

    • +
    +
    +
    +
    + +
    +
    +clawpack.geoclaw.kmltools.fgout2kml(rundata=None, fname='fgout_grids.kml', verbose=True, combined=False)
    +

    Create a KML box for each fgout grid specified for a GeoClaw run.

    +
    +
    Inputs:
    +
      +
    • rundata - an object of class ClawRunData or None

      +

      If rundata==None, try to create based on executing function setrun +from the setrun.py file in the current directory.

      +
    • +
    • fname (str) - resulting kml file.

    • +
    • verbose (bool) - If True, print out info about each region found

    • +
    • combined (bool) - If True, combine into single kml file with +name given by fname. NOT YET IMPLEMENTED. +If False, fname is ignored and individual files are created for +each fgout grid.

    • +
    +
    +
    +
    + +
    +
    +clawpack.geoclaw.kmltools.gauges2kml(rundata=None, fname='gauges.kml', verbose=True)
    +

    Create a KML marker for each gauge specified for a GeoClaw run.

    +
    +
    Inputs:
    +
      +
    • rundata - an object of class ClawRunData or None

      +

      If rundata==None, try to create based on executing function setrun +from the setrun.py file in the current directory.

      +
    • +
    • fname (str) - resulting kml file.

    • +
    • verbose (bool) - If True, print out info about each region found

    • +
    +
    +
    Example:
    +
    >>> from clawpack.geoclaw import kmltools
    +>>> kmltools.gauges2kml()
    +
    +
    +
    +
    +

    is equivalent to:

    +
    >>> from clawpack.geoclaw import kmltools
    +>>> from setrun import setrun
    +>>> rundata = setrun()
    +>>> kmltools.gauges2kml(rundata)
    +
    +
    +

    By default this creates a file named gauges.kml that can be opened in +Google Earth.

    +
    + +
    +
    +clawpack.geoclaw.kmltools.kml_build_colorbar(cb_filename, cmap, cmin=None, cmax=None, norm=None, label=None, title=None, extend='neither', close_figs=True)
    +

    Make a png file with a colorbar corresponding to cmap, norm. +cmin, cmax are used only if nrm is not provided.

    +
    + +
    +
    +clawpack.geoclaw.kmltools.kml_cb(mapping)
    +

    Create text for a colorbar png file overlay

    +
    + +
    +
    +clawpack.geoclaw.kmltools.kml_png(mapping)
    +

    Create text for a png file overlay

    +
    + +
    +
    +clawpack.geoclaw.kmltools.kml_timespan(t1, t2, event_time=None, tz=None, tscale=1)
    +

    Create time strings necessary for sliders in Google Earth. The time +span will cover time [t1,t2], with the start of the event given by +event_time.

    +

    [t1,t2] : time span,

    +

    event_time : Start of event in UTC : [Y,M,D,H,M,S], e.g. [2010,2,27,3,34,0] +tz : time zone offset to UTC. e.g. +3 for Chile; -9 for Japan.

    +

    Time span element looks like

    +
    <TimeSpan>
    +  <begin>2010-02-27T06:34:00+03:00</begin>
    +  <end>2010-02-27T07:04:00+03:00</end>
    +</TimeSpan>
    +
    +
    +

    As for how well this handles Daylight Savings time, here is what the documentation +on the Python ‘time’ module has to say :

    +

    “DST is Daylight Saving Time, an adjustment of the timezone by (usually) one hour +during part of the year. DST rules are magic (determined by local law) and can +change from year to year. The C library has a table containing the local rules +(often it is read from a system file for flexibility) and is the only source of +True Wisdom in this respect.”

    +
    + +
    +
    +clawpack.geoclaw.kmltools.line2kml(xy, fname='line.kml', name='line', color='00FFFF', width=3, verbose=True)
    +

    Make a KML line with default color yellow.

    +
    +
    Inputs:
    +
      +
    • +
      xy a tuple ((x1,x2),(y1,y2)) (preferred)

      or (x1,x2,y1,y2) (for backward compatibility)

      +
      +
      +
    • +
    • fname (str) name of resulting kml file

    • +
    • name (str) name to appear on line on Google Earth

    • +
    • color (str) Color in format aabbggrr

    • +
    • width (str) line width

    • +
    • verbose (bool) - If True, print out info

    • +
    +
    +
    +
    + +
    +
    +clawpack.geoclaw.kmltools.make_input_data_kmls(rundata=None, combined=False)
    +

    Produce kml files for the computational domain, all gauges and regions +specified, and all topo and dtopo files specified in rundata. +This can be used, e.g. by adding the lines

    +
    +

    from clawpack.geoclaw import kmltools +kmltools.make_input_data_kmls(rundata)

    +
    +

    to the end of a setrun.py file so that make data will generate all +kml files in addition to the *.data files.

    +

    Or set rundata==None, in which case it will try to generate rundata +based on executing function setrun +from the setrun.py file in the current directory.

    +
    + +
    +
    +clawpack.geoclaw.kmltools.pcolorcells_for_kml(X, Y, Z, png_filename=None, dpc=2, max_inches=15.0, verbose=True, **kwargs)
    +

    Wraps pcolormesh in a way that a png file is created that can be viewed +on Google Earth with proper alignment and with sharp grid cell edges. +Works if X,Y are cell centers or edges, and X,Y can be 2d or 1d arrays.

    +

    X,Y,Z is the data to be plotted. It is assumed to be finite volume data +where Z[i,j] is a constant value over a grid cell.

    +

    Internally x,y are defined as 1d arrays since it is assumed the +grids are Cartesian.

    +

    If the length of the 1d arrays x and y match the dimensions of Z then +these are assumed to be cell center values. In this case the arrays +are expanded by one to obtain x_edge, y_edge as edge values, +as needed for proper alignment.

    +

    If the length of x,y is already one greater than the corresponding +dimension of Z, then it is assumed that these are already edge values.

    +

    If png_filename is not None then a png file is written with appropriate dpi.

    +

    dpc is the desired “dots per cell”, how many pixels to allot to each +to each grid cell. This should be an integer to avoid interpolation +between cells that smears out the cell boundaries in the png file. +Increasing this will give sharper boundaries but also larger files that +load more slowly.

    +

    max_inches is the desired size of the longer edge of the figure created. +This value is not very important unless you want to view the png file +on a screen outside of Google Earth. Internally the dimensions of the +figure x_inches and y_inches are determined to be consistent +with the value dpc specified and a reasonable value of dpi for the +png file, as described below.

    +

    Internally the value dpi (dots per inch) for the png file is +determined so that it is at least 16 and so that:

    + +
    +

    dpi * x_inches = dcp * x_cells +dpi * y_inches = dcp * y_cells

    +
    + +

    where x_cells, y_cells are the number of cells in each direction.

    +

    kwargs are passed to pcolormesh, e.g. cmap and norm are +generally specified.

    +

    This function returns fig, ax, png_extent, kml_dpi so the user can further +annotate the figure befor saving it as a png file, which should then +be done with:

    + +
    +

    plt.savefig(png_filename, transparent=True, dpi=kml_dpi)

    +
    + +

    The png_extent is needed in construcing a kml file to display the +png file on Google Earth, e.g. using the function png2kml in this +module.

    +
    + +
    +
    +clawpack.geoclaw.kmltools.png2kml(extent, png_files, png_names=None, name='png_files', fname=None, radio_style=False, cb_files=None, cb_names=None, cb_xfracs=None, cb_yfracs=None, verbose=True)
    +

    Create a kml file fname linking overlays for each png file in png_files.

    +

    extent is [x1,x2,y1,y2] specifying where image should be overlaid.

    +

    png_names, if present, will give the name for each image for the +Google Earth menu.

    +

    If radio_style is True, set radio buttons so only one can be shown at a +time, useful for combining plots of different quantities in same file.

    +
    + +
    +
    +clawpack.geoclaw.kmltools.poly2kml(xy, fname=None, name='poly', color='00FF00', width=3, verbose=True, max_vertices_in_description=20)
    +

    Make a KML polygon with default color blue.

    +
    +
    Inputs:
    +
      +
    • xy a tuple (x,y) where x and y are lists of vertices

    • +
    • fname (str) name of resulting kml file

    • +
    • name (str) name to appear in box on Google Earth

    • +
    • color (str) Color in format aabbggrr

    • +
    • width (str) line width

    • +
    • verbose (bool) - If True, print out info

    • +
    • max_vertices_in_description (int) - if more than this number +of vertices, only list number in description box, not all vertices

    • +
    +
    +
    +
    + +
    +
    +clawpack.geoclaw.kmltools.quad2kml(xy, fname=None, name='quad', color='FF0000', width=3, verbose=True)
    +

    Make a KML quadrilateral with default color blue.

    +
    +
    Inputs:
    +
      +
    • +
      xy a tuple ((x1,x2,x3,x4),(y1,y2,y3,y4)) (preferred)

      or (x1,x2,y1,y2,x3,y3,x4,y4) (for backward compatibility)

      +
      +
      +
    • +
    • fname (str) name of resulting kml file

    • +
    • name (str) name to appear in box on Google Earth

    • +
    • color (str) Color in format aabbggrr

    • +
    • width (str) line width

    • +
    • verbose (bool) - If True, print out info

    • +
    +
    +
    +
    + +
    +
    +clawpack.geoclaw.kmltools.regions2kml(rundata=None, fname='regions.kml', verbose=True, combined=True)
    +

    Create a KML box for each AMR region specified for a GeoClaw run.

    +
    +
    Inputs:
    +
      +
    • rundata - an object of class ClawRunData or None

      +

      If rundata==None, try to create based on executing function setrun +from the setrun.py file in the current directory.

      +
    • +
    • fname (str) - resulting kml file.

    • +
    • verbose (bool) - If True, print out info about each region found

    • +
    • combined (bool) - If True, combine into single kml file with +name given by fname. This is the default. +If False, fname is ignored and individual files are created for +each region with names are Domain.kml, Region00.kml, etc. +These will show up separately in GoogleEarth so they can be turned +on or off individually.

    • +
    +
    +
    +

    First create a box for the entire domain (in red) and then a box +for each region (in white).

    +
    +
    Example:
    +
    >>> from clawpack.geoclaw import kmltools
    +>>> kmltools.regions2kml()
    +
    +
    +
    +
    +

    is equivalent to:

    +
    >>> from clawpack.geoclaw import kmltools
    +>>> from setrun import setrun
    +>>> rundata = setrun()
    +>>> kmltools.regions2kml(rundata)
    +
    +
    +

    By default this creates a file named regions.kml that can be opened in +Google Earth.

    +
    + +
    +
    +clawpack.geoclaw.kmltools.topo2kml(topo_file_name, topo_type, color='00FF00')
    +

    Create a kml file putting a box around the region covered by a topofile. +Color is green by default.

    +
    + +
    +
    +clawpack.geoclaw.kmltools.topo2kmz(topo, zlim=(-20, 20), mask_outside_zlim=True, sea_level=0.0, name='topo', force_dry=None, close_figs=True)
    +

    Create kmz file showing onshore and offshore topography as separate layers. +Currently not very flexible but is useful in quickly creating kmz files +to open on Google Earth showing the onshore topography and offshore +bathymetry as two separate layers. Constant colors on rectangular grid +cells should be properly rendered to ease exploration of DEMs. +A colorbar png file is also created and included in the kmz file.

    +
    +
    Input:
    +
      +
    • topo should be a topotools.Topography object,

    • +
    • zlim is the elevation z limits for choosing the color map

    • +
    • mask_outside_zlim if True, suppress plotting outsize zlim

    • +
    • sea_level is the break between water and land colors

    • +
    • name is used in the kml menu and file name

    • +
    • force_dry is currently not used

    • +
    • close_figs to close the pyplot figures after making png files

    • +
    +
    +
    Future:
    +

    +
    + +

    If force_dry is an array of the same shape as topo.Z then another png +and kml file are created for land that is below sea_level but where +force_dry = True.

    +
    + +
    +
    +clawpack.geoclaw.kmltools.transect2kml(xtrans, ytrans, fname='transect.kml')
    +

    Create a kml file for points with long,lat specified by xtrans,ytrans. +Label each point with number and coordinates. +Adjust longitudes in coordinates so they are all between -180 and 180 +to display properly in Google Earth (but labels are original values).

    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/lagrangian_gauges.html b/v5.10.x/lagrangian_gauges.html new file mode 100644 index 0000000000..7a74eaf36a --- /dev/null +++ b/v5.10.x/lagrangian_gauges.html @@ -0,0 +1,254 @@ + + + + + + + + + Lagrangian gauges for particle tracking — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Lagrangian gauges for particle tracking

    +
    +

    Specifying Lagrangian Gauges

    +

    Gauges are normally added in setrun.py via lines of the form:

    +
    rundata.gaugedata.gauges.append([gaugeno, xg, yg, t1, t2])
    +
    +
    +

    where (xg,yg) is the gauge location and the gauge is to be tracked +for t1 <= t <= t2. Several properties can already be set for gauges, +for example rundata.gaugedata.display_format can be used to specify +how many digits to print out. This can be either a single format string +or a dictionary with an entry for each gauge, as described at +Gauges.

    +

    As of GeoClaw Version 5.7.0, +a new property has been defined that specifies whether each gauge is +“stationary” or “lagrangian”. In the past all gauges were stationary, +i.e. (xg,yg) is a fixed location. If a gauge is set to be lagrangian +then (xg,yg) specifies the initial location for t <= t1 but +after this time the gauge location is updated using the fluid velocity +at each time that the gauge values are recorded (until time t2 if +this is less than the final time of the computation, but often it is set +to a huge value like 1e9).

    +

    The frequency of updating is controlled by +rundata.gaugedata.min_time_increment – if this is 0 (the default) +then the gauge values are updated every time step.

    +

    Currently lagrangian gauges are implemented only in GeoClaw, for which +the fluid velocity (ug,vg) at a gauge location (xg,yg) is +computed from the momentum in the appropriate manner based on +rundata.geo_data.coordinate_system. This could be implemented more +generally in amrclaw in the same manner, but of course would only make +sense when solving equations for velocities are part of the solution.

    +

    The velocities are used to move each gauge location from the current +(xg, yg) to (xg + dt*ug, yg + dt*vg), i.e. Forward Euler is used +to integrate \(dx/dt = u, dy/dt = v\).

    +

    The default if nothing is added to setrun.py is equivalent to +setting

    +
    rundata.gaugedata.gtype = 'stationary'
    +
    +
    +

    so that all gauges are stationary. Alternatively this can be set to +‘lagrangian’ to make all gauges lagrangian, or +rundata.gaugedata.gtype can be a dictionary with +rundata.gaugedata.gtype[gaugeno] set to one of these values as +desired for each gauge. These values are written out to gauges.data +(as 1 for stationary, 2 for lagrangian), from which they are read into +GeoClaw.

    +

    When a gauge is lagrangian, the values written out (e.g. to the file +_output/gauge00001.txt for gauge 1) are modified so that the columns +that normally contain momenta hu and hv are replaced by the +current location xg and yg.

    +
    +
    +

    Visclaw tools for plotting

    +

    A new module clawpack.visclaw.particle_tools has been added to +facilitate plotting particle locations and particle paths.

    +
    +
    +

    An alternative using fgout grids

    +

    One can also use the Fixed grid output (fgout) capabilities added to +GeoClaw in Version 5.9.0 in order to capture the solution over a specified +fixed grid at frequent output times. If this output is frequent enough, +then it is also possible to sample these outputs at a fixed location to give +a time series similar to a gauge output, but with the advantage that the +points need not be specified prior to the run (at least for any point that +can be spatially interpolated from the fgout grid(s) captured in the run). +The temporal resolution will be that specified for the fgout grids. +See Fixed grid output (fgout) for more details.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/license.html b/v5.10.x/license.html new file mode 100644 index 0000000000..a2af1deeeb --- /dev/null +++ b/v5.10.x/license.html @@ -0,0 +1,192 @@ + + + + + + + + + License — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    License

    +

    Clawpack is distributed under the terms of the +Berkeley Software Distribution (BSD) license.

    +

    See http://www.opensource.org/licenses/bsd-license.php +for more details.

    +

    Copyright (c) 1994–2020, The Clawpack Development Team. +All rights reserved.

    +

    Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met:

    +
    +
      +
    • Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer.

    • +
    • Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution.

    • +
    • Neither the name of the University of Washington nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission.

    • +
    +
    +

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/links/an11/index.html b/v5.10.x/links/an11/index.html new file mode 100644 index 0000000000..444177180d --- /dev/null +++ b/v5.10.x/links/an11/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/an11/ .... +

    + diff --git a/v5.10.x/links/awr11/index.html b/v5.10.x/links/awr11/index.html new file mode 100644 index 0000000000..436bfdefd6 --- /dev/null +++ b/v5.10.x/links/awr11/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/awr11/ .... +

    + diff --git a/v5.10.x/links/birs08/index.html b/v5.10.x/links/birs08/index.html new file mode 100644 index 0000000000..98b1052449 --- /dev/null +++ b/v5.10.x/links/birs08/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/birs08/ .... +

    + diff --git a/v5.10.x/links/burgersadv/index.html b/v5.10.x/links/burgersadv/index.html new file mode 100644 index 0000000000..2e87343b80 --- /dev/null +++ b/v5.10.x/links/burgersadv/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/burgersadv/ .... +

    + diff --git a/v5.10.x/links/cise09/index.html b/v5.10.x/links/cise09/index.html new file mode 100644 index 0000000000..1414e0359e --- /dev/null +++ b/v5.10.x/links/cise09/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/cise09/ .... +

    + diff --git a/v5.10.x/links/eswt/index.html b/v5.10.x/links/eswt/index.html new file mode 100644 index 0000000000..c81accc661 --- /dev/null +++ b/v5.10.x/links/eswt/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/eswt/ .... +

    + diff --git a/v5.10.x/links/honshu2011/index.html b/v5.10.x/links/honshu2011/index.html new file mode 100644 index 0000000000..d24c5ea19e --- /dev/null +++ b/v5.10.x/links/honshu2011/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/honshu2011/ .... +

    + diff --git a/v5.10.x/links/icerm-tw12-5-rcem/index.html b/v5.10.x/links/icerm-tw12-5-rcem/index.html new file mode 100644 index 0000000000..6b5a47451f --- /dev/null +++ b/v5.10.x/links/icerm-tw12-5-rcem/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/icerm-tw12-5-rcem/ .... +

    + diff --git a/v5.10.x/links/index.html b/v5.10.x/links/index.html new file mode 100644 index 0000000000..3298b2f980 --- /dev/null +++ b/v5.10.x/links/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/ .... +

    + diff --git a/v5.10.x/links/mkdirs.py b/v5.10.x/links/mkdirs.py new file mode 100644 index 0000000000..6b3bf41af9 --- /dev/null +++ b/v5.10.x/links/mkdirs.py @@ -0,0 +1,36 @@ + +import os + +dirs = """ +an11 +awr11 +birs08 +burgersadv +cise09 +eswt +honshu2011 +icerm-tw12-5-rcem +noaa-tsunami-benchmarks +nthmp-benchmarks +papers +radial-ocean-island +sharpclaw11 +shockvacuum10 +siamnews11 +sphere +talks +tsunami-benchmarks +tutorials +wbfwave10 +""".split() + + +index = open('index.html').read() + +for dir in dirs: + os.system('mkdir -p %s' % dir) + dir_index = index.replace('links','links/%s' % dir) + f = open('%s/index.html' % dir,'w') + f.write(dir_index) + f.close() + diff --git a/v5.10.x/links/noaa-tsunami-benchmarks/index.html b/v5.10.x/links/noaa-tsunami-benchmarks/index.html new file mode 100644 index 0000000000..85a954e89a --- /dev/null +++ b/v5.10.x/links/noaa-tsunami-benchmarks/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/noaa-tsunami-benchmarks/ .... +

    + diff --git a/v5.10.x/links/nthmp-benchmarks/index.html b/v5.10.x/links/nthmp-benchmarks/index.html new file mode 100644 index 0000000000..f11968f53a --- /dev/null +++ b/v5.10.x/links/nthmp-benchmarks/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/nthmp-benchmarks/ .... +

    + diff --git a/v5.10.x/links/papers/index.html b/v5.10.x/links/papers/index.html new file mode 100644 index 0000000000..ffc5e4df90 --- /dev/null +++ b/v5.10.x/links/papers/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/papers/ .... +

    + diff --git a/v5.10.x/links/radial-ocean-island/index.html b/v5.10.x/links/radial-ocean-island/index.html new file mode 100644 index 0000000000..c73acb6f03 --- /dev/null +++ b/v5.10.x/links/radial-ocean-island/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/radial-ocean-island/ .... +

    + diff --git a/v5.10.x/links/sharpclaw11/index.html b/v5.10.x/links/sharpclaw11/index.html new file mode 100644 index 0000000000..8604c17960 --- /dev/null +++ b/v5.10.x/links/sharpclaw11/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/sharpclaw11/ .... +

    + diff --git a/v5.10.x/links/shockvacuum10/index.html b/v5.10.x/links/shockvacuum10/index.html new file mode 100644 index 0000000000..1d4ed67284 --- /dev/null +++ b/v5.10.x/links/shockvacuum10/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/shockvacuum10/ .... +

    + diff --git a/v5.10.x/links/siamnews11/index.html b/v5.10.x/links/siamnews11/index.html new file mode 100644 index 0000000000..f54c562676 --- /dev/null +++ b/v5.10.x/links/siamnews11/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/siamnews11/ .... +

    + diff --git a/v5.10.x/links/sphere/index.html b/v5.10.x/links/sphere/index.html new file mode 100644 index 0000000000..49f8a29ab1 --- /dev/null +++ b/v5.10.x/links/sphere/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/sphere/ .... +

    + diff --git a/v5.10.x/links/talks/index.html b/v5.10.x/links/talks/index.html new file mode 100644 index 0000000000..de5de5a940 --- /dev/null +++ b/v5.10.x/links/talks/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/talks/ .... +

    + diff --git a/v5.10.x/links/tsunami-benchmarks/index.html b/v5.10.x/links/tsunami-benchmarks/index.html new file mode 100644 index 0000000000..c49b1e7a9a --- /dev/null +++ b/v5.10.x/links/tsunami-benchmarks/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/tsunami-benchmarks/ .... +

    + diff --git a/v5.10.x/links/tutorials/index.html b/v5.10.x/links/tutorials/index.html new file mode 100644 index 0000000000..f7d59f7e76 --- /dev/null +++ b/v5.10.x/links/tutorials/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/tutorials/ .... +

    + diff --git a/v5.10.x/links/wbfwave10/index.html b/v5.10.x/links/wbfwave10/index.html new file mode 100644 index 0000000000..51408e1657 --- /dev/null +++ b/v5.10.x/links/wbfwave10/index.html @@ -0,0 +1,11 @@ + + + +

     

    +

    +Redirecting to +http://depts.washington.edu/clawpack/links/wbfwave10/ .... +

    + diff --git a/v5.10.x/makefiles.html b/v5.10.x/makefiles.html new file mode 100644 index 0000000000..fc8b8eefdb --- /dev/null +++ b/v5.10.x/makefiles.html @@ -0,0 +1,304 @@ + + + + + + + + + Clawpack Makefiles — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Clawpack Makefiles

    +

    Makefiles for the Fortran code in many repositories +use the common Makefile found in $CLAW/clawutil/src/Makefile.common, +so you must have the clawutil repository.

    +

    New in 5.4.0. The Makefile also typically refers to a common list of +library routines needed for this particular example or application code, +rather than listing all the files individually in every Makefile. See +Library routines in Makefiles for more details on how to specify local files in +place of library files if you need to replace a default file.

    +

    In most directories with a Makefile you can type:

    +
    $ make help
    +
    +
    +

    to find out what options are available.

    +
    +

    Applications directory Makefiles

    +
    +

    output

    +

    In applications directories, compiling and running the code can usually be +accomplished via:

    +
    $ make .output
    +
    +
    +

    This checks dependencies using the data of the hidden file .output that is +created after the code has successfully run. If any Fortran codes have been +modified since this date, the code is first recompiled. If the setrun.py +script has been changed more recently, then the data files are first +recreated.

    +

    If you want to re-run the code and you get:

    +
    $ make .output
    +make: `.output' is up to date.
    +
    +
    +

    then you can force it to run again by removing the file .output:

    +
    $ rm -f .output
    +$ make .output
    +
    +
    +

    This happens for example if you changed something that you know +will affect the output but that isn’t in the Makefile’s set of +dependencies, or if the code bombed or was aborted before completion.

    +

    The hidden file .output contains a single line, which is the path to the +directory where the output resides (as specified by the CLAW_outdir variable +in the Makefile). This file is used by the interactive plotting routines, as +described in Plotting with Visclaw.

    +

    You can also do:

    +
    $ make output
    +
    +
    +

    (with no dot before output) to run the code without checking dependencies. +This is sometimes handy but note that +if you modify the setrun function +and then do make output, it will not use the new parameter values. +You must do make .data to regenerate the data files used by Clawpack. +This would be done automatically by make .output, for which .data is a +dependency.

    +
    +
    +

    plots

    +

    In applications directories, plotting results computed by Clawpack can generally +be accomplished via:

    +
    $ make .plots
    +
    +
    +

    This checks dependencies using the date of the hidden file .plots.

    +

    This creates a set of webpages that show the plots, as described further in +Plotting with Visclaw. There are other interactive plotting options also described +there.

    +

    Starting in 4.5.1, you can also do

    +
    +

    $ make plots

    +
    +

    (with no dot before plots) to plot the output without checking dependencies. +This insures that the code will not be run again and is sometime safer than +make .plots, which may attempt to run the code if something appears out of +date.

    +
    +
    +

    Variables

    +

    A number of variables are defined in the Makefiles of application +directories. For example, output is directed to the subdirectory specified +by the variable OUTDIR. To change this, simply modify the Makefile before +typing “make .output”. Alternatively, you can modify the variable from the +command line, e.g.:

    +
    $ make .output OUTDIR=run1
    +
    +
    +

    to direct output to a subdirectory named run1.

    +
    +
    +

    Compiler flags

    +

    Compiler flags can be changed by modifying the FFLAGS variable in the +Makefile. If you change compiler flags you will generally need to recompile +all the Fortran files and the Makefile dependencies will not detect this. +To force recompilation of all files, use the “make new” option, e.g. to +recompile with the -g flag for debugging:

    +
    $ make new FFLAGS=-g
    +
    +
    +

    See Fortran Compilers for more about compiler flags.

    +
    +
    +

    Duplicate Base Source Name

    +

    Fortran source files with the same base name but different suffixes can cause +unexpected source files to be compiled. This occurs as the Makefiles are +structured to use the free-format Fortran source files .f90* before the +fixed-format source files with *.f*. For example, if someone specified +*qinit.f* in the Makefile but there was a *qinit.f90* file that existed in the +same directory then the compiler would compile the **f90 file instead of the +f file.

    +

    The best way to avoid this problem is to check periodically whether you may +have conlicting source via the make debug command which should list +possible conflicts. Note that this command will also list sources that may +not be in conflict. If you do have conflicting source either remove the +f90 file, rename it, or convert the f file into a f90 file.

    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/makefiles_library.html b/v5.10.x/makefiles_library.html new file mode 100644 index 0000000000..f88440b980 --- /dev/null +++ b/v5.10.x/makefiles_library.html @@ -0,0 +1,301 @@ + + + + + + + + + Library routines in Makefiles — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Library routines in Makefiles

    +

    See Clawpack Makefiles for general information on using the Makefile found +in application directories for the Fortran codes.

    +

    New in 5.4.0. The Makefile also typically refers to a common list of +library routines needed for this particular example or application code, +rather than listing all the files individually in every Makefile.

    +

    For example, the directory $CLAW/classic/examples/advection_1d_example1 +contains the lines:

    +
    # ---------------------------------
    +# package sources for this program:
    +# ---------------------------------
    +
    +include $(CLAW)/classic/src/1d/Makefile.classic_1d
    +
    +# ---------------------------------------
    +# package sources specifically to exclude
    +# (i.e. if a custom replacement source
    +#  under a different name is provided)
    +# ---------------------------------------
    +
    +EXCLUDE_MODULES = \
    +
    +EXCLUDE_SOURCES = \
    +
    +# ----------------------------------------
    +# List of custom sources for this program:
    +# ----------------------------------------
    +
    +MODULES = \
    +
    +SOURCES = \
    +  qinit.f90 \
    +  setprob.f90 \
    +  $(CLAW)/riemann/src/rp1_advection.f90
    +
    +
    +

    This indicates that the file $CLAW/classic/src/1d/Makefile.classic_1d +is used to specify the default list of files to be used. These are +separated into MODULES and SOURCES since Fortran modules need to be +compiled before files that contain only subroutines or functions.

    +

    In the example shown above, we are +including three source code routines specific to this example: qinit.f90 +and setprob.f90 from this example directory, and the Riemann solver +rp1_advection.f90 from the riemann repository.

    +

    The file $CLAW/classic/src/1d/Makefile.classic_1d contains:

    +
    #get the directory of this makefile
    +LIB:=$(CLAW)/classic/src/1d
    +
    +#list of common sources for classic 1d codes
    +COMMON_SOURCES += \
    +  $(LIB)/qinit.f90 \
    +  $(LIB)/setprob.f90 \
    +  $(LIB)/setaux.f90 \
    +  $(LIB)/bc1.f \
    +  $(LIB)/b4step1.f90 \
    +  $(LIB)/driver.f90 \
    +  $(LIB)/claw1ez.f \
    +  $(LIB)/claw1.f \
    +  $(LIB)/copyq1.f \
    +  $(LIB)/inlinelimiter.f90 \
    +  $(LIB)/opendatafile.f \
    +  $(LIB)/out1.f \
    +  $(LIB)/src1.f90 \
    +  $(LIB)/step1.f90
    +
    +
    +

    For the classic 1d code there are no modules, only subroutines.

    +
    +

    Replacing files with the same name as library files

    +

    Note that the list of default library routines above contains both +qinit.f90 and setprob.f90. The default versions of these files contain +subroutines that have the correct calling sequence but return without doing +anything. Every application directory will generally contain a local +version of qinit.f90 that sets the initial conditions. Many applications +also have a custom version of setprob.f90 that sets parameters, reads +custom input files, etc.

    +

    Since the local Makefile contains qinit.f90 and setprob.f90 in its +list of SOURCES, the new make system (as of v5.4.0) will use these in +place of the library source files since they have identical names. Hence we +do not need to list these routines explicitly in the list EXCLUDE_SOURCES +(although it wouldn’t hurt to do so).

    +

    Note that if the local version were called qinit.f rather than +qinit.f90, the local version would also still be used in spite of the +different extension, since the base of the file name is the same. +(See Fortran 77 vs. Fortran 90 files for an important cautionary note on what +might go wrong if you have both a .f file and a .f90 file with +the same base name in the same directory.)

    +
    +
    +

    Using a modified library routine with a different name

    +

    Suppose we want to use a local version of bc1.f in order to +implement some new boundary condition not included in the default version. +If we call the local file bc1.f then we can simply add it to the list +SOURCES in the local Makefile and it will be used in place of the +default library version as described in the previous section.

    +

    However, suppose our new boundary condition routine is called +bc1_inflow.f instead of bc1.f. Then we would add this routine +to the list SOURCES in the local Makefile and in this case we +must also add bc1.f to EXCLUDE_SOURCES list. After these changes +the local Makefile would contain these lines:

    +
    EXCLUDE_MODULES = \
    +
    +EXCLUDE_SOURCES = \
    +  bc1.f \
    +
    +# ----------------------------------------
    +# List of custom sources for this program:
    +# ----------------------------------------
    +
    +MODULES = \
    +
    +SOURCES = \
    +  qinit.f90 \
    +  setprob.f90 \
    +  bc1_inflow.f \
    +  $(CLAW)/riemann/src/rp1_advection.f90
    +
    +
    +

    (It doesn’t matter what order the files are listed in each section.)

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/manning.html b/v5.10.x/manning.html new file mode 100644 index 0000000000..f11c747428 --- /dev/null +++ b/v5.10.x/manning.html @@ -0,0 +1,221 @@ + + + + + + + + + Manning friction term — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Manning friction term

    +

    When using GeoClaw to model inundation, it is important to include an +appropriate bottom friction term in the equations. This takes the form of a +source term added to the right hand side of +the momentum equations:

    +
    +

    \((hu)_t + \cdots = -\gamma (hu),\)

    +

    \((hv)_t + \cdots = -\gamma (hv),\)

    +
    +

    The form built into GeoClaw is the Manning formulation, in which +\(\gamma\) is a function of the depth and momentum:

    +
    +

    \(\gamma = \frac{gn^2\sqrt{(hu)^2 + (hv)^2}}{h^{7/3}}.\)

    +
    +

    with \(g\) the gravitational constant and \(n\) the “Manning +coefficient”. This is an empirical formula and the proper value of +\(n\) to use depends on the roughness of the terrain or seabed, as shown +for example in +this table. +Often for generic tsunami modeling, the constant value \(n=0.025\) is used. +An enhancement of GeoClaw planned for the future is to allow +spatially-varying Manning coefficient.

    +

    The friction term is only applied in regions where the depth is below a +threshold specified by friction_depth (see Specifying GeoClaw parameters in setrun.py).

    +

    New in 5.0: A list of Manning coefficients can be specifed to be used in +different regions based on the topography B, e.g. one value offshore and a +different value onshore. See General geo parameters.

    +
    +

    Warning

    +

    Changing the Manning coefficient can have a significant effect +on the extent of inundation and runup. If GeoClaw (or any other code) is +used for estimating real-world hazards, users should think carefully +about chosing an appropriate value, and may want to run sensitivity +studies. A smaller value of \(n\) (less friction) will generally +lead to greater inundation.

    +
    +
    +

    Warning

    +

    A bug was recently discovered in GeoClaw that was corrected +in Version 4.6.3: The exponent (7/3) was used in the Fortran code, which +evaluates as 2 in integer arithmetic rather than 2.3333. This has now +been corrected by writing it as (7.d0/3.d0). This can make a difference in +the extent of inundation and runup. Given the uncertainty in the proper +value of \(n\) to use and the inadequacy of using the same value +everywhere, the effect of this bug on the resulting accuracy was probably +small, but users may want to test this.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/mapc2p.html b/v5.10.x/mapc2p.html new file mode 100644 index 0000000000..3135789ed0 --- /dev/null +++ b/v5.10.x/mapc2p.html @@ -0,0 +1,172 @@ + + + + + + + + + The mapc2p function — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    The mapc2p function

    +

    To appear.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/marching_front.html b/v5.10.x/marching_front.html new file mode 100644 index 0000000000..88eb613bbd --- /dev/null +++ b/v5.10.x/marching_front.html @@ -0,0 +1,623 @@ + + + + + + + + + Marching Front algorithm — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Marching Front algorithm

    +

    New in Version 5.7.0.

    +

    Adapted from this notebook.

    +

    The module clawpack.geoclaw.marching_front defines a function +select_by_flooding that takes as input an array Ztopo containing +topography elevations on a rectangular grid and returns an array +pt_chosen of the same shape with values 1 (if chosen) or 0 (if not +chosen). Other inputs specify the criteria used to choose points, as +described below.

    +

    The basic idea is that chosen points satisfy certain elevation +requirements along with connectivity to the coast. This was originally +developed to identify points in a topography DEM where the topography +value \(Z\) is below MHW, but that should be initialized as dry land +because they are in regions protected by dikes or levies. In this +situation, the marching algorithm is used by initializing points well +offshore (e.g. with \(Z < -5\) meters) as wet and other points to +unset. Then the front between wet/unset points is advanced by +marking neighboring points as dry if \(Z\geq0\) or as wet if +\(Z<0\). This is repeated iteratively for each new front until there +are no more wet points with unset neighbors. At this point any +points still unset are entirely buffered by dry points and must lie +behind dikes, so these are also set to dry.

    +

    The use of such a force_dry_array in GeoClaw is explained in +Force Cells to be Dry Initially.

    +

    Other applications are also described below along with some examples.

    +
    +

    Contents

    + +
    +
    +

    Function arguments

    +

    The main function in the marching_front.py module is +select_by_flooding.

    +

    The function is defined by:

    +
    def select_by_flooding(Ztopo, mask=None, prev_pts_chosen=None,
    +                       Z1=-5., Z2=0., max_iters=None, verbose=False):
    +
    +
    +

    If Z1 <= Z2 then points where Ztopo < Z1 are first selected and +then a marching algorithm is used to select neighboring points that +satisfy Ztopo < Z2.

    +

    Think of chosen points as “wet” and unchosen points as “dry” and new +points are flooded if at least one neighbor is “wet” and the topography +is low enough. Starting from deep water (e.g. Z1 = -5) this allows +flooding up to MHW (Z2 = 0) without going past dikes that protect +dry land with lower elevation.

    +

    However, this can also be called with Z1 > Z2, in which case points +where Ztopo >= Z1 are first selected and then the marching algorithm +is used to select neighboring points that satisfy Ztopo > Z2. This +is useful to select offshore points where the water is shallow, (and +that are connected to the shore by a path of shallow points) e.g. to +identify points on the continental shelf to set up a flag region for +refinement.

    +

    If max_iters=None then iterate to convergence. Otherwise, at most +max_iters iterations are taken, so setting this to a small value +only selects points within this many grid points of where +Ztopo <= Z1, useful for buffering or selecting a few onshore points +along the coast regardless of elevation.

    +

    If prev_pts_chosen is None we are starting from scratch, otherwise +we possibly add additional chosen points to an existing array. Points +where prev_pts_chosen[i,j]==1 won’t change but those ==0 may be +changed to 1 based on the new criteria.

    +

    If mask==None or mask==False then the entire array is subject to +selection. If mask is an array with mask[i,j]==True at some +points, then either: - these masked points are marked as not selected +(pts_chosen[i,j]=0) if prev_pts_chosen==None, or - these masked +points are not touched if prev_pts_chosen is an array (so previous +0/1 values are preserved).

    +

    These arguments are described in more detail below with examples of how +they might be used.

    +
    +
    +

    output array

    +

    The function returns an array pt_chosen with the same shape as +Ztopo and has the value 1 at points chosen and 0 at points not +chosen.

    +
    +

    creating a masked array

    +

    This array can be used to define a masked array from Ztopo that +masks out the points not chosen via:

    +
    from numpy import ma # masked array module
    +Zmasked = ma.masked_array(Ztopo, mask=logical_not(pt_chosen))
    +
    +
    +

    This could be used to plot only the points chosen using the matplotlib +function pcolormesh, for example, or the function now defined in +geoclaw.visclaw.plottools.pcolorcells that better plots finite +volume grid cell data with proper alignment and boundary cells. See +pcolorcells.

    +
    +
    +

    topofile mask for initializing dry points

    +

    The array pt_chosen can be used to create a file that is read in by +GeoClaw to identify points where Ztopo is below MHW but where there +is dry land because of protection by dikes or levies. This is done by +defining a geoclaw.topotools.Topography object and setting its Z +attribute based on pt_chosen, and then writing this as a topofile +with topo_type==3. Then in setrun.py this file can be specified +as a mask that is read in and used when initializing grid cells. There +are some subtleties in how this is done, described in more detail in +Force Cells to be Dry Initially.

    +
    +
    +

    fgmax points

    +

    The chosen points might be used as fgmax points, as described below.

    +
    +
    +

    flag regions

    +

    The output array could also be used to define an AMR flag region as a +ruled rectangle, using the function +region_tools.ruledrectangle_covering_selected_points described in +Ruled Rectangles. This would give a +minimal ruled rectangle covering all the chosen points. An example is +given below.

    +
    +
    +
    +

    The mask argument

    +

    mask can be False or None, or else must be an array of the +same shape as Ztopo.

    +

    The Ztopo array input must be a rectangular array, but sometimes we +want to select points covering only a subset of these points, e.g. when +defining fgmax points along some stretch of coastline. In this case +mask can be used to mask out values we do not want to select. Set +mask[i,j] = True at points that should not be chosen.

    +

    To mask out points that lie outside some ruled rectangle that has been +defined as rr, you can use the rr.mask_outside function to +define the mask. See Ruled Rectangles.

    +
    +
    +

    The previous_pts_chosen argument

    +

    This argument is useful if you want to apply a sequence of different +criteria to choose points. For example, suppose you first want to choose +all grid points within 5 points of the coast (as can be done using +max_iters) and then supplement this will all grid points below a +specified elevation that are farther inland from the coast.

    +

    Examples are given below, also of how the mask array works in +conjunction with previous_pts_chosen.

    +
    +
    +

    Examples

    +

    First import some needed modules and set up color maps.

    +
    import os,sys
    +from numpy import ma # masked arrays
    +from clawpack.visclaw import colormaps
    +from clawpack.geoclaw import topotools, marching_front
    +from clawpack.amrclaw import region_tools
    +from clawpack.visclaw.plottools import pcolorcells
    +
    +zmin = -60.
    +zmax = 40.
    +
    +cmap_land = colormaps.make_colormap({ 0.0:[0.1,0.4,0.0],
    +                                     0.25:[0.0,1.0,0.0],
    +                                      0.5:[0.8,1.0,0.5],
    +                                      1.0:[0.8,0.5,0.2]})
    +
    +cmap_sea = colormaps.make_colormap({ 0.0:[0,0,1], 1.:[.8,.8,1]})
    +
    +cmap_topo, norm_topo = colormaps.add_colormaps((cmap_land, cmap_sea),
    +                                     data_limits=(zmin,zmax),
    +                                     data_break=0.)
    +
    +cmap_sea_dry = colormaps.make_colormap({ 0.0:[1.0,0.7,0.7], 1.:[1.0,0.7,0.7]})
    +cmap_dry, norm_dry = colormaps.add_colormaps((cmap_land, cmap_sea_dry),
    +                                     data_limits=(zmin,zmax),
    +                                     data_break=0.)
    +
    +
    +
    +
    +

    Sample topography from a 1/3 arcsecond DEM

    +

    We consider a small region on the SW coast of Whidbey Island north of +Maxwelton Beach as an example:

    +
    region1_png = imread('region1.png')
    +extent = [-122.46, -122.38, 47.93, 47.96]
    +
    +figure(figsize=(12,6))
    +imshow(region1_png, extent=extent)
    +gca().set_aspect(1./cos(48*pi/180.))
    +
    +
    +_images/output_13_01.png +

    We read this small portion of the 1/3 arcsecond Puget Sound DEM, +available from the NCEI thredds server:

    +
    path = 'https://www.ngdc.noaa.gov/thredds/dodsC/regional/puget_sound_13_mhw_2014.nc'
    +topo = topotools.read_netcdf(path, extent=extent)
    +
    +
    +
    figure(figsize=(12,6))
    +pcolorcells(topo.X, topo.Y, topo.Z, cmap=cmap, norm=norm)
    +colorbar(extend='both')
    +gca().set_aspect(1./cos(48*pi/180.))
    +
    +
    +_images/output_16_0.png +

    This plot shows that there is a region with elevation below MHW (0 in +the DEM) where the Google Earth image shows wetland that should not be +initialized as a lake. This problem is discussed in Force Cells to be Dry Initially.

    +

    Here we show how to choose only the DEM points that are close to the +shore and/or below a given elevation.

    +
    +

    Finding all points below a given elevation

    +

    First we choose all points with elevation below 15 m and that are +connected to the coast over this topography extent. Note the latter +requirement will eliminate the low lying area at the bottom of the +figure above near longitude -122.4 (which is connected to the coast +through Cultus Bay, but not by points in this extent).

    +
    pts_chosen = marching_front.select_by_flooding(topo.Z, Z1=0, Z2=15., max_iters=None)
    +
    +
    +
    Selecting points with Z1 = 0, Z2 = 15, max_iters=279936
    +Done after 183 iterations with 89871 points chosen
    +
    +
    +
    Zmasked = ma.masked_array(topo.Z, logical_not(pts_chosen))
    +
    +figure(figsize=(12,6))
    +pcolorcells(topo.X, topo.Y, Zmasked, cmap=cmap, norm=norm)
    +colorbar(extend='both')
    +gca().set_aspect(1./cos(48*pi/180.))
    +
    +
    +_images/output_22_0.png +
    +
    +

    Create a buffer zone along shore

    +

    To select more points along the shore where the topography is steep, we +could have first used max_iters.

    +

    To illustrate this, we start again and fist use max_iters = 20 so +that at least 20 grid points are selected near the coast, also setting +Z2 = 1e6 (a huge value) so that the arbitrarily high regions will be +included if they are within 20 points of the coast:

    +
    pts_chosen = marching_front.select_by_flooding(topo.Z, Z1=0, Z2=1e6, max_iters=20)
    +
    +
    +
    Selecting points with Z1 = 0, Z2 = 1e+06, max_iters=20
    +Done after 20 iterations with 84800 points chosen
    +
    +
    +

    Plot what we have so far:

    +
    Zmasked = ma.masked_array(topo.Z, logical_not(pts_chosen))
    +
    +figure(figsize=(12,6))
    +pcolorcells(topo.X, topo.Y, Zmasked, cmap=cmap, norm=norm)
    +colorbar(extend='both')
    +gca().set_aspect(1./cos(48*pi/180.))
    +
    +
    +_images/output_27_0.png +

    Then we augment the points already chosen with any points below 15 m and +connected to the coast:

    +
    pts_chosen = marching_front.select_by_flooding(topo.Z, Z1=0, Z2=15.,
    +                                               prev_pts_chosen=pts_chosen,
    +                                               max_iters=None)
    +
    +
    +
    Selecting points with Z1 = 0, Z2 = 15, max_iters=279936
    +Done after 163 iterations with 94297 points chosen
    +
    +
    +
    Zmasked = ma.masked_array(topo.Z, logical_not(pts_chosen))
    +
    +figure(figsize=(12,6))
    +pcolorcells(topo.X, topo.Y, Zmasked, cmap=cmap, norm=norm)
    +colorbar(extend='both')
    +gca().set_aspect(1./cos(48*pi/180.))
    +
    +
    +_images/output_30_0.png +
    +
    +

    Choose points only near shore

    +

    We can set Z1 = 0 and Z2 = -15 to select points that have +elevation greater than -15 m and are connected to the coast:

    +
    pts_chosen_shallow = marching_front.select_by_flooding(topo.Z, Z1=0, Z2=-15., max_iters=None)
    +
    +
    +
    Selecting points with Z1 = 0, Z2 = -15, max_iters=279936
    +Done after 177 iterations with 249577 points chosen
    +
    +
    +
    Zshallow = ma.masked_array(topo.Z, logical_not(pts_chosen_shallow))
    +
    +figure(figsize=(12,6))
    +pcolorcells(topo.X, topo.Y, Zshallow, cmap=cmap, norm=norm)
    +colorbar(extend='both')
    +gca().set_aspect(1./cos(48*pi/180.))
    +
    +
    +_images/output_34_0.png +

    Note that this chooses all onshore points in addition to offshore +points with elevation greater than -15 m.

    +

    We can take the intersection of this set of points with the onshore +points previously chosen to get only the points that lie near the coast:

    +
    pts_chosen_nearshore = logical_and(pts_chosen, pts_chosen_shallow)
    +Znearshore = ma.masked_array(topo.Z, logical_not(pts_chosen_nearshore))
    +
    +figure(figsize=(12,6))
    +pcolorcells(topo.X, topo.Y, Znearshore, cmap=cmap, norm=norm)
    +colorbar(extend='both')
    +gca().set_aspect(1./cos(48*pi/180.))
    +
    +
    +_images/output_37_0.png +
    +
    +
    +

    Write out the masked array indicating fgmax points

    +

    One we have selected the desired fgmax points, these can be output in +the style of a topo_type=3 topography file, with a header followed +point values at all points on a uniform grid. The values are simply the +integer 1 for points that should be used as fgmax points and 0 for other +points. Note that format %1i is used for compactness.

    +
    fname_fgmax_mask = 'fgmax_pts_topostyle.data'
    +topo_fgmax_mask = topotools.Topography()
    +topo_fgmax_mask._x = topo.x
    +topo_fgmax_mask._y = topo.y
    +topo_fgmax_mask._Z = where(pts_chosen_nearshore, 1, 0)  # change boolean to 1/0
    +topo_fgmax_mask.generate_2d_coordinates()
    +
    +topo_fgmax_mask.write(fname_fgmax_mask, topo_type=3, Z_format='%1i')
    +print('Created %s' % fname_fgmax_mask)
    +
    +
    +
    Created fgmax_pts_topostyle.data
    +
    +
    +

    This file fgmax_pts_topostyle.data can then be read into GeoClaw, +using the new capability of specifying fgmax grids in this manner, using +point_style == 4 as described in +Fixed grid monitoring (fgmax).

    +
    +
    +

    Creating an AMR flag region

    +

    Once a set of points has been selected, it can be used to define a ruled +rectangle that might be used as an adaptive mesh refinement flag region, +for example. See Ruled Rectangles and Specifying flagregions for adaptive refinement.

    +

    You might want to try both ixy = ‘x’ and ixy = ‘y’ in creating +the ruled rectangle to see which one covers fewer non-selected points. +In this case ixy = ‘x’ is better:

    +
    figure(figsize=(12,5))
    +subplot(121)
    +
    +rr = region_tools.ruledrectangle_covering_selected_points(topo.X, topo.Y, pts_chosen_nearshore,
    +                                                          ixy='x', method=0,
    +                                                          padding=0, verbose=True)
    +xv,yv = rr.vertices()
    +pcolorcells(topo.X, topo.Y, Znearshore, cmap=cmap, norm=norm)
    +axis([-122.47, -122.40, 47.925, 47.965])
    +gca().set_aspect(1./cos(48*pi/180.))
    +plot(xv, yv, 'r')
    +title("With ixy = 'x'")
    +
    +subplot(122)
    +rr = region_tools.ruledrectangle_covering_selected_points(topo.X, topo.Y, pts_chosen_nearshore,
    +                                                          ixy='y', method=0,
    +                                                          padding=0, verbose=True)
    +xv,yv = rr.vertices()
    +pcolorcells(topo.X, topo.Y, Znearshore, cmap=cmap, norm=norm)
    +axis([-122.47, -122.40, 47.925, 47.965])
    +gca().set_aspect(1./cos(48*pi/180.))
    +plot(xv, yv, 'r')
    +title("With ixy = 'y'")
    +
    +
    +
    Extending rectangles to cover grid cells
    +RuledRectangle covers 69788 grid points
    +Extending rectangles to cover grid cells
    +RuledRectangle covers 76005 grid points
    +
    +
    +_images/output_42_2.png +
    +
    +

    Determining dry areas below MHW

    +

    Note the blue region in the above plot that is inland from the coast and +behind a green barrier. Examining Google Earth shows that this is +wetland area that probably should not be initialized as a lake. We can +identify this by using the marching front algorithm to start at +Z1 = -5 m and fill in up to Z2 = 0 (MHW).

    +
    wet_points = marching_front.select_by_flooding(topo.Z, Z1=-5., Z2=0., max_iters=None)
    +
    +
    +
    Selecting points with Z1 = -5, Z2 = 0, max_iters=279936
    +Done after 112 iterations with 59775 points chosen
    +
    +
    +
    Zdry = ma.masked_array(topo.Z, wet_points)
    +
    +figure(figsize=(12,6))
    +pcolorcells(topo.X, topo.Y, Zdry, cmap=cmap, norm=norm)
    +colorbar(extend='both')
    +gca().set_aspect(1./cos(48*pi/180.))
    +title('Dry land');
    +
    +
    +_images/output_46_1.png +

    Now the blue region above is properly identified as being dry land.

    +

    See Force Cells to be Dry Initially for more +discussion of this example, showing how to create an array for +GeoClaw in order to indicate that this region should be initialized as dry in +spite of being below MHW.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/matlab_plotting.html b/v5.10.x/matlab_plotting.html new file mode 100644 index 0000000000..ce580e95e4 --- /dev/null +++ b/v5.10.x/matlab_plotting.html @@ -0,0 +1,485 @@ + + + + + + + + + Plotting using Matlab — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Plotting using Matlab

    +

    Before version 4.3, Clawpack used Matlab (Mathworks, Inc.) for plotting and visualizing +results of simulations. For this purpose, an extensive set of plotting +tools were developed. These are still available in +$CLAW/visclaw/src/matlab. The user interface for these routines is +essentially unchanged from the previous versions, although several new +features have been added.

    +

    These graphics tools extend standard +Matlab plotting routines by allowing for easy plotting of both 2d and +3d adaptively refined mesh data produced from AMRClaw and solutions on +2d manifolds, produced from either single grid Clawpack, or AMRClaw. +In each of these cases, the user can easily +switch on or off the plotting of grid lines (on a per-level basis), +contour lines, isosurfaces, and AMR patch borders, cubes and other +graphical items. In 3d, the user can create a custom set of slices, +and then loop through the slices in the x,y or z directions. All +visualization assumes finite volume data, and individual plot +“patches” use cell-averaged values to color mesh cells directly. No +graphical interpolation is done when mapping to the colormap.

    +
    +

    The Matlab search path

    +

    To use the Matlab plotting tools with Clawpack, the user will need to +first be sure that the necessary Matlab routines are on the Matlab +search path. This can be done by explicitly setting the MATLABPATH +environment variable. In bash, this is done via

    +
    +

    $ export MATLABPATH ${CLAW}/visclaw/src/matlab

    +
    +

    Alternatively, one can permanently add this directory to the Matlab search path +using the Matlab “pathtool” command:

    +
    >> pathtool
    +
    +
    +
    +
    +

    Creating output files

    +

    To visualize Clawpack output using the Matlab plotting routines, first +produce output files from an example using:

    +
    $ make .output
    +
    +
    +

    This will build the appropriate Clawpack executable, create necessary input files +for the executable, and +finally run the executable to create output files. These output files +are stored by default in the directory ‘_output’.

    +
    +
    +

    The plotclaw command

    +

    Once output files, e.g. ‘fort.q0000’, ‘fort.q0001’, and so on, and +corresponding fort.t0000’ or ‘fort.t0001’ files have been created, the +user can plot them in Matlab by entering one of +the following commands (depending on whether the output is one, +two or three dimensional) at the Matlab prompt:

    +
    >> plotclaw1
    +
    +
    +

    or:

    +
    >> plotclaw2
    +
    +
    +

    or:

    +
    >> plotclaw3
    +
    +
    +

    Initially, the user is prompted to run a file `setplot`_. For +example:

    +
    >> plotclaw2
    +
    +plotclaw2  plots 2d results from clawpack or amrclaw
    +Execute setplot2 (default = yes)?
    +
    +
    +

    The setplot file sets various parameters in the base workspace needed +to create the plot (see below for more details on this file). +Entering [enter] at this prompt will run the file.

    +

    Successively hitting [enter] steps through and plots data from each of +the fort files in order. In one and two dimensions, this plotting +prompt is:

    +
    Frame 2 at time t = 0.2
    +Hit <return> for next plot, or type k, r, rr, j, i, q, or ?
    +
    +
    +

    In three dimensions, one can optionally step through user defined slices of data by entering +‘x’, ‘y’ or ‘z’ at the command prompt:

    +
    Frame 1 at time t = 0.0625
    +Hit <return> for next plot, or type k, r, rr, j, i, x, y, z, q, or ?
    +
    +
    +

    A description of the plot prompt options is given by entering ‘?’:

    +
    Frame 2 at time t = 0.2
    +Hit <return> for next plot, or type k, r, rr, j, i, q, or ?  ?
    +  k  -- keyboard input.  Type any commands and then "return"
    +  r  -- redraw current frame, without re-reading data
    +  rr -- re-read current file,and redraw frame
    +  j  -- jump to a particular frame
    +  i  -- info about parameters and solution
    +  x  -- loop over slices in x direction (3d only)
    +  y  -- loop over slices in y direction (3d only)
    +  z  -- loop over slices in z direction (3d only)
    +  q  -- quit
    +
    +
    +

    After the graphics routines have created the plot, but before the user +is returned to the plot prompt, a file afterframe is called. This +file contains user commands to set various plot properties. See below +for more details on what the user might wish to include in this file.

    +
    +
    +

    The setplot file

    +

    The properties of the Matlab plot are controlled through two main +user-defined files located, typically, in the current working +directory. The first of these files, the ‘setplot’ file (e.g. setplot1.m, setplot2.m or +setplot3.m) control basic plot properties that must be known before the plot is created. +Such properties include

    +
    +
      +
    • component of q to plot, (.e.g. rho=1, rhou=2, rhov=3 and so on).

    • +
    • a user defined quantity (e.g. pressure or velocity) to plot,

    • +
    • the maximum number of frames to plot

    • +
    • the location of the output files

    • +
    • the line type or symbol type for 1d plots or scatter plots. Different symbols or line types can be specified for each AMR level.

    • +
    • the plot type, e.g. a pseudo-color plot, a Schlieren type plot or a scatter plot.

    • +
    • grid mappings for mapped grids or manifold calculations,

    • +
    • user defined slices through the data (3d data)

    • +
    • isosurface properties (3d plots)

    • +
    +
    +

    A typical setplot file might contain the following parameter settings:

    +
    % -----------------------------------------------
    +% file: setplot2.m (not all parameters are shown)
    +% -----------------------------------------------
    +OutputDir = '_output';
    +PlotType = 1;                % Create a pseudo-color plot
    +mq = 1;                      % which component of q to plot
    +UserVariable = 0;            % set to 1 to specify a user-defined variable
    +UserVariableFile = ' ';      % name of m-file mapping data to q
    +MappedGrid = 0;              % set to 1 if mapc2p.m exists for nonuniform grid
    +MaxFrames = 1000;            % max number of frames to loop over
    +MaxLevels = 6;               % max number of AMR levels
    +...
    +
    +
    +

    One of the main uses of the ‘keyboard’ option described in the plotclaw section is to +allow the user to temporarily change the value of plotting parameters set in the setplot file.

    +

    To ensure that the required set of variables is defined, the user is encouraged to +create and modify a local copy of setplot1.m, setplot2.m or setplot3.m found in +‘${CLAW}visclaw/src/matlab’.

    +

    To get more help on what types of settings can be specified in the setplot file, +enter the following command:

    +
    >> help setplot
    +
    +
    +

    Each of the examples in Clawpack include a ‘setplot’ file which you +can browse to get an idea as to what can be put in the file.

    +
    +
    +

    The afterframe file

    +

    The ‘afterframe.m’ script is the second file which control aspects of the +plot and is called after the plot has been created. The following are +commonly set in the afterframe file:

    +
    +
      +
    • set axis limits and scaling

    • +
    • add a 1d reference solution (1d plots and scatter plots)

    • +
    • print out the current frame to a png, jpg or other graphics format file.

    • +
    • add, show or hide contour lines on slices (2d/3d)

    • +
    • show or hide AMR patch and cube borders (2d/3d)

    • +
    • modify the colormap (2d/3d)

    • +
    • set the color axis (2d/3d)

    • +
    • show or hide grid lines on different AMR levels (2d/3d)

    • +
    • add lighting to isosurfaces (3d)

    • +
    • hide or show isosurfaces (3d)

    • +
    • show or hide slices (3d)

    • +
    +
    +

    A typical ‘afterframe’ file might contain the following commands:

    +
    % -----------------------------------------------
    +% file: afterframe.m
    +% -----------------------------------------------
    +axis([-1 1 -1 1]);      % Set the axis limits
    +daspect([1 1 1]);       % Set the aspect ratio
    +
    +colormap(jet);
    +
    +showpatchborders;       % Show outlines of AMR patch borders
    +showgridlines(1:2);     % Show gridlines on level 1 and 2 grids
    +
    +cv = linspace(-1,1,21); % Values for contour levels
    +cv(cv == 0) = [];
    +drawcontourlines(cv);   % add contour lines to a plot
    +
    +caxis([-1 1]);          % Set the color axis
    +
    +shg;                    % Bring figure window to the front
    +
    +fstr = framename(Frame,'frame0000','png','_plots');
    +print('-dpng',fstr);       % Create .png file of figure.
    +
    +clear afterframe;
    +
    +
    +

    The final ‘clear’ statement is added so that any modifications that +the user makes to the afterframe file while stepping through plot +frames will take effect immediately.

    +

    When plotting results from AMR runs, the user can also create an +‘aftergrid.m’ file. This file will be called after each individual +grid of data is plotted.

    +

    The user is encouraged to browse the ‘afterframe.m’ file available +with each Clawpack example to get a better idea as to what one might +include in this file.

    +
    +
    +

    Getting help

    +

    To get help on any of the topics available in the Matlab graphics tools, you can always issue +the command:

    +
    >> help clawgraphics
    +
    +
    +

    at the Matlab prompt. This will bring up a list of topics which you can get further help on.

    +
    +
    +

    Trouble shooting

    +

    Below are a few potential problems one can run into with the Matlab plotting routines.

    +
    +

    Output files not found

    +

    The following error message indicates that the output files have not been found:

    +
    Hit <return> for next plot, or type k, r, rr, j, i, x, y, z, q, or ?
    +
    +Frame 2 (./fort.t0002) does not exist ***
    +
    +
    +Frame 2(ascii) does not exist ***
    +
    +
    +

    Be sure to check that that the variable ‘OutputDir’, set in the setplot file, points to +the proper location of the output files that you wish to plot. +Second, double check that you actually have fort.[t/q]XXXX files in that directory.

    +
    +
    +

    MaxFrames not set

    +

    The error message below most likely means that a ‘setplot’ script +containing a definition for MaxFrames was not run:

    +
    >> plotclaw2
    +
    +plotclaw2  plots 2d results from clawpack or amrclaw
    +Execute setplot2 (default = yes)? no
    +
    +MaxFrames parameter not set... you may need to execute setplot2
    +
    +
    +

    To correct this problem, the user should make sure that they have +local copy of a setplot file in their working directory, that it +defines the required set of variables and that it is run at least once before +the plotclaw command.

    +
    +
    +

    Switching examples

    +

    The graphics are controlled to a large extent using variables that are +set in the Matlab base workspace. This can lead to unpredictable results +when switching between Clawpack examples.

    +

    To illustrate what can go wrong, suppose one sets:

    +
    MappedGrid = 1;         % assumes that mapc2p file exists
    +
    +
    +

    in the setplot file for one example, and then switches to a second +example which is not a simulation on a mapped grid. If the variable +‘MappedGrid’ is not explicitly set to zero in the setplot file for the +second example, the Matlab routines will look for a grid mapping file +‘mapc2p.m’ which may not be found for the second example.

    +

    To avoid such potential clashes of variables, the +user is strongly encouraged to enter the command:

    +
    >> clear all;
    +
    +
    +

    before switching examples. This will clear the base workspace of +all plotting parameters and avoid potential conflicts in base variable settings.

    +

    The user is also encouraged to issue a command:

    +
    >> close all
    +
    +
    +

    in situations where the one example explicitly sets plotting features such as a colormap, +or axes scaling that are not overridden by subsequent plot commands.

    +
    +
    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/nearshore_interp.html b/v5.10.x/nearshore_interp.html new file mode 100644 index 0000000000..b5e70df034 --- /dev/null +++ b/v5.10.x/nearshore_interp.html @@ -0,0 +1,225 @@ + + + + + + + + + Nearshore interpolation — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Nearshore interpolation

    +

    Several Fortran routines in GeoClaw interpolate from the computational grids +to other specified points where output is desired +(typically using the finest AMR resolution available nearby at each desired +output time). This includes:

    +
      +
    • Gauge output (time series at specified locations), see Gauges,

    • +
    • fgmax grids (maximum of various quantities over the entire simulation at +specified locations), see Fixed grid monitoring (fgmax),

    • +
    • fgout grids (output of various quantities on a fixed spatial grid at a +sequence of times), see Fixed grid output (fgout).

    • +
    +

    If the specified location is exactly at the center of a computational cell +at the finest AMR level present, then the value output is simply that cell +value (which in a finite volume method is really a cell average of the +quantity over the cell, but approximates the cell center value to +\(O(\Delta x^2)\) if the quantity is smoothly varying.

    +

    In general, however, the specified points may not lie at cell centers. In +all the cases listed above, the default behavior is to use “zero-order +extrapolation” to determine the value at the point, meaning that the value +throughout each computational cell is approximated by a constant function +(zero degree polynomial) with value equal to the cell average. Hence the +value that is output at any specified point is simply the cell average of +the (finest level) grid cell that the point lies within.

    +

    One might think that a better approximation to the value at a point could be +obtained by using piecewise bilinear approximation (in two +dimensions): Determine what set of four grid centers the point lies within +and construct the bilinear function \(a_0 + a_1x + a_2y + a_3xy\) +that interpolates at these four points, and then evaluate the bilinear +interpolant at the point of interest. If the function being approximated +were smooth then this would be expected to provide an \(O(\Delta x^2)\) +approximation, whereas zero-order extrapolation is only \(O(\Delta x)\) +accurate.

    +

    For GeoClaw simulations, however, we have found that it is best to use +zero-order extrapolation because piecewise bilinear interpolation can cause +problems and misleading results near the coastline, which is often the +region of greatest interest.

    +

    The problem is that interpolating the fluid depth h and the topography B +separately and then computing the surface elevation eta by adding these +may give unrealistic high values. For example if one cell has topo B = -2 +and h = 6 (so eta = B+h = 4) and the neighboring cell has B = 50 +and h = 0, so that eta = B+h = 50. In the latter case, the elevation +eta is simply the elevation of the land and this point is not wet, as +indicated by the fact that h=0. But now if we use linear interpolation +(in 1D for this simple example) to the midpoint between these points, +interpolating the topography gives +B = 24 and interpolating the depth gives h = 3. +Hence we compute eta = B+h = 27 as the surface elevation. +Since the point is apparently wet (h > 0), one might conclude that the sea +surface at this point is 27 meters above the initial sea level, whereas in +fact the sea level is never more than 6 meters above sea level.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/netcdf.html b/v5.10.x/netcdf.html new file mode 100644 index 0000000000..25b8cdab6b --- /dev/null +++ b/v5.10.x/netcdf.html @@ -0,0 +1,167 @@ + + + + + + + + + Using NetCDF output — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    See also

    +

    NetCDF format.

    +
    +
    +

    Using NetCDF output

    +

    NetCDF output is not currently supported in Clawpack. This is not a suitable +format for AMR style data.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/newapp.html b/v5.10.x/newapp.html new file mode 100644 index 0000000000..2591a31573 --- /dev/null +++ b/v5.10.x/newapp.html @@ -0,0 +1,195 @@ + + + + + + + + + Creating a new application directory — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Creating a new application directory

    +
    +

    Copying an existing example

    +

    The simplest approach to implementing something new is to start with a +Clawpack example and modify the code appropriately.

    +

    Rather than modifying one of the examples in place, it is best to copy it to +a new directory. Clawpack should work fine +from any directory as long as the environment variable is set properly. +(See Set environment variables.)

    +

    In unix/linux you can copy a directory recursively (with all subdirectories +intact) using the cp -r command, e.g.

    +
    $ cp -r $CLAW/classic/examples/acoustics_1d_example1  path/to/newdir
    +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/objects.inv b/v5.10.x/objects.inv new file mode 100644 index 0000000000..3c3825d5d1 Binary files /dev/null and b/v5.10.x/objects.inv differ diff --git a/v5.10.x/okada.html b/v5.10.x/okada.html new file mode 100644 index 0000000000..a95cb96a24 --- /dev/null +++ b/v5.10.x/okada.html @@ -0,0 +1,388 @@ + + + + + + + + + Earthquake sources: Fault slip and the Okada model — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Earthquake sources: Fault slip and the Okada model

    +

    To initiate a tsunami from an earthquake, it is necessary to generate a model of +how the seafloor moves, which is generally specified in a dtopo file as +described in Topography displacement files. This is often done by starting with a +description of an earthquake fault, broken up into a collection of +subfaults, with various parameters defined on each subfault. A seismic +modeling code would take these parameters and compute the elastic waves +generated in the earth as a result. However, for tsunami modeling all we need +to know is the motion of the seafloor, which is one boundary of the seismic +domain. Moreover the high-frequency ground motions during the earthquake +have little impact on the resulting tsunami. For these reasons it is often +sufficient to use the “Okada model” described below, which gives the final +deformation of the sea floor due to specified slip on each subfault.

    +

    The Jupyter notebook $CLAW/apps/notebooks/geoclaw/Okada.ipynb +illustrates how the Okada model works and how to generate the seafloor +deformation needed in GeoClaw using this model.

    +

    The Python module $CLAW/geoclaw/src/python/geoclaw/dtopotools.py +provides tools to convert a file specifying a collection of subfaults +into a dtopofile by applying the Okada model to each subfault and adding +the results together (valid by linear superposition of the solutions to the +linear elastic halfspace problems). +See dtopotools module for moving topography for more documentation and illustrations.

    +
    +

    Fault slip on rectangular subfaults

    +

    For historic earthquakes, it is generally possible to find many different +models for the distribution of slip on one or more fault planes, +see for example the pointers at Earthquake source models.

    +

    An earthquake subfault model is typically given in the form of a set of +rectangular patches on the fault plane. +Each patch has a set of parameters defining the relative slip of rock on one +side of the planar patch to slip on the other side. The minimum set of +parameters required is:

    +
      +
    • length and width of the fault plane (typically in m or km),

    • +
    • latitude and longitude of some point on the fault plane, typically +either the centroid or the center of the top (shallowest edge),

    • +
    • depth of the specified point below the sea floor,

    • +
    • strike, the orientation of the top edge, measured in degrees +clockwise from North. Between 0 and 360. The fault plane dips downward +to the right when moving along the top edge in the strike direction.

    • +
    • dip, angle at which the plane dips downward from the top edge, a +positive angle between 0 and 90 degrees.

    • +
    • rake, the angle in the fault plane in which the slip occurs, +measured in degrees counterclockwise from the strike direction. +Between -180 and 180.

    • +
    • slip > 0, the distance (typically in cm or m) the hanging block moves +relative to the foot block, in the direction specified by the rake. +The “hanging block” is the one above the dipping fault plane (or to the +right if you move in the strike direction).

    • +
    +

    Note that for a strike-slip earthquake, rake is near 0 or 180. +For a subduction earthquake, the rake is usually closer to 90 degrees.

    +

    For kinematic (time-dependent) rupture, it is also necessary to specify the +rupture_time and rise_time of each subfault, as discussed below.

    +

    A fault can be specified in GeoClaw as an instance of the +dtopotools.Fault class, instatiated e.g. by:

    +
    from clawpack.geoclaw import dtopotools
    +fault = dtopotools.Fault()
    +
    +
    +

    Then set fault.subfaults to a list of subfaults as instances of the class +dtopotools.SubFault. Each subfault has attributes corresponding to the +parameters listed above. In addition, coordinate_specification should be +set for each subfault to one of:

    +
      +
    • “bottom center”: (longitude,latitude) and depth at bottom center

    • +
    • “top center”: (longitude,latitude) and depth at top center

    • +
    • “centroid”: (longitude,latitude) and depth at centroid of plane

    • +
    • “noaa sift”: (longitude,latitude) at bottom center, depth at top, +This mixed convention is used by the NOAA SIFT +database and “unit sources”, see: +http://nctr.pmel.noaa.gov/propagation-database.html.

    • +
    • “top upstrike corner”: (longitude,latitude) and depth at +corner of fault that is both updip and upstrike.

    • +
    +

    For example, a simple single-subfault model of the 2010 Chile event can be +specified by:

    +
    subfault = dtopotools.SubFault()
    +subfault.length = 450.e3             # meters
    +subfault.width = 100.e3              # meters
    +subfault.depth = 35.e3               # meters
    +subfault.strike = 16.                # degrees
    +subfault.slip = 15.                  # degrees
    +subfault.rake = 104.                 # degrees
    +subfault.dip = 14.                   # degrees
    +subfault.longitude = -72.668         # degrees
    +subfault.latitude = -35.826          # degrees
    +subfault.coordinate_specification = "top center"
    +
    +fault = dtopotools.Fault()
    +fault.subfaults = [subfault]
    +
    +
    +

    Starting in Version 5.5.0, it is also possible to specify a set of +triangular subfault patches rather than rectangles. Doing so requires +a different set of parameters, as described below in +Fault slip on triangular subfaults.

    +

    Once the subfaults have been specified, the function +fault.create_dtopography can be used to create a +dtopotools.DTopography object, and then written out as a dtopofile for use +in GeoClaw, e.g.:

    +
    x,y = fault.create_dtopo_xy(dx=1/60., buffer_size=2.0)
    +fault.create_dtopography(x,y,times=[1.])
    +dtopo = fault.dtopo
    +fault.rupture_type = 'static'
    +dtopo.write('chile_dtopo.tt3', dtopo_type=3)
    +
    +
    +

    This will create a file chile_dtopo.tt3 that can be used as a +dtopofile in GeoClaw. It will cover a region buffer_size = 2.0 +degrees larger on each side than the surface projection of the +rectangular fault, with a resolution of one arcminute (dx = 1/60. degree).

    +

    In addition to dtopotools.Fault, the dtopotools has several other +derived classes that simplify setting up a fault from a specified set of +subfaults:

    +
      +
    • CSVFault: reads in subfaults from a csv file with header,

    • +
    • SiftFault: sets up a fault based on the NOAA SIFT unit sources, see +http://nctr.pmel.noaa.gov/propagation-database.html,

    • +
    • UCSBFault: reads in subfaults in UCSB format,

    • +
    • SegmentedPlaneFault: Take a single fault plane and subdivides it into +recangles, to allow specifying different subfault parameters on each.

    • +
    +

    See dtopotools module for moving topography for more details, and the Jupyter notebook +$CLAW/apps/notebooks/geoclaw/dtopotools_examples.ipynb for more examples.

    +
    +
    +

    Okada model

    +

    The slip on the fault plane(s) must be translated into seafloor deformation. +This is often done using the “Okada model”, which is derived from +a Green’s function solution to the elastic half space problem, following +[Okada85]. Uniform +displacement of the solid over a finite rectangular patch specified +using the parameters described above, when inserted in a homogeneous +elastic half space a distance depth below the free surface, leads +to a steady state solution in which the free surface is deformed. This +deformation is used as the seafloor deformation. Of course this is only an +approximation since the actual seafloor in rarely flat, and the actual earth +is not a homogeneous isotropic elastic material as assumed in this model. +However, it is often assumed to be a reasonable approximation for tsunami +modeling, particularly since the fault slip parameters are generally not +known very well even for historical earthquakes and so a more accurate +modeling of the resulting seafloor deformation may not be justified.

    +

    In addition to the parameters above, the Okada model also requires an elastic +parameter, the Poisson ratio, which is usually taken to be 0.25.

    +
    +
    +

    Kinematic rupture

    +

    It is also possible to set a rupture_time and a rise_time for each +subfault in order to model a time-dependent rupture process. This is called +a “kinematic rupture” since the these values are specified.

    +

    To specify a kinematic rupture, create a dtopotools.Fault object fault +with fault.rupture_type = ‘kinematic’. +(For backward compatibility, you can also specify this as ‘dynamic’. +However, the term “dynamic rupture” often refers to modeling the +rupture process itself.)

    +

    A kinematic rupture is not modeled by via modeling the seismic +waves that would be generated by the specified subfault motions. +There are seismic codes that do this, based on the same set of fault +parameters, but this is not supported directly in GeoClaw. If +desired, output from such a code could be converted by the user +into a dtopo file for use in GeoClaw.

    +

    Once a dtopotools.Fault object has been created with the desired +subfaults, a dtopotools.DTopography object can be computed using +the dtopotools.Fault.create_dtopography function in GeoClaw (and +written out as a dtopo file using its write function.) The moving +dtopo generated in this manner is the sum of the Okada solutions +generated by each subfault, sampled at a set of specified times +t. For subfaults with subfault.rupture_time > t, no displacement +is included, while if subfault.rupture_time + subfault.rise_time +<= t the entire deformation due to this subfault is included, with +linear interpolation between these at intermediate times.

    +
    +

    Warning

    +

    Starting in Version 5.5.0, the subfault parameter rise_time +now refers to the total rise time of a subfault, while rise_time_starting +is the rise time up to the break in the piecewise quadratic +function defining the rise. By default rise_time_ending is set equal to +rise_time_starting. +(In earlier versions, rise_time read in from csv +files, for example, was erroneously interpreted as rise_time_starting +is now.) See the module function rise_fraction in +dtopotools module for moving topography for more details.

    +
    +
    +
    +

    Fault slip on triangular subfaults

    +

    Starting in Version 5.5.0, it is also possible to specify a set of +triangular subfault patches rather than rectangles.

    +

    Specifying a subfault as a triangular patch rather than as a rectangle can +be done by setting subfault.coordinate_specification = ‘triangular’ and +specifying subfault.corners as a list of three (x,y,depth) tuples, along +with the slip and rake. In this case you do not set the attributes +length, width, depth, strike, or dip, since the corners of the +triangle are sufficient to determine this geometry. +Internally a strike direction is calculated by intersecting the plane +defined by the triangle with the ground surface, and choosing the direction +so that the plane of the triangle dips at an angle between 0 and 90 degrees +relative to the strike direction. The specified rake is again +interpreted as degrees counterclockwise from this strike direction.

    +

    For an example see [need to add a notebook].

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/openmp.html b/v5.10.x/openmp.html new file mode 100644 index 0000000000..d1d90f1e10 --- /dev/null +++ b/v5.10.x/openmp.html @@ -0,0 +1,252 @@ + + + + + + + + + Using OpenMP — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Using OpenMP

    +

    The Clawpack Fortran Classic 3d code, AMRClaw 2d and 3d code, +and GeoClaw codes include +OpenMP directives for making use of multicore shared memory machines.

    +

    Note: Versions of gfortran before 4.6 are known to have OpenMP bugs. +You should use a recent version or a different compiler if you want to use +OpenMP.

    +

    To invoke OpenMP you need to compile the entire code with appropriate +compiler flags (see Fortran Compilers). For example, with gfortran +and the bash shell you could do:

    +
    export FFLAGS='-O2 -fopenmp'  # or hardwire FFLAGS in the Makefile
    +make new
    +
    +
    +

    in an application directory, which should recompile all of the library +routines as well.

    +

    Then you may want to specify how many threads OpenMP should split the work +between, e.g.

    +
    export OMP_NUM_THREADS=2
    +
    +
    +

    If you do not set this environment variable some default for your system +will be used.

    +

    You may also need to increase the stack size if the code bombs for no +apparent reason (and no useful error message):

    +
    export OMP_STACKSIZE=16M
    +
    +
    +

    and also:

    +
    ulimit -s unlimited
    +
    +
    +

    On a Mac this isn’t allowed and the best you can do is

    +
    ulimit -s hard
    +
    +
    +

    To stop using OpenMP you could do:

    +
    export FFLAGS=-O2   # or hardwire FFLAGS in the Makefile
    +make new
    +
    +
    +
    +

    Using OpenMP with AMR

    +

    The code in AMRClaw and GeoClaw is parallelized by splitting the list of +patches that must be advanced in time between threads, and then each grid +patch is handled by a single thread. For this reason good performance will +be seen only when there are a sufficiently large number of patches at each +level relative to the number of threads. For this reason it is recommended +that the parameter max1d be set to 60 in the modules

    +
      +
    • $CLAW/amrclaw/src/2d/amr_module.f90

    • +
    • $CLAW/amrclaw/src/3d/amr_module.f90

    • +
    +

    when OpenMP is used. This limits the size of any patch to have at most +max1d grid cells in each direction. If OpenMP is not used, a larger value +of max1d might give somewhat better performance since there is less +overhead associated with passing boundary values in ghost cells and other +per-patch work. However, this is generally negligible and max1d=60 is the +default value set in the code. If you do change this value, remember to +recompile everything via:

    +
    make new
    +
    +
    +
    +
    +

    Fixed grid output in GeoClaw

    +

    The original fixed grid output routines are not thread safe and so OpenMP +should not be used if you want to produce output on fixed grids.

    +

    The newer fgmax routines that keep track of maxima on fixed grids should be +thread safe, see Fixed grid monitoring (fgmax).

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/output_styles.html b/v5.10.x/output_styles.html new file mode 100644 index 0000000000..4cc0f865b0 --- /dev/null +++ b/v5.10.x/output_styles.html @@ -0,0 +1,338 @@ + + + + + + + + + Output data sytles and formats — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Output data sytles and formats

    +
    +

    Output style

    +

    In Specifying classic run-time parameters in setrun.py, the style of specifying output times can be +specified by setting the parameter output_style. This can be illustrated +by a typical example from a setrun.py file:

    +
    clawdata.output_style = 1
    +
    +if clawdata.output_style==1:
    +    # Output nout frames at equally spaced times up to tfinal:
    +    clawdata.num_output_times = 2
    +    clawdata.tfinal = 2*3600.
    +    clawdata.output_t0 = True  # output at initial (or restart) time?
    +
    +elif clawdata.output_style == 2:
    +    # Specify a list of output times.
    +    clawdata.output_times = [0, 1800, 7200]
    +
    +elif clawdata.output_style == 3:
    +    # Output every iout timesteps with a total of ntot time steps:
    +    clawdata.output_step_interval = 1
    +    clawdata.total_steps = 3
    +    clawdata.output_t0 = False
    +
    +
    +

    In this case setting clawdata.output_style==1 results in outputs at times +clawdata.t0, 1800, and 3600 (equally spaced in time). +Setting clawdata.output_style==2 results in outputs at times +0, 1800, and 7200 (not necessarily equally spaced). +Setting clawdata.output_style==3 results in outputs after 1, 2, and 3 +time steps on the coarsest grid (used primarily for debugging, or in cases +where you do not want the time steps to be adjusted to hit specific output +times).

    +
    +
    +

    Output data formats

    +

    In AMRClaw and GeoClaw, the format for the output data (solutions) can be +specified by setting the parameter output_format to ‘ascii’, +‘binary64’, or ‘binary32’. (The single-grid +classic code only supports ASCII output at this time.)

    +

    To read the solution stored in these files into Python for plotting or other +postprocessing purposes, utilities are provided that are described in +Pyclaw Input/Output Package.

    +

    Setting output_format = ‘ascii’ gives ASCII text output. The data files +can then be viewed with any standard text editor, which is particularly +useful for debugging. However, ASCII files are generally much larger than +is necessary to store the original data in binary form, and so when grid +have many grid cells or when many output frames are saved it is often better +to use some form of binary output, see Raw binary output data formats.

    +

    In AMRClaw and GeoClaw, ASCII and binary output are both written +by the library routine valout.f90. The aux arrays are also dumped +if requested, see Output of aux arrays.

    +
    +
    +

    ASCII output data format

    +

    Two output files are created at each output time (each frame). The frames +are generally numbered 0, 1, 2, etc. The two files, at frame 2, for +example, are called fort.t0002 and fort.q0002.

    +
    +

    fort.t0002

    +

    This file has the typical form:

    +
       0.40000000E+00    time
    +   1                 meqn
    +  36                 ngrids
    +   0                 naux
    +   2                 ndim
    +   2                 nghost
    +ascii                format
    +
    +
    +

    This file contains only 7 lines with information about the current time and the +number of AMR patches at this time, along with other metadata needed for +reading the AMR data properly.

    +

    In the above example, Frame 2 contains 36 patches. +If you are using the classic code +or PyClaw with only a single patch, then ngrids would be 1.

    +

    The data for all 36 patches is contained in fort.q0002. The data from each +patch is preceeded by a header that tells where the patch is located in the +domain, how many grid cells it contains, and what the cell size is, e.g.

    +
    +
    +

    fort.q0002

    +

    This header has the typical form:

    +
    1                 grid_number
    +1                 AMR_level
    +40                mx
    +40                my
    +0.00000000E+00    xlow
    +0.00000000E+00    ylow
    +0.25000000E-01    dx
    +0.25000000E-01    dy
    +
    +
    +

    This would be followed by 40*40 = 1600 lines with the data from cells (i,j). +The order they are written is (in Fortran style):

    +
    do j = 1,my
    +    do i = 1,mx
    +        write (q(i,j,m), m=1,meqn)
    +
    +
    +

    Each line has meqn (change to num_eqn?) values, for the components of +the system in this grid cell.

    +

    After the data for this patch, there would be another header for the next +patch, followed by its data, etc.

    +

    In the header, xlow and ylow are the coordinates of the lower left +corner of the patch, dx and dy are the cell width in x and y, and +AMR_level is the level of refinement, where 1 is the coarsest level. +Each patch has a unique grid_number that usually isn’t needed for +visualization purposes.

    +
    +
    +
    +

    Raw binary output data formats

    +

    New in v5.9.0: Previously the user could specify output_format=’binary’ +for binary format. Starting in v5.9.0, the user can specify either +output_format=’binary64’ or output_format=’binary32’. For backward +compatibility, the former is equivalent to specifying output_format=’binary’ +and dumps full 8-byte precision values. The new ‘binary32’ option +truncates the solution values to 4-bytes before writing, cutting the file +size in half. For most applications, this should still give sufficient +precision for plotting purposes.

    +

    The files for each frame are numbered as for the ASCII file and the +fort.t0002 file, for example, is still an ASCII file with 7 lines of +metadata. There are also ASCII files such as fort.q0002, but these now +contain only the headers for each grid patch and not the solution on each +patch. In addition there are files such as +fort.b0002 that contain a raw binary dump of the data from all of the +grid patches at this time, one after another. In order to decompose this +data into patches for plotting, the fort.q0002 file must be used.

    +

    Unlike the ASCII data files, the binary output +files contain ghost cells as well as the interior cells (since a contiguous +block of memory is dumped for each patch with a single write statement).

    +
    +
    +

    NetCDF output data format

    +

    NetCDF output is not currently supported in Clawpack. This is not a suitable +format for AMR style data.

    +
    +
    +

    Output of aux arrays

    +

    The contents of aux arrays can also be output along with each time frame. +Which components are output is controlled by the setrun variable +clawdata.output_aux_components, which can be ‘none’ (default) or ‘all’ +currently. The values, if desired, will go into files fort.aXXXX that +have the same format as the q data, as +specifed by output_format. Set output_aux_onlyonce to +True if the aux arrays do not change with time and you only want to +output these arrays once.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/packages.html b/v5.10.x/packages.html new file mode 100644 index 0000000000..c817dde8d2 --- /dev/null +++ b/v5.10.x/packages.html @@ -0,0 +1,243 @@ + + + + + + + + + Which Clawpack solver should I use? — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Which Clawpack solver should I use?

    +

    Clawpack includes a number of related hyperbolic PDE solvers:

    +
    +
    +
    +

    All of them are built on common algorithmic +ideas, make use of the same set of Riemann solvers, and can be used with VisClaw +for visualization. If you’re not sure which solver to use, here you will find +the main differences between them.

    +
    +

    Installation and user interface

    +

    The Classic, AMRClaw, and GeoClaw solvers are Fortran-based +packages and rely on Makefiles and environment variables. Problems are +specified partially through Python scripts at run time (setrun.py) and partially +through custom Fortran code at compile time (to set initial conditions, for instance).

    +

    With PyClaw, problems are specified entirely at run time through +Python script files, or +interactively (e.g., in IPython or Jupyter notebooks). +Typically, the user does not need to +write any Fortran code (though custom routines can be written in Fortran +when necessary for performance reasons).

    +

    PyClaw uses much of the same library of Fortran code, but that code is +compiled during installation so that it can be imported dynamically within +Python programs. In particular, Fortran versions of all the Riemann solvers +available in Classic or AMRClaw are also exposed in PyClaw. These are +converted using f2py, a step +that sometimes causes problems and is not required if you are only using +Fortran versions of the solvers.

    +
    +
    +

    Algorithmic differences

    +

    All of the Clawpack solvers include the classic algorithms described in +[LeVeque-FVMHP]; if you only require those, it’s easiest to use Classic or +PyClaw. Most of the packages contain additional algorithms:

    +
    +
      +
    • AMRClaw includes block-structured adaptive mesh refinement that allows one +to use a non-uniform grid that changes in time and uses smaller grid cells +in regions with fine structure or where high accuracy is required.

    • +
    • GeoClaw Includes the AMR capabilities of AMRClaw and also has a number +of special routines and algorithms for handling geophysical problems, including +special well-balanced, positivity-preserving shallow water solvers.

    • +
    • PyClaw includes the high-order WENO-RK algorithms of SharpClaw, described in +[KetParLev13].

    • +
    +
    +
    +
    +

    Parallel computing

    +
      +
    • AMRClaw, GeoClaw, and Classic can be run in parallel using shared memory +via OpenMP.

    • +
    • PyClaw can be run in parallel on distributed-memory machines using MPI (through +PETSc) and has been shown to scale to tens of thousands of cores.

    • +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/photos.html b/v5.10.x/photos.html new file mode 100644 index 0000000000..b6f81047ae --- /dev/null +++ b/v5.10.x/photos.html @@ -0,0 +1,218 @@ + + + + + + + + + Clawpack Community Photos — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Clawpack Community Photos

    +
    +

    2016 Developers’ workshop at University of Washington

    +_images/Claw-Dev2016.jpg +
    +
    +

    2015 Developers’ workshop at University of Utah

    +_images/claw-dev-group-2015.jpg +
    +
    +

    2014 HPC3 workshop at KAUST

    +

    Clawpack turned 20 in 2014… Cake by Belky Ketcheson.

    +_images/HPC3-2014-group-photo.jpg +_images/cake3.jpg +
    +
    +

    2013 Claw-Dev workshop at UW

    +_images/Claw-Dev2013b.jpg +_images/Claw-Dev2013a.jpg +
    +
    +

    2012 HPC3 workshop at KAUST

    +_images/HPC3-2012-group-photo.jpg +
    +
    +

    2011 coding sprints at UW

    +_images/Claw-Dev2011.jpg +
    +
    +

    2010 GeoClaw hacking UW

    +_images/Claw-Dev2010.jpg +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/plotexamples.html b/v5.10.x/plotexamples.html new file mode 100644 index 0000000000..847ee659cb --- /dev/null +++ b/v5.10.x/plotexamples.html @@ -0,0 +1,178 @@ + + + + + + + + + Plotting examples — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Plotting examples

    +

    See Using setplot.py to specify the desired plots and the examples in the Clawpack Gallery. +The code that produced each set of plots can be found in +the Clawpack directory indicated.

    +

    If you wish to use the Matlab tools, see the Matlab Gallery.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/plotting.html b/v5.10.x/plotting.html new file mode 100644 index 0000000000..2242e631a5 --- /dev/null +++ b/v5.10.x/plotting.html @@ -0,0 +1,285 @@ + + + + + + + + + Plotting with Visclaw — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Plotting with Visclaw

    + +
    +

    Plotting as post-processing

    +

    Running a Fortran version of Clawpack produces output files that can then be +read in to a graphics package as a post-processing step. If you understand +the format of the output files, you can write custom graphics routines using +your favorite visualization tools. The output formats are described in the +section Output data sytles and formats.

    +

    Clawpack includes utilities for plotting using Python, and most of the +documention assumes you will use these tools. See +Plotting options in Python for a description of these. +The Python package matplotlib +is used under the hood for 1d and 2d plots, but the tools provided with +Clawpack simplify some common tasks since they handle looping over all grid +patches as is generally required when plotting AMR data.

    +

    Matlab plotting tools (mostly the same as in Clawpack 4.x) are available in +Visclaw. +See Plotting using Matlab for pointers if you wish to use these tools. +For 3d plots the Matlab tools may still be the best choice.

    +

    Another alternative for 3d plots (also for 2d) is to use +VisIt. +See Plotting with VisIt.

    +

    Since Clawpack 4.4, a set of Python plotting tools for 1d and 2d are +the recommended approach. The advantages of using the Python options are:

    +
    +
      +
    • Python and the graphics modules used in Clawpack are open source. Since +Clawpack itself is open source we find it desirable to also have an open +source plotting open for viewing the results.

    • +
    • The Python tools developed so far (mostly for 1d and 2d data sets) are +more powerful than the Matlab versions they replace, and can be used for +example to automatically generate html versions of multiple plots each +frame over all frames of a computation, to generate latex versions of the +output, as well as to step through the frames one by one as with the +Matlab tools. It is easier to specify a set of multiple plots to be +produced for each frame.

    • +
    • Matlab graphics are somewhat limited for 3d data sets, whereas several +open source visualization tools such as VisIt +are much better for dealing with large data sets, AMR meshes, etc. +and have Python bindings that should allow scripting in a manner +compatible with 1d and 2d. (Yet to be done.)

    • +
    • Python is a powerful language that can be scripted to perform multiple +runs, such as in a convergence test, and collect the results in tables or +plots. We are developing tools to simplify this process.

    • +
    +
    +
    +
    +

    Plotting on the fly

    +

    Describe options.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/plotting_faq.html b/v5.10.x/plotting_faq.html new file mode 100644 index 0000000000..d413152cff --- /dev/null +++ b/v5.10.x/plotting_faq.html @@ -0,0 +1,505 @@ + + + + + + + + + Plotting hints and FAQ — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Plotting hints and FAQ

    + + +

    More to come!

    +
    +

    What’s the difference between make .plots and make plots ?

    +

    The default Makefile configuration in Version 4.5.1 was changed to allow two +different targets .plots and plots. The former creates a +hidden file .plots whose modification time is used to check dependencies. +The plotting commands will be performed again only if the output of +setplot file has been changed, and will also re-run the code if it appears +that the output is out of date relative to the setrun file, for example. +If you want to create the plots without checking dependencies (and perhaps +accidentally re-running the code), use the make plots option. +plots is a phony target in the default Makefile.

    +
    +
    +

    How to plot a something other than a component of q?

    +

    Objects of class ClawPlotItem have an attribute plot_var. If +this is set to an integer than the corresponding component of q is plotted +(remembering that Python indexing starts at 0, so plot_var = 0 will +specify plotting the first component of q, for example).

    +

    If plot_var is a function then this function is applied to applied to +current_data and should return the array of values to be plotted. +For an example, see plotexample-acou-1d-6.

    +

    Sometimes you want to plot something other than the solution on the patch, +for example to add another feature to a plot of the solution. This can be +done via an afteraxes command, for example, which is called after all +items have been plotted on the current axes. See ClawPlotAxes for +details and an example.

    +
    +
    +

    How to add another curve to a plot, e.g. the true solution?

    +

    The afteraxes attribute of a ClawPlotAxes` object can be specified as +either a string or a function. The string is executed (using exec(...)) or +the function is called after performing +all plots on these axes (as specified by ClawPlotItem` objects). +This can be used to add a curve to a plot.

    +

    For example, if the true solution to an advection equation +is known to be \(q(x,t) = \sin(x+t)\), this could be added to a plot as a +red curve via:

    +
    def add_true_solution(current_data):
    +    from pylab import sin, plot
    +    x = current_data.x
    +    t = current_data.t
    +    qtrue = sin(x+t)
    +    plot(x, qtrue, 'r')
    +
    +plotaxes.afteraxes = add_true_solution
    +
    +
    +
    +
    +

    How to change the title in a plot?

    +

    The title attribute of a ClawPlotAxes` object determines the title that +appears a the top of the plot.

    +

    The title_with_t attributed determines if the time is included in this title. +If True (the default value), then “at time t = …” is appended to the title. +The time is printed using format 14.8f if (t>=0.001) & (t<1000.), +or format 14.8e more generally.

    +

    It is also possible to change the title using and afteraxes function. For +example, to create a larger title with fontsize 20 and only 4 digits in t:

    +
    def add_title(current_data):
    +    from pylab import title
    +    t = current_data.t
    +    title("Solution at time t = %10.4e" % t, fontsize=20)
    +
    +plotaxes.afteraxes = add_title
    +
    +
    +
    +
    +

    How to specify outdir, the directory to find fort.* files for plotting?

    +

    This is normally determined by the outdir attribute of +the ClawPlotData object directing the plotting. But see the next FAQ +for the option of using different directories for some plot items (e.g. to +compare results of two computations).

    +

    If you are making a set of hardcopy plots using:

    +
    $ make .plots
    +
    +
    +

    or

    +
    +

    $ make plots

    +
    +

    then outdir is specified in the Makefile by setting the CLAW_OUTDIR +variable.

    +

    If you are making plots interactively using Iplotclaw_, then you can +directly specify the outdir as a parameter, e.g.:

    +
    In[1]: ip=Iplotclaw(outdir="_output");   ip.plotloop()
    +
    +
    +

    If you don’t specify this parameter, `Iplotclaw`_ will look for a file +.output in the current directory. If you created the fort.* files by +the command:

    +
    $ make .output
    +
    +
    +

    then the output directory is set in the Makefile and the file .output +contains the path to the output directory.

    +

    Note: If you use

    +
    +

    $ make output

    +
    +

    which does not check dependencies, this also +does not create a target file .output.

    +

    If the file .output does not exist, outdir = '.' is used by +default, the current directory.

    +

    Note that if you stop a calculation mid-stream using <ctrl>-C, the file +.output may not exist or be correct, since this file is written after +the execution finishes.

    +
    +
    +

    How to specify a different outdir for some plot item?

    +

    If you want one plot item on an axis to use the default plotdata.outdir +while another to take data from a different directory (in order to compare +two computations, for example), you can set the outdir +attribute of a ClawPlotItem directly. If you do not set it, by +default it inherits from the ClawPlotFigure object this item belongs +to.

    +

    For example, you might have the following in your setplot function:

    +
    plotfigure = plotdata.new_plotfigure(name='compare', figno=1)
    +plotaxes = plotfigure.new_plotaxes()
    +
    +plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
    +plotitem.plot_var = 0
    +plotitem.plotstyle = '-o'
    +plotitem.color = 'b'
    +
    +plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
    +import os
    +plotitem.outdir = os.path.join(os.getcwd(), '_output2')
    +plotitem.plot_var = 0
    +plotitem.plotstyle = '-+'
    +plotitem.color = 'r'
    +
    +
    +

    This would plot results from plotdata.outdir as blue circles and results +from ./_output2 as red plus signs. It’s best to give the full path +name, e.g. as done here using os.path.join(os.getcwd(), '_output2').

    +
    +
    +

    How to set plot parameters that are not provided as attributes of ClawPlotItem?

    +

    Some commonly used plotting parameters can be specified as an attribute of a +ClawPlotItem`, for example:

    +
    plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
    +plotitem.plot_var = 0
    +plotitem.plotstyle = '-'
    +plotitem.color = 'b'
    +
    +
    +

    specifies plotting a blue line. These attributes are used in the call to the +matplotlib plot function. The plot function has many other keyword +parameters that are not all duplicated as attributes of ClawPlotItem`. To +change these, the kwargs attribute can be used.

    +

    For example, to plot as above, but with a wider blue line, append the following:

    +
    plotitem.kwargs = {'linewidth': 2}
    +
    +
    +

    If you try to specify the same keyword argument two different ways, e.g.:

    +
    plotitem.color = 'b'
    +plotitem.kwargs = {'linewidth': 2, 'color': 'r'}
    +
    +
    +

    the value in kwargs takes precedence. It is the kwargs dictionary that +is actually used in the call, and the color attribute is checked only if it +has not been defined by the user in the kwargs attribute.

    +
    +
    +

    How to change the size or background color of a figure?

    +

    By default, a figure is created of the default matplotlib size, with a tan +background. Any desired +keyword arguments to the matplotlib figure command can +be passed using the kwargs attributed of ClawPlotFigure`. For +example, to create a figure that is 10 inches by 5 inches with a pink +background:

    +
    plotfigure = plotdata.new_plotfigure(name='pinkfig', figno=1)
    +plotfigure.kwargs = {'figsize': [10,5],  'facecolor': [1, .7, .7]}
    +
    +
    +
    +
    +

    Specifying colormaps for pcolor or contourf plots

    +

    The matplotlib module matplotlib.cm provides many colormaps that can be +acquired as follows, for example:

    +
    from matplotlib import cm
    +cmap = cm.get_cmap('Greens')
    +
    +
    +

    matplotlib.colors provides some tools for working with colormaps, +and some additional colormaps and tools can be found in +clawpack.visclaw.colormaps.

    +

    In particular, the make_colormaps function simplifies the creation of new +colormaps interpolating between specified colors. +For example, a colormap fading from blue to yellow to red can be created +with the command:

    +
    from clawpack.visclaw import colormaps
    +yellow_red_blue = colormaps.make_colormap({0.:'#ffff00', 0.5:[1,0,0], 1.:'b'})
    +
    +
    +

    The argument of make_colormaps is a dictionary that maps values to colors, +with linear interpolation between the specified values. Each color can be +specified in various ways, e.g. in the example above blue is specified as +the matlab style ‘b’, yellow with an html hex string, and red with an RGB +tuple [1,0,0].

    +

    The colormap above is also predefined as +clawpack.visclaw.colormaps.yellow_red_blue and is used in many Clawpack +examples.

    +

    The function +clawpack.visclaw.colormaps.showcolors(cmap) can be used to display a +colormap. +`

    +
    +
    +

    How to debug setplot.py?

    +

    Suppose you are working in an interactive Python shell such as ipython and +encounter the following when trying to plot with `Iplotclaw`_:

    +
    In [3]: ip=Iplotclaw(); ip.plotloop()
    +*** Error in call_setplot: Problem executing function setplot
    +*** Problem executing setplot in Iplotclaw
    +    setplot =  setplot.py
    +*** Either this file does not exist or
    +    there is a problem executing the function setplot in this file.
    +*** PLOT PARAMETERS MAY NOT BE SET! ***
    +
    +Interactive plotting for Clawpack output...
    +
    +Plotting data from outdir =  _output
    +Type ? at PLOTCLAW prompt for list of commands
    +
    +    Start at which frame [default=0] ?
    +
    +
    +

    This tells you that there was some problem importing setplot.py, but is not +very informative and it is hard to debug from within the +Iplotclaw.plotloop +method. You may also run into this if you modify setplot.py +(inadvertantly introducing a bug) +and then use the resetplot option:

    +
    PLOTCLAW > resetplot
    +Executing setplot from  setplot.py
    +*** Error in call_setplot: Problem executing function setplot
    +*** Problem re-executing setplot
    +PLOTCLAW >
    +
    +
    +

    If you can’t spot the bug by examing setplot.py, it is easiest to debug +by exiting the plotloop and doing:

    +
    PLOTCLAW > q
    +quitting...
    +
    +In [4]: import setplot
    +In [5]: pd = ip.plotdata
    +In [6]: pd = setplot.setplot(pd)
    +---------------------------------------------------------------------------
    +AttributeError                            Traceback (most recent call last)
    +
    +      8
    +      9     # Figure for q[0]
    +---> 10     plotfigure = plotdata.new_plotfgure(name='q[0]', figno=1)
    +     11
    +     12     # Set up for axes in this figure:
    +
    +AttributeError: 'ClawPlotData' object has no attribute 'new_plotfgure'
    +
    +
    +

    In this case, the error is that new_plotfigure is mis-spelled.

    +

    In ipython you can also easily turn on the Python debugger pdb:

    +
    In [9]: pdb
    +Automatic pdb calling has been turned ON
    +
    +In [10]: pd = setplot.setplot(pd)
    +---------------------------------------------------------------------------
    +AttributeError                            Traceback (most recent call last)
    +      8
    +      9     # Figure for q[0]
    +---> 10     plotfigure = plotdata.new_plotfgure(name='q[0]', figno=1)
    +     11
    +     12     # Set up for axes in this figure:
    +
    +AttributeError: 'ClawPlotData' object has no attribute 'new_plotfgure'
    +
    +ipdb>
    +
    +
    +

    For more complicated debugging you could now explore the current state using +any pdb commands, described in the documentation. See also +the ipython documentation.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/plotting_geoclaw.html b/v5.10.x/plotting_geoclaw.html new file mode 100644 index 0000000000..d1cd784882 --- /dev/null +++ b/v5.10.x/plotting_geoclaw.html @@ -0,0 +1,187 @@ + + + + + + + + + Plotting routines for GeoClaw — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Plotting routines for GeoClaw

    +

    See Plotting with Visclaw for general information about plotting Clawpack results. +GeoClaw results can be viewed using these same tools. Some addition +functions and useful colormaps are available in the visclaw module +geoplot.

    +

    In particular, the following functions are useful to specify as plot_var +attributes of a ClawPlotItem:

    +
    +

    topo, land, depth, surface, surface_or_depth

    +
    +

    The function plot_topo_file is useful for plotting the topography in a +file of the type described in Topography data.

    +

    See the module for more documentation, found in the file +$CLAW/visclaw/src/python/visclaw/geoplot.py.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/plotting_python.html b/v5.10.x/plotting_python.html new file mode 100644 index 0000000000..094ccacb11 --- /dev/null +++ b/v5.10.x/plotting_python.html @@ -0,0 +1,389 @@ + + + + + + + + + Plotting options in Python — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Plotting options in Python

    +

    Clawpack includes utilities for plotting using Python. Most of these +are defined in the clawpack.visclaw module. +In order to use these you will need to insure that you have the required +modules installed (see python-install).

    +

    See Python Hints for more information on Python and pointers to many tutorials.

    +
    +

    Producing html plots from the command line

    +

    In most Clawpack directories, typing:

    +
    $  make .plots
    +
    +
    +

    will compile the code and run it (if necessary) and then +produce a set of html files that can be +used to view the resulting plots. These will be in a subdirectory +of the current directory as specified by PLOTDIR in the Makefile.

    +
    +
    +

    Producing a latex file with plots from the command line

    +

    A latex file with all the plots can also be produced by printframes, +and is also typically controlled by options set in the file setplot.py.

    +
    +
    +

    Setting plot parameters with a setplot function

    +

    Typically each applications directory contains a file setplot.py, see for +example Plotting examples. +This file should define a function setplot(plotdata) that sets various +attributes of an object plotdata of class ClawPlotData.

    +

    Documentation on how to create a setplot function and the various plotting +parameters that can be set can be found in the section Using setplot.py to specify the desired plots.

    +

    Examples can be found at Plotting examples.

    +
    +
    +

    Interactive plotting with Iplotclaw

    +

    For interactive plotting we suggest using IPython, which is a nicer shell +than the pure python shell, with things like command completion and history.

    +

    Here’s an example:

    +
    $  ipython
    +In [1]: from clawpack.visclaw.Iplotclaw import Iplotclaw
    +In [2]: ip = Iplotclaw()
    +In [3]: ip.plotloop()
    +Executing setplot ...
    +
    +Interactive plotclaw with ndim = 1 ...
    +Type ? at PLOTCLAW prompt for list of commands
    +
    +    Start at which frame [default=0] ?
    +    Plotting frame 0 ...
    +PLOTCLAW >  n
    +    Plotting frame 1 ...
    +PLOTCLAW > q
    +quitting...
    +In [4]:
    +
    +
    +

    Type ? at the PLOTCLAW prompt or ?command-name for more +information. Most commonly used are n for next frame, p for previous frame +and j to jump to a different frame. Hitting return at the prompt repeats +the previous command.

    +

    You can restart the plotloop later by doing:

    +
    In [4]: ip.plotloop()
    +
    +Interactive plotclaw with ndim = 1 ...
    +Type ? at PLOTCLAW prompt for list of commands
    +
    +    Start at which frame [default=1] ?
    +    Replot data for frame 1 [no] ?
    +PLOTCLAW >
    +
    +
    +

    By default it starts at the frame where you previously left off.

    +

    If you want to change plot parameters, the easiest way is to edit the file +setplot.py, either in a different window or, if you use vi, by:

    +
    PLOTCLAW > vi setplot.py
    +
    +
    +

    and then re-execute the setplot function using:

    +
    PLOTCLAW > resetplot
    +
    +
    +

    If you recompute results by running the fortran code again and want to plot +the new results (from this same directory), you may have to clear the frames +that have already been viewed using:

    +
    PLOTCLAW > clearframes
    +
    +
    +

    Or you can redraw the frame you’re currently looking at without clearing the +rest of the cached frame data by doing:

    +
    PLOTCLAW > rr
    +
    +
    +

    To see what figures, axes, and items have been defined by setplot:

    +
    PLOTCLAW > show
    +
    +Current plot figures, axes, and items:
    +---------------------------------------
    +  figname = Pressure, figno = 1
    +     axesname = AXES1, axescmd = subplot(1,1,1)
    +        itemname = ITEM1,  plot_type = 1d_plot
    +
    +  figname = Velocity, figno = 2
    +     axesname = AXES1, axescmd = subplot(1,1,1)
    +        itemname = ITEM1,  plot_type = 1d_plot
    +
    +
    +

    Type “help” or “help command-name” at the prompt for more options.

    +
    +

    Access to current_data

    +

    If you are viewing plots in using Iplotclaw and want to explore the data for +some frame or make plots directly in your Python shell, the data that is +being plotted is available to you in attributes of the Iplotclaw instance. +For example:

    +
    >>> ip = Iplotclaw();  ip.plotloop()
    +
    +Interactive plotting for Clawpack output...
    +
    +Plotting data from outdir =  _output
    +    ...
    +    Plotting Frame 0 at t = 0.0
    +PLOTCLAW > q
    +quitting...
    +
    +>>> pd = ip.plotdata
    +>>> cd = ip.current_data
    +
    +
    +

    The cd object contains the current_data used for the most recent +plot, while pd is the ClawPlotData object that +gives access to all the plotting parameters currently being used as well as +to methods such as getframe for retrieving other frames of data from this +computation.

    +

    If you want to change the directory outdir where the frame data is coming +from, you could do, for example:

    +
    >>> pd.outdir = "_output2"
    +>>> ip.plotloop()
    +...
    +PLOTCLAW > clearframes    # to remove old frames from cache
    +PLOTCLAW > rr             # to redraw current frame number but with new data
    +
    +
    +
    +
    +
    +

    printframes

    +

    Need to update

    +

    The function pyclaw.plotters.frametools.printframes can be used to produce html and +latex versions of the plots:

    +
    >>> from clawpack.visclaw.data import ClawPlotData
    +>>> from clawpack.visclaw import frametools
    +>>> plotclaw = ClawPlotData()
    +>>> # set attributes as desired
    +>>> frametools.printframes(plotclaw)
    +
    +
    +

    A convenience method of ClawPlotData is defined to apply this function, +e.g.:

    +
    >>> plotclaw.printframes()
    +
    +
    +

    This function is automatically called by the “make .plots” option available +in most examples.

    +
    +
    +

    Specifying what and how to plot

    +

    The first step in specifying how to plot is to create a ClawPlotData +object to hold all the data required for plotting. This is generally done +by creating a file setplot.py (see below).

    +

    Note that when you use Iplotclaw to do interactive plotting, e.g.:

    +
    >>> ip = Iplotclaw()
    +
    +
    +

    Then object ip will have an attribute plotdata that is a ClawPlotData +object. This object will have attribute setplot initialized to +‘setplot.py’, indicating that other attributes should be set by +executing the setplot function defined in the file ‘setplot.py’ in this +directory.

    +

    Once you have a ClawPlotData object you can set various attributes to +control what is plotted interactively if you want. For example,:

    +
    >>> plotdata.plotdir = '_plots'
    +>>> plotdata.setplot = 'my_setplot_file.py'
    +
    +
    +

    will cause hardcopy to go to subdirectory _plots of the current directory and +will cause the plotting routines to execute:

    +
    >>> from my_setplot_file import setplot
    +>>> plotdata = setplot(plotdata)
    +
    +
    +

    before doing the plotting.

    +

    There are many other ClawPlotData attributes and methods.

    +

    Most example directories contain a file setplot.py that contains a +function setplot(). This function +sets various attributes of the ClawPlotData +object to control what figures, axes, and items should be plotted for each +frame of the solution.

    +

    For an outline of how a typical set of plots is specified, see +Using setplot.py to specify the desired plots.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/prereqs.html b/v5.10.x/prereqs.html new file mode 100644 index 0000000000..3dc42de096 --- /dev/null +++ b/v5.10.x/prereqs.html @@ -0,0 +1,220 @@ + + + + + + + + + Installation Prerequisites — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Installation Prerequisites

    +

    Installing and using Clawpack requires the following:

    +
    +

    Operating system

    +
      +
    • Linux

    • +
    • Mac OS X: For the Fortran packages, you need to have the Xcode developer tools installed in +order to have make working. PyClaw does not require make.

    • +
    +
    +
    +

    Fortran

    +

    To use the Fortran versions of the PDE solvers (Classic, AMRClaw, and GeoClaw), +you will need +gfortran or another F90 compiler.

    +

    See Fortran Compilers for more about which compilers work well with +Clawpack.

    +
    +
    +

    Python

    + +

    There are many ways to install the Python scientific stack, e.g. via +apt-get or brew. On MacOS, you might check out +ScipySuperpack for Homebrew.

    +
    +
    +

    pip

    +

    If you are installing via pip install then you need pip. +If you need to install it, see +https://pip.pypa.io/en/stable/installation/

    +

    The version of pip install suggested for Quick Installation of all packages with pip requires +a recent version of pip, so you may need to upgrade if you run into +problems.

    +
    +
    +

    Git

    +

    If you are installing via pip using the command in +Quick Installation of all packages with pip, or via git clone, then you need Git. +You may already have it; in particular the Xcode tools on +Mac OSX contains Git. If you need to install it, see the Git book.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/py-modindex.html b/v5.10.x/py-modindex.html new file mode 100644 index 0000000000..6037003a86 --- /dev/null +++ b/v5.10.x/py-modindex.html @@ -0,0 +1,248 @@ + + + + + + + + Python Module Index — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + + +

    Python Module Index

    + +
    + c +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
    + c
    + clawpack +
        + clawpack.geoclaw.dtopotools +
        + clawpack.geoclaw.fgmax_tools +
        + clawpack.geoclaw.fgout_tools +
        + clawpack.geoclaw.kmltools +
        + clawpack.geoclaw.surge.storm +
        + clawpack.geoclaw.topotools +
        + clawpack.geoclaw.util +
        + clawpack.pyclaw.fileio.ascii +
        + clawpack.pyclaw.fileio.binary +
        + clawpack.pyclaw.fileio.hdf5 +
        + clawpack.pyclaw.fileio.netcdf +
        + clawpack.pyclaw.limiters.tvd +
        + clawpack.pyclaw.util +
        + clawpack.riemann.acoustics_1D_py +
        + clawpack.riemann.advection_1D_py +
        + clawpack.riemann.burgers_1D_py +
        + clawpack.riemann.euler_1D_py +
        + clawpack.riemann.shallow_1D_py +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/about.html b/v5.10.x/pyclaw/about.html new file mode 100644 index 0000000000..ec0b49ee3b --- /dev/null +++ b/v5.10.x/pyclaw/about.html @@ -0,0 +1,244 @@ + + + + + + + + + About PyClaw — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    About PyClaw

    +

    PyClaw is part of Clawpack – an open-source, free project. If you find PyClaw +useful, please let us know.

    +
    +

    Contributors

    +

    Many people have contributed to PyClaw, some of them very substantial parts of +the package. Their work is greatly appreciated: no open source project can +survive without a community. The following people contributed major parts of +the library (in alphabetical order)

    +
    +
      +
    • Aron Ahmadia: PETSc integration; I/O; programmatic testing framework; general design.

    • +
    • Amal Alghamdi: Initial development of PetClaw, many bug-fixes and enhancements.

    • +
    • Jed Brown: Implicit time stepping (still experimental).

    • +
    • Ondrej Certik: Installation and continuous integration bug-fixes.

    • +
    • Lisandro Dalcin: Fortran wrapping; PETSc integration; general efficiency.

    • +
    • Matthew Emmett: PyWENO integration.

    • +
    • Yiannis Hadjimichael: Documentation testing.

    • +
    • David Ketcheson: General maintenance and development; incorporation of SharpClaw routines.

    • +
    • Matthew Knepley: General design; PETSc integration.

    • +
    • Grady Lemoine: Interleaving and cache-optimization of 3D Classic routines.

    • +
    • Kyle Mandli: Initial design and implementation of the PyClaw framework.

    • +
    • Matteo Parsani: Mapped grids; Python-Fortran interfacing; implicit time stepping.

    • +
    • Manuel Quezada de Luna: 2D P-system Riemann solvers and example script.

    • +
    • Kristof Unterweger: PeanoClaw (AMR); still experimental.

    • +
    +
    +

    Contributions to the package are most welcome. If you have +used PyClaw for research, chances are that others would find your +code useful. See develop for more details.

    +
    +
    +

    License

    +

    PyClaw is distributed under a Berkeley Software Distribution +(BSD) style license. The license is in the file pyclaw/LICENSE.txt and +reprinted below.

    +

    See http://www.opensource.org/licenses/bsd-license.php for more details.

    +

    Copyright (c) 2008-2011 Kyle Mandli and David I. Ketcheson. All rights reserved.

    +

    Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met:

    +
    +
      +
    • Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer.

    • +
    • Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution.

    • +
    • Neither the name of King Abdullah University of Science & Technology nor +the names of its contributors may be used to endorse or promote products +derived from this software without specific prior written permission.

    • +
    +
    +

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    +
    +
    +

    Funding

    +

    PyClaw development has been supported by +grants from King Abdullah University of Science & Technology.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/basics.html b/v5.10.x/pyclaw/basics.html new file mode 100644 index 0000000000..5382e55883 --- /dev/null +++ b/v5.10.x/pyclaw/basics.html @@ -0,0 +1,204 @@ + + + + + + + + + PyClaw Basics — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + + + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/classes.html b/v5.10.x/pyclaw/classes.html new file mode 100644 index 0000000000..470273e0e5 --- /dev/null +++ b/v5.10.x/pyclaw/classes.html @@ -0,0 +1,417 @@ + + + + + + + + + Understanding Pyclaw Classes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Understanding Pyclaw Classes

    + +
    +

    Flow of a Pyclaw Simulation

    +

    The basic idea of a pyclaw simulation is to construct a +Solution object, hand it to a +Solver object, and request a solution at a new +time. The solver will take whatever steps are necessary to evolve the solution +to the requested time.

    +../_images/pyclaw_architecture_flow.png +

    The bulk of the work in order to run a simulation then is the creation and +setup of the appropriate Domain, State, +Solution, and Solver +objects needed to evolve the solution to the requested time.

    +
    +
    +

    Creation of a Pyclaw Solution

    +../_images/pyclaw_solution_structure.png +

    A Pyclaw Solution is a container for a collection of +Domain and State designed with a +view to future support of adaptive mesh refinement and multi-block simulations. The Solution +object keeps track of a list of State objects +and controls the overall input and output of the entire collection of +State objects. Each +State object inhabits a Grid, composed of +Dimension objects that define the extents +of the Domain. Multiple states can inhabit the same +grid, but each State inhabits a single grid.

    +

    The process needed to create a Solution object then +follows from the bottom up.

    +
    >>> from clawpack import pyclaw
    +>>> x = pyclaw.Dimension('x', -1.0, 1.0, 200)
    +>>> y = pyclaw.Dimension('y', 0.0, 1.0, 100)
    +
    +
    +

    This code creates two dimensions, a dimension x on the interval +[-1.0, 1.0] with \(200\) grid points and a dimension y on the interval +[0.0, 1.0] with \(100\) grid points.

    +
    +

    Note

    +

    Many of the attributes of a Dimension +object are set automatically so make sure that the values you want are set +by default. Please refer to the Dimension +classes definition for what the default values are.

    +
    +

    Next we have to create a Domain object that will +contain our dimensions objects.

    +
    >>> domain = pyclaw.Domain([x,y])
    +>>> num_eqn = 2
    +>>> state = pyclaw.State(domain,num_eqn)
    +
    +
    +

    Here we create a domain with the dimensions we created earlier to make a single 2D +Domain object. Then we set the number of equations the State +will represent to 2. Finally, we create a State that inhabits +this domain. As before, many of the attributes of the Domain +and State objects are set automatically.

    +

    We now need to set the initial condition q and possibly aux to the correct +values.

    +
    >>> import numpy as np
    +>>> sigma = 0.2
    +>>> omega = np.pi
    +>>> Y,X = np.meshgrid(state.grid.y.centers,state.grid.x.centers)
    +>>> r = np.sqrt(X**2 + Y**2)
    +>>> state.q[0,:] = np.cos(omega * r)
    +>>> state.q[1,:] = np.exp(-r**2 / sigma**2)
    +
    +
    +

    We now have initialized the first entry of q to a cosine function +evaluated at the cell centers and the second entry of q to a gaussian, again +evaluated at the grid cell centers.

    +

    Many Riemann solvers also require information about the problem we are going +to run which happen to be grid properties such as the impedence \(Z\) and +speed of sound \(c\) for linear acoustics. We can set these values in the +problem_data dictionary in one of two ways. The first way is to set them +directly as in:

    +
    >>> state.problem_data['c'] = 1.0
    +>>> state.problem_data['Z'] = 0.25
    +
    +
    +

    If you’re using a Fortran Riemann solver, these values will automatically get +copied to the corresponding variables in the cparam common block of the +Riemann solver. This is done in solver.setup(), which calls state.set_cparam().

    +

    Last we have to put our State object into a +Solution object to complete the process. In this +case, since we are not using adaptive mesh refinement or a multi-block +algorithm, we do not have multiple grids.

    +
    >>> sol = pyclaw.Solution(state,domain)
    +
    +
    +

    We now have a solution ready to be evolved in a +Solver object.

    +
    +
    +

    Creation of a Pyclaw Solver

    +

    A Pyclaw Solver can represent many different +types of solvers; here we will use a 1D, classic Clawpack type of +solver. This solver is defined in the solver module.

    +

    First we import the particular solver we want and create it with the default +configuration.

    +
    >>> solver = pyclaw.ClawSolver1D()
    +>>> solver.bc_lower[0] = pyclaw.BC.periodic
    +>>> solver.bc_upper[0] = pyclaw.BC.periodic
    +
    +
    +

    Next we need to tell the solver which Riemann solver to use from the +Riemann Solver Package. We can always +check what Riemann solvers are available to use via the riemann +module. Once we have picked one out, we pass it to the solver via:

    +
    >>> from clawpack import riemann
    +>>> solver.rp = riemann.acoustics_1D
    +
    +
    +

    In this case we have decided to use the 1D linear acoustics Riemann solver. You +can also set your own solver by importing the module that contains it and +setting it directly to the rp attribute of the particular object in the class +ClawSolver1D.

    +
    >>> import my_rp_module 
    +>>> solver.rp = my_rp_module.my_acoustics_rp 
    +
    +
    +

    Last we finish up by specifying solver options, if we want to override the +defaults. For instance, we might want to specify a particular limiter

    +
    >>> solver.limiters = pyclaw.limiters.tvd.vanleer
    +
    +
    +

    If we wanted to control the simulation we could at this point by issuing the +following commands:

    +
    >>> solver.evolve_to_time(sol,1.0) 
    +
    +
    +

    This would evolve our solution sol to t = 1.0 but we are then +responsible for all output and other setup considerations.

    +
    +
    +

    Creating and Running a Simulation with Controller

    +

    The Controller coordinates the output and setup of +a run with the same parameters as the classic Clawpack. In order to have it +control a run, we need only to create the controller, assign it a solver and +initial condition, and call the run() +method.

    +
    >>> from pyclaw.controller import Controller
    +
    +>>> claw = Controller()
    +>>> claw.solver = solver
    +>>> claw.solutions = sol
    +
    +
    +

    Here we have imported and created the Controller +class, assigned the Solver and +Solution.

    +

    These next commands setup the type of output the controller will output. The +parameters are similar to the ones found in the classic clawpack claw.data +format.

    +
    >>> claw.output_style = 1
    +>>> claw.num_output_times = 10
    +>>> claw.tfinal = 1.0
    +
    +
    +

    When we are ready to run the simulation, we can call the +run() method. It will then run the +simulation and output the appropriate time points. If the +keep_copy is set to True the +controller will keep a copy of each solution output in memory in the frames array. +For instance, you can then immediately plot the solutions output into the frames +array.

    +
    +
    +

    Restarting a simulation

    +

    To restart a simulation, simply initialize a Solution object using an output +frame from a previous run; for example, to restart from frame 3

    +
    >>> claw.solution = pyclaw.Solution(3)
    +
    +
    +

    By default, the Controller will number your +output frames starting from the frame number used for initializing +the Solution object. +If you want to change the default behaviour and start counting frames +from zero, you will need to pass the keyword argument +count_from_zero=True to the solution initializer.

    +
    +

    Note

    +

    It is necessary to specify the output format (‘petsc’ or ‘ascii’).

    +
    +

    If your simulation includes aux variables, you will need to either recompute them or +output the aux values at every step, following the instructions below.

    +
    +
    +

    Outputting aux values

    +

    To write aux values to disk at the initial time:

    +
    >>> claw.write_aux_init = True
    +
    +
    +

    To write aux values at every step:

    +
    >>> claw.write_aux_always = True
    +
    +
    +
    +
    +

    Outputting derived quantities

    +

    It is sometimes desirable to output quantities other than those +in the vector q. To do so, just add a function compute_p to +the controller that accepts the state and sets the derived quantities +in state.p

    +
    >>> def stress(state):
    +...     state.p[0,:,:] = np.exp(state.q[0,:,:]*state.aux[1,:,:]) - 1.
    +
    +>>> state.mp = 1
    +>>> claw.compute_p = stress
    +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/clawpack_and_pyclaw.html b/v5.10.x/pyclaw/clawpack_and_pyclaw.html new file mode 100644 index 0000000000..2463d95404 --- /dev/null +++ b/v5.10.x/pyclaw/clawpack_and_pyclaw.html @@ -0,0 +1,309 @@ + + + + + + + + + Porting a problem from Clawpack 4.6.x to PyClaw — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Porting a problem from Clawpack 4.6.x to PyClaw

    +

    The script pyclaw/development/clawdata2pyclaw.py is intended to aid +in converting a Clawpack 4.6 problem setup to PyClaw. However, +some manual conversion is necessary, especially if the problem +includes custom fortran routines.

    +

    In PyClaw, the high-level portions of the Fortran routines are reorganized in +an object-oriented Python framework, while the low-level ones are bound through +the Fortran to Python interface generator f2py. +Therefore, for simple problems you won’t need to call f2py directly. However, if +you want to reutilize some problem-specific fortran routines that were set up and +tested in a Clawpack problem, you can easily do it. Indeed, if those routines +are complicated and/or computationally intensive, +you should consider directly using the f2py +interface in the initialization script (see Setting up your own problem). +The example in clawpack/pyclaw/examples/shallow_sphere, which +solves the shallow water equations on the surface of a sphere, is a +complete example that relies heavily on the use of problem-specific Fortran routines. +In that problem setup, a few Fortran routines have been used to provide the +following functionality:

    +
    +
      +
    • Initialize the solution state.q[:,:,:]

    • +
    • Provide the mapping from a uniform Cartesian domain to the desired +physical domain, i.e. the mapc2p function

    • +
    • Setup the auxiliary variables state.aux[:,:,:]

    • +
    • Compute the (non-hyperbolic) contribution of a source term

    • +
    • Impose custom boundary conditions to both solution and auxiliary +variables

    • +
    +
    +

    The first step to succesfully interface the Fortran functions with PyClaw +is to automate the extension module generation of these routines through f2py. +You can use clawpack/pyclaw/examples/shallow_sphere/Makefile as a template:

    +
    # Problem's source Fortran files
    +INITIALIZE_SOURCE = mapc2p.f setaux.f qinit.f src2.f
    +problem.so: $(INITIALIZE_SOURCE)
    +    $(F2PY) -m problem -c $^
    +
    +
    +

    The code above, calls f2py to compile a set of Fortran routines +and build a module +(problem.so) which can then be imported as a function in Python. +The argument following the ‘’-m’’ flag is the name the python module should have (i.e. +the name of the target). f2py uses the numpy.distutils module from NumPy +that supports a number of major Fortran compilers. For more information +see http://www.scipy.org/F2py.

    +

    After compilation, it is useful to check the signature of each +function contained in problem.so, which may be different than +that of the original Fortran function, since f2py eliminates dummy variables. +One can easily achieve that by using the following commands:

    +
    $ ipython
    +>>> import problem
    +>>> problem?
    +
    +
    +

    The last command queries the content of the module and outputs the functions’ +signature that must be used in the initialization script to correctly call the +fortran functions. In the shallow water equations on a sphere example, we get +the following output:

    +
    >>> Type:           module
    +>>> Base Class:     <type 'module'>
    +>>> String Form:    <module 'problem' from 'problem.so'>
    +>>> Namespace:      Interactive
    +>>> File:           /Users/../../../clawpack/pyclaw/examples/shallow-sphere/problem.so
    +>>> Docstring:
    +    This module 'problem' is auto-generated with f2py (version:1).
    +    Functions:
    +    mapc2p(x1,y1,xp,yp,zp,rsphere)
    +    aux = setaux(maxmx,maxmy,num_ghost,mx,my,xlower,ylower,dxc,dyc,aux,rsphere,num_aux=shape(aux,0))
    +    q = qinit(maxmx,maxmy,num_ghost,mx,my,xlower,ylower,dx,dy,q,aux,rsphere,num_eqn=shape(q,0),num_aux=shape(aux,0))
    +    q = src2(maxmx,maxmy,num_ghost,xlower,ylower,dx,dy,q,aux,t,dt,rsphere,num_eqn=shape(q,0),mx=shape(q,1),my=shape(q,2),num_aux=shape(aux,0))
    +
    +
    +

    For instance, the function src2, which computes the contribution of the +(non-hyperbolic) source term, has the following intent variables:

    +
    >>> cf2py integer intent(in) maxmx
    +>>> cf2py integer intent(in) maxmy
    +>>> cf2py integer optional, intent(in) num_eqn
    +>>> cf2py integer intent(in) num_ghost
    +>>> cf2py integer intent(in) mx
    +>>> cf2py integer intent(in) my
    +>>> cf2py double precision intent(in) xlower
    +>>> cf2py double precision intent(in) ylower
    +>>> cf2py double precision intent(in) dx
    +>>> cf2py double precision intent(in) dy
    +>>> cf2py intent(in,out) q
    +>>> cf2py integer optional, intent(in)  num_aux
    +>>> cf2py intent(in) aux
    +>>> cf2py double precision intent(in) t
    +>>> cf2py double precision intent(in) dt
    +>>> cf2py double precision intent(in) Rsphere
    +
    +
    +

    Note that num_eqn, mx, my num_aux are identified by f2py as optional +arguments since their values can be retrieved by looking at the dimensions of +other multidimensional arrays, i.e. q and aux.

    +

    We are now ready to call and use the Fortran functions in the initialization +script. For instance, the src2 function is called in the +script by using a fortran_src_wrapper function whose main part reads:

    +
    >>> # Call src2 function
    +>>> import problem
    +>>> state.q = problem.src2(mx,my,num_ghost,xlowerg,ylowerg,dx,dy,q,aux,t,dt,Rsphere)
    +
    +
    +

    A similar approach is used to call other wrapped Fortran functions like +qinit, setaux, etc.

    +

    An important feature that makes PyClaw more flexible is the +capability to replace the standard low-level Fortran routines whith some +problem-specific routines. Binding new low-level functions and replacing the +standard ones is very easy; the user just needs to modify the problem-specific +Makefile. The shallow water equations on a sphere is again a +typical example that uses this nice feature. Indeed, to run correctly the problem an +ad-hoc step2 function (i.e. the step2qcor) is required. For that problem +the interesting part of the Makefile +reads:

    +
    # Override step2.f with a new function that contains a call to an additional
    +# function, i.e. qcor.f
    +# ==========================================================================
    +override TWO_D_CLASSIC_SOURCES = step2qcor.f qcor.o flux2.o limiter.o philim.o
    +
    +qcor.o: qcor.f
    +    $(FC) $(FFLAGS) -o qcor.o -c qcor.f
    +
    +
    +

    The user has just to override step2.f with the new function step2qcor.f +and provide new:

    +
    output_filenames : input_filenames
    +    actions
    +
    +
    +

    rules to create the targets required by the new Fortran routine. +Similar changes to the problem-specific Makefile can be used to replace other +low-level Fortran routines.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/cloud.html b/v5.10.x/pyclaw/cloud.html new file mode 100644 index 0000000000..d07234e6bc --- /dev/null +++ b/v5.10.x/pyclaw/cloud.html @@ -0,0 +1,185 @@ + + + + + + + + + Running PyClaw in the cloud — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Running PyClaw in the cloud

    +

    PyClaw can be quickly installed and run for free using SageMathCloud. +After you’ve followed the instructions below, you may want to try some of the notebooks.

    +
    +

    Sage Math Cloud

    +

    To run on Sage Math Cloud, simply create an account and a project at http://cloud.sagemath.org/. +Clawpack is pre-installed, so you can use it immediately from a terminal or IPython notebook. +Since matplotlib plots generated from the terminal will not work in the cloud, we +recommend using an IPython notebook.

    +

    You can also install the latest release of Clawpack in your Sage Math Cloud project. +Open a new terminal in your project, and type:

    +
    pip install --user clawpack
    +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/controller.html b/v5.10.x/pyclaw/controller.html new file mode 100644 index 0000000000..f41726df21 --- /dev/null +++ b/v5.10.x/pyclaw/controller.html @@ -0,0 +1,506 @@ + + + + + + + + + Pyclaw Controller Class — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Pyclaw Controller Class

    +

    The pyclaw controller object is a convenience class for running simulations +based on the classic clawpack formats and output specifications. It allows +for a variety of output time specifications, output styles and other ways to +keep a simulation organized.

    +

    The main way to use a Controller object then is to provide it with an +appropriate Solver and initial +Solution object. Then specify what kind of output +you would like different than the defaults (see +Controller for +details on what those are). Then simply call +run() in order to run the desired +simulation.

    +
    >>> import pyclaw.controller as controller
    +>>> claw = controller.Controller()            # Instantiate a new controller
    +>>> claw.solver = my_solver                   # Assign a solver              
    +>>> claw.solution = my_initial_solution       # Assign an initial condition  
    +
    +
    +

    Here we would set a variety of run parameters such as tfinal, +keep_copy if we wanted to plot the solutions immediately, or +output_format to specify a format other than ascii or no output files +if we are going to use keep_copy = True. After we are all set up we just +need to call the controller’s run() method and off we go.

    +
    >>> claw.run() 
    +
    +
    +

    Please see the PyClaw tutorial: Solve the acoustics equations for a detailed example of how this would +work in its entirety.

    +
    +

    pyclaw.controller.Controller

    +
    +
    +class clawpack.pyclaw.controller.Controller
    +

    Controller for pyclaw simulation runs and plotting

    +
    +
    Initialization:
    +

    Input: None

    +
    +
    Examples:
    +
    >>> import clawpack.pyclaw as pyclaw
    +>>> x = pyclaw.Dimension(0.,1.,100,name='x')
    +>>> domain = pyclaw.Domain((x))
    +>>> state = pyclaw.State(domain,3,2)
    +>>> claw = pyclaw.Controller()
    +>>> claw.solution = pyclaw.Solution(state,domain)
    +>>> claw.solver = pyclaw.ClawSolver1D()
    +
    +
    +
    +
    +
    +
    +check_validity()
    +

    Check that the controller has been properly set up and is ready to run.

    +

    Also checks validity of the solver, solution and states.

    +
    + +
    +
    +plot()
    +

    Plot from memory.

    +
    + +
    +
    +run()
    +

    Convenience routine that will evolve solution based on the +traditional clawpack output and run parameters.

    +

    This function uses the run parameters and solver parameters to evolve +the solution to the end time specified in run_data, outputting at the +appropriate times.

    +
    +
    Input:
    +

    None

    +
    +
    Output:
    +

    (dict) - Return a dictionary of the status of the solver.

    +
    +
    +
    + +
    +
    +F_file_name
    +

    (string) - Name of text file containing functionals

    +
    + +
    +
    +property F_path
    +

    (string) - Full path to output file for functionals

    +
    + +
    +
    +compute_F
    +

    (function) - Function that computes density of functional F

    +
    + +
    +
    +compute_p
    +

    (function) - function that computes derived quantities

    +
    + +
    +
    +file_prefix_p
    +

    (string) - File prefix to be prepended to derived quantity output files

    +
    + +
    +
    +frames
    +

    (list) - List of saved frames if keep_copy is set to True

    +
    + +
    +
    +keep_copy
    +

    (bool) - Keep a copy in memory of every output time, +default = False

    +
    + +
    +
    +nstepout
    +

    (int) - Number of steps between output, only used with +output_style = 3, default = 1

    +
    + +
    +
    +num_output_times
    +

    (int) - Number of output times, only used with output_style = 1, +default = 10

    +
    + +
    +
    +out_times
    +

    (list of floats) - Output time list, only used with output_style = 2, +default = numpy.linspace(0.0,tfinal,num_output_times)

    +
    + +
    +
    +outdir
    +

    (string) - Output directory, directs output files to outdir

    +
    + +
    +
    +property outdir_p
    +

    (string) - Directory to use for writing derived quantity files

    +
    + +
    +
    +output_file_prefix
    +

    (string) - File prefix to be appended to output files, +default = None

    +
    + +
    +
    +output_format
    +

    (list of strings) - Format or list of formats to output the data, +if this is None, no output is performed. See _pyclaw_io for more info +on available formats. default = 'ascii'

    +
    + +
    +
    +output_options
    +

    (dict) - Output options passed to function writing and reading +data in output_format’s format. default = {}

    +
    + +
    +
    +output_style
    +

    (int) - Time output style, default = 1

    +
    + +
    +
    +overwrite
    +

    (bool) - Ok to overwrite old result in outdir, default = True

    +
    + +
    +
    +plotdata
    +

    (ClawPlotData) - An instance of a +ClawPlotData object defining the +objects plot parameters.

    +
    + +
    +
    +rundir
    +

    (string) - Directory to run from (containing *.data files), uses +*.data from rundir

    +
    + +
    +
    +runmake
    +

    (bool) - Run make in xdir before xclawcmd

    +
    + +
    +
    +savecode
    +

    (bool) - Save a copy of *.f files in outdir

    +
    + +
    +
    +solver
    +

    (Solver) - Solver object

    +
    + +
    +
    +tfinal
    +

    (float) - Final time output, default = 1.0

    +
    + +
    +
    +property verbosity
    +

    (int) - Level of output to screen; default = 3

    +
    + +
    +
    +viewable_attributes
    +

    (list) - Viewable attributes of the :class:`~pyclaw.controller.Controller

    +
    + +
    +
    +write_aux_always
    +

    (bool) - Write out auxiliary array at every time step, +default = False

    +
    + +
    +
    +write_aux_init
    +

    (bool) - Write out initial auxiliary array, default = False

    +
    + +
    +
    +xclawcmd
    +

    (string) - Command to execute (if using fortran), defaults to xclaw or +xclaw.exe if cygwin is being used (which it checks vis sys.platform)

    +
    + +
    +
    +xclawerr
    +

    (string) - Where to write error messages

    +
    + +
    +
    +xclawout
    +

    (string) - Where to write timestep messages

    +
    + +
    +
    +xdir
    +

    (string) - Executable path, executes xclawcmd in xdir

    +
    + +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/evolve/limiters.html b/v5.10.x/pyclaw/evolve/limiters.html new file mode 100644 index 0000000000..d1dbd7bda1 --- /dev/null +++ b/v5.10.x/pyclaw/evolve/limiters.html @@ -0,0 +1,427 @@ + + + + + + + + + Pyclaw Limiters — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Pyclaw Limiters

    +
    +
    +clawpack.pyclaw.limiters.tvd.limit(num_eqn, wave, s, limiter, dtdx)
    +

    Apply a limiter to the waves

    +

    Function that limits the given waves using the methods contained +in limiter. This is the vectorized version of the function acting on a +row of waves at a time.

    +
    +
    Input:
    +
      +
    • wave - (ndarray(:,num_eqn,num_waves)) The waves at each interface

    • +
    • s - (ndarray(:,num_waves)) Speeds for each wave

    • +
    • +
      limiter - (int list) Array of type int determining which

      limiter to use

      +
      +
      +
    • +
    • +
      dtdx - (ndarray(:)) \(\Delta t / \Delta x\) ratio, used for CFL

      dependent limiters

      +
      +
      +
    • +
    +
    +
    Output:
    +
      +
    • (ndarray(:,num_eqn,num_waves)) - Returns the limited waves

    • +
    +
    +
    Version:
    +

    1.1 (2009-07-05)

    +
    +
    +
    + +
    +

    clawpack.pyclaw.limiters.tvd

    +

    Library of limiter functions to be applied to waves

    +

    This module contains all of the standard limiters found in clawpack. To +use any of the limiters, use the function limit to limit the appropriate +waves. Refer to each limiter and the function limit’s doc strings.

    +

    This is a list of the provided limiters and their corresponding method number, +note that some of the limiters actually correspond to a more general function +which can be controlled more directly. Refer to the limiter function and its +corresponding documentation for details.

    +
    +

    CFL Independent Limiters

    +
      +
    1. minmod - minmod_limiter()

    2. +
    3. superbee - superbee_limiter()

    4. +
    5. van leer - \((r + |r|) / (1 + |r|)\)

    6. +
    7. mc - mc_limiter()

    8. +
    9. Beam-warming - \(r\)

    10. +
    11. Frommm - \(1/2 (1 + r)\)

    12. +
    13. Albada 2 - \((r^2 + r) / (1 + r^2)\)

    14. +
    15. Albada 3 - \(1/2 (1+r) (1 - (|1-r|^3) / (1+|r|^3))\)

    16. +
    17. van Leer with Klein sharpening, k=2 - +van_leer_klein_sharpening_limiter()

    18. +
    +
    +
    +

    CFL Dependent Limiters

    +
      +
    1. Roe’s linear third order scheme - \(1 + (r-1) (1 + cfl) / 3\)

    2. +
    3. Arora-Roe (= limited version of the linear third order scheme) - +arora_roe()

    4. +
    5. Theta Limiter, theta=0.95 (safety on nonlinear waves) - +theta_limiter()

    6. +
    7. Theta Limiter, theta=0.75 - theta_limiter()

    8. +
    9. Theta Limiter, theta=0.5 - theta_limiter()

    10. +
    11. CFL-Superbee (Roe’s Ultrabee) - cfl_superbee()

    12. +
    13. CFL-Superbee (Roe’s Ultrabee) with theta=0.95 (nonlinear waves) - +cfl_superbee_theta()

    14. +
    15. beta=2/3 limiter - beta_limiter()

    16. +
    17. beta=2/3 limiter with theta=0.95 (nonlinear waves) - beta_limiter()

    18. +
    19. Hyperbee - hyperbee_limiter()

    20. +
    21. SuperPower - superpower_limiter()

    22. +
    23. Cada-Torrilhon modified - cada_torrilhon_limiter()

    24. +
    25. Cada-Torrilhon modified, version for nonlinear waves - +cada_torrilhon_limiter_nonlinear()

    26. +
    27. upper bound limiter (1st order) - upper_bound_limiter()

    28. +
    +
    +
    All limiters have the same function call signature:
    +
    Input:
    +
      +
    • r - (ndarray(:))

    • +
    • cfl - (ndarray(:)) Local CFL number

    • +
    +
    +
    Output:
    +
      +
    • (ndarray(:)) -

    • +
    +
    +
    +
    +
    +

    Newer limiters are based on work done by Friedemann Kemm [kemm_2009], paper +in review.

    +
    +
    Authors:
    +

    Kyle Mandli and Randy LeVeque (2008-08-21) Initial version

    +

    Kyle Mandli (2009-07-05) Added CFL depdendent limiters

    +
    +
    +
    +
    +
    +clawpack.pyclaw.limiters.tvd.arora_roe(r, cfl)
    +

    Arora-Roe limiter, limited version of the linear third order scheme

    +
    + +
    +
    +clawpack.pyclaw.limiters.tvd.beta_limiter(r, cfl, theta=0.95, beta=0.6666666666666666)
    +

    Modification of CFL Superbee limiter with theta and beta parameters

    +
    +
    Additional Input:
      +
    • theta

    • +
    • beta

    • +
    +
    +
    +
    + +
    +
    +clawpack.pyclaw.limiters.tvd.cada_torrilhon_limiter(r, cfl, epsilon=0.001)
    +

    Cada-Torrilhon modified

    +
    +
    Additional Input:
      +
    • epsilon =

    • +
    +
    +
    +
    + +
    +
    +clawpack.pyclaw.limiters.tvd.cada_torrilhon_limiter_nonlinear(r, cfl)
    +

    Cada-Torrilhon modified, version for nonlinear waves

    +
    + +
    +
    +clawpack.pyclaw.limiters.tvd.cfl_superbee(r, cfl)
    +

    CFL-Superbee (Roe’s Ultrabee) without theta parameter

    +
    + +
    +
    +clawpack.pyclaw.limiters.tvd.cfl_superbee_theta(r, cfl, theta=0.95)
    +

    CFL-Superbee (Roe’s Ultrabee) with theta parameter

    +
    + +
    +
    +clawpack.pyclaw.limiters.tvd.hyperbee_limiter(r, cfl)
    +

    Hyperbee

    +
    + +
    +
    +clawpack.pyclaw.limiters.tvd.mc_limiter(r, cfl)
    +

    MC vectorized limiter

    +
    + +
    +
    +clawpack.pyclaw.limiters.tvd.minmod_limiter(r, cfl)
    +

    Minmod vectorized limiter

    +
    + +
    +
    +clawpack.pyclaw.limiters.tvd.superbee_limiter(r, cfl)
    +

    Superbee vectorized limiter

    +
    + +
    +
    +clawpack.pyclaw.limiters.tvd.superpower_limiter(r, cfl, caut=1.0)
    +

    SuperPower limiter

    +
    +
    Additional input:
      +
    • caut = Limiter parameter

    • +
    +
    +
    +
    + +
    +
    +clawpack.pyclaw.limiters.tvd.theta_limiter(r, cfl, theta=0.95)
    +

    Theta limiter

    +
    +
    Additional Input:
      +
    • theta =

    • +
    +
    +
    +
    + +
    +
    +clawpack.pyclaw.limiters.tvd.upper_bound_limiter(r, cfl, theta=1.0)
    +

    Upper bound limiter (1st order)

    +
    +
    Additional Input:
      +
    • theta =

    • +
    +
    +
    +
    + +
    +
    +clawpack.pyclaw.limiters.tvd.van_leer_klein_sharpening_limiter(r, cfl)
    +

    van Leer with Klein sharpening, k=2

    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/examples.html b/v5.10.x/pyclaw/examples.html new file mode 100644 index 0000000000..a834a1c38d --- /dev/null +++ b/v5.10.x/pyclaw/examples.html @@ -0,0 +1,250 @@ + + + + + + + + + Working with PyClaw’s built-in examples — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Working with PyClaw’s built-in examples

    +

    PyClaw comes with many example problem scripts that can be +accessed from the module clawpack.pyclaw.examples. +If you have downloaded the PyClaw source, you can find them +in the directory clawpack/pyclaw/examples/. +These examples demonstrate the kinds of things that can be done +with PyClaw and are a great way to learn how to use PyClaw.

    +
    +

    Running and plotting examples

    +
    +

    Interactively in IPython

    +

    A built-in example can be run and plotted as follows:

    +
    from clawpack.pyclaw import examples
    +claw = examples.shock_bubble_interaction.setup()
    +claw.run()
    +claw.plot()
    +
    +
    +

    To run and plot a different example, simply replace shock_bubble_interaction +with another example name. A number of keyword arguments may be passed to +the setup function; see its docstring for details. +These usually include the following:

    +
    +
      +
    • use_petsc: set to 1 to run in parallel

    • +
    • solver_type: set to classic or sharpclaw

    • +
    • iplot: set to 1 to automatically launch interactive plotting after running. +Note that this shouldn’t be used in parallel, as every process will try to plot.

    • +
    • htmlplot: set to 1 to automatically create HTML plot pages after running.

    • +
    • outdir: the name of the subdirectory in which to put output files. Defaults to +./_output.

    • +
    +
    +
    +
    +

    From the command line

    +

    If you have downloaded the Clawpack source, you can run +the examples from the command line. +Simply do the following at the command prompt:

    +
    $ cd clawpack/pyclaw/examples/acoustics_1d_homogeneous
    +$ python acoustics.py iplot=1
    +
    +
    +

    You can run any of the examples similarly by going to the appropriate directory and +executing the Python script. For convenience, the scripts are set up to pass any +command-line options as arguments to the setup function.

    +
    +
    +
    +

    Built-in examples

    +

    You can see results from many of the examples in the Clawpack Gallery.

    +
    +
    +

    Adding new examples

    +

    If you have used PyClaw, we’d love to add your application to the built-in scripts. +Please contact us on the claw-users Google group +or just issue a pull request on Github.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/geometry.html b/v5.10.x/pyclaw/geometry.html new file mode 100644 index 0000000000..da2d027fa2 --- /dev/null +++ b/v5.10.x/pyclaw/geometry.html @@ -0,0 +1,921 @@ + + + + + + + + + PyClaw Geometry — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    PyClaw Geometry

    +

    The PyClaw geometry package contains the classes used to define the +geometry of a Solution object. The base container +for all other geometry is the Domain object. It +contains a list of Patch objects that reside inside +of the Domain.

    +../_images/domain_structure_1.png +

    Patch +represents a piece of the domain that could be a different resolution than +the others, have a different coordinate mapping, or be used to construct +complex domain shapes.

    +../_images/domain_structure_2.png +

    It contains Dimension +objects that define the extent of the Patch and the +number of grid cells in each dimension. Patch also +contains a reference to a nearly identical Grid +object. The Grid object also contains a set of +Dimension objects describing its extent and number +of grid cells. The Grid is meant to represent the +geometry of the data local to the process in the case of a parallel run. In +a serial simulation the Patch and +Grid share the same dimensions.

    +

    In the case where only one Patch object exists in +a Domain but it is run with four processes in +parallel, the Domain hierarchy could look like:

    +../_images/domain_structure_3.png +

    In the most complex case with multiple patches and a parallel run we may +have the following:

    +../_images/domain_structure_5.png +
    +

    Serial Geometry Objects

    +
    +

    pyclaw.geometry.Domain

    +
    +
    +class clawpack.pyclaw.geometry.Domain(*arg)
    +

    A Domain is a list of Patches.

    +

    A Domain may be initialized in the following ways:

    +
    +
      +
    1. +
      Using 3 arguments, which are in order
        +
      • A list of the lower boundaries in each dimension

      • +
      • A list of the upper boundaries in each dimension

      • +
      • A list of the number of cells to be used in each dimension

      • +
      +
      +
      +
    2. +
    3. +
      Using a single argument, which is
        +
      • A list of dimensions; or

      • +
      • A list of patches.

      • +
      +
      +
      +
    4. +
    +
    +
    +
    Examples:
    +
    >>> from clawpack import pyclaw
    +>>> domain = pyclaw.Domain( (0.,0.), (1.,1.), (100,100))
    +>>> print(domain.num_dim)
    +2
    +>>> print(domain.grid.num_cells)
    +[100, 100]
    +
    +
    +
    +
    +
    +
    +property grid
    +

    (list) - Patch.grid of base patch

    +
    + +
    +
    +property num_dim
    +

    (int) - Patch.num_dim of base patch

    +
    + +
    +
    +property patch
    +

    (Patch) - First patch is returned

    +
    + +
    + +
    +
    +

    pyclaw.geometry.Patch

    +
    +
    +class clawpack.pyclaw.geometry.Patch(dimensions)
    +

    Bases: object

    +
    +
    Global Patch information:
    +

    Each patch has a value for level and patch_index.

    +
    +
    +
    +
    +add_dimension(dimension)
    +

    Add the specified dimension to this patch

    +
    +
    Input:
    +
      +
    • dimension - (Dimension) Dimension to be added

    • +
    +
    +
    +
    + +
    +
    +get_dim_attribute(attr)
    +

    Returns a tuple of all dimensions’ attribute attr

    +
    + +
    +
    +property delta
    +

    (list) - List of computational cell widths

    +
    + +
    +
    +property dimensions
    +

    (list) - List of Dimension objects defining the +grid’s extent and resolution

    +
    + +
    +
    +level
    +

    (int) - AMR level this patch belongs to, default = 1

    +
    + +
    +
    +property lower_global
    +

    (list) - Lower coordinate extents of each dimension

    +
    + +
    +
    +property name
    +

    (list) - List of names of each dimension

    +
    + +
    +
    +property num_cells_global
    +

    (list) - List of the number of cells in each dimension

    +
    + +
    +
    +property num_dim
    +

    (int) - Number of dimensions

    +
    + +
    +
    +patch_index
    +

    (int) - Patch number of current patch, default = 0

    +
    + +
    +
    +property upper_global
    +

    (list) - Upper coordinate extends of each dimension

    +
    + +
    + +
    +
    +

    pyclaw.geometry.Grid

    +
    +
    +class clawpack.pyclaw.geometry.Grid(dimensions)
    +

    Representation of a single grid.

    +
    +
    Dimension information:
    +

    Each dimension has an associated name with it that can be accessed via +that name such as grid.x.num_cells which would access the x dimension’s +number of cells.

    +
    +
    Properties:
    +

    If the requested property has multiple values, a list will be returned +with the corresponding property belonging to the dimensions in order.

    +
    +
    Initialization:
    +
    +
    Input:
      +
    • dimensions - (list of Dimension) Dimensions that are to +be associated with this grid

    • +
    +
    +
    Output:
      +
    • (grid) Initialized grid object

    • +
    +
    +
    +
    +
    +

    A PyClaw grid is usually constructed from a tuple of PyClaw Dimension objects:

    +
    >>> from clawpack.pyclaw.geometry import Dimension, Grid
    +>>> x = Dimension(0.,1.,10,name='x')
    +>>> y = Dimension(-1.,1.,25,name='y')
    +>>> grid = Grid((x,y))
    +>>> print(grid)
    +2-dimensional domain (x,y)
    +No mapping
    +Extent:  [0.0, 1.0] x [-1.0, 1.0]
    +Cells:  10 x 25
    +
    +
    +

    We can query various properties of the grid:

    +
    >>> grid.num_dim
    +2
    +>>> grid.num_cells
    +[10, 25]
    +>>> grid.lower
    +[0.0, -1.0]
    +>>> grid.delta # Returns [dx, dy]
    +[0.1, 0.08]
    +
    +
    +

    A grid can be extended to higher dimensions using the add_dimension() method:

    +
    >>> z=Dimension(-2.0,2.0,21,name='z')
    +>>> grid.add_dimension(z)
    +>>> grid.num_dim
    +3
    +>>> grid.num_cells
    +[10, 25, 21]
    +
    +
    +

    Coordinates:

    +

    We can get the x, y, and z-coordinate arrays of cell nodes and centers from the grid. +Properties beginning with ‘c’ refer to the computational (unmapped) domain, while +properties beginning with ‘p’ refer to the physical (mapped) domain. For grids with +no mapping, the two are identical. Also note the difference between ‘center’ and +‘centers’.

    +
    >>> import numpy as np
    +>>> np.set_printoptions(precision=2)  # avoid doctest issues with roundoff
    +>>> grid.c_center([1,2,3])
    +array([ 0.15, -0.8 , -1.33])
    +>>> grid.p_nodes[0][0,0,0]
    +0.0
    +>>> grid.p_nodes[1][0,0,0]
    +-1.0
    +>>> grid.p_nodes[2][0,0,0]
    +-2.0
    +
    +
    +

    It’s also possible to get coordinates for ghost cell arrays:

    +
    >>> x = Dimension(0.,1.,5,name='x')
    +>>> grid1d = Grid([x])
    +>>> grid1d.c_centers
    +[array([0.1, 0.3, 0.5, 0.7, 0.9])]
    +>>> grid1d.c_centers_with_ghost(2)
    +[array([-0.3, -0.1,  0.1,  0.3,  0.5,  0.7,  0.9,  1.1,  1.3])]
    +
    +
    +

    Mappings:

    +

    A grid mapping can be used to solve in a domain that is not rectangular, +or to adjust the local spacing of grid cells. For instance, we can +use smaller cells on the left and larger cells on the right by doing:

    +
    >>> double = lambda xarr : np.array([x**2 for x in xarr])
    +>>> grid1d.mapc2p = double
    +>>> grid1d.p_centers
    +array([0.01, 0.09, 0.25, 0.49, 0.81])
    +
    +
    +

    Note that the ‘nodes’ (or nodes) of the mapped grid are the mapped values +of the computational nodes. In general, they are not the midpoints between +mapped centers:

    +
    >>> grid1d.p_nodes
    +array([0.  , 0.04, 0.16, 0.36, 0.64, 1.  ])
    +
    +
    +
    +
    +add_dimension(dimension)
    +

    Add the specified dimension to this patch

    +
    +
    Input:
    +
      +
    • dimension - (Dimension) Dimension to be added

    • +
    +
    +
    +
    + +
    +
    +add_gauges(gauge_coords)
    +

    Determine the cell indices of each gauge and make a list of all gauges +with their cell indices.

    +
    + +
    +
    +c_center(ind)
    +

    Compute center of computational cell with index ind.

    +
    + +
    +
    +c_centers_with_ghost(num_ghost)
    +

    Calculate the coordinates of the cell centers, including +ghost cells, in the computational domain.

    +
    +
    Input:
    +
      +
    • num_ghost - (int) Number of ghost cell layers

    • +
    +
    +
    +
    + +
    +
    +c_nodes_with_ghost(num_ghost)
    +

    Calculate the coordinates of the cell nodes (corners), including +ghost cells, in the computational domain.

    +
    +
    Input:
    +
      +
    • num_ghost - (int) Number of ghost cell layers

    • +
    +
    +
    +
    + +
    +
    +get_dim_attribute(attr)
    +

    Returns a tuple of all dimensions’ attribute attr

    +
    + +
    +
    +p_center(ind)
    +

    Compute center of physical cell with index ind.

    +
    + +
    +
    +plot(num_ghost=0, mapped=True, mark_nodes=False, mark_centers=False)
    +

    Make a plot of the grid.

    +

    By default the plot uses the mapping +grid.mapc2p and does not show any ghost cells. This can be modified +via the arguments mapped and num_ghost.

    +

    Returns a handle to the plot axis object.

    +
    + +
    +
    +setup_gauge_files(outdir)
    +

    Creates and opens file objects for gauges.

    +
    + +
    +
    +property c_centers
    +

    (list of ndarray(…)) - List containing the arrays locating +the computational locations of cell centers, see +_compute_c_centers() for more info.

    +
    + +
    +
    +property c_nodes
    +

    (list of ndarray(…)) - List containing the arrays locating +the computational locations of cell nodes, see +_compute_c_nodes() for more info.

    +
    + +
    +
    +property dimensions
    +

    (list) - List of Dimension objects defining the +grid’s extent and resolution

    +
    + +
    +
    +gauge_dir_name
    +

    (string) - Name of the output directory for gauges. If the +Controller class is used to run the application, this directory by +default will be created under the Controller outdir directory.

    +
    + +
    +
    +gauge_file_names
    +

    (list) - List of file names to write gauge values to

    +
    + +
    +
    +gauge_files
    +

    (list) - List of file objects to write gauge values to

    +
    + +
    +
    +gauges
    +

    (list) - List of gauges’ indices to be filled by add_gauges +method.

    +
    + +
    +
    +property num_dim
    +

    (int) - Number of dimensions

    +
    + +
    +
    +property p_centers
    +

    (list of ndarray(…)) - List containing the arrays locating +the physical locations of cell centers, see +_compute_p_centers() for more info.

    +
    + +
    +
    +property p_nodes
    +

    (list of ndarray(…)) - List containing the arrays locating +the physical locations of cell nodes, see +_compute_p_nodes() for more info.

    +
    + +
    + +
    +
    +

    pyclaw.geometry.Dimension

    +
    +
    +class clawpack.pyclaw.geometry.Dimension(lower, upper, num_cells, name='x', on_lower_boundary=None, on_upper_boundary=None, units=None)
    +

    Basic class representing a dimension of a Patch object

    +
    +
    Initialization:
    +

    +
    +
    +
    Required arguments, in order:
      +
    • lower - (float) Lower extent of dimension

    • +
    • upper - (float) Upper extent of dimension

    • +
    • num_cells - (int) Number of cells

    • +
    +
    +
    Optional (keyword) arguments:
      +
    • name - (string) string Name of dimension

    • +
    • units - (string) Type of units, used for informational purposes only

    • +
    +
    +
    Output:
      +
    • (Dimension) - Initialized Dimension object

    • +
    +
    +
    +

    Example:

    +
    >>> from clawpack.pyclaw.geometry import Dimension
    +>>> x = Dimension(0.,1.,100,name='x')
    +>>> print(x)
    +Dimension x:  (num_cells,delta,[lower,upper]) = (100,0.01,[0.0,1.0])
    +>>> x.name
    +'x'
    +>>> x.num_cells
    +100
    +>>> x.delta
    +0.01
    +>>> x.nodes[0]
    +0.0
    +>>> x.nodes[1]
    +0.01
    +>>> x.nodes[-1]
    +1.0
    +>>> x.centers[-1]
    +0.995
    +>>> len(x.centers)
    +100
    +>>> len(x.nodes)
    +101
    +
    +
    +
    +
    +centers_with_ghost(num_ghost)
    +

    (ndarrary(:)) - Location of all cell center coordinates +for this dimension, including centers of ghost cells.

    +
    + +
    +
    +nodes_with_ghost(num_ghost)
    +

    (ndarrary(:)) - Location of all edge coordinates +for this dimension, including nodes of ghost cells.

    +
    + +
    +
    +property centers
    +

    (ndarrary(:)) - Location of all cell center coordinates +for this dimension

    +
    + +
    +
    +property delta
    +

    (float) - Size of an individual, computational cell

    +
    + +
    +
    +property nodes
    +

    (ndarrary(:)) - Location of all cell edge coordinates +for this dimension

    +
    + +
    + +
    +
    +
    +

    Parallel Geometry Objects

    +
    +

    petclaw.geometry.Domain

    +
    +
    +class clawpack.petclaw.geometry.Domain(geom)
    +

    Bases: Domain

    +

    Parallel Domain Class

    +

    Parent Class Documentation:

    +

    2D Classic (Clawpack) solver.

    +

    Solve using the wave propagation algorithms of Randy LeVeque’s +Clawpack code (www.clawpack.org).

    +

    In addition to the attributes of ClawSolver1D, ClawSolver2D +also has the following options:

    +
    +
    +dimensional_split
    +

    If True, use dimensional splitting (Godunov splitting). +Dimensional splitting with Strang splitting is not supported +at present but could easily be enabled if necessary. +If False, use unsplit Clawpack algorithms, possibly including +transverse Riemann solves.

    +
    + +
    +
    +transverse_waves
    +

    If dimensional_split is True, this option has no effect. If +dimensional_split is False, then transverse_waves should be one of +the following values:

    +

    ClawSolver2D.no_trans: Transverse Riemann solver +not used. The stable CFL for this algorithm is 0.5. Not recommended.

    +

    ClawSolver2D.trans_inc: Transverse increment waves are computed +and propagated.

    +

    ClawSolver2D.trans_cor: Transverse increment waves and transverse +correction waves are computed and propagated.

    +
    + +

    Note that only the fortran routines are supported for now in 2D.

    +

    Parent Class Documentation:

    +

    Generic classic Clawpack solver

    +

    All Clawpack solvers inherit from this base class.

    +
    +
    +mthlim
    +

    Limiter(s) to be used. Specified either as one value or a list. +If one value, the specified limiter is used for all wave families. +If a list, the specified values indicate which limiter to apply to +each wave family. Take a look at pyclaw.limiters.tvd for an enumeration. +Default = limiters.tvd.minmod

    +
    + +
    +
    +order
    +

    Order of the solver, either 1 for first order (i.e., Godunov’s method) +or 2 for second order (Lax-Wendroff-LeVeque). +Default = 2

    +
    + +
    +
    +source_split
    +

    Which source splitting method to use: 1 for first +order Godunov splitting and 2 for second order Strang splitting. +Default = 1

    +
    + +
    +
    +fwave
    +

    Whether to split the flux jump (rather than the jump in Q) into waves; +requires that the Riemann solver performs the splitting. +Default = False

    +
    + +
    +
    +step_source
    +

    Handle for function that evaluates the source term. +The required signature for this function is:

    +

    def step_source(solver,state,dt)

    +
    + +
    +
    +kernel_language
    +

    Specifies whether to use wrapped Fortran routines (‘Fortran’) +or pure Python (‘Python’). Default = 'Fortran'.

    +
    + +
    +
    +verbosity
    +

    The level of detail of logged messages from the Fortran solver. +Default = 0.

    +
    + +
    + +
    +
    +

    petclaw.geometry.Patch

    +
    +
    +class clawpack.petclaw.geometry.Patch(dimensions)
    +

    Bases: Patch

    +

    Parallel Patch class.

    +

    Parent Class Documentation:

    +
    +
    Global Patch information:
    +

    Each patch has a value for level and patch_index.

    +
    +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/going_further.html b/v5.10.x/pyclaw/going_further.html new file mode 100644 index 0000000000..2850cd6651 --- /dev/null +++ b/v5.10.x/pyclaw/going_further.html @@ -0,0 +1,211 @@ + + + + + + + + + Going Further — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + + + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/index.html b/v5.10.x/pyclaw/index.html new file mode 100644 index 0000000000..5a99c51c91 --- /dev/null +++ b/v5.10.x/pyclaw/index.html @@ -0,0 +1,416 @@ + + + + + + + + + PyClaw — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    PyClaw

    +

    In this section of the documentation, PyClaw refers +a Python version of the hyperbolic PDE solvers that allows solving the +problem in Python (e.g. in a Jupyter notebook) without explicitly using +any Fortran code. Versions of the solvers are written in Python. +However, they use Riemann solvers that are converted from the Fortran +versions into Python-callable versions using +f2py, +to facilitate using the same large set of solvers from either Fortran +or Python. Note that +in order for this to work the solvers must be precompiled, as is done +when using pip install, for example (see pip install instructions).

    +

    See Which Clawpack solver should I use? for more information about the different +capabilities of PyClaw relative to Classic, AMRClaw, and GeoClaw.

    +

    Note: The clawpack/pyclaw directory also contains some +Python tools that are used many places in +Clawpack, e.g. when plotting with visclaw or when compiling and +running Fortran code using a Makefile and setrun.py file +(when using Classic, AMRClaw, and GeoClaw). +These modules are mostly used “under the hood”. +Other Python tools of use in the Fortran versions +are described elsewhere; see e.g. Plotting with Visclaw or GeoClaw Description and Detailed Contents. +All of these modules are pure Python and should work fine as long +as the top level of Clawpack is on your Python path.

    +
    +

    PyClaw installation

    +

    Using pip install is the recommended approach, see +pip install instructions.

    +
    +
    +

    Examples

    +

    Next, try running an example Jupyter notebook.

    +

    Alternatively, to run an example from the IPython prompt:

    +
    from clawpack.pyclaw import examples
    +claw = examples.shock_bubble_interaction.setup()
    +claw.run()
    +claw.plot()
    +
    +
    +

    To run an example and plot the results directly from the command line, +go to the directory where Clawpack is installed and then:

    +
    cd pyclaw/examples/euler_2d
    +python shock_bubble_interaction.py iplot=1
    +
    +
    +
    +
    +

    Features

    +
    +
      +
    • A hyperbolic PDE solver in 1D, 2D, and 3D, including mapped grids and surfaces, built on Clawpack;

    • +
    • Massively parallel – the same simple script that runs on your laptop will +scale efficiently on the world’s biggest supercomputers (see Running in parallel);

    • +
    • High order accurate, with WENO reconstruction and Runge-Kutta time integration +(see Using PyClaw’s solvers: Classic and SharpClaw);

    • +
    • Simple and intuitive thanks to its Python interface.

    • +
    +
    +

    PyClaw makes use of the additional Clawpack packages, +Riemann and +VisClaw for Riemann solvers and visualization, +respectively.

    +

    If you have any issues or need help using PyClaw, contact us.

    +
    +
    +
    +

    PyClaw Documentation

    +

    See also the +Gallery of PyClaw Applications +for some examples of how PyClaw can be used.

    + +
    +
    +

    PyClaw Modules reference documentation

    + +
    +
    +

    Riemann Solvers reference documentation

    +

    The Riemann solvers now comprise a separate package. For convenience, +documentation of the available pure python Riemann solvers is included +here. Many other Fortran-based Riemann solvers are available.

    + +
    +
    +

    Indices and tables

    + +
    +
    +

    Citing PyClaw

    +

    If you use PyClaw in work that will be published, please cite the Clawpack software +(see Citing this work) and also mention specifically that you used PyClaw, and cite the paper:

    +
    @article{pyclaw-sisc,
    +        Author = {Ketcheson, David I. and Mandli, Kyle T. and Ahmadia, Aron J. and Alghamdi, Amal and {Quezada de Luna}, Manuel and Parsani, Matteo and Knepley, Matthew G. and Emmett, Matthew},
    +        Journal = {SIAM Journal on Scientific Computing},
    +        Month = nov,
    +        Number = {4},
    +        Pages = {C210--C231},
    +        Title = {{PyClaw: Accessible, Extensible, Scalable Tools for Wave Propagation Problems}},
    +        Volume = {34},
    +        Year = {2012}}
    +
    +
    +

    If you use the Classic (2nd-order) solver, you may also wish to cite:

    +
    @article{leveque1997,
    +        Author = {LeVeque, Randall J.},
    +        Journal = {Journal of Computational Physics},
    +        Pages = {327--353},
    +        Title = {{Wave Propagation Algorithms for Multidimensional Hyperbolic Systems}},
    +        Volume = {131},
    +        Year = {1997}}
    +
    +
    +

    If you use the SharpClaw (high order WENO) solver, you may also wish to cite:

    +
    @article{KetParLev13,
    +        Author = {Ketcheson, David I. and Parsani, Matteo and LeVeque,
    +        Randall J.},
    +        Journal = {SIAM Journal on Scientific Computing},
    +        Number = {1},
    +        Pages = {A351--A377},
    +        Title = {{High-order Wave Propagation Algorithms for Hyperbolic Systems}},
    +        Volume = {35},
    +        Year = {2013}}
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/io.html b/v5.10.x/pyclaw/io.html new file mode 100644 index 0000000000..c0215f710e --- /dev/null +++ b/v5.10.x/pyclaw/io.html @@ -0,0 +1,714 @@ + + + + + + + + + Pyclaw Input/Output Package — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Pyclaw Input/Output Package

    +

    Pyclaw supports the following input and output formats:

    +
    +
      +
    • ASCII - ASCII file I/O, supports traditional clawpack format files

    • +
    • BINARY - for reading binary output files containing 32 or 64 byte floats

    • +
    • HDF5 - HDF5 file I/O

    • +
    • NetCDF - NetCDF file I/O, support for NetCDF3 and NetCDF4 files

    • +
    +
    +

    Each module contains two main routines read_<format> and +write_<format> which Solution can call with the +appropriate <format>. In order to create a new file I/O extension the calling +signature must match

    +
    read_<format>(solution,frame,path,file_prefix,write_aux,options)
    +
    +
    +
    +
    where the the inputs are
    +
    Input:
    +
      +
    • solution - (Solution) Pyclaw object to be +output

    • +
    • frame - (int) Frame number

    • +
    • path - (string) Root path

    • +
    • file_prefix - (string) Prefix for the file name.

    • +
    • write_aux - (bool) Boolean controlling whether the associated +auxiliary array should be written out.

    • +
    • options - (dict) Optional argument dictionary

    • +
    +
    +
    +
    +
    +

    and

    +
    write_<format>(solution,frame,path,file_prefix,write_aux,options)
    +
    +
    +
    +
    where the inputs are
    +
    Input:
    +
      +
    • solution - (Solution) Pyclaw object to be +output

    • +
    • frame - (int) Frame number

    • +
    • path - (string) Root path

    • +
    • file_prefix - (string) Prefix for the file name.

    • +
    • write_aux - (bool) Boolean controlling whether the associated +auxiliary array should be written out.

    • +
    • options - (dict) Optional argument dictionary.

    • +
    +
    +
    +
    +
    +

    Note that both allow for an options dictionary that is format specific +and should be documented thoroughly. For examples of this usage, see the +HDF5 and NetCDF modules.

    +

    HDF5 and NetCDF support require installed libraries in order to work, please +see the respective modules for details on how to obtain and install the +libraries needed.

    +
    +
    +

    Note

    +

    Pyclaw automatically detects the availability of HDF5 and NetCDF file +support and will warn you if you try and use them without the proper +libraries.

    +
    +
    +
    +

    pyclaw.fileio.ascii

    +

    Routines for reading and writing an ascii output file

    +
    +
    +clawpack.pyclaw.fileio.ascii.read(solution, frame, path='./', file_prefix='fort', read_aux=False, options={})
    +

    Read in a frame of ascii formatted files, and enter the data into the +solution object.

    +

    This routine reads the ascii formatted files corresponding to the classic +clawpack format ‘fort.txxxx’, ‘fort.qxxxx’, and ‘fort.axxxx’ or ‘fort.aux’ +Note that the fort prefix can be changed.

    +
    +
    Input:
    +
      +
    • solution - (Solution) Solution object to +read the data into.

    • +
    • frame - (int) Frame number to be read in

    • +
    • path - (string) Path to the current directory of the file

    • +
    • file_prefix - (string) Prefix of the files to be read in. +default = 'fort'

    • +
    • read_aux (bool) Whether or not an auxiliary file will try to be read +in. default = False

    • +
    • options - (dict) Dictionary of optional arguments dependent on +the format being read in. default = {}

    • +
    +
    +
    +
    + +
    +
    +clawpack.pyclaw.fileio.ascii.read_array(f, state, num_var)
    +

    Read in an array from an ASCII output file f.

    +

    The variable q here may in fact refer to q or to aux.

    +

    This routine supports the possibility that the values +q[:,i,j,k] (for a fixed i,j,k) have been split over multiple lines, because +some packages write just 4 values per line. +For Clawpack 6.0, we plan to make all packages write +q[:,i,j,k] on a single line. This routine can then be simplified.

    +
    + +
    +
    +clawpack.pyclaw.fileio.ascii.read_patch_header(f, num_dim)
    +

    Read header describing the next patch

    +
    +
    Input:
    +
      +
    • f - (file) Handle to open file

    • +
    • num_dim - (int) Number of dimensions

    • +
    +
    +
    Output:
    +
      +
    • patch - (clawpack.pyclaw.geometry.Patch) Initialized patch represented +by the header data.

    • +
    +
    +
    +
    + +
    +
    +clawpack.pyclaw.fileio.ascii.read_t(frame, path='./', file_prefix='fort')
    +

    Read only the fort.t file and return the data.

    +

    Note this file is always ascii and now contains a line that tells +the file_format, so we can read this file before importing the +appropriate read function for the solution data.

    +

    For backward compatibility, if file_format line is missing then +return None and handle this where it is called.

    +

    This version also reads in num_ghost so that if the data is binary, +we can extract only the data that’s relevant (since ghost cells are +included).

    +
    +
    Input:
    +
      +
    • frame - (int) Frame number to be read in

    • +
    • path - (string) Path to the current directory of the file

    • +
    • file_prefix - (string) Prefix of the files to be read in. +default = 'fort'

    • +
    +
    +
    Output:
    +
      +
    • (list) List of output variables

    • +
    • t - (int) Time of frame

    • +
    • num_eqn - (int) Number of equations in the frame

    • +
    • nstates - (int) Number of states

    • +
    • num_aux - (int) Auxiliary value in the frame

    • +
    • num_dim - (int) Number of dimensions in q and aux

    • +
    • num_ghost - (int) Number of ghost cells on each side

    • +
    • file_format - (str) ‘ascii’, ‘binary32’, ‘binary64’

    • +
    +
    +
    +
    + +
    +
    +clawpack.pyclaw.fileio.ascii.write(solution, frame, path, file_prefix='fort', write_aux=False, options={}, write_p=False)
    +

    Write out ascii data file

    +

    Write out an ascii file formatted identical to the fortran clawpack files +including writing out fort.t, fort.q, and fort.aux if necessary. Note +that there are some parameters that assumed to be the same for every patch +in this format which is not necessarily true for the actual data objects. +Make sure that if you use this output format that all of your patches share +the appropriate values of num_dim, num_eqn, num_aux, and t. Only supports +up to 3 dimensions.

    +
    +
    Input:
    +
      +
    • solution - (Solution) Pyclaw object to be +output.

    • +
    • frame - (int) Frame number

    • +
    • path - (string) Root path

    • +
    • file_prefix - (string) Prefix for the file name. default = 'fort'

    • +
    • write_aux - (bool) Boolean controlling whether the associated +auxiliary array should be written out. default = False

    • +
    • options - (dict) Dictionary of optional arguments dependent on +the format being written. default = {}

    • +
    +
    +
    +
    + +
    +
    +clawpack.pyclaw.fileio.ascii.write_array(f, patch, q)
    +

    Write a single array to output file f as ASCII text.

    +

    The variable q here may in fact refer to q or to aux.

    +
    + +
    +
    +

    pyclaw.fileio.binary

    +

    Routines for reading a raw binary output file from AMRClaw. +Note that there is no corresponding output option in PyClaw, +which is why there is no “write” function here (the code that +writes these files is in AMRClaw, in Fortran).

    +
    +
    +clawpack.pyclaw.fileio.binary.read(solution, frame, path='./', file_prefix='fort', read_aux=False, options={})
    +

    Read in a set of raw binary files

    +

    This routine reads the binary formatted files +fort.txxxx contains info about frame +fort.qxxxx still contains headers for each grid patch +fort.bxxxx is binary dump of data from all patches. +fort.axxxx is binary dump of aux arrays from all patches.

    +

    Note that the fort prefix can be changed.

    +
    +
    Input:
    +
      +
    • solution - (Solution) Solution object to +read the data into.

    • +
    • frame - (int) Frame number to be read in

    • +
    • path - (string) Path to the current directory of the file

    • +
    • file_prefix - (string) Prefix of the files to be read in. +default = 'fort'

    • +
    • read_aux (bool) Whether or not to read auxiliary data from fort.axxxx. +default = False

    • +
    • options - (dict) Dictionary of optional arguments dependent on +the format being read in. default = {}

    • +
    +
    +
    +
    + +
    +
    +

    pyclaw.fileio.hdf5

    +

    Routines for reading and writing a HDF5 output file

    +
    +
    This module reads and writes hdf5 files via either of the following modules:

    h5py - http://code.google.com/p/h5py/ +PyTables - http://www.pytables.org/moin

    +
    +
    +

    It will first try h5py and then PyTables and use the correct calls +according to whichever is present on the system. We recommend that you use +h5py as it is a minimal wrapper to the HDF5 library.

    +
    +
    To install either, you must also install the hdf5 library from the website:

    http://www.hdfgroup.org/HDF5/release/obtain5.html

    +
    +
    +
    +
    +clawpack.pyclaw.fileio.hdf5.read(solution, frame, path='./', file_prefix='claw', read_aux=True, options={})
    +

    Read in a HDF5 file into a Solution

    +
    +
    Input:
    +
      +
    • solution - (Solution) Pyclaw object to be +output

    • +
    • frame - (int) Frame number

    • +
    • path - (string) Root path

    • +
    • file_prefix - (string) Prefix for the file name. default = 'claw'

    • +
    • write_aux - (bool) Boolean controlling whether the associated +auxiliary array should be written out. default = False

    • +
    • options - (dict) Optional argument dictionary, not used for reading.

    • +
    +
    +
    +
    + +
    +
    +clawpack.pyclaw.fileio.hdf5.write(solution, frame, path, file_prefix='claw', write_aux=False, options={}, write_p=False)
    +

    Write out a Solution to a HDF5 file.

    +
    +
    Input:
    +
      +
    • solution - (Solution) Pyclaw solution +object to input into

    • +
    • frame - (int) Frame number

    • +
    • path - (string) Root path

    • +
    • file_prefix - (string) Prefix for the file name. default = 'claw'

    • +
    • write_aux - (bool) Boolean controlling whether the associated +auxiliary array should be written out. default = False

    • +
    • options - (dict) Optional argument dictionary, see +HDF5 Option Table

    • +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +

    Key

    Value

    compression

    (None, string [“gzip” | “lzf” | “szip”] or int 0-9) +Enable dataset compression. DEFLATE, LZF and (where +available) SZIP are supported. An integer is +interpreted as a GZIP level for backwards +compatibility.

    compression_opts

    (None, or special value) Setting for compression +filter; legal values for each filter type are:

    +
      +
    • gzip - (int) 0-9

    • +
    • lzf - None allowed

    • +
    • +
      szip - (tuple) 2-tuple (‘ec’|’nn’, even integer

      0-32)

      +
      +
      +
    • +
    +

    See the filters module for a detailed description of +each of these filters.

    +

    chunks

    (None, True or shape tuple) Store the dataset in +chunked format. Automatically selected if any of the +other keyword options are given. If you don’t provide +a shape tuple, the library will guess one for you.

    shuffle

    (True/False) Enable/disable data shuffling, which can +improve compression performance. Automatically +enabled when compression is used.

    fletcher32

    (True/False) Enable Fletcher32 error detection; may +be used with or without compression.

    +
    + +
    +
    +

    pyclaw.fileio.netcdf

    +

    Routines for reading and writing a NetCDF output file

    +
    +
    Routines for reading and writing a NetCDF output file via either
    +
    +
    +

    These interfaces are very similar so if a different module needs to be used, +it can more than likely be inserted with a minimal of effort.

    +

    This module will first try to import the netcdf4-python module which is based +on the compiled libraries and failing that will attempt to import the pure +python interface pupynere which requires no libraries.

    +
    +
    To install the netCDF 4 library, please see:

    http://www.unidata.ucar.edu/software/netcdf/

    +
    +
    +
    +
    Authors:
    +

    Kyle T. Mandli (2009-02-17) Initial version

    +
    +
    +
    +
    +clawpack.pyclaw.fileio.netcdf.read(solution, frame, path='./', file_prefix='claw', read_aux=True, options={})
    +

    Read in a NetCDF data files into solution

    +
    +
    Input:
    +
      +
    • solution - (Solution) Pyclaw object to be +output

    • +
    • frame - (int) Frame number

    • +
    • path - (string) Root path

    • +
    • file_prefix - (string) Prefix for the file name. default = 'claw'

    • +
    • write_aux - (bool) Boolean controlling whether the associated +auxiliary array should be written out. default = False

    • +
    • options - (dict) Optional argument dictionary, unused for reading.

    • +
    +
    +
    +
    + +
    +
    +clawpack.pyclaw.fileio.netcdf.write(solution, frame, path, file_prefix='claw', write_aux=False, options={}, write_p=False)
    +

    Write out a NetCDF data file representation of solution

    +
    +
    Input:
    +
      +
    • solution - (Solution) Pyclaw object to be +output

    • +
    • frame - (int) Frame number

    • +
    • path - (string) Root path

    • +
    • file_prefix - (string) Prefix for the file name. default = 'claw'

    • +
    • write_aux - (bool) Boolean controlling whether the associated +auxiliary array should be written out. default = False

    • +
    • options - (dict) Optional argument dictionary, see +NetCDF Option Table

    • +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Key

    Value

    description

    Dictionary of key/value pairs that will be +attached to the root group as attributes, +i.e. {‘time’:3}

    format

    Can be one of the following netCDF flavors: +NETCDF3_CLASSIC, NETCDF3_64BIT, +NETCDF4_CLASSIC, and NETCDF4 +default = NETCDF4

    clobber

    if True (Default), file will be overwritten, +if False an exception will be raised

    zlib

    if True, data assigned to the Variable +instance is compressed on disk. +default = False

    complevel

    the level of zlib compression to use (1 is +the fastest, but poorest compression, 9 is +the slowest but best compression). Ignored +if zlib=False. default = 6

    shuffle

    if True, the HDF5 shuffle filter is applied +to improve compression. Ignored if +zlib=False. default = True

    fletcher32

    if True (default False), the Fletcher32 +checksum algorithm is used for error +detection.

    contiguous

    if True (default False), the variable data +is stored contiguously on disk. Setting to +True for a variable with an unlimited +dimension will trigger an error. +default = False

    chunksizes

    Can be used to specify the HDF5 chunksizes +for each dimension of the variable. A +detailed discussion of HDF chunking and I/O +performance is available here. Basically, +you want the chunk size for each dimension +to match as closely as possible the size of +the data block that users will read from the +file. chunksizes cannot be set if +contiguous=True.

    least_significant_digit

    If specified, variable data will be +truncated (quantized). In conjunction with +zlib=True this produces ‘lossy’, but +significantly more efficient compression. +For example, if least_significant_digit=1, +data will be quantized using around +(scale*data)/scale, where scale = 2**bits, +and bits is determined so that a precision +of 0.1 is retained (in this case bits=4). +default = None, or no quantization.

    endian

    Can be used to control whether the data is +stored in little or big endian format on +disk. Possible values are little, big or +native (default). The library will +automatically handle endian conversions when +the data is read, but if the data is always +going to be read on a computer with the +opposite format as the one used to create +the file, there may be some performance +advantage to be gained by setting the +endian-ness.

    fill_value

    If specified, the default netCDF _FillValue +(the value that the variable gets filled +with before any data is written to it) is +replaced with this value. If fill_value is +set to False, then the variable is not +pre-filled.

    +
    +

    Note

    +

    The zlib, complevel, shuffle, fletcher32, contiguous, chunksizes and +endian keywords are silently ignored for netCDF 3 files that do not +use HDF5.

    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/output.html b/v5.10.x/pyclaw/output.html new file mode 100644 index 0000000000..065bdb3b6b --- /dev/null +++ b/v5.10.x/pyclaw/output.html @@ -0,0 +1,412 @@ + + + + + + + + + PyClaw output — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + + +
    +

    PyClaw output

    +

    In the documentation below, it is assumed that claw refers to a +pyclaw.controller.Controller object, as is customary in the example +scripts.

    +
    +

    Output frames

    +

    The result of a PyClaw simulation is a set of snapshots, or frames +of the solution. By default these are written to disk in a subdirectory +named _outdir. Writing of output files can be turned off by setting +claw.output_format = None.

    +

    If claw.keep_copy = True, then output frames are also saved in memory +in the list claw.frames. Each entry is a pyclaw.solution.Solution +object. Thus the initial condition is available from claw.frames[0].q +and the final solution is in claw.frames[-1].q. +This can be convenient for working with +smaller simulations without reading from and writing to disk.

    +
    +
    +

    When output is saved/written

    +

    PyClaw supports the same basic options as other Clawpack packages for +controlling output. These are selected by setting claw.output_style:

    +
    +
      +
    • claw.output_style = 1: Evenly spaced output, between the initial +and final simulation times. The number of outputs is the value of +claw.num_output_times.

    • +
    • claw.output_style = 2: Manual specification of output times. +Output will be written at the times specified in +claw.output_times, which should be a list.

    • +
    • Write output after a certain number of steps have been taken; +the number is specified in claw.nstepout. For instance, +if claw.nstepout = 3, then output is written after every 3 +steps. This is most often useful for debugging.

    • +
    +
    +
    +
    +

    Where and how output is written

    +

    The following options control the kind and location of output +files:

    +
    +
      +
    • claw.output_format: A string specifying the format in which output data +is written. The default is ascii. Other valid options are binary, +hdf5, and petsc. These formats can be useful for obtaining +smaller output files or for loading output data into other software. +Finally, this can be set to None to avoid writing any output to disk.

    • +
    • claw.outdir: Subdirectory in which to place output files. Defaults +to _output.

    • +
    • claw.output_file_prefix: Allows manual specification of the prefix +for output files.

    • +
    • claw.overwrite: if True, allow existing files in the output +directory to be overwritten by the current run.

    • +
    +
    +
    +
    +

    What output is written

    +

    PyClaw supports options to output more +than just the solution \(q\). It can provide:

    +
    +
      +
    • Snapshots of the values in the aux array at the initial time +and/or output times. This is turned on by setting +claw.write_aux_int = True or claw.write_aux_always = True.

    • +
    • Output of derived quantities computed from \(q\); for instance, +pressure (not a conserved quantity) could be computed from density +and energy.

    • +
    • Output of scalar functionals, such as the total mass summed over the whole grid.

    • +
    • Output of gauge values, which are time traces of the solution at a +single point.

    • +
    +
    +

    Derived quantities and functionals are written out at the same times that the solution +\(q\) is written. While these could be computed in postprocessing, it is more efficient +to compute them at run-time for large parallel runs.

    +

    Gauge output is written at every timestep. In order to get this data without a +gauge, one would otherwise have to write the full solution out at every +timestep, which might be very slow.

    +
    +
    +

    Outputting derived quantities

    +

    It is sometimes desirable to output quantities other than those +in the vector q. To do so, just add a function p_function to +the controller that accepts the state and sets the derived quantities +in state.p

    +
    >>> def stress(state):
    +...    state.p[0,:,:] = np.exp(state.q[0,:,:]*state.aux[1,:,:]) - 1.
    +
    +>>> state.mp = 1
    +>>> claw.p_function = stress
    +
    +
    +

    For a working example, see the PyClaw P-system example.

    +
    +
    +

    Outputting functionals

    +

    In PyClaw a functional is a scalar quantity computed from \(q\) that is written +to file at each output time. For now, only functionals of the form

    +
    +\[\begin{equation} + F(q) = \int |f(q)| dx dy +\end{equation}\]
    +

    are supported. In other words, the functional must be the absolute +integral of some function of \(q\). To enable writing functionals, simply +set state.mF to the number of functionals:

    +
    >>> state.mf = 1
    +
    +
    +

    and point the controller to a function that computes \(f(q)\) elementwise +and stores it in the array +state.F. For instance, if your first two conserved quantities are density +and momentum, you might write:

    +
    >>> def energy(state):
    +...    state.F[0,:,:] = 0.5 * state.q[0,:,:]*state.q[1,:,:]
    +>>> claw.compute_F = energy
    +>>> claw.F_file_name = 'total_energy'
    +
    +
    +

    The total energy (summed over the grid) would then be written to +_output/total_energy.txt. The output file has two columns; the +first is time and the second is the functional value. Output is +written at the same times that q is written to file.

    +

    For a working example, see the PyClaw P-system example.

    +
    +
    +

    Using gauges

    +

    A gauge in PyClaw is a single grid location for which output is written at +every time step. This can be very useful in some applications, like comparing +with data from tidal gauges (from whence the name is derived) in tsunami modeling. +The gauges are managed by the grid object, and a grid at location \((x,y)\) +may be added simply by calling grid.add_gauges((x,y)). Multiple gauges +can be set at once by providing a list of coordinate tuples

    +
    >>> state.grid.add_gauges([(x1,y1),(x2,y2),(x3,y3)])
    +
    +
    +

    By default, the solution values are written out at each gauge location. +To write some other quantity, simply provide a function +\(f(q,aux)\) and point the solver to it

    +
    >>> def f(q,aux):
    +...    return q[1,:,:]/q[0,:,:]
    +
    +>>> solver.compute_gauge_values = f
    +
    +
    +

    For a working example, see the PyClaw P-system example.

    +
    +
    +
    +

    Logging

    +

    By default, PyClaw prints a message to the screen each time it writes +an output file. This message is also writing to the file pyclaw.log +in the working directory. There are additional warning or error messages +that may be sent to the screen or to file. You can adjust the logger levels +in order to turn these messages off or to get more detailed debugging +information.

    +

    The controller provides one means to managing the logging with the +verbosity parameter and is provided as an easy +interace to control the console output (that which is shown on screen). Valid +values for verbosity are:

    + + + + + + + + + + + + + + + + + + + + + +

    Verbosity

    Message Level

    0

    Critical - This effectively silences the logger, since there are +no logging messages in PyClaw that correspond to this level. May +be useful in an IPython notebook for instance if you want the +plots to appear immediately below your code.

    1

    Error - These are logged by the IO system to indicate that +something has gone wrong with either reading or writing a file.

    2

    Warning - There are no warning level logger messages.

    3

    Info - Additional IO messages are printed and some minor messages +dealing with hitting the end time requested.

    4

    Debug - If this level is set all logger output is displayed. This +includes the above and detailed time step information for every +time step (includes CFL, current dt and whether a time step is +rejected).

    +

    When running on a supercomputer, logging to file can be problematic because +the associated I/O can slow down the entire computation (this is true on +Shaheen). To turn off all logging (both to screen and to file), you need to +change the level of the root logger:

    +
    import logging
    +logger = logging.getLogger('pyclaw')
    +logger.setLevel(logging.CRITICAL)
    +
    +
    +

    Again since we don’t use CRITICAL logger messages in PyClaw, this has the +effect of turning the loggers off.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/parallel.html b/v5.10.x/pyclaw/parallel.html new file mode 100644 index 0000000000..403558a354 --- /dev/null +++ b/v5.10.x/pyclaw/parallel.html @@ -0,0 +1,372 @@ + + + + + + + + + Running in parallel — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Running in parallel

    +

    PyClaw can be run in parallel on your desktop or on large supercomputers using the +PETSc library. +Running your PyClaw script in parallel is usually very easy; it mainly consists of +replacing:

    +
    from clawpack import pyclaw
    +
    +
    +

    with:

    +
    import clawpack.petclaw as pyclaw
    +
    +
    +

    Also, most of the provided scripts in pyclaw/examples are set up to run in parallel +simply by passing the command-line option use_petsc=True (of course, you will need +to launch them with mpirun.

    +
    +

    Installing PETSc

    +

    First make sure you have a working install of PyClaw. +For PyClaw installation instructions, see installation.

    +

    To run in parallel you’ll need:

    +
    +
      +
    • PETSc a toolkit for +parallel scientific computing. The current recommended version is 3.3 with latest patch.

    • +
    • petsc4py: Python bindings for PETSc. +The current recommended version is 3.3.

    • +
    +
    +

    Obtaining PETSc:

    +

    PETSc 3.3 can be obtained using three approaches. Here we use Mercurial to get it. Look at http://www.mcs.anl.gov/petsc/petsc-as/download/index.html for more information.

    +

    Do:

    +
    $ cd path/to/the/dir/where/you/want/download/Petsc-3.3
    +$ hg clone https://bitbucket.org/petsc/petsc-3.3 petsc-3.3
    +$ hg clone https://bitbucket.org/petsc/buildsystem-3.3 petsc-3.3/config/BuildSystem
    +
    +
    +

    For sh, bash, or zsh shells add the following lines to your shell start-up file:

    +
    $ export PETSC_DIR=path/to/the/dir/where/you/downloaded/Petsc-3.3/petsc-3.3
    +$ export PETSC_ARCH=your/architecture
    +
    +
    +

    whereas for csh/tcsh shells add the following lines to your shell start-up file:

    +
    $ setenv PETSC_DIR path/to/the/dir/where/you/downloaded/Petsc-3.3/petsc-3.3
    +$ setenv PETSC_ARCH your/architecture
    +
    +
    +

    For more information about PETSC_DIR and PETSC_ARCH, i.e. the variables that +control the configuration and build process of PETSc, please look at +http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html.

    +

    Then, if you want PETSc-3.3 configure for 32-bit use the following command:

    +
    $ ./config/configure.py --with-cc=gcc --with-cxx=g++ --with-python=1 --download-mpich=1 --with-shared-libraries=1
    +
    +
    +

    whereas, if you want PETSc-3.3 64-bit do:

    +
    $ ./config/configure.py --with-cc=gcc --with-cxx=g++ --with-python=1 --download-mpich=1 --with-shared-libraries=1 --with-64-bit-indices=1
    +
    +
    +

    Note that one of the option is –download-mpich=1. This means that mpich is downloaded. If you do not need/want mpich, remove this option. Note that you need MPI when using PETSc. Therefore, if the option –download-mpich=1 is removed you should have MPI installed on your system or in your user account.

    +

    Once the configuration phase is completed, build PETSc libraries with

    +
    $ make PETSC_DIR=path/to/the/dir/where/you/have/Petsc-3.3/petsc-3.3 PETSC_ARCH=your/architecture all
    +
    +
    +

    Check if the libraries are working by running

    +
    $ make PETSC_DIR=path/to/the/dir/where/you/have/Petsc-3.3/petsc-3.3 PETSC_ARCH=your/architecture test
    +
    +
    +

    Obtaining petsc4py:

    +

    petsc4py is a python binding for PETSc. We recommend installing petsc4py 3.3 because it is compatible with PETSc 3.3 and 3.2. To install this binding correctly make sure that the PETSC_DIR and PETSC_ARCH are part of your shell start-up file.

    +

    Obtain petsc4py-3.3 with mercurial:

    +
    $ cd path/to/the/dir/where/you/want/download/petsc4py
    +$ hg clone https://petsc4py.googlecode.com/hg/petsc4py-3.3 -r 3.3
    +
    +
    +

    The prefered method for the petsc4py iinstallation is pip

    +
    $ cd petsc4py-3.3
    +$ pip install . --user
    +
    +
    +

    Indeed, pip removes the old petsc4py installation, downloads the new version of +cython (if needed) and installs petsc4py.

    +

    To check petsc4py-3.3 installation do:

    +
    $ cd petsc4py-3.3/test
    +$ python runtests.py
    +
    +
    +

    All the tests cases should pass, i.e. OK should be printed at the screen.

    +

    NOTE: To run a python code that uses petsc4py in parallel you will need to use mpiexec or mpirun commands. It is important to remember to use the mpiexec or mpirun executables that come with the MPI installation that was used for configuring PETSc installation. If you have used the option –download-mpich=1 while installing PETSc, then the correct mpiexec to use is the one in ${PETSC_DIR}/${PETSC_ARCH}/bin. You can set this mpiexec to be your default by adding this line to your sh, bash, or zsh shell start-up file:

    +
    $ export PATH="${PETSC_DIR}/${PETSC_ARCH}/bin:${PATH}"
    +
    +
    +

    or this line in case you are using csh or tcsh shells:

    +
    $ setenv PATH "${PETSC_DIR}/${PETSC_ARCH}/bin:${PATH}"
    +
    +
    +

    You can test that you are using the right mpiexec by running a demonstration script that can be found in $PYCLAW/demo as follows:

    +
    $ cd $PYCLAW
    +$ mpiexec -n 4 python demo/petsc_hello_world.py
    +
    +
    +

    and you should get an output that looks like follows:

    +
    Hello World! From process 3 out of 4 process(es).
    +Hello World! From process 1 out of 4 process(es).
    +Hello World! From process 0 out of 4 process(es).
    +Hello World! From process 2 out of 4 process(es).
    +
    +
    +

    NOTE: An alternative way to install petsc4py is simply using the python +script setup.py inside petsc4py, i.e.

    +
    $ cd petsc4py-dev
    +$ python setup.py build
    +$ python setup.py install --user
    +
    +
    +
    +
    +

    Testing your installation

    +

    If you don’t have it already, install nose

    +
    $ easy_install nose
    +
    +
    +

    Now simply execute

    +
    $ cd $PYCLAW
    +$ nosetests
    +
    +
    +

    If everything is set up correctly, this will run all the regression tests +(which include pure python code and python/Fortran code) and inform you that +the tests passed. If any fail, please post the output and details of your +platform on the claw-users Google group.

    +
    +
    +

    Running and plotting an example

    +

    Next

    +
    $ cd $PYCLAW/examples/advection/1d/constant
    +$ python advection.py use_PETSc=True iplot=1
    +
    +
    +

    This will run the code and then place you in an interactive plotting shell. +To view the simulation output frames in sequence, simply press ‘enter’ +repeatedly. To exit the shell, type ‘q’. For help, type ‘?’ or see +this Clawpack interactive python plotting help page.

    +
    +
    +

    Tips for making your application run correctly in parallel

    +

    Generally serial PyClaw code should “just work” in parallel, but if you are not +reasonably careful it is certainly possible to write serial code that will fail +in parallel.

    +

    Most importantly, use the appropriate grid attributes. In serial, both grid.n and +grid.ng give you the dimensions of the grid (i.e., the number of cells in +each dimension). In parallel, grid.n contains the size +of the whole grid, while grid.ng contains just the size of the part that a given +process deals with. You should typically use only grid.ng (you can also use q.shape[1:], +which is equal to grid.ng).

    +

    Similarly, grid.lower contains the lower bounds of the problem domain in the +computational coordinates, whereas grid.lowerg contains the lower bounds of the +part of the grid belonging to the current process. Typically you should use +grid.lowerg.

    +

    Additionally, be aware that when a Grid object is instantiated in a parallel run, +it is not instantiated as a parallel object. A typical code excerpt looks like

    +
    >>> import clawpack.petclaw as pyclaw 
    +>>> from clawpack import pyclaw
    +>>> mx = 320; my = 80
    +>>> x = pyclaw.Dimension('x',0.0,2.0,mx)
    +>>> y = pyclaw.Dimension('y',0.0,0.5,my)
    +>>> grid = pyclaw.Domain([x,y])
    +
    +
    +

    At this point, grid.ng is identically equal to grid.n, rather than containing +the size of the grid partition on the current process. Before using it, you +should instantiate a State object

    +
    >>> num_eqn = 5
    +>>> num_aux=1
    +>>> state = pyclaw.State(grid,num_eqn,num_aux)
    +
    +
    +

    Now state.grid.ng contains appropriate information.

    +
    +
    +

    Passing options to PETSc

    +

    The built-in applications (see Working with PyClaw’s built-in examples) are set up to automatically pass +command-line options starting with a dash (“-”) to PETSc.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/plotting.html b/v5.10.x/pyclaw/plotting.html new file mode 100644 index 0000000000..b1296fdc52 --- /dev/null +++ b/v5.10.x/pyclaw/plotting.html @@ -0,0 +1,229 @@ + + + + + + + + + Plotting PyClaw results — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Plotting PyClaw results

    +

    PyClaw relies on the +VisClaw package for easy plotting, although +it is of course possible to load the output into other visualization packages. +VisClaw supports 1D and 2D plotting; for 3D plotting, we recommend using the +old Clawpack MATLAB routines +for now.

    +

    This page gives some very basic information; for more detail, see Plotting with Visclaw +in VisClaw’s documentation.

    +
    +

    Basics

    +

    VisClaw includes routines for creating HTML and LaTex plot pages or plotting interactively. +These require a setplot.py file that defines the plotting parameters; +see Plotting options in Python. +for more information. Once you have an appropriate setplot.py file, +there are some convenience functions in $PYCLAW/src/petclaw/plot.py +for generating these plots. Assuming you have output files in ./_output +(which is the default), you can generate HTML pages with plots from Python via

    +
    >>> from clawpack.pyclaw import plot
    +>>> plot.html_plot() 
    +
    +
    +

    This will generate HTML pages with plots and print out a message with the +location of the HTML file. To launch an interactive plotting session +from within Python, do

    +
    >>> from clawpack.pyclaw import plot
    +>>> plot.interactive_plot() 
    +
    +
    +

    To see a list of commands available in the resulting interactive environment, +type “?” or see Interactive plotting with Iplotclaw.

    +
    +
    +

    Plotting result from parallel runs

    +

    By default, when running in parallel, PyClaw outputs data in a binary format. +In order to plot from such files, just replace pyclaw with petclaw in the +commands above; e.g.

    +
    >>> from clawpack.petclaw import plot
    +>>> plot.interactive_plot() 
    +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/problem.html b/v5.10.x/pyclaw/problem.html new file mode 100644 index 0000000000..926ead5efe --- /dev/null +++ b/v5.10.x/pyclaw/problem.html @@ -0,0 +1,359 @@ + + + + + + + + + Setting up your own problem — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Setting up your own problem

    +

    The best way to set up a new problem is to find an existing problem setup that +is similar. The main steps are:

    +
    +
      +
    • Write the initialization script

    • +
    • Write routines for source terms, custom boundary conditions, or other customizations

    • +
    • Write a Riemann solver (if solving a new system of equations)

    • +
    • Write a Makefile if using any custom Fortran code

    • +
    • Write a setplot.py file for visualization

    • +
    +
    +

    If needed for your problem, custom Riemann solvers, boundary condition routines, +source term routines, and other functions can all be written in Python but you may +prefer to write some of them in Fortran for performance reasons. +The latter approach requires direct use of +f2py. See Porting a problem from Clawpack 4.6.x to PyClaw for +more details.

    +
    +

    Writing the initialization script

    +

    This script should:

    +
    +
      +
    • Import the appropriate package (pyclaw or petclaw)

    • +
    • Instantiate a Solver and specify the Riemann solver to use

    • +
    • Set the boundary conditions

    • +
    • Define the domain through a Domain object

    • +
    • Define a Solution object

    • +
    • Set the initial condition

    • +
    +
    +

    Usually the script then instantiates a Controller, sets the +initial solution and solver, and calls run().

    +
    +

    Setting initial conditions

    +

    Once you have initialized a Solution object, it contains a member state.q +whose first dimension is num_eqn and whose remaining dimensions are those +of the grid. Now you must set the initial condition. For instance

    +
    >>> import numpy as np
    +>>> Y,X = np.meshgrid(state.grid.y.centers,state.grid.x.centers)
    +>>> r = np.sqrt(X**2 + Y**2)
    +>>> width = 0.2
    +>>> state.q[0,:,:] = (np.abs(r-0.5)<=width)*(1.+np.cos(np.pi*(r-0.5)/width))
    +>>> state.q[1,:,:] = 0.
    +>>> state.q[2,:,:] = 0.
    +
    +
    +

    Note that in a parallel run we only wish to set the local values of the state +so the appropriate geometry object to use here is the +Grid class.

    +
    +
    +

    Setting auxiliary variables

    +

    If the problem involves coefficients that vary in space or a mapped grid, +the required fields are stored in state.aux. In order to use such fields, +you must pass the num_aux argument to the State initialization

    +
    >>> state = pyclaw.State(domain,solver.num_eqn,num_aux)
    +
    +
    +

    The number of fields in state.aux (i.e., the length of its first dimension) +is set equal to num_aux. The values of state.aux are set in the same way +as those of state.q.

    +
    +
    +

    Setting boundary conditions

    +

    The boundary conditions are specified through solver.bc_lower and +solver.bc_upper, each of which is a list of length solver.num_dim. The +ordering of the boundary conditions in each list is the same as the ordering of +the Dimensions in the Grid; typically \((x,y)\). Thus +solver.bc_lower[0] specifies the boundary condition at the left boundary +and solver.bc_upper[0] specifies the condition at the right boundary. +Similarly, solver.bc_lower[1] and solver.bc_upper[1] specify the +boundary conditions at the top and bottom of the domain.

    +

    PyClaw includes the following built-in boundary condition implementations:

    +
    +
      +
    • pyclaw.BC.periodic - periodic

    • +
    • pyclaw.BC.extrap - zero-order extrapolation

    • +
    • pyclaw.BC.wall - solid wall conditions, assuming that the 2nd/3rd +component of q is the normal velocity in x/y.

    • +
    +
    +

    Other boundary conditions can be implemented by using pyclaw.BC.custom, and +providing a custom BC function. The attribute solver.user_bc_lower/upper must +be set to the corresponding function handle. For instance

    +
    >>> def custom_bc(state,dim,t,qbc,num_ghost):
    +...    for i in xrange(num_ghost):
    +...       qbc[0,i,:] = q0
    +
    +>>> solver.bc_lower[0] = pyclaw.BC.custom
    +>>> solver.user_bc_lower = custom_bc
    +
    +
    +

    If the state.aux array is used, boundary conditions must be set for it +in a similar way, using solver.aux_bc_lower and solver.aux_bc_upper. +Note that although state is passed to the BC routines, they should +NEVER modify state. Rather, they should modify qbc/auxbc.

    +
    +
    +

    Setting solver options

    +
    +
    +
    +

    Using your own Riemann solver

    +

    The Riemann package has solvers for many hyperbolic systems. If your problem +involves a new system, you will need to write your own Riemann solver. +A nice example of how to compile and import your own Riemann solver can be seen +`here https://github.com/damiansra/empyclaw/tree/master/maxwell_1d_homogeneous`_. +You will need to:

    +
    +
      +
    • Put the Riemann solver in the same directory as your Python script

    • +
    • Write a short makefile calling f2py

    • +
    • import the Riemann solver module in your Python script

    • +
    +
    +

    Here are some tips if you are converting an old Clawpack 4.5 or earlier Riemann solver:

    +
    +
      +
    • Rename the file from .f to .f90 and switch to free-format Fortran

    • +
    • Move the spatial index (i) to the last place in all array indexing

    • +
    +
    +

    Please do contribute your solver to the package by sending a pull request on Github +or e-mailing one of the developers. To add your Riemann solver to the Clawpack +Riemann package, you will need to:

    +
    +
      +
    • Place the .f90 file(s) in clawpack/riemann/src.

    • +
    • Add the solver to the list in clawpack/riemann/setup.py

    • +
    • Add the solver to the list in clawpack/riemann/src/python/riemann/setup.py

    • +
    • Add the solver to the list in clawpack/riemann/src/python/riemann/Makefile

    • +
    • Add the solver to the list in clawpack/riemann/src/python/riemann/__init__.py

    • +
    +
    +

    For very simple problems in one dimension, it may be worthwhile to write the +Riemann solver in Python, especially if you are more comfortable with Python +than with Fortran. For two-dimensional problems, or one-dimensional problems +requiring fine grids (or if you are impatient) the solver should be written +in Fortran. The best approach is generally to find a similar solver in the +Riemann package and modify it to solve your system.

    +
    +
    +

    Adding source terms

    +

    Non-hyperbolic terms (representing, e.g., reaction or diffusion) can be included +in a PyClaw simulation by providing an appropriate function handle to

    +
    +
      +
    • solver.step_source if using Classic Clawpack. In this case, the function +specified should modify q by taking a step on the equation \(q_t = \psi(q)\).

    • +
    • solver.dq_src if using SharpClaw. In this case, the function should +return \(\Delta t \cdot \psi(q)\).

    • +
    +
    +

    For an example, see pyclaw/examples/euler_2d/shockbubble.py.

    +
    +
    +

    Setting up the Makefile

    +

    Generally you can just copy the Makefile from an example in pyclaw/examples and +replace the value of RP_SOURCES. Make sure the example you choose has the +same dimensionality. Also be sure to use the f-wave targets if your Riemann +solver is an f-wave solver.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/rp.html b/v5.10.x/pyclaw/rp.html new file mode 100644 index 0000000000..4c7a624dce --- /dev/null +++ b/v5.10.x/pyclaw/rp.html @@ -0,0 +1,612 @@ + + + + + + + + + Riemann Solver Package — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Riemann Solver Package

    +

    This package contains all of the Python-based Riemann solvers. Each +module solves the Riemann solver for a particular system of hyperbolic +equations. The solvers all have a common function signature:

    +
    rp_<name>_<dim>d(q_l,q_r,aux_l,aux_r,problem_data)
    +
    +
    +

    with <name> replaced with the appropriate solver name and <dim> with +the appropriate dimension.

    +
    +
    Input:
    +
      +
    • q_l - (ndarray(…,num_eqn)) Contains the left states of the Riemann problem

    • +
    • q_r - (ndarray(…,num_eqn)) Contains the right states of the Riemann problem

    • +
    • aux_l - (ndarray(…,num_aux)) Contains the left values of the auxiliary array

    • +
    • aux_r - (ndarray(…,num_aux)) Contains the right values oft he auxiliary array

    • +
    • +
      problem_data - (dict) Dictionary containing miscellaneous data which is

      usually problem dependent.

      +
      +
      +
    • +
    +
    +
    Output:
    +
      +
    • +
      wave - (ndarray(…,num_eqn,num_waves)) Contains the resulting waves from the cell

      edge

      +
      +
      +
    • +
    • s - (ndarray(…,num_waves)) Speeds of each wave

    • +
    • amdq - (ndarray(…,num_eqn)) Left going fluctuation

    • +
    • apdq - (ndarray(…,num_eqn)) Right going fluctuation

    • +
    +
    +
    +

    Except for problem_data, all of the input and output values are arrays whose +elements represent grid values with locations indicated by the following scheme

    +
    Indexing works like this:  here num_ghost=2 as an example
    + 0     1     2     3     4     mx+num_ghost-2     mx+num_ghost      mx+num_ghost+2
    +             |                        mx+num_ghost-1 |  mx+num_ghost+1
    + |     |     |     |     |   ...   |     |     |     |     |
    +    0     1  |  2     3            mx+num_ghost-2    |mx+num_ghost
    +                                          mx+num_ghost-1   mx+num_ghost+1
    +
    +The top indices represent the values that are located on the grid
    +cell boundaries such as waves, s and other Riemann problem values,
    +the bottom for the cell centered values.  In particular the ith grid cell
    +boundary has the following related information:
    +                  i-1         i         i+1
    +                   |          |          |
    +                   |   i-1    |     i    |
    +                   |          |          |
    +Again, grid cell boundary quantities are at the top, cell centered
    +values are in the cell.
    +
    +
    +
    +

    Note

    +

    The values q_l[i], q_r[i] are the left and right states, respectively, of +the ith Riemann problem. This convention is different than that used in +the Fortran Riemann solvers, where q_l[i], q_r[i] are the values at the +left and right edges of a cell.

    +
    +

    All of the return values (waves, speeds, and fluctuations) are indexed by cell edge +(Riemann problem being solved), with s[i] referring to the wave speed at interface +$i-1/2$. This follows the same convention used in the Fortran solvers.

    +

    See [LeVeque_book_2002] for more details.

    +

    List of available Riemann solvers:

    +
    +
    +
    +

    Acoustics

    +

    Riemann solvers for constant coefficient acoustics.

    +
    +\[q_t + A q_x = 0\]
    +

    where

    +
    +\[\begin{split}q(x,t) = \left [ \begin{array}{c} p(x,t) \\ u(x,t) \end{array} \right ]\end{split}\]
    +

    and the coefficient matrix is

    +
    +\[\begin{split}A = \left [\begin{matrix} +0 & K\\ +1/\rho & 0 +\end{matrix} \right ]\end{split}\]
    +

    The parameters \(\rho =\) density and \(K =\) bulk modulus are used +to calculate the impedence \(= Z\) and speed of sound = c.

    +
    +
    Authors:
    +

    Kyle T. Mandli (2009-02-03): Initial version

    +
    +
    +
    +
    +clawpack.riemann.acoustics_1D_py.acoustics_1D(q_l, q_r, aux_l, aux_r, problem_data)
    +

    Basic 1d acoustics riemann solver, with interleaved arrays

    +
    +
    problem_data is expected to contain -
      +
    • zz - (float) Impedence

    • +
    • cc - (float) Speed of sound

    • +
    +
    +
    +

    See Riemann Solver Package for more details.

    +
    +
    Version:
    +

    1.0 (2009-02-03)

    +
    +
    +
    + +
    +
    +

    Advection

    +

    Simple advection Riemann solvers

    +

    Basic advection Riemann solvers of the form (1d)

    +
    +\[q_t + A q_x = 0.\]
    +
    +
    Authors:
    +

    Kyle T. Mandli (2008-2-20): Initial version

    +
    +
    +
    +
    +clawpack.riemann.advection_1D_py.advection_1D(q_l, q_r, aux_l, aux_r, problem_data)
    +

    Basic 1d advection riemann solver

    +
    +
    problem_data should contain -
      +
    • u - (float) Determines advection speed

    • +
    +
    +
    +

    See Riemann Solver Package for more details.

    +
    +
    Version:
    +

    1.0 (2008-2-20)

    +
    +
    +
    + +
    +
    +

    Burgers Equation

    +

    Riemann solvers for Burgers equation

    +
    +\[u_t + \left ( \frac{1}{2} u^2 \right)_x = 0\]
    +
    +
    Authors:
    +

    Kyle T. Mandli (2009-2-4): Initial version

    +
    +
    +
    +
    +clawpack.riemann.burgers_1D_py.burgers_1D(q_l, q_r, aux_l, aux_r, problem_data)
    +

    Riemann solver for Burgers equation in 1d

    +
    +
    problem_data should contain -
      +
    • efix - (bool) Whether a entropy fix should be used, if not present, +false is assumed

    • +
    +
    +
    +

    See Riemann Solver Package for more details.

    +
    +
    Version:
    +

    1.0 (2009-2-4)

    +
    +
    +
    + +
    +
    +

    Euler Equations

    +

    Riemann solvers for the Euler equations

    +

    This module contains Riemann solvers for the Euler equations which have the +form (in 1d):

    +
    +\[q_t + f(q)_x = 0\]
    +

    where

    +
    +\[\begin{split}q(x,t) = \left [ \begin{array}{c} \rho \\ \rho u \\ E \end{array} \right ],\end{split}\]
    +

    the flux function is

    +
    +\[\begin{split}f(q) = \left [ \begin{array}{c} \rho u \\ \rho u^2 + p \\ u(E+p) \end{array}\right ].\end{split}\]
    +

    and \(\rho\) is the density, \(u\) the velocity, \(E\) is the +energy and \(p\) is the pressure.

    +

    Unless otherwise noted, the ideal gas equation of state is used:

    +
    +\[p = (\gamma - 1) \left (E - \frac{1}{2}\rho u^2 \right)\]
    +
    +
    +clawpack.riemann.euler_1D_py.euler_exact_1D(q_l, q_r, aux_l, aux_r, problem_data)
    +

    Exact euler Riemann solver

    +
    +

    Warning

    +

    This solver has not been implemented.

    +
    +
    + +
    +
    +clawpack.riemann.euler_1D_py.euler_hll_1D(q_l, q_r, aux_l, aux_r, problem_data)
    +

    HLL euler solver

    +
    W_1 = Q_hat - Q_l    s_1 = min(u_l-c_l,u_l+c_l,lambda_roe_1,lambda_roe_2)
    +W_2 = Q_r - Q_hat    s_2 = max(u_r-c_r,u_r+c_r,lambda_roe_1,lambda_roe_2)
    +
    +Q_hat = ( f(q_r) - f(q_l) - s_2 * q_r + s_1 * q_l ) / (s_1 - s_2)
    +
    +
    +
    +
    problem_data should contain:
      +
    • gamma - (float) Ratio of the heat capacities

    • +
    • gamma1 - (float) \(1 - \gamma\)

    • +
    +
    +
    +
    +
    Version:
    +

    1.0 (2014-03-04)

    +
    +
    +
    + +
    +
    +clawpack.riemann.euler_1D_py.euler_hllc_1D(q_l, q_r, aux_l, aux_r, problem_data)
    +

    HLLC Euler solver

    +
    W_1 = q_hat_l - q_l      s_1 = min(u_l-c_l,u_l+c_l,lambda_roe_1,lambda_roe_2)
    +W_2 = q_hat_r - q_hat_l  s_2 = s_m
    +W_3 = q_r - q_hat_r      s_3 = max(u_r-c_r,u_r+c_r,lambda_roe_1,lambda_roe_2)
    +s_m = (p_r - p_l + rho_l*u_l*(s_l - u_l) - rho_r*u_r*(s_r - u_r))\
    +  / (rho_l*(s_l-u_l) - rho_r*(s_r - u_r))
    +
    +
    +

    left middle state:

    +
    q_hat_l[0,:] = rho_l*(s_l - u_l)/(s_l - s_m)
    +q_hat_l[1,:] = rho_l*(s_l - u_l)/(s_l - s_m)*s_m
    +q_hat_l[2,:] = rho_l*(s_l - u_l)/(s_l - s_m)\
    +        *(E_l/rho_l + (s_m - u_l)*(s_m + p_l/(rho_l*(s_l - u_l))))
    +
    +
    +

    right middle state:

    +
    q_hat_r[0,:] = rho_r*(s_r - u_r)/(s_r - s_m)
    +q_hat_r[1,:] = rho_r*(s_r - u_r)/(s_r - s_m)*s_m
    +q_hat_r[2,:] = rho_r*(s_r - u_r)/(s_r - s_m)\
    +        *(E_r/rho_r + (s_m - u_r)*(s_m + p_r/(rho_r*(s_r - u_r))))
    +
    +
    +

    problem_data should contain:

    +
    +
      +
    • gamma: (float) Ratio of specific heat capacities

    • +
    • gamma1: (float) \(\gamma - 1\)

    • +
    +
    +

    :Version 1.0 (2015-11-18)

    +
    + +
    +
    +clawpack.riemann.euler_1D_py.euler_roe_1D(q_l, q_r, aux_l, aux_r, problem_data)
    +

    Roe Euler solver in 1d

    +
    +
    aug_global should contain -
      +
    • gamma - (float) Ratio of the heat capacities

    • +
    • gamma1 - (float) \(1 - \gamma\)

    • +
    • efix - (bool) Whether to use an entropy fix or not

    • +
    +
    +
    +

    See Riemann Solver Package for more details.

    +
    +
    Version:
    +

    1.0 (2009-6-26)

    +
    +
    +
    + +
    +
    +

    Shallow Water Equations

    +

    Riemann solvers for the shallow water equations.

    +
    +
    The available solvers are:
      +
    • Roe - Use Roe averages to caluclate the solution to the Riemann problem

    • +
    • HLL - Use a HLL solver

    • +
    • +
      Exact - Use a newton iteration to calculate the exact solution to the

      Riemann problem

      +
      +
      +
    • +
    +
    +
    +
    +\[q_t + f(q)_x = 0\]
    +

    where

    +
    +\[\begin{split}q(x,t) = \left [ \begin{array}{c} h \\ h u \end{array} \right ],\end{split}\]
    +

    the flux function is

    +
    +\[\begin{split}f(q) = \left [ \begin{array}{c} h u \\ hu^2 + 1/2 g h^2 \end{array}\right ].\end{split}\]
    +

    and \(h\) is the water column height, \(u\) the velocity and \(g\) +is the gravitational acceleration.

    +
    +
    +clawpack.riemann.shallow_1D_py.shallow_exact_1D(q_l, q_r, aux_l, aux_r, problem_data)
    +

    Exact shallow water Riemann solver

    +
    +

    Warning

    +

    This solver has not been implemented.

    +
    +
    + +
    +
    +clawpack.riemann.shallow_1D_py.shallow_fwave_1d(q_l, q_r, aux_l, aux_r, problem_data)
    +

    Shallow water Riemann solver using fwaves

    +

    Also includes support for bathymetry but be wary if you think you might have +dry states as this has not been tested.

    +
    +
    problem_data should contain:
      +
    • grav - (float) Gravitational constant

    • +
    • dry_tolerance - (float) Set velocities to zero if h is below this +tolerance.

    • +
    • sea_level - (float) Datum from which the dry-state is calculated.

    • +
    +
    +
    +
    +
    Version:
    +

    1.0 (2014-09-05)

    +
    +
    Version:
    +

    2.0 (2017-03-07)

    +
    +
    +
    + +
    +
    +clawpack.riemann.shallow_1D_py.shallow_hll_1D(q_l, q_r, aux_l, aux_r, problem_data)
    +

    HLL shallow water solver

    +
    W_1 = Q_hat - Q_l    s_1 = min(u_l-c_l,u_l+c_l,lambda_roe_1,lambda_roe_2)
    +W_2 = Q_r - Q_hat    s_2 = max(u_r-c_r,u_r+c_r,lambda_roe_1,lambda_roe_2)
    +
    +Q_hat = ( f(q_r) - f(q_l) - s_2 * q_r + s_1 * q_l ) / (s_1 - s_2)
    +
    +
    +
    +
    problem_data should contain:
      +
    • g - (float) Gravitational constant

    • +
    +
    +
    +
    +
    Version:
    +

    1.0 (2009-02-05)

    +
    +
    +
    + +
    +
    +clawpack.riemann.shallow_1D_py.shallow_roe_1D(q_l, q_r, aux_l, aux_r, problem_data)
    +

    Roe shallow water solver in 1d:

    +
    ubar = (sqrt(u_l) + sqrt(u_r)) / (sqrt(h_l) + sqrt(h_r))
    +cbar = sqrt( 0.5 * g * (h_l + h_r))
    +
    +W_1 = |      1      |  s_1 = ubar - cbar
    +      | ubar - cbar |
    +
    +W_2 = |      1      |  s_1 = ubar + cbar
    +      | ubar + cbar |
    +
    +a1 = 0.5 * ( - delta_hu + (ubar + cbar) * delta_h ) / cbar
    +a2 = 0.5 * (   delta_hu - (ubar - cbar) * delta_h ) / cbar
    +
    +
    +
    +
    problem_data should contain:
      +
    • g - (float) Gravitational constant

    • +
    • efix - (bool) Boolean as to whether a entropy fix should be used, if +not present, false is assumed

    • +
    +
    +
    +
    +
    Version:
    +

    1.0 (2009-02-05)

    +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/solution.html b/v5.10.x/pyclaw/solution.html new file mode 100644 index 0000000000..be63350ef4 --- /dev/null +++ b/v5.10.x/pyclaw/solution.html @@ -0,0 +1,425 @@ + + + + + + + + + PyClaw Solutions — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    PyClaw Solutions

    +

    PyClaw Solution objects are containers for +State and Domain objects +that define an entire solution. +The State class is responsible for containing all +the data of the solution on the given Domain. +The Domain is responsible for containing +the geometry of the Solution. The structure of a +solution may look something like the figure.

    +
    +../_images/pyclaw_solution_structure.png +
    +

    Pyclaw solution structure including a Domain, +a set of Patch objects and corresponding +Dimension objects defining the solution’s +geometry and three State objects pointing to +the appropriate Patch with varying fields.

    +
    +
    +

    List of serial and parallel objects in a Solution class:

    + + + + + + + + + + + + + + + + + + + + + + + +

    Serial

    Parallel

    pyclaw.state.State

    petclaw.state.State

    pyclaw.geometry.Domain

    petclaw.geometry.Domain

    pyclaw.geometry.Patch

    petclaw.geometry.Patch

    pyclaw.geometry.Grid

    pyclaw.geometry.Dimension

    +
    +

    pyclaw.solution.Solution

    +
    +
    +class clawpack.pyclaw.solution.Solution(*arg, **kargs)
    +

    Pyclaw patch container class

    +
    +
    Input and Output:
    +

    Input and output of solution objects is handle via the io package. +Solution contains the generic methods write(), read() and +plot() which then figure out the correct method to call. Please +see the io package for the particulars of each format and method and +the methods in this class for general input and output information.

    +
    +
    Properties:
    +

    If there is only one state and patch belonging to this solution, +the solution will appear to have many of the attributes assigned to its +one state and patch. Some parameters that have in the past been +parameters for all patch,s are also reachable although Solution does not +check to see if these parameters are truly universal.

    +
    +
    Patch Attributes:

    ‘dimensions’

    +
    +
    State Attributes:

    ‘t’,’num_eqn’,’q’,’aux’,’capa’,’problem_data’

    +
    +
    +
    +
    Initialization:
    +

    The initialization of a Solution can happen one of these ways

    +
    +
      +
    1. args is empty and an empty Solution is created

    2. +
    3. args is an integer (the number of components of q), a single +State, or a list of States and is followed +by the appropriate geometry object +which can be one of:

      +
      +
        +
      • (Domain)

      • +
      • (Patch) - A domain is created +with the patch or list of patches provided.

      • +
      • (Dimension) - A domain and +patch is created with the dimensions or list of +dimensions provided.

      • +
      +
      +
    4. +
    5. args is a variable number of keyword arguments that describes the +location of a file to be read in to initialize the object

    6. +
    +
    +
    +
    Examples:
    +
    >>> import clawpack.pyclaw as pyclaw
    +>>> x = pyclaw.Dimension('x',0.,1.,100)
    +>>> domain = pyclaw.Domain((x))
    +>>> state = pyclaw.State(domain,3,2)
    +>>> solution = pyclaw.Solution(state,domain)
    +
    +
    +
    +
    +
    +
    +is_valid()
    +

    Checks to see if this solution is valid

    +

    The Solution checks to make sure it is valid by checking each of its +states. If an invalid state is found, a message is logged what +specifically made this solution invalid.

    +
    +
    Output:
    +
      +
    • (bool) - True if valid, false otherwise

    • +
    +
    +
    +
    + +
    +
    +plot()
    +

    Plot the solution

    +
    + +
    +
    +read(frame, path='./_output', file_format=None, file_prefix='fort', read_aux=True, options={}, **kargs)
    +

    Reads in a Solution object from a file

    +

    Reads in and initializes this Solution with the data specified. This +function will raise an IOError if it was unsuccessful.

    +

    Any format must conform to the following call signiture and return +True if the file has been successfully read into the given solution or +False otherwise. Options is a dictionary of parameters that each +format can specify. See the ascii module for an example.:

    +
    read_<format>(solution,path,frame,file_prefix,options={})
    +
    +
    +

    <format> is the name of the format in question.

    +
    +
    Input:
    +
      +
    • frame - (int) Frame number to be read in

    • +
    • path - (string) Base path to the files to be read. +default = './_output'

    • +
    • file_format - (string) Format of the file, should match on of the +modules inside of the io package. default = None +but now attempts to read from header file (as of v5.9.0).

    • +
    • file_prefix - (string) Name prefix in front of all the files, +defaults to whatever the format defaults to, e.g. fort for ascii

    • +
    • options - (dict) Dictionary of optional arguments dependent on +the format being read in. default = {}

    • +
    +
    +
    Output:
    +
      +
    • (bool) - True if read was successful, False otherwise

    • +
    +
    +
    +
    + +
    +
    +set_all_states(attr, value, overwrite=True)
    +

    Sets all member states attribute ‘attr’ to value

    +
    +
    Input:
    +
      +
    • attr - (string) Attribute name to be set

    • +
    • value - (id) Value for attribute

    • +
    • overwrite - (bool) Whether to overwrite the attribute if it +already exists. default = True

    • +
    +
    +
    +
    + +
    +
    +write(frame, path='./', file_format='ascii', file_prefix=None, write_aux=False, options={}, write_p=False)
    +

    Write out a representation of the solution

    +

    Writes out a suitable representation of this solution object based on +the format requested. The path is built from the optional path and +file_prefix arguments. Will raise an IOError if unsuccessful.

    +
    +
    Input:
    +
      +
    • frame - (int) Frame number to append to the file output

    • +
    • path - (string) Root path, will try and create the path if it +does not already exist. default = './'

    • +
    • format - (string or list of strings) a string or list of strings +containing the desired output formats. default = 'ascii'

    • +
    • file_prefix - (string) Prefix for the file name. Defaults to +the particular io modules default.

    • +
    • write_aux - (book) Write the auxiliary array out as well if +present. default = False

    • +
    • options - (dict) Dictionary of optional arguments dependent on +which format is being used. default = {}

    • +
    +
    +
    +
    + +
    +
    +property patch
    +

    (Patch) - Base state’s patch is returned

    +
    + +
    +
    +property start_frame
    +

    (int) - : Solution start frame number in case the Solution +object is initialized by loading frame from file

    +
    + +
    +
    +property state
    +

    (State) - Base state is returned

    +
    + +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/solvers.html b/v5.10.x/pyclaw/solvers.html new file mode 100644 index 0000000000..044f0f947f --- /dev/null +++ b/v5.10.x/pyclaw/solvers.html @@ -0,0 +1,705 @@ + + + + + + + + + Using PyClaw’s solvers: Classic and SharpClaw — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + + +
    +

    Using PyClaw’s solvers: Classic and SharpClaw

    +

    At present, PyClaw includes two types of solvers:

    +
    +
      +
    • Classic: the original Clawpack algorithms, in 1/2/3D

    • +
    • SharpClaw: higher-order wave propagation using WENO reconstruction and +Runge-Kutta integration, in 1/2D

    • +
    +
    +

    Solver initialization takes one argument: a Riemann solver, usually +from the Riemann repository. +Typically, all that is needed to select a different solver is to specify +it in the problem script, e.g.

    +
    >>> from clawpack import pyclaw
    +>>> from clawpack import riemann
    +>>> solver = pyclaw.ClawSolver2D(riemann.acoustics_2D)
    +
    +
    +

    for the 2D acoustics equations and the Classic Clawpack solver or

    +
    >>> solver = pyclaw.SharpClawSolver2D(riemann.acoustics_2D)
    +
    +
    +

    for the SharpClaw solver. Most of the applications distributed with PyClaw +are set up to use either solver, depending on the value of the command line option +solver_type, which should be set to classic or sharpclaw.

    +

    Typically, for a given grid resolution, the SharpClaw solvers are more accurate +but also more computationally expensive. +For typical problems involving shocks, the Classic solvers are recommended. +For problems involving high-frequency waves, turbulence, or smooth solutions, +the SharpClaw solvers may give more accurate solutions at less cost. This +is an active area of research and you may wish to experiment with both solvers.

    +

    Future plans include incorporation of finite-difference and discontinuous Galerkin +solvers.

    +

    Key differences between the Classic and SharpClaw solvers are:

    +
    +
      +
    • The source term routine for the Classic solver should return the integral of +the source term over a step, while the source term routine for SharpClaw +should return the instantaneous value of the source term. For Classic, +the source term function is set using solver.step_source, while for +SharpClaw it is set using solver.dq_src. The shock-bubble interaction +example +shows how to use each of these.

    • +
    • The solvers have different options. For a list of options and possible +values, see the documentation of the ClawSolver and +SharpClawSolver classes.

    • +
    +
    +
    +

    SharpClaw Solvers

    +

    The SharpClaw solvers are a collection of solvers that contain the +functionality of the Fortran code SharpClaw, developed in David Ketcheson’s +thesis. The 1D SharpClaw solver contains a pure Python implementation as +well as a wrapped Fortran version. The 2D solver is in progress but not +available yet. The SharpClaw solvers provide an interface similar to that +of the classic Clawpack solvers, but with a few different options. +The superclass solvers are not meant +to be used separately but are there to provide common routines for all the +Clawpack solvers. Please refer to each of the inherited classes for more info +about the methods and attributes they provide each class. +.. The inheritance structure is:

    +
    +
    Example:
    +

    This is a simple example of how to instantiate and evolve a solution to a +later time \(\text{t_end}\) using the 1D acoustics Riemann solver.

    +
    +
    +
    >>> from clawpack import pyclaw
    +>>> solver = pyclaw.SharpClawSolver1D()           # Instantiate a default, 1d solver
    +
    +>>> solver.evolve_to_time(solution,t_end)  # Evolve the solution to t_end 
    +
    +
    +
    +

    pyclaw.sharpclaw

    +
    +
    +class clawpack.pyclaw.sharpclaw.solver.SharpClawSolver(riemann_solver=None, claw_package=None)
    +

    Superclass for all SharpClawND solvers.

    +

    Implements Runge-Kutta time stepping and the basic form of a +semi-discrete step (the dq() function). If another method-of-lines +solver is implemented in the future, it should be based on this class, +which then ought to be renamed to something like “MOLSolver”.

    +
    +
    +lim_type
    +
    +
    Limiter(s) to be used.
      +
    • 0: No limiting.

    • +
    • 1: TVD reconstruction.

    • +
    • 2: WENO reconstruction.

    • +
    +
    +
    +

    Default = 2

    +
    + +
    +
    +weno_order
    +

    Order of the WENO reconstruction. From 1st to 17th order (PyWENO)

    +

    Default = 5

    +
    + +
    +
    +time_integrator
    +

    Time integrator to be used. Currently implemented methods:

    +
    +
      +
    • ‘Euler’ : 1st-order Forward Euler integration

    • +
    • ‘SSP33’ : 3rd-order strong stability preserving method of Shu & Osher

    • +
    • ‘SSP104’ : 4th-order strong stability preserving method Ketcheson

    • +
    • +
      ‘SSPLMM32’: 2nd-order strong stability preserving 3-step linear multistep method,

      using Euler for starting values

      +
      +
      +
    • +
    • +
      ‘SSPLMM43’: 3rd-order strong stability preserving 4-step linear multistep method

      using SSPRK22 for starting values

      +
      +
      +
    • +
    • +
      ‘RK’Arbitrary Runge-Kutta method, specified by setting solver.a

      and solver.b to the Butcher arrays of the method.

      +
      +
      +
    • +
    • +
      ‘LMM’Arbitrary linear multistep method, specified by setting the

      coefficient arrays solver.alpha and solver.beta.

      +
      +
      +
    • +
    +
    +

    Default = 'SSP104'

    +
    + +
    +
    +char_decomp
    +

    Type of WENO reconstruction. +0: conservative variables WENO reconstruction (standard). +1: Wave-slope reconstruction. +2: characteristic-wise WENO reconstruction. +3: transmission-based WENO reconstruction. +Default = 0

    +
    + +
    +
    +tfluct_solver
    +

    Whether a total fluctuation solver have to be used. If True the function +that calculates the total fluctuation must be provided. +Default = False

    +
    + +
    +
    +tfluct
    +

    Pointer to Fortran routine to calculate total fluctuation +Default = default_tfluct (None)

    +
    + +
    +
    +aux_time_dep
    +

    Whether the auxiliary array is time dependent. +Default = False

    +
    + +
    +
    +kernel_language
    +

    Specifies whether to use wrapped Fortran routines (‘Fortran’) +or pure Python (‘Python’). +Default = 'Fortran'.

    +
    + +
    +
    +num_ghost
    +

    Number of ghost cells. +Default = 3

    +
    + +
    +
    +fwave
    +

    Whether to split the flux jump (rather than the jump in Q) into waves; +requires that the Riemann solver performs the splitting. +Default = False

    +
    + +
    +
    +cfl_desired
    +

    Desired CFL number. +Default = 2.45

    +
    + +
    +
    +cfl_max
    +

    Maximum CFL number. +Default = 2.50

    +
    + +
    +
    +dq_src
    +

    Whether a source term is present. If it is present the function that +computes its contribution must be provided. +Default = None

    +
    + +
    +
    +call_before_step_each_stage
    +

    Whether to call the method self.before_step before each RK stage. +Default = False

    +
    + +
    +
    +accept_reject_step(state)
    +

    Decide whether to accept or not the current step. +For Runge-Kutta methods the step is accepted if cfl <= cfl_max. +For SSPLMM32 the choice of step-size guarantees the cfl condition is satisfied for the steps the LMM +is used. Hence, we need to check the cfl condition only for the starting steps.

    +
    + +
    +
    +check_3rd_ord_cond(state, step_index, dtFE)
    +

    This routine checks the additional conditions for the 3rd-order SSPLMMs. +This is a posteriori check after a step is accepted. +In particular, there is a condition on the step size for the starting values and +a condition on the ratio of forward Euler step sizes at very step. +If the conditions are violated we muct retrieve the previous solution and discard +that step; otherwise the step is accepted.

    +
    + +
    +
    +dq(state)
    +

    Evaluate dq/dt * (delta t)

    +
    + +
    +
    +dqdt(state)
    +

    Evaluate dq/dt. This routine is used for implicit time stepping.

    +
    + +
    +
    +get_dt_new()
    +

    Set size of next step depending on the time integrator and +whether or not the current step was accepted.

    +
    + +
    +
    +setup(solution)
    +

    Allocate RK stage arrays or previous step solutions and fortran routine work arrays.

    +
    + +
    +
    +step(solution, take_one_step, tstart, tend)
    +

    Evolve q over one time step.

    +

    Take one step with a Runge-Kutta or multistep method as specified by +solver.time_integrator.

    +
    + +
    +
    +update_saved_values(state, step_index)
    +

    Updates lists of saved function evaluations, solution values, dt and dtFE for LMMs. +For 3rd-order SSPLMM additional conditions are checked if self.check_lmm_cond is set to True. +If these conditions are violated, the step is rejected.

    +
    + +
    + +
    +
    +
    +

    Pyclaw Classic Clawpack Solvers

    +

    The pyclaw classic clawpack solvers are a collection of solvers that represent +the functionality of the older versions of clawpack. It comes in two forms, a +pure python version and a python wrapping of the fortran libraries. All of the +solvers available provide the same basic interface and provide the same +options as the old versions of clawpack. The superclass solvers are not meant +to be used separately but there to provide common routines for all the +Clawpack solvers. Please refer to each of the inherited classes for more info +about the methods and attributes they provide each class. +.. The inheritance structure is:

    +
    +
    Example:
    +

    This is a simple example of how to instantiate and evolve a solution to a +later time \(\text{t_end}\) using the linearized 1d acoustics Riemann solver

    +
    +
    +
    >>> from clawpack import pyclaw
    +>>> solver = pyclaw.ClawSolver1D()                   # Instantiate a default, 1d solver
    +>>> solver.limiters = pyclaw.limiters.tvd.vanleer  # Use the van Leer limiter
    +>>> solver.dt = 0.0001                               # Set the initial time step
    +>>> solver.max_steps = 500                           # Set the maximum number of time steps
    +
    +
    +
    >>> solver.evolve_to_time(solution,t_end)  # Evolve the solution to t_end  
    +
    +
    +
    +

    pyclaw.classic.solver

    +
    +
    +class clawpack.pyclaw.classic.solver.ClawSolver(riemann_solver=None, claw_package=None)
    +

    Generic classic Clawpack solver

    +

    All Clawpack solvers inherit from this base class.

    +
    +
    +mthlim
    +

    Limiter(s) to be used. Specified either as one value or a list. +If one value, the specified limiter is used for all wave families. +If a list, the specified values indicate which limiter to apply to +each wave family. Take a look at pyclaw.limiters.tvd for an enumeration. +Default = limiters.tvd.minmod

    +
    + +
    +
    +order
    +

    Order of the solver, either 1 for first order (i.e., Godunov’s method) +or 2 for second order (Lax-Wendroff-LeVeque). +Default = 2

    +
    + +
    +
    +source_split
    +

    Which source splitting method to use: 1 for first +order Godunov splitting and 2 for second order Strang splitting. +Default = 1

    +
    + +
    +
    +fwave
    +

    Whether to split the flux jump (rather than the jump in Q) into waves; +requires that the Riemann solver performs the splitting. +Default = False

    +
    + +
    +
    +step_source
    +

    Handle for function that evaluates the source term. +The required signature for this function is:

    +

    def step_source(solver,state,dt)

    +
    + +
    +
    +kernel_language
    +

    Specifies whether to use wrapped Fortran routines (‘Fortran’) +or pure Python (‘Python’). Default = 'Fortran'.

    +
    + +
    +
    +verbosity
    +

    The level of detail of logged messages from the Fortran solver. +Default = 0.

    +
    + +
    +
    +setup(solution)
    +

    Perform essential solver setup. This routine must be called before +solver.step() may be called.

    +
    + +
    +
    +step(solution, take_one_step, tstart, tend)
    +

    Evolve solution one time step

    +

    The elements of the algorithm for taking one step are:

    +
      +
    1. Pick a step size as specified by the base solver attribute get_dt()

    2. +
    3. A half step on the source term step_source() if Strang splitting is +being used (source_split = 2)

    4. +
    5. A step on the homogeneous problem \(q_t + f(q)_x = 0\) is taken

    6. +
    7. A second half step or a full step is taken on the source term +step_source() depending on whether Strang splitting was used +(source_split = 2) or Godunov splitting +(source_split = 1)

    8. +
    +

    This routine is called from the method evolve_to_time defined in the +pyclaw.solver.Solver superclass.

    +
    +
    Input:
    +
      +
    • solution - (Solution) solution to be evolved

    • +
    +
    +
    Output:
    +
      +
    • (bool) - True if full step succeeded, False otherwise

    • +
    +
    +
    +
    + +
    +
    +step_hyperbolic(solution)
    +

    Take one homogeneous step on the solution.

    +

    This is a dummy routine and must be overridden.

    +
    + +
    + +
    +
    +
    +

    Change to Custom BC Function Signatures

    +

    To allow better access to aux array data in the boundary condition functions +both the qbc and auxbc arrays are now passed to the custom boundary +condition functions. The new signature is

    +
    +
    +
    def my_custom_BC(state, dim, t, qbc, auxbc, num_ghost):

    +
    +
    +
    +

    and should be adopted as soon as possible. The old signature

    +
    +
    +
    def my_custom_BC(state, dim, t, bc_array, num_ghost):

    +
    +
    +
    +

    can still be used but a warning will be issued and the old signature will not be +supported when version 6.0 is released. This addition is available in versions > 5.2.0.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/started.html b/v5.10.x/pyclaw/started.html new file mode 100644 index 0000000000..6dff5b696e --- /dev/null +++ b/v5.10.x/pyclaw/started.html @@ -0,0 +1,280 @@ + + + + + + + + + Installing PyClaw — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Installing PyClaw

    +

    The fastest way to install the latest release of PyClaw is:

    +
    pip install clawpack
    +
    +
    +

    To get the latest development version, do this instead:

    +
    git clone git@github.com:clawpack/clawpack.git
    +cd clawpack
    +python setup.py install
    +
    +
    +

    If you encounter any difficulties in the installation +process, please contact us or +raise an issue.

    +

    To run an example, launch an IPython session and then:

    +
    from clawpack.pyclaw import examples
    +claw = examples.shock_bubble_interaction.setup()
    +claw.run()
    +claw.plot()
    +
    +
    +

    This will run the code and then place you in an interactive plotting shell. +To view the simulation output frames in sequence, simply press ‘enter’ +repeatedly. To exit the shell, type ‘q’. For help, type ‘?’ or see +Plotting PyClaw results.

    +
    +

    Dependencies: Python, gfortran, numpy, and matplotlib

    +

    PyClaw requires Python 2.7 or greater and a modern Fortran 95 +compiler. PyClaw is known to work with GNU gfortran 4.2 and higher and the IBM +XLF compiler.

    +
    +
      +
    • Python version >= 2.7.

    • +
    • numpy version >= 1.6.

    • +
    • matplotlib version >= 1.0.1 +(optional – only for plotting).

    • +
    • pip

    • +
    • A Fortran 90 compiler, such as gfortran version >= 4.2. +If you do not have one already, we recommend getting one via +GCC Wiki GFortranBinaries.

    • +
    +
    +

    There are some additional dependencies for running in parallel; see +Running in parallel.

    +
    +

    Obtaining Python, numpy, and matplotlib

    +

    If you don’t already have these on your system, we recommend +Anaconda CE or +Enthought Canopy Express +(both free).

    +
    +
    +
    +

    Clawpack

    +

    PyClaw is part of Clawpack, which includes several other +packages; see Clawpack components. Note that the +installation instructions above will install PyClaw, +Riemann and VisClaw. If you also wish to use AMRClaw or +GeoClaw, you should follow the more general Clawpack +Installing Clawpack.

    +
    +
    +

    Testing your installation with nose

    +

    If you’ve manually downloaded the source, or cloned from Github, +then you can easily test your installation. +First install nose:

    +
    pip install nose
    +
    +
    +

    Then

    +
    cd clawpack/pyclaw/examples
    +nosetests
    +
    +
    +

    If you have followed the instructions for Running in parallel, you can run the tests in parallel:

    +
    mpirun -n 4 nosetests
    +
    +
    +
    +

    Note

    +

    PyClaw automatically enables tests that require PETSc if it detects a +petsc4py installation. Otherwise, tests that use PETSc are disabled.

    +
    +
    +
    +

    Next steps

    +

    Now you’re ready to set up your own PyClaw simulation. Try the PyClaw tutorial: Solve the acoustics equations!

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/state.html b/v5.10.x/pyclaw/state.html new file mode 100644 index 0000000000..c80eddbb3a --- /dev/null +++ b/v5.10.x/pyclaw/state.html @@ -0,0 +1,575 @@ + + + + + + + + + PyClaw State — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    PyClaw State

    +

    The State object records the fields that exist on a given +Patch. These fields include q and aux. The +State also includes references to the +Patch that the state belongs to.

    +

    In parallel the State +object also handles some of the parallel communication required of the state on the +given patch such that only the parts of the fields local to the process. If you +are interested in the geometry of the local state you can find it through the +Patch object’s reference to its own +Grid.

    +
    +

    Serial pyclaw.state.State

    +
    +
    +class clawpack.pyclaw.state.State(geom, num_eqn, num_aux=0)
    +

    A PyClaw State object contains the current state on a particular patch, +including the unknowns q, the time t, and the auxiliary coefficients aux.

    +

    The variables num_eqn and num_aux determine the length of the first +dimension of the q and aux arrays.

    +
    +
    State Data:
    +

    The arrays q, and aux have variable +extents based on the patch dimensions and the values of +num_eqn and num_aux.

    +
    +
    +

    A State object is automatically created upon instantiation of a Solution object +from a Domain object:

    +
    >>> from clawpack import pyclaw
    +>>> x = pyclaw.Dimension('x',0.0,1.0,100)
    +>>> domain = pyclaw.Domain(x)
    +>>> num_eqn = 1
    +>>> solution = pyclaw.Solution(num_eqn,domain)
    +>>> print solution.state
    +PyClaw State object
    +Patch dimensions: [100]
    +Time  t=0.0
    +Number of conserved quantities: 1
    +
    +
    +

    A State lives on a Patch, and can be instantiated directly +by first creating a Patch:

    +
    >>> x = pyclaw.Dimension('x',0.,1.,100)
    +>>> patch = pyclaw.Patch((x))
    +
    +
    +

    The arguments to the constructor are the patch, the number of equations, +and the number of auxiliary fields:

    +
    >>> state = pyclaw.State(patch,3,2)
    +>>> state.q.shape
    +(3, 100)
    +>>> state.aux.shape
    +(2, 100)
    +>>> state.t
    +0.0
    +
    +
    +

    Note that state.q and state.aux are initialized as empty arrays (not zeroed). +Additional parameters, such as scalar values that are used in the Riemann solver, +can be set using the dictionary state.problem_data.

    +
    +
    +get_aux_global()
    +

    Returns a copy of state.aux.

    +
    + +
    +
    +get_auxbc_from_aux(num_ghost, auxbc)
    +

    Fills in the interior of auxbc by copying aux to it.

    +
    + +
    +
    +get_q_global()
    +

    Returns a copy of state.q.

    +
    + +
    +
    +get_qbc_from_q(num_ghost, qbc)
    +

    Fills in the interior of qbc by copying q to it.

    +
    + +
    +
    +is_valid()
    +

    Checks to see if this state is valid

    +
    +
    The state is declared valid based on the following criteria:
      +
    • q is Fortran contiguous

    • +
    • aux is Fortran contiguous

    • +
    +
    +
    +

    A debug logger message will be sent documenting exactly what was not +valid.

    +
    +
    Output:
    +
      +
    • (bool) - True if valid, false otherwise.

    • +
    +
    +
    +
    + +
    +
    +set_aux_from_auxbc(num_ghost, auxbc)
    +

    Set the value of aux using the array auxbc.

    +
    + +
    +
    +set_cparam(fortran_module)
    +

    Set the variables in fortran_module.cparam to the corresponding values in +patch.problem_data. This is the mechanism for passing scalar variables to the +Fortran Riemann solvers; cparam must be defined as a common block in the +Riemann solver.

    +

    This function should be called from solver.setup(). This seems like a fragile +interdependency between solver and state; perhaps problem_data should belong +to solver instead of state.

    +

    This function also checks that the set of variables defined in cparam +all appear in problem_data.

    +
    + +
    +
    +set_num_ghost(num_ghost)
    +

    Virtual routine (does nothing). Overridden in the petclaw.state class.

    +
    + +
    +
    +set_q_from_qbc(num_ghost, qbc)
    +

    Set the value of q using the array qbc. Typically this is called +after qbc has been updated by the solver.

    +
    + +
    +
    +F
    +

    (ndarray(mF,…)) - Cell averages of output functional densities.

    +
    + +
    +
    +gauge_data
    +

    (list) - List of numpy.ndarray objects. Each element of the list +stores the values of the corresponding gauge if keep_gauges is set +to True

    +
    + +
    +
    +keep_gauges
    +

    (bool) - Keep gauge values in memory for every time step, +default = False

    +
    + +
    +
    +property mF
    +

    (int) - Number of output functionals

    +
    + +
    +
    +property mp
    +

    (int) - Number of derived quantities

    +
    + +
    +
    +property num_aux
    +

    (int) - Number of auxiliary fields

    +
    + +
    +
    +property num_eqn
    +

    (int) - Number of unknowns (components of q)

    +
    + +
    +
    +p
    +

    (ndarray(mp,…)) - Cell averages of derived quantities.

    +
    + +
    +
    +problem_data
    +

    (dict) - Dictionary of global values for this patch, +default = {}

    +
    + +
    +
    +t
    +

    (float) - Current time represented on this patch, +default = 0.0

    +
    + +
    + +
    +
    +

    Parallel petclaw.state.State

    +
    +
    +class clawpack.petclaw.state.State(geom, num_eqn, num_aux=0)
    +
    +
    Parallel State class

    Parent Class Documentation:

    +
    +
    +

    Module containing all Pyclaw solution objects

    +
    +
    +get_aux_global()
    +

    Returns a copy of the global aux array on process 0, otherwise returns None

    +
    + +
    +
    +get_auxbc_from_aux(num_ghost, auxbc)
    +

    Returns aux with ghost cells attached, by accessing the local vector.

    +
    + +
    +
    +get_q_global()
    +

    Returns a copy of the global q array on process 0, otherwise returns None

    +
    + +
    +
    +get_qbc_from_q(num_ghost, qbc)
    +

    Returns q with ghost cells attached, by accessing the local vector.

    +
    + +
    +
    +set_num_ghost(num_ghost)
    +

    This is a hack to deal with the fact that petsc4py +doesn’t allow us to change the stencil_width (num_ghost).

    +

    Instead, we initially create DAs with stencil_width=0. +Then, in solver.setup(), we call this function to replace +those DAs with new ones that have the right stencil width.

    +

    This could be made more efficient using some PETSc calls, +but it only happens once so it seems not to be worth it.

    +
    + +
    +
    +property F
    +

    Array containing pointwise values (densities) of output functionals. +This is just used as temporary workspace before summing.

    +
    + +
    +
    +property aux
    +

    We never communicate aux values; every processor should set its own ghost cell +values for the aux array. The global aux vector is used only for outputting +the aux values to file; everywhere else we use the local vector.

    +
    + +
    +
    +property fset
    +

    Array containing pointwise values (densities) of output functionals. +This is just used as temporary workspace before summing.

    +
    + +
    +
    +gauge_data
    +

    (list) - List of numpy.ndarray objects. Each element of the list +stores the values of the corresponding gauge if keep_gauges is set +to True

    +
    + +
    +
    +keep_gauges
    +

    (bool) - Keep gauge values in memory for every time step, +default = False

    +
    + +
    +
    +property mF
    +

    (int) - Number of derived quantities (components of p)

    +
    + +
    +
    +property mp
    +

    (int) - Number of derived quantities (components of p)

    +
    + +
    +
    +property num_aux
    +

    (int) - Number of auxiliary fields

    +
    + +
    +
    +property num_eqn
    +

    (int) - Number of unknowns (components of q)

    +
    + +
    +
    +property p
    +

    Array containing values of derived quantities for output.

    +
    + +
    +
    +problem_data
    +

    (dict) - Dictionary of global values for this patch, +default = {}

    +
    + +
    +
    +property q
    +

    Array of solution values.

    +
    + +
    +
    +t
    +

    (float) - Current time represented on this patch, +default = 0.0

    +
    + +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/troubleshooting.html b/v5.10.x/pyclaw/troubleshooting.html new file mode 100644 index 0000000000..01d9b6b890 --- /dev/null +++ b/v5.10.x/pyclaw/troubleshooting.html @@ -0,0 +1,235 @@ + + + + + + + + + Troubleshooting — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Troubleshooting

    +

    This page lists some of the most common difficulties encountered in +installing and running PyClaw. If you do not find a solution for your +problem here, please e-mail the +claw-users Google group. +You may also wish to consult the list of known issues.

    +
    +

    Compilation errors

    +

    Two frequent sources of compilation error are:

    +
    +
      +
    • Your environment variable FC is set to g77 or another Fortran 77 compiler. +FC should be undefined or set to a Fortran 90 compiler. +If you have installed gfortran, you could set:

      +
      $ export FC = gfortran
      +
      +
      +
    • +
    +
    +

    in your .bash_profile (in mac) or .bashrc (in linux).

    +
    +
      +
    • Conflicts between 32-bit and 64-bit files. This has been encountered on +Mac OS X with 32-bit Enthought Python. We recommend using a 64-bit Python +install, such as that available from Enthought (free for academics). +The 32-bit EPD has also been known to cause a plotting issue with PyClaw +in which plotting becomes extremely slow.

    • +
    +
    +
    +
    +

    Use Fortran-ordered arrays

    +

    By default, Numpy arrays use C-ordering. But the arrays that store the solution +and coefficients in PyClaw (i.e., q and aux) must be initialized using Fortran +ordering, for compatibility with the Fortran routines and PETSc. Ordinarily, +this is handled automatically when you create a State or Solution object. +If you are manually creating arrays, be sure to pass the flag ‘F’ to specify +Fortran ordering.

    +
    +
    +

    Installation

    +

    When installing Clawpack, if you get an error message saying that +lblas or llapack is not found, please update your installation of Numpy +to at least version 1.8. You can do this via:

    +
    pip install -U numpy
    +
    +
    +

    Then try the installation again.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/tutorial.html b/v5.10.x/pyclaw/tutorial.html new file mode 100644 index 0000000000..8e58cd3980 --- /dev/null +++ b/v5.10.x/pyclaw/tutorial.html @@ -0,0 +1,305 @@ + + + + + + + + + PyClaw tutorial: Solve the acoustics equations — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    PyClaw tutorial: Solve the acoustics equations

    +

    PyClaw is designed to solve general systems of hyperbolic PDEs of the form

    +
    +\[\begin{equation} + \kappa(x) q_t + A(q,x) q_x = 0. + \end{equation}\]
    +

    As an example, in this tutorial we’ll set up a simulation that solves +the acoustics equations in one dimension:

    +
    +\[\begin{split}\begin{eqnarray} + &p_t + K u_x = 0\\ + &u_t + \frac{1}{\rho} p_x = 0 + \end{eqnarray}\end{split}\]
    +

    The key to solving a particular system of equations with PyClaw or other similar +codes is a Riemann solver. Riemann solvers for many systems are available as part +of the clawpack/riemann package.

    +

    We’ll assume that you’ve already followed the Installing PyClaw instructions.

    +

    The following instructions show how to set up a problem step-by-step in an +interactive shell. See acoustics_1d for the full source on which this is based.

    +

    The commands below should be typed at the Python prompt; we recommend using +IPython.

    +
    >>> from clawpack import pyclaw
    +>>> from clawpack import riemann
    +
    +
    +
    +

    The Solver

    +

    PyClaw includes various algorithms for solving hyperbolic PDEs; each is implemented +in a Solver object. So the first step is to create a solver

    +
    >>> solver = pyclaw.ClawSolver1D(riemann.acoustics_1D)
    +
    +
    +

    Next we set the boundary conditions. We’ll use a wall (wall) +condition at the left boundary and a non-wall (zero-order extrapolation) +condition at the right boundary

    +
    >>> solver.bc_lower[0] = pyclaw.BC.wall
    +>>> solver.bc_upper[0] = pyclaw.BC.extrap
    +
    +
    +
    +
    +

    The domain

    +

    Next we need to set up the grid. We do so by defining the +physical domain and the computational resolution. We’ll +use the interval \((-1,1)\) and 200 grid cells:

    +
    >>> domain = pyclaw.Domain([-1.0], [1.0], [200])
    +
    +
    +

    Notice that the calling sequence is similar to numpy’s linspace command.

    +

    Finally, we set up a Solution +object, which will hold the solution values:

    +
    >>> solution = pyclaw.Solution(solver.num_eqn, domain)
    +
    +
    +
    +
    +

    Initial condition

    +

    Now we will set the initial value of the solution

    +
    >>> state = solution.state
    +>>> xc = state.grid.p_centers[0]      # Array containing the cell center coordinates
    +>>> from numpy import exp
    +>>> state.q[0,:] = exp(-100 * (xc-0.75)**2) # Pressure: Gaussian centered at x=0.75.
    +>>> state.q[1,:] = 0.                       # Velocity: zero.
    +
    +
    +
    +
    +

    Problem-specific parameters

    +

    The acoustics equations above have some coefficients – namely, the +bulk modulus \(K\) and density \(\rho\) – that must be defined. +Furthermore, checking the code for the Riemann solver we’ve chosen +reveals that it expects us to provide values for the impedance \(Z\) +and sound speed \(c\). These values are stored in a Python dictionary +called problem_data that is a member of the State

    +
    >>> from math import sqrt
    +>>> rho = 1.0
    +>>> bulk = 1.0
    +>>> state.problem_data['rho'] = rho
    +>>> state.problem_data['bulk'] = bulk
    +>>> state.problem_data['zz'] = sqrt(rho*bulk)
    +>>> state.problem_data['cc'] = sqrt(bulk/rho)
    +
    +
    +
    +
    +

    The controller

    +

    The most convenient way to run a PyClaw simulation is by using a +Controller object. The controller +directs the solver in advancing the solution and handles output.

    +
    >>> controller = pyclaw.Controller()
    +>>> controller.solution = solution
    +>>> controller.solver = solver
    +>>> controller.tfinal = 1.0
    +
    +
    +

    At last everything is set up! Now run the simulation

    +
    >>> status = controller.run()
    +
    +
    +

    This should print out a few lines indicating the output times. It also prints +the minimum and maximum tipe-step used, the number of steps required for the +computation and the maximum CFL number. The simplest way to plot the solution +is

    +
    >>> from clawpack.pyclaw import plot
    +>>> plot.interactive_plot() 
    +
    +
    +

    That’s it! Your first PyClaw simulation. Of course, we’ve only +scratched the surface of what PyClaw can do, and there are many +important options that haven’t been discussed here. To get an +idea, take a look through the pyclaw/examples directory and try running +some other examples. It’s also a good idea to get more deeply +acquainted with the main Understanding Pyclaw Classes.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/pyclaw/util.html b/v5.10.x/pyclaw/util.html new file mode 100644 index 0000000000..04af4c5d44 --- /dev/null +++ b/v5.10.x/pyclaw/util.html @@ -0,0 +1,418 @@ + + + + + + + + + Pyclaw Utility Module — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Pyclaw Utility Module

    +
    +

    pyclaw.util

    +

    Pyclaw utility methods

    +
    +
    +class clawpack.pyclaw.util.FrameCounter
    +

    Simple frame counter

    +

    Simple frame counter to keep track of current frame number. This can +also be used to keep multiple runs frames separated by having multiple +counters at once.

    +

    Initializes to 0

    +
    +
    +get_counter()
    +

    Get the current frame number

    +
    + +
    +
    +increment()
    +

    Increment the counter by one

    +
    + +
    +
    +reset_counter()
    +

    Reset the counter to 0

    +
    + +
    +
    +set_counter(new_frame_num)
    +

    Set the counter to new_frame_num

    +
    + +
    + +
    +
    +exception clawpack.pyclaw.util.VerifyError
    +
    + +
    +
    +clawpack.pyclaw.util.add_parent_doc(parent)
    +

    add parent documentation for a class

    +
    + +
    +
    +clawpack.pyclaw.util.check_diff(expected, test, **kwargs)
    +

    Checks the difference between expected and test values, return None if ok

    +

    This function expects either the keyword argument ‘abstol’ or ‘reltol’.

    +
    + +
    +
    +clawpack.pyclaw.util.compile_library(source_list, module_name, interface_functions=[], local_path='./', library_path='./', f2py_flags='', FC=None, FFLAGS=None, recompile=False, clean=False)
    +

    Compiles and wraps fortran source into a callable module in python.

    +

    This function uses f2py to create an interface from python to the fortran +sources in source_list. The source_list can either be a list of names +of source files in which case compile_library will search for the file in +local_path and then in library_path. If a path is given, the file will be +checked to see if it exists, if not it will look for the file in the above +resolution order. If any source file is not found, an IOException is +raised.

    +

    The list interface_functions allows the user to specify which fortran +functions are actually available to python. The interface functions are +assumed to be in the file with their name, i.e. claw1 is located in +‘claw1.f95’ or ‘claw1.f’.

    +

    The interface from fortran may be different than the original function +call in fortran so the user should make sure to check the automatically +created doc string for the fortran module for proper use.

    +

    Source files will not be recompiled if they have not been changed.

    +

    One set of options of note is for enabling OpenMP, it requires the usual +fortran flags but the OpenMP library also must be compiled in, this is +done with the flag -lgomp. The call to compile_library would then be:

    +

    compile_library(src,module_name,f2py_flags=’-lgomp’,FFLAGS=’-fopenmp’)

    +

    For complete optimization use:

    +

    FFLAGS=’-O3 -fopenmp -funroll-loops -finline-functions -fdefault-real-8’

    +
    +
    Input:
    +
      +
    • source_list - (list of strings) List of source files, if these are +just names of the source files, i.e. ‘bc1.f’ then they will be searched +for in the default source resolution order, if an explicit path is +given, i.e. ‘./bc1.f’, then the function will use that source if it can +find it.

    • +
    • module_name - (string) Name of the resulting module

    • +
    • interface_functions - (list of strings) List of function names to +provide access to, if empty, all functions are accessible to python. +Defaults to [].

    • +
    • local_path - (string) The base path for source resolution, defaults +to ‘./’.

    • +
    • library_path - (string) The library path for source resolution, +defaults to ‘./’.

    • +
    • f2py_flags - (string) f2py flags to be passed

    • +
    • FC - (string) Override the environment variable FC and use it to +compile, note that this does not replace the compiler that f2py uses, +only the object file compilation (functions that do not have +interfaces)

    • +
    • FFLAGS - (string) Override the environment variable FFLAGS and pass +them to the fortran compiler

    • +
    • recompile - (bool) Force recompilation of the library, defaults to +False

    • +
    • clean - (bool) Force a clean build of all source files

    • +
    +
    +
    +
    + +
    +
    +clawpack.pyclaw.util.construct_function_handle(path, function_name=None)
    +

    Constructs a function handle from the file at path.

    +

    This function will attempt to construct a function handle from the python +file at path.

    +
    +
    Input:
    +
      +
    • path - (string) Path to the file containing the function

    • +
    • function_name - (string) Name of the function defined in the file +that the handle will point to. Defaults to the same name as the file +without the extension.

    • +
    +
    +
    Output:
    +
      +
    • (func) Function handle to the constructed function, None if this has +failed.

    • +
    +
    +
    +
    + +
    +
    +clawpack.pyclaw.util.convert_fort_double_to_float(number)
    +

    Converts a fortran format double to a float

    +

    Converts a fortran format double to a python float.

    +

    number: is a string representation of the double. Number should +be of the form “1.0d0”

    +
    + +
    +
    +clawpack.pyclaw.util.gen_variants(application, verifier, kernel_languages=('Fortran',), disable_petsc=False, **kwargs)
    +

    Generator of runnable variants of a test application given a verifier

    +

    Given an application, a script for verifying its output, and a +list of kernel languages to try, generates all possible variants of the +application to try by taking a product of the available kernel_languages and +(petclaw/pyclaw). For many applications, this will generate 4 variants: +the product of the two main kernel languages (‘Fortran’ and ‘Python’), against +the the two parallel modes (petclaw and pyclaw).

    +

    For more information on how the verifier function should be implemented, +see util.test_app for a description, and util.check_diff for an example.

    +

    All unrecognized keyword arguments are passed through to the application.

    +
    + +
    +
    +clawpack.pyclaw.util.read_data_line(inputfile, num_entries=1, data_type=<class 'float'>)
    +

    Read data a single line from an input file

    +

    Reads one line from an input file and returns an array of values

    +

    inputfile: a file pointer to an open file object +num_entries: number of entries that should be read, defaults to only 1 +type: Type of the values to be read in, they all must be the same type

    +

    This function will return either a single value or an array of values +depending on if num_entries > 1

    +
    + +
    +
    +clawpack.pyclaw.util.run_app_from_main(application, setplot=None)
    +

    Runs an application from pyclaw/examples/, automatically parsing command line keyword +arguments (key=value) as parameters to the application, with positional +arguments being passed to PETSc (if it is enabled).

    +

    Perhaps we should take the PETSc approach of having a database of PyClaw +options that can be queried for options on specific objects within the +PyClaw runtime instead of front-loading everything through the application +main…

    +
    + +
    +
    +clawpack.pyclaw.util.run_serialized(fun)
    +

    Decorates a function to only run serially, even if called in parallel.

    +

    In a parallel communicator, the first process will run while the remaining processes +block on a barrier. In a serial run, the function will be called directly.

    +

    This currently assumes the global communicator is PETSc.COMM_WORLD, but is easily +generalized.

    +
    + +
    +
    +clawpack.pyclaw.util.test_app(application, verifier, kwargs)
    +

    Test the output of a given application against its verifier method.

    +

    This function performs the following two function calls:

    +
    output = application(**kwargs)
    +check_values = verifier(output)
    +
    +
    +

    The verifier method should return None if the output is correct, otherwise +it should return an indexed sequence of three items:

    +
    0 - expected value
    +1 - test value
    +2 - string describing the tolerance type (abs/rel) and value.
    +
    +
    +

    This information is used to present descriptive help if an error is detected. +For an example verifier method, see util.check_diff

    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/python.html b/v5.10.x/python.html new file mode 100644 index 0000000000..e1b77ba579 --- /dev/null +++ b/v5.10.x/python.html @@ -0,0 +1,232 @@ + + + + + + + + + Python Hints — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Python Hints

    +
    +

    Dropping support for Python 2.7

    +

    As of Clawpack v5.7.0 we are no longer supporting Python 2.7, and +Python 3.x is expected, see v5.7.0 release notes. At this point we +believe v5.7.0 still works with Python 2.7, but we are phasing out +testing this in the future.

    +

    This is consistent with the fact that Python 2.7 itself will not be +maintained beyond January, 2020, and most package we rely on (e.g. +numpy, matplotlib, jupyter) are also ceasing support for Python 2.7, +see https://python3statement.org/

    +

    Hence we view Clawpack version 5.6.x as the end of the line for Python +2 support (probably 5.6.1 unless there’s a strong need to update this +further). Clawpack 5.6.x will continue to be available, of course, +but in order to take advantage of future improvements to Clawpack (and +most other Python packages) we strongly suggest that you start +converting all of your codes to work in Python 3 if you haven’t +already. Often this only requires changing print statements to print +functions, but there are a few other changes. See e.g., +https://docs.python.org/3/howto/pyporting.html +and other online resources discussing the differences between Python 2 and 3.

    +
    +
    +

    References and tutorials

    +

    For use with Clawpack, you will need the Numpy module (Numerical Python) +that allows working with arrays in much the same way as in Matlab. +This is distributed as part of +SciPy (Scientific Python). +See the Installing SciPy +page for tips installing SciPy and NumPy on various platforms.

    +

    For plotting you will also need the matplotlib module which provides Matlab-like +plotting commands for 1d and 2d plots (e.g. contour and pcolor plots).

    +

    Some useful links to get started learning Python:

    +
    +
    +
    +
    +

    Notebooks

    +

    The Clawpack Gallery of Jupyter +Notebooks +contains a number of notebooks with other examples of using Python for +Clawpack.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/python_path.html b/v5.10.x/python_path.html new file mode 100644 index 0000000000..31e5dc2d7d --- /dev/null +++ b/v5.10.x/python_path.html @@ -0,0 +1,346 @@ + + + + + + + + + Python path — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Python path

    +

    When using PyClaw or other Python tools from Clawpack (e.g. the +visualization tools in VisClaw or Python tools for working with topo and dtopo from GeoClaw), you need +to be able to import various modules.

    +

    For a general discussion of importing Python modules, see the tutorial in the +Python3 documentation.

    +

    Below are some hints in case you run into problems with import statements +with modules not being found, or being imported from the wrong version of +Clawpack (if you have more than one on your computer).

    +
    +

    whichclaw.py

    +

    The script $CLAW/clawutil/src/python/clawutil/whichclaw.py may be useful in +debugging paths. It prints out information on how various paths and environment +variables are set. (Available starting in Version 5.4.0.)

    +

    Sample output:

    +
    $ python $CLAW/clawutil/src/python/clawutil/whichclaw.py
    +
    +`import clawpack` imports from:
    +    /Users/rjl/clawpack_src/clawpack-v5.5.0
    +
    +The CLAW environment variable is set to:
    +    /Users/rjl/D/clawpack-v5.5.0
    +The PYTHONPATH environment variable is not set
    +
    +The following directories on sys.path might contain clawpack,
    +and are searched in this order:
    +    /Users/rjl/clawpack_src/clawpack-v5.5.0
    +
    +The following easy-install.pth files list clawpack:
    +    /Users/rjl/Library/Python/2.7/lib/python/site-packages/easy-install.pth
    +        (points to /Users/rjl/clawpack_src/clawpack-v5.5.0)
    +
    +
    +

    Beware if there seems to be a conflict (e.g. between where the CLAW +environment variable points and where Python imports from). +See below for more about sys.path and easy-install.pth files.

    +
    +
    +

    Which version was imported?

    +

    Try the following in a Python (or IPython) shell:

    +
    >>> import clawpack
    +>>> clawpack.__file__
    +
    +
    +

    This should print out something like:

    +
    '/Users/rjl/clawpack_src/clawpack-v5.5.0/clawpack/__init__.py'
    +
    +
    +

    This shows where clawpack is being imported from. In this case the +directory /Users/rjl/clawpack_src/clawpack-v5.5.0 is the directory +normally referred to as $CLAW in this documentation. Within this +directory, there is a subdirectory $CLAW/clawpack that contains a file +__init__.py, which is a standard Python way of indicating that the files +in the directory should be handled as a Python package.

    +

    The directory $CLAW (top level of Clawpack code) +must be in the Python search path in order for this import statement to work. +The Python command import clawpack searches through all directories in +this path looking for the first one that contains a subdirectory named +clawpack containing a file __init__.py, (or a file named clawpack.py, +but in this case it should find the $CLAW/clawpack directory).

    +
    +

    Warning

    +

    Up to version 5.5.0, +the directory $CLAW/clawpack also contains symbolic links to other +directories within the Clawpack repository hierarchy that contain +other Python modules. This allows you to do, for example:

    +
    >>> from clawpack import pyclaw
    +>>> pyclaw.__file__
    +
    +'/Users/rjl/clawpack_src/clawpack-v5.5.0/clawpack/pyclaw/__init__.py'
    +
    +
    +
    +

    Starting in Version 5.6.0, symbolic links in $CLAW/clawpack +have been eliminated. +Instead $CLAW/clawpack/__init__.py includes a dictionary of subpackages with +the relative path indicated in this file:

    +
    >>> import clawpack
    +>>> clawpack._subpackages
    +{'forestclaw': 'pyclaw/src', 'amrclaw': 'amrclaw/src/python', 'riemann': 'riemann',
    + 'pyclaw': 'pyclaw/src', 'classic': 'classic/src/python', 'visclaw': 'visclaw/src/python',
    +'clawutil': 'clawutil/src/python', 'petclaw': 'pyclaw/src', 'geoclaw': 'geoclaw/src/python'}
    +
    +
    +

    Example: Suppose you want to examine the Python code for the Iplotclaw +module of VisClaw (see Interactive plotting with Iplotclaw). You can figure out where +this code is via:

    +
    >>> from clawpack.visclaw import Iplotclaw
    +>>> Iplotclaw.__file__
    +
    +
    +

    Alternatively, in IPython you could examine this code directly via:

    +
    In [1]: from clawpack.visclaw import Iplotclaw
    +In [2]: Iplotclaw??
    +
    +
    +
    +
    +

    sys.path

    +

    To examine the Python search path, you can do:

    +
    >>> import sys
    +>>> sys.path
    +
    +
    +

    This should print out a list of strings. The first string in the list is +probably the empty string, indicating that the current working directory +should be searched first. The remaining strings are paths in your file +system.

    +

    You should see that the directory referred to as $CLAW in this +documentation is in the path.

    +

    If you have multiple versions of Clawpack on your computer and Python seems +to be importing from the wrong place, check the path. +Directories are searched in the order listed in sys.path.

    +
    +
    +

    easy-install.pth

    +

    If you used pip to install Clawpack (following pip install instructions), +then the path to the installed version will may be added to the file +easy-install.pth located in the site-packages directory. If you want +to switch to a different version you may need to either use pip again, +or remove this line from site-packages/easy-install.pth, or execute +pip uninstall clawpack.

    +

    The whichclaw.py command is useful for determining where the +site-packages/easy-install.pth is located.

    +

    More generally, to find site-packages/easy-install.pth, +use this these commands in Python:

    +
    >>> import site
    +>>> site.getusersitepackages()
    +
    +
    +

    this will tell you where the users’ site-packages directory is. If you +installed using the –user flag in the pip install, then it is the +easy-install.pth in this directory that contains the path.

    +

    If you installed without the –user flag, then then system-wide +site-packages/easy-install.pth file has been modified. You can find the +path to this via:

    +
    >>> import site
    +>>> site.getsitepackages()
    +
    +
    +
    +
    +

    PYTHONPATH

    +

    If you install Clawpack with pip, then you do not need to include it in +environment variable PYTHONPATH.

    +

    Setting the environment variable PYTHONPATH is often +considered bad practice in the Python community +and can lead to problems, see for example +PYTHONPATH Considered Harmful.

    +

    In spite of the possible drawbacks, some Clawpack developers often +use PYTHONPATH to switch versions without difficulty, particularly +when using one of the Options for installing Clawpack Fortran codes rather than pip.

    +

    If you do wish to use it, you should set PYTHONPATH to point to the top +level of the clawpack directory for the code you wish to use. +Then use the whichclaw.py utility to check that this is where Clawpack +is imported from, and there is not an easy-install.pth file generated by +pip that points to a different location.

    +

    If you have an environment variable PYTHONPATH set, the paths specified +here may be searched before or after what is specified in the users’ +site-packages/easy-install.pth, depending on how you set PYTHONPATH. +See also +https://docs.python.org/3/using/cmdline.html#environment-variables. +Hence trying to use PYTHONPATH if you have also used pip to install a +different version of Clawpack can lead to confusion.

    +

    To see if this environment variable is set, in the bash shell you can do:

    +
    $ echo $PYTHONPATH
    +
    +
    +

    or use the whichclaw.py utility to report this, along with any other +possibly conflicting easy-install.pth files.

    +

    See Set environment variables for information on setting environment variables.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/qinit_defaults.html b/v5.10.x/qinit_defaults.html new file mode 100644 index 0000000000..db19279b12 --- /dev/null +++ b/v5.10.x/qinit_defaults.html @@ -0,0 +1,192 @@ + + + + + + + + + qinit default routines — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    qinit default routines

    +

    Below are links to the default qinit library routines for Classic and AMRClaw.

    +

    These should never be used +as is, but rather copied to your application directory and modified to set +the initial conditions as desired.

    + +

    (Note: these links are for the version checked in to the master branch. +You can select a different branch or tag from the GitHub page.)

    +
    +

    qinit routine in GeoClaw

    +

    In GeoClaw, there is a library routine that +sets the surface elevation to sea level by default, and also has the option +of adding a perturbation as specified in the setrun file, see +qinit data file parameters.

    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/quick_surge.html b/v5.10.x/quick_surge.html new file mode 100644 index 0000000000..bca576ec63 --- /dev/null +++ b/v5.10.x/quick_surge.html @@ -0,0 +1,218 @@ + + + + + + + + + Quick start guide for storm surge modeling — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Quick start guide for storm surge modeling

    +

    See also this youtube video +and the related materials from the 2020 GeoClaw Developers Workshop.

    +

    To get started with a storm surge computation it is best to refer to a previous +working example. For example, you might start with +$CLAW/geoclaw/examples/storm-surge/ike. There are also a number of additional +examples in the $CLAW/geoclaw/examples/storm-surge directory as well as some +in the $CLAW/apps/surge-examples directory (this is actually a repository of +examples that is actively updated). The primary input that one needs to provide +for a new example usually involves two data source

    +
    +
      +
    • Topography data: Data that specifies the topography and bathymetry of the +region around the area of interest. For storm surge computations it is +generally good practice to include entire oceanic basins so that you can +ensure that flow into and out of the basin is resolved by the computation +and is sufficiently distant from the computational domain’s boundaries.

    • +
    • Storm data: Of course we need to specify the particular storm that you +are interested in. There are a number of ways to specify a storm which +are described in Storm Specification Data. Sources for parameterized storms +can also be found in Sources for Storm Surge Data and a description of how to include +them in _surge_module.

    • +
    +
    +
    +

    Warning

    +

    This is a work in progress and only partially has been filled out. +If you are interested in the rest of the steps or wish to contribute your +own workflow please let us know!

    +
    +

    Here we will concentrate on changing the Hurricane Ike example into one for +Hurricane Katrina.

    +
      +
    1. First copy the files located in the Hurricane Ike directorty located at +$CLAW/geoclaw/examples/storm-surge/ike.

    2. +
    3. Next let’s find some better topography for the New Orleans area…

    4. +
    5. Now let’s find a storm specification for Hurricane Katrina. In this +example we will use the ATCF database. For Katrina this ends up being +the file located `here <>`_.

    6. +
    7. We now need to modify the setrun.py to use our new storm format and +topography we now added…

    8. +
    9. Finally we need to also modify the plotting so that we have an

    10. +
    11. Gauges…

    12. +
    13. Running the simulation…

    14. +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/quick_tsunami.html b/v5.10.x/quick_tsunami.html new file mode 100644 index 0000000000..05e39fce50 --- /dev/null +++ b/v5.10.x/quick_tsunami.html @@ -0,0 +1,203 @@ + + + + + + + + + Quick start guide for tsunami modeling — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Quick start guide for tsunami modeling

    +
    +

    Warning

    +

    As with all of Clawpack, this code is provided as a research +and teaching tool with no guarantee of suitability for any particular +purpose, and no liability on the part of the authors. See the +License for more details.

    +
    +

    As always, the best way to get started is to copy a working example and +modify it to do what you want. For example, you might start with +$CLAW/geoclaw/examples/tsunami/chile2010.

    +

    If you clone the Clawpack Applications repository then there are two Jupyter notebooks that +illustrate how to make some simple changes to the setup for this example, +and lead you through some exercises:

    +
    +
      +
    • $CLAW/apps/notebooks/geoclaw/chile2010a/chile2010a.ipynb

    • +
    • $CLAW/apps/notebooks/geoclaw/chile2010b/chile2010b.ipynb

    • +
    +
    +

    To work with Topography data data and Earthquake sources: Fault slip and the Okada model, see also the +tutorials

    +
    +
      +
    • $CLAW/apps/notebooks/geoclaw/topotools_examples.ipynb

    • +
    • $CLAW/apps/notebooks/geoclaw/dtopotools_examples.ipynb

    • +
    • $CLAW/apps/notebooks/geoclaw/Okada.ipynb

    • +
    +
    +

    These are also visible online, see notebooks.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/refinement.html b/v5.10.x/refinement.html new file mode 100644 index 0000000000..76ac576e7e --- /dev/null +++ b/v5.10.x/refinement.html @@ -0,0 +1,403 @@ + + + + + + + + + AMR refinement criteria — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    AMR refinement criteria

    +

    Several parameters controlling refinement can be set in the setrun +function. See Specifying AMRClaw run-time parameters in setrun.py for further description of these. +Many of the parameters discussed below are attributes of rundata.amrdata +in setrun.py.

    +

    Every regrid_interval time steps on each level, the error is +estimated in all cells on grids at this level. Cells where some +refinement criteria are satisfied are flagged for refinement. Default +options for flagging are described below. Additional cells surrounding +the flagged cells are also flagged to insure that moving features +of the solution (e.g. shock waves) do not escape from the region +of refinement before the next regridding time. The number of buffer +cells flagged is specified by regrid_buffer_width and the number +of steps between regridding on each level is specified by +regrid_interval. Typically these are equal (assuming the Courant +number is close to 1) and taken to be some small integer such as 2 or 3.

    +

    In addition to flagging individual cells based on the behavior of the +solution, it is also possible to specify that certain regions of the domain +should always be refined to a certain level (and/or never refined above +some level). This is described further in Specifying AMR regions. +These regions are used in conjunction with the methods +described below to determine whether or not a given cell should be flagged +for refinement.

    +

    The cells that have been flagged are then clustered into +rectangular regions to form grids at the next finer level. The clustering is +done in light of the tradeoffs between a few large grids (which usually +means refinement of many additional cells that were not flagged) or many +small grids (which typically results in fewer fine grid cells but more grids +and hence more overhead and less efficient looping over shorter rows of +cells). The parameter clustering_cutoff in amrNez.data is used to control this +tradeoff. At least this fraction of the fine grid cells should result from +coarse cells that were flagged as needing refinement. The value +clustering_cutoff = 0.7 is usually reasonable.

    +
    +

    Flagging criteria

    +

    Two possible approaches to flagging individual +cells for refinement (based on the behavior of the solution) are built into +AMRClaw. (A different default approach is used in GeoClaw, see +Flagging criteria in GeoClaw).

    +

    Note: Starting in v5.6.0, a new approach is also available, see +Guiding AMR with adjoint flagging.

    +
    +

    flag2refine

    +

    One approach to flagging cells for refinement (the default used in +most examples) is to set flag2refine == True and specify +a tolerance flag2refine_tol. This indicates that the +library subroutine $CLAW/amrclaw/src/Nd/flag2refine.f90 should +be used to flag cells for refinement. This routine computes the +maximum max-norm of the undivided difference of \(q_{i,j}\) +based its four neighbors in two space dimensions (or 6 neighbors in +3d). If this is greater than the specified tolerance, then the +cell is flagged for refinement (subject to limitations imposed by +“regions”). The undivided difference (not divided by the mesh +width) is used, e.g. \(|q(m,i+1,j) - q(m,i-1,j)|\) for each +component \(m\).

    +

    Note that the user can change the criterion used for flagging cells by +modifying this routine – best done by copying the library routine to your +application directory and modifying the Makefile to point to the modified +version.

    +
    +
    +

    Richardson extrapolation

    +

    The second approach to flagging individual cells is based on using Richardson +extrapolation to estimate the error in each cell. This is used if +flag_richardson == True. In this case a cell is flagged if the error +estimate exceeds the value flag_richardson_tol. +Richardson estimation requires taking two time steps on the current grid and +comparing the result with what’s obtained by taking one step on a coarsened +grid. +One time step on the fine grid is re-used, so only one additional time step +on the fine grid and one on a coarsened grid are required. +It is somewhat more expensive than the flag2refine approach, +but may be more useful for cases where the solution is smooth and undivided +differences do not identify the regions of greatest error.

    +

    Note: Both approaches can be used together: if +flag2refine == True and flag_richardson == True +then a cell will be flagged if either of the corresponding specified +tolerances is exceeded.

    +
    +
    +
    +

    Specifying AMR regions

    +

    New in Version 5.7.0: Although the regions described here are still +supported in v5.7.0, a more general form of Specifying flagregions for adaptive refinement +are also now supported and are recommended in general rather than +using what is described below.

    +

    In addition to specifying a tolerance or other criteria for flagging +individual cells as described above, it is possible to specify regions of +the domain so that all points in the region, over some +time interval also specified, will be refined to at least some level +minlevel and at most some level maxlevel. +These are specified through the parameter rundata.regiondata.regions in +setrun.py. +This is a list of lists, each of which specifies a region. A new region can +be added via:

    +
    rundata.regiondata.regions.append([minlevel,maxlevel,t1,t2,x1,x2,y1,y2])
    +
    +
    +

    This indicates that over the time period from t1 to t2, cells in the +rectangle x1 <= x <= x2 and y1 <= y <= y2 should be refined to at least +minlevel and at most maxlevel.

    +

    To determine whether a grid cell lies in one of the regions specified, the +center of the grid cell is used. If a mapped grid is being used, the limits +for the regions should be in terms of the computational grid coordinates, +not the physical coordinates.

    +

    If a cell center lies in more than one specified region, then the +cell will definitely be flagged for refinement at level L (meaning it should +be covered by a Level L+1 grid) if L+1 <= minlevel for any of the regions, +regardless of whether the general flagging criteria hold or not. +This means the smallest of the various minlevel parameters for any region +covering this point will take effect. Conversely it will not +be flagged for refinement if L+1 > maxlevel for all regions that cover +this point. This means the largest of the various maxlevel parameters for +any region covering this point will take effect. +(However, note that since flagged cells are buffered as described above by +flagging some adjacent cells, a cell may still end up flagged for refinement +even if the above tests say it should not be.)

    +

    For example, suppose that amr_levels_max = 6 has been specified along +with these two regions:

    +
    rundata.regiondata.regions.append([2, 5, 10.0, 30.0, 0.0, 0.5, 0.0, 0.5])
    +rundata.regiondata.regions.append([3, 4, 20.0, 40.0, 0.2, 1.0, 0.2, 1.0])
    +
    +
    +

    The first region specifies that from time 10 to 30 there should be at least 2 +levels and at most 5 levels of refinement for points in the spatial domain +0 < x < 0.5 and 0 < y < 0.5.

    +

    The second region specifies that from time 20 to 40 there should be at least 3 +level and at most 4 levels of refinement for points in the spatial domain +0.2 < x < 1.0 and 0.2 < y < 1.0.

    +

    Note that these regions overlap in both space and time, and in regions of +overlap the maximum of the minlevel and also the maximum of the +maxlevel parameters applies. So in the above example, from time 20 to 30 +there will be at least 3 levels and at most 5 levels in the region of +overlap, 0.2 < x < 0.5 and 0.2 < y < 0.5.

    +

    Within these regions, how many levels are chosen at each point will be +determined by the error flagging criteria, i.e. by the default +or user-supplied routine flag2refine, or as +determined by Richardson extrapolation, as described above.

    +

    Points that are not covered by either region are not constrained by the +regions at all. With amr_levels_max = 6 then they might +be refined to any level from 1 to 6 depending on the error flagging criteria.

    +
    +
    +

    Implementation

    +

    It is perhaps easiest to understand how this works by summarizing +the implementation. Note the order in which different flagging +criteria are checked was modified in Version 5.5.0 in order to avoid +the more expensive options for grid cells that are either forbidden +from being refined or forced to be refined based on regions they +lie in.

    +

    The regridding algorithm from level L to L+1 loops over all grid patches +(in parallel when OpenMP is used with +more than one thread). The cells on each patch are initially marked with +amrflags(i,j) = UNSET, a special value (set in amr_module.f90).

    +

    In flagging based on regions:

    +
    +
      +
    • If the current level is less than the +maximum of all minlevel values for regions that contain the cell, then it +is marked with amrflags(i,j) = DOFLAG.

    • +
    • If the current level is greater than or equal to the +maximum of all maxlevel values for regions that contain the cell, then it +is marked with amrflags(i,j) = DONTFLAG.

    • +
    +
    +

    If there are any cells in the patch that are still marked as UNSET after +checking all the regions, then if the setrun parameter flag2refine is +True, then the routine flag2refine is called. +The user may wish to create their own version of this routine. +The default library version was modified with the addition of the adjoint +option in Version 5.6.0 (see Guiding AMR with adjoint flagging), and does one of two things:

    +
    +
      +
    • If adjoint_flagging then it checks the inner product of the forward +solution with all adjoints over the specified time period and if the +magnitude is greater than tolsp the cell is marked DOFLAG.

    • +
    • Otherwise, the undivided difference of all components of q in each +coordinate direction is computed, e.g. abs(q(:,i+1,j) - q(:,i-1,j)) and +abs(q(:,i,j+1) - q(:,i,j-1)) in 2d, and if the maximum of these is +greater than tolsp the cell is marked DOFLAG.

    • +
    +
    +

    If there are still any cells in the patch that are still marked as UNSET, +then if the setrun parameter flag_richardson is +True, then the routine errest is called. This does flagging based on +estimates of the one-step error produced by Richardson extrapolation using +the solution on the current grid and on a coarsened grid. If +adjoint_flagging then these estimates are applied to the inner product of +the error estimate with the adjoint solutions over the relevant time period. +In either case, the setrun parameter flag_richardson_tol is used as the +tolerance.

    +
    +
    +

    Flagging criteria in GeoClaw

    +

    In GeoClaw, a special flag2refine subroutine is defined. +A standard approach for modeling tsunamis propagating across the ocean +is to refine anywhere that the surface elevation of the ocean \(\eta = +h+B\) is greater in absolute value than some specified wave_tolerance, e.g. +0.1 meter as set, for example, in the setrun.py file of +$CLAW/geoclaw/examples/tsunami/chile2010. +This wave_tolerance parameter can be set for any GeoClaw application.

    +

    Often this ends up refining the entire ocean when in fact only some waves +are of interest. In this case one can use regions as described in +Specifying flagregions for adaptive refinement to limit refinement to certain space-time regions.

    +

    Alternatively, starting in Version 5.6.0 one can use adjoint flagging (see +Guiding AMR with adjoint flagging) to better select the waves that will reach a particular +location over a specified time range, including those that might reflect off +distant shores.

    +

    Generally one must also use regions to allow (or force) much higher levels of +refinement over small regions along the coast if one is doing detailed +inundation modeling of a particular community.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/regression.html b/v5.10.x/regression.html new file mode 100644 index 0000000000..d20f9cdea4 --- /dev/null +++ b/v5.10.x/regression.html @@ -0,0 +1,401 @@ + + + + + + + + + Regression testing — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Regression testing

    + +

    Clawpack includes a number of tests that can be used to check for a working +installation or to see whether new changes to the code have broken anything.

    +
    +

    Running the tests

    +

    If you use multiple git branches, before running the tests you should check that +you have checked out appropriate branches of all relevant repositories; see Keeping track of repository versions with Git.

    +
    +

    PyClaw

    +

    Regression tests can be performed via:

    +
    cd $CLAW/pyclaw/examples
    +nosetests
    +
    +
    +

    For more details, see Running and writing tests in PyClaw. +(You may need to install nose +if nosetests is not on your system.)

    +
    +
    +

    Fortran codes

    +

    A few quick tests can be perfomed of the classic, amrclaw, or geoclaw +codes by running make tests in the corresponding tests subdirectory, e.g.:

    +
    cd $CLAW/classic/tests
    +make tests
    +
    +
    +

    This uses nosetests to run a few Python scripts that in turn run the +Fortran codes and then compare a small set of values derived from the output +of the run with values that are stored in these directories. +If one of these tests fails then there is a problem to be investigated, but +these tests do not provide good coverage of the code or check that +everything is working properly.

    +

    A somewhat more complete set of tests can be run by executing all of the +codes in the examples subdirectories and comparing the resulting plots +with those archived in the Clawpack Gallery. An attempt at automating this +can be found in the $CLAW/amrclaw/examples directory, which uses the +imagediff tool described below. This is still under development.

    +
    +
    +

    Travis continuous integration

    +

    Most Clawpack git repositories now contain a file .travis.yml at the top +level so that every time a pull request is issued on Github, a basic set of +tests is run. This uses the Travis continuous integration platform. Shortly after a PR is issued, Travis +will run the commands in the .travis.yml and report the results on the +PR page. Look for a green check mark (good) or a red X (bad) next to a commit +hash and click on it to see the Travis output. +[Sample output]

    +
    +
    +
    +

    Diff tools for checking test output

    +
    +

    chardiff tool for line-by-line comparison of output files

    +

    If _output_old and _output_new are two sets of output files from old and +new versions of a code, then it is often useful to do a line by line +comparison of all of the files in each directory and display any +differences. Standard tools such as xxdiff in linux or opendiff on a +Mac are not very good for this since they try to match up blocks of lines to +give the best match and may not compare the files line by line.

    +

    The Python script $CLAW/clawutil/src/python/clawutil/chardiff.py can be +used for this purpose:

    +
    $ python $CLAW/clawutil/src/python/clawutil/chardiff.py _output_old _output_new
    +
    +
    +

    will create a new directory with html files showing all differences. It can +also be used to compare two individual files. See the docstring for more +details.

    +
    +
    +

    imagediff tool for pixel comparison of plots

    +

    If _plots_old and _plots_new contain two sets of plots that we hope are +identical, the Python script +$CLAW/clawutil/src/python/clawutil/imagediff.py can be used to compare +the corresponding images in each directory and produce html files +that show each pair of images side by side. If the images are not +identical it also shows an image indicating which pixels are different +in the two:

    +
    $ python $CLAW/clawutil/src/python/clawutil/imagediff.py _plots_old _plots_new
    +
    +
    +

    will create a new directory with html files showing all differences. It can +also be used to compare two individual files. See the docstring for more +details.

    +
    +
    +
    +

    Running and writing tests in PyClaw

    +
    +

    Running the tests

    +

    The PyClaw test suite is built around nosetests for automatic test discovery, with +supplementary functionality from the pyclaw.util module. To run the +complete test suite with helpful output, issue the following command at the +top-level of the pyclaw source directory:

    +
    nosetests -vs
    +
    +
    +

    To run the parallel versions of the tests (if petsc4py is installed), run:

    +
    mpirun -n 4 nosetests -vs
    +
    +
    +

    Replace 4 with the number of processes you’d like test on. +Try prime numbers if you’re really trying to break things!

    +

    The -vs switch tells nose to be verbose and to show you stdout, which can be +useful when debugging tests. To run the tests with less output, omit the +-vs.

    +
    +
    +

    Running serial tests simultaneously

    +

    When running the tests, if your machine has multiple cores you can take +advantage of them by doing:

    +
    nosetests -vs --processes=2
    +
    +
    +

    (replace “2” with the number of processes you want to spawn). However, using +large numbers of processes occasionally causes spurious failure of some tests +due to issues with the operating system. If you see this behavior, it’s best +to run the tests in serial or with a small number of processes.

    +
    +
    +

    Running a specific test

    +

    The PyClaw tests are associated with particular applications in the examples/ sub- +directory of the primary repository directory. If you want to run tests for a +specific application, simply specify the directory containing the application +you are interested in:

    +
    nosetests -vs examples/acoustics_3d_variable
    +
    +
    +

    You can also specify a single file to run the tests it contains.

    +
    +
    +

    Doctests

    +

    Several of the main PyClaw modules also have doctests (tests in their +docstrings). You can run them by executing the corresponding module:

    +
    cd $PYCLAW/src/pyclaw
    +python grid.py
    +python state.py
    +
    +
    +

    If the tests pass, you will see no output. You can get more output by using +the -v option:

    +
    python state.py -v
    +
    +
    +
    +
    +

    Writing New Tests

    +

    If you contribute new functionality to PyClaw, it is expected that you will also +write at least one or two new tests that exercise your contribution, so that +further changes to other parts of PyClaw or your code don’t break your feature.

    +

    This section describes some functions in pyclaw.util that facilitate testing. +You do not have to use any of the functionality offered by pyclaw.util, but it +may simplify your test-writing and allow you to check more cases than you would +easily specify by hand.

    +

    The most important function in pyclaw.util is +pyclaw.util.gen_variants(), which allows you to perform combinatorial +testing without manually specifying every feature you’d like to perform. +Currently, gen_variants() can multiplicatively exercise +kernel_languages (Fortran or Python) and pure PyClaw or PetClaw implementations. +This allows you to write one function that tests four variants.

    +

    Another function provided by util is +pyclaw.util.test_app(). The test_app() function will +run an application as if started from the command line with the specified +keyword arguments passed in. This is useful for testing specific code that does +not necessarily work with petclaw, for example, and is not expected to.

    +

    You will notice that both gen_variants() and +test_app() require a verifier method as an argument. +These functions both effectively run tests and verify output with the following +function calls:

    +
    output = application(**kwargs)
    +check_values = verifier(output)
    +
    +
    +

    The verifier method needs to return None if there is no problem with the +output, or a sequence of three values describing what was expected, what it +received, and more details about the error. A very simple verifier method +that you can use is pyclaw.util.check_diff(), which can use either an +absolute tolerance or a relative tolerance to compare an expected value against +the test output from the application.

    +

    See examples/acoustics_1d_homogeneous/test_acoustics.py for a comprehensive example +of how to use gen_variants() and +check_diff(). See examples/shallow_sphere/test_shallow_sphere.py +for an example that uses test_app() and also loads a known +solution from disk using numpy.

    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_0_0.html b/v5.10.x/release_5_0_0.html new file mode 100644 index 0000000000..43436808f3 --- /dev/null +++ b/v5.10.x/release_5_0_0.html @@ -0,0 +1,184 @@ + + + + + + + + + v5.0.0 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.0.0 release notes

    +

    Clawpack 5.0.0 was released on January 8, 2014. See Installing Clawpack.

    +

    Clawpack 5.0 is a major reorganization of the Clawpack code base that has +been going on for several years. See Changes in Clawpack 5.0 for an overview of +many of the major changes.

    +
    +

    Changes to classic, riemann, amrclaw, geoclaw, visclaw

    +

    Are summarized in Changes in Clawpack 5.0.

    +
    +
    +

    Changes to PyClaw

    +

    For changes in PyClaw, see the PyClaw changelog.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_10_0.html b/v5.10.x/release_5_10_0.html new file mode 100644 index 0000000000..20ba114cba --- /dev/null +++ b/v5.10.x/release_5_10_0.html @@ -0,0 +1,357 @@ + + + + + + + + + v5.10.0 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.10.0 release notes

    +

    Clawpack 5.10.0 was released on XX. See Installing Clawpack.

    +

    Permanent DOI: http://doi.org/10.5281/zenodo.XX

    +

    Changes relative to Clawpack 5.9.2 (November 4, 2023) are shown below.

    +

    To see more recent changes that are in the the master branch but not yet +released, see Changes to master since v5.9.2.

    +

    Follow the links to see changes that have been made to the master branch of +each repository since the last release (v5.10.0) on XX.

    +

    These changes should appear in the next release. If you need them now, +see Developers’ Guide for instructions on cloning and installing from the +master branch.

    +

    To see documentation that has already been developed to accompany any new +features listed below, click on the “dev” branch of the documentation, in +the menu on the left hand side of this page.

    +
    +

    Changes that are not backward compatible

    +
      +
    • The switch to meson made in v5.9.2 requires the installation of some +additional packages for developers or others who choose to clone the +repositories from Github. The instructions in Installation instructions for developers +now include instructions to:

      +
      pip install -r requirements-dev.txt
      +
      +
      +

      as part of the installation.

      +
    • +
    • In GeoClaw, when solving equations on the sphere, a spherical source term +in the mass equation is now included by default. This term was missing +previously and so results may change. +See https://www.clawpack.org/sphere_source.html for more discussion +and instructions for omitting this source term.

    • +
    +
    +
    +

    Changes to classic

    +

    None.

    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +
      +
    • $CLAW/clawutil/src/Makefile.common, the main Makefile imported by all +application Makefiles in the Fortran versions, has been improved:

      +
        +
      • When using make new to recompile all routines, after the modules are +compiled all other fortran source codes are compiled in parallel, +speeding up the process.

      • +
      • RUNEXE was added to provide a string to be inserted before the name +of the executable EXE in order to run it. This is necessary in +particular to run the new 2D Boussinesq code using MPI, see +Boussinesq solvers in Two Space Dimensions for instructions.

        +

        (Support for this also added to +$CLAW/clawutil/src/python/clawutil/runclaw.py).

        +
      • +
      • If FC is any variant of gfortran then use the same flags as +gfortran.

      • +
      +
    • +
    • Support added to +$CLAW/clawutil/src/python/clawutil/data.py for checkpt_style==4 +in AMRClaw and GeoClaw (see below), and also for the +D-Claw code +for granular-fluid flows, +which is being updated to work with the latest version of Clawpack. +This is still work in progress.

    • +
    • Other minor changes.

    • +
    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +
      +
    • Change the default plotfigure.facecolor to white for plots made by frametools.py (rather than clawpack_tan).

    • +
    • Add hillshade option to frametools.py for better visualization of topography.

    • +
    • Add imshow_norm and imshow_alpha as ClawPlotItem attributes for imshow plots.

    • +
    • Remove deprecated faceted kwarg in calls to pcolor from frametools.py.

    • +
    • Option added to make mpeg movies when doing make plots. +Provided ffmpeg is installed, +simply include this line in setplot.py:

      +
      plotdata.mp4_movie = True
      +
      +
      +

      Then _plots will include movie_figN.mp4 for each figno N listed in

      +
      plotdata.print_fignos
      +
      +
      +

      and will also be linked from the _PlotIndex.html file.

      +

      You can also now easily change the name of the movie (also for the .html +version created by JSAnimation and the .gif version if requested) via e.g.:

      +
      plotdata.movie_name_prefix = 'chile2010_'   # default is 'movie_'
      +
      +
      +

      Then _plots will include chile2010_figN.mp4 for each figure.

      +
    • +
    • Updates to matlab plotting routines.

    • +
    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
      +
    • New Riemann solver for the p-system.

    • +
    • Clean up some other things.

    • +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
      +
    • Bug fix for case when the domain is periodic only in x and not in y.

    • +
    • STOP feature added: If you create a (possibly empty) file named STOP in the +run directory then the code will stop at the end of the current coarse grid +time step, after writing a checkpoint file. Useful to kill a computation with +the ability to restart after fixing something.

    • +
    • Most routines in $CLAW/amr/src/2d were cleaned up to replace do loop labels +and closing continue statements with more modern enddo, avoiding +many warning messages when compiling the code. +(Still need to clean up 1d and 3d, and classic code, but this cleans up +GeoClaw compilation a lot.)

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +
      +
    • For shallow water equations on the sphere, a spherical source term +in the mass equation is now included by default. This term was missing +previously and so results may change. +See https://www.clawpack.org/sphere_source.html for more discussion +and instructions for omitting this source term.

    • +
    • 1D GeoClaw code added, as described at GeoClaw in One Space Dimension. In particular there +are new directories $CLAW/geoclaw/src/1d_classic and +$CLAW/geoclaw/examples/1d_classic.

    • +
    • 1D Boussinesq code added in $CLAW/geoclaw/src/1d_classic/bouss and some of +the examples, as described in Boussinesq solvers in One Space Dimension.

    • +
    • 2D Boussinesq code added, as described in Boussinesq solvers in Two Space Dimensions. In particular there +are new directories $CLAW/geoclaw/src/2d/bouss and +$CLAW/geoclaw/examples/2d/bouss.

    • +
    • Using the 2D Boussinesq version of the code requires PETSc for solving the large sparse linear systems +that arise, which also requires LAPACK, BLAS, and MPI; +see Prerequisites for the 2d Boussinesq code.

    • +
    • checkpt_style == 4 is now supported, meaning to create a checkpoint file +at every output time. (As with other options, setting it to -4 means to +checkpoint at the same times but to alternate between two checkpoint files +rather than creating a unique file for each checkpoint, greatly reducing +storage if you only need the latest one.)

    • +
    • Introduce integer(kind=8) variables for some topo_module variables to +handle very large topo files for which the index was overflowing.

    • +
    • Introduce STOP feature as described in above for amrclaw.

    • +
    • Improve calculation of number of steps to take (ntogo) when CFL number is +too large in one step. (Still have issues sometimes where code dies with +too many dt reductions….)

    • +
    • Fix bug in python function clawpack.geoclaw.util.bearing and introduce new +clawpack.geoclaw.util.gctransect to compute points along a great circle +transect connecting two points on the sphere. (Transects obtained by +linear interpolation in x,y are fine over small regions but not for +global-scale transects.)

    • +
    • Other minor bug fixes, improvements, and cleanup.

    • +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    None.

    +

    See pyclaw diffs

    +

    For older changes in PyClaw, see also the PyClaw changelog.

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_1_0.html b/v5.10.x/release_5_1_0.html new file mode 100644 index 0000000000..fb66b78ffa --- /dev/null +++ b/v5.10.x/release_5_1_0.html @@ -0,0 +1,298 @@ + + + + + + + + + v5.1.0 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.1.0 release notes

    +

    Clawpack 5.1.0 was released on March 2, 2014. See Installing Clawpack.

    +
    +

    Changes to classic

    +
      +
    • None

    • +
    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +
      +
    • Minor change for replacing a rundata object.

    • +
    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +
      +
    • Replaced JSAnimation.IPython_display.py by improved version.

    • +
    • Added an attribute to data.py.

    • +
    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
      +
    • Changes to multi-layer code – do not attempt to compile by default +since LAPACK is required.

    • +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
      +
    • Fixed the calling sequence where setaux is called two places in the +regridding routines.

    • +
    • Several other minor fixes.

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +
      +
    • Changed gauge output to avoid underflow in printing.

    • +
    • Major change to the way moving topography (dtopo) is handled to correct +problems observed with earlier versions of GeoClaw in which the moving +topography was not always tracked properly. A number of other +improvements were also made to the way topography more generally is +handled. Some improvements:

      +
      +
        +
      • Multiple dtopo files can be specified with overlapping time ranges and +spatial extent.

      • +
      • Each dtopo file now results in the automatic creation of a topo array +at the same resolution as the dtopo array that is updated before each +time step so that it contains the proper topography plus dtopo. +These arrays remain after the dtopo stops moving and contain the final +topography at the final time. This avoids issues where dtopo might +have been specified at much finer resolution than the topo files. (In +earlier versions, the topo arrays were updated to incorporate the +final topo+dtopo but only stored at the resolution of the original +topo files.)

      • +
      • The routine for integrating the bilinear function defined by all +topo arrays over a grid cell to compute aux(1,i,j) has been improved +by making it a recursive function that can handle an arbitrary number +of nested topo grids (including those created automatically from dtopo +grids). Previous versions died if there were more than 4 nested topo +grids.

      • +
      +
      +
    • +
    • Several changes to the Makefile for a GeoClaw run are required because +of refactoring of this code. You must:

      +
      +
        +
      • Remove the line

        +
        $(GEOLIB)/dtopo_module.f90 \
        +
        +
        +
      • +
      • Replace the lines

        +
        $(GEOLIB)/movetopo.f \
        +$(GEOLIB)/cellgridintegrate.f \
        +
        +
        +

        by

        +
        $(GEOLIB)/topo_update.f90 \
        +$(GEOLIB)/cellgridintegrate2.f \
        +
        +
        +

        For an example, see the changes made to +$CLAW/geoclaw/examples/tsunami/chile2010/Makefile,

        +
      • +
      +
      +

      As always, you should do make new in your application directory +after updating the version.

      +
    • +
    • A new parameter has been added that can be set in setrun.py:

      +
      rundata.dtopo_data.dt_max_dtopo = 0.2
      +
      +
      +

      for example will specify that the maximum time step allowed on the +coarsest level is 0.2 seconds during the time when the topography is +moving. This avoids issues where the time step selected by the CFL +condition is much larger than the time scale over which the topography +changes. You must also set rundata.clawdata.dt_initial to the same +value (or smaller) to insure that the first time step is sufficiently small.

      +
    • +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +
      +
    • Added 3d capabilities to SharpClaw.

    • +
    • Many other minor fixes.

    • +
    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_2_0.html b/v5.10.x/release_5_2_0.html new file mode 100644 index 0000000000..a93260fff4 --- /dev/null +++ b/v5.10.x/release_5_2_0.html @@ -0,0 +1,257 @@ + + + + + + + + + v5.2.0 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.2.0 release notes

    +

    Clawpack 5.2.0 was released on July 18, 2014. See Installing Clawpack.

    +

    Changes relative to Clawpack 5.1.0 (March 2, 2014) are shown below.

    +
    +

    Changes to classic

    +
      +
    • Change max number of values printed on each line of fort.q files to 50.

    • +
    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +
      +
    • Add nohup and nice options to runclaw.py

    • +
    • Some minor corrections.

    • +
    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +
      +
    • Several minor improvements.

    • +
    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
      +
    • Some minor corrections.

    • +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
      +
    • Refactoring of code handling aux arrays when regridding. +Now allows setaux to check aux(1,i,j) to determine if the +values aux(:,i,j) need to be set or if this cell has already been set by +copying from aux arrays at the same level that existed before +regridding. It should always be ok to just set them, so this should be +backward compatible. But this allows avoiding recalculating aux values +unnecessarily in cases where this computation is very expensive. In +particular, this was done so that geoclaw does not need to recompute +cell averages of topography (see geoclaw changes below for more details).

    • +
    • Fixed (?) sphere boundary conditions for clamshell grids.

    • +
    • Change max number of values printed on each line of fort.q files to 50.

    • +
    • Several other minor fixes.

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +
      +
    • Refactoring of code handling aux arrays when regridding. +Now allows setaux to check aux(1,i,j) to determine if the +values aux(:,i,j) need to be set or if this cell has already been set by +copying from aux arrays at the same level that existed before +regridding. This is used in geoclaw to avoid recomputing cell averages of +topography, which requires integrating a piecewise bilinear function +formed from all the topography grids that overlap the grid cell. This +can be expensive particularly when a grid cell is covered by a finer +topography grid.

    • +
    • Several changes have been made to the fgmax routines that are used to +keep a running maximum of values over the entire calculation. +See Fixed grid monitoring (fgmax) for documentation on the latest version.

    • +
    • Major refactoring of the module +$CLAW/geoclaw/src/python/geoclaw/topotools.py. +The file $CLAW/geoclaw/tests/test_topotools.py contains some tests of these +tools. Looking at these test routines will give some ideas on how to use them. +More documentation is needed.

    • +
    • Change max number of values printed on each line of fort.q files to 50.

    • +
    • Multilayer shallow water equations functionality and test problem added.

    • +
    • Several other corrections and minor improvements.

    • +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_2_1.html b/v5.10.x/release_5_2_1.html new file mode 100644 index 0000000000..6bdd9db1bc --- /dev/null +++ b/v5.10.x/release_5_2_1.html @@ -0,0 +1,235 @@ + + + + + + + + + v5.2.1 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.2.1 release notes

    +

    Clawpack 5.2.1 was released on October 2, 2014. See Installing Clawpack.

    +

    Changes relative to Clawpack 5.2.0 (July 18, 2014) are shown below.

    +
    +

    Changes to classic

    +
      +
    • Minor fix to limits of dtdx1d and dtdy1d arrays.

    • +
    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +
      +
    • Added JSAnimation_frametools.py

    • +
    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
      +
    • Refactor multi-layer shallow water solvers

    • +
    • 3d Euler fixes

    • +
    • rpn2_vc_advection

    • +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
      +
    • Minor changes

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    + +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_2_2.html b/v5.10.x/release_5_2_2.html new file mode 100644 index 0000000000..dd31b789eb --- /dev/null +++ b/v5.10.x/release_5_2_2.html @@ -0,0 +1,231 @@ + + + + + + + + + v5.2.2 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.2.2 release notes

    +

    Clawpack 5.2.2 was released on October 28, 2014. +See Installing Clawpack and https://github.com/clawpack/clawpack/releases/.

    +

    Changes relative to Clawpack 5.2.1 (October 2, 2014) are shown below.

    +
    +

    Changes to classic

    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    + +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_3_0.html b/v5.10.x/release_5_3_0.html new file mode 100644 index 0000000000..e69902934a --- /dev/null +++ b/v5.10.x/release_5_3_0.html @@ -0,0 +1,349 @@ + + + + + + + + + v5.3.0 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.3.0 release notes

    +

    Clawpack 5.3.0 was released on May 21, 2015. See Installing Clawpack.

    +

    Changes relative to Clawpack 5.2.2 (October 28, 2014) are shown below.

    +
    +

    Changes to classic

    +
      +
    • One example added with a pointwise Riemann solver.

    • +
    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +
      +
    • Added nbtools.py module for working with Jupyter (formerly IPython) +notebooks (still work in progress).

    • +
    • Added ability to correctly call alternative Makefiles, e.g.

      +
      make .plots -f Makefile_kml
      +
      +
      +
    • +
    • Added support for preprocessing variables and flags

    • +
    • Added support for storm surge code

    • +
    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +
      +
    • Added support for creating kml files that can be viewed on Google Earth +(for GeoClaw applications). See Visualizing GeoClaw results in Google Earth.

    • +
    • Added some support for JSAnimation in notebooks and other improvements, in +particular to insure that filenames do not have extraneous spaces and fail +to show up in animation.

    • +
    • Added support for ForestClaw

    • +
    • Added function gaugetools.compare_gauges and support for gauges in 3d.

    • +
    • Deprecate plot_topo_file and TopoPlotData in favor of +topotools.Topography methods.

    • +
    • Some refactoring and cleaning up of code, and minor bug fixes.

    • +
    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
      +
    • Added 3d Euler equations in general geometries using f-waves.

    • +
    • Added 2d acoustics solvers for mapped grids.

    • +
    • Added some pointwise Riemann solvers for several problems in 1d and 2d.

    • +
    • Added riemann_tools.py and other code to facilitate showing Riemann +solutions in notebooks. Still work in progress.

    • +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
      +
    • Substantial refactoring of code, much of which should be invisible to +users.

    • +
    • Some changes are required in any application Makefile to +update from 5.2.2 to 5.3.0.

      +
        +
      • In 2d, remove:

        +
        $(AMRLIB)/dumpgauge.f \
        +
        +
        +
      • +
      • In 2d, add the files:

        +
        $(AMRLIB)/stepgrid_dimSplit.f \
        +$(AMRLIB)/step2x.f90 \
        +$(AMRLIB)/step2y.f90 \
        +$(AMRLIB)/flux2_dimSplit.f \
        +
        +
        +
      • +
      • In 3d, add the MODULE:

        +
        $(AMRLIB)/gauges_module.f90
        +
        +
        +

        somewhere after $(AMRLIB)/amr_module.f90 in the list of modules.

        +
      • +
      • In 3d, add the files:

        +
        $(AMRLIB)/stepgrid_dimSplit.f \
        +$(AMRLIB)/step3x.f \
        +$(AMRLIB)/step3y.f \
        +$(AMRLIB)/step3z.f \
        +$(AMRLIB)/flux3_dimSplit.f \
        +
        +
        +
      • +
      +

      Here AMRLIB = $(CLAW)/amrclaw/src/2d in 2d, for example

      +
    • +
    • Gauge output refactored.

    • +
    • Gauge output option added to 3d code. For an example, see +$CLAW/amrclaw/examples/advection_3d_swirl/setrun.py

    • +
    • Dimensional splitting option added to both 2d and 3d code. To use, in +setrun.py set clawdata.dimensional_split to “split” or 1.

    • +
    • New approach to handling boundary conditions to fix bug where +boundary conditions varying spatially along a boundary could not be specified. +Illustrated in new examples/advection_2d_inflow.

    • +
    • alloc changed from pointer to allocatable, igetsp stack-based,

    • +
    • Several bug fixes, particularly in 3d code.

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +
      +
    • Some changes are required in any application Makefile to +update from 5.2.2 to 5.3.0.

      +
        +
      • add the MODULEs:

        +
        $(GEOLIB)/gauges_module.f90 \
        +$(GEOLIB)/surge/holland_storm_module.f90 \
        +$(GEOLIB)/surge/stommel_storm_module.f90 \
        +$(GEOLIB)/surge/constant_storm_module.f90 \
        +$(GEOLIB)/surge/storm_module.f90 \
        +$(GEOLIB)/friction_module.f90
        +
        +
        +
      • +
      • remove the MODULE:

        +
        $(AMRLIB)/gauges_module.f90 \
        +
        +
        +
      • +
      • remove the file:

        +
        $(GEOLIB)/dumpgauge.f \
        +
        +
        +
      • +
      +

      Here GEOLIB = $(CLAW)/geoclaw/src/2d/shallow.

      +

      Note that $(GEOLIB)/gauges_module.f90 must come after both +` $(AMRLIB)/amr_module.f90` and +$(GEOLIB)/geoclaw_module.f90 in the list of modules.

      +
    • +
    • Gauge output refactored as in amrclaw. Note it is now necessary to use +the version of gauges_module.f90 in geoclaw rather than the version from +amrclaw since the subroutine for printing the gauges is now in this module +rather than in dumpgauge.f. In geoclaw, an additional column is +printed for eta = B + h, the sea surface, in addition to the +components of q.

    • +
    • Multilayer code merged in and several routines refactored or consolidated.

    • +
    • New support added for creating kml files for plotting results on Google +Earth.

    • +
    • Topography topo_type 2 and 3 are now more flexible:

      +
        +
      • The header lines can have either the number or the text first, e.g.

        +
        NCOLS 200
        +
        +
        +

        or

        +
        200 NCOLS
        +
        +
        +

        (In either case the label is ignored, the order of lines is all that +matters). Both Python and Fortran codes now support this.

        +
      • +
      • The header line for the cellsize dx can now have a single value +or two values dx and dy for different resolutions in longitude and +latitude. Previously a single value was allowed and dx == dy assumed.

      • +
      +
    • +
    • Added support for creating kml files that can be viewed on Google Earth +(for GeoClaw applications). See Visualizing GeoClaw results in Google Earth.

    • +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_3_1.html b/v5.10.x/release_5_3_1.html new file mode 100644 index 0000000000..86b5d6756e --- /dev/null +++ b/v5.10.x/release_5_3_1.html @@ -0,0 +1,266 @@ + + + + + + + + + v5.3.1 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.3.1 release notes

    +

    Clawpack 5.3.1 was released on November 10, 2015. See Installing Clawpack.

    +

    Changes relative to Clawpack 5.3.0 (May 21, 2015) are shown below.

    +
    +

    Changes to classic

    +

    Minor fixes and new testing framework.

    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +

    Allow checkpt_style < 0 in setrun.py, see Changes to amrclaw below.

    +

    New testing framework.

    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +

    Added amr_data_show attribute to ClawPlotItem to suppress certain amr levels in plotting.

    +

    Read gauge locations from setgauge.data file found in plotdata.outdir (the +output directory where fort.gauge is located) rather +than from datadir. This works better if gauges are changed for new runs but +you want to plot old output, since the correct setgauge.data input for a run +is copied to the output directory at the start of the run.

    +

    Fix colormaps.add_colormap function to work better for combining two +different colormaps for different ranges of a variable in certain cases.

    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +

    Added src/riemann_interactive.py for making interactive plots of the phase +plane in Jupyter notebooks. For an example, see +http://nbviewer.ipython.org/github/maojrs/ipynotebooks/blob/master/interactive_test.ipynb.

    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +

    Bug in 3d dimensional splitting fixed — the CFL was computed incorrectly, +causing the code to use timesteps that are too large and go +unstable in some cases.

    +

    Improved the checkpoint and restart capabilities, adding the option to set +checkpt_style < 0 in setrun.py if you want the checkpoint to alternate +between two files rather than creating a unique new file each time a +checkpoint is done. This reduces storage needed if you want to checkpoint +frequently but only need the most recent one, e.g. to guard against crashes +in a long run. Two files are used in case the code crashes in the middle of +doing a checkpoint, the previous one is still intact. You can set +checkpt_style = -2, for example, to give the same behavior as +checkpt_style = 2 but saving only two latest checkpoint files.

    +

    With this feature turned on, instead of files with names like +fort.chk00100 and fort.tck00100 being created for a checkpoint +after 100 steps, the files are named either fort.chkaaaaa, +fort.tckaaaaa or fort.chkbbbbb, fort.tckbbbbb and these names +alternate. (The fort.tck files are very small with information +about the time of checkpointing, the solution data is all in the fort.chk file.)

    +

    Also improved checkpointing so that the output files fort.amr and fort.gauge +have buffers flushed whenever checkpointing, to avoid possibly losing some +gauge output if the code crashes. Now fort.gauge will have data at least +up to the last checkpoint time.

    +

    Fixed so that advanc is not called initially if flag_richardson is +False, avoiding some unneeded work in this case.

    +

    Better reporting of statistics regarding run time and number of cells +integrated is now provided to the screen at the end of a run, and to the +file _output/fort.amr. In particular, better reports wall time vs. CPU +time when OpenMP is used, and breaks this down into several groups to help +determine where the code is spending the most time. See Timing Statistics.

    +

    New testing framework and several changes in the tests directory.

    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +

    NetCDF format can now be used for topography files by specifying topo_type = 4, +both in topotools.py and when reading into the Fortran modeling code.

    +

    Binary output option added for multi-layer code.

    +

    Bug fixes in topotools and dtopotools.

    +

    Better reporting of statistics regarding run time and number of cells +integrated is now provided to the screen at the end of a run, and to the +file _output/fort.amr. In particular, better reports wall time vs. CPU +time when OpenMP is used, and breaks this down into several groups to help +determine where the code is spending the most time.

    +

    Restart option changed so that fort.gauge is appended to rather than +clobbering the previous version. This may be modified in future releases, +it is currently inconsistent with what’s done in amrclaw. See +https://github.com/clawpack/clawutil/issues/93.

    +

    New testing framework.

    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_4_0.html b/v5.10.x/release_5_4_0.html new file mode 100644 index 0000000000..b97c5a9d97 --- /dev/null +++ b/v5.10.x/release_5_4_0.html @@ -0,0 +1,375 @@ + + + + + + + + + v5.4.0 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.4.0 release notes

    +

    Clawpack 5.4.0 was released on January 17, 2017. See Installing Clawpack.

    +

    Changes relative to Clawpack 5.3.1 (November 9, 2015) are shown below.

    +
    +

    Global changes

    +

    Python 3 compatibility. Python code in all repositories has been updated so +that it should work with either Python 2 or Python 3. In particular the +statements:

    +
    from __future__ import absolute_import
    +from __future__ import print_function
    +
    +
    +

    have been added and print statements have been replaced by print functions. +Various other minor changes were also required.

    +

    Makefile structure for Fortran codes. +The Makefile in all Fortran examples and tests has been +modified to rely on a common list of library source code files, +rather than listing all of these in every Makefile. Capabilites include +the ability to specify whether a library file should be replaced +by one from the local directory. This is cleaner and will make it +easier to update code in the future – if a new library routine is +required only one master list needs updating rather than the +Makefile in every example and users’ application directories. +See Library routines in Makefiles for more details on how to specify +local files in place of default library files.

    +

    It is also no longer necessary to set the Makefile variable +RESTART to True or False. Instead you can set it to None (or omit +setting it at all, since this is the default), in which case the setrun.py +file will be used to determine if this is a restart run (in which case +the previous output directory should be added to, rather than replaced).

    +

    Improved Gauge Output Options +Gauges in amrclaw and geoclaw now support a number of additional +output options including:

    +
    +
      +
    • specification of output fields, i.e. you can now specify the q and aux +fields that are output;

    • +
    • specification of output field format, i.e. you can now specify the number +of digits to output;

    • +
    • a minimum length of time at which a gauge is allowed to output, i.e. if +this was set to 10 time units then the gauge would only output every 10 +time units or longer;

    • +
    • support for future file format specifications (only ASCII is supported now);

    • +
    +
    +

    Other improvements to gauge handling include:

    +
    +
      +
    • a refactor of how the code stores gauge data has been done in the Fortran +gauges_module.f90 source file in each library.

    • +
    • Gauge output is accumulated in a buffer internally and written out +intermitently, instead of writing to disk every time step. +(The parameter MAX_BUFFER in the amrclaw library routines +gauges_module.f90 controls the size of this buffer.)

    • +
    • The gauge output for the gauges is written to distinct files in the +output directory, e.g. gauge00001.txt for gauge number 1. In previous +versions of Clawpack all gauges were written to a single file +fort.gauge. The new approach allows gauges to be written in parallel and +also facilitates reading in a single gauge more quickly.

    • +
    • Some header info appears in each of these files to describe the gauge +output.

    • +
    • When doing a restart (see Checkpointing and restarting), gauge output from the original run +is no longer overwritten by the second run. Instead gauge +output from the restart run will be appended to the end of each +gaugeXXXXX.txt file.

    • +
    +
    +

    Updated regression testing framework for Fortran. +The Fortran code uses an updated framework and so the regression data has +changed.

    +
    +
    +

    Changes to classic

    +

    Makefile structure. See discussion above, under +Global changes.

    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +

    Makefile structure. The Makefile.common was updated to support the +changes described in the discussion above, under +Global changes.

    +

    Better support for gauges. +New supporting code added.

    +

    Updated regression testing framework for Fortran. +New supporting code added.

    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +

    Parallel Plotting in setplot.py. +A new capability has been added to plot multiple frames at once on +a multicore machine when doing make plots (i.e. not interactive). +The png files for different frames can be simultaneously generated. +To use this feature you need to:

    +
    +
      +
    • Add the line plotdata.parallel = True (usually at the +bottom) to setplot.py.

    • +
    +
    +

    and then either:

    +
    +
      +
    • Add the line plotdata.num_procs = 4 (or however many processes you +wish to use), or

    • +
    • Alternatively you can set the shell environment variable +OMP_NUM_THREADS to the number of processes desired.

    • +
    +
    +

    The value specified by OMP_NUM_THREADS is used only if +plotdata.num_procs is not set. If neither is set, the default +is to use only one process.

    +

    Gauge plots. +Updates to go with improvements to how gauges are handled.

    +

    KML files for GeoClaw output. +Some improvements have been made to the capabilities for creating KML and +KMZ files for plotting on Google Earth or with other GIS tools.

    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +

    GeoClaw Riemann solver. The Riemann solver generally used in GeoClaw has +been updated to fix a couple issues:

    +
    +
      +
    • The transverse velocity jump is now put into the 1-wave or 3-wave rather +than the 2-wave. This avoids some cases where transverse velocity does +not propagate past jump in bathymetry, may improve some instability issues. +See https://github.com/clawpack/riemann/pull/111 for details.

    • +
    • The tolerance used in the transonic test has been modified to be better +scaled.

    • +
    +
    +

    These changes cause some changes to results computed with GeoClaw. They +have been fairly extensively tested by now and give results that are +generally believed to be at least as good or better than the previous +version.

    +

    Some other solvers were added or updated.

    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +

    Makefile structure. See discussion above, under +Global changes.

    +

    Gauge output See discussion above, under +Global changes.

    +

    Ghost Cell (filpatch) Filling. +A list of the neighboring grids at same the level of refinement +that are used for filling ghost cells for each grid patch is saved between +regridding steps. This improves the speed of filpatch +operations. (Not yet implemented for neighboring grids at coarser level, +still have to search for neighbors.)

    +

    Proper Nesting. +Insidious but rare bug fixed, where occasionally a fine level grid had +cells with no underlying coarse grid cell from which to interpolate the +new values. The fix can make regridding more expensive when more than 3 +levels of refinement are used. (This will be addressed in future +revisions). Also, there were several different ways of projecting a +cell to a coarser level. This was made consistent across all routines. +The refined grids that are generated are now somewhat different and may +cover a slightly larger area than in previous releases.

    +

    3D filpatch bug fix. +Fixed a bug in calculating indices used when interpolating from coarse to fine +grid ghost cells. (Fixed in 2D in previous release.)

    +

    Output Formats. +Enlarged formats in many format statements used for ascii output +throughout.

    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +

    Changes to Riemann solver. The default Riemann solver used +for single-layer shallow water equations was modified, causing potential +changes to computed results. See the discussion above, under +Changes to riemann.

    +

    Makefile structure. See discussion above, under +Global changes.

    +

    Gauge output See discussion above, under +Global changes.

    +

    The changes in amrclaw titled Ghost Cell (filpatch) Filling, +Proper Nesting and Output Formats +also affect geoclaw. See notes above.

    +

    fgmax Checkpoint/Restart Capability. +If checkpoints have been requested, fgmax variables are +added to the end of the checkpoint file. This enables a calculation to +restart for a longer simulation time and still compute valid fgmax +amplitudes and arrival times, instead of reinitializing the fgmax arrays. +See Fixed grid monitoring (fgmax).

    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    Python 3 compatibility. See discussion above, under +Global changes.

    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_4_1.html b/v5.10.x/release_5_4_1.html new file mode 100644 index 0000000000..7374a06247 --- /dev/null +++ b/v5.10.x/release_5_4_1.html @@ -0,0 +1,263 @@ + + + + + + + + + v5.4.1 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.4.1 release notes

    +

    Clawpack 5.4.1 was released on June 28, 2017. See Installing Clawpack.

    +

    Changes relative to Clawpack 5.4.0 (February 17, 2017) are shown below.

    +
    +

    Changes to documentation

    +

    The documentation repository https://github.com/clawpack/doc has been refactored so that versioning is now supported. On the menu to the left of the Clawpack documentation pages, at the bottom you should see links to select previous versions of the documentation, in particular v5.4.0 and some earlier versions. The master version points to the current master branch of the doc repository used to build the documentation.

    +

    If you switch to different version of a page, use the back button to return to the version for the current release, or click on the Clawpack logo to get back to this version. If you click on the master version most things will work but links to gallery pages will not (due to the way relative paths are specified since inter-sphinx is now used for different projects in the main docs and the gallery). Old versions of the gallery are not available.

    +

    Instructions for building the documentation have been updated in Guide for updating this documentation.

    +
    +
    +

    Changes to classic

    +

    The Woodward-Collela blast wave problem for 1-dimensional Euler was added to the examples.

    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +

    Minor changes.

    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +
      +
    • Fixes for Python3 compatibility.

    • +
    • There are still some known issues when making plots using Python3 that are being worked on. See e.g. https://github.com/clawpack/visclaw/pull/219.

    • +
    • Improve KML functionality.

    • +
    • Add legend_tools module to simplify adding a legend.

    • +
    • Other minor fixes.

    • +
    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
      +
    • Added several Riemann solvers for new problems.

    • +
    • Improved several existing solvers.

    • +
    • The GeoClaw Riemann solver riemann_aug_JCP in geoclaw_riemann_utils.f +has been modified to incorporate pressure source terms for storm surge +simulations. The calling sequence has changed.

    • +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +

    The major new addition is 1d amrclaw code in the src/1d directory and +some examples in the examples directory. (Also regression tests in tests). +These examples have also been added to the gallery at www.clawpack.org. +This code was based on the 2d code but reduced to a fully 1d version that is better than the previous approach of using the 2d code with only 1 cell in the y direction. This code has not yet been extensively tested on challenging problems, so let us know if you run into problems with it.

    +
      +
    • Cleanup some code related to timers.

    • +
    • Fix a problem with integer overflows in some cases.

    • +
    • Suppress printing Courant number every timestep to fort.amr

    • +
    • Print more digits in gauge locations to output files gauge*.txt.

    • +
    • The code in $CLAW/amrclaw/src/2d has had comments improved and added so that doxygen can be used, see Doxygen documentation of AMRClaw.

    • +
    • Other minor fixes.

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +
      +
    • Allow more flexibility in specification of fgmax grids when doing a restart.

    • +
    • Print more digits in gauge locations to output files gauge*.txt.

    • +
    • For storm surge, the pressure gradient source term has been moved to the +Riemann solver for well-balancing. This may cause slightly different +results on these applications but should not affect others.

    • +
    • The output and plotting functions for surge and multilayer versions been refactored.

    • +
    • Other minor fixes and improvements of Python tools.

    • +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_5_0.html b/v5.10.x/release_5_5_0.html new file mode 100644 index 0000000000..ece81a136e --- /dev/null +++ b/v5.10.x/release_5_5_0.html @@ -0,0 +1,412 @@ + + + + + + + + + v5.5.0 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.5.0 release notes

    +

    Clawpack 5.5.0 was released on August 28, 2018. See Installing Clawpack.

    +

    Changes relative to Clawpack 5.4.1 (June 28, 2017) are shown below.

    +
    +

    Changes to documentation

    +

    For developers: There is no longer a master branch in the +clawpack/doc repository.

    +

    Use branch v5.5.0 for updates to current documentation and the dev branch +for developing documentation for changes or new features that are in the +master branch of the code repositories but are not yet in an official +release.

    +
    +
    +

    Changes that are not backward compatible

    +
      +
    • The format of checkpoint styles has changed for AMRClaw and GeoClaw, so old +checkpoint files can not be used to restart with newer code.

    • +
    • In GeoClaw, the way some topofiles are interpreted has been changed to conform with +the intended “grid registration”. +This is not backward compatable for files with headers that specify +xllower, yllower. See below for more details.

    • +
    • Many of the previous storm surge capabilies in GeoClaw have been enhanced and +simplified in terms of handling storm input. Some of these changes are not +backwards compatible due to the way storm data is now specified and how +time references to landfall are now specified. The examples in GeoClaw now +are updated to reflect these changes however and it is highly recommended +that users look at these examples for how to change their own existing +examples.

    • +
    +
    +
    +

    General changes

    +
    +
      +
    • LICENSE file added to all repositories, with BSD license

    • +
    • CODE_OF_CONDUCT.md has been added to the super repository so as to +define a code of conduct for the community.

    • +
    +
    +
    +
    +

    Changes to classic

    +
    +
      +
    • None other than addition of License.

    • +
    +
    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +
    +
      +
    • Minor changes

    • +
    +
    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +
    +
      +
    • The script src/python/visclaw/plot_timing_stats.py +can be used to plot timing data that is now printed out following +AMRClaw and GeoClaw runs. See the AMRClaw notes below for more details.

    • +
    • Minor changes to Matlab codes

    • +
    • Minor changes to kml functionality, and printing of more digits

    • +
    • ClawPlotItem.colorbar_kwargs added for setting other colorbar keyword +arguments

    • +
    • ClawPlotAxes.beforeframe added to allow e.g. plotting on a background +image, see PR #226 for an +example.

    • +
    +
    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
    +
      +
    • Add some vectorized Riemann solvers

    • +
    • Changes to layered shallow water solvers

    • +
    • Add some Riemann solvers for adjoint equations

    • +
    +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
      +
    • The valout.f routine in amrclaw/src/Nd (for N=1,2,3) +has been cleaned up as valout.f90, and now also prints out timing +information to two files in the output directory: timing.txt contains a +summary at the end of the run, while timing.csv contains cumulative timing +information at each output time.

    • +
    • The boundary condition routines amrclaw/src/Nd/bcNamr.f (for N=1,2,3) +have been replaced with modernized versions amrclaw/src/Nd/bcNamr.f90 +that should be easier to read and modify by users if necessary.

    • +
    • The script $CLAW/visclaw/src/python/visclaw/plot_timing_stats.py +can be used to plot this data (or modify this script as desired). +Information on both wall time and CPU time is +included, particularly useful for multi-core simulations.

    • +
    • Write more digits in regions.data file.

    • +
    • Clean up some timing variables.

    • +
    • The maximum number of allowable refined grids is now +variable, and no longer static. If the current maximum +is exceeded, all arrays dimension at maxgr, namely +rnode, node, and listOfGrids (currently set +to 10000) are resized by another 10K. +bndList is also now resizable.

    • +
    • The format of checkpoint files changed to include maxgr. +This is not backward compatible – old checkpoint files can not be used +to restart with the new code.

    • +
    • Makefile.amr_2d changed to include the new files to initialize, +restart, and resize the nodal arrays and boundary lists.

    • +
    • The gauges had one some variable that depended +on maxgr. By changing the gauges algorithm, this was +eliminated. The old algorithm did not scale well for +O(10^5) grids and O(100) gauges. The new algorithm just +has each grid patch sort the gauge list to see if it has any +gauges to update. (The old algorithm sorted all grid owners and +their owner gauges, (thus needing to save that mapping), and +therefore was an index lookup by grid number. But again, 10^5 +grids needing 2 arrays for only 100 gauges did not make sense. +Also changed the algorithm for finding the best source grid for a +gauge. By starting at the finest level, and rearranging the order +of the loops, once a grid owner was found for a gauge there was no +need to search the rest of the grids.

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +
      +
    • Makefile.geoclaw changed to include the new files to initialize, +restart, and resize the nodal arrays and boundary lists.

    • +
    • The way some topofiles are interpreted has been changed to conform with +the intended “grid registration”. In particular, topofiles with a header +containing xllower and yllower contain data that should be viewed as +cell-centered data on a uniform grid that starts at +(xllower + dx/2, yllower + dy/2) and not at (xllower, yllower). +See PR #303 for more +discussion and Grid registration for documentation. +This is not backward compatable for files with these headers. +Change the header to specify xlower and ylower (or xllcenter, +yllcenter) if you want the data to be interpreted in the old manner.

    • +
    • The boundary condition routine geoclaw/src/2d/shallow/bc2amr.f +have been replaced with a modernized version geoclaw/src/2d/shallow/bc2amr.f +that should be easier to read and modify by users if necessary. +(Similar to changes made in amrclaw.) In the case of extrapolation boundary +conditions all aux variables are also copied rather than just bathymetry.

    • +
    • The format of checkpoint files changed to include maxgr. +This is not backward compatible – old checkpoint files can not be used +to restart with the new code.

    • +
    • The valout.f routine in src/2d/shallow +has been cleaned up as valout.f90, and now also prints out timing +information to two files in the output directory. See the notes +for amrclaw above for more details.

    • +
    • The storm surge capabilties have been significantly changed including:

      +
        +
      • A new storm format that GeoClaw now reads in directly. There is also +a new Python storm module that contains the capability of converting +many common formats into the format that GeoClaw now expects. These +formats currently include ATCF, HURDAT, JMA, IBtRACS, and TCVITALS.

      • +
      • Time reference is now specific to landfall or anything else that the +use requests. In other words you no longer need absolute values of +start and stop times but everything is relative to landfall.

      • +
      • The Fortran code for storms is now simplified following the above +restricted format. This is all handled via the Python module.

      • +
      • Additional parameterized wind and pressure fields are now included +in addition to the existing Holland 1980 field.

      • +
      • Additional preliminary support for storm data beyond parameterized +versions have been added. This is primarily in the form of stubs +so that an API can be establised for the different data sources that +we intend to add in the future including HWRF and other formats.

      • +
      • Changes to plotting storm surge applications have also been included +that mimic the ones above. Again please refer to the examples in +GeoClaw to see how to adapt your application.

      • +
      +
    • +
    • Multi-layer shallow water solvers have been extended to work with AMR. +(This is still under development and may have some bugs.)

    • +
    • There is a new Makefile.multilayer file that should be used for +multilayer applications.

    • +
    • Makefile.geoclaw changed to include the new files to initialize, +restart, and resize the nodal arrays and boundary lists.

    • +
    • New capabilities have been added to read topofiles in netCDF, and also to +download topo DEMs from .nc files at remote URLs. This allows downloading +only a subset of the DEM and at a coarsened resolution. +See topotools.read_netcdf in topotools module for working with topography data, +and tests/test_etopo1.py for an example of usage. +More documentation needed.

    • +
    • The etopotools.py module has been deprecated in favor of the +topotools.read_netcdf function, which can be called with +path = ‘etopo1 to read from the online etopo1 database in netCDF format. +This allows downloading only a subset of the DEM and at a coarsened resolution. +The old way of doing this is not robust and sometimes gave incorrect results +due to issues with the old etopo1 server (which is no longer maintained). +See NetCDF format and +PR #308. +An example can be found in tests/test_etopo1.py.

    • +
    • More generally, topofiles can now be read in from netCDF files either +locally or from the web. See NetCDF format for some documentation.

    • +
    • New capabilities have been added to download NOAA tide gauge data, see +PR #287.

    • +
    • Some plotting issues have been resolved.

    • +
    • dtopotools.SiftFault now has the rigidity mu set properly, which +changes the magnitude Mw that is reported for a fault created using +the NOAA SIFT database.

    • +
    • dtopotools.SubFault has been extended to allow triangular subfaults +in addition to rectangular subfaults. Some examples illustrating this +should be added to the apps repository.

    • +
    • topotools.read now allows dx != dy in a header for topo_type in [2,3].

    • +
    • Many other minor changes.

    • +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_6_0.html b/v5.10.x/release_5_6_0.html new file mode 100644 index 0000000000..9c5ac72d9a --- /dev/null +++ b/v5.10.x/release_5_6_0.html @@ -0,0 +1,311 @@ + + + + + + + + + v5.6.0 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.6.0 release notes

    +

    Clawpack 5.6.0 was released on June 2, 2019. See Installing Clawpack.

    +

    Changes relative to Clawpack 5.5.0 (Aug 28, 2018) are shown below.

    +

    To see more recent changes that are in the the master branch but not yet +released, see Changes to master since v5.9.2.

    +
    +

    Changes that are not backward compatible

    +
    +
      +
    • A new approach to flagging cells for AMR refinement was added in 1d and +2d amrclaw and in geoclaw (see notes below). This led to the addition +of a new adjoint.data file created by running setrun.py. +If adjoint error flagging is not being used then this file is still +expected by the Fortran code.

    • +
    • Many Fortran routines changes for adjoint flagging and some new modules +were added, resulting in changes to the Makefiles used in amrclaw and +geoclaw (see below).

    • +
    +
    +
    +
    +

    General changes

    +
    +
      +
    • None so far.

    • +
    +
    +
    +
    +

    Changes to classic

    +

    Nothing major.

    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +
    +
      +
    • A new attribute data.ClawRunData.adjointdata was added, which points to +an object of class amrclaw.data.AdjointData containing information +about inputs needed for adjoint flagging.

    • +
    +
    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +
    +
      +
    • Numerous minor improvements.

    • +
    +
    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
    +
      +
    • HLLE solvers added for the Euler equations and 1d and 2d shallow water.

    • +
    • Riemann solvers added for the adjoint of the linearized shallow water +equations in non-conservative form, as needed for adjoint flagging.

    • +
    • Note that other adjoint Riemann solvers for amrclaw examples had already +been added in v5.5.0.

    • +
    +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
    +
      +
    • A new approach to flagging cells for AMR refinement was added in 1d and +2d (not yet in 3d), based on +first solving an adjoint equation and then taking inner products of the +forward solution at each regridding time with snapshots of the adjoint +solution. This is described in http://www.clawpack.org/dev/adjoint.html +and http://www.clawpack.org/dev/refinement.html. This was developed +over the past several years, primarily by +@BrisaDavis, and required +refactoring several routines. Some of these changes were already +included in version 5.5.0.

    • +
    • In amrclaw/src/1d, new the Fortran module adjoint_module.f90 +was to support adjoint flagging, and Makefile.amr_1d updated.

    • +
    • In amrclaw/src/2d, new Fortran modules adjoint_module.f90 and +adjointsup_module.f90 were added to support adjoint flagging, +and Makefile.amr_2d updated.

    • +
    • class amrclaw.data.AdjointData added, to contain information +about adjoint error flagging.

    • +
    • moment.f was refactored as moment.f90.

    • +
    +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +
    +
      +
    • The adjoint flagging option was also added to GeoClaw, resulting in +many changes to geoclaw routines.

    • +
    • In geoclaw/src/2d/shallow, new Fortran modules adjoint_module.f90 and +adjointsup_module.f90 were added to support adjoint flagging, +and Makefile.geoclaw updated.

    • +
    • These modules were also added to +src/2d/shallow/multilayer/Makefile.multilayer, although adjoint +flagging has not been implemented yet for the multilayer equations.

    • +
    • New capabilities were added to src/python/geoclaw/surge/storm.py for +reading storm tracks.

    • +
    • topotools.read_netcdf was improved to more robustly handle coarsen == 1

    • +
    • The url was fixed in examples/tsunami/chile2010/maketopo.py that caused +a webpage to be downloaded instead of the topofile needed for this +example, caused by incorrect url resolution of geoclaw.org.

    • +
    • A typo was fixed in dtopotools.SubFault.dynamic_slip that caused +failure.

    • +
    • Numerous other minor fixes and improvements.

    • +
    +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_6_1.html b/v5.10.x/release_5_6_1.html new file mode 100644 index 0000000000..4938954fd8 --- /dev/null +++ b/v5.10.x/release_5_6_1.html @@ -0,0 +1,267 @@ + + + + + + + + + v5.6.1 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.6.1 release notes

    +

    Clawpack 5.6.1 was released on October 28, 2019. See Installing Clawpack.

    +

    Changes relative to Clawpack 5.6.0 (June 2, 2019) are shown below.

    +

    To see more recent changes that are in the the master branch but not yet +released, see Changes to master since v5.9.2.

    +
    +

    Changes that are not backward compatible

    +

    $CLAW/amrclaw/src/2d/amr_module.f90 has changed, so do a make new in +any AMRClaw or GeoClaw application directories.

    +
    +
    +

    General changes

    +

    A gpu branch has been added to many git repositories, and checking this out +gives a GPU version of two-dimensional AmrClaw and GeoClaw, as described at +Using the GPU version of Clawpack. This version does not have equivalent capabilities to v5.6.1, +however, and is not included as part of the tar file for this release.

    +
    +
    +

    Changes to classic

    +

    None.

    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +
      +
    • The python package subprocess is now used in runclaw.py, improving ability +to run multiple models.

    • +
    • Improved handling of Fortran modules.

    • +
    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    + +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
      +
    • 1D MHD solver added.

    • +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
      +
    • Improvements in how timing of code is done, in particular using integer(kind=8) +variables for better computation of wall time.

    • +
    • Improve handling of AdjointData file references.

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +
      +
    • Some fixes to checkpoint and restart files

    • +
    • Several changes to storm surge codes, including handling more forms of storm +input data.

    • +
    • Improvements in how timing of code is done, in particular using integer(kind=8) +variables for better computation of wall time.

    • +
    • Faster version of filpatch improves regridding performance substantially +for some applications by re-using topo values rather than recomputing them.

    • +
    • If some topo values are missing replace by value that makes this clearer +by default, or allow the user to set an appropriate topo_missing value.

    • +
    • New geoclaw/examples/tsunami/bowl-slosh-netcdf added to illustrate +using netCDF topofiles.

    • +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_7_0.html b/v5.10.x/release_5_7_0.html new file mode 100644 index 0000000000..dead5ca192 --- /dev/null +++ b/v5.10.x/release_5_7_0.html @@ -0,0 +1,339 @@ + + + + + + + + + v5.7.0 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.7.0 release notes

    +

    Clawpack 5.7.0 was released on April 23, 2020. See Installing Clawpack.

    +

    Permanent DOI: +[DOI 10.5281/zenodo.3764278].

    +

    Changes relative to Clawpack 5.6.1 (October 28, 2019) are shown below.

    +

    To see more recent changes that are in the the master branch but not yet +released, see Changes to master since v5.9.2.

    +
    +

    Python support

    +

    As of v5.7.0 we are no longer supporting Python 2.7, and Python 3.x is +expected. At this point we believe v5.7.0 still works with Python 2.7, but +we are phasing out testing this in the future.

    +

    See Dropping support for Python 2.7 for more information about this.

    +
    +
    +

    Changes that are not backward compatible

    +

    Some of the .data files generated from setrun.py have been changed in both +amrclaw and geoclaw, so if using these packages it is important to do:

    +
    make new
    +
    +
    +

    to recompile all the code and:

    +
    make data
    +
    +
    +

    to recreate .data files in the new form (the latter should happen +automatically if you make .output, for example).

    +
    +
    +

    General changes

    +
      +
    • Support for particle tracking via “Lagrangian gauges” has been added to +amrclaw, but this capability itself has so far only been added to geoclaw, +see below. This has changed the format of gauges.data files generated +from setrun.py.

    • +
    • A new way of specifying flagregions for guiding adaptive mesh refinement +has been introduced in both amrclaw and geoclaw, and RuledRectangles +have been introduced to assist in specifying non-rectangular flagregions. +This has added a new flagregions.data file generated from setrun.py.

    • +
    • The AMR parameter max1d can now be set in setrun.py. This parameter +controls the maximum size of each grid patch in each spatial dimension. +Previously this was set in amrclaw/src/Nd/amr_module.f90 and changing it +required recompiling all library files via make new. The default value +is still 60, which seems to work well in relation to cache size and the +desire to distribute grids among threads when OpenMP is used. If you want +to change it for some application, set rundata.amrdata.max1d in setrun.py.

    • +
    +
    +
    +

    Changes to classic

    +

    None.

    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +
      +
    • Support added for flagregions and FlagRegionData, see +flagregions.html.

    • +
    • Support added for gzip/bzip2 unpacking in get_remote_file.

    • +
    • Changes to Makefile.common to add make notebook_htmls target to turn +Jupyter notebooks into html files using nbconvert, +and make readme to better handle converting README.rst into README.html.

    • +
    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +
      +
    • Several updates to Matlab tools.

    • +
    • Added particle_tools.py for plotting particle paths when using Lagrangian gauges.

    • +
    • Added plottools.pcolorcells to better plot data on finite volume grid cells.

    • +
    • Improvements to how animations are made on html pages and other updates to +animation_tools.py.

    • +
    • Improve colorbar options and better colorbars when using colormaps.add_colormaps.

    • +
    • Change default behavior in frametools.py when looping over all patches: +skip those that lie outside of rectangle specified by xlimits and ylimits +to improve speed. Can over-ride this by setting +plotaxes.skip_patches_outside_xylimits = False.

    • +
    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
      +
    • Updates to a few Riemann solvers

    • +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
      +
    • Allow setting max1d in setrun.py.

    • +
    • Close output files properly in valout.f90

    • +
    • Some support for Lagrangian gauges but not yet fully implemented +except in geoclaw.

    • +
    • Introduce new flagregions to replace regions eventually, see +flagregions.html.

    • +
    • New region_tools.py module with class RuledRectangle in particular, +useful in specifying flagregions. See +ruled_rectangles.

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +
      +
    • For an overview of changes to GeoClaw, see also this youtube video +and the related materials from the 2020 GeoClaw Developers Workshop.

    • +
    • Support for “Lagrangian gauges” that can be used for particle tracking +to help visualize the flow. See +lagrangian_gauges.html.

    • +
    • Many changes to how fgmax grids are specified and handled. The new code is +much faster if there are lots of fgmax points (tested up to around 7 million). +You can now specify points near the coastline up to some elevation much +more easily for problems where you know higher ground will never be +inundated. Points can also be specifed using file specified with the same +format as a topofile (with topo_type==3) with 0/1 values indicating which +points are to be used as fgmax points. For more about all these changes, see +fgmax.html. Note that now a file fgmax_grids.data is generated from +information in setrun.py rather than fgmax.data, with a different format.

    • +
    • Improvements to fgmax_tools.py module.

    • +
    • New routine set_eta_init.f90 added that can be used to specify a spatially +varying initial elevation eta = B + h. The default version handles +subsidence or uplift specified in dtopo files. See +set_eta_init.

    • +
    • Improvements to kmltools.py to facilitate making kml versions of plots, +including pcolorcells_for_kml to make png files that align better, +fgmax2kml for plotting fgmax results, and better support to plot +polygonal outlines of flagregions that are RuledRectangles.

    • +
    • New option added to allow specifying a force_dry_init array that indicates +cells that should be forced to be dry (h = 0) when initialized, even if +the topography elevation is below sea_level. This allows better modeling +of coastal regions where there is dry land below sea level but protected by +dikes or levies. See +force_dry.html.

    • +
    • New marching_front.py module with tools to identify dry land protected by +dikes or to select fgmax points connected to the shore by land below some +specified elevation. See +marching_front.html.

    • +
    • Many other minor fixes and improvements.

    • +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    Mostly minor changes.

    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_7_1.html b/v5.10.x/release_5_7_1.html new file mode 100644 index 0000000000..32929a3b77 --- /dev/null +++ b/v5.10.x/release_5_7_1.html @@ -0,0 +1,265 @@ + + + + + + + + + v5.7.1 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.7.1 release notes

    +

    Clawpack 5.7.1 was released on September 11, 2020. See Installing Clawpack.

    +

    Permanent DOI: +[DOI 10.5281/zenodo.4025432].

    +

    Changes relative to Clawpack 5.7.0 (April 23, 2020) are shown below.

    +

    To see more recent changes that are in the the master branch but not yet +released, see Changes to master since v5.9.2.

    +
    +

    Changes that are not backward compatible

    +
      +
    • None

    • +
    +
    +
    +

    General changes

    +
      +
    • None

    • +
    +
    +
    +

    Changes to classic

    +
      +
    • None

    • +
    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +
      +
    • New b4run.py capability added – script run before runclaw from make +.output that can be used to copy files to _output, for example.

    • +
    • claw_git_status.py improved.

    • +
    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +
      +
    • Fix some things that weren’t backward compatible with older versions of +matplotlib

    • +
    • Improve animation plot quality, and other changes to animation_tools.py

    • +
    • New Matlab tools

    • +
    • Other misc. changes

    • +
    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
      +
    • None

    • +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
      +
    • fix verbosity_regrid

    • +
    • fix use of kmltools in region_tools

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +
      +
    • Some fixes to fgmax examples

    • +
    • Improve some kml and netcdf tools

    • +
    • Additional storm models

    • +
    • Other misc. fixes and improvements

    • +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_8_0.html b/v5.10.x/release_5_8_0.html new file mode 100644 index 0000000000..ad16f26365 --- /dev/null +++ b/v5.10.x/release_5_8_0.html @@ -0,0 +1,352 @@ + + + + + + + + + v5.8.0 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.8.0 release notes

    +

    Clawpack 5.8.0 was released on February 4, 2021. See Installing Clawpack.

    +

    Permanent DOI: http://doi.org/10.5281/zenodo.4503024

    +

    Changes relative to Clawpack 5.7.1 (Sept. 11, 2020) are shown below.

    +

    To see more recent changes that are in the the master branch but not yet +released, see Changes to master since v5.9.2.

    +
    +

    Changes that are not backward compatible

    +
      +
    • For AMRClaw and GeoClaw, the data file amr.data now created from +setrun.py now includes an additional line with the parameter memsize +specifying the initial length of the alloc array used for allocating +memory to patches when adaptive refinement is used. This can be specified +in setrun.py by setting amrdata.memsize. If it is not set, then +default values are used that are similar to past default values; +see Specifying AMRClaw run-time parameters in setrun.py. +So this is backward compatible in the sense that no changes to setrun.py +are required, but the old amr.data files will not work so you may need +to do make data to create a new version.

    • +
    • In GeoClaw, refinement “regions” can no longer be specified implicitly +when listing a topo dtopo or qinit file. See the geoclaw section below. +Note: You may need to explicitly declare new regions or +flagregions to produce the same behavior as in past versions of GeoClaw.

    • +
    • The GeoClaw transverse Riemann solver rpt2_geoclaw.f has been improved +and results in slightly different computated results in some cases. For +more details see the riemann and geoclaw sections below.

    • +
    • For AMRClaw and GeoClaw, +an additional short array is saved in a checkpoint file for use in a +restart. Due to this change, a checkpoint file created using a previous +version of Clawpack cannot be used for a restart with the new version.

    • +
    +
    +
    +

    General changes

    +

    The travis tests that automatically run on pull requests no longer test using +Python2, only Python3. See Dropping support for Python 2.7.

    +
    +
    +

    Changes to classic

    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +
      +
    • ClawPlotAxes.skip_patches_outside_xylimits does not work properly if there +is a mapc2p function defining a grid mapping, so it is now ignored in +this case.

    • +
    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
      +
    • The GeoClaw transverse solver rpt2_geoclaw.f was modified to fix some +long-standing bugs and change some of the logic.

      +

      The new version gives +slightly different results on most problems, but extensive testing indicates +the new results are at least as good as the old. The new version has also +been refactored to make the logic clearer and to avoid some unnecessary work, +and generally runs faster. In some cases where instabilities had been +observed in long-duration runs (particularly for storm surge), the new +version appears to provide better stability.

      +

      In particular, the left- and right-going waves are now split up transversely +using states in the cell to the left (resp. right) in which the splitting is +performed, rather than using Roe averages based on the cell from which the +wave originates.

      +
    • +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
      +
    • An additional short array is saved in a checkpoint file for use in a +restart. Due to this change, a checkpoint file created using a previous +version of Clawpack cannot be used for a restart with the new version.

    • +
    • A memsize parameter can now be set in setrun.py, see above +and Specifying AMRClaw run-time parameters in setrun.py.

    • +
    • src/2d/prepc.f was improved to use less storage from the +work array alloc that is used for memory allocation for AMR patches. +For large-scale problems this can be a substantial savings and allow +running larger problems.

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +

    Several changes were made to fix long-standing bugs. These fixes lead to +slightly different results than those obtained with previous versions of +GeoClaw. In all the tests performed so far the changes are minor and it is +thought that the new version is at least as accurate as the old version. +Please let the developers know if you run into problems that may be related +to these changes.

    +
      +
    • In filpatch.f90: The slope chosen for interpolating from a +coarse grid to the ghost cells +of a fine-grid patch had an index error that could affect the +sign of the slope used in momentum components. Also slopes were +not always initialized to zero properly at the start of a loop

    • +
    • Some index errors were fixed in fgmax_interp.f90.

    • +
    • Changes to riemann/src/rpt2_geoclaw.f90. These cause some change in +results but tests have shown the new results appear to be at least as +good as previous results and the code may be more stable in some +situations. For more detail see the “Changes to riemann” above.

    • +
    • The new flagregions introduced in v5.7.0 (see Specifying flagregions for adaptive refinement) +were not implemented properly in GeoClaw, and in some situations +refinement to a maxlevel that was indicated only in flagregion was +not allowed as expected. This is now fixed.

    • +
    • In previous versions of GeoClaw one could implicitly define AMR flag +regions that are aligned with the spatial extent of topo, dtopo, or qinit +files by specifying minlevel, maxlevel (and in the case of topo files, +a time interval t1, t2) when the file name is given. This feature +did not always work as advertised and was often confusing. If these +values are specified then they are now ignored, as explained in +more detail in the following items. Not that you may have to explicitly +declare new flag regions now in order to have the expected refinement regions.

    • +
    • When specifying topo files in setrun.py using the format:

      +
      [topotype, minlevel, maxlevel, t1, t2, fname]
      +
      +
      +

      the values minlevel, maxlevel, t1, t2 will now be ignored. +To avoid warning messages, instead specify:

      +
      [topotype, fname]
      +
      +
      +
    • +
    • When specifying dtopo files in setrun.py using the format:

      +
      [topotype, minlevel, maxlevel, fname]
      +
      +
      +

      the values minlevel, maxlevel will now be ignored. +To avoid warning messages, instead specify:

      +
      [topotype, fname]
      +
      +
      +
    • +
    • When specifying qinit files in setrun.py using the format:

      +
      [minlevel, maxlevel, fname]
      +
      +
      +

      the values minlevel, maxlevel will now be ignored. +To avoid warning messages, instead specify:

      +
      [fname]
      +
      +
      +
    • +
    • A memsize parameter can now be set in setrun.py, see above +and Specifying AMRClaw run-time parameters in setrun.py.

    • +
    • An additional short array is saved in a checkpoint file for use in a +restart. Due to this change, a checkpoint file created using a previous +version of Clawpack cannot be used for a restart with the new version.

    • +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_8_1.html b/v5.10.x/release_5_8_1.html new file mode 100644 index 0000000000..b68c99bf17 --- /dev/null +++ b/v5.10.x/release_5_8_1.html @@ -0,0 +1,247 @@ + + + + + + + + + v5.8.1 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.8.1 release notes

    +

    Clawpack 5.8.1 was released on October 19, 2021. See Installing Clawpack.

    +

    The installation instructions have been reorganized (once again) +in an attempt to make the different options clearer.

    +

    Permanent DOI: http://doi.org/10.5281/zenodo.5595424

    +

    Changes relative to Clawpack 5.8.0 (February 4, 2021) are shown below.

    +

    To see more recent changes that are in the the master branch but not yet +released, see Changes to master since v5.9.2.

    +
    +

    Changes that are not backward compatible

    +
    +
    +

    General changes

    +
    +
    +

    Changes to classic

    +

    No changes.

    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +

    No changes.

    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +

    No major changes.

    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
      +
    • Fix rp1_shallow_hlle.f90 to work better near dry states.

    • +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +

    No changes.

    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +
      +
    • Some improvements to storm tracks

    • +
    • Reading (some) geotiff files now supported in topotools

    • +
    • Added kmltools.topo2kmz to make Google Earth overlays showing topography

    • +
    • Some other bug fixes.

    • +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_8_2.html b/v5.10.x/release_5_8_2.html new file mode 100644 index 0000000000..f78dc6d43b --- /dev/null +++ b/v5.10.x/release_5_8_2.html @@ -0,0 +1,243 @@ + + + + + + + + + v5.8.2 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.8.2 release notes

    +

    Clawpack 5.8.2 was released on December 14, 2021. See Installing Clawpack.

    +

    Permanent DOI: http://doi.org/10.5281/zenodo.5781749

    +

    Changes relative to Clawpack 5.8.1 (October 19, 2021) are shown below.

    +

    To see more recent changes that are in the the master branch but not yet +released, see Changes to master since v5.9.2.

    +
    +

    Changes that are not backward compatible

    +

    None.

    +
    +
    +

    General changes

    +

    None.

    +
    +
    +

    Changes to classic

    +

    None.

    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +

    Minor addition of a print statement.

    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +

    None.

    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +

    None.

    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
      +
    • Bug fix that avoids some segmentation faults when running amrclaw or geoclaw +jobs with many grids.

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +

    None, although the bug fix in amrclaw is sometimes needed.

    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    For changes in PyClaw, see the PyClaw changelog.

    +

    See pyclaw diffs

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_9_0.html b/v5.10.x/release_5_9_0.html new file mode 100644 index 0000000000..637c58070c --- /dev/null +++ b/v5.10.x/release_5_9_0.html @@ -0,0 +1,314 @@ + + + + + + + + + v5.9.0 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.9.0 release notes

    +

    Clawpack 5.9.0 was released on August 26, 2022. See Installing Clawpack.

    +

    Permanent DOI: http://doi.org/10.5281/zenodo.7026045

    +

    Changes relative to Clawpack 5.8.2 (December 14, 2021) are shown below.

    +

    To see more recent changes that are in the the master branch but not yet +released, see Changes to master since v5.9.2.

    +

    Follow the links to see changes that have been made to the master branch of +each repository since the last release (v5.9.0) on August 26, 2022.

    +

    These changes should appear in the next release. If you need them now, +see Developers’ Guide for instructions on cloning and installing from the +master branch.

    +

    To see documentation that has already been developed to accompany any new +features listed below, click on the “dev” branch of the documentation, in +the menu on the left hand side of this page.

    +
    +

    Changes that are not backward compatible

    +
    +
    +

    General changes

    +
      +
    • ‘binary32’ added as an output_format option in both amrclaw and +geoclaw. (So far classic only supports ‘ascii’ output.) The old +‘binary’ option now defaults to ‘binary64’, which dumps the raw +binary of the full float64 (kind=8) Fortran variables. The new +‘binary32’ option trucates to float32 (kind=4) before dumping, and +results in binary output files that are only half as large. Since +float32 values have about 8 significant figures, this is generally +sufficient for most plotting and post-processing needs. These files +are also much smaller than the files created with the ‘ascii’ +option, which is generally recommended only for debugging if you need to +examine the output files directly. +For more info, see http://www.clawpack.org/output_styles.html

    • +
    • Gauge output in amrclaw and geoclaw can also now be specified as +‘ascii’, ‘binary64’, or ‘binary32’, +see http://www.clawpack.org/gauges.html for instructions.

    • +
    • Adding support for ‘binary32’ required changes in the pyclaw, clawutil +and visclaw repositories as well.

    • +
    • A new fgout capability was added to geoclaw (see below and Fixed grid output (fgout)), +which also required additional changes to other repositories.

    • +
    +
    +
    +

    Changes to classic

    +
      +
    • Comments in some sample setrun.py files were changed to make it clear +that only output_format = ‘ascii’ is supported so far in classic.

    • +
    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +
      +
    • Support for ‘binary32’ and fgout grids added.

    • +
    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +
      +
    • Support for ‘binary32’ and fgout grids added.

    • +
    • pcolor plots are now rasterized by default, which greatly reduces the +file size in some cases. When e.g. savefig(‘filename.svg’) is used +the labels are still vector graphics but the flow field is rasterized. +Passing the option pcolor_kwargs = {“rasterized”:False} in setplot +turns this off. See <https://github.com/clawpack/visclaw/pull/286>.

    • +
    • The JSAnimation subdirectory was removed, since we now use +anim.to_jshtml instead.

    • +
    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
      +
    • None.

    • +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
      +
    • Support for output_format=’binary32’ added for both output frames and +gauges.

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +
      +
    • Support for output_format=’binary32’ added for both output frames and +gauges.

    • +
    • New fgout grid capabilities added, as described at Fixed grid output (fgout). +This allows specifying one or more fixed resolution rectangular grids on +which the AMR solution will be interpolated (in both space and time) +at each time in a specified set of times. This does not affect the +time steps used in the computation and allows frequent output on a +fixed portion of the domain for making animations or doing +post-processing, such as particle tracking based on the velocity field.

    • +
    • The new fgout capability (together with Fixed grid monitoring (fgmax)) +replaces the very old fixedgrid capability, +which has now been further deprecated.

    • +
    • $CLAW/geoclaw/examples/tsunami/chile2010_fgmax has been replaced by +$CLAW/geoclaw/examples/tsunami/chile2010_fgmax-fgout. This example +now also shows how to plot results on fgout grids either by +using a special setplot function or by reading them directly. +It also shows how to make an animation from the fgout results.

    • +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +
      +
    • Support for reading fgout frames added, by passing the parameter +file_prefix more consistently (which can be e.g. fgout rather than +fort, as used for output frames).

    • +
    • Support for reading binary output files with format ‘binary32’ or +‘binary64’. Added for both output frames and gauges. The old ‘binary’ +format is equivalent to ‘binary64’.

    • +
    • Support reading file_format from the fort.t files, now one of ascii, +binary32, or binary64. See General Changes above for more details.

    • +
    +

    See pyclaw diffs

    +

    For older changes in PyClaw, see also the PyClaw changelog.

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_9_1.html b/v5.10.x/release_5_9_1.html new file mode 100644 index 0000000000..21d4510eac --- /dev/null +++ b/v5.10.x/release_5_9_1.html @@ -0,0 +1,330 @@ + + + + + + + + + v5.9.1 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.9.1 release notes

    +

    Clawpack 5.9.1 was released on October 2, 2023. See Installing Clawpack.

    +

    Permanent DOI: http://doi.org/10.5281/zenodo.8400237

    +

    Changes relative to Clawpack 5.9.0 (August 26, 2022) are shown below.

    +

    To see more recent changes that are in the the master branch but not yet +released, see Changes to master since v5.9.2.

    +

    Follow the links to see changes that have been made to the master branch of +each repository since the last release (v5.9.1) on October 2, 2023.

    +

    These changes should appear in the next release. If you need them now, +see Developers’ Guide for instructions on cloning and installing from the +master branch.

    +

    To see documentation that has already been developed to accompany any new +features listed below, click on the “dev” branch of the documentation, in +the menu on the left hand side of this page.

    +
    +

    Changes to classic

    +
      +
    • None.

    • +
    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +
      +
    • Consistently use CLAW_PYTHON in Makefile.common, which should point to +the version of Python the user wants to use for Clawpack.

    • +
    • Make some changes to ease the transition from nose (which is no longer +supported) to pytest in the future.

    • +
    • Other minor changes.

    • +
    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +
      +
    • The ClawPlotAxes.title string is used by default to make a title for the +plot for each time frame with the time in the units used in the problem. +A new capability was added so that if title includes the string +d:h:m:s then the time is assumed to be in seconds and is converted to +days:hours:minutes:seconds in the title. Otherwise, if the title includes +h:m:s then the time is converted to hours:minutes:seconds in the title. +This is particularly useful in GeoClaw.

    • +
    • Some more attributes have been added to ClawPlotFigure, ClawPlotAxes, +and ClawPlotItem +to facilitate making nicer looking plots without so much need to use +kwargs attributes or define an afteraxes function, for example.

      +

      The lines below are extracted from +$CLAW/visclaw/src/python/visclaw/data.py. +For more information about these attributes (and others), see +https://www.clawpack.org/dev/setplot.html.

      +
        +
      • Added to ClawPlotFigure:

        +
        self.add_attribute('figsize',None)
        +self.add_attribute('facecolor',None)
        +
        +
        +
      • +
      • Added to ClawPlotAxes:

        +
        self.add_attribute('time_label_kwargs', {})  # kwargs for xlabel cmd
        +self.add_attribute('kwargs', {})
        +self.add_attribute('grid', None) # True to add grid() command
        +self.add_attribute('grid_kwargs', {}) # argument to grid() command
        +self.add_attribute('title_fontsize', None)
        +self.add_attribute('title_kwargs', {}) # e.g. to set color
        +self.add_attribute('title_t_format', None) # format for t in title
        +self.add_attribute('xticks_fontsize', None)
        +self.add_attribute('xticks_kwargs', {}) # e.g. to set ticks,rotation
        +self.add_attribute('yticks_fontsize', None)
        +self.add_attribute('yticks_kwargs', {}) # e.g. to set ticks
        +self.add_attribute('xlabel', None) # label for x-axis
        +self.add_attribute('ylabel', None) # label for y-axis
        +self.add_attribute('xlabel_fontsize', None)
        +self.add_attribute('ylabel_fontsize', None)
        +self.add_attribute('xlabel_kwargs', {})
        +self.add_attribute('ylabel_kwargs', {})
        +self.add_attribute('aspect', None)
        +self.add_attribute('aspect_latitude', None)
        +self.add_attribute('useOffset', None)
        +
        +
        +
      • +
      • Added to ClawPlotItem:

        +
        self.add_attribute('colorbar_extend',None)
        +
        +
        +
      • +
      +
    • +
    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +
      +
    • None.

    • +
    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +
      +
    • In 2d and 3d, valout.f90 now calls bound before dumping arrays when doing +binary output (since the ghost cells are also dumped in this case).

    • +
    • On restart, do not advance the frame number if output_t0 == True, so that +there is not a duplicated frame at the same time.

    • +
    • Other minor fixes.

    • +
    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +
      +
    • Fixed fgmax_finalize.90 so that if a grid number fgno is specified +for the fgmax grid then it uses this in constructing the filename for +output (rather than 1,2,3 based on order specified in setrun.py)

    • +
    • Facilitate reading a topo file when at topotools.Topography object +is first instantiated: the __init__ function now calls read() if +path is provided as an argument.

    • +
    • fgmax_tools.FGmaxGrid.read_output function now takes an argument +indexing that is ‘ij’ by default for backward compatibility, but setting +to ‘xy’ results in the fgmax grid having the same layout as topo +grids generated by topotools.Topography, which is often useful.

    • +
    • Added geoclaw.data.FGmaxData.read() function to read in the data from a +fgmax_grids.data file.

    • +
    • Added sphere_source as local variable in src/2d/shallow/src2.f90, set to +0 for now for backward compability. This allows testing the addition of +source terms that should be included on the sphere but were always missing. +After further testing, the plan is to change the default in the next major +release v5.10.0 and also allow this to be adjusted in setrun.py. +See https://www.clawpack.org/dev/sphere_source.html +for more information.

    • +
    • Other minor fixes.

    • +
    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +
      +
    • Some fixes in ASCII output for compatibility with Fortran versions.

    • +
    • Other minor fixes.

    • +
    +

    See pyclaw diffs

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/release_5_9_2.html b/v5.10.x/release_5_9_2.html new file mode 100644 index 0000000000..83bfb61e0c --- /dev/null +++ b/v5.10.x/release_5_9_2.html @@ -0,0 +1,261 @@ + + + + + + + + + v5.9.2 release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    v5.9.2 release notes

    +

    Clawpack 5.9.2 was released on November 4, 2023. See Installing Clawpack.

    +

    Permanent DOI: http://doi.org/10.5281/zenodo.XXX

    +

    Changes relative to Clawpack 5.9.2 (October 2, 2023) are shown below.

    +

    To see more recent changes that are in the the master branch but not yet +released, see Changes to master since v5.9.2.

    +

    Follow the links to see changes that have been made to the master branch of +each repository since the last release (v5.9.2) on November 4, 2023.

    +

    These changes should appear in the next release. If you need them now, +see Developers’ Guide for instructions on cloning and installing from the +master branch.

    +

    To see documentation that has already been developed to accompany any new +features listed below, click on the “dev” branch of the documentation, in +the menu on the left hand side of this page.

    +
    +

    General changes

    +

    The build process for the Python modules has been completely redone using +meson in place of distutils, which is being +deprecated. We chose meson since this is now being used by many of the core +scientific python projects that we use, e.g. numpy and scipy. This should +not affect most users, except for some changes to the recommended installation +options, see Installing Clawpack.

    +

    Many Python modules were cleaned up by removing transition code that was useful +for Python2 users but is no longer needed since we now require Python3 in +general.

    +

    Otherwise, mostly minor changes and bug fixes.

    +
    +
    +

    Changes to classic

    +

    See classic diffs

    +
    +
    +

    Changes to clawutil

    +

    Some new data objects were added to clawpack.clawutil.data for GeoClaw 1d +and Boussinesq solvers, but these will not be used until the next major release.

    +

    See clawutil diffs

    +
    +
    +

    Changes to visclaw

    +

    See visclaw diffs

    +
    +
    +

    Changes to riemann

    +

    See riemann diffs

    +
    +
    +

    Changes to amrclaw

    +

    See amrclaw diffs

    +
    +
    +

    Changes to geoclaw

    +

    The setrun parameter rundata.fixed_grid_data was removed from +geoclaw/src/python/geoclaw/data.py and is no longer available in setrun. +This old way of specifying fixed grid output has been deprecated for some +time in favor of fgmax and fgout grids, but some old setrun.py files +may still set

    +
    fixedgrids = rundata.fixed_grid_data.fixedgrids
    +
    +
    +

    and throw an error that can be fixed by deleting this line. +If items are appended to this list in your setrun, then these should be +converted to fgmax and/or fgout grids.

    +

    The setrun parameter runclaw.geo_data.sphere_source was added to allow +experimenting with the spherical source term that is currently missing from +the default GeoClaw code, see Source terms for shallow water on the sphere, which now includes a +link to a document with more description of the problem and computational +examples.

    +

    See geoclaw diffs

    +
    +
    +

    Changes to PyClaw

    +

    See pyclaw diffs

    +
    +
    +
    +

    Other Clawpack Repositories

    +

    The repositories below are not included in the Clawpack tarfile or pip +install, but changes to these repositories may also be of interest.

    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/releases.html b/v5.10.x/releases.html new file mode 100644 index 0000000000..3c61e42eac --- /dev/null +++ b/v5.10.x/releases.html @@ -0,0 +1,256 @@ + + + + + + + + + Releases of Clawpack and release notes — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Releases of Clawpack and release notes

    +

    Before downloading a tar file, please click on the Install tab or visit +Installing Clawpack for installation instructions. You may want to use +pip install or some other mechanism rather than the tar file.

    +
    +

    Other notes:

    +
      +
    • Please see Citing this work for the suggested way to cite the version of +Clawpack that you are using in publications.

    • +
    • For older changes in PyClaw, see the PyClaw changelog. +Starting with v5.9.0, changes will be recorded in the release notes along +with those for other repositories.

    • +
    • See Changes to master since v5.9.2 for changes to the master branch on Github +that are not in the most recent release.

    • +
    • The “dev” branch of the +documentation (selected under Versions on the menu +to the left) may contain documentation of features not yet released.

    • +
    +
    +
    +

    Releases:

    +

    Tar files can be downloaded from +https://github.com/clawpack/clawpack/releases/ or +from the Zenodo links provided below.

    +

    Tar files for all recent releases +can also be referenced with the single DOI +10.17605/osf.io/kmw6h. +See Citing this work for more information on how best to cite Clawpack.

    + +
    +
    +

    Clawpack 4.x

    +

    Clawpack 5.x has significant changes from past versions (prior to 2014). +See Changes in Clawpack 5.0.

    +

    For documentation and recent changes to the Clawpack 4.x version, please see +Clawpack 4.x documentation

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/restart.html b/v5.10.x/restart.html new file mode 100644 index 0000000000..a29226c9a1 --- /dev/null +++ b/v5.10.x/restart.html @@ -0,0 +1,262 @@ + + + + + + + + + Checkpointing and restarting — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Checkpointing and restarting

    +
    +

    Warning

    +

    These instructions currently only apply to amrclaw and +geoclaw codes.

    +
    +
    +

    Checkpointing a computation

    +

    In this section clawdata refers to the rundata.clawdata attribute +of an object of class ClawRunData, as is generally set at the top +of a setrun.py file.

    +

    The rundata.clawdata.checkpt_style parameter specified in setrun.py (see +Specifying classic run-time parameters in setrun.py) determines how often checkpointing is done, if at all.

    +

    See the comments in Sample setrun.py module for classic Clawpack for examples.

    +

    The checkpoint files are saved in the same output directory as the solution +output, with file names of the form fort.tchkNNNNN (a small ASCII file) and +fort.chkNNNNN (a large binary file) where NNNNN is the +step number on the coarsest level. These files containt all the information +needed to restart the computation at this point.

    +
    +
    +

    Restarting a computation

    +

    To restart a computation from any point where checkpoint files have been saved, +modify setrun.py to set:

    +
    clawdata.restart = True
    +clawdata.restart_file = 'fort.chkNNNNN'
    +
    +
    +

    where NNNNN is the time step number from which the restart should +commence.

    +

    You should also modify the output time parameters to specify that the +computation should go to a later time than the time of the restart file +(which can be found in the file fort.tchkNNNNN).

    +

    Note the following in setting the new output times:

    +
      +
    • The value clawdata.t0 should generally be left to the original starting +time of the computation.

    • +
    • If clawdata.output_style==1, then clawdata.t0 and clawdata.tfinal +along with clawdata.num_output_times are used to determine equally +spaced output times. Only those times greater than the restart time will +be used as output times.

      +

      If clawdata.output_t0==True then a time frame will be output at the +restart time (not t0 in general). This may duplicate the final frame that was +output from the original computation. Set clawdata.output_t0 = False +to avoid this.

      +
    • +
    • If clawdata.output_style==2, then clawdata.output_times is a list of +output times and only those times greater than or equal to +the restart time will be used as output times.

    • +
    +
    +
    +

    Modifying the Makefile for a restart

    +

    New in 5.4.0. It is no longer necessary to set the Makefile variable +RESTART to True or False. Instead you can set it to None (or omit +setting it at all, since this is the default), in which case the setrun.py +file will be used to determine if this is a restart run (in which case +the previous output directory should be added to, rather than replaced).

    +
    +
    +

    Output files after a restart

    +

    After running the restarted computation, +the original set of output files should still be in the output directory +along with a new set from the second run. Note that one output time may +be repeated in two frames if clawdata.output_t0 == True in the restarted run.

    +

    New in 5.4.0. +Gauge output from the original run +is no longer overwritten by the second run. Instead gauge +output from the restart run will be appended to the end of each +gaugeXXXXX.txt file (or gaugeXXXXX.bin in the case of binary gauge +output, introduced in v5.9.0).

    +

    Note that if you have to restart a computation from a checkpoint +file that is at an earlier time than the original computation +reached, then intermediate gauge outputs will be repeated twice, +and data from these output files may have to be adjusted to account +for this. If multiple restarts are performed from the same checkpoint +file then gauge data will accumulate in an undesirable fashion, but +for most purposes this does the right thing.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/riemann.html b/v5.10.x/riemann.html new file mode 100644 index 0000000000..d4ee12b7f4 --- /dev/null +++ b/v5.10.x/riemann.html @@ -0,0 +1,395 @@ + + + + + + + + + Riemann solvers — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Riemann solvers

    +

    The Riemann solver defines the hyperbolic equation that is being solved and +does the bulk of the computational work – it is called at every cell +interface at every time step and returns the information about waves and speeds +that is needed to update the solution.

    +

    The directory $CLAW/riemann/src contains Riemann solvers for many +applications, including advection, acoustics, shallow water equations, Euler +equations, traffic flow, Burgers’ equation, etc.

    +

    See also the new book Riemann Problems and Jupyter Solutions (SIAM, 2020), +which consists of a set of Jupyter notebooks illustrating +the basic concepts of Riemann problems and approximate solvers.

    +
    +

    One-dimensional Riemann solver

    +

    Understanding the 1-dimensional solver is a critical first step since in 2 +or 3 dimensions the bulk of the work is done by a “normal solver” that +solves a 1-dimensional Riemann problem normal to each cell edge. In multiple +dimensions it is possible to use additional transverse solvers; see below.

    +

    See Wave-propagation algorithms and [LeVeque-FVMHP] for more details about how the +algorithms in Clawpack use the Riemann solution.

    +

    The calling sequence for the 1-dimensional Riemann solver subroutine rp1 +is:

    +
    subroutine rp1(maxm, num_eqn, num_waves, num_aux, num_ghost, num_cells,ql,qr,auxl,auxr,wave,s,amdq,apdq)
    +
    +! Input arguments
    +integer, intent(in) :: maxm, num_eqn, num_waves, num_aux, num_ghost, num_cells
    +double precision, intent(in), dimension(num_eqn, 1-num_ghost:maxm+num_ghost) :: ql,qr
    +double precision, intent(in), dimension(num_aux, 1-num_ghost:maxm+num_ghost) :: auxl,auxr
    +
    +! Output arguments
    +double precision, intent(out) :: s(mwaves, 1-num_ghost:maxm+num_ghost)
    +double precision, intent(out) :: wave(num_eqn, mwaves, 1-num_ghost:maxm+num_ghost)
    +double precision, intent(out), dimension(num_eqn, 1-num_ghost:maxm+num_ghost) :: amdq,apdq
    +
    +
    +

    Note that the names of the integer parameters used in this calling sequence have +changed in recent versions, and many solvers still use the old names. The +correspondence is:

    +
      +
    • meqn = num_eqn, the number of equations in the system,

    • +
    • mwaves = num_waves, the number of waves in each Riemann solution,

    • +
    • mx = num_cells, the number of grid cells,

    • +
    • maux = num_aux, the number of auxiliary variables,

    • +
    +

    The input data consists of two arrays ql and qr. The value +ql(:,i) is the value \(q_i^L\) at the left edge of the i’th +cell, while qr(:,i) is the value \(q_i^R\) at the right edge +of the i’th cell, as indicated in this figure:

    +_images/qlqr.gif +

    In the classic Clawpack algorithm, \(q_i^L = q_i^R\) and both values agree with +\(Q_i\) , the cell average. +More flexibility is allowed because in some applications, or in +adapting clawpack to implement different algorithms, it is useful to allow +different values at each edge. For example, in the SharpClaw algorithms, we define a +piecewise polynomial function within the grid cell (as illustrated in the figure) +and then solve the Riemann problems between these values. This approach to +high-resolution methods is discussed in Chapter 6 of [LeVeque-FVMHP], +and the SharpClaw algorithms are discussed in [KetParLev13].

    +

    Note that the Riemann problem at the interface \(x_{i−1/2}\) +between cells \(i − 1\) and \(i\) has data:

    +
      +
    • Left state: \(q_{i-1}^R\) = qr(:,i-1),

    • +
    • Right state: \(q_{i}^L =\) ql(:,i).

    • +
    +

    This notation can be confusing since in the literature we often use \(q_\ell\) +to denote the left state and \(q_r\) to denote the right state +in specifying Riemann data.

    +

    The Riemann solver rp1 also has input parameters auxl and auxr +that contain values of the auxiliary variables if these are being used (see +Specifying spatially-varying data using setaux). +Normally auxl(:,i) = auxr(:,i) = aux(:,i) when the Riemann solver is called from the +classic Clawpack routines.

    +

    The routine rp1 must solve the Riemann problem for each value of i, +and return the following (for i=1-num_ghost to mx+num_ghost):

    +
      +
    • amdq(1:meqn,i) = the vector \({\cal A}^-\Delta Q_{i-1/2}\),

    • +
    • apdq(1:meqn,i) = the vector \({\cal A}^+\Delta Q_{i-1/2}\),

    • +
    • wave(1:meqn,i,p) = the vector \({\cal W}^p_{i-1/2}\),

    • +
    • s(i,p) = the wave speed \(s^p_{i-1/2}\) for each wave.

    • +
    +

    This uses the notation of Wave-propagation algorithms and [LeVeque-FVMHP].

    +

    Here are some examples of one-dimensional Riemann solvers that may +be helpful as a starting point for development of new solvers:

    + +
    +
    +

    Pointwise Riemann solvers

    +

    Most of the solvers available are written (as described above) in vectorized +form, meaning that there is a loop over a 1-dimensional slice of the grid +inside the Riemann solver itself. This used to be necessary in order to get +good performance, but tests with modern compilers suggest that it is no longer +so. Clawpack 5.x (both the Fortran codes and PyClaw) also supports the use of +pointwise Riemann solvers, in which the solver routine solves a single +Riemann problem and does not loop over the grid. This allows the solver +to be written in a more natural way, with q_l and q_r referring to the +left and right states in the Riemann problem.

    +

    In a pointwise Riemann solver, the solver routine should be named by appending +_ptwise to the usual name; i.e. rp1_ptwise in 1D, or rpn2_ptwise and +rpt2_ptwise in higher dimensions. When compiling the solver, it is necessary +to link in the appropriate “harness”:

    +
      +
    • $CLAW/Riemann/src/rp1_ptwise.f90 in 1D;

    • +
    • $CLAW/Riemann/src/rpn2_ptwise.f90 and $CLAW/Riemann/src/rpt2_ptwise.f90 in 2D.

    • +
    +

    No harness has been written yet for 3D pointwise solvers.

    +

    The calling sequence for a 1D pointwise solver is:

    +
    subroutine rp1_ptwise(num_eqn, num_aux, num_waves, q_l, q_r, aux_l, aux_r, wave, s, amdq, apdq)
    +
    +! Input Arguments
    +integer, intent(in) :: num_eqn, num_aux, num_waves
    +real(kind=8), intent(in out) :: q_l(num_eqn), q_r(num_eqn)
    +real(kind=8), intent(in out) :: aux_l(num_aux), aux_r(num_aux)
    +
    +! Output arguments
    +real(kind=8), intent(in out) :: wave(num_eqn, num_waves)
    +real(kind=8), intent(in out) :: s(num_waves)
    +real(kind=8), intent(in out) :: apdq(num_eqn), amdq(num_eqn)
    +
    +
    +

    Examples of pointwise Riemann solvers:

    + +
    +
    +

    f-wave Riemann solvers

    +

    As described in f-wave formulation, for spatially-varying flux functions it is +often best to use the f-wave formulation of the wave-propagation algorithms. +This can be implemented in Clawpack by providing a +suitable Riemann solver that returns f-waves instead of ordinary waves, +obtained by decomposing +the flux difference \(f(Q_i,x_i) - f(Q_{i-1},x_{i-1})\) into +f-waves using appropriate eigenvectors of the Jacobian matrices to either +side of the interface. The Riemann solver has the same form and calling +sequence as described above; the only difference is that the output +argument wave should return an array of f-waves. while amdq +and apdq have the same meaning as before.

    +

    In order to indicate that the Riemann solver returns f-waves:

    + +
    +
    +

    2D Riemann solvers

    +

    In two dimensions, all Clawpack algorithms require a normal Riemann +solver, that solves a one-dimensional (planar) Riemann problem in the +direction normal to a cell interface. Some Clawpack algorithms also +make use of a transverse Riemann solver.

    +

    The calling sequence for the normal Riemann solver in 2D is:

    +
    subroutine rpn2(ixy, maxm, num_eqn, num_waves, num_aux, num_ghost, num_cells, ql, qr, auxl, auxr, wave, s, amdq, apdq)
    +
    +! Input
    +integer, intent(in) :: ixy, maxm, num_eqn, num_waves, num_aux, num_ghost, num_cells
    +real(kind=8), intent(in out) :: ql(num_eqn, 1-num_ghost:maxm+num_ghost)
    +real(kind=8), intent(in out) :: qr(num_eqn, 1-num_ghost:maxm+num_ghost)
    +real(kind=8), intent(in out) :: auxl(num_aux, 1-num_ghost:maxm+num_ghost)
    +real(kind=8), intent(in out) :: auxr(num_aux, 1-num_ghost:maxm+num_ghost)
    +
    +! Output
    +real(kind=8), intent(in out) :: wave(num_eqn, num_waves, 1-num_ghost:maxm+num_ghost)
    +real(kind=8), intent(in out) :: s(num_waves, 1-num_ghost:maxm+num_ghost)
    +real(kind=8), intent(in out) :: amdq(num_eqn, 1-num_ghost:maxm+num_ghost)
    +real(kind=8), intent(in out) :: apdq(num_eqn, 1-num_ghost:maxm+num_ghost)
    +
    +
    +

    The inputs and outputs have the same meaning as in 1D. The additional input +parameter ixy is used to indicate whether the solver is sweeping in the +x direction (ixy=1) or the y direction (ixy=2).

    +

    TODO: Continue description – 3d, transverse solvers.

    +
    +
    +

    Using a custom solver

    +

    Many solvers are provided in the Clawpack Riemann repository. +If you develop your own Riemann solver, you can use it as follows:

    +

    With the Fortran codes (Classic, AMRClaw, Geoclaw) simply compile your +solver and link it into the executable.

    +

    With PyClaw, if you have written your solver in Python then you can simply +import it. If you have written it in Fortran, first compile it with f2py +via a command like

    +
    +

    f2py -c my_riemann_solver.f90 -m solver_name

    +
    +

    Here solver_name can be replaced by whatever you like. Then in your +PyClaw script, simply import the Riemann solver and pass it as the sole argument +when you initialize your ClawSolver object; e.g.:

    +
    import solver_name
    +...
    +solver = pyclaw.ClawSolver1D(solver_name)
    +
    +
    +
    +
    +

    Adding a solver to the Riemann repository

    +

    If you have developed a new Riemann solver, please let us know! +We’d love to include it in the Clawpack Riemann repository so that +others can make use of it. You can simply send us a note on the +claw-users google group, or issue a pull request on Github.

    +

    If you +want to make your solver fully functional with the various Clawpack +codes, then follow the additional steps +outlined in the Riemann README.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/riemann/Shallow_water_Riemann_solvers.html b/v5.10.x/riemann/Shallow_water_Riemann_solvers.html new file mode 100644 index 0000000000..be6fb9629f --- /dev/null +++ b/v5.10.x/riemann/Shallow_water_Riemann_solvers.html @@ -0,0 +1,373 @@ + + + + + + + + + Shallow water Riemann solvers in Clawpack — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Shallow water Riemann solvers in Clawpack

    +

    A wide range of shallow water (SW) solvers are available in +clawpack.riemann. Here’s a brief description of each. For each one, +we have indicated (after “Fortran:”) the files you should compile to use +it in the Fortran codes, and after “PyClaw” where you should import it +from to use it in Python. If a pure-Python implementation is available, +we also indicate that. Finally, we include links to examples that use +each solver.

    +
    +

    One dimension

    +

    For most 1D solvers, the vector q of conserved quantities is

    +
    +\[\begin{split}q = \begin{bmatrix} h \\ hu \end{bmatrix},\end{split}\]
    +

    where \(h\) is depth and \(hu\) is momentum. Solvers with a +tracer include that as a 3rd component. For solvers with bathymetry, the +bathymetry is the first (and only) component of aux. All solvers +require setting a constant parameter grav, which controls the force +of gravity.

    + +
    +
    +

    Two dimensions

    +

    For most 2D solvers, the vector q of conserved quantities is

    +
    +\[\begin{split}q = \begin{bmatrix} h \\ hu \\ hv \end{bmatrix},\end{split}\]
    +

    where \(h\) is depth and \(hu, hv\) are the \(x\)- and +\(y\)-components of momentum. For solvers with bathymetry, the +bathymetry is the first (and only) component of aux. For the mapped +solver, see the implementation for a description of aux. As in 1D, +all solvers require setting a constant parameter grav, which +controls the force of gravity.

    + +
    +
    +

    Layered shallow water equations

    +

    1D and 2D solvers for the layered shallow water equations are also +included.

    +
    +
    +

    Potentially useful contributions (what’s missing)

    +
      +
    • 2D mapped grid solvers (for a planar grid)

    • +
    • Transverse versions of rpn2_shallow_bathymetry_fwave.f90, +rpn2_sw_aug.f90.

    • +
    +
    +
    +

    Demonstrations

    +
    %matplotlib inline
    +import matplotlib.pyplot as plt
    +from clawpack import riemann
    +from clawpack.riemann import riemann_tools
    +import numpy as np
    +
    +
    +
    h_l = 1.; h_r = 0.5;
    +u_l = 0.; u_r = 0.;
    +q_l = np.array([h_l,u_l]); q_r = np.array([h_r,u_r])
    +problem_data={'grav':1.0,'efix':False}
    +
    +
    +
    +

    Roe

    +
    states, speeds, reval = riemann_tools.riemann_solution(riemann.shallow_1D_py.shallow_roe_1D,q_l,q_r,
    +                                                       problem_data=problem_data)
    +riemann_tools.plot_phase(states)
    +
    +
    +../_images/output_9_01.png +
    +
    +

    HLL

    +
    states, speeds, reval = riemann_tools.riemann_solution(riemann.shallow_1D_py.shallow_hll_1D,q_l,q_r,
    +                                                       problem_data=problem_data)
    +riemann_tools.plot_phase(states)
    +
    +
    +../_images/output_11_0.png +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/ruled_rectangles.html b/v5.10.x/ruled_rectangles.html new file mode 100644 index 0000000000..e01af8d4b0 --- /dev/null +++ b/v5.10.x/ruled_rectangles.html @@ -0,0 +1,661 @@ + + + + + + + + + Ruled Rectangles — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Ruled Rectangles

    +

    New in Version 5.7.0.

    +

    Adapted from this notebook.

    +

    In past versions of AMRClaw and GeoClaw, one could specify “refinement +regions” as rectangles over which a minlevel and maxlevel are +specified (perhaps over some time interval), as described in +refinement-regions.

    +

    Allowing only rectangles made it very easy to check each cell for +inclusion in a region, but is a severe restriction – often a number of +rectangles must be used to follow a complicated coastline, for example, +or else many points ended up being refined that did not require it (e.g. +onshore points that never get wet in a GeoClaw simulation).

    +

    We have introduced a new data structure called a “Ruled Rectangle” that +is a special type of polygon for which it is also easy to check whether +a given point is inside or outside, but that is much more flexible than +a rectangle. It is a special case of a “ruled surface”, which is a +surface in 3D that is bounded by two curves, each parameterized by +\(s\) from \(s_1\) to \(s_2\), and with the surface defined +as the union of all the line segments connecting one curve to the other +for each value of \(s\) in \([s_1,s_2]\). A Ruled Rectangle is a +special case in which each curve lies in the \(x\)-\(y\) plane +and either \(s=x\) for some range of \(x\) values or \(s=y\) +for some range of \(y\) values. If \(s=x\), for example, then +the line segments defining the surface are intervals +\(y_{\scriptstyle lower}(x) \leq y \leq y_{\scriptstyle upper}(x)\) +for each \(x\) over some range \(x_1 \leq x \leq x_2\). It is +easy to check if a given \((x_c,y_c)\) is in this region: it is if +\(x_1 \leq x_c \leq x_2\) and in addition +\(y_{\scriptstyle lower}(x_c) \leq y_c \leq y_{\scriptstyle upper}(x_c)\).

    +

    The class clawpack.amrclaw.region_tools.RuledRectangle supports +a subset of ruled rectangles defined by a finite set of \(s\) +values along a coordinate line, e.g. \(s[0] < s[1] < s[2] < +\cdots < s[N]\) and for each \(s[k]\) two values lower[k] and +upper[k]. If rr is an instance of this class then rr.s, +rr.lower, and rr.upper contain these arrays. Whether s +corresponds to x or y is determined by:

    +
      +
    • If rr.ixy in [1, ‘x’] then s gives a set of \(x\) values,

    • +
    • If rr.ixy in [2, ‘y’] then s gives a set of \(y\) values.

    • +
    +

    The points specified can then be connected by line segments to define a +Ruled Rectangle, and this is done if rr.method == 1 (piecewise +linear). On the other hand, if rr.method == 0 (piecewise constant) +then the values lower[k], upper[k] are used as the bounds for all +s in the interval \(s[k] \leq s \leq s[k+1]\) (for +\(k = 0,~1,~\ldots,~N-1\)). In this case the values +lower[N], upper[N] are not used. This also defines a polygon, but +one that consists of a set of stacked boxes. The advantage of the +latter form is that it is slightly easier to check if a point is in the +Ruled Rectangle since no linear interpolation is required along the +edges. Also for some applications we want the Ruled Rectangle to exactly +cover a contiguous set of finite volume grid cells, which has the shape +of a set of stacked boxes.

    +
    +

    Contents

    + +
    +
    +

    Examples

    +

    Some simple examples follow:

    +

    Define a Ruled Rectangle by specifying a set of points:

    +
    from clawpack.amrclaw import region_tools
    +rr = region_tools.RuledRectangle()
    +rr.ixy = 1  # so s refers to x, lower & upper are limits in y
    +rr.s = array([1,2,4,6])
    +rr.lower = array([0,2,1,3])
    +rr.upper = array([4,5,3,6])
    +
    +
    +

    Setting rr.method to 1 or 0 gives a Ruled Rectangle in which the +points specified above are connected by lines or used to define stacked +boxes.

    +

    Both are illustrated in the figure below. Note that we use the method +rr.vertices() to return a list of all the vertices of the polygon +defined by rr for plotting purposes.

    +
    figure(figsize=(10,5))
    +subplot(121)
    +rr.method = 1
    +xv,yv = rr.vertices()
    +plot(xv,yv,'b')
    +grid(True)
    +axis([0,7,-1,6])
    +title('With method==1')
    +
    +subplot(122)
    +rr.method = 0
    +xv,yv = rr.vertices()
    +plot(xv,yv,'r')
    +grid(True)
    +axis([0,7,-1,6])
    +title('With method==0')
    +
    +
    +_images/RuledRectangles_10_1.png +

    In the plots above the s values correspond to x = 1, 2, 4, 6, +and the lower and upper arrays define ranges in y.

    +

    If we set rr.ixy = 2 or ‘y’, then the s values will instead +correspond to y = 1, 2, 4, 6 and the lower and upper will +define ranges in x. This is illustrated in the plots below.

    +
    rr.ixy = 2  # so s refers to y, lower & upper are limits in x
    +
    +figure(figsize=(10,5))
    +subplot(121)
    +rr.method = 1
    +xv,yv = rr.vertices()
    +plot(xv,yv,'b')
    +grid(True)
    +axis([-1,6,0,7])
    +title('With method==1')
    +
    +subplot(122)
    +rr.method = 0
    +xv,yv = rr.vertices()
    +plot(xv,yv,'r')
    +grid(True)
    +axis([-1,6,0,7])
    +title('With method==0')
    +
    +
    +_images/RuledRectangles_12_1.png +
    +
    +

    Relation to convex polygons

    +

    Note that the polygons above are not convex, but clearly some Ruled +Rectangles would be convex. Conversely, any convex polygon can be +expressed as a Ruled Rectangle — simply order the vertices so that the +\(x\) values are increasing, for example, and use these as the s +values in a RuledRectangle with ixy=’x’. Then for each \(x\) +there is a connected interval of \(y\) values that lie within the +polygon (by convexity), so this defines the lower and upper +values. (Or you could start by ordering vertices by increasing \(y\) +values and similarly define a RuledRectangle with ixy=’y’.)

    +

    So a RuledRectangle is a nice generalization of a convex polygon for +which it is easy to check inclusion of an arbitrary point.

    +
    +
    +

    Other attributes and methods

    +
    +

    ds

    +

    If the points s[k] are equally spaced then ds is the spacing +between them. This makes it quicker to determine what two points an +arbitrary value of \(s\) lies between when determining whether a +large set of points are inside or outside the Ruled Rectangle, rather +than having to search.

    +

    The Ruled Rectangle defined above has unequally spaced points and the +ds attribute is set to -1 in this case.

    +
    rr.ds
    +
    +
    +
    -1
    +
    +
    +
    +
    +

    slu

    +

    Rather than specifying s, lower, and upper separately, you +can specify an array slu with three columns in defining a +RuledRectangle, and such an array is returned by the slu method:

    +
    rr.slu()
    +
    +
    +
    array([[1, 0, 4],
    +       [2, 2, 5],
    +       [4, 1, 3],
    +       [6, 3, 6]])
    +
    +
    +

    Here’s an example defining a RuledRectangle via slu:

    +
    slu = vstack((linspace(0,14,8), zeros(8), [1,2,1,2,1,2,1,2])).T
    +print('slu = \n', slu)
    +
    +rr = region_tools.RuledRectangle(slu=slu)
    +rr.ixy = 2
    +rr.method = 1
    +xv,yv = rr.vertices()
    +plot(xv,yv)
    +
    +
    +
    slu =
    + [[ 0.  0.  1.]
    + [ 2.  0.  2.]
    + [ 4.  0.  1.]
    + [ 6.  0.  2.]
    + [ 8.  0.  1.]
    + [10.  0.  2.]
    + [12.  0.  1.]
    + [14.  0.  2.]]
    +
    +
    +_images/RuledRectangles_19_2.png +
    +
    +

    bounding_box

    +

    rr.bounding_box() returns the smallest rectangle [x1,x2,y1,y2] +containing the ruled rectangle:

    +
    rr.bounding_box()
    +
    +
    +
    [0.0, 2.0, 0.0, 14.0]
    +
    +
    +
    +
    +

    mask_outside

    +

    If X,Y are 2D numpy arrays defining (x,y) coordinates on a grid, +then rr.mask_outside(X,Y) returns a mask array M of the same +shape as X,Y that is True at points outside the Ruled Rectangle.

    +
    x = linspace(0,3,31)
    +y = linspace(0,16,81)
    +X,Y = meshgrid(x,y)
    +Z = X + Y # sample data values to plot
    +
    +M = rr.mask_outside(X,Y)
    +Zm = ma.masked_array(Z,mask=M)
    +pcolorcells(X,Y,Zm)
    +colorbar()
    +
    +
    +_images/RuledRectangles_23_1.png +
    +
    +

    read and write, and instantiating from a file

    +

    rr.write(fname) writes out the slu array and other attributes to +file fname, and rr.read(fname) can be used to read in such a +file. You can also specify fname when instantiating a new Ruled +Rectangle:

    +
    rr.write('RRzigzag.data')
    +
    +
    +
    rr2 = region_tools.RuledRectangle('RRzigzag.data')
    +rr2.slu()
    +
    +
    +
    array([[ 0.,  0.,  1.],
    +       [ 2.,  0.,  2.],
    +       [ 4.,  0.,  1.],
    +       [ 6.,  0.,  2.],
    +       [ 8.,  0.,  1.],
    +       [10.,  0.,  2.],
    +       [12.,  0.,  1.],
    +       [14.,  0.,  2.]])
    +
    +
    +

    Here’s what the file looks like:

    +
    lines = open('RRzigzag.data').readlines()
    +for line in lines:
    +    print(line.strip())
    +
    +
    +
    2   ixy
    +1   method
    +2    ds
    +8    nrules
    +0.000000000   0.000000000   1.000000000
    +2.000000000   0.000000000   2.000000000
    +4.000000000   0.000000000   1.000000000
    +6.000000000   0.000000000   2.000000000
    +8.000000000   0.000000000   1.000000000
    +10.000000000   0.000000000   2.000000000
    +12.000000000   0.000000000   1.000000000
    +14.000000000   0.000000000   2.000000000
    +
    +
    +

    Note that this Ruled Rectangle has equally spaced points and so +ds = 2 is the spacing.

    +
    +
    +

    make_kml

    +

    rr.make_kml() can be used to create a kml file that can be opened on +Google Earth to show the polygon defined by rr. This assumes that +x corresponds to longitude and y to latitude and is designed for +GeoClaw applications. Several optional arguments can be specified: +fname, name, color, width, verbose.

    +
    +
    +

    A GeoClaw AMR flag region

    +

    The figure below shows a Ruled Rectangle designed to cover Admiralty +Inlet, the water way between the Kitsap Peninsula and Whidbey Island +connecting the Strait of Juan de Fuca to lower Puget Sound. For some +tsunami modeling problems it is important to cover this region with a +finer grid than is needed elsewhere.

    +
    Image('figs/RuledRectangle_AdmiraltyInlet.png', width=400)
    +
    +
    +_images/RuledRectangles_32_0.png +

    The Ruled Rectangle shown above was defined by the code below:

    +
    slu = \
    +array([[  47.851, -122.75 , -122.300],
    +       [  47.955, -122.75 , -122.300],
    +       [  48.   , -122.8  , -122.529],
    +       [  48.036, -122.8  , -122.578],
    +       [  48.12 , -122.9  , -122.577],
    +       [  48.187, -122.9  , -122.623],
    +       [  48.191, -122.9  , -122.684],
    +       [  48.221, -122.9  , -122.755]])
    +
    +rr_admiralty = region_tools.RuledRectangle(slu=slu)
    +rr_admiralty.ixy = 'y'
    +rr_admiralty.method = 1
    +
    +rr_name = 'RuledRectangle_AdmiraltyInlet'
    +rr_admiralty.write(rr_name + '.data')
    +rr_admiralty.make_kml(fname=rr_name+'.kml', name=rr_name)
    +
    +
    +

    The file RuledRectangle_AdmiraltyInlet.data can then be used as a +“flag region” in the modified GeoClaw code, see +FlagRegions.ipynb for more details.

    +

    The file RuledRectangle_AdmiraltyInlet.kml can be opened in Google +Earth to show the polygon, as captured in the figure above.

    +
    +
    +
    +

    A simple rectangle

    +

    A simple rectangle with extent [x1,x2,y1,y2] can be specified as a +RuledRectangle via e.g. :

    +
    rectangle = region_tools.RuledRectangle()
    +rectangle.ixy = 'x'
    +rectangle.s = [x1, x2]
    +rectangle.lower = [y1, y1]
    +rectangle.upper = [y2, y2]
    +rectangle.method = 0
    +
    +
    +

    This can be done for you when instantiating a RuledRectangle using:

    +
    rectangle = region_tools.RuledRectangle(rect=[x1,x2,y1,y2])
    +
    +
    +

    For example:

    +
    rectangle = region_tools.RuledRectangle(rect=[1,3,5,6])
    +
    +xv,yv = rectangle.vertices()
    +plot(xv,yv,'b')
    +grid(True)
    +axis([0,4,4,7]);
    +
    +
    +_images/RuledRectangles_37_0.png +
    +
    +

    Defining a Ruled Rectangle covering selected cells

    +

    The module function +region_tools.ruledrectangle_covering_selected_points can be used to +generate a Ruled Rectangle that covers a specified set of points as +compactly as possible. This is useful for generating AMR refinement +regions that cover a set of points where we want to enforce a fine grid +without including too many other points.

    +

    First generate some sample data:

    +
    x_edge = linspace(-5,27,33)
    +y_edge = linspace(-7,7,15)
    +
    +x_center = 0.5*(x_edge[:-1] + x_edge[1:])
    +y_center = 0.5*(y_edge[:-1] + y_edge[1:])
    +
    +X,Y = meshgrid(x_center,y_center)
    +pts_chosen = where(abs(X-Y**2) < 4., 1, 0)
    +pts_chosen = where(logical_or(X>24, Y<-4), 0, pts_chosen)
    +pcolorcells(x_edge,y_edge,pts_chosen, cmap=cm.Blues,
    +           edgecolor=[.8,.8,.8], linewidth=0.1)
    +
    +
    +_images/RuledRectangles_39_1.png +

    The array pts_chosen has been defined with the value 1 in the dark +blue cells in the figure above, and 0 elsewhere.

    +

    In this case the points can be covered by a Ruled Rectangle with +ixy = ‘y’ most efficiently, giving a polygon that covers only the +selected points. Note we use method = 0 to generate a Ruled +Rectangle that covers all the grid cells:

    +
    rr = region_tools.ruledrectangle_covering_selected_points(x_center, y_center,
    +                                                          pts_chosen, ixy='y', method=0,
    +                                                          verbose=True)
    +
    +pcolorcells(x_edge,y_edge,pts_chosen, cmap=cm.Blues,
    +           edgecolor=[.8,.8,.8], linewidth=0.1)
    +xv,yv = rr.vertices()
    +plot(xv,yv,'r',label='Ruled Rectangle')
    +legend(loc='lower right')
    +title('With ixy=2 and method=0');
    +
    +
    +
    Extending rectangles to cover grid cells
    +RuledRectangle covers 80 grid points
    +
    +
    +_images/RuledRectangles_42_1.png +

    By contrast, if we use ixy = ‘x’, the minimal Ruled Rectangle +covering the selected cells will also cover a number of cells that were +not selected:

    +
    rr = region_tools.ruledrectangle_covering_selected_points(x_center, y_center,
    +                                                          pts_chosen, ixy='x', method=0,
    +                                                          verbose=True)
    +pcolorcells(x_edge,y_edge,pts_chosen, cmap=cm.Blues,
    +           edgecolor=[.8,.8,.8], linewidth=0.1)
    +xv,yv = rr.vertices()
    +plot(xv,yv,'r',label='Ruled Rectangle')
    +legend(loc='lower right')
    +title('With ixy=1 and method=0');
    +
    +
    +
    Extending rectangles to cover grid cells
    +RuledRectangle covers 129 grid points
    +
    +
    +_images/RuledRectangles_44_1.png +

    Note that if we use method = 1 then the Ruled Rectangle covers the +center of each cell but not the entire grid cell for cells near the +boundary:

    +
    rr = region_tools.ruledrectangle_covering_selected_points(x_center, y_center,
    +                                                          pts_chosen, ixy='y', method=1,
    +                                                          verbose=True)
    +
    +pcolorcells(x_edge,y_edge,pts_chosen, cmap=cm.Blues,
    +           edgecolor=[.8,.8,.8], linewidth=0.1)
    +xv,yv = rr.vertices()
    +plot(xv,yv,'r',label='Ruled Rectangle')
    +legend(loc='lower right')
    +title('With ixy=2 and method=1');
    +
    +
    +
    RuledRectangle covers 63 grid points
    +
    +
    +_images/RuledRectangles_46_1.png +

    With ixy=’x’ and method=1 the Ruled Rectangle degenerates in the +upper right corner to a line segment that covers only the cell centers:

    +
    rr = region_tools.ruledrectangle_covering_selected_points(x_center, y_center,
    +                                                          pts_chosen, ixy='x', method=1,
    +                                                          verbose=True)
    +pcolorcells(x_edge,y_edge,pts_chosen, cmap=cm.Blues,
    +           edgecolor=[.8,.8,.8], linewidth=0.1)
    +xv,yv = rr.vertices()
    +plot(xv,yv,'r',label='Ruled Rectangle')
    +legend(loc='lower right')
    +title('With ixy=1 and method=1');
    +
    +
    +
    RuledRectangle covers 100 grid points
    +
    +
    +_images/RuledRectangles_48_1.png +
    +

    Example covering the continental shelf

    +

    The figure below shows a Ruled Rectangle that roughly covers the +continental shelf offshore of Vancouver Island and Washington state. The +region may need to be refined to a higher level than the deeper ocean in +order to capture shoaling tsunami waves interacting with the shelf +topography. This region was defined by first selecting a set of points +from etopo1 topography satisfying certain constraints on elevation using +the marching front algorithm described in Marching Front algorithm, +and then using the region_tools.ruledrectangle_covering_selected_points +function to build a Ruled Rectangle covering these points.

    +_images/RuledRectangles_50_0.png +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/sealevel.html b/v5.10.x/sealevel.html new file mode 100644 index 0000000000..3dfcfb6b21 --- /dev/null +++ b/v5.10.x/sealevel.html @@ -0,0 +1,225 @@ + + + + + + + + + Setting sea_level — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Setting sea_level

    +

    GeoClaw has a parameter sea_level (see Specifying GeoClaw parameters in setrun.py) that can be +used to specify the initialization of the fluid depth relative to the +specified topography (see Topography data).

    +

    New in v5.7.0: You can now specify a spatially varying initial surface +elevation, see Set Eta Init – spatially varying initial surface elevation.

    +

    Unless a different set of initial +conditions is specified (see qinit data file parameters), the default is to +initialize with zero velocity and depth h chosen so that h+B = sea_level +at any point where B < sea_level, where B is the topography or bathymetry +in the grid cell (as determined by interpolation from the specified +topo files as described in Topography data).

    +

    It is important to know what +vertical datum +the topography is relative to. Coastal bathymetry developed for tsunami +modeling (e.g. from +NOAA NGDC inundataion relief) +is often relative to Mean High Water (MHW), in +which case setting sea_level = 0. corresponds to assuming the water level +is initially at MHW. To adjust to use a different tide level, the value of +sea_level must be set appropriately. The relation between MHW and other +tide levels such as Mean Sea Level (MSL) can often be found from the NGDC +webpages for a nearby tide gauge. +For example, if you go to a station page such as +Hilo Bay, +you will see a Datums link on the left menu. +(Be sure to switch from feet to meters!)

    +

    Note that the difference between MHW and MSL can vary greatly between +different locations. +Global bathymetry data such as the ETOPO1 data (see Some sources of tsunami data) +is generally relative to MSL. +However, this data has a resolution of 1 arc-minute, more than 1.5 km, and +is not suitable as coastal bathymetry, so this data will presumably only be +used in grid cells away from the region where coastal bathymetry is +available. Since the difference between MSL and +MHW is at most a few meters, the use of different vertical datums for +regions of vastly different resolution will generally have little effect.

    +

    If GeoClaw is used to compare inundation or tide gauge values to +observations from past tsunamis, it may be important to know the tide stage +when the largest tsunami waves arrived. Ideally it would be possible to +model the actual rise and fall of the tides during the duration +of the event, but this is not currently possible. +Tidal currents may also have a significant effect on observed inundation +patterns, but these are also ignored in GeoClaw since the water is assumed +to be at rest before the tsunami arrives.

    +

    If GeoClaw is used for hazard assessment based on potential tsunami +scenarios, then thought should be given to the appropriate value of +sea_level to assume. The NCEI coastal bathymetry data is often referenced to MHW +because this is often the level assumed for tsunami hazard assessment, but +higher tide levels such as Mean Higher High Water (MHHW) or the Astronomical +High Tide (AHT) are sometimes used for worst-case scenarios.

    +

    See Some sources of tsunami data for more information and links to sources of data.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/search.html b/v5.10.x/search.html new file mode 100644 index 0000000000..75f0c49ec6 --- /dev/null +++ b/v5.10.x/search.html @@ -0,0 +1,162 @@ + + + + + + + + Search — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +

    Search

    + + + + +

    + Searching for multiple words only shows matches that contain + all words. +

    + + +
    + + + +
    + + + +
    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/searchindex.js b/v5.10.x/searchindex.js new file mode 100644 index 0000000000..3618dfb100 --- /dev/null +++ b/v5.10.x/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"docnames": ["ClawPlotAxes", "ClawPlotData", "ClawPlotFigure", "ClawPlotItem", "about", "adjoint", "amr_algorithm", "amrclaw", "amrclaw1d", "amrclaw_doxygen", "amrclaw_flowcharts", "application_documentation", "apps", "aws", "b4run", "b4step_defaults", "bc", "biblio", "bouss1d", "bouss2d", "changes_to_master", "claw43to46", "claw46to50", "claw4x", "clawpack5", "clawpack_components", "community", "contents", "contribute_apps", "current_data", "developers", "docker_image", "dtopotools_module", "f77_vs_f90", "fgmax", "fgmax_tools_module", "fgout", "fgout_tools_module", "first_run", "first_run_fortran", "first_run_pyclaw", "flagregions", "force_dry", "fortran", "fortran_compilers", "fvmbook", "galleries", "gauges", "geoclaw", "geoclaw1d", "geoclaw_started", "geoclaw_util_module", "geohints", "geoplot", "git_versions", "googleearth_plotting", "gpu", "grid_registration", "howto_doc", "howto_release", "installing", "installing_fortcodes", "installing_pip", "kmltools_module", "lagrangian_gauges", "license", "makefiles", "makefiles_library", "manning", "mapc2p", "marching_front", "matlab_plotting", "nearshore_interp", "netcdf", "newapp", "okada", "openmp", "output_styles", "packages", "photos", "plotexamples", "plotting", "plotting_faq", "plotting_geoclaw", "plotting_python", "prereqs", "pyclaw/about", "pyclaw/basics", "pyclaw/classes", "pyclaw/clawpack_and_pyclaw", "pyclaw/cloud", "pyclaw/controller", "pyclaw/evolve/limiters", "pyclaw/examples", "pyclaw/geometry", "pyclaw/going_further", "pyclaw/index", "pyclaw/io", "pyclaw/output", "pyclaw/parallel", "pyclaw/plotting", "pyclaw/problem", "pyclaw/rp", "pyclaw/solution", "pyclaw/solvers", "pyclaw/started", "pyclaw/state", "pyclaw/troubleshooting", "pyclaw/tutorial", "pyclaw/util", "python", "python_path", "qinit_defaults", "quick_surge", "quick_tsunami", "refinement", "regression", "release_5_0_0", "release_5_10_0", "release_5_1_0", "release_5_2_0", "release_5_2_1", "release_5_2_2", "release_5_3_0", "release_5_3_1", "release_5_4_0", "release_5_4_1", "release_5_5_0", "release_5_6_0", "release_5_6_1", "release_5_7_0", "release_5_7_1", "release_5_8_0", "release_5_8_1", "release_5_8_2", "release_5_9_0", "release_5_9_1", "release_5_9_2", "releases", "restart", "riemann", "riemann/Shallow_water_Riemann_solvers", "ruled_rectangles", "sealevel", "set_eta_init", "setaux_defaults", "setenv", "setplot", "setrun", "setrun_amrclaw", "setrun_amrclaw_sample", "setrun_geoclaw", "setrun_sample", "sharing", "sphere_source", "sphinxdoc", "src1d_defaults", "src_defaults", "storm_module", "surgedata", "testing", "timing", "topo", "topotools", "topotools_module", "trouble", "tsunamidata", "user_routines", "visit_plotting", "vm", "wp_algorithms"], "filenames": ["ClawPlotAxes.rst", "ClawPlotData.rst", "ClawPlotFigure.rst", "ClawPlotItem.rst", "about.rst", "adjoint.rst", "amr_algorithm.rst", "amrclaw.rst", "amrclaw1d.rst", "amrclaw_doxygen.rst", "amrclaw_flowcharts.rst", "application_documentation.rst", "apps.rst", "aws.rst", "b4run.rst", "b4step_defaults.rst", "bc.rst", "biblio.rst", "bouss1d.rst", "bouss2d.rst", "changes_to_master.rst", "claw43to46.rst", "claw46to50.rst", "claw4x.rst", "clawpack5.rst", "clawpack_components.rst", "community.rst", "contents.rst", "contribute_apps.rst", "current_data.rst", "developers.rst", "docker_image.rst", "dtopotools_module.rst", "f77_vs_f90.rst", "fgmax.rst", "fgmax_tools_module.rst", "fgout.rst", "fgout_tools_module.rst", "first_run.rst", "first_run_fortran.rst", "first_run_pyclaw.rst", "flagregions.rst", "force_dry.rst", "fortran.rst", "fortran_compilers.rst", "fvmbook.rst", "galleries.rst", "gauges.rst", "geoclaw.rst", "geoclaw1d.rst", "geoclaw_started.rst", "geoclaw_util_module.rst", "geohints.rst", "geoplot.rst", "git_versions.rst", "googleearth_plotting.rst", "gpu.rst", "grid_registration.rst", "howto_doc.rst", "howto_release.rst", "installing.rst", "installing_fortcodes.rst", "installing_pip.rst", "kmltools_module.rst", "lagrangian_gauges.rst", "license.rst", "makefiles.rst", "makefiles_library.rst", "manning.rst", "mapc2p.rst", "marching_front.rst", "matlab_plotting.rst", "nearshore_interp.rst", "netcdf.rst", "newapp.rst", "okada.rst", "openmp.rst", "output_styles.rst", "packages.rst", "photos.rst", "plotexamples.rst", "plotting.rst", "plotting_faq.rst", "plotting_geoclaw.rst", "plotting_python.rst", "prereqs.rst", "pyclaw/about.rst", "pyclaw/basics.rst", "pyclaw/classes.rst", "pyclaw/clawpack_and_pyclaw.rst", "pyclaw/cloud.rst", "pyclaw/controller.rst", "pyclaw/evolve/limiters.rst", "pyclaw/examples.rst", "pyclaw/geometry.rst", "pyclaw/going_further.rst", "pyclaw/index.rst", "pyclaw/io.rst", "pyclaw/output.rst", "pyclaw/parallel.rst", "pyclaw/plotting.rst", "pyclaw/problem.rst", "pyclaw/rp.rst", "pyclaw/solution.rst", "pyclaw/solvers.rst", "pyclaw/started.rst", "pyclaw/state.rst", "pyclaw/troubleshooting.rst", "pyclaw/tutorial.rst", "pyclaw/util.rst", "python.rst", "python_path.rst", "qinit_defaults.rst", "quick_surge.rst", "quick_tsunami.rst", "refinement.rst", "regression.rst", "release_5_0_0.rst", "release_5_10_0.rst", "release_5_1_0.rst", "release_5_2_0.rst", "release_5_2_1.rst", "release_5_2_2.rst", "release_5_3_0.rst", "release_5_3_1.rst", "release_5_4_0.rst", "release_5_4_1.rst", "release_5_5_0.rst", "release_5_6_0.rst", "release_5_6_1.rst", "release_5_7_0.rst", "release_5_7_1.rst", "release_5_8_0.rst", "release_5_8_1.rst", "release_5_8_2.rst", "release_5_9_0.rst", "release_5_9_1.rst", "release_5_9_2.rst", "releases.rst", "restart.rst", "riemann.rst", "riemann/Shallow_water_Riemann_solvers.rst", "ruled_rectangles.rst", "sealevel.rst", "set_eta_init.rst", "setaux_defaults.rst", "setenv.rst", "setplot.rst", "setrun.rst", "setrun_amrclaw.rst", "setrun_amrclaw_sample.rst", "setrun_geoclaw.rst", "setrun_sample.rst", "sharing.rst", "sphere_source.rst", "sphinxdoc.rst", "src1d_defaults.rst", "src_defaults.rst", "storm_module.rst", "surgedata.rst", "testing.rst", "timing.rst", "topo.rst", "topotools.rst", "topotools_module.rst", "trouble.rst", "tsunamidata.rst", "user_routines.rst", "visit_plotting.rst", "vm.rst", "wp_algorithms.rst"], "titles": ["ClawPlotAxes", "ClawPlotData", "ClawPlotFigure", "ClawPlotItem", "About this software", "Guiding AMR with adjoint flagging", "Adaptive mesh refinement (AMR) algorithms", "AMRClaw Description and Detailed Contents", "AMRClaw for 1d problems", "Doxygen documentation of AMRClaw", "AMRClaw Flowcharts", "Application documentation", "Clawpack Applications repository", "Amazon Web Services EC2 Clawpack AMI", "b4run function", "b4step default routines", "Boundary conditions", "Bibliography", "Boussinesq solvers in One Space Dimension", "Boussinesq solvers in Two Space Dimensions", "Changes to master since v5.9.2", "Converting from Clawpack 4.3 to 4.6", "Converting from Clawpack 4.6 to 5.0", "Clawpack 4.x links", "Changes in Clawpack 5.0", "Clawpack components", "Clawpack Community", "Full Table of Contents", "Contributing examples and applications", "current_data", "Developers\u2019 Guide", "Docker for Clawpack", "dtopotools module for moving topography", "Fortran 77 vs. Fortran 90 files", "Fixed grid monitoring (fgmax)", "fgmax_tools module for working with fgmax grids", "Fixed grid output (fgout)", "fgout_tools module for working with fgout grids", "Running an example", "Testing your Fortran installation and running an example", "Testing a PyClaw installation and running an example", "Specifying flagregions for adaptive refinement", "Force Cells to be Dry Initially", "Fortran version", "Fortran Compilers", "Examples from the book FVMHP", "Clawpack Gallery", "Gauges", "GeoClaw Description and Detailed Contents", "GeoClaw in One Space Dimension", "Getting started with GeoClaw", "geoclaw.util module of utility functions", "Cautionary Hints on using GeoClaw", "GeoClaw plotting tools", "Keeping track of repository versions with Git", "Visualizing GeoClaw results in Google Earth", "Using the GPU version of Clawpack", "Grid registration", "Guide for updating this documentation", "Guide for doing a Clawpack release", "Installing Clawpack", "Options for installing Clawpack Fortran codes", "pip install instructions", "kmltools module of utility functions", "Lagrangian gauges for particle tracking", "License", "Clawpack Makefiles", "Library routines in Makefiles", "Manning friction term", "The mapc2p function", "Marching Front algorithm", "Plotting using Matlab", "Nearshore interpolation", "Using NetCDF output", "Creating a new application directory", "Earthquake sources: Fault slip and the Okada model", "Using OpenMP", "Output data sytles and formats", "Which Clawpack solver should I use?", "Clawpack Community Photos", "Plotting examples", "Plotting with Visclaw", "Plotting hints and FAQ", "Plotting routines for GeoClaw", "Plotting options in Python", "Installation Prerequisites", "About PyClaw", "PyClaw Basics", "Understanding Pyclaw Classes", "Porting a problem from Clawpack 4.6.x to PyClaw", "Running PyClaw in the cloud", "Pyclaw Controller Class", "Pyclaw Limiters", "Working with PyClaw\u2019s built-in examples", "PyClaw Geometry", "Going Further", "PyClaw", "Pyclaw Input/Output Package", "PyClaw output", "Running in parallel", "Plotting PyClaw results", "Setting up your own problem", "Riemann Solver Package", "PyClaw Solutions", "Using PyClaw\u2019s solvers: Classic and SharpClaw", "Installing PyClaw", "PyClaw State", "Troubleshooting", "PyClaw tutorial: Solve the acoustics equations", "Pyclaw Utility Module", "Python Hints", "Python path", "qinit default routines", "Quick start guide for storm surge modeling", "Quick start guide for tsunami modeling", "AMR refinement criteria", "Regression testing", "v5.0.0 release notes", "v5.10.0 release notes", "v5.1.0 release notes", "v5.2.0 release notes", "v5.2.1 release notes", "v5.2.2 release notes", "v5.3.0 release notes", "v5.3.1 release notes", "v5.4.0 release notes", "v5.4.1 release notes", "v5.5.0 release notes", "v5.6.0 release notes", "v5.6.1 release notes", "v5.7.0 release notes", "v5.7.1 release notes", "v5.8.0 release notes", "v5.8.1 release notes", "v5.8.2 release notes", "v5.9.0 release notes", "v5.9.1 release notes", "v5.9.2 release notes", "Releases of Clawpack and release notes", "Checkpointing and restarting", "Riemann solvers", "Shallow water Riemann solvers in Clawpack", "Ruled Rectangles", "Setting sea_level", "Set Eta Init \u2013 spatially varying initial surface elevation", "setaux default routines", "Set environment variables", "Using setplot.py to specify the desired plots", "Specifying classic run-time parameters in setrun.py", "Specifying AMRClaw run-time parameters in setrun.py", "Sample setrun.py module for AMRClaw", "Specifying GeoClaw parameters in setrun.py", "Sample setrun.py module for classic Clawpack", "Saving and sharing results", "Source terms for shallow water on the sphere", "Compiling the Sphinx documentation locally", "src1d default routines", "src default routines", "Storm Specification Class and Tools", "Sources for Storm Surge Data", "Testing your installation", "Timing Statistics", "Topography data", "Python tools for working with topo and dtopo", "topotools module for working with topography data", "Troubleshooting", "Some sources of tsunami data", "User files required for the Fortran code", "Plotting with VisIt", "Clawpack Virtual Machine", "Wave-propagation algorithms"], "terms": {"For": [0, 1, 2, 3, 5, 7, 8, 9, 10, 12, 13, 16, 17, 18, 19, 21, 24, 26, 27, 28, 29, 30, 31, 32, 34, 36, 38, 40, 41, 42, 44, 45, 47, 49, 51, 52, 53, 55, 57, 58, 59, 66, 67, 70, 71, 72, 75, 76, 77, 81, 82, 84, 85, 88, 89, 93, 94, 96, 97, 98, 99, 101, 104, 105, 109, 110, 111, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 140, 141, 142, 143, 144, 147, 148, 149, 150, 151, 152, 155, 158, 159, 161, 162, 164, 166, 167, 170], "usag": [0, 1, 2, 3, 13, 19, 48, 49, 51, 55, 60, 97, 127, 158, 164], "see": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 32, 34, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 70, 71, 72, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 89, 91, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 146, 147, 148, 149, 150, 151, 153, 155, 156, 157, 158, 160, 161, 162, 164, 165, 166, 167, 168, 169, 170], "us": [0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 14, 16, 17, 21, 22, 23, 24, 25, 26, 28, 29, 30, 32, 34, 35, 37, 38, 39, 40, 42, 43, 44, 45, 47, 48, 49, 50, 51, 53, 54, 55, 57, 58, 59, 60, 61, 63, 65, 66, 68, 70, 72, 74, 75, 77, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 99, 100, 102, 103, 105, 106, 108, 109, 110, 111, 112, 113, 115, 116, 118, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 135, 136, 137, 138, 139, 142, 143, 146, 148, 149, 150, 151, 152, 154, 156, 157, 158, 161, 162, 164, 166, 168, 169, 170], "setplot": [0, 1, 2, 3, 7, 21, 22, 24, 27, 45, 47, 48, 49, 80, 81, 100, 101, 109, 118, 125, 135, 136, 165, 168], "py": [0, 1, 2, 3, 5, 6, 7, 8, 11, 13, 14, 16, 21, 22, 27, 30, 32, 34, 35, 37, 38, 39, 40, 41, 42, 43, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 59, 63, 64, 66, 68, 70, 75, 77, 78, 80, 81, 83, 84, 89, 93, 96, 99, 100, 101, 105, 113, 115, 116, 118, 119, 120, 121, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 135, 136, 137, 139, 140, 141, 143, 144, 146, 154, 158, 162, 164, 165, 167, 168], "specifi": [0, 1, 2, 3, 4, 5, 6, 7, 15, 16, 18, 19, 22, 24, 27, 29, 30, 31, 32, 34, 35, 36, 37, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 54, 55, 57, 63, 66, 67, 68, 70, 71, 72, 75, 76, 77, 78, 80, 81, 83, 88, 91, 94, 97, 98, 101, 103, 104, 107, 109, 111, 112, 113, 116, 119, 122, 123, 124, 125, 126, 127, 130, 132, 135, 136, 137, 139, 140, 142, 143, 144, 145, 150, 152, 153, 156, 157, 158, 159, 161, 162, 164, 165, 166, 168, 170], "desir": [0, 1, 2, 3, 6, 7, 16, 19, 24, 27, 28, 32, 34, 35, 36, 37, 42, 45, 47, 49, 59, 62, 63, 64, 70, 72, 75, 77, 80, 81, 82, 84, 88, 89, 91, 98, 103, 104, 112, 125, 127, 130, 144, 146, 148, 149, 150, 151, 152, 158, 162, 164, 165], "exampl": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 16, 18, 22, 24, 26, 29, 30, 31, 32, 37, 41, 43, 44, 46, 48, 49, 51, 57, 58, 59, 60, 61, 63, 64, 66, 67, 68, 72, 75, 76, 77, 81, 82, 84, 86, 87, 88, 89, 91, 94, 95, 97, 98, 101, 102, 103, 104, 105, 108, 109, 110, 111, 113, 114, 115, 116, 118, 119, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 135, 136, 137, 139, 140, 141, 143, 144, 146, 147, 148, 149, 150, 151, 152, 153, 154, 158, 160, 161, 162, 164, 165, 166, 167], "object": [0, 1, 2, 3, 5, 18, 24, 29, 32, 34, 36, 37, 41, 47, 55, 63, 70, 75, 81, 82, 84, 88, 89, 91, 97, 98, 99, 101, 103, 106, 107, 108, 109, 119, 128, 136, 137, 139, 140, 148, 149, 150, 151, 152, 158, 164], "thi": [0, 1, 2, 3, 5, 6, 8, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 75, 76, 77, 81, 82, 84, 85, 86, 88, 89, 91, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 113, 114, 115, 116, 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130, 132, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 158, 159, 160, 161, 162, 164, 165, 166, 167, 168, 169, 170], "class": [0, 1, 2, 3, 5, 27, 32, 34, 35, 36, 37, 41, 55, 63, 75, 82, 84, 89, 94, 96, 101, 103, 104, 106, 108, 109, 110, 128, 130, 139, 142, 147, 148, 149, 150, 151, 152, 164], "ar": [0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 71, 75, 76, 77, 78, 81, 83, 84, 85, 86, 88, 89, 91, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 119, 120, 121, 122, 123, 124, 125, 126, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 147, 148, 149, 150, 151, 152, 154, 155, 156, 157, 158, 159, 160, 161, 162, 164, 165, 167, 170], "usual": [0, 2, 3, 5, 6, 19, 32, 36, 42, 47, 50, 55, 63, 66, 75, 77, 93, 94, 99, 101, 102, 104, 109, 113, 115, 125, 140, 148, 149, 150, 151, 152, 165, 167], "creat": [0, 1, 2, 3, 5, 6, 7, 21, 26, 27, 30, 32, 34, 35, 36, 37, 38, 39, 41, 43, 45, 47, 48, 49, 50, 54, 56, 58, 62, 63, 66, 75, 77, 81, 82, 84, 89, 90, 93, 94, 96, 97, 100, 103, 106, 107, 108, 109, 115, 116, 118, 119, 123, 124, 125, 127, 128, 129, 132, 135, 142, 147, 148, 149, 150, 153, 155, 158, 164, 166, 167, 168], "new_plotax": [0, 2, 47, 55, 82, 147], "clawplotfigur": [0, 1, 55, 82, 136, 147], "The": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 72, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 94, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 109, 110, 111, 113, 115, 116, 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 160, 161, 162, 164, 165, 166, 167, 168, 169, 170], "follow": [0, 2, 3, 4, 5, 6, 13, 16, 18, 19, 20, 21, 25, 26, 30, 32, 34, 38, 39, 40, 42, 47, 50, 55, 57, 58, 59, 60, 62, 65, 70, 71, 75, 77, 82, 83, 85, 86, 88, 89, 90, 93, 94, 97, 98, 99, 101, 102, 103, 105, 106, 108, 109, 111, 116, 118, 127, 132, 135, 136, 137, 139, 140, 142, 146, 147, 148, 149, 151, 158, 160, 161, 162, 165, 167, 169], "can": [0, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 18, 19, 21, 22, 24, 26, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 70, 71, 72, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 86, 88, 89, 90, 92, 93, 94, 96, 97, 98, 99, 100, 101, 103, 104, 105, 106, 107, 108, 109, 111, 112, 113, 115, 116, 118, 119, 120, 123, 124, 125, 126, 127, 130, 131, 132, 135, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 156, 157, 158, 160, 162, 164, 165, 166, 167, 168, 170], "set": [0, 1, 2, 3, 5, 6, 8, 13, 14, 15, 16, 18, 19, 24, 27, 29, 30, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 48, 49, 51, 52, 53, 54, 55, 58, 59, 61, 62, 63, 64, 66, 67, 70, 72, 74, 75, 76, 77, 78, 80, 81, 88, 89, 91, 93, 94, 95, 96, 97, 98, 99, 102, 103, 104, 105, 106, 107, 108, 109, 111, 112, 115, 116, 118, 119, 120, 123, 124, 125, 127, 129, 130, 132, 135, 136, 137, 139, 140, 141, 142, 145, 147, 148, 149, 150, 151, 152, 153, 154, 158, 159, 162, 164, 166, 167, 170], "user": [0, 2, 3, 4, 5, 6, 12, 13, 21, 22, 24, 25, 27, 28, 29, 30, 31, 34, 36, 37, 44, 49, 52, 55, 60, 62, 63, 68, 71, 75, 77, 82, 89, 90, 93, 97, 99, 107, 109, 110, 111, 115, 123, 125, 127, 129, 136, 137, 140, 148, 150, 151, 152, 155, 164, 170], "name": [0, 1, 2, 3, 5, 7, 11, 12, 13, 18, 19, 22, 24, 30, 31, 32, 35, 36, 37, 38, 39, 41, 42, 43, 47, 49, 55, 58, 59, 63, 65, 71, 82, 84, 86, 89, 91, 93, 94, 97, 98, 102, 103, 108, 109, 111, 118, 124, 127, 132, 139, 140, 142, 147, 148, 149, 150, 151, 152, 158, 164, 167, 168], "str": [0, 1, 3, 32, 63, 97, 148, 149, 158, 164], "axescmd": [0, 84], "command": [0, 1, 2, 3, 11, 13, 14, 19, 30, 43, 54, 55, 56, 59, 61, 62, 66, 74, 81, 82, 85, 88, 89, 91, 96, 99, 100, 104, 108, 109, 110, 111, 116, 136, 140, 146, 147, 148, 149, 162, 164], "ax": [0, 1, 2, 29, 32, 47, 55, 63, 71, 81, 82, 84, 147, 164], "subplot": [0, 32, 70, 84, 142], "1": [0, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15, 16, 17, 18, 19, 24, 32, 34, 35, 36, 38, 39, 40, 41, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 66, 71, 75, 77, 82, 84, 88, 89, 91, 92, 93, 94, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 115, 120, 122, 123, 125, 127, 128, 130, 132, 134, 138, 139, 140, 141, 142, 143, 145, 147, 148, 149, 150, 151, 152, 154, 158, 161, 162, 164, 165, 166, 167, 170], "singl": [0, 1, 2, 3, 5, 6, 16, 21, 24, 25, 29, 30, 32, 34, 36, 37, 42, 47, 49, 50, 55, 57, 58, 59, 63, 64, 66, 71, 75, 76, 77, 78, 88, 94, 97, 98, 103, 109, 116, 122, 123, 125, 138, 140, 144, 148, 149, 150, 151, 162, 164, 166, 167], "fill": [0, 3, 4, 6, 16, 26, 55, 70, 94, 97, 106, 113, 125, 144, 148, 158, 161, 164, 167], "figur": [0, 1, 2, 4, 13, 32, 38, 39, 42, 45, 47, 57, 63, 70, 71, 81, 84, 103, 111, 118, 135, 140, 142, 147, 164], "2": [0, 3, 4, 6, 7, 15, 16, 17, 18, 19, 24, 32, 34, 35, 36, 37, 41, 42, 47, 49, 51, 55, 57, 59, 61, 62, 63, 64, 68, 70, 71, 72, 75, 76, 77, 82, 84, 85, 88, 89, 91, 92, 94, 97, 98, 99, 101, 102, 103, 104, 105, 106, 108, 109, 111, 115, 116, 118, 119, 123, 124, 125, 127, 128, 129, 130, 131, 132, 133, 135, 136, 138, 139, 140, 142, 145, 148, 149, 150, 151, 152, 154, 158, 161, 162, 164, 167, 170], "top": [0, 1, 3, 11, 25, 31, 32, 36, 55, 58, 59, 61, 62, 75, 82, 96, 101, 102, 111, 116, 139, 146], "half": [0, 16, 17, 75, 77, 104, 135, 148, 167], "0": [0, 2, 3, 5, 6, 16, 18, 19, 21, 27, 29, 30, 32, 34, 36, 37, 41, 42, 47, 48, 49, 51, 52, 55, 56, 57, 58, 59, 63, 64, 66, 67, 68, 70, 71, 72, 75, 77, 82, 84, 85, 88, 89, 91, 92, 94, 97, 98, 99, 101, 102, 103, 104, 105, 106, 108, 109, 110, 111, 115, 121, 122, 124, 126, 129, 131, 133, 136, 138, 139, 141, 142, 143, 144, 148, 149, 150, 151, 152, 154, 161, 162, 164, 166, 167, 169, 170], "8": [0, 34, 36, 42, 47, 55, 58, 63, 70, 77, 82, 94, 107, 109, 117, 118, 129, 135, 138, 140, 142, 147, 148, 149, 151, 152], "tall": 0, "skinni": 0, "axi": [0, 32, 42, 49, 53, 55, 70, 71, 82, 94, 136, 142], "matplotlib": [0, 2, 3, 13, 32, 42, 53, 55, 70, 81, 82, 85, 87, 90, 110, 131, 141, 147, 164, 165], "document": [0, 1, 2, 3, 6, 7, 19, 20, 23, 24, 25, 26, 27, 30, 31, 34, 48, 52, 57, 62, 65, 75, 81, 82, 83, 84, 86, 92, 94, 97, 98, 99, 100, 104, 106, 109, 111, 118, 120, 133, 134, 135, 136, 137, 138, 147, 150, 154, 168, 169], "show": [0, 2, 3, 9, 10, 12, 14, 30, 32, 38, 39, 42, 46, 47, 55, 58, 59, 63, 66, 70, 71, 84, 94, 104, 108, 111, 116, 118, 123, 133, 134, 135, 142, 164, 165, 167], "bool": [0, 1, 2, 3, 51, 63, 91, 97, 102, 103, 104, 106, 109, 151, 158, 164], "If": [0, 1, 2, 3, 4, 5, 6, 12, 13, 15, 16, 18, 19, 20, 21, 22, 24, 25, 26, 27, 29, 30, 31, 32, 34, 36, 37, 38, 39, 40, 42, 43, 44, 47, 49, 51, 55, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 70, 71, 72, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 88, 93, 94, 96, 97, 98, 99, 101, 103, 104, 105, 106, 107, 109, 111, 113, 114, 115, 116, 118, 125, 126, 127, 128, 129, 130, 132, 135, 136, 137, 139, 140, 141, 142, 143, 144, 145, 146, 148, 149, 150, 151, 152, 156, 157, 158, 160, 162, 164, 165, 167, 170], "fals": [0, 1, 2, 3, 5, 32, 37, 42, 52, 53, 54, 55, 63, 70, 77, 91, 94, 97, 102, 103, 104, 106, 109, 124, 125, 130, 135, 139, 141, 148, 149, 150, 151, 152, 158, 164], "suppress": [0, 2, 3, 30, 55, 63, 124, 126, 148, 149], "all": [0, 1, 4, 6, 11, 12, 13, 16, 19, 22, 24, 25, 27, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 42, 43, 44, 47, 48, 51, 52, 54, 55, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 71, 72, 74, 75, 76, 77, 78, 81, 82, 84, 85, 86, 88, 91, 92, 94, 96, 97, 98, 99, 101, 102, 103, 104, 106, 109, 110, 111, 114, 115, 116, 118, 119, 120, 123, 124, 125, 127, 130, 132, 138, 139, 140, 141, 142, 144, 147, 148, 149, 150, 151, 152, 153, 159, 160, 161, 162, 164, 165, 167], "item": [0, 1, 3, 71, 81, 84, 109, 132, 137, 147], "titl": [0, 1, 4, 17, 26, 42, 47, 55, 63, 70, 81, 96, 125, 136, 142, 164], "appear": [0, 1, 3, 5, 8, 13, 20, 25, 30, 34, 36, 47, 48, 49, 55, 58, 63, 66, 69, 82, 98, 103, 106, 118, 125, 132, 135, 136, 137, 151, 153, 162], "default": [0, 1, 2, 3, 13, 18, 19, 24, 30, 32, 34, 36, 37, 44, 47, 48, 51, 53, 54, 55, 57, 62, 63, 64, 66, 67, 71, 72, 75, 76, 77, 82, 84, 88, 91, 93, 94, 97, 98, 99, 100, 103, 104, 106, 107, 109, 115, 118, 119, 125, 129, 130, 132, 135, 136, 137, 139, 143, 149, 150, 151, 154, 158, 162, 164, 167], "string": [0, 1, 3, 7, 32, 34, 37, 47, 49, 51, 55, 57, 63, 64, 82, 89, 91, 92, 94, 97, 98, 103, 109, 111, 118, 136, 148, 151, 158, 164], "new": [0, 1, 2, 4, 5, 6, 8, 12, 13, 19, 20, 22, 24, 26, 27, 30, 31, 32, 34, 35, 36, 37, 41, 42, 43, 44, 47, 48, 51, 55, 56, 57, 59, 62, 63, 64, 66, 67, 68, 70, 71, 76, 77, 82, 84, 87, 88, 89, 90, 91, 97, 99, 101, 104, 106, 113, 115, 118, 119, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 135, 136, 137, 139, 140, 142, 143, 144, 146, 148, 149, 151, 158, 162, 164, 167], "v5": [0, 5, 14, 30, 31, 34, 36, 41, 45, 47, 56, 58, 59, 61, 62, 67, 77, 103, 110, 111, 115, 138, 139, 143, 144, 149, 151, 154], "9": [0, 34, 36, 37, 42, 47, 55, 59, 61, 62, 63, 64, 77, 82, 94, 97, 103, 118, 125, 128, 129, 130, 131, 132, 133, 134, 138, 139, 142, 148, 151, 152, 154], "note": [0, 1, 3, 4, 5, 13, 15, 16, 19, 22, 24, 26, 27, 30, 32, 34, 35, 36, 37, 41, 42, 43, 44, 47, 49, 51, 55, 56, 57, 58, 59, 60, 61, 62, 63, 66, 67, 70, 75, 76, 82, 84, 89, 92, 93, 94, 96, 97, 99, 101, 102, 105, 106, 109, 110, 112, 115, 139, 140, 142, 143, 144, 145, 147, 148, 149, 150, 151, 152, 156, 157, 158, 159, 161, 162, 164, 166, 167], "now": [0, 5, 6, 7, 13, 20, 22, 24, 26, 28, 30, 31, 32, 34, 35, 36, 37, 41, 42, 44, 54, 57, 58, 59, 68, 70, 72, 75, 77, 82, 88, 89, 94, 96, 97, 98, 99, 100, 101, 103, 104, 105, 108, 113, 115, 116, 118, 119, 120, 123, 124, 125, 126, 127, 129, 130, 132, 133, 135, 136, 137, 143, 147, 149, 153, 162, 169], "includ": [0, 2, 4, 6, 13, 18, 19, 20, 23, 24, 25, 29, 30, 31, 32, 34, 36, 37, 38, 39, 41, 43, 44, 46, 47, 49, 52, 55, 57, 59, 61, 62, 63, 65, 67, 68, 70, 71, 72, 75, 76, 78, 81, 82, 84, 86, 88, 89, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 111, 113, 115, 116, 118, 119, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 140, 141, 142, 146, 148, 150, 151, 153, 154, 155, 158, 159, 161, 162, 164, 167], "h": [0, 16, 17, 18, 19, 34, 36, 37, 42, 47, 48, 49, 52, 55, 56, 63, 68, 72, 102, 115, 123, 130, 136, 141, 143, 144, 151, 162], "m": [0, 4, 17, 18, 22, 24, 30, 32, 47, 48, 51, 55, 56, 58, 59, 63, 70, 71, 75, 77, 89, 115, 122, 136, 140, 142, 151, 164, 167, 170], "": [0, 1, 3, 4, 6, 13, 17, 22, 27, 30, 31, 32, 34, 36, 37, 38, 40, 41, 42, 47, 51, 55, 56, 58, 59, 62, 63, 64, 66, 70, 75, 76, 78, 81, 84, 87, 89, 91, 92, 94, 95, 96, 97, 99, 100, 101, 102, 103, 106, 108, 110, 113, 115, 116, 124, 136, 140, 142, 147, 148, 149, 151, 158, 161, 164, 165, 166, 167], "d": [0, 4, 7, 17, 30, 32, 51, 55, 58, 63, 93, 102, 111, 116, 118, 136, 140], "describ": [0, 3, 4, 5, 6, 7, 13, 14, 16, 18, 19, 21, 28, 30, 32, 33, 34, 36, 38, 39, 41, 42, 47, 49, 50, 51, 52, 55, 56, 58, 59, 61, 63, 64, 66, 67, 70, 71, 75, 77, 78, 81, 82, 83, 94, 96, 97, 103, 109, 113, 115, 116, 118, 125, 128, 129, 135, 140, 142, 143, 147, 148, 149, 151, 158, 159, 162, 164, 166, 167, 170], "further": [0, 6, 16, 19, 27, 34, 36, 44, 52, 63, 66, 71, 96, 110, 115, 116, 135, 136, 149], "below": [0, 3, 6, 13, 15, 16, 18, 19, 20, 24, 26, 30, 31, 32, 34, 36, 42, 47, 48, 49, 55, 56, 58, 59, 62, 63, 68, 71, 75, 84, 86, 88, 90, 98, 102, 108, 111, 112, 115, 116, 118, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 140, 142, 145, 146, 147, 148, 149, 150, 151, 152, 156, 157, 158, 162, 164, 167], "case": [0, 5, 6, 8, 13, 16, 19, 21, 24, 32, 34, 36, 41, 44, 47, 48, 49, 52, 55, 62, 63, 67, 70, 71, 72, 75, 77, 82, 88, 94, 97, 99, 101, 103, 109, 111, 115, 116, 118, 120, 123, 124, 125, 126, 127, 132, 135, 136, 139, 142, 143, 149, 151, 158, 162, 164, 165, 167, 170], "title_with_t": [0, 82], "true": [0, 1, 2, 3, 5, 6, 15, 16, 29, 32, 35, 37, 42, 47, 51, 54, 55, 58, 63, 70, 77, 81, 88, 91, 94, 97, 98, 99, 103, 104, 106, 115, 118, 125, 136, 139, 140, 142, 144, 145, 148, 149, 150, 151, 152, 158, 164], "title_fonts": [0, 136], "float": [0, 3, 32, 34, 37, 47, 51, 63, 91, 94, 97, 102, 106, 109, 148, 149, 151, 152, 158, 164], "fontsiz": [0, 82], "title_kwarg": [0, 136], "ani": [0, 3, 4, 5, 6, 8, 13, 16, 18, 19, 20, 21, 22, 24, 29, 30, 31, 34, 36, 37, 38, 39, 40, 47, 48, 49, 52, 54, 55, 58, 59, 61, 62, 64, 65, 66, 68, 70, 71, 72, 74, 76, 77, 78, 82, 86, 92, 93, 94, 96, 97, 98, 99, 101, 103, 105, 109, 111, 114, 115, 116, 118, 123, 127, 129, 135, 136, 137, 139, 142, 143, 144, 147, 148, 149, 151, 158, 167, 170], "other": [0, 3, 4, 5, 6, 7, 9, 12, 13, 16, 19, 22, 24, 29, 30, 32, 35, 36, 37, 38, 39, 41, 47, 48, 49, 50, 52, 55, 56, 57, 59, 60, 61, 62, 65, 66, 68, 70, 71, 72, 75, 76, 77, 81, 84, 86, 88, 89, 91, 94, 96, 97, 98, 100, 101, 102, 105, 108, 110, 111, 115, 116, 119, 120, 122, 123, 125, 140, 143, 146, 147, 148, 151, 153, 158, 162, 164, 166, 167, 168], "kwarg": [0, 2, 3, 32, 63, 82, 109, 116, 118, 136, 147, 158], "pass": [0, 3, 16, 21, 22, 30, 32, 37, 47, 49, 55, 63, 76, 82, 88, 91, 93, 95, 101, 104, 106, 107, 109, 116, 135, 140, 150, 158, 164, 167], "plt": [0, 63, 141], "e": [0, 1, 3, 5, 8, 12, 13, 14, 16, 22, 24, 29, 30, 31, 32, 34, 36, 37, 44, 47, 49, 50, 51, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 70, 71, 74, 75, 76, 77, 78, 81, 84, 85, 89, 94, 96, 97, 99, 100, 101, 102, 103, 104, 107, 109, 110, 111, 115, 116, 118, 123, 124, 125, 126, 127, 135, 136, 137, 140, 142, 143, 144, 146, 147, 148, 149, 150, 151, 152, 158, 162, 164, 165, 166, 167, 170], "g": [0, 1, 3, 4, 5, 8, 12, 13, 14, 16, 17, 22, 24, 29, 30, 31, 32, 34, 36, 37, 44, 47, 49, 50, 54, 55, 58, 59, 60, 61, 62, 63, 64, 66, 68, 70, 71, 74, 75, 76, 77, 78, 81, 84, 85, 96, 99, 100, 101, 102, 103, 104, 110, 111, 115, 116, 118, 123, 124, 125, 126, 127, 135, 136, 137, 140, 142, 143, 146, 147, 148, 149, 150, 151, 152, 162, 164, 165, 167, 170], "color": [0, 2, 3, 32, 42, 55, 63, 70, 71, 81, 136, 142, 147, 164], "format": [0, 1, 3, 5, 13, 14, 27, 32, 35, 38, 39, 42, 47, 48, 50, 52, 53, 55, 57, 63, 64, 66, 70, 71, 73, 75, 81, 82, 88, 91, 97, 98, 100, 101, 103, 109, 113, 124, 125, 127, 130, 132, 135, 136, 148, 151, 158, 159, 164, 166, 168], "like": [0, 12, 13, 18, 26, 30, 31, 42, 44, 55, 58, 59, 63, 64, 71, 84, 89, 91, 94, 97, 98, 99, 102, 103, 104, 106, 110, 111, 116, 124, 140, 142, 147, 161, 162, 165], "time": [0, 1, 5, 6, 7, 10, 14, 16, 18, 19, 22, 24, 27, 29, 30, 32, 34, 36, 37, 38, 39, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 55, 57, 58, 63, 64, 71, 72, 75, 76, 77, 78, 82, 86, 88, 91, 92, 96, 97, 98, 104, 106, 108, 115, 116, 118, 119, 122, 124, 125, 127, 128, 129, 132, 135, 136, 137, 139, 140, 142, 144, 146, 147, 150, 152, 158, 162, 165, 166, 170], "t": [0, 1, 4, 5, 12, 13, 17, 19, 26, 29, 30, 31, 32, 34, 36, 37, 42, 47, 49, 58, 59, 62, 64, 66, 67, 70, 71, 75, 76, 77, 82, 84, 88, 89, 92, 93, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 108, 110, 116, 122, 131, 135, 136, 142, 148, 150, 152, 158, 162, 164, 165, 167, 168, 170], "14": [0, 34, 55, 75, 82, 134, 135, 138, 142], "8e": [0, 82], "And": [0, 6, 19, 22, 58, 61], "rather": [0, 5, 6, 18, 22, 24, 30, 31, 34, 36, 37, 42, 58, 59, 62, 66, 67, 68, 74, 75, 94, 99, 101, 104, 111, 112, 115, 118, 123, 124, 125, 127, 129, 130, 132, 135, 136, 138, 139, 142, 147, 148, 149, 158, 159, 162, 164, 167, 170], "than": [0, 3, 5, 6, 13, 16, 18, 19, 22, 24, 30, 31, 32, 34, 36, 37, 42, 47, 49, 55, 58, 59, 62, 63, 64, 66, 67, 68, 70, 72, 74, 75, 77, 81, 84, 88, 89, 91, 94, 97, 98, 99, 101, 102, 104, 109, 111, 115, 116, 118, 119, 122, 123, 124, 125, 126, 127, 129, 130, 132, 135, 136, 138, 139, 142, 143, 144, 147, 148, 149, 151, 158, 159, 161, 162, 164, 167, 170], "8f": [0, 82], "001": [0, 36, 82, 92], "1000": [0, 57, 71, 82, 162], "A": [0, 2, 3, 4, 5, 6, 7, 11, 17, 18, 21, 22, 24, 31, 32, 37, 38, 39, 45, 48, 49, 51, 55, 58, 59, 63, 64, 65, 66, 68, 71, 75, 84, 86, 88, 89, 93, 94, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 108, 115, 116, 119, 125, 127, 128, 129, 130, 132, 135, 136, 140, 141, 148, 151, 158, 164, 170], "differ": [0, 1, 3, 6, 7, 12, 15, 16, 18, 19, 24, 30, 31, 32, 33, 36, 37, 38, 39, 42, 47, 49, 50, 52, 54, 57, 61, 63, 66, 68, 70, 71, 75, 76, 81, 84, 88, 89, 91, 93, 94, 96, 97, 102, 104, 109, 110, 111, 112, 115, 116, 123, 124, 125, 126, 127, 130, 132, 133, 140, 143, 144, 145, 146, 148, 149, 150, 151, 156, 157, 162, 164, 165, 166, 167, 170], "title_t_format": [0, 136], "contain": [0, 1, 3, 5, 12, 13, 18, 19, 22, 25, 27, 28, 32, 34, 35, 36, 37, 38, 39, 40, 43, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 57, 58, 59, 63, 64, 66, 67, 70, 71, 77, 78, 82, 84, 85, 88, 89, 91, 92, 94, 96, 97, 99, 101, 102, 103, 104, 106, 108, 109, 110, 111, 115, 116, 119, 120, 127, 128, 138, 140, 142, 147, 148, 151, 153, 158, 162, 164, 165, 167], "i": [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 92, 94, 95, 96, 97, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130, 132, 134, 135, 136, 137, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 154, 155, 156, 157, 158, 159, 160, 161, 162, 164, 165, 166, 167, 168, 169, 170], "dai": [0, 6, 13, 55, 136, 151], "hour": [0, 13, 36, 55, 63, 136], "minut": [0, 36, 42, 51, 55, 58, 63, 136, 143, 164, 166], "second": [0, 3, 16, 18, 19, 32, 34, 39, 47, 49, 51, 55, 63, 71, 88, 94, 98, 104, 115, 119, 125, 136, 139, 148, 151, 158, 160, 161, 164, 167, 170], "otherwis": [0, 5, 32, 58, 62, 65, 70, 86, 98, 102, 103, 104, 105, 106, 109, 115, 136, 137, 148, 154, 164], "you": [0, 2, 3, 4, 5, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 47, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 66, 67, 70, 71, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 88, 89, 90, 91, 93, 96, 97, 98, 99, 100, 101, 102, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 116, 118, 119, 124, 125, 126, 127, 130, 132, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 149, 150, 151, 152, 153, 155, 156, 157, 158, 160, 162, 165, 166, 167, 169], "could": [0, 5, 12, 13, 29, 34, 37, 38, 39, 42, 47, 57, 58, 64, 70, 72, 75, 76, 77, 82, 84, 88, 94, 98, 106, 107, 111, 123, 132, 142, 144, 149, 150, 151, 152, 164, 167], "plotax": [0, 3, 47, 82, 130, 147], "surfac": [0, 17, 24, 27, 32, 34, 36, 37, 42, 47, 48, 50, 52, 55, 72, 75, 81, 83, 89, 96, 108, 112, 115, 123, 142, 143, 151, 162], "elev": [0, 24, 27, 34, 42, 48, 50, 52, 55, 57, 63, 72, 81, 112, 115, 130, 142, 143, 151, 162, 164, 166], "after": [0, 1, 3, 5, 6, 12, 13, 21, 25, 29, 30, 31, 34, 35, 36, 38, 39, 42, 47, 49, 52, 58, 59, 61, 63, 64, 66, 67, 70, 71, 77, 82, 89, 90, 91, 93, 98, 104, 106, 111, 115, 116, 118, 119, 123, 124, 136, 141, 144, 148, 149, 150, 152, 158, 167], "earthquak": [0, 19, 27, 32, 48, 49, 52, 114, 144, 151, 159, 162], "none": [0, 1, 2, 3, 16, 26, 29, 32, 35, 37, 42, 47, 51, 55, 63, 70, 77, 91, 94, 97, 98, 103, 104, 106, 109, 116, 118, 119, 125, 127, 128, 129, 130, 131, 134, 135, 136, 139, 148, 150, 152, 158, 164], "instead": [0, 2, 3, 13, 19, 34, 38, 39, 42, 44, 47, 49, 56, 58, 59, 62, 66, 67, 105, 106, 109, 111, 124, 125, 128, 132, 135, 139, 140, 141, 142, 151, 162, 164], "convent": [0, 3, 24, 32, 50, 57, 75, 102, 162], "mention": [0, 19, 96, 148, 149], "abov": [0, 3, 5, 13, 14, 16, 19, 22, 30, 34, 36, 38, 39, 41, 42, 43, 44, 47, 49, 52, 55, 57, 58, 59, 62, 65, 67, 70, 72, 75, 77, 82, 85, 86, 89, 98, 100, 105, 108, 109, 115, 118, 125, 127, 132, 135, 140, 142, 144, 146, 147, 148, 150, 151, 152, 158, 161, 162, 164, 167], "intern": [0, 6, 32, 47, 57, 63, 75, 125, 149, 162, 164, 170], "t_str": 0, "title_str": 0, "xlimit": [0, 47, 55, 130], "arrai": [0, 3, 6, 15, 19, 22, 24, 29, 32, 34, 35, 37, 41, 47, 48, 51, 53, 57, 63, 82, 88, 89, 91, 92, 94, 96, 97, 98, 101, 102, 103, 104, 106, 108, 109, 110, 119, 120, 121, 125, 127, 130, 132, 136, 140, 141, 142, 145, 148, 149, 150, 151, 152, 158, 162, 164, 167], "xmin": [0, 37], "xmax": [0, 37], "auto": [0, 47, 89], "x": [0, 2, 3, 5, 8, 13, 16, 19, 22, 25, 27, 29, 30, 31, 32, 34, 35, 36, 37, 41, 42, 45, 47, 48, 49, 50, 51, 55, 56, 57, 58, 59, 63, 70, 71, 72, 75, 77, 81, 82, 85, 88, 91, 92, 94, 95, 96, 98, 99, 101, 102, 103, 106, 107, 108, 110, 115, 116, 118, 130, 136, 140, 141, 142, 144, 148, 149, 150, 151, 162, 164, 167, 170], "limit": [0, 4, 6, 12, 27, 32, 35, 41, 52, 55, 63, 65, 71, 76, 81, 86, 88, 89, 94, 96, 104, 115, 121, 142, 148, 149, 150, 152, 162, 164, 170], "an": [0, 1, 2, 3, 4, 5, 6, 9, 11, 12, 16, 17, 18, 19, 22, 24, 26, 27, 29, 30, 31, 32, 34, 35, 36, 37, 41, 42, 43, 44, 47, 48, 49, 51, 52, 54, 59, 60, 61, 62, 63, 67, 68, 71, 72, 75, 76, 77, 81, 82, 84, 86, 88, 89, 90, 91, 94, 95, 96, 97, 98, 100, 101, 102, 103, 104, 105, 107, 108, 109, 111, 113, 116, 117, 119, 121, 123, 124, 125, 127, 128, 129, 130, 132, 133, 135, 136, 137, 139, 140, 141, 142, 144, 147, 148, 149, 151, 153, 156, 157, 158, 159, 162, 164, 165, 166, 167], "two": [0, 3, 4, 7, 8, 15, 17, 18, 24, 27, 30, 32, 34, 36, 37, 47, 48, 49, 51, 55, 56, 58, 63, 71, 72, 77, 82, 88, 94, 97, 98, 101, 104, 107, 109, 113, 114, 115, 116, 118, 119, 123, 124, 127, 129, 139, 140, 142, 145, 146, 150, 162, 164, 167, 170], "element": [0, 3, 24, 37, 63, 102, 104, 106, 148, 149, 150, 151], "choos": [0, 7, 60, 62, 63, 75, 101, 118, 148, 151], "automat": [0, 2, 3, 8, 11, 16, 32, 38, 39, 44, 55, 59, 66, 81, 82, 84, 88, 93, 97, 99, 105, 106, 107, 109, 116, 119, 130, 132, 148, 149, 151, 162], "ylimit": [0, 47, 55, 130, 147], "ymin": [0, 37], "ymax": [0, 37], "y": [0, 2, 3, 4, 8, 16, 17, 19, 29, 32, 34, 35, 36, 37, 41, 42, 47, 49, 50, 51, 55, 57, 59, 63, 70, 71, 75, 77, 88, 94, 98, 99, 101, 115, 118, 126, 136, 140, 141, 142, 144, 148, 149, 150, 151, 162, 164], "xticks_fonts": [0, 136], "xtick": [0, 42, 53], "mark": [0, 16, 55, 70, 115, 116], "label": [0, 32, 36, 53, 55, 57, 63, 118, 123, 135, 136, 142, 162, 164], "xticks_kwarg": [0, 136], "dictionari": [0, 1, 2, 3, 32, 37, 47, 64, 82, 88, 91, 97, 102, 103, 106, 108, 111, 158, 162, 164], "locat": [0, 5, 6, 7, 13, 19, 32, 34, 36, 49, 50, 51, 55, 57, 62, 64, 71, 72, 77, 94, 98, 100, 102, 103, 109, 111, 113, 115, 124, 126, 143, 144, 151, 158, 159, 164], "xlabel": [0, 136], "xlabel_fonts": [0, 136], "xlabel_kwarg": [0, 136], "yticks_fonts": [0, 136], "ytick": 0, "yticks_kwarg": [0, 136], "ylabel": [0, 136], "ylabel_fonts": [0, 136], "ylabel_kwarg": [0, 136], "aspect": [0, 12, 26, 31, 46, 52, 53, 71, 136, 164], "ratio": [0, 3, 6, 15, 24, 49, 53, 71, 75, 92, 102, 104, 145, 148, 149, 150], "gca": [0, 42, 53, 70], "set_aspect": [0, 42, 53, 70], "aspect_latitud": [0, 136], "longitud": [0, 32, 34, 37, 50, 51, 57, 63, 70, 75, 81, 123, 142, 151, 158, 164], "latitud": [0, 15, 32, 34, 37, 49, 50, 51, 57, 75, 81, 123, 142, 145, 151, 154, 158, 164], "coordin": [0, 4, 25, 32, 34, 36, 48, 51, 63, 77, 81, 88, 94, 98, 99, 108, 115, 142, 151, 164], "chose": [0, 68, 137], "so": [0, 5, 6, 8, 9, 13, 16, 18, 19, 21, 24, 29, 30, 31, 32, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 47, 49, 52, 53, 55, 56, 57, 58, 59, 60, 63, 64, 66, 67, 70, 71, 72, 75, 76, 77, 78, 81, 82, 85, 88, 89, 90, 97, 98, 101, 106, 108, 109, 113, 115, 116, 118, 119, 120, 124, 125, 126, 127, 128, 129, 130, 132, 135, 136, 140, 142, 143, 144, 147, 148, 149, 150, 151, 154, 158, 161, 162, 164, 166, 167, 168], "distanc": [0, 32, 36, 49, 51, 55, 75, 151, 162, 164], "meter": [0, 18, 19, 32, 49, 51, 55, 70, 72, 75, 115, 143, 151, 158, 164, 166], "same": [0, 3, 5, 6, 8, 13, 16, 18, 19, 24, 27, 30, 33, 34, 35, 36, 37, 42, 44, 47, 49, 50, 51, 52, 55, 57, 58, 59, 62, 63, 64, 66, 68, 70, 75, 77, 78, 81, 82, 83, 84, 88, 92, 94, 96, 97, 98, 101, 102, 104, 109, 110, 118, 119, 120, 124, 125, 130, 132, 136, 139, 140, 142, 148, 149, 150, 151, 156, 162, 164, 167], "cover": [0, 6, 7, 29, 30, 32, 34, 36, 37, 41, 42, 55, 63, 70, 75, 115, 120, 125, 144, 150, 162], "broad": [0, 164], "rang": [0, 3, 5, 13, 32, 47, 51, 55, 115, 119, 124, 141, 142], "middl": [0, 102, 124], "most": [0, 3, 19, 22, 24, 29, 31, 34, 36, 38, 39, 43, 44, 47, 49, 52, 54, 55, 56, 57, 58, 61, 63, 66, 70, 71, 76, 77, 78, 81, 82, 84, 86, 94, 98, 99, 104, 107, 108, 110, 115, 116, 118, 124, 126, 132, 135, 137, 138, 139, 140, 141, 142, 143, 147, 148, 149, 151, 154, 155, 167], "interest": [0, 5, 12, 16, 17, 19, 20, 25, 29, 31, 34, 36, 37, 42, 53, 71, 72, 89, 106, 113, 115, 116, 118, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 144, 148, 158], "gener": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 14, 16, 17, 18, 19, 21, 22, 26, 27, 30, 31, 34, 36, 41, 42, 43, 44, 47, 48, 49, 52, 55, 57, 59, 61, 64, 66, 67, 68, 72, 75, 76, 77, 81, 82, 83, 84, 86, 89, 90, 92, 94, 99, 100, 101, 103, 104, 105, 108, 109, 111, 113, 115, 119, 123, 125, 136, 139, 142, 143, 146, 148, 149, 153, 159, 161, 162, 167, 168], "appropri": [0, 4, 5, 6, 13, 16, 19, 26, 30, 48, 52, 53, 55, 59, 61, 63, 64, 68, 71, 74, 76, 88, 91, 92, 93, 97, 99, 100, 101, 102, 103, 116, 129, 140, 143, 148, 158, 167, 170], "valu": [0, 3, 5, 6, 7, 16, 18, 19, 22, 24, 29, 32, 35, 36, 37, 38, 39, 41, 42, 44, 47, 48, 49, 51, 53, 54, 55, 57, 63, 64, 66, 68, 70, 71, 72, 75, 76, 77, 82, 89, 94, 96, 97, 98, 101, 102, 103, 104, 106, 108, 109, 115, 116, 119, 120, 122, 123, 125, 127, 129, 130, 132, 135, 139, 140, 142, 143, 144, 148, 149, 150, 151, 152, 154, 158, 159, 162, 164, 165, 167, 170], "np": [0, 32, 41, 88, 94, 98, 101, 141, 150], "co": [0, 26, 32, 37, 42, 51, 53, 59, 70, 88, 101, 144], "pi": [0, 42, 51, 53, 70, 88, 101], "180": [0, 32, 42, 53, 63, 70, 75], "useoffset": [0, 42, 53, 136], "boolean": [0, 3, 55, 70, 97, 102, 148, 149, 151], "tick": [0, 55, 136], "mai": [0, 1, 2, 3, 4, 5, 6, 12, 13, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 30, 31, 32, 34, 36, 37, 38, 39, 40, 42, 43, 44, 49, 50, 51, 52, 53, 55, 57, 58, 61, 62, 65, 66, 68, 70, 71, 72, 75, 76, 81, 82, 84, 85, 86, 89, 90, 93, 94, 96, 97, 98, 101, 103, 104, 107, 109, 111, 115, 116, 118, 121, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 146, 147, 148, 149, 150, 151, 158, 159, 160, 162, 164, 165, 167], "offset": [0, 53, 55, 63, 158, 164], "from": [0, 1, 3, 4, 5, 6, 7, 12, 14, 15, 16, 17, 18, 19, 20, 25, 28, 29, 31, 34, 36, 38, 39, 41, 46, 47, 48, 49, 52, 55, 56, 57, 59, 60, 61, 62, 64, 65, 66, 67, 71, 72, 74, 75, 77, 81, 82, 86, 87, 88, 90, 91, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 111, 112, 113, 115, 116, 118, 119, 120, 123, 124, 125, 127, 130, 131, 132, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 148, 149, 150, 151, 152, 154, 156, 157, 158, 159, 160, 162, 165, 166, 167, 168], "some": [0, 3, 4, 5, 6, 7, 8, 10, 12, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 29, 30, 32, 34, 36, 37, 38, 39, 42, 44, 47, 48, 49, 50, 52, 53, 55, 56, 57, 58, 59, 62, 67, 70, 75, 76, 77, 81, 83, 84, 86, 89, 90, 92, 96, 97, 98, 100, 101, 103, 105, 106, 107, 108, 110, 111, 113, 114, 115, 116, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 140, 142, 143, 144, 147, 148, 149, 150, 152, 153, 154, 158, 159, 161, 162, 164, 167], "common": [0, 3, 18, 19, 25, 30, 38, 39, 43, 44, 66, 67, 78, 81, 88, 102, 104, 106, 107, 118, 125, 127, 130, 136, 165, 167], "print": [0, 1, 3, 7, 31, 37, 42, 55, 57, 63, 64, 70, 71, 82, 94, 98, 99, 100, 106, 108, 110, 111, 119, 120, 123, 125, 126, 127, 134, 142, 148, 150, 152, 158, 165], "corner": [0, 3, 32, 34, 57, 75, 77, 94, 142, 148, 150, 152, 162, 164], "often": [0, 6, 11, 13, 16, 19, 22, 29, 31, 34, 37, 38, 39, 43, 44, 47, 48, 52, 53, 54, 63, 64, 68, 72, 75, 77, 98, 110, 111, 115, 116, 132, 136, 139, 140, 142, 143, 144, 147, 148, 151, 158, 162, 166, 167, 170], "nicer": [0, 84, 136], "full": [0, 5, 6, 14, 19, 37, 59, 61, 62, 63, 77, 82, 91, 98, 104, 108, 135, 146, 148, 162, 167], "each": [0, 1, 2, 3, 5, 6, 7, 12, 16, 18, 19, 20, 24, 32, 34, 36, 37, 45, 47, 49, 51, 55, 57, 58, 59, 63, 64, 67, 70, 71, 72, 75, 76, 77, 80, 81, 82, 84, 88, 89, 92, 94, 97, 98, 99, 101, 102, 103, 104, 106, 108, 115, 116, 118, 119, 120, 124, 125, 127, 128, 130, 135, 136, 137, 139, 140, 141, 142, 144, 147, 148, 149, 150, 151, 152, 158, 161, 162, 164, 166, 170], "which": [0, 1, 3, 4, 5, 6, 7, 11, 12, 13, 14, 16, 18, 19, 22, 24, 27, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 47, 49, 50, 52, 55, 57, 58, 59, 60, 61, 62, 63, 64, 66, 68, 70, 71, 72, 75, 76, 77, 82, 84, 85, 88, 89, 91, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 107, 108, 109, 110, 113, 115, 116, 118, 119, 120, 123, 125, 127, 128, 130, 132, 135, 136, 137, 139, 140, 141, 142, 143, 144, 148, 149, 150, 151, 154, 158, 159, 162, 164, 166, 167, 169, 170], "should": [0, 1, 2, 3, 4, 5, 6, 12, 13, 14, 16, 19, 20, 21, 22, 24, 25, 27, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 47, 49, 52, 55, 57, 58, 59, 60, 61, 62, 63, 66, 68, 70, 71, 74, 75, 76, 77, 81, 82, 84, 89, 94, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 111, 112, 115, 116, 118, 119, 120, 123, 125, 126, 127, 130, 135, 136, 137, 139, 140, 141, 143, 144, 146, 147, 148, 149, 150, 151, 152, 153, 158, 160, 162, 164, 165, 167, 169, 170], "ticklabel_format": [0, 42, 53], "issu": [0, 19, 24, 26, 28, 58, 59, 62, 71, 88, 93, 94, 96, 104, 105, 107, 116, 118, 119, 124, 125, 126, 127, 140, 151, 165], "grid": [0, 4, 7, 17, 18, 19, 21, 22, 24, 25, 27, 29, 30, 41, 42, 47, 48, 50, 52, 55, 56, 63, 70, 71, 72, 77, 78, 81, 86, 88, 96, 97, 98, 99, 101, 102, 103, 104, 106, 108, 115, 116, 118, 119, 120, 122, 123, 125, 126, 127, 130, 132, 134, 135, 136, 137, 140, 141, 142, 143, 144, 148, 149, 150, 152, 159, 161, 162, 164, 166, 167, 170], "grid_kwarg": [0, 136], "add": [0, 11, 12, 13, 16, 17, 18, 19, 29, 30, 32, 47, 51, 55, 58, 59, 61, 62, 67, 70, 71, 75, 81, 88, 93, 94, 98, 99, 101, 109, 118, 120, 123, 125, 126, 127, 130, 136, 141, 152, 154, 158, 162, 164, 168], "line": [0, 1, 3, 4, 16, 19, 30, 31, 32, 34, 35, 42, 44, 47, 48, 49, 50, 51, 54, 55, 57, 58, 63, 64, 66, 67, 71, 77, 81, 82, 96, 97, 99, 104, 108, 109, 110, 111, 118, 119, 120, 123, 125, 132, 136, 137, 142, 147, 148, 150, 158, 162, 164], "linewidth": [0, 82, 142], "afterax": [0, 29, 47, 55, 82, 136], "function": [0, 1, 2, 3, 5, 7, 15, 17, 18, 19, 24, 25, 27, 29, 30, 32, 34, 37, 42, 47, 48, 49, 54, 55, 57, 66, 67, 68, 72, 75, 81, 82, 83, 88, 89, 91, 92, 93, 94, 95, 97, 100, 101, 102, 103, 106, 109, 110, 115, 116, 118, 119, 120, 123, 124, 125, 126, 127, 132, 135, 136, 140, 142, 144, 145, 147, 148, 149, 150, 151, 152, 158, 162, 163, 164, 165, 167], "execut": [0, 1, 3, 14, 16, 19, 21, 29, 31, 34, 38, 39, 47, 63, 71, 82, 84, 91, 93, 99, 111, 116, 118, 140, 146, 165], "exec": [0, 1, 3, 82], "defin": [0, 1, 3, 5, 6, 7, 24, 29, 32, 34, 36, 37, 41, 42, 44, 55, 63, 64, 66, 70, 71, 75, 82, 84, 88, 91, 94, 100, 101, 103, 104, 106, 108, 109, 115, 119, 127, 132, 136, 140, 150, 152, 158, 162, 164, 165, 167, 170], "have": [0, 1, 2, 3, 4, 5, 6, 8, 9, 11, 12, 13, 14, 16, 18, 19, 20, 22, 24, 25, 26, 27, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 42, 44, 45, 47, 48, 49, 51, 52, 55, 56, 58, 59, 60, 62, 66, 67, 68, 70, 71, 72, 75, 76, 77, 81, 82, 84, 85, 86, 88, 89, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 111, 113, 115, 116, 118, 119, 120, 122, 123, 124, 125, 126, 127, 129, 130, 132, 133, 135, 136, 137, 139, 140, 141, 142, 143, 148, 149, 151, 153, 154, 158, 162, 164, 165, 167], "argument": [0, 1, 2, 3, 29, 32, 37, 48, 51, 54, 55, 57, 82, 88, 89, 93, 94, 97, 101, 103, 104, 106, 109, 116, 127, 136, 140, 142, 147, 148, 149, 158, 164, 167], "current_data": [0, 3, 27, 47, 81, 82], "version": [0, 1, 4, 5, 6, 7, 8, 9, 11, 13, 15, 16, 18, 19, 22, 24, 25, 30, 32, 34, 36, 41, 42, 44, 45, 47, 48, 49, 50, 52, 55, 57, 60, 61, 63, 64, 67, 68, 70, 71, 75, 76, 78, 81, 82, 84, 85, 89, 92, 96, 97, 99, 102, 104, 105, 107, 110, 112, 115, 116, 118, 119, 120, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 140, 141, 142, 144, 145, 146, 148, 149, 150, 151, 152, 156, 157, 158, 162, 164, 167, 170], "liner": [0, 32], "pylab": [0, 42, 82], "my": [0, 22, 24, 57, 77, 89, 99, 150, 162], "custom": [0, 13, 16, 22, 24, 27, 67, 71, 78, 81, 89, 95, 101, 144], "sinc": [0, 3, 4, 5, 6, 16, 19, 22, 24, 30, 34, 36, 42, 44, 45, 51, 52, 55, 57, 58, 59, 62, 63, 66, 67, 72, 75, 76, 77, 81, 82, 88, 89, 90, 97, 98, 115, 116, 118, 119, 123, 124, 125, 126, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 148, 149, 151, 162, 165, 166], "ha": [0, 4, 5, 6, 8, 12, 13, 14, 16, 18, 19, 20, 22, 23, 24, 25, 26, 29, 30, 31, 34, 36, 37, 38, 39, 42, 45, 47, 49, 54, 55, 56, 57, 58, 59, 63, 64, 66, 68, 70, 71, 72, 75, 77, 78, 82, 86, 89, 91, 94, 98, 101, 102, 103, 106, 107, 109, 111, 112, 113, 115, 116, 117, 118, 119, 120, 125, 126, 127, 128, 129, 130, 132, 135, 136, 137, 138, 140, 142, 143, 148, 149, 151, 154, 158, 161, 162, 164, 167, 168, 170], "been": [0, 1, 4, 5, 8, 9, 13, 14, 16, 18, 19, 20, 22, 23, 24, 26, 27, 29, 30, 31, 34, 35, 36, 37, 38, 39, 42, 45, 47, 48, 49, 52, 55, 56, 57, 58, 59, 64, 66, 68, 70, 71, 75, 78, 82, 84, 86, 89, 91, 97, 98, 102, 103, 106, 107, 108, 109, 111, 113, 115, 117, 118, 119, 120, 122, 125, 126, 127, 128, 129, 130, 132, 133, 135, 136, 137, 139, 140, 142, 148, 149, 151, 154, 162, 164, 167], "import": [0, 3, 5, 18, 19, 24, 30, 34, 36, 40, 41, 42, 47, 51, 52, 55, 57, 60, 62, 63, 67, 68, 70, 75, 78, 82, 84, 88, 89, 91, 93, 94, 96, 97, 98, 99, 100, 101, 103, 104, 105, 106, 108, 116, 118, 125, 130, 140, 141, 142, 143, 144, 148, 149, 150, 151, 152, 154, 162, 164, 166, 168], "modul": [0, 7, 8, 12, 18, 19, 27, 30, 31, 34, 36, 42, 44, 48, 49, 53, 55, 56, 57, 62, 64, 67, 70, 75, 76, 81, 82, 83, 84, 88, 89, 92, 93, 97, 101, 102, 103, 106, 110, 111, 116, 118, 120, 121, 123, 126, 127, 128, 129, 130, 137, 139, 142, 148, 149, 151, 158, 162, 163], "form": [0, 2, 3, 4, 5, 6, 8, 12, 19, 21, 22, 24, 26, 30, 31, 32, 34, 36, 38, 39, 41, 45, 46, 47, 49, 51, 55, 59, 64, 65, 68, 75, 77, 86, 89, 98, 102, 104, 108, 109, 115, 120, 127, 128, 129, 130, 139, 140, 142, 148, 149, 150, 151, 156, 162, 164, 167, 170], "better": [0, 6, 18, 19, 24, 34, 42, 47, 49, 70, 71, 72, 76, 77, 81, 104, 113, 115, 118, 124, 125, 126, 129, 130, 132, 133], "want": [0, 2, 3, 10, 12, 13, 14, 19, 21, 22, 26, 30, 31, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 47, 51, 54, 55, 58, 59, 61, 62, 63, 66, 67, 68, 70, 76, 77, 82, 84, 88, 89, 90, 91, 97, 98, 99, 111, 114, 116, 124, 127, 130, 136, 138, 140, 141, 142, 146, 147, 150, 155, 158, 162, 164, 165], "do": [0, 1, 4, 6, 8, 11, 12, 13, 15, 18, 19, 21, 22, 27, 30, 31, 34, 35, 36, 38, 39, 40, 42, 43, 44, 47, 52, 54, 55, 56, 58, 61, 62, 66, 67, 70, 75, 76, 77, 82, 84, 88, 89, 93, 94, 96, 97, 98, 99, 100, 101, 105, 107, 108, 109, 111, 114, 115, 116, 118, 119, 123, 124, 125, 126, 127, 129, 130, 132, 135, 136, 144, 145, 147, 148, 149, 150, 151, 156, 157, 158, 160, 162, 165, 167, 168], "sever": [0, 1, 2, 5, 10, 12, 16, 19, 22, 24, 25, 26, 31, 32, 36, 37, 38, 39, 43, 47, 50, 52, 55, 59, 62, 64, 71, 72, 75, 81, 105, 115, 116, 117, 119, 120, 123, 124, 125, 126, 128, 129, 130, 132, 142, 147, 151, 160, 162, 164, 167], "thing": [0, 13, 16, 19, 24, 30, 31, 42, 52, 58, 63, 84, 93, 115, 116, 118, 126, 131, 139], "need": [0, 4, 5, 6, 12, 13, 15, 16, 18, 19, 20, 21, 22, 24, 29, 30, 31, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 47, 49, 52, 53, 57, 58, 59, 60, 62, 63, 64, 66, 67, 70, 71, 75, 76, 77, 78, 84, 85, 88, 89, 91, 96, 97, 98, 99, 101, 104, 108, 110, 111, 113, 115, 116, 118, 120, 124, 125, 127, 128, 132, 134, 135, 136, 137, 139, 140, 142, 144, 145, 146, 148, 149, 150, 151, 152, 156, 157, 158, 159, 160, 162, 164, 166, 167, 170], "access": [0, 17, 29, 31, 59, 62, 93, 94, 96, 104, 106, 109], "data": [0, 1, 3, 5, 18, 19, 27, 29, 32, 34, 35, 36, 37, 38, 39, 41, 42, 43, 45, 47, 48, 50, 51, 57, 58, 63, 64, 65, 66, 70, 71, 73, 81, 82, 83, 84, 86, 88, 91, 94, 97, 98, 100, 102, 103, 104, 106, 109, 112, 113, 114, 115, 118, 119, 121, 122, 124, 125, 127, 128, 129, 130, 132, 136, 137, 139, 140, 142, 143, 149, 150, 152, 158, 161, 163, 168], "store": [0, 1, 13, 19, 35, 37, 43, 55, 57, 58, 71, 77, 97, 98, 101, 106, 107, 108, 116, 119, 125, 147, 149, 151, 158, 161, 162, 164], "def": [0, 1, 3, 47, 55, 70, 82, 88, 94, 98, 101, 104, 150, 152, 158], "1d": [0, 4, 7, 15, 19, 21, 24, 27, 31, 32, 37, 48, 49, 63, 67, 71, 72, 81, 82, 88, 96, 99, 100, 102, 104, 110, 112, 118, 123, 126, 128, 129, 137, 140, 141, 145, 149, 157, 164, 167], "alreadi": [0, 1, 6, 12, 13, 19, 20, 30, 31, 44, 59, 60, 62, 63, 64, 70, 84, 85, 99, 103, 105, 108, 110, 118, 120, 128, 135, 136, 137, 146, 164], "xlower": [0, 3, 16, 24, 29, 42, 49, 89, 127, 150, 152, 162, 164, 167], "xupper": [0, 24, 49, 150, 152, 164], "k": [0, 3, 4, 6, 17, 71, 92, 97, 102, 108, 142], "get": [0, 10, 13, 19, 26, 30, 43, 48, 55, 57, 58, 60, 61, 62, 66, 67, 70, 81, 85, 88, 89, 94, 97, 98, 99, 105, 107, 108, 109, 110, 113, 114, 116, 126, 140, 142, 149, 158, 164, 165], "variabl": [0, 3, 5, 13, 14, 18, 19, 24, 27, 29, 30, 32, 34, 37, 38, 39, 40, 43, 47, 48, 49, 54, 55, 58, 61, 62, 71, 74, 76, 77, 78, 82, 88, 89, 97, 99, 103, 104, 106, 107, 109, 111, 118, 123, 124, 125, 127, 129, 135, 136, 139, 140, 148, 149, 150, 152, 158, 162, 164, 165, 167], "just": [0, 6, 30, 34, 43, 58, 59, 88, 89, 91, 93, 97, 98, 99, 100, 101, 106, 109, 120, 127, 148, 167], "avail": [0, 4, 5, 10, 12, 16, 24, 25, 31, 34, 36, 42, 46, 47, 50, 52, 55, 62, 66, 70, 71, 72, 78, 81, 83, 84, 88, 91, 96, 97, 98, 100, 102, 104, 107, 108, 109, 110, 111, 115, 126, 137, 140, 141, 143, 148, 150, 153, 158, 159, 162], "var": [0, 3, 13, 29, 37, 158], "min": [0, 102, 164, 170], "max": [0, 32, 34, 42, 71, 102, 115, 120, 144, 150, 152, 164, 170], "primarili": [0, 19, 56, 77, 127, 128], "where": [0, 1, 3, 5, 6, 12, 13, 16, 18, 19, 24, 29, 32, 34, 36, 37, 38, 39, 41, 42, 43, 47, 48, 49, 52, 55, 57, 62, 63, 64, 66, 68, 70, 71, 72, 77, 78, 84, 91, 94, 95, 96, 97, 99, 102, 111, 115, 118, 119, 120, 123, 124, 125, 130, 132, 139, 141, 142, 143, 144, 147, 148, 149, 150, 151, 152, 158, 161, 162, 164, 167, 170], "horizont": [0, 55, 164], "implement": [0, 1, 4, 5, 7, 14, 16, 18, 19, 32, 42, 49, 63, 64, 67, 74, 86, 101, 102, 104, 108, 109, 116, 122, 125, 128, 130, 132, 140, 141, 148, 164, 167, 170], "claw": [0, 5, 6, 8, 11, 12, 13, 14, 15, 16, 18, 19, 21, 22, 24, 26, 30, 32, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 51, 53, 54, 56, 58, 59, 61, 62, 63, 66, 67, 71, 74, 75, 76, 83, 88, 91, 93, 96, 97, 98, 99, 105, 107, 111, 112, 113, 114, 115, 116, 118, 119, 120, 122, 123, 126, 127, 129, 135, 136, 140, 144, 145, 150, 151, 152, 154, 155, 156, 157, 160, 161, 162, 164, 165, 167, 168], "visclaw": [0, 1, 7, 13, 24, 25, 26, 30, 36, 42, 47, 48, 50, 53, 55, 59, 60, 61, 62, 66, 70, 71, 78, 82, 83, 84, 85, 96, 100, 105, 111, 146, 147, 153], "src": [0, 5, 6, 11, 14, 15, 16, 18, 19, 21, 22, 30, 32, 34, 35, 36, 37, 42, 43, 44, 49, 51, 54, 56, 59, 62, 63, 66, 67, 71, 75, 76, 83, 100, 101, 109, 111, 112, 115, 116, 118, 120, 123, 124, 126, 127, 128, 129, 130, 132, 136, 137, 140, 144, 145, 148, 150, 152, 154, 156, 164, 165, 170], "python": [0, 3, 4, 7, 8, 11, 13, 14, 17, 21, 24, 25, 27, 29, 30, 31, 32, 35, 36, 37, 38, 39, 40, 43, 45, 47, 48, 50, 51, 54, 55, 57, 58, 59, 60, 61, 62, 63, 75, 77, 78, 81, 82, 83, 86, 87, 89, 93, 94, 96, 97, 99, 100, 101, 102, 104, 107, 108, 109, 116, 118, 120, 121, 123, 125, 126, 127, 128, 129, 132, 136, 137, 140, 141, 146, 151, 162, 164, 165, 168], "gaugetool": [0, 47, 123], "time_scal": 0, "scale": [0, 4, 32, 53, 55, 71, 78, 96, 97, 118, 119, 125, 127, 132, 151], "3600": [0, 34, 36, 77], "time_label": 0, "time_label_fonts": 0, "time_label_kwarg": [0, 136], "new_plotitem": [0, 3, 47, 55, 82, 147], "plot_typ": [0, 24, 47, 55, 82, 84, 147], "return": [0, 1, 2, 3, 32, 35, 37, 40, 51, 55, 63, 67, 70, 71, 82, 84, 91, 92, 94, 97, 98, 101, 102, 103, 104, 106, 109, 116, 126, 140, 142, 148, 150, 152, 158, 160, 164, 167, 170], "clawplotitem": [0, 1, 7, 24, 29, 81, 83, 118, 124, 127, 136, 147], "associ": [0, 1, 2, 6, 24, 55, 62, 76, 94, 97, 98, 116], "kei": [0, 1, 2, 13, 30, 32, 47, 97, 104, 108, 109, 158, 164], "provid": [0, 2, 4, 7, 10, 16, 19, 22, 29, 30, 32, 34, 36, 37, 41, 44, 48, 49, 50, 51, 52, 55, 57, 58, 63, 65, 67, 72, 75, 77, 81, 86, 89, 91, 92, 97, 98, 99, 101, 103, 104, 108, 109, 110, 113, 114, 116, 118, 124, 132, 136, 138, 140, 148, 157, 158, 161, 162, 164, 167], "one": [0, 1, 2, 3, 4, 5, 6, 8, 13, 15, 16, 18, 19, 22, 24, 26, 27, 29, 30, 31, 32, 34, 36, 37, 38, 39, 42, 47, 49, 50, 55, 57, 58, 59, 60, 61, 62, 63, 64, 68, 70, 71, 72, 74, 75, 77, 78, 81, 82, 88, 94, 97, 98, 99, 101, 103, 104, 105, 108, 109, 111, 113, 115, 116, 118, 124, 125, 127, 132, 135, 139, 140, 141, 142, 144, 145, 147, 148, 149, 150, 151, 152, 153, 156, 157, 158, 162, 164, 167, 168], "item1": [0, 84], "etc": [0, 2, 16, 21, 22, 26, 29, 30, 34, 35, 36, 52, 55, 58, 61, 63, 67, 77, 81, 89, 140, 147, 148, 151, 158, 167], "gethandl": [0, 2, 3], "handl": [0, 2, 3, 6, 34, 42, 44, 48, 57, 63, 76, 78, 81, 94, 97, 101, 103, 104, 106, 107, 108, 109, 111, 118, 119, 120, 122, 123, 125, 127, 128, 129, 130, 141, 144, 158, 164], "plot": [1, 2, 4, 7, 8, 12, 29, 31, 32, 38, 39, 40, 42, 43, 44, 45, 48, 49, 57, 59, 60, 63, 70, 77, 87, 88, 90, 91, 94, 95, 96, 98, 103, 105, 107, 108, 110, 111, 113, 118, 122, 123, 124, 125, 126, 127, 129, 130, 131, 135, 136, 142, 148, 160, 164], "outdir": [1, 3, 35, 36, 37, 38, 39, 47, 54, 66, 81, 84, 91, 93, 94, 98, 124, 150, 152, 165], "path": [1, 5, 13, 14, 32, 34, 37, 41, 42, 44, 47, 49, 51, 55, 58, 61, 62, 64, 66, 70, 74, 81, 82, 91, 96, 97, 99, 103, 109, 126, 127, 130, 136, 146, 151, 158, 164, 165], "directori": [1, 3, 5, 6, 11, 12, 13, 14, 15, 16, 19, 21, 22, 24, 25, 27, 30, 31, 33, 34, 36, 37, 38, 39, 40, 43, 45, 46, 47, 48, 51, 54, 55, 58, 59, 61, 63, 67, 71, 76, 80, 81, 84, 91, 93, 94, 96, 97, 98, 101, 108, 111, 112, 113, 115, 116, 118, 119, 124, 125, 126, 127, 129, 139, 140, 144, 145, 146, 147, 148, 149, 153, 156, 157, 160, 161, 162, 165, 167, 168], "clawpack": [1, 2, 4, 5, 6, 7, 11, 16, 18, 19, 28, 30, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 47, 48, 49, 50, 51, 52, 54, 55, 62, 63, 64, 65, 67, 70, 71, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 106, 107, 108, 109, 110, 111, 114, 116, 117, 119, 120, 121, 122, 123, 124, 125, 139, 140, 142, 146, 148, 149, 150, 151, 153, 155, 158, 160, 162, 164, 165, 167, 168, 170], "output": [1, 5, 7, 8, 13, 14, 16, 27, 29, 30, 31, 32, 35, 37, 38, 39, 43, 44, 47, 48, 50, 51, 53, 54, 55, 59, 64, 72, 75, 81, 82, 84, 89, 91, 92, 93, 94, 95, 96, 99, 100, 102, 103, 104, 105, 106, 108, 109, 111, 118, 119, 123, 124, 125, 126, 127, 129, 130, 131, 135, 136, 137, 140, 147, 150, 152, 158, 159, 160, 161, 164, 167, 168], "plotdir": [1, 84, 147], "hardcopi": [1, 82, 84, 147], "file": [1, 5, 6, 7, 8, 9, 11, 12, 14, 15, 18, 19, 20, 21, 22, 24, 25, 27, 29, 30, 32, 35, 37, 38, 39, 41, 43, 44, 45, 47, 48, 49, 50, 52, 54, 56, 62, 63, 64, 66, 70, 75, 77, 78, 81, 83, 86, 89, 91, 93, 94, 96, 97, 98, 99, 100, 101, 103, 106, 107, 109, 111, 112, 113, 115, 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 155, 156, 157, 158, 159, 161, 164, 165, 166, 168], "put": [1, 11, 16, 30, 31, 44, 58, 62, 63, 71, 88, 93, 101, 125, 146], "overwrit": [1, 91, 98, 103], "ok": [1, 39, 40, 91, 99, 109, 120, 160, 164], "old": [1, 7, 22, 24, 34, 42, 58, 59, 84, 91, 99, 100, 101, 104, 116, 124, 126, 127, 132, 135, 137, 140, 151, 162], "afterfram": [1, 29, 81], "produc": [1, 3, 24, 29, 32, 37, 38, 39, 43, 47, 48, 55, 57, 58, 63, 71, 76, 80, 81, 97, 115, 116, 132, 147, 164], "frame": [1, 2, 3, 29, 36, 37, 47, 55, 71, 77, 81, 82, 84, 88, 91, 95, 97, 99, 103, 105, 109, 125, 135, 136, 139, 147, 150, 152, 153], "done": [1, 6, 7, 8, 11, 13, 16, 21, 22, 30, 36, 38, 39, 42, 47, 50, 55, 57, 58, 60, 63, 66, 70, 71, 75, 81, 82, 84, 88, 92, 93, 96, 109, 115, 120, 124, 125, 129, 139, 140, 142, 147, 149, 151, 161, 164, 165, 166], "beforefram": [1, 29, 127], "befor": [1, 3, 4, 6, 14, 19, 30, 32, 34, 36, 37, 38, 39, 42, 43, 44, 47, 57, 58, 59, 60, 62, 63, 66, 67, 71, 76, 77, 84, 88, 91, 97, 99, 104, 106, 111, 115, 116, 118, 119, 120, 131, 135, 136, 138, 140, 143, 144, 148, 149, 162, 164, 165], "start": [1, 2, 4, 5, 6, 7, 9, 13, 14, 19, 26, 29, 30, 32, 34, 36, 38, 39, 40, 41, 42, 43, 47, 48, 49, 51, 55, 57, 58, 59, 60, 61, 62, 63, 66, 70, 74, 75, 77, 82, 84, 88, 99, 103, 104, 110, 111, 115, 116, 124, 127, 132, 138, 139, 140, 142, 144, 151, 154, 158, 160, 162, 167], "printfig": 1, "png": [1, 13, 38, 39, 42, 43, 55, 63, 70, 71, 125, 130, 142], "make": [1, 5, 11, 13, 14, 19, 21, 22, 24, 26, 27, 29, 30, 34, 36, 38, 39, 41, 43, 44, 47, 50, 52, 54, 55, 58, 59, 62, 63, 64, 66, 67, 68, 71, 76, 78, 81, 84, 85, 88, 89, 91, 94, 95, 96, 97, 101, 103, 109, 114, 116, 118, 119, 123, 124, 125, 126, 127, 129, 130, 131, 132, 133, 135, 136, 140, 142, 148, 162, 164, 166, 167], "html": [1, 12, 13, 25, 30, 32, 38, 39, 43, 46, 47, 55, 58, 59, 75, 81, 82, 93, 97, 99, 100, 110, 111, 116, 118, 128, 130, 135, 136, 158], "latex": [1, 55, 81, 100], "exist": [1, 19, 23, 32, 33, 36, 38, 39, 55, 62, 66, 70, 71, 82, 94, 98, 101, 103, 106, 109, 120, 126, 127, 144, 158, 164, 166], "print_format": [1, 55], "print_frameno": [1, 55], "list": [1, 3, 4, 7, 8, 9, 11, 13, 17, 18, 19, 20, 24, 27, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 43, 47, 49, 55, 57, 58, 60, 61, 62, 63, 65, 66, 67, 68, 71, 72, 75, 76, 77, 82, 84, 86, 88, 91, 92, 94, 97, 98, 100, 101, 102, 103, 104, 106, 107, 109, 111, 115, 118, 123, 125, 127, 132, 135, 136, 137, 139, 142, 146, 148, 149, 150, 151, 152, 158, 159, 161, 164], "int": [1, 2, 3, 32, 34, 63, 91, 92, 94, 97, 98, 103, 106, 148, 149, 151, 158, 164], "print_figno": [1, 55, 118], "iplotclaw_figno": 1, "interact": [1, 13, 24, 38, 39, 43, 47, 50, 66, 78, 81, 82, 89, 99, 100, 104, 105, 108, 111, 124, 125, 142], "mode": [1, 13, 30, 109, 161], "displai": [1, 13, 38, 39, 43, 47, 55, 63, 82, 98, 116, 151], "latex_fnam": 1, "tex": 1, "latex_titl": 1, "go": [1, 5, 13, 16, 19, 24, 27, 30, 32, 38, 39, 58, 59, 60, 62, 67, 70, 71, 77, 84, 88, 91, 93, 96, 97, 102, 117, 124, 125, 132, 139, 143, 147, 153, 158, 162, 166, 170], "result": [1, 3, 4, 7, 9, 12, 17, 18, 19, 27, 28, 31, 32, 34, 35, 36, 38, 39, 40, 45, 46, 47, 48, 51, 52, 57, 58, 59, 62, 63, 66, 68, 71, 72, 75, 77, 81, 82, 83, 84, 87, 91, 93, 96, 98, 102, 105, 109, 115, 116, 118, 119, 123, 125, 126, 127, 128, 130, 132, 135, 136, 144, 148, 149, 150, 152, 160, 162, 164, 166], "latex_framesperpag": 1, "how": [1, 6, 7, 12, 16, 24, 26, 30, 31, 32, 34, 36, 38, 39, 41, 42, 44, 47, 50, 55, 59, 63, 64, 66, 70, 75, 76, 77, 81, 91, 93, 95, 96, 97, 101, 104, 108, 109, 111, 113, 114, 115, 116, 120, 125, 127, 129, 130, 135, 138, 139, 140, 147, 148, 151, 153, 162, 164, 168], "mani": [1, 3, 4, 6, 12, 13, 18, 19, 22, 23, 24, 30, 36, 38, 39, 40, 44, 45, 46, 49, 50, 55, 56, 58, 63, 64, 66, 67, 70, 75, 76, 77, 82, 84, 85, 86, 88, 93, 96, 101, 103, 108, 109, 115, 117, 118, 119, 125, 127, 128, 129, 130, 134, 137, 140, 142, 147, 148, 149, 151, 162, 167], "try": [1, 30, 31, 38, 39, 40, 47, 55, 57, 62, 63, 70, 82, 90, 93, 96, 97, 103, 105, 107, 108, 109, 111, 116, 148, 160, 164, 165], "page": [1, 4, 9, 11, 13, 15, 17, 19, 20, 24, 26, 30, 52, 57, 59, 60, 61, 62, 93, 96, 99, 100, 107, 110, 112, 116, 118, 126, 130, 135, 136, 137, 143, 145, 147, 153, 156, 157, 166, 167], "latex_framesperlin": 1, "latex_figsperlin": 1, "recal": [1, 12, 42, 149], "latex_pdf": 1, "run": [1, 5, 6, 7, 12, 13, 14, 16, 19, 22, 24, 26, 27, 30, 34, 35, 36, 37, 42, 43, 45, 46, 47, 48, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 66, 68, 71, 77, 78, 81, 82, 84, 85, 87, 89, 91, 94, 95, 96, 98, 101, 105, 107, 108, 109, 111, 113, 115, 118, 119, 120, 124, 125, 126, 127, 128, 129, 131, 132, 134, 139, 140, 150, 151, 152, 158, 160, 161, 164, 167], "pdflatex": 1, "pdf": [1, 32], "index": [1, 6, 13, 24, 25, 29, 35, 37, 47, 58, 59, 82, 94, 96, 99, 101, 102, 109, 118, 127, 132, 136, 148, 149, 150, 151, 152], "call": [1, 6, 9, 22, 24, 29, 32, 36, 37, 41, 44, 47, 54, 55, 67, 70, 71, 75, 77, 82, 84, 88, 89, 91, 92, 97, 98, 101, 103, 104, 106, 108, 109, 115, 116, 118, 119, 123, 124, 126, 127, 136, 140, 142, 144, 146, 148, 150, 151, 152, 158, 164, 167], "_plotindex": [1, 47, 118], "These": [1, 4, 5, 12, 16, 18, 19, 20, 25, 30, 31, 32, 34, 36, 41, 45, 47, 52, 55, 58, 63, 64, 67, 70, 71, 78, 82, 84, 88, 93, 96, 97, 98, 100, 106, 108, 112, 114, 115, 116, 118, 119, 125, 126, 127, 128, 132, 135, 136, 137, 139, 149, 153, 158, 159, 162, 166, 170], "new_plotfigur": [1, 2, 47, 55, 82, 147], "figno": [1, 2, 47, 55, 82, 84, 118, 147], "getfram": [1, 3, 84], "frameno": [1, 3, 29, 37], "clawsolut": 1, "solut": [1, 3, 4, 5, 16, 18, 19, 24, 27, 29, 31, 36, 37, 39, 47, 49, 51, 64, 71, 75, 77, 81, 84, 89, 91, 94, 96, 97, 98, 101, 102, 104, 106, 107, 108, 115, 116, 123, 124, 128, 135, 139, 140, 147, 148, 149, 150, 152, 160, 167, 170], "read": [1, 4, 5, 7, 19, 30, 32, 34, 35, 37, 38, 39, 47, 48, 49, 52, 53, 57, 62, 63, 64, 67, 70, 71, 75, 77, 81, 89, 91, 97, 98, 103, 109, 124, 125, 127, 128, 133, 135, 136, 150, 151, 152, 158, 162, 164, 167, 168], "fort": [1, 8, 29, 34, 36, 47, 71, 81, 97, 103, 120, 124, 125, 126, 135, 139, 148, 149, 150, 152, 161, 168], "q000n": [1, 8], "n": [1, 6, 16, 17, 19, 32, 34, 47, 51, 68, 84, 99, 105, 116, 118, 127, 142, 148, 151, 167, 170], "find": [1, 3, 4, 6, 12, 19, 26, 29, 30, 31, 32, 51, 55, 62, 66, 75, 78, 81, 86, 93, 101, 106, 107, 109, 111, 113, 127, 158, 165], "onc": [1, 5, 13, 24, 30, 31, 38, 39, 55, 59, 60, 61, 62, 70, 71, 75, 77, 84, 88, 98, 99, 100, 101, 106, 109, 125, 127, 133], "framesoln_dict": 1, "It": [1, 4, 6, 12, 19, 22, 24, 30, 31, 34, 36, 47, 49, 52, 53, 55, 57, 58, 63, 67, 75, 81, 82, 88, 91, 94, 97, 98, 99, 104, 108, 111, 115, 116, 120, 125, 135, 139, 142, 143, 144, 148, 149, 151, 162, 164, 165, 166, 167], "q": [1, 3, 5, 6, 16, 19, 22, 24, 29, 36, 37, 47, 71, 77, 81, 84, 88, 89, 94, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 115, 120, 123, 125, 141, 148, 149, 150, 152, 162, 167, 168, 170], "onli": [1, 3, 5, 6, 8, 12, 13, 16, 18, 19, 21, 24, 29, 30, 32, 34, 36, 37, 41, 42, 45, 46, 47, 49, 52, 55, 58, 59, 60, 62, 63, 64, 67, 68, 71, 72, 75, 76, 77, 78, 82, 88, 91, 94, 97, 98, 99, 101, 103, 104, 105, 106, 108, 109, 110, 113, 115, 118, 119, 124, 125, 126, 127, 130, 132, 135, 139, 140, 141, 142, 143, 144, 146, 147, 148, 149, 150, 151, 152, 154, 158, 162, 164, 165, 166, 167, 170], "separ": [1, 30, 34, 36, 46, 55, 58, 63, 67, 72, 96, 104, 109, 142, 164], "clearfram": [1, 84], "remov": [1, 3, 22, 31, 36, 43, 56, 58, 62, 63, 66, 84, 99, 111, 118, 119, 122, 123, 135, 137, 144, 151, 164, 165], "more": [1, 2, 3, 4, 5, 7, 10, 12, 13, 14, 16, 17, 18, 19, 22, 24, 26, 28, 30, 31, 32, 34, 36, 38, 41, 47, 48, 49, 50, 52, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 70, 71, 72, 75, 81, 82, 83, 84, 85, 86, 89, 91, 92, 94, 96, 97, 98, 99, 100, 101, 102, 104, 105, 106, 108, 109, 111, 114, 115, 116, 118, 119, 120, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 140, 142, 143, 144, 146, 147, 148, 149, 150, 151, 153, 154, 158, 160, 161, 162, 164, 165, 166, 167, 170], "yet": [1, 13, 18, 22, 27, 52, 56, 58, 61, 63, 81, 104, 118, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 140, 148, 150, 169], "clearfigur": 1, "clear": [1, 2, 6, 71, 84, 135], "paramet": [1, 6, 7, 9, 16, 18, 19, 22, 27, 29, 32, 34, 35, 36, 38, 39, 42, 43, 45, 48, 49, 50, 52, 55, 57, 66, 67, 68, 71, 75, 76, 77, 81, 87, 88, 91, 92, 97, 98, 100, 102, 103, 106, 109, 112, 115, 119, 125, 130, 132, 135, 137, 139, 140, 141, 143, 144, 150, 152, 154, 159, 162, 164, 165, 167], "first": [1, 3, 5, 13, 14, 19, 21, 22, 24, 30, 32, 34, 36, 37, 38, 39, 40, 41, 42, 55, 58, 59, 62, 63, 66, 70, 71, 82, 84, 88, 89, 94, 97, 98, 99, 101, 104, 105, 106, 108, 109, 111, 113, 115, 119, 123, 128, 136, 140, 141, 142, 144, 148, 150, 151, 158, 160, 162, 164, 170], "sure": [1, 19, 22, 30, 43, 58, 59, 60, 61, 62, 71, 78, 88, 97, 99, 101, 103, 107, 109, 143, 164, 165, 166], "previou": [1, 30, 31, 47, 57, 59, 61, 62, 67, 70, 71, 84, 88, 104, 113, 119, 124, 125, 126, 127, 132, 139, 144, 148, 149, 150, 152, 162, 164], "chang": [1, 6, 8, 13, 15, 16, 18, 19, 21, 22, 27, 30, 31, 32, 34, 36, 43, 44, 49, 54, 55, 56, 57, 58, 59, 62, 63, 66, 67, 68, 70, 71, 76, 77, 78, 81, 84, 88, 89, 95, 97, 98, 106, 109, 110, 113, 114, 115, 116, 138, 140, 144, 145, 148, 149, 150, 151, 152, 154, 156, 157, 162, 165, 167], "re": [1, 17, 30, 43, 47, 66, 71, 78, 82, 84, 88, 105, 115, 116, 129, 165], "session": [1, 38, 39, 40, 100, 105], "iplotclaw": [1, 13, 24, 38, 39, 47, 50, 81, 82, 100, 111], "being": [1, 3, 4, 8, 13, 18, 19, 34, 42, 47, 49, 52, 57, 62, 70, 72, 84, 91, 97, 102, 103, 104, 109, 111, 113, 115, 118, 124, 126, 128, 137, 140, 142, 144, 148, 151, 165, 167], "getfigur": 1, "fignam": [1, 84], "getax": 1, "axesnam": [1, 84], "clawplotax": [1, 2, 3, 29, 82, 127, 132, 136, 147], "search": [1, 13, 14, 17, 62, 81, 96, 109, 111, 125, 127, 142, 146], "over": [1, 3, 5, 6, 13, 16, 17, 24, 30, 32, 34, 36, 41, 42, 47, 48, 49, 50, 52, 55, 57, 63, 64, 70, 71, 72, 75, 81, 97, 98, 104, 115, 118, 119, 120, 128, 130, 140, 142, 144, 147, 149, 150, 151, 161, 162, 167, 170], "found": [1, 4, 5, 6, 11, 12, 13, 16, 19, 24, 26, 29, 31, 34, 37, 38, 39, 43, 45, 47, 49, 51, 52, 54, 58, 63, 66, 67, 72, 80, 82, 83, 84, 88, 92, 99, 103, 107, 109, 111, 113, 116, 124, 127, 139, 143, 147, 154, 158, 164, 165], "uniqu": [1, 77, 118, 124, 158], "getitem": 1, "itemnam": [1, 84], "showitem": 1, "plotfram": 1, "number": [1, 2, 3, 4, 6, 8, 12, 16, 17, 19, 21, 24, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 46, 47, 49, 55, 58, 63, 66, 71, 76, 77, 78, 84, 88, 89, 91, 92, 93, 94, 96, 97, 98, 99, 101, 103, 104, 106, 108, 109, 110, 113, 115, 116, 118, 119, 120, 122, 123, 124, 125, 126, 127, 129, 136, 139, 140, 142, 148, 149, 150, 151, 152, 158, 159, 160, 164, 167], "conveni": [1, 29, 34, 36, 38, 39, 42, 47, 55, 84, 91, 93, 96, 98, 100, 108, 167, 170], "pyclaw": [1, 3, 4, 12, 17, 25, 26, 29, 30, 31, 46, 47, 59, 60, 61, 77, 78, 84, 85, 95, 99, 101, 107, 111, 138, 140, 141, 146], "plotter": [1, 3, 29, 84], "frametool": [1, 29, 84, 118, 130], "printfram": [1, 81], "still": [1, 5, 7, 8, 13, 16, 18, 19, 24, 26, 28, 34, 42, 45, 47, 49, 55, 56, 67, 70, 71, 77, 81, 86, 97, 104, 110, 115, 116, 118, 123, 124, 125, 126, 127, 128, 130, 135, 137, 139, 140, 151, 158], "clawplotdata": [2, 3, 29, 47, 55, 82, 84, 91, 147], "next": [2, 3, 6, 13, 20, 36, 38, 40, 47, 58, 71, 77, 82, 84, 87, 88, 96, 97, 99, 104, 108, 113, 115, 116, 118, 135, 136, 137, 148, 149, 151], "unus": [2, 97], "1001": 2, "figsiz": [2, 42, 70, 82, 136, 142, 147], "tupl": [2, 3, 32, 51, 63, 75, 82, 94, 97, 98, 164], "size": [2, 22, 32, 36, 37, 42, 47, 55, 63, 76, 77, 81, 94, 97, 99, 104, 125, 130, 135, 149, 150, 152, 154, 162, 164], "facecolor": [2, 82, 118, 136, 147], "background": [2, 81, 127, 147], "behind": [2, 42, 70, 144, 151], "By": [2, 15, 32, 44, 49, 51, 55, 57, 63, 75, 82, 84, 88, 94, 98, 100, 107, 127, 142, 145, 156, 157, 164, 170], "theme": 2, "tan": [2, 82], "public": [2, 4, 13, 17, 23, 138], "probabl": [2, 13, 30, 55, 68, 70, 110, 111], "w": [2, 17, 51, 140, 170], "white": [2, 63, 118], "keyword": [2, 3, 82, 88, 93, 94, 97, 103, 109, 116, 127, 147, 158, 164], "12": [2, 34, 42, 55, 70, 82, 142, 147], "5": [2, 4, 5, 8, 9, 11, 13, 18, 19, 21, 27, 32, 34, 35, 36, 37, 41, 42, 45, 47, 49, 51, 55, 56, 57, 58, 59, 63, 64, 66, 67, 68, 70, 75, 82, 92, 94, 98, 99, 101, 102, 104, 110, 111, 115, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 148, 149, 150, 151, 152, 158, 161, 162, 164, 169], "would": [2, 3, 12, 13, 16, 26, 29, 30, 34, 36, 41, 44, 55, 57, 59, 62, 64, 66, 67, 70, 72, 75, 77, 82, 86, 88, 91, 94, 98, 109, 116, 125, 142, 143, 144, 147, 148, 151, 158, 162, 167], "inch": [2, 55, 63, 82, 147], "red": [2, 3, 30, 47, 63, 82, 116, 147], "option": [2, 12, 13, 16, 19, 22, 24, 27, 30, 31, 32, 34, 36, 37, 38, 39, 43, 44, 51, 54, 57, 60, 62, 66, 71, 77, 81, 82, 88, 89, 91, 93, 94, 95, 97, 98, 100, 103, 104, 105, 108, 109, 111, 112, 115, 116, 118, 120, 123, 124, 125, 128, 130, 133, 135, 137, 142, 146, 147, 148, 150, 151, 152, 153, 158, 164], "clf_each_fram": 2, "clf": 2, "axes1": [2, 84], "shown": [3, 13, 18, 19, 58, 63, 67, 68, 71, 78, 98, 118, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 142, 164, 167], "fragment": 3, "typic": [3, 22, 42, 66, 67, 71, 72, 75, 77, 78, 84, 89, 99, 101, 104, 106, 115, 149, 150, 161, 162, 165, 166, 167, 170], "assum": [3, 5, 22, 24, 32, 34, 36, 37, 39, 42, 49, 51, 52, 55, 57, 58, 59, 63, 71, 75, 81, 97, 98, 100, 101, 102, 108, 109, 115, 123, 136, 142, 143, 148, 151, 158, 159, 162, 164, 166, 170], "instanc": [3, 30, 37, 55, 75, 78, 84, 88, 89, 91, 94, 97, 98, 101, 142, 151], "type": [3, 4, 7, 13, 17, 18, 22, 30, 32, 38, 39, 43, 47, 48, 55, 66, 71, 82, 83, 84, 88, 89, 90, 92, 94, 97, 99, 100, 104, 105, 108, 109, 142, 149, 150, 151, 158, 159, 162, 164, 170], "dimension": [3, 7, 8, 17, 19, 24, 27, 32, 34, 36, 38, 39, 47, 49, 52, 56, 71, 94, 101, 123, 124, 126, 129, 150, 151, 152, 164, 167], "point": [3, 5, 6, 13, 15, 16, 17, 22, 30, 32, 35, 36, 38, 39, 41, 42, 44, 47, 48, 49, 50, 51, 52, 55, 57, 58, 59, 61, 62, 63, 64, 71, 72, 75, 88, 98, 99, 103, 109, 110, 111, 115, 118, 126, 128, 130, 136, 139, 140, 142, 143, 144, 145, 146, 148, 149, 150, 151, 156, 157, 158, 162, 164, 165, 167], "slice": [3, 49, 71, 140], "scatter": [3, 24, 71], "radial": [3, 18, 34, 49, 51, 151, 167], "symmetr": [3, 49, 51, 167], "between": [3, 4, 5, 6, 13, 16, 25, 27, 30, 32, 33, 34, 36, 37, 41, 51, 55, 59, 63, 70, 71, 72, 75, 76, 78, 81, 91, 94, 98, 104, 106, 107, 109, 110, 111, 115, 118, 124, 125, 140, 142, 143, 148, 149, 150, 151, 152, 153, 154, 161, 162, 164, 166, 167], "plot_var": [3, 29, 47, 55, 82, 83], "fill_var2": 3, "diment": 3, "raster": [3, 55, 57, 135, 162], "contour": [3, 32, 47, 55, 57, 71, 110, 147, 164], "pcolor": [3, 47, 81, 110, 118, 135, 164], "2d_schlieren": 3, "schlieren": [3, 71], "2d_patch": [3, 24], "cell": [3, 4, 5, 7, 8, 15, 16, 18, 19, 22, 24, 27, 29, 34, 35, 36, 37, 47, 48, 49, 55, 57, 63, 70, 71, 72, 76, 77, 78, 88, 94, 97, 99, 102, 104, 106, 108, 115, 119, 120, 124, 125, 126, 127, 128, 129, 130, 132, 136, 140, 143, 144, 145, 148, 149, 150, 152, 154, 159, 161, 162, 167, 170], "patch": [3, 6, 7, 16, 19, 24, 29, 34, 42, 55, 71, 75, 76, 77, 81, 82, 97, 99, 103, 106, 115, 125, 127, 130, 132, 144, 147, 149, 161, 162, 167], "edg": [3, 6, 15, 16, 19, 29, 32, 34, 35, 36, 37, 41, 49, 63, 75, 94, 102, 140, 142, 145, 149, 150, 152, 167], "hillshad": [3, 118], "come": [3, 30, 82, 84, 93, 99, 104, 123, 162, 167], "parent": [3, 29, 94, 106, 109], "integ": [3, 34, 35, 36, 47, 55, 63, 68, 70, 82, 89, 97, 103, 115, 118, 126, 129, 140, 148, 151, 158, 164], "compon": [3, 16, 19, 22, 24, 27, 39, 47, 61, 62, 71, 77, 81, 101, 103, 105, 106, 115, 123, 132, 141, 148, 149, 150, 162, 167], "correspond": [3, 6, 12, 25, 27, 29, 32, 35, 36, 37, 47, 49, 51, 52, 57, 58, 59, 63, 71, 75, 82, 88, 92, 94, 97, 98, 101, 103, 106, 115, 116, 140, 142, 143, 148, 149, 150, 151, 152, 158, 162, 166, 167], "appli": [3, 4, 5, 6, 13, 16, 17, 19, 27, 32, 52, 55, 57, 68, 70, 75, 82, 84, 92, 94, 97, 104, 115, 139, 148, 151, 167], "comput": [3, 4, 5, 6, 13, 16, 17, 18, 19, 29, 31, 32, 34, 35, 36, 37, 42, 47, 49, 51, 55, 57, 62, 63, 64, 66, 72, 75, 81, 82, 84, 89, 91, 94, 96, 97, 98, 99, 104, 108, 111, 113, 115, 118, 119, 120, 124, 125, 129, 132, 135, 137, 140, 144, 148, 150, 151, 152, 159, 162, 167, 170], "signatur": [3, 89, 92, 94, 95, 97, 102, 158], "hold": [3, 37, 84, 108, 115], "current": [3, 5, 13, 14, 19, 22, 24, 26, 29, 30, 31, 32, 34, 37, 41, 42, 44, 47, 48, 49, 52, 57, 58, 59, 61, 62, 63, 64, 71, 73, 77, 82, 84, 94, 97, 98, 99, 104, 106, 109, 111, 115, 116, 118, 124, 126, 127, 137, 139, 143, 147, 148, 149, 150, 151, 152, 154, 158, 159, 162, 164, 166], "afteritem": [3, 29], "afterpatch": [3, 29], "There": [3, 6, 13, 24, 36, 39, 43, 55, 58, 59, 66, 70, 75, 77, 84, 85, 98, 105, 113, 126, 127, 147, 148, 154, 159, 160, 167, 169], "calcul": [3, 5, 6, 18, 19, 29, 32, 35, 37, 48, 51, 71, 75, 82, 94, 102, 104, 118, 120, 125, 164], "cd": [3, 13, 30, 38, 39, 40, 56, 58, 59, 61, 62, 84, 93, 96, 99, 105, 116, 160], "On": [3, 5, 13, 55, 76, 85, 126, 136, 142, 146, 167], "ylower": [3, 24, 29, 42, 89, 127, 150, 162, 164], "patchno": [3, 29], "out": [3, 16, 17, 26, 28, 31, 32, 34, 36, 37, 38, 39, 42, 47, 48, 49, 54, 56, 57, 58, 59, 62, 63, 64, 65, 66, 71, 75, 82, 85, 86, 88, 89, 91, 97, 98, 99, 100, 103, 108, 110, 111, 113, 116, 125, 127, 129, 130, 140, 142, 149, 150, 152, 158, 164, 165], "lower": [3, 24, 32, 34, 35, 41, 49, 57, 70, 77, 94, 99, 142, 144, 148, 150, 152, 162, 164, 166], "left": [3, 5, 10, 13, 16, 20, 27, 29, 32, 34, 57, 77, 84, 94, 101, 102, 108, 118, 126, 132, 135, 136, 137, 138, 139, 140, 143, 149, 162, 164, 166, 170], "mappedgrid": [3, 71], "map": [3, 16, 18, 31, 32, 42, 48, 63, 70, 71, 82, 86, 89, 94, 96, 101, 115, 123, 127, 132, 141, 164, 170], "mapc2p": [3, 27, 29, 49, 71, 89, 94, 132], "underli": [3, 55, 125], "requir": [3, 4, 16, 18, 19, 22, 24, 27, 29, 30, 32, 34, 36, 37, 38, 39, 43, 48, 49, 51, 52, 59, 62, 70, 71, 75, 78, 81, 84, 85, 88, 89, 94, 97, 100, 101, 104, 105, 106, 108, 109, 110, 115, 116, 118, 119, 120, 123, 125, 128, 130, 132, 135, 137, 140, 141, 142, 147, 148, 149, 150, 151, 152, 158, 159, 162, 165, 168, 170], "depend": [3, 13, 16, 30, 31, 32, 34, 37, 38, 39, 43, 44, 50, 52, 55, 66, 68, 71, 75, 82, 87, 97, 102, 103, 104, 109, 111, 115, 127, 144, 149, 151, 164, 165, 167, 170], "summar": [3, 30, 33, 115, 117, 167], "plotstyl": [3, 47, 82, 147], "anyth": [3, 6, 30, 31, 62, 67, 116, 127], "valid": [3, 52, 75, 91, 98, 103, 106, 125, 151, 158, 159, 164], "fmt": 3, "group": [3, 13, 26, 30, 32, 52, 93, 97, 99, 107, 124, 140], "solid": [3, 16, 55, 75, 101, 147, 148, 150, 152], "dash": [3, 99], "o": [3, 5, 17, 41, 42, 43, 70, 72, 82, 85, 86, 89, 97, 98, 107, 127, 150, 164, 167], "circl": [3, 51, 82, 118], "bo": 3, "blue": [3, 11, 42, 47, 63, 70, 82, 142, 164], "though": [3, 42, 78, 158, 162], "also": [3, 4, 5, 6, 7, 8, 9, 11, 12, 16, 17, 18, 19, 20, 22, 24, 25, 26, 27, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 70, 71, 75, 76, 77, 78, 81, 82, 84, 88, 90, 91, 94, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 118, 119, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 146, 148, 149, 150, 151, 152, 153, 156, 157, 158, 159, 160, 161, 162, 164, 165, 166, 167, 169, 170], "overrul": 3, "r": [3, 4, 6, 17, 30, 47, 51, 56, 58, 70, 71, 74, 82, 88, 92, 99, 101, 118, 140, 142, 147, 164, 170], "ff0000": [3, 63], "No": [3, 43, 55, 59, 71, 94, 104, 133, 140, 148, 151, 165], "extra": [3, 55, 141], "give": [3, 6, 9, 10, 13, 16, 17, 18, 19, 26, 30, 32, 34, 35, 36, 38, 39, 47, 49, 56, 63, 64, 70, 72, 75, 76, 77, 82, 84, 99, 100, 104, 116, 120, 124, 125, 129, 132, 142, 148, 151, 162, 164, 166], "polygon": [3, 7, 41, 55, 63, 130, 164], "curv": [3, 47, 81, 142], "fill_between": 3, "plot_var2": 3, "zero": [3, 16, 32, 34, 42, 44, 47, 63, 71, 72, 88, 101, 102, 106, 108, 132, 142, 143], "fill_wher": 3, "plotitem": [3, 29, 47, 82, 147], "mean": [3, 13, 24, 30, 34, 42, 47, 52, 56, 62, 71, 72, 98, 99, 115, 118, 140, 143, 148, 150, 152, 166], "map_2d_to_1d": 3, "In": [3, 5, 6, 8, 11, 12, 15, 16, 18, 19, 21, 22, 24, 29, 32, 34, 36, 41, 44, 47, 48, 49, 52, 55, 56, 57, 58, 59, 62, 63, 64, 66, 67, 70, 71, 72, 74, 75, 77, 78, 82, 83, 84, 88, 89, 94, 96, 97, 98, 99, 100, 101, 102, 104, 106, 109, 111, 112, 113, 115, 118, 119, 120, 123, 124, 125, 127, 128, 132, 136, 139, 140, 142, 144, 145, 146, 148, 149, 151, 156, 157, 162, 164, 165, 167, 170], "about": [3, 5, 7, 13, 14, 16, 18, 19, 24, 27, 35, 36, 37, 38, 39, 43, 49, 51, 52, 57, 59, 63, 66, 68, 71, 77, 83, 85, 88, 96, 97, 99, 104, 111, 116, 124, 128, 130, 135, 136, 140, 147, 149, 150, 151, 162, 165, 167, 170], "j": [3, 4, 5, 15, 17, 22, 24, 29, 35, 42, 56, 63, 70, 71, 77, 84, 96, 97, 115, 119, 120, 144, 145], "v": [3, 16, 27, 31, 32, 34, 36, 37, 51, 64, 67, 116, 124, 149, 162], "radiu": [3, 151, 158, 159, 164], "q0_vs_radiu": 3, "convert": [3, 24, 27, 32, 35, 37, 45, 51, 55, 62, 63, 66, 75, 78, 89, 96, 101, 109, 110, 127, 130, 136, 137, 148, 149, 158, 162, 166], "numpi": [3, 13, 32, 34, 36, 37, 42, 51, 70, 85, 87, 88, 89, 91, 94, 101, 106, 107, 108, 110, 116, 137, 141, 142, 150, 164, 165], "sqrt": [3, 34, 37, 49, 68, 88, 101, 102, 108, 150], "q0": [3, 101], "work": [3, 5, 8, 13, 16, 19, 21, 22, 24, 26, 27, 28, 30, 31, 34, 36, 38, 39, 43, 48, 52, 55, 56, 57, 58, 59, 60, 61, 62, 63, 70, 71, 74, 75, 76, 82, 85, 86, 87, 88, 90, 91, 92, 96, 97, 98, 99, 102, 104, 105, 110, 111, 113, 114, 115, 116, 118, 121, 122, 123, 124, 125, 126, 127, 130, 132, 133, 138, 140, 146, 147, 148, 149, 153, 159, 162, 165, 169], "symbol": [3, 71, 111], "best": [3, 4, 16, 24, 28, 30, 36, 44, 49, 55, 57, 59, 60, 66, 72, 74, 76, 81, 82, 97, 101, 113, 114, 115, 116, 127, 138, 140, 151, 155, 158, 162, 167], "descript": [3, 4, 6, 9, 24, 25, 27, 32, 36, 37, 63, 71, 75, 78, 81, 96, 97, 109, 113, 115, 137, 140, 141, 151, 158, 162, 170], "celledges_show": [3, 24], "draw": 3, "amr_celledges_show": 3, "level": [3, 6, 7, 16, 19, 25, 29, 31, 34, 36, 41, 42, 47, 48, 50, 51, 52, 55, 58, 59, 61, 62, 71, 72, 76, 77, 89, 91, 94, 96, 97, 98, 104, 111, 112, 115, 116, 119, 120, 124, 125, 127, 130, 139, 142, 143, 146, 148, 149, 150, 152, 161, 162, 164, 166, 167], "patchedges_show": [3, 24], "mostli": [3, 81, 96, 130, 137], "contour_level": [3, 164], "three": [3, 13, 17, 24, 32, 34, 37, 52, 55, 67, 71, 75, 99, 103, 109, 116, 142, 148, 151, 162, 164, 167], "contour_nlevel": 3, "contour_min": 3, "minimum": [3, 19, 34, 47, 55, 75, 108, 125, 151, 164], "contour_max": 3, "maximum": [3, 24, 32, 34, 35, 36, 48, 71, 72, 104, 108, 115, 119, 120, 127, 130, 148, 149, 150, 152, 158, 159], "contour_color": 3, "specif": [3, 5, 12, 19, 24, 30, 32, 47, 48, 49, 51, 55, 56, 62, 65, 67, 68, 77, 86, 87, 89, 91, 96, 97, 98, 102, 103, 109, 113, 125, 126, 127, 130, 147, 148, 149, 150, 152, 159, 162], "b": [3, 5, 17, 30, 32, 34, 35, 36, 37, 42, 47, 49, 56, 58, 59, 68, 72, 82, 104, 115, 123, 130, 142, 143, 144, 151, 164, 166], "0000ff": [3, 63], "colormap": [3, 32, 42, 50, 55, 70, 71, 81, 83, 124, 130, 164], "amr_contour_color": 3, "As": [3, 18, 19, 39, 42, 48, 49, 52, 58, 59, 63, 64, 88, 108, 110, 114, 118, 119, 130, 140, 141, 144, 151, 154, 160, 167], "black": [3, 47], "subsequ": [3, 10, 71], "both": [3, 16, 18, 19, 30, 32, 35, 36, 37, 38, 39, 41, 42, 47, 52, 57, 60, 62, 67, 70, 71, 75, 77, 89, 97, 98, 99, 104, 105, 115, 116, 123, 124, 127, 130, 135, 140, 141, 142, 144, 148, 149, 150, 152, 156, 162, 167], "fine": [3, 19, 34, 35, 36, 42, 49, 58, 74, 78, 96, 101, 115, 118, 125, 132, 142, 144, 148, 149, 151, 162, 167], "coars": [3, 34, 36, 55, 115, 118, 125, 132, 148, 162, 167], "anoth": [3, 19, 24, 34, 36, 42, 47, 51, 55, 62, 63, 77, 81, 85, 93, 104, 107, 116, 127, 158, 167], "refin": [3, 4, 5, 7, 8, 17, 19, 24, 36, 48, 49, 52, 55, 56, 57, 70, 71, 77, 78, 88, 125, 127, 128, 130, 132, 142, 144, 147, 148, 149, 150, 161, 162, 167], "region": [3, 6, 7, 13, 16, 19, 24, 34, 36, 41, 42, 48, 52, 53, 55, 63, 68, 72, 75, 78, 113, 118, 127, 130, 132, 143, 144, 149, 150, 154, 162, 164], "lack": 3, "hidden": [3, 66, 82], "blank": [3, 35, 63, 158], "coarser": [3, 16, 19, 57, 125, 144, 148, 149, 167], "easili": [3, 13, 30, 34, 55, 58, 71, 82, 89, 94, 105, 109, 116, 118, 130, 153], "contour_show": 3, "commonli": [3, 19, 71, 82, 84], "amr_contour_show": 3, "determin": [3, 5, 6, 32, 34, 37, 42, 47, 48, 49, 52, 54, 55, 58, 63, 72, 75, 82, 92, 94, 97, 102, 106, 111, 115, 120, 124, 125, 139, 142, 143, 147, 148, 149, 151, 164, 167], "whether": [3, 6, 13, 16, 24, 51, 57, 60, 62, 64, 65, 66, 71, 86, 94, 97, 98, 102, 103, 104, 115, 116, 125, 140, 142, 148, 149, 151, 164], "view": [3, 4, 24, 36, 38, 39, 47, 48, 49, 51, 55, 57, 58, 63, 77, 81, 83, 84, 88, 99, 105, 110, 123, 127, 153, 155], "finest": [3, 19, 34, 36, 42, 47, 72, 127, 161, 164], "contour_kwarg": [3, 164], "pcolor_cmap": [3, 55], "pcolor_cmin": 3, "pcolor_cmax": 3, "thei": [3, 5, 6, 13, 16, 18, 19, 26, 29, 30, 32, 34, 36, 41, 42, 45, 47, 49, 52, 55, 58, 59, 62, 63, 64, 67, 70, 71, 77, 81, 94, 96, 101, 104, 109, 115, 116, 125, 132, 144, 147, 151, 154, 158, 162, 164, 167], "chosen": [3, 31, 34, 41, 42, 49, 55, 57, 70, 108, 115, 132, 143, 149], "vari": [3, 15, 17, 27, 32, 42, 48, 49, 57, 68, 72, 101, 103, 123, 130, 140, 141, 143, 145, 149, 151, 170], "yield": [3, 18, 19], "veri": [3, 5, 16, 17, 18, 19, 24, 49, 52, 55, 59, 60, 63, 75, 82, 86, 89, 97, 98, 99, 100, 101, 104, 116, 118, 120, 124, 135, 142, 144, 148, 159, 162], "confus": [3, 57, 62, 111, 132, 140], "add_colorbar": [3, 32, 164], "ad": [3, 12, 16, 22, 24, 26, 27, 29, 31, 34, 36, 37, 44, 47, 51, 57, 58, 59, 62, 63, 64, 68, 71, 72, 75, 82, 87, 89, 92, 94, 95, 98, 99, 111, 112, 113, 115, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 133, 135, 136, 137, 139, 144, 148, 149, 151, 154, 158, 161, 164, 168], "imshow_cmap": 3, "imshow_cmin": 3, "imshow_cmax": 3, "hillshade_vertical_exagger": 3, "vertic": [3, 32, 41, 52, 55, 63, 70, 142, 143, 151, 164, 166], "exagger": 3, "calul": 3, "hillshade_azimuth_degre": 3, "light": [3, 55, 71, 115], "sourc": [3, 4, 17, 18, 19, 25, 27, 30, 32, 44, 48, 49, 55, 56, 58, 59, 61, 62, 63, 65, 67, 68, 81, 86, 89, 93, 94, 95, 104, 105, 107, 108, 109, 113, 114, 116, 118, 125, 126, 127, 136, 137, 141, 143, 148, 150, 151, 152, 155, 156, 157, 158, 162], "azimuth": 3, "angl": [3, 16, 32, 51, 75], "315": 3, "northwest": 3, "360": [3, 51, 55, 75], "degre": [3, 32, 49, 51, 55, 63, 72, 75], "clockwis": [3, 34, 51, 75, 164], "north": [3, 34, 42, 49, 51, 70, 75], "recommend": [3, 4, 18, 19, 32, 34, 36, 38, 39, 58, 59, 60, 62, 76, 81, 90, 94, 96, 97, 99, 100, 104, 105, 107, 108, 115, 127, 135, 137, 148, 150, 152, 168], "proper": [3, 6, 15, 42, 47, 56, 57, 58, 59, 63, 68, 70, 71, 97, 109, 119, 125, 145, 149, 150, 156, 157, 158, 167], "interpret": [3, 32, 57, 75, 97, 127, 162], "peopl": [3, 4, 12, 13, 86], "hillshade_altitude_degre": 3, "altitud": 3, "horizon": 3, "45": [3, 104], "90": [3, 27, 32, 49, 55, 67, 75, 105, 107, 136], "hillshade_latlon": 3, "correct": [3, 18, 19, 22, 30, 44, 58, 59, 67, 68, 71, 82, 88, 94, 97, 99, 103, 109, 119, 120, 124, 144, 148, 150, 151, 152], "unit": [3, 32, 49, 50, 51, 56, 75, 94, 125, 136, 158], "z": [3, 42, 57, 63, 70, 71, 88, 94, 102, 108, 142, 148, 149, 162, 164], "111200": 3, "reflect": [3, 4, 5, 16, 30, 115, 127, 148, 150, 152], "relat": [3, 7, 19, 24, 26, 58, 78, 102, 113, 126, 130, 132, 143], "pre": [3, 13, 35, 59, 90, 97], "pend": 3, "amr_": [3, 7], "whose": [3, 49, 82, 89, 101, 102, 144, 148, 149, 164], "origin": [3, 6, 13, 16, 18, 19, 22, 30, 32, 36, 37, 45, 47, 56, 58, 63, 70, 76, 77, 89, 104, 109, 119, 125, 132, 139, 149, 150, 151, 152, 164], "hand": [3, 5, 19, 20, 21, 22, 68, 88, 116, 118, 135, 136, 137, 142], "higher": [3, 6, 18, 19, 55, 94, 104, 105, 115, 130, 140, 142, 143, 144], "shorter": [3, 115, 164], "last": [3, 20, 29, 34, 36, 59, 61, 82, 88, 89, 101, 108, 118, 124, 135, 136, 137, 148, 158], "repeatedli": [3, 99, 105, 149], "finer": [3, 7, 19, 34, 55, 115, 119, 120, 142, 148, 149], "celledg": [3, 32, 49], "colorbar_shrink": [3, 32], "colorbar_label": 3, "colorbar_tick": 3, "colorbar_tick_label": 3, "colorbar_extend": [3, 136], "colorbar_kwarg": [3, 127], "stand": [4, 132], "conserv": [4, 5, 6, 17, 18, 19, 98, 104, 106, 128, 141, 167, 170], "law": [4, 17, 63, 151, 170], "packag": [4, 27, 30, 31, 38, 39, 55, 59, 60, 67, 77, 78, 81, 85, 86, 88, 94, 96, 98, 100, 101, 103, 105, 108, 110, 111, 118, 129, 130, 165, 168], "wa": [4, 5, 6, 14, 19, 21, 22, 27, 31, 32, 34, 35, 36, 37, 42, 49, 52, 54, 58, 59, 66, 68, 70, 71, 75, 82, 99, 103, 104, 106, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 142, 144, 161, 162, 164], "initi": [4, 5, 7, 12, 13, 18, 19, 24, 27, 32, 36, 37, 47, 48, 49, 51, 52, 55, 59, 64, 67, 71, 72, 75, 77, 78, 84, 86, 87, 88, 89, 91, 92, 94, 95, 97, 98, 102, 103, 104, 106, 107, 109, 112, 115, 124, 127, 130, 132, 140, 143, 148, 149, 150, 152, 154, 158, 162, 164], "develop": [4, 6, 7, 12, 13, 19, 20, 24, 25, 45, 52, 56, 58, 61, 62, 65, 70, 71, 81, 85, 86, 89, 96, 101, 104, 105, 111, 113, 116, 118, 127, 128, 130, 132, 135, 136, 137, 140, 143, 144, 150], "linear": [4, 5, 17, 18, 19, 32, 36, 37, 47, 49, 55, 72, 75, 82, 88, 92, 104, 118, 128, 140, 141, 142], "nonlinear": [4, 5, 17, 52, 92, 140, 148, 170], "hyperbol": [4, 5, 6, 17, 18, 19, 45, 78, 89, 96, 101, 102, 108, 140, 148, 151, 167, 170], "system": [4, 16, 17, 18, 19, 25, 39, 40, 48, 55, 56, 62, 63, 67, 76, 77, 86, 96, 97, 98, 99, 101, 102, 105, 108, 111, 116, 118, 140, 148, 150, 152, 160, 167, 170], "focu": [4, 48], "high": [4, 17, 34, 52, 55, 70, 72, 75, 78, 89, 96, 104, 140, 143, 144, 166, 167], "resolut": [4, 6, 17, 32, 34, 36, 42, 47, 64, 72, 75, 94, 104, 108, 109, 119, 123, 127, 128, 135, 140, 143, 162, 164, 166, 167], "godunov": [4, 94, 104, 148, 150, 152, 167], "method": [4, 5, 7, 17, 19, 34, 36, 37, 41, 45, 47, 57, 70, 72, 82, 84, 88, 91, 92, 94, 99, 103, 104, 109, 115, 116, 123, 140, 147, 148, 149, 150, 152, 158, 161, 162, 164, 167], "framework": [4, 86, 89, 124, 125], "applic": [4, 6, 15, 16, 18, 19, 21, 22, 24, 25, 26, 30, 31, 36, 37, 38, 39, 40, 44, 45, 46, 47, 48, 50, 59, 61, 62, 67, 70, 76, 77, 84, 93, 94, 95, 96, 98, 104, 109, 112, 114, 115, 116, 118, 119, 122, 123, 125, 126, 127, 129, 130, 140, 142, 144, 145, 148, 151, 156, 157, 162, 164, 165, 167, 168], "finit": [4, 17, 34, 36, 45, 49, 57, 63, 70, 71, 72, 75, 104, 130, 142, 151, 161, 162, 167], "volum": [4, 17, 31, 34, 36, 45, 49, 57, 63, 70, 71, 72, 96, 130, 142, 149, 151, 161, 162, 167], "riemann": [4, 5, 8, 22, 24, 25, 30, 31, 48, 59, 62, 67, 78, 86, 88, 94, 95, 104, 105, 106, 108, 111, 146, 148, 150, 152, 156, 157, 170], "solver": [4, 5, 6, 22, 24, 25, 27, 30, 48, 49, 60, 61, 62, 67, 85, 86, 87, 91, 94, 95, 98, 106, 118, 121, 123, 125, 126, 127, 128, 129, 130, 132, 137, 148, 150, 152, 156, 157, 170], "resolv": [4, 34, 36, 55, 58, 62, 113, 127, 144], "jump": [4, 5, 71, 84, 94, 104, 125, 148, 170], "discontinu": [4, 104, 170], "interfac": [4, 21, 24, 71, 86, 89, 92, 96, 97, 102, 104, 109, 140, 167, 168, 170], "wave": [4, 5, 6, 16, 17, 18, 27, 34, 42, 48, 49, 52, 55, 56, 75, 92, 94, 96, 101, 102, 104, 115, 123, 125, 126, 132, 141, 142, 143, 148, 149, 150, 151, 152, 154, 167], "propag": [4, 5, 6, 17, 18, 19, 27, 32, 49, 52, 55, 56, 75, 94, 96, 104, 115, 125, 140], "neighbor": [4, 18, 19, 36, 42, 70, 72, 115, 125, 144, 149, 150, 164], "formul": [4, 5, 19, 52, 68, 140, 148], "allow": [4, 6, 13, 24, 29, 30, 31, 34, 36, 37, 41, 42, 47, 48, 51, 54, 55, 57, 58, 62, 68, 70, 71, 75, 76, 78, 81, 82, 91, 96, 97, 98, 104, 106, 109, 110, 111, 115, 116, 119, 120, 123, 124, 125, 126, 127, 129, 130, 132, 135, 136, 137, 140, 142, 148, 150, 151, 152, 153, 158, 162, 164, 166], "easi": [4, 6, 11, 31, 41, 62, 71, 89, 98, 99, 100, 142, 153, 167], "extens": [4, 17, 19, 24, 26, 30, 32, 52, 55, 58, 62, 67, 71, 89, 96, 97, 109, 125, 126, 132, 148, 160, 164, 170], "problem": [4, 5, 7, 16, 17, 18, 19, 22, 26, 27, 29, 30, 31, 38, 39, 42, 45, 48, 49, 62, 66, 70, 71, 72, 75, 78, 82, 85, 87, 88, 93, 95, 96, 99, 102, 104, 107, 111, 116, 119, 120, 122, 123, 126, 130, 132, 136, 137, 140, 142, 144, 148, 149, 150, 151, 152, 153, 154, 161, 165], "algorithm": [4, 7, 19, 27, 34, 41, 42, 48, 56, 88, 94, 96, 97, 104, 108, 115, 127, 140, 142, 148, 150, 152, 164], "brief": [4, 59, 141, 151], "subroutin": [4, 6, 9, 16, 24, 34, 36, 67, 115, 123, 140, 148, 149, 161, 167, 170], "equat": [4, 5, 16, 17, 18, 27, 38, 39, 48, 49, 52, 64, 68, 82, 87, 88, 89, 91, 96, 97, 98, 101, 104, 105, 106, 118, 120, 123, 125, 127, 128, 140, 148, 150, 151, 152, 154, 162, 167, 170], "solv": [4, 5, 8, 16, 17, 18, 19, 22, 28, 38, 39, 49, 52, 60, 62, 64, 87, 89, 91, 94, 96, 101, 102, 105, 118, 128, 140, 141, 148, 162, 167, 170], "adapt": [4, 7, 17, 19, 32, 42, 49, 56, 57, 70, 71, 78, 88, 115, 127, 130, 132, 140, 142, 147, 148, 149, 151, 167], "mesh": [4, 7, 17, 19, 35, 49, 56, 70, 71, 78, 81, 88, 115, 130, 147, 148, 167], "amrclaw": [4, 5, 6, 12, 15, 16, 19, 21, 22, 24, 25, 26, 30, 38, 39, 41, 42, 44, 46, 47, 48, 50, 56, 59, 60, 61, 62, 64, 70, 71, 76, 77, 78, 85, 96, 97, 105, 111, 112, 115, 116, 139, 140, 142, 145, 146, 148, 151, 156, 157, 160, 161, 165], "detail": [4, 5, 10, 16, 24, 25, 27, 28, 30, 31, 32, 34, 36, 38, 39, 41, 44, 47, 50, 52, 55, 58, 61, 62, 64, 65, 66, 70, 71, 75, 78, 82, 86, 91, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 104, 114, 115, 116, 120, 125, 127, 132, 135, 140, 142, 147, 148, 151, 153, 158, 162, 165, 166, 167, 170], "content": [4, 6, 25, 37, 45, 55, 59, 77, 78, 89, 96, 151, 162, 167, 168], "routin": [4, 5, 6, 16, 18, 19, 22, 27, 29, 32, 34, 38, 39, 47, 48, 49, 50, 55, 56, 66, 71, 72, 76, 77, 78, 81, 84, 86, 89, 91, 94, 97, 100, 101, 104, 106, 107, 115, 118, 119, 120, 123, 125, 127, 128, 130, 140, 144, 148, 150, 152, 158, 164, 165, 167, 168, 170], "special": [4, 7, 16, 48, 50, 55, 65, 78, 86, 97, 115, 135, 142, 164], "depth": [4, 5, 16, 17, 18, 19, 24, 32, 34, 35, 37, 42, 47, 48, 49, 52, 68, 72, 75, 81, 83, 141, 143, 144, 151, 162], "averag": [4, 6, 15, 17, 18, 19, 34, 42, 48, 49, 52, 53, 57, 71, 72, 102, 106, 120, 132, 140, 144, 145, 162, 164, 167], "geophys": [4, 16, 17, 25, 48, 52, 78, 148], "flow": [4, 16, 17, 25, 34, 35, 48, 50, 52, 78, 96, 113, 118, 130, 135, 140, 148, 151, 162, 167], "geoclaw": [4, 7, 12, 17, 18, 19, 25, 26, 30, 31, 32, 34, 35, 36, 37, 39, 41, 44, 46, 47, 56, 57, 59, 60, 61, 62, 63, 64, 68, 70, 72, 75, 77, 78, 81, 85, 96, 105, 111, 113, 114, 116, 139, 140, 141, 143, 144, 146, 148, 149, 154, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167], "parallel": [4, 24, 25, 47, 76, 87, 93, 95, 96, 98, 101, 103, 105, 109, 115, 116, 118, 125, 149], "ten": [4, 78], "thousand": [4, 78], "core": [4, 12, 78, 116, 127, 137], "wish": [4, 13, 14, 15, 24, 31, 38, 39, 52, 55, 62, 71, 80, 81, 96, 101, 104, 105, 107, 111, 113, 115, 125, 145, 153, 156, 157, 165], "discrib": 4, "book": [4, 12, 17, 27, 31, 46, 85, 103, 140], "levequ": [4, 16, 17, 26, 32, 56, 78, 92, 94, 96, 104, 110, 140, 148, 167, 170], "fvmhp": [4, 12, 16, 17, 27, 46, 78, 140, 148, 167, 170], "virtual": [4, 13, 27, 29, 106], "were": [4, 6, 14, 19, 22, 34, 45, 47, 58, 64, 67, 71, 72, 89, 115, 118, 119, 125, 128, 132, 135, 136, 137, 142, 144, 154, 162], "4": [4, 7, 8, 9, 13, 16, 17, 20, 25, 27, 30, 32, 34, 35, 36, 39, 41, 42, 44, 45, 47, 48, 52, 55, 57, 58, 59, 66, 67, 68, 70, 71, 72, 76, 77, 81, 82, 84, 95, 96, 97, 98, 99, 101, 102, 104, 105, 109, 111, 115, 116, 118, 119, 124, 127, 132, 133, 135, 137, 139, 142, 148, 149, 150, 151, 152, 160, 161, 162, 164, 169], "3": [4, 6, 7, 15, 16, 19, 22, 24, 26, 27, 32, 34, 35, 36, 39, 41, 45, 47, 48, 55, 57, 59, 62, 63, 68, 71, 72, 75, 77, 82, 84, 85, 88, 91, 92, 94, 97, 98, 99, 102, 103, 104, 106, 110, 111, 115, 125, 127, 130, 136, 138, 140, 142, 145, 148, 149, 150, 151, 152, 160, 161, 162, 164, 167, 170], "pointer": [4, 16, 18, 19, 58, 75, 81, 84, 104, 109, 123], "code": [4, 5, 6, 7, 8, 12, 14, 16, 21, 22, 23, 24, 25, 26, 29, 31, 34, 35, 36, 37, 38, 39, 41, 43, 44, 45, 47, 48, 49, 52, 54, 56, 57, 58, 60, 65, 66, 67, 68, 74, 75, 76, 77, 78, 80, 82, 84, 85, 86, 88, 89, 94, 96, 97, 98, 99, 101, 104, 105, 108, 110, 111, 114, 117, 118, 119, 120, 123, 124, 125, 126, 127, 128, 129, 130, 132, 137, 139, 140, 141, 142, 146, 148, 149, 150, 151, 152, 153, 158, 160, 161, 162], "bibliographi": [4, 27], "paper": [4, 5, 6, 16, 19, 32, 48, 58, 92, 96], "distribut": [4, 12, 13, 31, 32, 58, 65, 75, 78, 86, 104, 110, 130], "under": [4, 7, 24, 34, 36, 40, 55, 56, 58, 61, 65, 67, 81, 86, 94, 96, 116, 125, 127, 138], "term": [4, 18, 19, 27, 48, 49, 52, 65, 75, 89, 94, 95, 104, 115, 118, 126, 127, 136, 137, 141, 148, 150, 151, 152, 156, 157], "berkelei": [4, 65, 86], "bsd": [4, 65, 86, 127], "contribut": [4, 26, 27, 61, 86, 89, 96, 101, 104, 113, 116], "its": [4, 6, 13, 18, 19, 24, 31, 34, 42, 52, 55, 65, 67, 70, 75, 77, 86, 91, 92, 93, 94, 96, 101, 103, 104, 106, 109, 115, 150, 164, 170], "incept": 4, "1994": [4, 65], "major": [4, 24, 59, 86, 89, 117, 119, 120, 121, 126, 128, 133, 136, 137], "design": [4, 29, 30, 55, 86, 88, 108, 142, 166], "made": [4, 19, 20, 24, 30, 32, 37, 62, 103, 106, 118, 119, 120, 125, 127, 130, 132, 135, 136, 137, 142, 144, 151, 159, 162, 164, 167], "individu": [4, 24, 25, 55, 63, 66, 67, 71, 94, 115, 116, 158], "randal": [4, 17, 96], "univers": [4, 17, 26, 58, 65, 86, 103], "washington": [4, 17, 26, 58, 65, 129, 142, 164], "rjlevequ": [4, 19, 30, 31], "marsha": [4, 6, 17], "berger": [4, 6, 17], "courant": [4, 6, 49, 115, 126, 148, 149, 150, 152], "institut": 4, "nyu": 4, "mjberger": 4, "jan": [4, 59], "olav": 4, "langseth": [4, 17], "norwegian": 4, "defenc": 4, "research": [4, 17, 48, 52, 86, 104, 114], "establish": 4, "david": [4, 17, 86, 96, 104], "georg": [4, 17, 32], "usg": [4, 32, 166], "cascad": 4, "volcano": 4, "observatori": 4, "dlgeorg": 4, "ketcheson": [4, 17, 79, 86, 96, 104], "kaust": [4, 26], "ketch": 4, "kyle": [4, 17, 86, 92, 96, 97, 102], "mandli": [4, 17, 86, 92, 96, 97, 102], "ut": 4, "austin": 4, "contributor": [4, 26, 65, 96], "aron": [4, 17, 86, 96], "ahmadia": [4, 17, 86, 96], "amal": [4, 17, 86, 96], "alghamdi": [4, 17, 86, 96], "ghamdi": 4, "ian": 4, "bollig": 4, "bolliger32": 4, "peter": 4, "blossei": 4, "donna": [4, 17], "calhoun": [4, 17, 55], "donnabois": 4, "ond\u0159ej": 4, "\u010dert\u00edk": 4, "certik": [4, 86], "brisa": 4, "davi": [4, 17], "brisadavi": [4, 128], "gradi": [4, 17, 86], "lemoin": [4, 17, 86], "gradylemoin": 4, "sorin": 4, "mitran": [4, 17], "matteo": [4, 17, 86, 96], "parsani": [4, 17, 86, 96], "mparsani": 4, "xinsheng": [4, 56], "qin": [4, 56], "xinshengqin": [4, 56], "avi": 4, "schwarzschild": 4, "aks2203": 4, "andi": 4, "terrel": 4, "aterrel": 4, "chri": 4, "vogl": 4, "cjvogl": 4, "numer": [4, 17, 55, 110, 128], "student": 4, "toward": [4, 32], "bug": [4, 8, 12, 24, 26, 44, 55, 68, 76, 82, 86, 118, 122, 123, 124, 125, 127, 132, 133, 134, 137], "suggest": [4, 18, 19, 26, 31, 51, 57, 58, 60, 62, 84, 85, 110, 138, 140, 151, 169], "improv": [4, 13, 24, 26, 34, 36, 55, 58, 97, 110, 118, 119, 120, 122, 123, 124, 125, 126, 128, 129, 130, 131, 132, 133, 148], "explor": [4, 36, 63, 82, 84], "thank": [4, 96], "pleas": [4, 26, 30, 58, 60, 61, 62, 86, 88, 91, 93, 96, 97, 99, 101, 103, 104, 105, 107, 113, 127, 132, 138, 140, 158], "itself": [4, 75, 81, 110, 130, 140, 151, 164], "well": [4, 6, 19, 30, 35, 48, 49, 55, 56, 58, 62, 63, 70, 75, 76, 77, 78, 81, 84, 85, 103, 104, 113, 126, 127, 130, 135, 141, 144, 148, 149, 156, 157, 158, 167, 170], "citat": [4, 19, 59], "similar": [4, 13, 16, 18, 30, 34, 36, 39, 47, 49, 55, 64, 88, 89, 97, 101, 104, 108, 127, 132, 151, 158, 159, 160, 162], "team": [4, 26, 65], "2020": [4, 26, 27, 58, 65, 110, 113, 130, 131, 132, 138, 140], "7": [4, 6, 14, 31, 34, 36, 41, 42, 47, 51, 58, 64, 68, 70, 77, 82, 85, 94, 105, 111, 115, 132, 138, 142, 143, 144, 149, 150], "http": [4, 12, 13, 17, 19, 26, 28, 30, 31, 32, 42, 51, 55, 56, 58, 59, 61, 62, 65, 70, 75, 85, 86, 89, 90, 97, 99, 101, 110, 111, 118, 122, 124, 125, 126, 128, 129, 132, 133, 134, 135, 136, 137, 138, 141, 158, 164], "www": [4, 13, 17, 32, 42, 48, 58, 65, 70, 86, 89, 94, 97, 99, 118, 126, 128, 135, 136, 158, 164], "org": [4, 17, 19, 48, 56, 58, 59, 65, 86, 89, 90, 94, 97, 99, 110, 111, 118, 124, 126, 128, 132, 133, 134, 135, 136, 137, 164], "doi": [4, 17, 56, 59, 61, 118, 130, 131, 132, 133, 134, 135, 136, 137, 138], "10": [4, 17, 18, 19, 30, 32, 34, 36, 42, 49, 55, 56, 57, 59, 82, 88, 91, 94, 115, 124, 125, 127, 130, 131, 132, 133, 134, 135, 136, 137, 138, 142, 148, 149, 150, 152, 154, 162], "5281": [4, 59, 118, 130, 131, 132, 133, 134, 135, 136, 137, 138], "zenodo": [4, 61, 118, 130, 131, 132, 133, 134, 135, 136, 137, 138], "4025432": [4, 131, 138], "here": [4, 13, 16, 18, 19, 31, 36, 41, 42, 52, 59, 62, 63, 70, 78, 82, 84, 88, 91, 96, 97, 99, 101, 102, 107, 108, 111, 113, 115, 123, 140, 141, 142, 159, 164, 170], "bibtex": [4, 59], "misc": [4, 129, 131], "url": [4, 12, 17, 55, 59, 127, 128, 162, 164], "year": [4, 17, 24, 55, 63, 96, 117, 128, 158], "releas": [4, 19, 20, 24, 27, 30, 31, 46, 49, 55, 60, 61, 62, 90, 96, 97, 104, 105, 110], "refer": [4, 5, 19, 22, 32, 34, 35, 36, 38, 39, 41, 48, 50, 55, 59, 66, 67, 71, 75, 88, 92, 94, 97, 98, 102, 104, 106, 111, 113, 127, 129, 139, 140, 142, 151, 158, 162, 164, 166, 167], "particular": [4, 6, 12, 22, 24, 30, 32, 34, 44, 47, 48, 50, 52, 55, 56, 59, 65, 66, 67, 71, 78, 82, 83, 85, 86, 88, 102, 103, 104, 106, 108, 113, 114, 115, 116, 118, 120, 123, 124, 125, 126, 127, 129, 130, 132, 147, 158, 159, 170], "obtain": [4, 6, 12, 34, 46, 47, 49, 50, 52, 62, 63, 72, 97, 98, 99, 115, 118, 132, 140, 144, 153, 162, 170], "your": [4, 6, 15, 16, 18, 19, 21, 22, 26, 27, 28, 36, 38, 40, 44, 47, 57, 58, 59, 60, 61, 62, 76, 81, 82, 84, 86, 87, 88, 89, 90, 93, 95, 96, 97, 98, 107, 108, 110, 111, 112, 113, 115, 116, 119, 127, 137, 140, 145, 146, 156, 157, 162, 165, 167], "multipl": [4, 5, 6, 13, 25, 30, 34, 35, 42, 47, 81, 88, 94, 97, 98, 109, 111, 116, 119, 125, 129, 139, 140, 149, 158, 159], "past": [4, 23, 27, 58, 64, 70, 103, 125, 128, 132, 138, 142, 143, 151], "17605": [4, 59, 138], "osf": [4, 138], "io": [4, 58, 59, 85, 98, 103, 138], "kmw6h": [4, 59, 138], "recent": [4, 13, 24, 29, 32, 49, 54, 58, 61, 66, 68, 76, 82, 84, 85, 118, 124, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 140, 154, 166], "articl": [4, 17, 96, 153], "l": [4, 7, 17, 34, 43, 61, 115, 140, 146, 150], "hadjimichael": [4, 17, 86], "2016": [4, 17, 26, 58], "build": [4, 17, 30, 31, 58, 59, 62, 71, 89, 99, 109, 126, 137, 142], "open": [4, 13, 17, 27, 30, 31, 32, 51, 55, 63, 81, 86, 90, 94, 97, 109, 142, 146, 166, 168], "ecosystem": [4, 17], "pde": [4, 5, 17, 60, 61, 62, 78, 85, 96, 108, 148, 167], "peerj": [4, 17], "scienc": [4, 17, 86], "7717": [4, 17], "c": [4, 16, 17, 30, 31, 32, 44, 55, 63, 65, 82, 86, 88, 89, 94, 102, 107, 108, 140], "68": [4, 17], "mandli2016clawpack": [4, 17], "yianni": [4, 17, 86], "journal": [4, 17, 56, 96, 153], "e68": [4, 17], "publish": [4, 17, 58, 96], "inc": [4, 17, 71], "least": [4, 5, 6, 13, 37, 47, 55, 63, 64, 70, 71, 107, 115, 116, 124, 125, 132, 148, 150, 154, 162, 164], "regard": [4, 41, 124, 158], "click": [4, 12, 13, 20, 30, 55, 58, 59, 116, 118, 126, 135, 136, 137, 138], "link": [4, 11, 13, 15, 17, 20, 21, 22, 26, 27, 30, 34, 36, 44, 45, 48, 55, 56, 57, 58, 59, 61, 63, 110, 111, 112, 118, 126, 135, 136, 137, 138, 140, 141, 143, 145, 152, 156, 157, 162, 166], "classic": [4, 6, 12, 15, 16, 21, 22, 24, 25, 26, 30, 44, 45, 46, 50, 59, 60, 61, 62, 67, 74, 76, 77, 78, 85, 86, 88, 91, 93, 94, 95, 96, 97, 101, 111, 112, 116, 139, 140, 145, 146, 149, 151, 157, 165, 167], "2d": [4, 7, 8, 15, 16, 18, 21, 24, 27, 29, 32, 34, 36, 37, 41, 42, 48, 49, 51, 56, 63, 71, 76, 81, 86, 88, 94, 96, 100, 104, 110, 112, 115, 118, 123, 125, 126, 127, 128, 129, 132, 136, 141, 142, 144, 145, 148, 149, 152, 154, 156, 157, 164, 168, 170], "leveque97": [4, 17], "3d": [4, 7, 15, 19, 24, 32, 71, 76, 81, 86, 96, 100, 104, 112, 115, 118, 119, 121, 123, 124, 125, 128, 136, 140, 142, 145, 148, 149, 156, 157, 168, 170], "langsethleveque00": [4, 17], "amr": [4, 7, 8, 16, 18, 19, 22, 25, 27, 29, 30, 34, 36, 37, 41, 47, 48, 49, 56, 63, 71, 72, 73, 77, 78, 81, 86, 94, 118, 124, 126, 127, 128, 130, 132, 135, 144, 147, 148, 150, 152, 161, 167], "bergerleveque98": [4, 6, 7, 17], "f": [4, 5, 6, 16, 17, 18, 22, 24, 27, 29, 30, 33, 66, 67, 89, 91, 97, 98, 101, 102, 104, 106, 107, 109, 119, 123, 126, 127, 128, 132, 141, 148, 149, 150, 152, 164, 165, 167], "balelevmitross02": [4, 17, 148, 170], "bergergeorgelevequemandli11": [4, 17], "levequegeorgeberg": [4, 17], "order": [4, 5, 6, 13, 16, 17, 18, 19, 31, 32, 34, 36, 47, 52, 57, 62, 64, 67, 70, 71, 72, 75, 77, 78, 82, 84, 85, 86, 88, 91, 92, 94, 96, 97, 98, 100, 101, 104, 108, 109, 110, 111, 115, 118, 123, 127, 132, 136, 140, 142, 144, 147, 148, 149, 150, 152, 158, 162, 164, 165, 167, 170], "sharpclaw": [4, 25, 27, 78, 86, 93, 95, 96, 101, 119, 140], "ketparlev13": [4, 17, 78, 96, 140], "ketchesonmandliet": [4, 17], "support": [4, 8, 13, 18, 19, 24, 36, 37, 41, 44, 49, 52, 55, 60, 61, 73, 75, 77, 85, 86, 88, 89, 94, 97, 98, 100, 102, 104, 115, 118, 123, 125, 126, 127, 128, 132, 133, 135, 136, 140, 142, 148, 149, 151, 158, 159, 162, 165, 168], "part": [4, 5, 19, 24, 26, 32, 36, 48, 51, 52, 62, 63, 64, 86, 89, 99, 105, 106, 108, 110, 114, 116, 118, 129, 167], "nsf": 4, "grant": [4, 86], "dm": 4, "8657319": 4, "9204329": 4, "9303404": 4, "9505021": 4, "96226645": 4, "9803442": 4, "0106511": 4, "cm": [4, 32, 75, 82, 142], "0245206": 4, "0609661": 4, "0914942": 4, "1216732": 4, "ear": 4, "1331412": 4, "cmmi": 4, "1536198": 4, "doe": [4, 5, 11, 16, 19, 22, 29, 30, 36, 42, 43, 49, 52, 55, 57, 58, 62, 71, 78, 82, 85, 94, 103, 106, 109, 115, 116, 120, 125, 129, 132, 135, 139, 140, 141, 144, 158, 164, 165, 167], "de": [4, 17, 86, 96, 142], "fg06": 4, "93er25181": 4, "fg03": 4, "96er25292": 4, "fg02": 4, "88er25053": 4, "92er25139": 4, "00er2592": 4, "fc02": 4, "01er25474": 4, "afosr": 4, "f49620": 4, "94": 4, "0132": 4, "nih": 4, "5r01ar53652": 4, "onr": 4, "n00014": 4, "09": [4, 94, 102, 161], "0649": 4, "council": 4, "nfr": 4, "through": [4, 13, 30, 36, 38, 39, 47, 49, 52, 55, 70, 71, 78, 81, 89, 101, 106, 108, 109, 111, 114, 115], "program": [4, 50, 52, 67, 78], "101039": 4, "420": 4, "scientif": [4, 17, 85, 96, 99, 110, 137], "divis": [4, 55], "nation": [4, 52, 158], "center": [4, 5, 29, 32, 34, 35, 36, 37, 42, 47, 55, 57, 63, 72, 75, 88, 94, 101, 102, 108, 115, 127, 142, 144, 149, 150, 151, 158, 159, 162, 167], "atmospher": 4, "ncar": 4, "boe": 4, "professorship": 4, "founder": 4, "depart": [4, 158], "mathemat": 4, "comot": 4, "fellowship": 4, "king": [4, 86], "abdullah": [4, 86], "technologi": [4, 86], "contract": [4, 65, 86], "state": [4, 13, 17, 19, 27, 30, 58, 75, 82, 88, 89, 91, 94, 96, 97, 98, 99, 101, 102, 103, 104, 107, 108, 116, 132, 133, 140, 141, 142, 148, 162, 170], "emerg": 4, "manag": [4, 12, 13, 55, 98, 158], "tsunami": [4, 5, 16, 17, 19, 26, 27, 34, 36, 42, 48, 50, 56, 68, 75, 98, 115, 119, 122, 128, 129, 135, 142, 143, 144, 151, 159, 162], "hazard": [4, 34, 48, 68, 143], "mitig": [4, 52], "nasa": 4, "asteroid": [4, 19], "threat": 4, "assess": [4, 52, 143], "project": [4, 5, 26, 27, 32, 52, 55, 58, 59, 75, 86, 90, 125, 126, 137, 149, 164], "planetari": 4, "defens": 4, "offic": 4, "opinion": 4, "conclus": [4, 55], "express": [4, 32, 65, 86, 105, 142], "materi": [4, 45, 65, 75, 86, 113, 130], "those": [4, 6, 10, 12, 18, 19, 24, 26, 52, 55, 56, 59, 70, 78, 88, 89, 91, 98, 101, 106, 115, 116, 119, 130, 132, 138, 139, 153, 160, 164, 167], "necessarili": [4, 42, 77, 97, 116], "agenc": [4, 60, 158, 159], "approach": [5, 7, 13, 18, 19, 30, 31, 41, 47, 49, 58, 61, 74, 81, 89, 96, 99, 101, 109, 115, 123, 125, 126, 128, 140, 141, 147, 167, 170], "introduc": [5, 16, 21, 34, 35, 36, 37, 42, 49, 82, 118, 130, 132, 139, 142, 144, 149, 170], "6": [5, 19, 24, 27, 30, 32, 34, 36, 41, 42, 44, 47, 51, 52, 55, 58, 63, 68, 70, 71, 72, 76, 82, 95, 96, 97, 101, 102, 104, 105, 110, 111, 115, 130, 138, 140, 142, 148, 149, 162, 169], "what": [5, 6, 9, 13, 14, 18, 19, 24, 27, 30, 32, 33, 34, 41, 49, 52, 54, 55, 58, 59, 61, 62, 63, 66, 67, 70, 71, 72, 77, 81, 88, 91, 95, 103, 106, 108, 111, 114, 115, 116, 124, 142, 143, 147, 148, 150, 151, 152, 153, 162, 164, 166, 167], "forward": [5, 64, 104, 115, 128, 167], "becaus": [5, 18, 19, 24, 29, 34, 36, 42, 55, 59, 70, 72, 97, 98, 99, 119, 140, 143, 148], "impact": [5, 19, 75], "autonom": 5, "shift": [5, 32, 52, 57], "perform": [5, 6, 17, 24, 29, 52, 55, 57, 76, 78, 81, 82, 91, 94, 97, 101, 104, 109, 116, 129, 132, 139, 140, 146, 151, 160], "snapshot": [5, 30, 98, 128], "save": [5, 13, 27, 28, 35, 36, 37, 42, 54, 63, 77, 91, 95, 104, 124, 125, 127, 132, 139, 159, 164], "space": [5, 6, 7, 16, 17, 27, 32, 34, 35, 36, 37, 47, 48, 51, 55, 57, 75, 77, 94, 98, 101, 115, 118, 123, 135, 139, 142, 148, 149, 150, 151, 152, 162, 164, 167], "interpol": [5, 6, 16, 19, 27, 32, 35, 37, 42, 47, 48, 57, 63, 64, 71, 75, 82, 118, 125, 132, 135, 142, 143, 144, 158, 159, 164], "regrid": [5, 10, 115, 119, 120, 125, 128, 129, 149, 150, 161], "davisleveque2018": [5, 17], "davis2018": [5, 17], "discuss": [5, 18, 19, 26, 30, 32, 52, 57, 70, 75, 97, 108, 110, 111, 115, 118, 125, 127, 140, 151, 154, 170], "when": [5, 14, 15, 16, 19, 22, 30, 31, 32, 34, 36, 37, 42, 43, 44, 47, 49, 53, 54, 55, 57, 58, 59, 61, 62, 64, 68, 70, 71, 75, 76, 77, 78, 81, 82, 84, 88, 95, 96, 97, 99, 100, 104, 107, 111, 115, 116, 118, 119, 120, 122, 124, 125, 126, 130, 132, 134, 135, 136, 140, 142, 143, 144, 145, 147, 148, 149, 150, 151, 152, 153, 158, 162, 164, 165, 166, 167, 168, 170], "accur": [5, 18, 19, 49, 52, 72, 75, 96, 104, 132, 148, 167, 170], "entir": [5, 6, 36, 41, 52, 55, 63, 70, 72, 75, 76, 78, 88, 98, 103, 113, 115, 120, 142, 164], "domain": [5, 6, 16, 17, 35, 36, 41, 42, 49, 52, 55, 58, 63, 75, 77, 87, 88, 89, 91, 99, 101, 103, 106, 113, 115, 118, 135, 149, 150, 151, 152, 162], "dimens": [5, 6, 7, 16, 22, 24, 27, 47, 48, 51, 57, 63, 71, 72, 88, 89, 91, 97, 99, 101, 102, 103, 106, 108, 115, 118, 127, 130, 140, 148, 149, 150, 152, 164, 167], "int_a": 5, "phi": 5, "dx": [5, 15, 17, 32, 34, 35, 36, 51, 57, 64, 75, 77, 89, 94, 98, 123, 127, 145, 162, 164, 167], "leq": [5, 142], "backward": [5, 30, 32, 35, 51, 63, 75, 77, 97, 120, 121, 136, 164], "small": [5, 16, 19, 36, 42, 47, 68, 70, 115, 116, 118, 119, 124, 139, 148, 150, 151, 162, 164, 166], "sai": [5, 13, 16, 30, 63, 107, 115], "x_1": [5, 142], "x_2": [5, 142], "might": [5, 10, 13, 14, 16, 24, 30, 31, 37, 38, 39, 40, 41, 42, 51, 55, 57, 58, 62, 67, 70, 71, 72, 76, 82, 85, 88, 98, 102, 111, 113, 114, 115, 119, 148, 149, 162, 164, 166, 167], "box": [5, 32, 35, 55, 63, 142, 164], "interv": [5, 47, 49, 51, 88, 108, 115, 132, 142, 148, 151], "elsewher": [5, 26, 42, 96, 142], "sharpli": 5, "peak": 5, "gaussian": [5, 88, 108, 152], "final": [5, 32, 37, 44, 58, 64, 71, 75, 88, 91, 98, 108, 113, 119, 139, 141, 148, 150, 152, 164], "necessari": [5, 6, 13, 18, 19, 30, 36, 37, 38, 39, 50, 52, 55, 58, 59, 62, 63, 71, 75, 77, 78, 84, 88, 89, 94, 97, 118, 123, 125, 127, 139, 140, 147, 148, 149, 162, 165, 167], "place": [5, 16, 22, 26, 30, 32, 38, 39, 55, 58, 62, 66, 67, 74, 96, 98, 99, 101, 105, 111, 119, 125, 137, 167], "earlier": [5, 19, 22, 24, 32, 34, 41, 47, 57, 75, 88, 101, 119, 126, 139, 162, 164], "help": [5, 7, 9, 25, 26, 27, 30, 31, 42, 43, 53, 58, 60, 66, 81, 84, 96, 99, 105, 109, 116, 124, 130, 140, 153, 165], "identifi": [5, 38, 39, 42, 55, 70, 89, 115, 130, 158], "hat": 5, "given": [5, 19, 32, 42, 51, 55, 57, 63, 68, 71, 75, 92, 97, 99, 103, 104, 106, 109, 115, 132, 142, 143, 144, 151, 162, 164, 167], "t_r": 5, "reach": [5, 115, 139], "acoustics_1d_adjoint": 5, "acoustics_2d_adjoint": 5, "main": [5, 11, 12, 19, 21, 30, 42, 46, 58, 59, 70, 71, 78, 89, 91, 97, 101, 108, 109, 116, 118, 126, 135], "subdirectori": [5, 12, 22, 24, 25, 38, 39, 58, 59, 62, 66, 74, 84, 93, 98, 111, 116, 135, 147, 151, 153, 160, 164], "must": [5, 6, 13, 16, 18, 19, 22, 24, 30, 32, 34, 36, 42, 46, 49, 50, 55, 58, 61, 65, 66, 67, 70, 71, 75, 76, 77, 86, 89, 96, 97, 98, 101, 103, 104, 106, 107, 108, 109, 111, 115, 119, 123, 140, 142, 143, 144, 148, 149, 150, 151, 152, 158, 164, 165, 166, 167, 170], "makefil": [5, 6, 11, 14, 15, 16, 21, 22, 25, 27, 30, 36, 38, 39, 44, 58, 76, 78, 82, 84, 89, 95, 96, 115, 118, 119, 123, 125, 127, 128, 130, 136, 144, 145, 148, 150, 151, 152, 153, 156, 157, 162, 165, 167], "coeffici": [5, 68, 101, 102, 104, 106, 107, 108, 140, 151], "matric": [5, 140, 170], "transpos": 5, "vice": 5, "versa": 5, "q_t": [5, 101, 102, 104, 108, 167, 170], "q_x": [5, 102, 108, 170], "_x": [5, 42, 70, 102, 104, 164, 167, 170], "eigenvalu": 5, "unchang": [5, 71], "upon": [5, 106], "transform": [5, 44], "eigenvector": [5, 140, 170], "right": [5, 19, 32, 34, 65, 68, 75, 86, 94, 99, 101, 102, 106, 108, 132, 139, 140, 142, 170], "rp1_acoustics_variable_adjoint": 5, "f90": [5, 9, 15, 18, 19, 22, 33, 34, 36, 42, 47, 49, 56, 66, 67, 76, 77, 85, 101, 112, 115, 119, 123, 125, 127, 128, 129, 130, 132, 133, 136, 140, 141, 144, 145, 154, 156, 157, 162, 165, 167], "boundari": [5, 7, 19, 22, 27, 42, 55, 63, 67, 70, 75, 76, 89, 94, 102, 104, 108, 113, 120, 123, 127, 142, 148, 150, 152], "condit": [5, 7, 19, 22, 27, 65, 67, 78, 86, 87, 88, 89, 91, 98, 104, 112, 119, 120, 123, 127, 143, 148, 150, 151, 152], "adjust": [5, 13, 18, 19, 22, 34, 35, 48, 63, 77, 94, 98, 136, 139, 143, 148, 167], "principl": [5, 164, 167], "vanish": 5, "dure": [5, 24, 34, 42, 47, 63, 75, 78, 119, 143, 144, 150, 151, 152, 154, 162], "integr": [5, 24, 57, 64, 86, 96, 98, 104, 119, 120, 124, 150, 152, 161, 162, 167], "qinit": [5, 22, 24, 42, 48, 66, 67, 89, 132, 143, 144, 167], "setrun": [5, 6, 7, 8, 14, 16, 21, 22, 27, 34, 35, 36, 37, 38, 39, 41, 42, 43, 45, 48, 49, 50, 52, 63, 64, 66, 68, 70, 77, 78, 82, 96, 112, 113, 115, 119, 123, 124, 125, 128, 130, 132, 135, 136, 137, 139, 140, 143, 144, 154, 158, 162, 165, 167], "clawdata": [5, 19, 41, 49, 77, 119, 123, 139, 148, 149, 150, 151, 152], "tfinal": [5, 77, 88, 91, 108, 139, 148, 150, 152], "via": [5, 13, 24, 25, 26, 30, 31, 32, 36, 38, 39, 44, 47, 50, 52, 55, 58, 59, 61, 62, 64, 66, 70, 71, 75, 76, 78, 82, 85, 88, 94, 97, 100, 103, 105, 107, 111, 115, 116, 118, 127, 130, 140, 142, 146, 151, 153, 156, 157, 162, 164, 167], "num_output_tim": [5, 77, 88, 91, 98, 139, 148, 150, 152], "larg": [5, 6, 12, 19, 22, 36, 37, 38, 39, 42, 52, 55, 57, 58, 71, 76, 81, 96, 98, 99, 115, 116, 118, 124, 132, 135, 139, 142, 144, 148, 149, 164, 166], "frequent": [5, 22, 29, 36, 47, 64, 107, 124, 135], "enough": [5, 47, 49, 58, 64, 70, 149, 159, 161, 162], "them": [5, 13, 20, 24, 30, 31, 32, 34, 47, 51, 55, 58, 71, 78, 86, 88, 93, 97, 98, 99, 101, 109, 113, 116, 118, 120, 129, 135, 136, 137, 142, 155, 158, 164, 167], "reason": [5, 19, 49, 52, 55, 63, 75, 76, 78, 99, 101, 115, 148], "output_format": [5, 36, 37, 77, 91, 98, 135, 148, 150, 152], "binari": [5, 36, 44, 47, 59, 65, 86, 98, 100, 124, 135, 136, 139, 148, 164, 168], "manner": [5, 36, 42, 47, 55, 64, 70, 75, 81, 127, 144, 148, 156, 157, 162], "attribut": [5, 7, 18, 24, 32, 36, 37, 41, 47, 70, 75, 81, 83, 84, 88, 91, 94, 97, 99, 101, 103, 104, 115, 118, 119, 124, 128, 136, 139, 147, 148, 149, 151, 158, 164], "clawutil": [5, 11, 14, 21, 22, 25, 30, 43, 44, 54, 59, 60, 61, 66, 111, 116, 146, 148, 149, 150, 152, 164, 165], "clawrundata": [5, 47, 63, 128, 139, 148, 149, 150, 152], "adjointdata": [5, 128, 129], "ia": 5, "attribur": 5, "toler": [5, 34, 102, 109, 115, 116, 125, 149, 150, 151], "rundata": [5, 18, 19, 24, 34, 36, 41, 42, 47, 49, 63, 64, 115, 119, 130, 137, 139, 144, 148, 149, 150, 151, 152, 154], "use_adjoint": 5, "adjoint_outdir": 5, "abspath": [5, 41], "_output": [5, 13, 14, 34, 36, 38, 39, 47, 54, 64, 71, 82, 84, 93, 98, 100, 103, 124, 131, 165], "period": [5, 6, 16, 34, 66, 88, 101, 115, 118, 148, 150, 152], "t1": [5, 41, 47, 63, 64, 115, 132, 149, 150, 151], "t0": [5, 18, 19, 77, 139, 148, 150, 151, 152, 162], "t2": [5, 41, 47, 63, 64, 115, 132, 149, 150, 151], "addit": [5, 7, 13, 16, 17, 19, 25, 26, 30, 31, 34, 36, 39, 40, 41, 48, 49, 50, 63, 70, 75, 77, 78, 82, 83, 89, 92, 94, 96, 98, 104, 105, 106, 113, 115, 118, 123, 125, 126, 127, 128, 131, 132, 134, 135, 136, 140, 142, 148, 152, 158, 161, 162, 167, 168], "aux": [5, 6, 15, 22, 24, 29, 47, 57, 89, 96, 97, 98, 101, 103, 104, 106, 107, 119, 120, 125, 127, 140, 141, 145, 148, 149, 150, 151, 152, 167], "inner": [5, 115, 128], "product": [5, 32, 65, 86, 109, 115, 128], "amrdata": [5, 24, 34, 115, 130, 132, 149, 150, 151], "aux_typ": [5, 149, 150], "append": [5, 22, 34, 36, 41, 42, 47, 55, 64, 82, 91, 103, 115, 124, 125, 137, 139, 140, 150, 151], "num_aux": [5, 89, 97, 99, 101, 102, 106, 140, 148, 149, 150, 152, 167], "len": [5, 32, 37, 94, 150, 152, 164], "innerprod_index": 5, "base": [5, 6, 13, 19, 22, 23, 24, 30, 31, 32, 34, 35, 36, 48, 49, 51, 55, 56, 57, 58, 63, 64, 67, 68, 70, 71, 75, 78, 89, 91, 92, 94, 96, 97, 102, 103, 104, 106, 108, 109, 115, 117, 123, 126, 128, 132, 135, 136, 143, 148, 149, 150, 151, 152, 158, 164, 167, 170], "richardson": [5, 7, 24, 149, 150], "error": [5, 16, 22, 38, 39, 43, 55, 62, 71, 76, 82, 91, 96, 97, 98, 109, 115, 116, 128, 132, 137, 149, 150, 158, 165], "estimat": [5, 150], "flag_richardson": [5, 115, 124, 149, 150], "flag_richardson_tol": [5, 115, 149, 150], "1e": [5, 70, 152], "flag2refin": [5, 7, 24, 149, 150], "flag2refine_tol": [5, 115, 149, 150], "01": [5, 17, 42, 77, 94, 164], "we": [5, 6, 18, 19, 24, 26, 28, 34, 38, 39, 41, 42, 47, 52, 55, 57, 58, 59, 60, 62, 67, 70, 72, 75, 81, 84, 88, 89, 90, 91, 93, 94, 97, 98, 99, 100, 101, 104, 105, 106, 107, 108, 109, 110, 113, 116, 127, 130, 135, 137, 140, 141, 142, 164], "attempt": [5, 8, 11, 22, 35, 38, 39, 66, 97, 103, 109, 116, 119, 133, 158, 164, 165], "estim": [5, 68, 115, 149, 151], "step": [5, 6, 10, 16, 18, 19, 21, 30, 34, 36, 38, 39, 40, 47, 55, 58, 59, 64, 71, 77, 78, 81, 84, 86, 87, 88, 89, 91, 98, 101, 104, 106, 108, 113, 115, 118, 119, 124, 125, 135, 139, 140, 146, 148, 149, 150, 151, 152, 162, 170], "extrapol": [5, 7, 16, 24, 72, 101, 108, 127, 148, 149, 150, 152], "togeth": [5, 16, 30, 31, 32, 58, 60, 75, 115, 135], "experiment": [5, 86], "simpli": [5, 13, 19, 36, 38, 39, 40, 42, 47, 49, 55, 57, 66, 67, 70, 72, 88, 90, 91, 93, 98, 99, 105, 116, 118, 140, 142, 153, 158, 164, 167, 168], "magnitud": [5, 32, 115, 127, 151], "greater": [5, 34, 63, 68, 70, 105, 115, 139, 148, 149, 151], "model": [5, 12, 16, 17, 18, 19, 26, 27, 32, 34, 44, 48, 49, 50, 56, 57, 68, 98, 115, 124, 129, 130, 131, 142, 143, 144, 151, 154, 158, 159, 162], "davisleveque2016": [5, 17], "chile2010_adjoint": 5, "shallow": [5, 15, 16, 17, 18, 19, 27, 34, 36, 42, 48, 49, 52, 56, 70, 78, 89, 96, 112, 118, 120, 121, 123, 125, 127, 128, 136, 137, 140, 144, 145, 151, 156, 157, 162, 167], "water": [5, 16, 17, 18, 19, 27, 36, 42, 47, 48, 49, 50, 51, 52, 63, 70, 78, 81, 89, 96, 118, 120, 121, 125, 127, 128, 137, 140, 142, 143, 144, 151, 162, 164, 166, 167], "while": [5, 13, 16, 19, 32, 42, 55, 71, 75, 82, 84, 89, 94, 98, 99, 104, 109, 127, 140, 144, 151, 166], "suitabl": [5, 8, 16, 18, 19, 22, 48, 52, 55, 73, 77, 103, 114, 140, 143, 158, 164], "To": [5, 6, 13, 14, 18, 19, 20, 24, 27, 30, 31, 38, 39, 40, 41, 42, 43, 47, 50, 53, 55, 56, 59, 66, 69, 70, 71, 75, 76, 77, 82, 84, 85, 88, 90, 92, 93, 96, 97, 98, 99, 100, 101, 104, 105, 108, 111, 113, 114, 115, 116, 118, 123, 125, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 143, 146, 148, 149, 153, 162, 168], "date": [5, 17, 30, 43, 51, 55, 58, 59, 66, 82, 158, 165], "across": [5, 115, 125, 162, 164], "ocean": [5, 16, 17, 19, 34, 49, 52, 55, 113, 115, 142, 151, 156, 157, 162], "wai": [5, 6, 13, 16, 19, 28, 30, 36, 38, 39, 41, 42, 47, 49, 55, 57, 58, 61, 62, 63, 65, 66, 82, 84, 85, 86, 88, 91, 93, 94, 99, 101, 103, 105, 108, 110, 111, 113, 114, 119, 125, 126, 127, 130, 137, 138, 140, 142, 147, 148, 155, 159, 162, 167, 169, 170], "target": [5, 62, 82, 89, 101, 130], "possibli": [5, 32, 36, 70, 88, 94, 111, 118, 124, 144], "deep": [5, 49, 70], "amplitud": [5, 125], "compar": [5, 18, 19, 24, 39, 47, 49, 52, 55, 59, 82, 98, 115, 116, 143, 149, 160, 166, 170], "essenti": [5, 57, 71, 104, 151, 162], "rest": [5, 24, 84, 113, 127, 143, 156, 157, 162, 164], "henc": [5, 36, 57, 58, 67, 72, 104, 110, 111, 115, 144], "take": [5, 6, 24, 29, 30, 32, 34, 37, 51, 58, 68, 70, 71, 75, 82, 88, 94, 101, 104, 108, 109, 110, 115, 116, 118, 122, 128, 136, 144, 148, 149, 150, 151, 164, 167, 170], "rpn2_geoclaw_adjoint_qwav": 5, "rpt2_geoclaw_adjoint_qwav": 5, "non": [5, 16, 59, 70, 78, 89, 101, 108, 128, 130, 148, 150, 152, 158, 170], "vector": [5, 24, 88, 92, 98, 106, 127, 135, 140, 141], "split": [5, 6, 76, 94, 97, 104, 123, 124, 132, 148, 149, 150, 152, 161, 167, 170], "flux": [5, 17, 34, 36, 37, 94, 102, 104, 140, 148, 170], "comment": [5, 11, 19, 26, 53, 59, 126, 135, 139], "rpn2": [5, 140], "basic": [6, 10, 12, 27, 32, 38, 40, 48, 61, 70, 71, 88, 94, 96, 97, 98, 102, 104, 116, 140, 141, 158, 170], "strategi": 6, "logic": [6, 16, 17, 34, 132, 151], "rectangular": [6, 7, 16, 17, 32, 34, 37, 41, 42, 48, 50, 63, 70, 94, 115, 127, 130, 135, 149, 151, 162], "too": [6, 19, 51, 55, 58, 59, 118, 124, 142, 150, 152, 154], "portion": [6, 36, 42, 55, 70, 89, 135, 161], "factor": [6, 55, 149, 151, 161, 164], "direct": [6, 8, 16, 24, 32, 34, 36, 38, 39, 47, 49, 51, 55, 59, 63, 65, 66, 71, 75, 76, 82, 86, 91, 101, 108, 115, 126, 140, 148, 149, 151, 164], "anisotrop": [6, 24], "perhap": [6, 12, 19, 34, 42, 47, 58, 82, 106, 109, 115, 142], "section": [6, 13, 16, 36, 38, 39, 42, 44, 49, 50, 52, 58, 59, 67, 71, 81, 84, 96, 116, 132, 139, 148, 151, 164], "cfl": [6, 49, 94, 98, 104, 108, 118, 119, 124, 148, 150, 151, 152], "spatial": [6, 17, 27, 32, 36, 37, 41, 42, 47, 48, 49, 64, 68, 72, 101, 115, 119, 123, 130, 132, 140, 143, 149, 150, 151, 152, 170], "reduc": [6, 16, 36, 42, 49, 55, 118, 124, 126, 135, 170], "thu": [6, 51, 98, 101, 127, 158], "proce": [6, 18, 19, 30, 151], "advanc": [6, 17, 36, 56, 70, 76, 108, 124, 136, 148, 149, 167], "taken": [6, 34, 70, 75, 98, 104, 115, 148, 167], "around": [6, 32, 34, 42, 63, 97, 113, 116, 130, 149, 150, 158, 164, 167], "librari": [6, 13, 15, 16, 18, 19, 22, 24, 27, 29, 30, 34, 36, 38, 39, 44, 47, 49, 56, 63, 66, 76, 77, 78, 86, 92, 97, 99, 104, 109, 111, 112, 115, 125, 130, 144, 145, 149, 156, 157, 165, 167], "bcnamr": [6, 16, 127, 148, 150, 167], "check": [6, 14, 15, 16, 22, 34, 38, 39, 43, 44, 54, 55, 56, 58, 59, 60, 62, 66, 71, 82, 85, 88, 89, 91, 96, 99, 103, 104, 106, 108, 109, 111, 112, 115, 120, 129, 142, 144, 145, 149, 150, 156, 157, 158, 164, 165, 166, 167], "denot": [6, 19, 24, 37, 47, 57, 140, 164], "procedur": [6, 16, 42, 48, 49, 59, 167], "updat": [6, 12, 13, 24, 25, 27, 34, 53, 56, 61, 62, 64, 84, 96, 104, 106, 107, 110, 113, 118, 119, 123, 125, 126, 127, 128, 129, 130, 140, 149, 150, 152, 155, 158, 161, 167], "consist": [6, 27, 34, 36, 51, 55, 59, 63, 99, 110, 125, 135, 136, 140, 142, 151, 162, 167], "replac": [6, 13, 31, 36, 41, 47, 52, 56, 58, 59, 61, 64, 66, 81, 89, 93, 97, 99, 100, 101, 102, 106, 109, 116, 118, 119, 125, 127, 129, 130, 135, 139, 140, 144, 164, 165], "ly": [6, 70], "within": [6, 16, 30, 36, 37, 58, 62, 70, 72, 78, 82, 100, 109, 111, 115, 140, 142, 147, 153, 164], "approxim": [6, 16, 18, 19, 27, 35, 52, 55, 72, 75, 140], "lead": [6, 13, 24, 34, 36, 52, 55, 68, 71, 75, 111, 114, 132, 144, 149], "total": [6, 32, 36, 55, 75, 77, 98, 104, 148, 149, 150, 152, 161], "mass": [6, 98, 118, 154], "restor": 6, "global": [6, 14, 94, 106, 109, 118, 143, 162, 166, 167], "fix": [6, 21, 22, 24, 27, 35, 37, 41, 47, 48, 49, 58, 59, 63, 64, 66, 70, 72, 86, 97, 102, 118, 119, 120, 121, 122, 123, 124, 125, 126, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 141, 148, 150, 152, 164], "up": [6, 13, 19, 24, 30, 31, 32, 34, 36, 38, 39, 42, 43, 47, 48, 55, 58, 59, 63, 66, 70, 71, 75, 77, 82, 88, 89, 91, 93, 95, 96, 97, 99, 104, 105, 108, 111, 113, 115, 116, 118, 123, 124, 127, 130, 132, 137, 142, 144, 147, 150, 152, 161, 162, 165, 166], "style": [6, 24, 30, 32, 36, 41, 53, 55, 70, 73, 82, 86, 91, 127, 151], "olig": [6, 17], "colella": [6, 17], "bergeroliger84": [6, 17], "bergercolella89": [6, 17], "fortran": [6, 9, 11, 13, 14, 19, 22, 25, 29, 30, 32, 34, 35, 36, 37, 38, 47, 48, 50, 57, 60, 62, 66, 67, 68, 72, 76, 77, 78, 81, 84, 86, 88, 89, 91, 94, 96, 97, 99, 101, 102, 104, 105, 106, 109, 111, 118, 123, 124, 125, 127, 128, 129, 135, 136, 140, 141, 146, 149, 150, 151, 152, 158, 160, 161, 162], "written": [6, 11, 27, 32, 34, 36, 37, 43, 47, 62, 63, 64, 65, 75, 77, 78, 82, 86, 95, 96, 97, 101, 125, 140, 148, 149, 150, 151, 152, 158, 164, 167], "ga": [6, 102], "dynam": [6, 22, 32, 36, 52, 75, 78, 149], "merg": [6, 13, 27, 30, 56, 58, 59, 62, 123], "earli": [6, 22, 144], "mjb": [6, 17], "rjl": [6, 17, 111, 129], "fulli": [6, 52, 55, 56, 126, 130, 140, 151, 158, 159], "consid": [6, 42, 52, 62, 70, 89, 111, 146, 153, 164], "adjac": [6, 16, 34, 48, 115, 144, 148], "equival": [6, 47, 56, 57, 63, 64, 77, 129, 135, 162], "copi": [6, 14, 15, 16, 19, 38, 39, 47, 55, 58, 59, 62, 71, 88, 91, 101, 106, 112, 113, 114, 115, 120, 124, 127, 131, 144, 145, 149, 153, 156, 157, 162, 167], "interior": [6, 16, 42, 77, 106], "howev": [6, 13, 16, 18, 19, 24, 34, 38, 39, 42, 44, 49, 50, 52, 55, 62, 65, 67, 70, 72, 75, 76, 77, 86, 89, 96, 115, 116, 125, 127, 129, 143, 144, 147, 151, 161], "lie": [6, 34, 35, 37, 70, 72, 115, 130, 142], "outsid": [6, 16, 41, 63, 70, 130, 142, 144, 162, 164], "li": [6, 16, 34, 37, 72, 115, 142], "along": [6, 14, 16, 19, 26, 29, 32, 34, 42, 47, 55, 58, 61, 75, 77, 111, 115, 118, 123, 138, 139, 142, 144, 151, 166], "unless": [6, 34, 43, 44, 63, 102, 110, 143, 148, 149, 164], "standard": [6, 16, 19, 32, 34, 36, 49, 55, 57, 71, 77, 89, 92, 104, 111, 115, 116, 150, 151, 152, 153, 162, 167, 170], "beyond": [6, 32, 110, 127], "modifi": [6, 9, 14, 15, 16, 18, 19, 22, 24, 29, 34, 38, 39, 42, 47, 48, 58, 59, 62, 64, 66, 71, 74, 82, 89, 92, 94, 96, 101, 111, 112, 113, 114, 115, 122, 124, 125, 126, 127, 132, 142, 144, 145, 148, 150, 151, 152, 156, 157, 162, 164, 167], "damag": [6, 65, 86], "bcn": [6, 16, 152, 167], "nd": [6, 16, 115, 127, 130, 167], "actual": [6, 29, 32, 36, 57, 62, 63, 71, 75, 82, 92, 97, 109, 113, 143, 151], "softwar": [6, 13, 26, 27, 31, 48, 52, 65, 86, 96, 97, 98, 153, 162], "With": [6, 24, 30, 47, 51, 53, 55, 62, 70, 78, 115, 124, 140, 142, 148], "opposit": [6, 16, 97], "side": [6, 16, 19, 20, 34, 55, 58, 68, 75, 97, 116, 118, 135, 136, 137, 140, 170], "everi": [6, 12, 30, 34, 36, 47, 64, 66, 67, 77, 88, 91, 93, 97, 98, 106, 115, 116, 118, 125, 126, 140, 144, 146, 148, 150, 152, 158, 162, 164, 167], "few": [6, 12, 13, 19, 24, 28, 30, 31, 39, 49, 52, 58, 70, 71, 89, 104, 108, 110, 115, 116, 130, 143, 160, 162, 167], "coarsest": [6, 19, 36, 55, 77, 119, 139, 148], "revis": [6, 125], "shock": [6, 17, 52, 104, 115], "accord": [6, 57, 97], "criteria": [6, 7, 24, 27, 34, 70, 106], "cluster": [6, 17, 115, 149, 150], "rigoutsi": 6, "bergerrigoutsis91": [6, 17], "nonoverlap": 6, "rectangl": [6, 7, 27, 32, 36, 70, 75, 115, 130, 164], "balanc": [6, 17, 78, 126, 141, 156, 157], "conflict": [6, 30, 62, 66, 71, 107, 111], "goal": 6, "possibl": [6, 13, 24, 28, 30, 32, 34, 36, 37, 47, 49, 51, 52, 55, 64, 65, 66, 75, 82, 86, 94, 97, 99, 100, 104, 109, 111, 115, 140, 142, 143, 148, 149, 162, 166, 167], "minim": [6, 62, 70, 97, 142, 149, 164], "overhead": [6, 76, 115, 161], "cutoff": [6, 150], "control": [6, 7, 25, 27, 34, 36, 44, 47, 58, 62, 64, 71, 77, 84, 87, 92, 94, 96, 97, 98, 99, 101, 115, 125, 130, 141, 151], "fraction": [6, 13, 32, 115, 148, 167, 170], "70": [6, 36, 55], "realli": [6, 72, 116, 167], "At": [6, 13, 29, 30, 36, 38, 39, 42, 70, 99, 104, 108, 110, 115, 130, 148], "present": [6, 26, 63, 72, 94, 97, 102, 103, 104, 109, 153, 154, 167, 170], "previous": [6, 24, 34, 70, 77, 84, 118, 123, 130, 144], "bilinear": [6, 34, 42, 47, 57, 72, 119, 120, 162], "doxygen": [6, 7, 27, 126], "flowchart": [6, 7, 27], "capabl": [7, 12, 19, 24, 34, 36, 47, 52, 56, 64, 70, 78, 89, 96, 119, 124, 125, 127, 128, 129, 130, 131, 135, 136, 164, 166], "block": [7, 32, 35, 42, 63, 75, 77, 78, 88, 97, 106, 109, 116, 167], "structur": [7, 10, 24, 34, 36, 37, 41, 59, 62, 66, 78, 103, 104, 125, 142, 147, 164], "input": [7, 14, 16, 22, 25, 27, 29, 32, 35, 37, 43, 48, 55, 63, 67, 70, 71, 77, 88, 91, 92, 94, 96, 102, 103, 104, 109, 113, 124, 127, 128, 129, 140, 150, 151, 152, 158, 159, 162, 164, 167], "indic": [7, 16, 19, 22, 24, 27, 31, 32, 34, 36, 41, 42, 44, 47, 48, 55, 57, 59, 62, 67, 71, 72, 80, 84, 94, 98, 99, 102, 104, 108, 111, 115, 116, 125, 130, 132, 140, 141, 148, 149, 150, 151, 152, 154, 162, 164, 167], "tool": [7, 8, 17, 24, 25, 30, 32, 34, 35, 36, 37, 38, 39, 42, 48, 49, 50, 51, 52, 55, 57, 60, 61, 62, 63, 71, 75, 80, 81, 82, 83, 85, 96, 111, 114, 120, 121, 125, 126, 130, 131, 151, 153, 162, 164, 166, 168], "matlab": [7, 24, 27, 38, 39, 80, 81, 82, 100, 110, 118, 127, 130, 131], "deprec": [7, 32, 48, 58, 62, 118, 123, 127, 135, 137, 162, 164], "debug": [7, 18, 44, 66, 77, 81, 98, 106, 111, 116, 135, 148, 150], "flag": [7, 12, 13, 18, 24, 27, 30, 31, 41, 43, 44, 48, 56, 62, 76, 89, 107, 109, 111, 118, 123, 128, 132, 150, 151], "sampl": [7, 8, 14, 17, 18, 27, 31, 36, 44, 47, 48, 51, 55, 64, 75, 111, 116, 135, 139, 142, 148, 149, 162, 164, 167], "ghost": [7, 16, 19, 76, 77, 94, 97, 104, 106, 125, 132, 136, 148, 150, 152, 161, 167, 170], "flagregion": [7, 27, 70, 115, 130, 132, 142, 149, 151], "rule": [7, 13, 27, 63, 70, 89], "convex": [7, 34], "slu": 7, "bounding_box": [7, 35], "mask_outsid": [7, 70], "write": [7, 30, 32, 35, 36, 37, 41, 42, 47, 48, 54, 57, 58, 68, 75, 77, 78, 81, 88, 91, 94, 95, 97, 98, 99, 103, 118, 125, 127, 150, 152, 158, 162, 164], "instanti": [7, 91, 99, 101, 104, 106, 136, 150, 152], "make_kml": 7, "simpl": [7, 31, 38, 39, 41, 48, 59, 72, 75, 89, 96, 101, 102, 104, 109, 114, 116, 164], "select": [7, 12, 13, 15, 16, 30, 34, 42, 70, 97, 98, 104, 112, 115, 119, 126, 130, 138, 145, 148, 151, 156, 157, 166], "continent": [7, 70], "shelf": [7, 70], "guid": [7, 13, 17, 20, 25, 26, 27, 48, 50, 56, 61, 96, 110, 115, 118, 126, 130, 135, 136, 137, 155], "adjoint": [7, 17, 27, 56, 115, 127, 128], "gaug": [7, 27, 34, 36, 48, 49, 63, 72, 94, 95, 106, 113, 119, 123, 124, 125, 126, 127, 130, 135, 139, 143, 147, 150], "extend": [8, 16, 24, 42, 63, 70, 71, 94, 127, 142, 144, 151, 162, 164, 170], "directli": [8, 18, 19, 21, 25, 34, 48, 52, 61, 71, 75, 82, 84, 88, 89, 92, 96, 106, 109, 111, 127, 135, 164, 168], "obviou": [8, 55], "elimin": [8, 24, 70, 89, 111, 127, 151], "gallery_classic_amrclaw": 8, "num_cel": [8, 24, 49, 94, 140, 148, 149, 150, 152], "refinement_ratios_i": [8, 149, 150], "sweep": [8, 140], "transvers": [8, 94, 125, 132, 140, 141, 148, 167, 170], "graph": 9, "understand": [9, 27, 38, 39, 52, 81, 96, 108, 115, 140], "filpatch": [9, 42, 125, 129, 132], "idea": [10, 26, 32, 70, 71, 78, 88, 108, 120, 164, 170], "overal": [10, 88], "who": [10, 12, 21, 24, 26, 34, 44, 52, 60, 118], "gori": 10, "monster": 10, "column": [10, 32, 34, 47, 49, 52, 64, 98, 102, 123, 142, 164], "markup": 11, "languag": [11, 81, 109], "restructur": [11, 58], "text": [11, 58, 59, 63, 77, 91, 97, 104, 123], "sphinx": [11, 25, 27, 59, 126], "covert": 11, "convert_readm": 11, "brows": [11, 26, 45, 55, 71, 153, 167], "insert": [11, 16, 75, 97, 118, 146], "script": [11, 21, 22, 30, 32, 34, 36, 43, 47, 55, 58, 66, 71, 78, 81, 86, 89, 93, 95, 96, 98, 99, 104, 109, 111, 116, 127, 131, 140, 147, 151, 152, 164], "invok": [11, 14, 19, 76, 144, 165], "minor": [11, 19, 55, 58, 98, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 130, 132, 134, 136, 137], "syntax": [11, 61, 146], "highlight": [11, 13], "header": [11, 32, 34, 36, 42, 47, 57, 70, 75, 77, 97, 103, 123, 125, 127, 158, 162, 164], "complex": [12, 19, 36, 41, 94], "archiv": [12, 23, 39, 55, 59, 116, 153, 160, 164, 166], "github": [12, 15, 19, 24, 25, 26, 27, 28, 31, 56, 58, 61, 62, 93, 101, 105, 112, 116, 118, 122, 124, 125, 126, 135, 138, 140, 141, 145, 156, 157, 165], "app": [12, 13, 20, 25, 28, 30, 31, 40, 45, 46, 75, 113, 114, 118, 122, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 141], "com": [12, 13, 19, 25, 26, 28, 30, 31, 51, 56, 58, 59, 61, 62, 97, 99, 101, 105, 122, 124, 125, 126, 135, 138, 141], "fvmbook": [12, 17, 45, 46], "galleri": [12, 17, 27, 34, 36, 38, 39, 40, 45, 48, 49, 59, 80, 81, 93, 96, 110, 116, 122, 126, 153, 160, 167], "anim": [12, 16, 36, 45, 49, 55, 123, 130, 131, 135, 153], "instal": [12, 13, 19, 20, 25, 27, 31, 38, 46, 55, 58, 59, 84, 86, 87, 90, 95, 97, 108, 110, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146, 169], "collect": [12, 27, 28, 30, 32, 34, 75, 81, 88, 104, 153], "either": [12, 16, 19, 22, 32, 34, 36, 42, 48, 50, 55, 64, 66, 70, 71, 75, 77, 82, 84, 88, 94, 96, 97, 98, 104, 109, 111, 115, 116, 123, 124, 125, 127, 135, 140, 142, 144, 149, 151, 158, 162, 164, 167, 170], "clone": [12, 20, 25, 26, 45, 56, 58, 59, 62, 85, 99, 105, 114, 118, 135, 136, 137, 165], "git": [12, 13, 25, 26, 27, 28, 56, 59, 62, 96, 105, 116, 129], "navig": [12, 31, 58, 153], "green": [12, 18, 19, 63, 70, 75, 82, 116, 164], "button": [12, 13, 30, 55, 63, 126], "download": [12, 13, 30, 31, 32, 39, 40, 42, 48, 55, 59, 61, 62, 93, 99, 105, 127, 128, 138, 160, 164, 165, 166], "zip": [12, 55, 59], "illustr": [12, 27, 32, 34, 38, 46, 48, 49, 55, 70, 71, 75, 77, 114, 122, 123, 127, 129, 140, 142, 153, 154, 164], "variou": [12, 19, 22, 24, 32, 36, 41, 46, 52, 58, 71, 72, 75, 82, 84, 94, 108, 110, 111, 115, 125, 140, 147, 151, 154, 158], "visibl": [12, 13, 46, 55, 114, 153], "render": [12, 24, 34, 46, 55, 63, 168], "advantag": [12, 19, 36, 47, 64, 81, 97, 110, 116, 142], "independ": [12, 25, 32, 36, 37], "contact": [12, 93, 96, 105], "u": [12, 13, 16, 26, 31, 34, 36, 37, 51, 52, 59, 60, 62, 64, 86, 93, 96, 102, 105, 106, 107, 108, 113, 126, 140, 149, 152, 158, 166], "storm": [12, 17, 26, 27, 48, 123, 126, 127, 128, 129, 131, 132, 133], "surg": [12, 17, 26, 27, 48, 123, 126, 127, 128, 129, 132, 158], "empti": [12, 36, 47, 103, 106, 109, 111, 118, 148, 151, 158, 164], "gitmodul": 12, "pull": [12, 26, 28, 31, 58, 59, 61, 93, 101, 116, 122, 125, 126, 132, 135, 140], "request": [12, 26, 28, 32, 36, 37, 47, 58, 61, 77, 88, 93, 94, 98, 101, 103, 116, 118, 125, 127, 132, 140, 151, 158, 164], "init": [12, 27, 30, 42, 48, 56, 59, 61, 143, 151], "leav": [12, 13, 16, 47, 62, 149, 164], "off": [12, 13, 47, 52, 55, 63, 71, 84, 91, 98, 115, 135, 149, 164], "won": [12, 13, 70, 89, 164], "hurt": [12, 67], "maintain": [12, 30, 110, 127, 149, 162, 167], "flavor": [12, 23, 97], "demonstr": [12, 27, 93, 99], "agre": [12, 30, 42, 57, 140, 161, 164, 167], "seen": [12, 24, 34, 38, 39, 40, 52, 76, 101, 148, 153], "cloud": 13, "elast": [13, 75], "sign": [13, 26, 82, 132, 158], "account": [13, 26, 30, 59, 90, 99, 139], "750": 13, "free": [13, 55, 66, 75, 86, 90, 101, 105, 107], "micro": 13, "suffici": [13, 16, 18, 19, 22, 36, 47, 75, 76, 77, 113, 119, 135, 148, 151], "tier": 13, "inform": [13, 14, 24, 27, 34, 35, 37, 38, 39, 49, 50, 51, 52, 53, 54, 62, 67, 77, 82, 83, 84, 88, 89, 94, 96, 98, 99, 100, 102, 103, 109, 111, 124, 127, 128, 130, 136, 138, 139, 140, 143, 146, 148, 149, 151, 158, 161, 162, 165, 166, 167, 168], "uw": [13, 26], "escienc": 13, "aw": 13, "tutori": [13, 31, 59, 84, 87, 91, 96, 105, 111, 114], "gear": 13, "faq": [13, 27, 81], "price": 13, "charg": 13, "per": [13, 32, 37, 47, 49, 55, 63, 71, 76, 97, 149], "thereof": 13, "regardless": [13, 37, 42, 70, 115, 148], "cpu": [13, 56, 124, 127, 129, 161], "consol": [13, 98, 151], "tab": [13, 58, 138], "east": [13, 162], "cheaper": 13, "rate": 13, "menu": [13, 20, 27, 58, 63, 118, 126, 135, 136, 137, 138, 143, 166], "imag": [13, 38, 39, 42, 59, 63, 70, 116, 127, 142], "platform": [13, 55, 91, 99, 110, 116], "finish": [13, 82, 88], "load": [13, 63, 98, 100, 103, 109, 116, 164, 168], "databas": [13, 32, 75, 109, 113, 127, 162], "uwamath": 13, "bar": [13, 58, 158], "screen": [13, 30, 55, 63, 91, 98, 99, 124, 150, 152], "shapshot": 13, "machin": [13, 27, 76, 78, 116, 125, 146], "disk": [13, 47, 88, 97, 98, 116, 125], "ubuntu": 13, "linux": [13, 74, 85, 107, 116, 146], "popup": 13, "look": [13, 14, 24, 27, 30, 32, 42, 55, 58, 59, 63, 71, 82, 84, 89, 94, 99, 103, 104, 108, 109, 111, 116, 120, 127, 136, 142, 148, 149, 151, 161, 164, 165], "sort": [13, 42, 127, 147, 165], "larger": [13, 22, 34, 49, 55, 63, 75, 76, 77, 82, 94, 119, 125, 132, 149, 151, 162], "cost": [13, 104], "continu": [13, 24, 30, 32, 51, 53, 58, 86, 110, 118, 140, 148, 170], "eventu": [13, 48, 130], "don": [13, 29, 30, 58, 59, 82, 97, 98, 99, 105, 116, 150, 165], "pair": [13, 51, 97, 116, 164], "secur": 13, "quick": [13, 27, 39, 48, 50, 60, 85, 116, 160], "close": [13, 42, 55, 58, 63, 70, 71, 97, 115, 118, 130, 149, 158], "back": [13, 29, 31, 58, 59, 126], "statu": [13, 30, 54, 91, 108], "wait": 13, "until": [13, 34, 64, 70, 137, 144], "refresh": [13, 47], "bottom": [13, 15, 19, 32, 38, 39, 48, 52, 68, 70, 75, 88, 101, 102, 125, 126, 145, 156, 157], "scroll": 13, "down": [13, 32, 98, 124, 158, 162, 164], "dn": 13, "screenshot": [13, 55], "rjlkei": 13, "pem": 13, "abl": [13, 58, 111], "ssh": [13, 30], "keypair": 13, "50": [13, 17, 34, 51, 55, 72, 104, 120, 150], "19": [13, 17, 26, 133, 134, 138, 161], "75": [13, 17, 92, 108, 142], "229": 13, "amazonaw": 13, "gfortran": [13, 62, 76, 85, 87, 107, 118, 146, 165], "ipython": [13, 78, 82, 84, 89, 90, 96, 98, 105, 108, 111, 123, 124], "scipi": [13, 37, 89, 110, 137, 158, 164], "netcdf": [13, 37, 44, 48, 124, 127, 129, 131, 158, 164, 166], "apach": 13, "server": [13, 31, 42, 55, 58, 59, 70, 127, 162, 166], "apt": [13, 85], "fetch": [13, 51], "bring": [13, 55, 58, 71, 151], "master": [13, 15, 27, 31, 58, 59, 62, 101, 112, 118, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 141, 145, 156, 157], "make_lib": 13, "compil": [13, 18, 19, 27, 38, 39, 43, 50, 62, 67, 76, 78, 84, 85, 89, 96, 97, 101, 105, 109, 118, 119, 140, 141, 146], "bashrc": [13, 44, 107, 146], "Of": [13, 28, 75, 108, 113, 162], "cours": [13, 28, 34, 47, 50, 64, 75, 99, 100, 108, 110, 113, 151, 162], "tar": [13, 129, 138], "instruct": [13, 19, 20, 26, 27, 38, 39, 42, 55, 56, 58, 59, 88, 90, 96, 99, 105, 108, 111, 118, 126, 133, 135, 136, 137, 138, 139, 165], "window": [13, 32, 71, 84, 146], "respons": [13, 52, 88, 103], "pretti": 13, "slow": [13, 55, 98, 107], "_plot": [13, 38, 39, 47, 71, 84, 118, 147, 153], "local": [13, 17, 19, 22, 27, 30, 55, 58, 63, 66, 67, 71, 92, 94, 101, 106, 125, 127, 136, 144, 162, 164, 167], "sftp": 13, "much": [13, 19, 30, 34, 36, 44, 49, 55, 77, 78, 81, 85, 110, 115, 119, 123, 130, 135, 136, 142, 148, 151, 161, 164], "smaller": [13, 36, 55, 68, 78, 94, 98, 119, 135, 144, 148, 150, 151, 152, 164], "quicker": [13, 142], "browser": [13, 30, 31, 38, 39, 55, 58, 153], "explain": [13, 19, 34, 52, 70, 132, 148, 153], "webserv": 13, "inbound": 13, "port": [13, 31, 95, 96, 101, 149], "22": [13, 26, 149, 164], "80": [13, 17, 55, 99, 142], "drop": [13, 18, 19, 58, 85, 130, 132, 144, 148], "tcp": 13, "Then": [13, 16, 30, 31, 32, 36, 47, 58, 59, 60, 67, 70, 75, 76, 84, 88, 91, 99, 105, 106, 107, 111, 118, 140, 142, 164, 165], "someth": [13, 29, 30, 58, 66, 74, 81, 98, 103, 104, 111, 118, 162, 165, 167], "shot": 13, "ln": 13, "expos": [13, 78], "home": [13, 31, 32, 62, 146], "scp": 13, "TO": [13, 65, 86], "send": [13, 26, 101, 140], "remot": [13, 55, 59, 127, 164, 166], "rel": [13, 18, 19, 22, 32, 43, 50, 52, 55, 75, 76, 82, 96, 109, 111, 116, 118, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 143, 149, 151, 153, 162, 166], "end": [13, 31, 32, 34, 35, 36, 47, 51, 55, 59, 63, 91, 98, 102, 108, 110, 113, 115, 118, 124, 125, 127, 139, 141, 142, 150, 152, 158, 161], "retriev": [13, 37, 51, 84, 89, 104, 164, 166], "sit": 13, "idl": 13, "action": [13, 14, 89], "restart": [13, 27, 47, 77, 84, 96, 118, 124, 125, 126, 127, 129, 132, 136, 148, 150, 152], "later": [13, 36, 37, 42, 54, 55, 62, 84, 104, 139], "But": [13, 19, 34, 42, 55, 72, 82, 107, 120, 127, 144, 146], "futur": [13, 24, 27, 28, 38, 39, 42, 49, 52, 57, 63, 68, 88, 104, 110, 124, 125, 127, 130, 136, 149, 158, 162], "job": [13, 134], "eb": 13, "runclaw": [14, 54, 118, 120, 129, 131, 137, 140], "autom": [14, 58, 89, 116], "certain": [14, 34, 48, 61, 70, 98, 115, 124, 142, 148], "keep": [14, 27, 30, 34, 35, 37, 38, 39, 76, 88, 91, 96, 106, 109, 116, 120], "log": [14, 27, 30, 31, 94, 95, 96, 103, 104], "came": 14, "rundir": [14, 91], "environ": [14, 18, 19, 27, 30, 38, 39, 40, 43, 54, 55, 58, 61, 62, 71, 74, 76, 78, 100, 107, 109, 111, 125, 164, 165], "noth": [15, 64, 106, 128, 145, 156, 157, 164, 167], "rememb": [15, 29, 76, 82, 99, 145, 156, 157], "b4step1": [15, 67, 167], "b4step2": [15, 145, 167], "b4step3": 15, "branch": [15, 20, 27, 31, 44, 54, 56, 59, 61, 62, 112, 116, 118, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 145, 156, 157], "tag": [15, 55, 59, 61, 112, 145, 149, 150, 156, 157], "bathymetri": [15, 48, 52, 55, 63, 102, 113, 125, 127, 141, 143, 145, 151, 162, 164], "area": [15, 24, 48, 104, 113, 125, 144, 145], "dy": [15, 51, 57, 63, 64, 77, 89, 94, 98, 123, 127, 145, 162, 164], "capac": [15, 102, 145, 148, 149, 150, 152], "length": [15, 32, 37, 49, 52, 63, 75, 101, 106, 125, 132, 145, 148, 149, 150, 151, 167], "latter": [15, 18, 47, 70, 72, 101, 130, 142, 145, 148, 158, 167], "quantiti": [15, 18, 19, 34, 37, 63, 71, 72, 91, 95, 96, 102, 106, 141, 145, 151], "coordinate_system": [15, 18, 49, 64, 145, 151], "impos": [16, 89, 115, 156, 157, 170], "chapter": [16, 140, 148, 167], "choic": [16, 48, 81, 104, 148, 150, 151, 152, 167], "bc_lower": [16, 88, 101, 108, 148, 150, 152], "bc_upper": [16, 88, 101, 108, 148, 150, 152], "extrap": [16, 101, 108, 148, 150], "outflow": [16, 148, 150, 152], "move": [16, 34, 38, 39, 48, 58, 62, 64, 75, 101, 115, 119, 121, 126, 151, 154, 162, 163], "normal": [16, 19, 35, 36, 56, 58, 64, 82, 101, 111, 140, 141, 148, 149, 150, 151, 152], "fairli": [16, 52, 125], "good": [16, 19, 30, 52, 55, 65, 76, 86, 108, 113, 116, 125, 132, 140], "outgo": 16, "let": [16, 48, 62, 86, 113, 126, 132, 140], "without": [16, 24, 35, 43, 47, 52, 63, 65, 66, 67, 70, 71, 82, 84, 86, 92, 96, 97, 98, 109, 111, 116, 136, 142, 146, 150, 152, 158, 165, 167], "particularli": [16, 19, 29, 31, 34, 36, 54, 55, 60, 61, 62, 75, 77, 111, 120, 123, 127, 132, 136, 144, 162], "perfect": 16, "hit": [16, 17, 36, 71, 77, 84, 98, 148], "obliqu": 16, "perfectli": 16, "wall": [16, 44, 101, 108, 124, 127, 129, 148, 150, 152, 161], "veloc": [16, 34, 36, 51, 64, 71, 84, 101, 102, 108, 125, 135, 143, 148, 149, 150, 151, 152, 167], "momentum": [16, 18, 34, 36, 37, 52, 64, 68, 98, 132, 141, 151, 154, 162], "third": [16, 18, 19, 34, 57, 92, 161, 164], "acoust": [16, 31, 38, 39, 52, 87, 88, 91, 93, 96, 104, 105, 123, 140, 150, 167], "p": [16, 17, 31, 84, 86, 88, 94, 97, 98, 102, 106, 118, 140, 170], "hu": [16, 18, 19, 36, 37, 64, 68, 102, 141, 151], "hv": [16, 19, 36, 37, 64, 68, 141, 151], "equal": [16, 19, 32, 34, 35, 36, 37, 49, 51, 55, 72, 75, 77, 99, 101, 115, 139, 142, 148, 150, 152, 162, 164], "far": [16, 18, 19, 41, 45, 70, 81, 128, 130, 132, 135], "symmetri": [16, 49], "physic": [16, 19, 47, 49, 55, 89, 94, 96, 108, 115, 170], "slightli": [16, 19, 42, 57, 125, 126, 132, 142], "complic": [16, 82, 89, 142, 147], "alwai": [16, 19, 24, 28, 29, 30, 34, 36, 37, 44, 57, 58, 62, 71, 88, 97, 114, 115, 119, 120, 132, 136, 144, 148, 150, 152, 162, 167], "alon": [16, 55], "topographi": [16, 17, 19, 27, 34, 35, 36, 37, 47, 48, 49, 52, 57, 63, 68, 72, 75, 83, 113, 114, 118, 119, 120, 121, 123, 124, 127, 130, 133, 136, 142, 143, 144, 156, 157, 163], "artifici": [16, 144], "ignor": [16, 49, 55, 63, 97, 123, 132, 143, 164], "incom": 16, "truncat": [16, 36, 77, 97, 148], "spuriou": [16, 34, 116], "extropl": 16, "dry": [16, 17, 27, 34, 48, 102, 130, 133, 141, 144], "land": [16, 42, 48, 50, 55, 58, 59, 63, 70, 72, 83, 130, 144, 151, 164], "tank": [16, 49, 52], "bc2amr": [16, 127], "calhounhelzellevequ": 16, "envis": 16, "fold": 16, "piec": [16, 52, 94], "glu": 16, "inflat": 16, "websit": [16, 55, 58, 97, 153, 164], "bergercalhounhelzellevequ": 16, "hint": [16, 27, 48, 81, 84, 111, 151, 165], "suppos": [16, 67, 70, 71, 82, 111, 115], "bit": [16, 24, 32, 59, 97, 99, 107, 141], "examin": [16, 38, 39, 47, 70, 111, 135], "own": [16, 22, 26, 30, 36, 62, 88, 89, 95, 96, 105, 106, 113, 115, 127, 140, 153], "todo": [16, 140, 158, 164, 170], "poster": 17, "resourc": [17, 26, 30, 50, 110], "bale": 17, "rossmanith": 17, "siam": [17, 26, 27, 96, 140], "sci": 17, "24": [17, 55, 72, 142], "2002": 17, "955": [17, 142], "978": 17, "author": [17, 27, 48, 52, 92, 96, 97, 102, 114], "1989": 17, "hydrodynam": 17, "phy": 17, "82": 17, "64": [17, 94, 97, 99, 107], "84": [17, 55], "34": [17, 55, 63, 96], "2011": [17, 26, 86], "pp": 17, "1195": 17, "1206": 17, "adv": 17, "awr11": 17, "1998": 17, "anal": 17, "35": [17, 34, 57, 75, 96], "2298": 17, "2316": 17, "bergerleveque2023": [17, 18, 19, 49], "2023": [17, 20, 45, 118, 136, 137, 138], "implicit": [17, 19, 86, 104], "dispers": [17, 18, 48, 49, 52], "submit": 17, "1984": 17, "partial": [17, 78, 113], "differenti": [17, 32], "53": 17, "484": 17, "512": 17, "rigoutso": 17, "1991": 17, "ieee": 17, "tran": 17, "sy": [17, 42, 70, 91, 150, 152], "man": [17, 27, 48, 52, 151, 156, 157], "cyber": 17, "21": [17, 71, 92, 94, 123, 124, 138], "1278": 17, "1286": 17, "2018": [17, 26, 58, 127, 128, 138], "phd": 17, "thesi": [17, 104], "pure": [17, 56, 84, 94, 96, 97, 99, 104, 116, 141], "appl": 17, "geophi": 17, "173": 17, "4055": 17, "4074": 17, "info": [17, 31, 32, 35, 36, 37, 47, 59, 63, 71, 91, 94, 97, 98, 104, 125, 135, 149, 150, 158], "analysi": 17, "evalu": [17, 29, 32, 36, 37, 68, 72, 88, 94, 104, 164, 167], "preprint": 17, "2000": [17, 57, 162, 164], "165": [17, 161], "126": [17, 164], "166": 17, "leveque96": 17, "1996": 17, "advect": [17, 82, 96, 99, 140, 141, 152, 167], "incompress": 17, "leveque1996": 17, "33": [17, 94, 142], "627": 17, "665": 17, "1997": [17, 96], "multi": [17, 55, 88, 119, 121, 124, 127, 167], "131": [17, 96], "327": [17, 96], "353": [17, 96], "wpalg": 17, "cambridg": 17, "press": [17, 99, 105], "uk": [17, 32], "fvmhp_materi": 17, "acta": 17, "numerica": 17, "211": 17, "289": 17, "dg": 17, "actanum2011": 17, "techniqu": [17, 28], "2013": [17, 26, 96], "a351": [17, 96], "a377": [17, 96], "manuel": [17, 86, 96], "quezada": [17, 86, 96], "luna": [17, 86, 96], "matthew": [17, 86, 96], "kneplei": [17, 86, 96], "emmett": [17, 86, 96], "2012": [17, 24, 26, 52, 96], "scalabl": [17, 96], "c210": [17, 96], "c231": [17, 96], "sisc": [17, 96], "month": [17, 55, 96], "nov": [17, 96], "kimetal2017": [17, 19], "kim": [17, 19], "pedersen": 17, "lovholt": 17, "boussinesq": [17, 27, 48, 49, 52, 118, 137], "studi": [17, 19, 52, 68], "break": [17, 18, 30, 32, 48, 52, 55, 63, 75, 116, 124, 144, 151, 164], "phenomena": [17, 19], "long": [17, 18, 19, 30, 32, 49, 51, 52, 55, 63, 74, 96, 124, 132, 149, 164], "coastal": [17, 52, 130, 143, 144, 151, 162], "engin": [17, 55], "122": [17, 42, 70, 142, 164], "2017": [17, 26, 59, 102, 125, 126, 127, 138], "86": 17, "1016": 17, "coastaleng": 17, "005": 17, "kim201775": 17, "jihwan": [17, 19], "geir": 17, "finn": 17, "vholt": 17, "mandlietal2016": 17, "googl": [17, 26, 27, 30, 42, 48, 51, 63, 70, 93, 97, 99, 107, 123, 125, 133, 140, 142], "scholar": 17, "hundr": [17, 36], "calhellev08": 17, "helzel": 17, "circular": 17, "spheric": [17, 49, 55, 118, 137], "review": [17, 92], "2008": [17, 86, 92, 102], "723": 17, "752": 17, "leveque09": 17, "reproduc": [17, 57, 65, 86], "cise": 17, "11": [17, 34, 82, 102, 131, 132, 138], "2009": [17, 92, 97, 102], "27": [17, 55, 63, 72, 142], "levyon03": 17, "darryl": 17, "yong": 17, "solitari": 17, "layer": [17, 27, 47, 63, 94, 119, 121, 124, 125, 127], "media": 17, "math": [17, 51, 55, 108], "63": [17, 142], "2003": 17, "1539": 17, "1560": 17, "mandli13a": 17, "72": [17, 55, 75], "91": 17, "2013it": 17, "aug": [17, 128], "mandli13b": 17, "dawson": 17, "36": [17, 51, 77, 94], "2014": [17, 26, 102, 117, 119, 120, 121, 122, 123, 138], "clint": 17, "okada85": [17, 32, 75], "okada": [17, 27, 32, 48, 49, 114, 162, 166], "deform": [17, 32, 35, 37, 48, 75, 166], "due": [17, 26, 32, 42, 51, 75, 116, 126, 127, 132, 144, 154, 165], "shear": [17, 32], "tensil": 17, "fault": [17, 27, 32, 48, 49, 114, 127, 134, 162, 166], "bull": [17, 32], "seism": [17, 32], "soc": [17, 32], "am": [17, 32], "1985": [17, 32], "1135": 17, "1154": 17, "repositori": [18, 19, 24, 26, 27, 28, 31, 39, 40, 45, 46, 48, 49, 56, 61, 62, 66, 67, 96, 104, 111, 113, 114, 116, 122, 125, 138, 155], "literatur": [18, 19, 52, 140], "situat": [18, 19, 49, 55, 70, 71, 132], "wavelength": [18, 19, 49, 52], "fluid": [18, 19, 34, 36, 49, 52, 64, 72, 118, 143], "swe": [18, 48], "deriv": [18, 19, 65, 75, 86, 91, 95, 96, 106, 116], "longer": [18, 19, 22, 30, 47, 58, 59, 63, 85, 110, 125, 127, 130, 132, 136, 137, 139, 140, 151, 162, 166], "respect": [18, 32, 34, 49, 55, 63, 96, 97, 102, 164], "txx": 18, "altern": [18, 19, 32, 35, 36, 38, 39, 47, 48, 51, 55, 60, 66, 71, 81, 96, 99, 111, 115, 118, 123, 124, 125], "ellipt": [18, 19], "involv": [18, 19, 26, 101, 104, 113, 154, 159], "xx": [18, 118, 138], "tridiagon": 18, "sgn": [18, 48], "serr": [18, 19], "naghdi": [18, 19], "madsen": [18, 48], "sorensen": [18, 48], "properti": [18, 32, 37, 49, 64, 71, 88, 91, 94, 103, 106, 164], "less": [18, 19, 42, 52, 55, 64, 68, 76, 104, 115, 116, 132, 148], "stabl": [18, 19, 85, 94, 132], "plane": [18, 32, 49, 75, 124, 142, 166], "planar": [18, 49, 75, 140, 141], "axisymmetr": [18, 49], "sphere": [18, 27, 32, 48, 49, 51, 89, 118, 120, 136, 137, 141, 151], "topo": [18, 27, 34, 35, 42, 48, 49, 52, 55, 57, 63, 70, 72, 83, 111, 118, 119, 121, 127, 129, 132, 136, 143, 151, 162, 164], "dtopo": [18, 27, 32, 35, 48, 52, 57, 63, 75, 111, 119, 121, 122, 130, 132, 144, 151, 162, 164, 166], "ident": [18, 42, 67, 94, 97, 99, 116, 164], "bouss_": 18, "templat": [18, 89], "bouss": [18, 19, 49, 118], "lapack": [18, 19, 118, 119], "fflag": [18, 19, 30, 43, 66, 76, 89, 109, 162], "llapack": [18, 107], "lbla": [18, 107], "explicit": [18, 109, 149], "lapack_tridiag": 18, "soubroutin": 18, "bla": [18, 19, 118], "bouss_wavetank_matsuyama": 18, "openmp": [18, 24, 27, 44, 78, 109, 115, 124, 130, 161], "somewher": [18, 19, 123], "boussdata1d": 18, "add_data": [18, 19], "bouss_data": [18, 19], "deepbouss": 18, "switch": [18, 31, 48, 55, 62, 101, 111, 116, 118, 126, 143, 166], "bouss_equ": [18, 19], "alpha": [18, 19, 55, 59, 104], "153": [18, 19], "hardwir": [18, 19, 76], "bouss_modul": [18, 19], "tip": [18, 19, 26, 48, 62, 81, 95, 96, 101, 110], "similarli": [18, 36, 43, 56, 93, 99, 101, 142, 161], "bparam": [18, 19], "15": [18, 19, 34, 42, 57, 59, 63, 70, 75, 94, 142, 150, 161, 164], "caus": [18, 19, 24, 36, 52, 55, 58, 65, 66, 72, 78, 84, 86, 107, 116, 124, 125, 126, 128, 132, 147, 149, 162, 164], "revert": [18, 19, 55], "nondispers": [18, 19], "bouss_min_depth": [18, 19], "criterion": [18, 19, 34, 115, 150], "onshor": [18, 19, 34, 49, 63, 68, 70, 142, 144], "nearest": [18, 19, 37, 42, 47, 164], "omit": [18, 19, 62, 116, 118, 125, 139, 151], "unknown": [18, 19, 32, 106], "inund": [18, 19, 34, 48, 49, 55, 68, 115, 130, 143, 166], "shore": [18, 19, 36, 42, 48, 115, 130, 144], "simplest": [18, 19, 62, 74, 108], "known": [19, 34, 44, 71, 75, 76, 82, 105, 107, 116, 126, 148], "landslid": [19, 52], "realist": [19, 55], "test": [19, 24, 27, 32, 38, 41, 44, 54, 55, 59, 60, 61, 62, 68, 81, 86, 87, 89, 95, 96, 102, 109, 110, 115, 120, 124, 125, 126, 127, 130, 132, 136, 140, 152, 158, 161, 162, 164], "One": [19, 25, 27, 28, 32, 34, 47, 48, 55, 58, 64, 70, 71, 72, 89, 109, 115, 118, 123, 164], "momenta": [19, 64], "effici": [19, 52, 56, 86, 96, 97, 98, 106, 115, 142, 149], "consider": [19, 52, 88], "oper": [19, 53, 116, 125], "spars": [19, 118], "huc": 19, "hvc": 19, "expand": [19, 28, 42, 55, 63], "petsc": [19, 24, 25, 78, 86, 88, 95, 98, 105, 106, 107, 109, 118], "mpi": [19, 78, 99, 118], "prerequesit": 19, "simplic": 19, "practic": [19, 30, 111, 113, 154], "variant": [19, 22, 60, 109, 116, 118], "tune": [19, 28, 149], "match": [19, 32, 36, 41, 55, 63, 97, 103, 116, 158, 164], "airi": 19, "theori": [19, 65, 86, 170], "incorpor": [19, 24, 52, 58, 86, 104, 119, 126, 141, 164], "bonneton": 19, "et": 19, "al": 19, "histor": [19, 52, 75, 166], "boussclaw": 19, "successfulli": [19, 66, 103], "reveal": [19, 47, 108], "stabil": [19, 104, 132, 148], "report": [19, 26, 32, 34, 54, 111, 116, 124, 127, 146, 148, 150], "except": [19, 24, 29, 32, 42, 49, 97, 102, 109, 130, 137, 148, 151, 158, 162], "investig": [19, 116], "radial_flat": 19, "num_eqn": [19, 77, 88, 89, 92, 97, 99, 101, 102, 103, 106, 108, 140, 148, 150, 152, 167], "facilit": [19, 47, 64, 96, 116, 123, 125, 130, 136, 153, 158], "boussdata": 19, "bouss_min_level": 19, "bouss_max_level": 19, "bouss_solv": 19, "bouss_tstart": 19, "avoid": [19, 42, 55, 58, 63, 66, 71, 94, 98, 115, 118, 119, 120, 124, 125, 132, 134, 139, 148, 151, 170], "altogeth": 19, "neighborhood": 19, "recogn": [19, 50, 57, 62, 162], "extrem": [19, 55, 107], "motion": [19, 75, 162], "did": [19, 127, 132, 142, 162], "petsc_dir": [19, 99], "petsc_arch": [19, 99], "shell": [19, 30, 61, 62, 76, 82, 84, 99, 105, 108, 111, 125, 146], "dhave_petsc": 19, "petsc_opt": 19, "options_fil": 19, "petscmpiopt": 19, "adequ": [19, 52], "briefli": [19, 170], "gmre": 19, "krylov": 19, "algebra": 19, "multigrid": 19, "precondition": 19, "manualpag": 19, "ksp": 19, "kspsetfromopt": 19, "pc": 19, "pcsetfromopt": 19, "ex": [19, 38, 39, 91, 118], "xgeoclaw": 19, "runex": [19, 118], "bin": [19, 47, 99, 139], "mpiexec": [19, 99], "word": [19, 98, 127, 158], "process": [19, 27, 36, 38, 39, 48, 55, 56, 75, 88, 93, 94, 99, 105, 106, 109, 116, 118, 125, 135, 137, 148, 165], "incorrectli": [19, 124], "configur": [19, 82, 88, 99, 164], "environment": 19, "implicitamr": 19, "accompani": [19, 20, 23, 118, 135, 136, 137], "novemb": [20, 118, 124, 125, 137, 138], "featur": [20, 24, 27, 30, 34, 42, 55, 58, 71, 82, 89, 115, 116, 118, 122, 124, 125, 127, 132, 135, 136, 137, 138, 158, 162], "dev": [20, 26, 30, 58, 59, 99, 118, 127, 128, 133, 134, 135, 136, 137, 138], "diff": [20, 54, 59, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137], "tarfil": [20, 59, 62, 118, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137], "pip": [20, 27, 30, 55, 59, 60, 90, 96, 99, 105, 107, 111, 118, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146], "doc": [20, 25, 26, 30, 32, 55, 59, 92, 109, 110, 111, 118, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 155], "docker": [20, 27, 59, 60, 118, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 169], "migrat": 21, "intermedi": [21, 34, 37, 75, 139, 167], "easiest": [21, 30, 44, 78, 82, 84, 115, 167], "bulk": [21, 88, 102, 108, 140, 150, 167], "convers": [21, 27, 89, 97, 115, 142, 162, 166], "convert43to46": 21, "inspect": [21, 22, 55], "broken": [21, 22, 30, 75, 116], "renam": [22, 24, 38, 39, 66, 101, 104], "achiev": [22, 89, 156, 157], "convert46to50": 22, "_4": 22, "complet": [22, 24, 30, 51, 66, 84, 88, 89, 99, 109, 116, 137], "delet": [22, 30, 58, 62, 137], "combin": [22, 58, 63, 124, 166], "properli": [22, 34, 38, 39, 42, 43, 52, 55, 57, 58, 62, 63, 70, 74, 77, 91, 116, 119, 122, 127, 130, 132, 146, 148, 151, 154, 162, 164, 165, 167], "permut": 22, "th": [22, 24, 47, 140, 167], "reorder": [22, 24], "pattern": [22, 50, 55, 143], "carefulli": [22, 24, 68], "setaux": [22, 24, 67, 89, 119, 120, 140, 148, 150, 152], "sequenc": [22, 24, 36, 37, 67, 70, 72, 99, 105, 108, 109, 116, 119, 126, 140, 167], "maxmx": [22, 89], "maxmi": [22, 89], "maxmz": 22, "declar": [22, 24, 106, 132, 167], "memori": [22, 24, 76, 77, 78, 88, 91, 98, 106, 132, 149, 150], "alloc": [22, 104, 123, 132, 149], "mx": [22, 24, 49, 57, 77, 89, 99, 102, 140, 150, 162, 167], "resp": [22, 32, 132], "mz": [22, 24], "driver": [22, 67], "led": [22, 128], "homepag": [23, 27], "reorgan": [24, 89, 117, 133], "changelog": [24, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 138], "concern": [24, 48, 149], "evolv": [24, 88, 91, 104], "organ": [24, 25, 38, 39, 91], "affect": [24, 66, 125, 126, 132, 135, 137, 148, 162, 165], "assist": [24, 130], "older": [24, 44, 56, 58, 61, 62, 104, 118, 131, 135, 138, 149], "compris": [24, 96, 164], "webpag": [24, 26, 38, 39, 45, 50, 55, 59, 66, 128, 143], "primari": [24, 30, 31, 48, 113, 116, 158], "auxiliari": [24, 89, 91, 97, 102, 103, 104, 106, 140, 148, 150, 152, 167], "cach": [24, 51, 59, 84, 86, 130, 149], "stride": [24, 164], "contingu": 24, "maux": [24, 140, 167], "ma": [24, 36, 42, 70, 142, 164], "relev": [24, 29, 42, 44, 48, 55, 58, 97, 115, 116, 158], "flexibl": [24, 32, 63, 89, 123, 126, 140, 142, 149], "clean": [24, 58, 59, 109, 118, 123, 127, 137], "systemat": 24, "obscur": 24, "clarifi": 24, "regress": [24, 27, 30, 54, 96, 99, 125, 126, 160], "travi": [24, 132], "miss": [24, 27, 97, 118, 129, 136, 137, 154, 158, 162, 164, 165], "conform": [24, 30, 35, 103, 127, 162], "construct": [24, 32, 34, 57, 72, 88, 94, 109, 136, 158, 159, 162], "visit": [24, 27, 81, 138], "gui": [24, 168], "monitor": [24, 27, 35, 36, 41, 48, 70, 72, 76, 120, 122, 125, 135], "arriv": [24, 34, 36, 42, 48, 125, 143, 144], "fgmax": [24, 27, 36, 41, 48, 63, 72, 76, 120, 122, 125, 126, 130, 131, 135, 136, 137, 151], "ndim": [24, 77, 84, 148, 149], "num_dim": [24, 41, 94, 97, 101, 148, 149, 150, 152], "zlower": 24, "yupper": [24, 150, 164], "zupper": 24, "upper": [24, 34, 35, 41, 49, 92, 94, 101, 142, 148, 150, 152, 162, 164], "mxnest": 24, "neg": [24, 42, 144, 151, 162, 164], "ins": 24, "forc": [24, 27, 43, 48, 66, 70, 109, 115, 130, 141, 144, 149, 159, 164, 165], "prohibit": 24, "again": [24, 43, 66, 70, 75, 82, 84, 88, 89, 98, 102, 107, 111, 127, 133, 162, 165], "2d_grid": 24, "attirbut": 24, "gridlines_show": 24, "grideges_show": 24, "openli": 25, "super": [25, 30, 127, 164], "util": [25, 27, 30, 37, 48, 55, 77, 81, 84, 96, 111, 116, 118, 147, 163, 164, 165], "graphic": [25, 30, 56, 71, 81, 135], "visual": [25, 26, 30, 36, 38, 39, 47, 48, 61, 62, 71, 77, 78, 81, 96, 100, 101, 111, 118, 123, 130, 168], "web": [25, 27, 30, 38, 39, 55, 58, 59, 127, 153, 164], "latest": [25, 27, 46, 55, 58, 59, 61, 62, 90, 99, 105, 118, 120, 124], "legaci": [25, 59, 62], "welcom": [26, 86], "answer": 26, "question": [26, 30, 51, 103], "slack": 26, "channel": [26, 45], "workspac": [26, 71, 106], "join": [26, 82], "experi": [26, 52, 104, 137, 154], "warn": [26, 30, 97, 98, 104, 118, 132, 148, 165], "activ": [26, 34, 36, 41, 58, 104, 113, 151], "gitter": 26, "post": [26, 27, 28, 30, 36, 55, 99, 133, 134, 135, 148, 153], "ask": 26, "twitter": 26, "rais": [26, 32, 62, 97, 103, 105, 109, 158, 164], "photo": [26, 27], "ve": [26, 90, 105, 108], "fork": [26, 58, 59], "track": [26, 27, 30, 34, 35, 36, 47, 48, 55, 58, 60, 62, 76, 88, 96, 109, 116, 119, 128, 130, 133, 135, 141, 158], "youtub": [26, 113, 130], "video": [26, 113, 130], "introductori": 26, "webinar": 26, "csdm": 26, "2019": [26, 56, 128, 129, 130, 138], "randi": [26, 32, 92, 94], "plan": [26, 30, 52, 60, 61, 62, 68, 97, 104, 136, 158], "schedul": 26, "annual": 26, "meet": 26, "took": 26, "onlin": [26, 110, 114, 127, 155, 162], "covid": 26, "four": [26, 72, 94, 115, 116], "short": [26, 49, 52, 101, 132], "slide": 26, "tulan": 26, "clifford": 26, "lectur": 26, "april": [26, 130, 131, 138], "minisymposterium": 26, "cse": 26, "confer": 26, "februari": [26, 126, 132, 133, 138], "march": [26, 27, 34, 41, 42, 48, 119, 120, 138, 142], "boulder": 26, "2015": [26, 59, 102, 123, 124, 125, 138], "summari": [26, 27, 45, 59, 127, 148, 149, 150, 151], "tackl": [26, 30], "progress": [26, 30, 104, 113, 118, 123, 162, 164], "held": [26, 52], "zoom": [26, 55], "conjunct": [26, 42, 70, 97, 115], "23": [26, 130, 131, 138, 149], "25": [26, 34, 42, 45, 57, 70, 75, 88, 94], "28": [26, 122, 123, 126, 127, 128, 129, 130, 138], "unives": 26, "colorado": 26, "immedi": [26, 52, 71, 88, 90, 91, 98], "august": [26, 127, 135, 136, 138], "utah": 26, "hpc": 26, "swag": 26, "introduct": 27, "commit": [27, 32, 54, 58, 59, 116], "licens": [27, 48, 52, 96, 114, 127], "cite": [27, 59, 61, 138], "fund": [27, 60, 96], "troubleshoot": [27, 60, 61, 96], "amazon": 27, "servic": [27, 65, 86], "ec2": 27, "ami": 27, "77": [27, 67, 107], "statist": [27, 124], "b4run": [27, 131], "sytl": [27, 36, 81], "checkpoint": [27, 47, 118, 124, 125, 127, 129, 132, 148, 150, 152], "share": [27, 28, 55, 62, 76, 78, 94, 97, 99], "gpu": [27, 129], "cautionari": [27, 48, 67, 151], "registr": [27, 48, 127, 162, 164], "earth": [27, 42, 48, 51, 56, 63, 70, 75, 123, 125, 133, 142, 151], "slip": [27, 32, 48, 49, 114, 162, 166], "sea_level": [27, 34, 42, 48, 52, 63, 102, 130, 144, 151, 162, 164], "eta": [27, 32, 36, 37, 42, 47, 48, 72, 115, 123, 130, 143, 151], "lagrangian": [27, 47, 48, 130], "particl": [27, 36, 47, 48, 130, 135], "friction": [27, 48, 52, 151, 156, 157], "fgout": [27, 34, 47, 48, 63, 72, 135, 137, 151], "nearshor": [27, 34, 36, 47, 48, 52], "front": [27, 34, 41, 42, 48, 71, 103, 109, 142], "geometri": [27, 32, 49, 75, 96, 97, 101, 103, 106, 123], "jupyt": [27, 46, 48, 75, 78, 96, 110, 114, 123, 124, 130, 140], "notebook": [27, 32, 34, 42, 46, 48, 58, 70, 75, 78, 90, 96, 98, 114, 123, 124, 130, 140, 141, 142, 164], "concept": [27, 140], "pointwis": [27, 34, 57, 106, 123, 162], "potenti": [27, 71, 125, 143], "fly": 27, "commun": [27, 55, 86, 106, 109, 111, 115, 127], "hope": [28, 116], "greatli": [28, 36, 86, 118, 135, 143], "submodul": [28, 30, 56, 59, 61], "stai": [28, 34], "annot": [29, 63], "map2d_to_1d": 29, "unavail": 29, "sens": [29, 55, 64, 127, 132, 170], "context": [29, 55, 167], "plotdata": [29, 36, 37, 47, 82, 84, 91, 118, 124, 125, 147], "els": [29, 30, 62, 70, 106, 127, 142, 144, 152], "scalar": [29, 32, 42, 98, 106, 140, 144, 148, 170], "moment": [29, 32, 128], "outn": 29, "outaux": 29, "prepar": 30, "substanti": [30, 58, 86, 123, 129, 132], "incompat": [30, 55], "built": [30, 31, 49, 68, 78, 87, 96, 99, 101, 103, 115, 116, 156, 157], "correctli": [30, 34, 89, 95, 123], "Be": [30, 71, 143, 166], "verbos": [30, 32, 35, 37, 51, 63, 70, 91, 94, 98, 104, 116, 142, 148, 150, 152, 158, 164], "messag": [30, 43, 51, 58, 62, 71, 76, 91, 94, 98, 100, 103, 104, 106, 107, 118, 132, 148, 150, 152, 165], "wise": [30, 104], "especi": [30, 55, 89, 101], "necessit": 30, "modif": [30, 43, 65, 71, 82, 86, 92, 151], "compat": [30, 32, 35, 51, 55, 63, 75, 77, 81, 97, 99, 107, 120, 121, 125, 126, 136, 164], "explan": 30, "tracker": 30, "increasingli": 30, "push": [30, 58, 59], "unlik": [30, 34, 58, 59, 77], "accid": 30, "subrepositori": [30, 59], "oppos": [30, 159], "inter": [30, 126], "proceed": [30, 58], "txt": [30, 34, 47, 54, 59, 64, 86, 98, 118, 125, 126, 127, 139, 158], "isol": [30, 62], "editabl": 30, "site": [30, 55, 62, 111], "pull_al": [30, 59], "sh": [30, 58, 59, 99], "prompt": [30, 31, 71, 82, 84, 93, 96, 108, 164], "shortli": [30, 116], "handi": [30, 66], "uncommit": [30, 54, 59], "checkout": [30, 56, 58, 59, 61], "claw_git_statu": [30, 54, 59, 131], "claw_git_diff": [30, 54, 59], "usernam": [30, 31], "mind": 30, "password": 30, "whenev": [30, 124, 167], "brought": 30, "new_featur": 30, "accident": [30, 82], "recov": [30, 35], "histori": [30, 37, 59, 62, 84], "throw": [30, 137], "awai": [30, 143], "recreat": [30, 43, 66, 130], "rebas": 30, "onto": [30, 32, 55, 144, 164], "newer": [30, 76, 92, 127], "head": [30, 32, 58], "cleaner": [30, 125], "recompil": [30, 43, 44, 66, 76, 109, 118, 130, 149, 167], "nosetest": [30, 39, 40, 99, 105, 116, 160], "fail": [30, 97, 99, 109, 116, 123, 158], "pr": [30, 59, 116, 127], "someon": [30, 66], "propos": [30, 170], "rid": 30, "cross": [30, 49], "poor": 30, "whole": [30, 55, 98, 99], "lot": [30, 42, 118, 130], "doesn": [30, 34, 62, 67, 106], "pep8": 30, "aim": 30, "vim": 30, "nice": [30, 63, 89, 101, 120, 142], "underlin": 30, "nose": [30, 39, 40, 87, 99, 116, 136, 160], "suit": [30, 55, 116], "exactli": [30, 35, 36, 54, 56, 72, 106, 142, 148], "overrid": [30, 44, 55, 88, 89, 109], "bind": [30, 55, 81, 89, 99], "dockerhub": [31, 59], "riemann_book": [31, 141], "0_dockerimag": 31, "8889": 31, "0_contain": 31, "serv": 31, "jovyan": 31, "exit": [31, 82, 99, 105], "ctrl": [31, 82], "quit": [31, 71, 82, 84, 154], "whatev": [31, 88, 103, 140], "ip": [31, 82, 84], "localhost": 31, "token": 31, "wherev": [31, 165], "ones": [31, 88, 89, 106, 127, 148, 149], "ipynb": [31, 32, 34, 42, 75, 114, 124, 141, 142], "chile2010a": [31, 114], "exercis": [31, 48, 114, 116], "transfer": 31, "laptop": [31, 96], "accomplish": [31, 42, 66], "0_geoclaw_dockerimag": 31, "contains": 31, "rm": [31, 58, 59, 66, 165], "1_contain": 31, "rmi": 31, "1_dockerimag": 31, "prune": 31, "dockeril": 31, "root": [31, 62, 97, 98, 103], "dockerfile_v5": 31, "0_geoclaw": 31, "test_bind": 31, "subfault": [32, 48, 127, 128, 166], "seafloor": [32, 52, 75, 144, 166], "rise_tim": [32, 75], "rise": [32, 75, 143, 144], "rise_time_start": [32, 75], "piecewis": [32, 34, 42, 47, 49, 57, 72, 75, 120, 140, 142, 162], "quadrat": [32, 75], "rise_time_end": [32, 75], "rise_fract": [32, 75], "csv": [32, 75, 127], "erron": [32, 75], "dtopotools_exampl": [32, 75, 114], "test_dtopotool": 32, "deal": [32, 52, 81, 98, 99, 106, 158, 164], "sub": [32, 116, 164], "dtopographi": [32, 75], "ucsbfault": [32, 75], "csvfault": [32, 75], "siftfault": [32, 75, 127], "segmentedplanefault": [32, 75], "fault1d": 32, "subfault1d": 32, "dtopography1d": 32, "plot_dz_contour": 32, "plot_dz_color": 32, "mw": [32, 127], "strike_direct": 32, "input_unit": 32, "coordinate_specif": [32, 75], "subclass": 32, "row": [32, 34, 57, 92, 115, 162, 164], "rupture_typ": [32, 75], "static": [32, 75, 127], "dtopo_typ": [32, 35, 49, 63, 75], "repres": [32, 49, 88, 94, 97, 101, 102, 104, 106, 164, 170], "dz_at_t": 32, "dz": [32, 35, 49, 144, 162], "dz_max": 32, "ab": [32, 56, 101, 109, 115, 142, 164], "self": [32, 35, 37, 104, 136, 164], "cmax_dz": 32, "dz_interv": 32, "colorbar_ticks": 32, "colorbar_labels": 32, "fig_kwarg": [32, 164], "appar": [32, 72, 76], "dz_cellave_at_t": 32, "compos": [32, 88], "mo": 32, "seismic": [32, 37, 48, 75], "containing_rect": 32, "create_dtopo_xi": [32, 75], "rect": [32, 142], "016666666666666666": 32, "buffer_s": [32, 75], "buffer": [32, 42, 47, 115, 124, 125, 149, 150, 164], "x1": [32, 34, 35, 36, 41, 51, 63, 89, 98, 115, 142, 149, 150, 151, 164], "x2": [32, 34, 35, 36, 41, 51, 63, 98, 115, 142, 149, 150, 151, 164], "y1": [32, 34, 35, 36, 41, 51, 63, 89, 98, 115, 142, 149, 150, 151, 164], "y2": [32, 34, 35, 36, 41, 51, 63, 98, 115, 142, 149, 150, 151, 164], "create_dtopographi": [32, 75], "valueerror": [32, 158, 164], "plot_subfault": 32, "plot_centerlin": 32, "slip_color": 32, "cmap_slip": 32, "cmin_slip": 32, "cmax_slip": 32, "slip_tim": 32, "plot_rak": 32, "xylim": 32, "plot_box": [32, 164], "axessubplot": 32, "centroid": [32, 75], "dip": [32, 49, 75], "jet": [32, 71], "rake": [32, 75], "drawn": [32, 55, 147], "plot_subfaults_depth": 32, "column_map": 32, "skiprow": 32, "delimit": 32, "dict": [32, 37, 91, 97, 102, 103, 106, 158, 164], "strike": [32, 75], "calculate_geometri": 32, "kinemat": [32, 48], "skip": [32, 130], "width": [32, 36, 49, 55, 63, 75, 77, 94, 101, 106, 115, 142, 150, 152], "rigid": [32, 127], "mu": [32, 127], "set_dynamic_slip": 32, "slip_at_dynamic_t": 32, "column_list": 32, "output_unit": 32, "adopt": [32, 104], "Not": [32, 55, 94, 125, 132], "noaa": [32, 42, 51, 57, 70, 75, 127, 143, 158, 162, 166], "sift": [32, 75, 127], "ucsb": [32, 75, 166], "definit": [32, 71, 88, 115, 122], "gov": [32, 42, 51, 70, 75, 99, 158], "aboutu": 32, "020204mag_polici": 32, "php": [32, 65, 86], "sift_slip": 32, "longitude_shift": 32, "subset": [32, 34, 42, 70, 127, 142, 162, 164, 166], "load_sift_unit_sourc": 32, "pmel": [32, 75], "pub": [32, 158], "gica2937": 32, "although": [32, 55, 67, 71, 100, 101, 103, 115, 128, 134, 164], "notat": [32, 51, 63, 140], "compress": [32, 97, 164], "info_sz": 32, "dat": [32, 158], "acsza1": 32, "acszb1": 32, "set_subfault": 32, "assign": [32, 34, 36, 88, 91, 97, 103], "coodin": 32, "pascal": [32, 158], "centerlin": 32, "respecitv": 32, "mix": [32, 41, 55, 75], "nctr": [32, 75], "upstrik": [32, 75], "updip": [32, 75], "calculate_geometry_triangl": 32, "triangular": [32, 48, 127], "lat": [32, 51, 55, 57, 63, 162, 164], "convert_to_standard_unit": 32, "measur": [32, 47, 49, 51, 75], "dynamic_slip": [32, 128], "rupture_tim": [32, 75], "rise_shap": 32, "gauss_pt": 32, "latitutd": 32, "modulu": [32, 102, 108, 150, 167], "shape": [32, 37, 42, 51, 63, 70, 89, 94, 97, 99, 106, 142, 164], "displac": [32, 36, 48, 49, 52, 75, 144, 151, 166], "1992": 32, "okadamap": 32, "rigin": 32, "dave": 32, "xiaom": 32, "wang": 32, "rewritten": 32, "dicuss": 32, "movement": 32, "sec": 32, "pw": [32, 34], "smooth": [32, 72, 104, 115, 167], "ruptur": [32, 48], "set_corn": 32, "projection_zon": 32, "iter": [32, 42, 70, 102], "1000000": 32, "x0": [32, 51], "orthogon": 32, "subdividedplanefault": 32, "base_subfault": 32, "nstrike": 32, "ndip": 32, "slip_funct": 32, "subdivid": [32, 75], "uniform": [32, 34, 36, 37, 48, 70, 75, 78, 89, 127, 162], "subdivis": 32, "slip_distribut": 32, "xi": [32, 167], "rescal": 32, "tensorproductfault": 32, "fault_plan": 32, "slip_along_strik": 32, "slip_down_dip": 32, "goe": [32, 48, 58], "constant": [32, 34, 36, 49, 52, 63, 68, 72, 99, 102, 140, 141, 142, 144, 151, 164, 167], "tensor": 32, "chen": [32, 166], "ji": [32, 166], "geol": 32, "edu": [32, 55, 97, 129], "faculti": 32, "big_earthquak": 32, "sea": [32, 47, 48, 50, 52, 55, 72, 75, 112, 123, 130, 143, 162, 164, 166], "floor": [32, 48, 75], "durat": [32, 132, 143], "slope": [32, 104, 132], "rf": [32, 58, 59], "bear": [32, 51, 118], "movabl": 32, "latlong": [32, 55], "happen": [33, 55, 66, 88, 103, 106, 130, 165], "filenam": [33, 55, 123, 135, 136, 164], "fgmax_tool": [34, 122, 130, 136, 151], "increment": [34, 47, 55, 94, 109, 148, 150, 152], "record": [34, 45, 47, 64, 106, 138, 158, 166], "observ": [34, 52, 119, 132, 143, 148, 151, 159, 166], "align": [34, 36, 42, 55, 63, 70, 130, 132, 151], "arbitrari": [34, 36, 63, 104, 119, 142, 151], "transect": [34, 51, 63, 118, 151], "coastlin": [34, 55, 70, 72, 130, 142, 151, 166], "quadrilater": [34, 63], "dem": [34, 48, 57, 63, 127, 162, 164, 166], "topo_typ": [34, 42, 49, 57, 63, 70, 123, 124, 127, 130, 162, 164], "point_styl": [34, 35, 70, 122], "fgmax_grid": [34, 35, 63, 130, 136, 151], "junction": 34, "purpos": [34, 36, 48, 52, 57, 65, 71, 77, 86, 94, 114, 116, 139, 142, 148], "maxima": [34, 76], "fgmax_data": [34, 151], "fgmaxgrid": [34, 35, 136, 151], "fgmax0001": 34, "fgno": [34, 35, 36, 37, 136], "sequenti": [34, 36], "fg_maxnum_fgrid": 34, "fgmax_modul": 34, "recomil": 34, "everyth": [34, 59, 62, 76, 99, 108, 109, 116, 127], "fg": 34, "tstart_max": 34, "tend_max": 34, "dt_check": 34, "min_level_check": 34, "arrival_tol": 34, "interp_method": 34, "npt": [34, 51], "xy_fil": 34, "regular": [34, 164], "cartesian": [34, 50, 63, 89, 151], "nx": [34, 36], "ny": [34, 36], "n12": 34, "n23": 34, "x3": [34, 63, 98], "y3": [34, 63, 98], "x4": [34, 63], "y4": [34, 63], "fourth": [34, 57], "perimet": 34, "intersect": [34, 49, 70, 75], "connect": [34, 49, 51, 58, 63, 70, 118, 130, 142], "expect": [34, 72, 102, 108, 109, 110, 116, 127, 128, 130, 132, 150, 151, 152, 158], "topofil": [34, 35, 49, 57, 63, 127, 128, 129, 130, 151, 162, 164], "south": [34, 49, 162], "preprocess": [34, 123], "satisfi": [34, 42, 70, 104, 115, 142, 170], "captur": [34, 47, 52, 64, 142, 162], "posit": [34, 42, 55, 75, 78, 109, 151, 162, 164], "digit": [34, 36, 42, 57, 63, 64, 82, 125, 126, 127, 164], "correspondingli": 34, "1e9": [34, 41, 64], "simul": [34, 38, 39, 40, 42, 50, 52, 55, 71, 72, 91, 94, 96, 98, 99, 101, 105, 108, 113, 125, 126, 127, 129, 142, 144, 158], "exce": [34, 55, 115, 149], "care": [34, 42, 48, 99], "start_max": 34, "natur": [34, 49, 58, 140, 170], "discard": [34, 104], "reiniti": [34, 125], "depress": 34, "margin": [34, 48], "fgmax_valu": 34, "eta_tild": 34, "speed": [34, 36, 37, 49, 88, 92, 102, 108, 118, 125, 130, 140, 141, 148, 151, 158, 159, 164, 167, 170], "harbor": 34, "ship": 34, "ground": [34, 75, 130], "fg_num_val": 34, "num_fgmax_v": [34, 151], "govern": [34, 151], "fgmax_interpol": 34, "fgmax_interpolate0": 34, "fgmax_interp": [34, 132], "unrealist": [34, 72], "island": [34, 42, 70, 142], "65": 34, "amr_levels_max": [34, 115, 149, 150], "8000": 34, "e10": 34, "stop": [34, 76, 82, 118, 119, 127, 150, 152, 164], "20": [34, 42, 53, 55, 57, 63, 70, 79, 82, 102, 115, 149, 150, 151, 162, 164], "const": 34, "fg1": 34, "valuemax": 34, "aux1": 34, "fgmax0002": 34, "explicitli": [34, 67, 71, 96, 132, 148, 165, 170], "dealt": [34, 42], "read_output": [34, 35, 136], "paragraph": 34, "qoi": [34, 37], "2n": 34, "hmin": 34, "13": [34, 47, 161], "99999000e": 34, "99": [34, 150, 152], "never": [34, 72, 101, 106, 112, 115, 130, 142, 148, 150, 152, 165], "met": [34, 65, 86], "make_input_fil": 34, "readm": [34, 36, 58, 59, 130, 140, 146, 167], "chile2010_fgmax": [34, 36, 135], "bound": [35, 37, 89, 92, 99, 136, 142, 148, 164], "interp_dz": 35, "dtopo_path": 35, "b0": [35, 37], "event": [35, 48, 52, 63, 65, 75, 86, 143, 144, 148], "ps4_to_arrai": 35, "mask": [35, 42, 48, 53, 142, 164], "topo_styl": 35, "xy_fnam": 35, "read_fgmax_grids_data": 35, "data_fil": [35, 37], "ij": [35, 136], "xy": [35, 63, 136], "layout": [35, 58, 136], "unexpect": [35, 51, 55, 63, 66, 158], "indent": [35, 51, 63], "quot": [35, 63], "unind": [35, 63, 158], "topotool": [35, 42, 48, 51, 57, 63, 70, 120, 121, 122, 123, 124, 127, 128, 133, 136, 162, 163], "write_to_fgmax_data": 35, "fid": [35, 37], "adjust_fgmax_1d": 35, "x1_desir": 35, "x2_desir": 35, "x1_domain": 35, "x1_new": 35, "x2_new": 35, "npoint": 35, "linspac": [35, 71, 91, 108, 142], "fgout_tool": [36, 151], "complement": 36, "coincid": 36, "wherea": [36, 47, 55, 72, 81, 99], "occur": [36, 66, 75, 158, 159], "signific": [36, 68, 135, 138, 143, 164], "increas": [36, 37, 47, 55, 63, 76, 142, 151], "degrad": 36, "had": [36, 47, 56, 57, 125, 126, 127, 128, 132, 144], "tempor": [36, 47, 64], "seri": [36, 47, 64, 72, 158], "fact": [36, 55, 72, 97, 106, 110, 115, 144], "gauag": 36, "massless": 36, "tracer": [36, 141], "debri": 36, "fixedgrid": [36, 48, 135, 137], "carri": 36, "throughout": [36, 72, 125], "fgout_data": [36, 151], "fgout_grid": [36, 37, 63, 151], "fgoutgrid": [36, 37, 151], "runtim": [36, 109], "binary32": [36, 47, 77, 97, 135, 148, 150, 152], "200": [36, 55, 88, 108, 123, 152], "250": 36, "115": 36, "55": 36, "tstart": [36, 104], "tend": [36, 42, 104], "nout": [36, 77, 152], "37": [36, 51], "ascii": [36, 47, 57, 71, 88, 91, 98, 103, 125, 135, 136, 139, 148, 150, 152, 162, 168], "binary64": [36, 47, 77, 97, 135, 148, 150, 152], "float64": [36, 135, 148], "kind": [36, 91, 93, 98, 118, 129, 135, 140, 148], "float32": [36, 135, 148], "dump": [36, 77, 97, 135, 136, 148], "raw": [36, 97, 135, 148], "almost": [36, 148, 154], "precis": [36, 37, 44, 47, 63, 77, 89, 94, 97, 140, 148, 164], "fgout0001": 36, "t0000": [36, 71], "q0000": [36, 71, 148], "b0000": 36, "amr_level": [36, 77], "hierarchi": [36, 55, 94, 111], "file_prefix": [36, 97, 103, 135], "easier": [36, 62, 81, 125, 127, 142, 167], "manipul": [36, 47, 164], "fgframe": 36, "read_fram": [36, 37], "lazi": 36, "hss": [36, 37], "plottool": [36, 42, 70, 130], "pcolorcel": [36, 42, 70, 130, 142], "minimalist": 36, "geoplot": [36, 53, 55, 83], "cmap": [36, 42, 55, 63, 70, 82, 142, 164], "land_color": 36, "masked_wher": 36, "eta_plot": 36, "tsunami_colormap": 36, "overlap": [36, 115, 119, 120, 162], "fgout_interp": 36, "fgout_modul": 36, "unphys": 36, "intepol": 36, "fgout_writ": 36, "fgoutfram": 37, "make_fgout_fcn_xi": 37, "make_fgout_fcn_xyt": 37, "write_netcdf": 37, "read_netcdf": [37, 42, 70, 127, 128, 162, 164], "reconstruct": [37, 96, 104, 158], "read_netcdf_arrai": 37, "extract": [37, 55, 97, 136, 158, 164, 166], "print_netcdf_info": 37, "drytol": 37, "extent_cent": 37, "extent": [37, 41, 42, 52, 60, 63, 68, 70, 71, 88, 94, 106, 119, 132, 142, 162, 164], "extent_edg": 37, "read_fgout_grids_data": 37, "set_plotdata": 37, "write_to_fgout_data": 37, "get_as_arrai": 37, "rootgrp": 37, "bounds_error": 37, "fill_valu": [37, 97, 164], "nan": [37, 51, 164], "behavior": [37, 48, 58, 72, 115, 116, 124, 130, 132, 154], "regulargridinterpol": 37, "fgout1": 37, "fgout2": 37, "method_xi": 37, "method_t": 37, "linearli": 37, "fname_nc": 37, "contin": 37, "bfinal": 37, "qoi_arrai": 37, "fgout_fram": 37, "nc": [37, 42, 70, 127, 158, 162], "datatyp": 37, "f4": 37, "include_b0": 37, "include_bfin": 37, "metadata": [37, 77, 162, 164], "f8": 37, "byte": [37, 47, 77, 97], "twice": [37, 55, 139, 148], "downstream": 37, "field": [37, 47, 63, 101, 103, 106, 125, 127, 135, 158, 159], "first_test": 38, "euler_2d": [38, 40, 96, 101], "shock_bubble_interact": [38, 40, 93, 96, 105], "iplot": [38, 40, 93, 96, 99], "That": [38, 40, 42, 108, 162], "ensur": [38, 39, 40, 71, 113], "install_prerequisit": 38, "acoustics_1d_example1": [38, 39, 74], "statement": [38, 39, 71, 77, 110, 111, 118, 125, 134, 150], "troubl": [38, 39, 81, 96], "xclaw": [38, 39, 91], "plotting_makeplot": [38, 39], "fortfil": [38, 39], "install_fortran": 39, "prerequisit": [39, 40, 48, 60, 62, 118], "sv": [39, 160], "runtest": [39, 99, 160], "acoustics_1d_heterogen": [39, 160, 167], "regression_test": [39, 160], "acoustics1dheterogeneoustest": [39, 160], "acoustics_3d_heterogen": [39, 160], "acoustics3dheterogeneoustest": [39, 160], "advection_2d_annulu": [39, 160], "advection2dannulustest": [39, 160], "ran": [39, 160], "639": [39, 160], "manual": [40, 89, 98, 105, 107, 116, 160], "launch": [40, 93, 99, 100, 105], "setup": [40, 59, 88, 89, 93, 96, 99, 101, 104, 105, 106, 114, 146, 165], "regiondata": [41, 115, 150, 151], "minlevel": [41, 115, 132, 142, 149, 150, 151], "maxlevel": [41, 71, 115, 132, 142, 149, 150, 151], "clariti": 41, "ultim": 41, "flagregiondata": [41, 130], "everywher": [41, 42, 51, 68, 106, 144], "supplement": [41, 70, 153], "rundatat": 41, "region_domain": 41, "spatial_region_typ": 41, "spatial_region": 41, "restrict": [41, 55, 127, 142, 151, 162], "insid": [41, 94, 99, 103, 140, 142, 164], "trapezoid": 41, "region_trapezoid": 41, "spatial_region_fil": 41, "ruledrectangle_trapezoid": 41, "region_tool": [41, 42, 70, 130, 131, 142], "rr": [41, 70, 71, 84, 142], "ruledrectangl": [41, 70, 130, 142], "piecewiselinear": 41, "ixi": [41, 70, 140, 142], "advection_2d_flagregion": 41, "constraint": [42, 47, 142, 149, 170], "dike": [42, 70, 130, 151], "creation": [42, 82, 96, 119], "even": [42, 52, 55, 62, 65, 75, 86, 97, 109, 115, 130, 149, 150, 162, 165, 167], "inlin": [42, 141], "marching_front": [42, 70, 130], "zmin": [42, 70], "60": [42, 55, 70, 75, 76, 130, 149], "zmax": [42, 70], "40": [42, 55, 70, 77, 115, 151, 161], "land_cmap": 42, "make_colormap": [42, 70, 82], "sea_cmap": 42, "norm": [42, 63, 70, 115, 164], "add_colormap": [42, 70, 124, 130], "data_limit": [42, 70], "data_break": [42, 70, 164], "sea_cmap_dri": 42, "cmap_dri": [42, 70], "norm_dri": [42, 70], "sw": [42, 57, 70, 141], "coast": [42, 70, 115, 144, 164], "whidbei": [42, 70, 142], "maxwelton": [42, 70], "beach": [42, 70, 141], "marchingfront": 42, "region1_png": [42, 70], "imread": [42, 70], "region1": [42, 70], "46": [42, 70, 164], "38": [42, 70], "47": [42, 70, 142], "93": [42, 70, 124], "96": [42, 70], "imshow": [42, 70, 118, 164], "48": [42, 55, 70, 142], "puget": [42, 70, 142], "sound": [42, 70, 88, 102, 108, 142], "ncei": [42, 70, 143, 162, 166], "thredd": [42, 70, 162, 166], "ngdc": [42, 70, 143], "dodsc": [42, 70], "puget_sound_13_mhw_2014": [42, 70], "colorbar": [42, 63, 70, 127, 130, 142, 147, 164], "mhw": [42, 48, 52, 143, 162, 166], "wetland": [42, 70], "lake": [42, 48, 70, 144, 151, 162], "repeat": [42, 70, 84, 139, 149, 151], "wet_point": [42, 70], "select_by_flood": [42, 70], "z1": [42, 70], "z2": [42, 70], "max_it": [42, 70], "zdry": [42, 70], "masked_arrai": [42, 70, 142], "279936": [42, 70], "112": [42, 70], "59775": [42, 70], "mislead": [42, 72], "pink": [42, 63, 82, 147], "distinguish": 42, "wet": [42, 48, 70, 72, 142, 151], "mask_dri": 42, "logical_not": [42, 70], "z_dry": 42, "mask_dry_onshor": 42, "logical_and": [42, 70], "z_allow_wet": 42, "rotat": [42, 49, 53, 136], "dry_point": 42, "shorelin": [42, 55, 164], "inland": [42, 70, 151], "sum": [42, 47, 75, 98, 106, 161], "3x3": 42, "dry_points_sum": 42, "reset": [42, 44, 58, 109], "white_r": 42, "461": 42, "379": 42, "929": 42, "961": 42, "z_format": [42, 70, 164], "1i": [42, 70], "fuction": 42, "set_xyz": [42, 164], "force_dry_init_topo": 42, "_y": [42, 70, 164], "_z": [42, 70, 164], "generate_2d_coordin": [42, 70, 164], "fname_force_dry_init": 42, "864": 42, "ncol": [42, 123], "324": 42, "nrow": 42, "224599074275750e": 42, "02": [42, 63, 97, 102, 150], "793009258334999e": 42, "259259000800000e": 42, "05": [42, 92, 102], "cellsiz": [42, 57, 123, 162], "9999": [42, 57, 162, 164], "nodata_valu": [42, 164], "forcedri": [42, 151], "force_dri": [42, 63, 130], "fname": [42, 63, 132, 142, 150, 151, 152], "qinit_data": [42, 144, 151], "force_dry_list": [42, 151], "setprob": [42, 67, 150, 152, 167], "qinit_modul": 42, "filval": 42, "t_stays_dri": 42, "gotten": 42, "offer": [43, 55, 116], "Or": [43, 63, 84, 142, 164], "dot": [43, 47, 55, 63, 66, 165], "unix": [43, 74], "invis": [43, 123], "encount": [43, 55, 82, 105, 107], "catch": [43, 96], "bash": [44, 55, 61, 62, 71, 76, 99, 111, 146], "export": [44, 55, 61, 62, 71, 76, 99, 107, 146], "f77": [44, 165], "compliant": 44, "yourself": [44, 47, 61], "rerun": [44, 47, 57, 59, 62], "scan": 44, "abil": [44, 118, 123, 125, 129, 158, 164], "meant": [44, 94, 104, 158], "pedant": 44, "fbound": 44, "ffpe": 44, "trap": 44, "invalid": [44, 103], "overflow": [44, 118, 126], "optim": [44, 86, 109], "o2": [44, 76], "fopenmp": [44, 76, 109], "dnetcdf": [44, 162], "lnetcdf": 44, "netcdf4_dir": 44, "ifort": 44, "cb": 44, "cu": 44, "fpe0": 44, "ftrapuv": 44, "fp": 44, "qopenmp": 44, "omp_num_thread": [44, 76, 125, 161], "thread": [44, 76, 115, 130, 161], "2006": [45, 151], "playlist": 45, "pressur": [47, 71, 84, 98, 102, 108, 126, 127, 151, 158, 159], "tide": [47, 48, 51, 127, 143, 164], "behav": [47, 49], "difficult": 47, "clearli": [47, 52, 55, 142], "accuraci": [47, 68, 78, 150, 152], "nonphys": 47, "oscil": [47, 170], "prior": [47, 64, 65, 86, 138, 144, 150, 152, 167], "gaugedata": [47, 64, 150], "gaugeno": [47, 64, 150], "meqn": [47, 77, 140, 167], "varieti": [47, 91], "basi": [47, 71], "file_format": [47, 97, 103, 135, 158], "smallest": [47, 115, 142], "reduct": [47, 118], "display_format": [47, 64], "e15": 47, "q_out_field": 47, "aux_out_field": 47, "min_time_incr": [47, 64], "amount": [47, 52, 58], "decreas": [47, 144, 162], "effect": [47, 55, 68, 71, 94, 98, 115, 116, 143, 151, 154, 164], "turn": [47, 50, 52, 63, 79, 82, 98, 116, 124, 130, 135], "id": [47, 51, 103], "e26": 47, "16": [47, 55, 63, 75, 94, 142, 148], "e8": 47, "multilay": [47, 120, 123, 126, 127, 128], "accumul": [47, 125, 139], "intermit": [47, 125], "max_buff": [47, 125], "gauges_modul": [47, 123, 125], "distinct": [47, 125], "gauge00001": [47, 64, 125], "quickli": [47, 58, 63, 90, 125, 144, 164], "overwritten": [47, 97, 98, 125, 139, 167], "gaugexxxxx": [47, 125, 139], "monoton": [47, 148, 151], "pars": [47, 109], "gaugesolut": 47, "gauge_id": 47, "getgaug": 47, "plotfigur": [47, 82, 118, 147], "300": [47, 142], "each_gaug": 47, "1d_plot": [47, 82, 84, 147], "setgaug": [47, 124], "each_fram": 47, "plotclaw": [47, 81, 82, 84, 147], "plotgaug": 47, "loop": [47, 71, 81, 109, 115, 118, 127, 130, 132, 140, 144, 147, 148, 167], "cleargaug": 47, "_output_from_previous_run": 47, "2d_pcolor": [47, 55], "addgaug": 47, "plot_gauge_loc": 47, "format_str": 47, "ko": 47, "add_label": 47, "overview": [48, 55, 81, 117, 121, 130], "teach": [48, 52, 114], "guarante": [48, 52, 104, 114], "liabil": [48, 52, 65, 86, 114], "underwat": [48, 55], "robust": [48, 127, 141, 164], "gallery_geoclaw": 48, "dtopotool": [48, 75, 121, 122, 124, 127, 128, 162, 163], "kmltool": [48, 51, 130, 131, 133, 163], "geo": [48, 68], "chile": [48, 63, 75], "2010": [48, 63, 75, 151], "dart": 48, "buoi": 48, "previous_pts_chosen": 48, "arcsecond": [48, 162], "force_dry_init": [48, 130], "topograpi": [48, 162], "wide": [49, 62, 111, 141], "insur": [49, 54, 58, 66, 84, 115, 119, 123, 149, 151, 162], "contrast": [49, 57, 142], "newli": 49, "roughli": [49, 56, 142, 161], "transit": [49, 136, 137], "sometim": [49, 62, 66, 70, 78, 82, 88, 98, 118, 127, 134, 143, 144, 151, 159, 166], "prefer": [49, 63, 99, 101, 146, 149, 158], "topo1d": 49, "1d_classic": [49, 118], "geo_data": [49, 64, 137, 151, 154], "rotation": 49, "geometr": [49, 154, 167], "spread": 49, "crater": 49, "endpoint": 49, "pole": 49, "ordinari": [49, 140], "Near": 49, "disturb": [49, 55], "decai": 49, "refocu": 49, "grid_data": 49, "grid_typ": 49, "te": 49, "nonuniform": [49, 71], "fname_celledg": 49, "nonuniform_grid_tool": 49, "make_mapc2p": 49, "deeper": [49, 142, 151, 162], "ocean_shelf_beach": 49, "topo_data": [49, 151], "topofile_path": 49, "dtopo_data": [49, 119, 151], "dtopofil": [49, 63, 75, 151], "dtopofile_path": 49, "mt": [49, 162], "okada_dtopo": 49, "dms2decim": 51, "decim": [51, 63], "dist_meters2latlong": 51, "dist_latlong2met": 51, "haversin": 51, "great": [51, 93, 118], "inv_haversin": 51, "invert": 51, "gctransect": [51, 118], "fetch_noaa_tide_data": 51, "predict": 51, "y0": 51, "bearing_unit": 51, "radian": 51, "beta": [51, 92, 104, 152], "sin": [51, 82], "longitudin": 51, "latitudin": 51, "coord": [51, 55], "negat": [51, 162], "30": [51, 55, 57, 115, 149, 151, 162], "51": 51, "span": [51, 55, 63], "station": [51, 143, 166], "begin_d": 51, "end_dat": 51, "time_zon": 51, "gmt": 51, "datum": [51, 52, 102, 143, 151, 166], "stnd": 51, "metric": 51, "cache_dir": 51, "begin": [51, 63, 94, 98, 102, 108, 141, 158], "op": 51, "api": [51, 127], "tidesandcurr": 51, "scratch": [51, 70, 108], "charact": 51, "datetim": [51, 158], "date_tim": 51, "ndarrai": [51, 92, 94, 102, 106, 158, 164], "water_level": 51, "preliminari": [51, 127, 166], "verifi": [51, 109, 116, 166], "rearth": 51, "6367500": 51, "pm": 51, "tohoku": 51, "crescent": 51, "citi": 51, "xtran": [51, 63], "ytran": [51, 63], "142": 51, "124": 51, "41": [51, 161], "74": [51, 55], "transect2kml": [51, 63], "kml": [51, 63, 123, 125, 126, 127, 130, 131, 142], "formula": [51, 68, 144], "stackexchang": 51, "1783746": 51, "rsphere": [51, 89], "believ": [52, 110, 125, 130], "real": [52, 59, 68, 109, 140, 166], "world": [52, 68, 96, 99, 158], "intend": [52, 89, 127], "approv": 52, "nhtmp": 52, "benchmark": 52, "nthmp": 52, "awar": [52, 99], "scenario": [52, 143], "invest": 52, "learn": [52, 93, 110], "geohazard": 52, "geoscientist": 52, "expert": 52, "cautiou": 52, "sensit": [52, 68], "confirm": 52, "imposs": [52, 148], "encapsul": 52, "knowledg": 52, "inaccuraci": 52, "uncertainti": [52, 68], "subduct": [52, 75], "zone": [52, 55, 63, 149, 150], "understood": 52, "turbul": [52, 104], "bore": 52, "inaccur": 52, "becom": [52, 107, 170], "agreement": 52, "caution": 52, "empir": [52, 68], "corioli": [52, 151, 156, 157], "littl": [52, 75, 97, 143], "coriolis_forc": [52, 151], "know": [52, 62, 66, 75, 86, 113, 126, 130, 132, 140, 143, 164, 165, 166], "upward": 52, "realiti": 52, "hard": [53, 58, 76, 82, 164], "disabl": [53, 97, 105, 151], "plain": 53, "mean_latitud": 53, "hash": [54, 58, 116], "print_git_statu": 54, "git_statu": 54, "power": [55, 60, 81], "georeferenc": 55, "simultan": [55, 125], "gi": [55, 125, 162], "critic": [55, 98, 140], "decis": 55, "nevertheless": 55, "lxml": 55, "pykml": 55, "conda": 55, "pyramid": 55, "geospati": 55, "abstract": 55, "osx": [55, 85], "macport": 55, "homebrew": [55, 85], "gdal_data": 55, "gc": 55, "cv": [55, 71], "epsg": 55, "wkt": 55, "georefer": 55, "warp": 55, "anaconda": [55, 105], "gdal_test": 55, "frame0005fig1": 55, "1440": 55, "1440p": 55, "1440l": 55, "frame0005fig1_tmp": 55, "vrt": 55, "band": [55, 164], "destin": 55, "100": [55, 75, 88, 91, 94, 103, 106, 108, 124, 127, 142, 152, 164], "receiv": [55, 116], "libgdal": 55, "dylib": 55, "liblzma": 55, "xz": 55, "setplot_fil": 55, "setplot_kml": 55, "chile_2010": 55, "slider": [55, 63], "panel": 55, "chile2010": [55, 114, 115, 119, 122, 128, 162], "kml_name": 55, "kml_starttim": 55, "utc": [55, 63], "kml_tz_offset": 55, "kml_index_fnam": 55, "_googleearth": 55, "kml_user_fil": 55, "santiago": 55, "kml_publish": 55, "kml_map_topo_to_latlong": 55, "sidebar": [55, 58], "kml_timezon": 55, "japan": [55, 63], "address": [55, 58, 125], "host": 55, "kml_xlimit": 55, "kml_ylimit": 55, "kml_use_figure_limit": 55, "member": [55, 101, 103, 108], "googleearth": [55, 63], "placemark": 55, "geograph": 55, "viewabl": [55, 91], "remain": [55, 62, 101, 109, 111, 119, 156, 157, 158], "use_for_kml": 55, "120": 55, "kml_use_for_initial_view": 55, "kml_figsiz": 55, "kml_dpi": [55, 63], "kml_tile_imag": 55, "longitude_min": 55, "longitude_max": 55, "latitude_min": 55, "latitude_max": 55, "camera": 55, "size_x_inch": 55, "size_y_inch": 55, "dpi": [55, 63], "pixel": [55, 63], "qualiti": [55, 131], "backend": 55, "furthermor": [55, 108], "pseudo": [55, 71], "height": [55, 102, 164], "transpar": [55, 63], "surface_or_depth": [55, 83], "cmin": [55, 63], "googleearth_transpar": 55, "kml_colorbar": 55, "cmax": [55, 63], "kml_build_colorbar": [55, 63], "alter": 55, "occupi": 55, "contourf": [55, 81], "googleearth_lightblu": 55, "googleearth_darkblu": 55, "appeal": 55, "overlaid": [55, 63], "ridg": 55, "lighter": 55, "darker": 55, "folder": 55, "hide": [55, 71], "unalt": 55, "map_topo_to_latlong": 55, "contan": 55, "referenc": [55, 138, 143, 162], "un": 55, "unzip": 55, "zipinfo": 55, "groundoverlai": 55, "edit": [55, 58, 59, 62, 84], "entri": [55, 64, 88, 98, 109, 158], "low": [55, 70, 89, 164, 166], "unapp": 55, "8x6": 55, "1600": [55, 77], "1200": 55, "notic": [55, 65, 86, 108, 116], "stripe": 55, "plaid": 55, "neither": [55, 63, 65, 86, 125], "evenli": [55, 98], "30x30": 55, "360x360": 55, "baselin": 55, "unaccept": 55, "sharper": [55, 63], "32768": 55, "accordingli": [55, 162], "subject": [55, 70, 115, 149, 151], "round": 55, "prevent": 55, "118": 55, "116": [55, 122], "18": [55, 102, 120, 121, 138], "rcl": 55, "1200x1680": 55, "overland": 55, "flood": [55, 70, 144], "topograph": 55, "longtitud": 55, "crucial": [55, 162], "assumpt": [55, 58], "48000": 55, "17540": 55, "map_cart_to_latlong": 55, "xc": [55, 108], "yc": 55, "topo_xlim": 55, "ge_xlim": 55, "111": [55, 125], "96132553": 55, "36256443": 55, "slope_x": 55, "xp": [55, 89], "topo_ylim": 55, "17500": 55, "ge_ylim": 55, "43": 55, "79453362": 55, "95123268": 55, "slope_i": 55, "yp": [55, 89], "teton": 55, "dam": [55, 144], "collabor": [55, 153], "weight": 55, "boisest": 55, "detect": [55, 66, 97, 105, 109, 165], "clawpack_gpu": 56, "cpp": 56, "cannot": [56, 62, 97, 132, 144, 158], "comparison": 56, "motlei": 56, "1029": 56, "2019ms001635": 56, "acceler": [56, 102], "arxiv": 56, "1808": 56, "02638": 56, "tree": [56, 62, 101, 146], "geo_gpu_pap": 56, "esri": [57, 162], "wikipedia": 57, "tell": [57, 77, 82, 88, 97, 111, 116], "llcorner": [57, 162, 164], "llcenter": [57, 162, 164], "xllcenter": [57, 127, 162], "yllcenter": [57, 127, 162], "nodatavalu": [57, 162], "3000": [57, 162], "4000": [57, 162], "xllcorner": [57, 162], "yllcorner": [57, 162], "smoothli": [57, 72], "our": [57, 67, 88, 113], "represent": [57, 94, 97, 103, 109, 164], "grid_registr": [57, 164], "crop": [57, 164], "coarsen": [57, 115, 127, 128, 149, 162, 164], "subsampl": [57, 162, 166], "coarsen_method": 57, "lon": [57, 162], "md": [58, 59, 127, 146], "intersphinx": 58, "documen": 58, "retir": 58, "conf": [58, 59], "mess": 58, "ff": [58, 63], "hasn": 58, "improperli": 58, "html_theme": 58, "_theme": 58, "flask_loc": 58, "_static": 58, "clawlogo": 58, "jpg": [58, 71], "logo": [58, 126], "clawicon": 58, "ico": 58, "icon": 58, "_templat": [58, 59], "literalinclud": 58, "setaux_default": 58, "rst": [58, 59, 130], "_build1": 58, "rebuilt": 58, "rebuild": 58, "multivers": 58, "sphinxcontrib": 58, "_build": 58, "smv_branch_whitelist": 58, "cp": [58, 59, 74], "fix_links_top_level": 58, "sphinx_web": 58, "decoupl": 58, "resid": [58, 66, 94], "remak": 58, "rsync": 58, "azv": 58, "extra_fil": 58, "cname": 58, "godaddi": 58, "verbatim": 58, "recurs": [58, 59, 74, 119], "rsync_clawpack": 58, "clawdev2013": 58, "redirect": 58, "an11": 58, "geoclawdev": 58, "clawdev": 58, "offici": [59, 85, 127], "subrepo": 59, "__init__": [59, 101, 111, 136], "1rc": 59, "rc": 59, "kentzo": 59, "prefix": [59, 91, 97, 98, 103], "gzip": [59, 97, 130], "draft": 59, "gz": [59, 61], "attach": [59, 97, 106], "upstream": 59, "repo": 59, "permiss": [59, 62, 65, 86], "trickeri": 59, "temp": 59, "mv": 59, "xf": 59, "python3": [59, 111, 126, 132, 137], "sdist": 59, "dist": 59, "xzf": [59, 61], "pkg": [59, 152], "cf": [59, 162], "upload": 59, "testpypi": 59, "twine": 59, "credenti": 59, "okai": 59, "pip3": 59, "uninstal": [59, 62, 111], "dir": [59, 99, 168], "820730": [59, 138], "changes_to_mast": 59, "release_5_x_x": 59, "5_x_x": 59, "installing_pip": 59, "installing_fortcod": 59, "docker_imag": 59, "ideal": [59, 102, 143], "sept": [59, 132], "regist": 60, "untar": 61, "pythonpath": [61, 62], "pypi": [62, 97], "think": [62, 68, 70, 72, 102], "clawpack_src": [62, 111], "egg": 62, "f2py": [62, 78, 89, 96, 101, 109, 140], "installing_opt": 62, "mechan": [62, 106, 138], "fc": [62, 89, 107, 109, 118, 165], "comfort": [62, 101], "claw_vers": 62, "wrong": [62, 67, 71, 98, 111], "pth": 62, "went": [62, 141], "overlai": [63, 133], "bgr": 63, "hex": [63, 82], "00ff00": 63, "yellow": [63, 82], "deg2dm": 63, "regions2kml": 63, "outlin": [63, 71, 84, 130, 140, 147], "box2kml": 63, "quad2kml": 63, "poly2kml": 63, "line2kml": 63, "gauges2kml": 63, "marker": 63, "topo2kml": 63, "dtopo2kml": 63, "fgmax2kml": [63, 130], "fgout2kml": 63, "make_input_data_kml": 63, "pcolorcells_for_kml": [63, 130], "pcolormesh": [63, 70], "png2kml": 63, "wrap": [63, 86, 89, 94, 104, 109, 158], "ge": 63, "topo2kmz": [63, 133], "kmz": [63, 125], "offshor": [63, 68, 70, 142, 144], "kml_header": 63, "kml_footer": 63, "kml_region": 63, "kml_gaug": 63, "kml_png": 63, "kml_cb": 63, "aabbggrr": 63, "dtopo_file_nam": 63, "8888ff": 63, "f2": 63, "num_digit": 63, "trail": 63, "NOT": [63, 65, 82, 86], "cb_filenam": 63, "close_fig": 63, "nrm": 63, "kml_timespan": 63, "event_tim": 63, "tz": 63, "tscale": 63, "timespan": 63, "27t06": 63, "00": [63, 77, 150], "03": [63, 102], "27t07": 63, "04": [63, 94, 102], "daylight": 63, "dst": 63, "timezon": 63, "magic": 63, "tabl": [63, 68, 81, 97], "wisdom": 63, "00ffff": 63, "png_filenam": 63, "dpc": 63, "max_inch": 63, "sharp": 63, "x_edg": [63, 142], "y_edg": [63, 142], "allot": 63, "smear": 63, "slowli": 63, "x_inch": 63, "y_inch": 63, "dcp": 63, "x_cell": 63, "y_cell": 63, "fig": [63, 142], "png_extent": 63, "savefig": [63, 135], "construc": 63, "png_file": 63, "png_name": 63, "radio_styl": 63, "cb_file": 63, "cb_name": 63, "cb_xfrac": 63, "cb_yfrac": 63, "radio": 63, "poli": 63, "max_vertices_in_descript": 63, "quad": 63, "region00": 63, "topo_file_nam": 63, "zlim": 63, "mask_outside_zlim": 63, "eas": [63, 136], "outsiz": 63, "pyplot": [63, 141, 164], "xg": 64, "yg": 64, "stationari": [64, 162], "huge": [64, 70, 144, 162], "frequenc": [64, 75, 104], "ug": 64, "vg": 64, "dt": [64, 89, 94, 98, 104, 118, 148, 150, 152, 162, 167], "euler": [64, 96, 104, 121, 123, 126, 128, 140, 167], "gtype": 64, "particle_tool": [64, 130], "opensourc": [65, 86], "copyright": [65, 86], "reserv": [65, 86], "redistribut": [65, 86], "permit": [65, 86], "retain": [65, 86, 97], "disclaim": [65, 86], "nor": [65, 86], "endors": [65, 86], "promot": [65, 86], "BY": [65, 86], "THE": [65, 86], "holder": [65, 86], "AND": [65, 86], "AS": [65, 86], "OR": [65, 86, 158], "impli": [65, 86, 151], "warranti": [65, 86], "BUT": [65, 86], "OF": [65, 86], "merchant": [65, 86], "fit": [65, 86], "FOR": [65, 86], "IN": [65, 86], "NO": [65, 86], "shall": [65, 86], "BE": [65, 82, 86], "liabl": [65, 86], "indirect": [65, 86], "incident": [65, 86], "exemplari": [65, 86], "consequenti": [65, 86], "procur": [65, 86], "substitut": [65, 86], "loss": [65, 86], "profit": [65, 86], "busi": [65, 86], "interrupt": [65, 86], "ON": [65, 82, 86], "strict": [65, 86], "tort": [65, 86], "neglig": [65, 76, 86, 151], "aris": [65, 86, 118], "IF": [65, 86, 151], "advis": [65, 86], "SUCH": [65, 86], "isn": [66, 76, 77, 165], "bomb": [66, 76], "abort": 66, "claw_outdir": [66, 82], "regener": 66, "safer": 66, "run1": 66, "suffix": [66, 164], "conlict": 66, "advection_1d_example1": 67, "classic_1d": 67, "exclud": 67, "exclude_modul": 67, "exclude_sourc": 67, "rp1_advect": 67, "lib": [67, 111], "common_sourc": 67, "bc1": [67, 109], "claw1ez": 67, "claw1": [67, 109], "copyq1": 67, "inlinelimit": 67, "opendatafil": 67, "out1": 67, "src1": [67, 157, 167, 170], "step1": 67, "wouldn": 67, "spite": [67, 70, 111], "bc1_inflow": 67, "matter": [67, 123], "_t": 68, "cdot": [68, 101, 142], "gamma": [68, 102], "frac": [68, 102, 108, 170], "gn": 68, "gravit": [68, 102, 151, 167], "rough": 68, "terrain": 68, "seab": 68, "025": [68, 151], "enhanc": [68, 86, 127], "threshold": 68, "friction_depth": [68, 151], "runup": 68, "discov": 68, "expon": 68, "arithmet": 68, "3333": 68, "d0": 68, "inadequaci": 68, "ztopo": 70, "pt_chosen": 70, "protect": [70, 130], "levi": [70, 130, 151], "unset": [70, 115], "geq0": 70, "force_dry_arrai": 70, "prev_pts_chosen": 70, "unchosen": 70, "converg": [70, 81], "pts_chosen": [70, 142], "touch": 70, "preserv": [70, 78, 104], "zmask": 70, "subtleti": 70, "ruledrectangle_covering_selected_point": [70, 142], "stretch": [70, 164], "farther": 70, "cmap_land": 70, "cmap_sea": 70, "cmap_topo": 70, "norm_topo": 70, "cmap_sea_dri": 70, "cultu": 70, "bai": [70, 143, 166], "183": 70, "89871": 70, "steep": [70, 170], "fist": 70, "1e6": 70, "arbitrarili": 70, "06": [70, 151], "84800": 70, "augment": [70, 141], "163": 70, "94297": 70, "pts_chosen_shallow": 70, "177": 70, "249577": 70, "zshallow": 70, "pts_chosen_nearshor": 70, "znearshor": 70, "compact": [70, 162], "fname_fgmax_mask": 70, "fgmax_pts_topostyl": 70, "topo_fgmax_mask": 70, "fewer": [70, 115, 164], "121": [70, 142], "pad": 70, "xv": [70, 142], "yv": [70, 142], "925": 70, "965": 70, "69788": 70, "76005": 70, "barrier": [70, 109], "mathwork": 71, "manifold": 71, "isosurfac": 71, "border": [71, 167], "cube": 71, "matlabpath": 71, "perman": [71, 118, 130, 131, 132, 133, 134, 135, 136, 137], "pathtool": 71, "q0001": 71, "t0001": 71, "enter": [71, 97, 99, 105], "plotclaw1": 71, "plotclaw2": 71, "plotclaw3": 71, "_": [71, 82, 101, 102, 113, 164, 170], "setplot2": 71, "ye": 71, "success": [71, 103, 164, 167], "0625": 71, "keyboard": 71, "redraw": [71, 84], "setplot1": 71, "setplot3": 71, "Such": 71, "rho": [71, 102, 108, 150], "rhou": 71, "rhov": 71, "outputdir": 71, "plottyp": 71, "mq": 71, "uservari": 71, "uservariablefil": 71, "temporarili": 71, "encourag": 71, "daspect": 71, "showpatchbord": 71, "showgridlin": 71, "gridlin": 71, "drawcontourlin": 71, "caxi": 71, "shg": 71, "fstr": 71, "framenam": 71, "frame0000": 71, "dpng": 71, "aftergrid": 71, "topic": 71, "clawgraph": 71, "t0002": 71, "doubl": [71, 89, 94, 109, 140, 149], "xxxx": 71, "unpredict": 71, "clash": 71, "strongli": [71, 110], "overridden": [71, 104, 106], "nearbi": [72, 143], "delta": [72, 92, 94, 101, 104, 140, 164, 167, 170], "polynomi": [72, 140], "a_0": 72, "a_1x": 72, "a_2i": 72, "a_3xi": 72, "greatest": [72, 115], "midpoint": [72, 94], "conclud": 72, "intact": [74, 124], "newdir": 74, "moreov": 75, "superposit": 75, "halfspac": 75, "rock": 75, "km": [75, 143], "shallowest": 75, "orient": [75, 89], "downward": 75, "counterclockwis": 75, "hang": 75, "foot": 75, "closer": [75, 150], "instati": [75, 164], "450": 75, "e3": 75, "104": 75, "668": 75, "826": 75, "chile_dtopo": 75, "tt3": [75, 164], "arcminut": [75, 162], "simplifi": [75, 81, 82, 97, 116, 126, 127, 167], "recangl": 75, "translat": 75, "homogen": [75, 104, 167, 170], "steadi": [75, 162], "rare": [75, 125], "flat": 75, "isotrop": 75, "justifi": 75, "poisson": 75, "triangl": 75, "multicor": [76, 125], "stack": [76, 85, 123, 142], "omp_stacks": 76, "16m": 76, "ulimit": 76, "unlimit": [76, 97], "mac": [76, 85, 107, 116, 146], "max1d": [76, 130, 149], "amr_modul": [76, 115, 123, 129, 130], "somewhat": [76, 81, 115, 116, 125, 148], "safe": 76, "output_styl": [77, 88, 91, 98, 135, 139, 148, 150, 152], "output_t0": [77, 136, 139, 148, 150, 152], "elif": [77, 150, 152], "output_tim": [77, 98, 139, 148, 150], "1800": 77, "7200": 77, "iout": [77, 152], "timestep": [77, 91, 98, 124, 126, 148, 150, 152, 158], "ntot": [77, 152], "output_step_interv": [77, 148, 150, 152], "total_step": [77, 148, 150, 152], "postprocess": [77, 98], "editor": 77, "valout": [77, 127, 130, 136, 161], "40000000e": 77, "ngrid": 77, "naux": 77, "nghost": 77, "preceed": [77, 167], "grid_numb": 77, "00000000e": 77, "xlow": 77, "ylow": 77, "25000000e": 77, "former": [77, 82, 167], "cut": [77, 149], "b0002": 77, "decompos": [77, 140, 170], "contigu": [77, 97, 106, 142], "output_aux_compon": [77, 148, 150, 152], "axxxx": [77, 97], "output_aux_onlyonc": [77, 148, 150, 152], "reli": [78, 89, 100, 110, 125], "weno": [78, 96, 104], "rk": [78, 104], "cake": 79, "belki": 79, "shoot": [81, 96], "favorit": 81, "hood": [81, 96], "task": 81, "phoni": 82, "plotexampl": 82, "acou": 82, "add_true_solut": 82, "qtrue": 82, "add_titl": 82, "4e": 82, "iplotclaw_": 82, "plotloop": [82, 84], "mid": 82, "stream": 82, "inherit": [82, 94, 104], "belong": [82, 94, 99, 103, 106], "getcwd": 82, "_output2": [82, 84], "plu": [82, 119, 150, 152, 164], "duplic": [82, 122, 136, 139], "wider": 82, "preced": 82, "pinkfig": 82, "acquir": 82, "get_cmap": 82, "fade": 82, "yellow_red_blu": 82, "ffff00": 82, "rgb": 82, "predefin": 82, "showcolor": 82, "call_setplot": 82, "inadvertantli": 82, "resetplot": [82, 84], "spot": 82, "exam": 82, "pd": [82, 84], "attributeerror": 82, "traceback": 82, "new_plotfgur": 82, "mi": 82, "spell": 82, "debugg": 82, "pdb": 82, "ipdb": 82, "plot_topo_fil": [83, 123], "replot": 84, "vi": [84, 91], "recomput": [84, 88, 120, 129], "my_setplot_fil": 84, "xcode": 85, "python2": [85, 132, 137], "brew": 85, "maco": 85, "scipysuperpack": 85, "pypa": 85, "en": 85, "upgrad": 85, "Their": 86, "appreci": 86, "surviv": 86, "alphabet": 86, "programmat": 86, "petclaw": [86, 99, 100, 101, 103, 109, 111, 116], "jed": 86, "brown": [86, 164], "ondrej": 86, "lisandro": 86, "dalcin": 86, "pyweno": [86, 104], "mainten": 86, "interleav": [86, 102], "kristof": 86, "unterweg": 86, "peanoclaw": 86, "chanc": 86, "reprint": 86, "inhabit": 88, "sigma": 88, "omega": 88, "meshgrid": [88, 101, 142, 164], "exp": [88, 98, 108], "cosin": 88, "imped": [88, 102, 108], "problem_data": [88, 102, 103, 106, 108, 141], "cparam": [88, 106], "set_cparam": [88, 106], "sol": 88, "readi": [88, 89, 91, 105], "clawsolver1d": [88, 91, 94, 104, 108, 140], "bc": [88, 95, 101, 108, 150, 152, 161], "pick": [88, 104], "rp": 88, "acoustics_1d": [88, 96, 102, 108], "decid": [88, 104], "my_rp_modul": 88, "my_acoustics_rp": 88, "tvd": [88, 94, 104, 170], "vanleer": [88, 104, 148, 150, 152], "evolve_to_tim": [88, 104], "keep_copi": [88, 91, 98], "behaviour": 88, "count": 88, "count_from_zero": 88, "write_aux_init": [88, 91], "write_aux_alwai": [88, 91, 98], "compute_p": [88, 91], "accept": [88, 98, 104, 148], "stress": [88, 98], "mp": [88, 98, 106], "clawdata2pyclaw": 89, "aid": 89, "therefor": [89, 99, 127, 162], "reutil": 89, "inde": [89, 99], "computation": [89, 104], "intens": 89, "shallow_spher": [89, 116, 141], "heavili": 89, "succesfulli": 89, "initialize_sourc": 89, "src2": [89, 136, 154, 157, 167], "distutil": [89, 137], "dummi": [89, 104, 167], "queri": [89, 94, 109], "namespac": 89, "docstr": [89, 93, 116], "zp": 89, "num_ghost": [89, 94, 97, 101, 102, 104, 106, 140, 148, 150, 152], "dxc": 89, "dyc": 89, "intent": [89, 140], "cf2py": 89, "multidimension": [89, 96], "fortran_src_wrapp": 89, "xlowerg": 89, "ylowerg": 89, "whith": 89, "hoc": 89, "step2": 89, "step2qcor": 89, "qcor": 89, "two_d_classic_sourc": 89, "flux2": 89, "philim": 89, "output_filenam": 89, "input_filenam": 89, "sagemathcloud": 90, "sagemath": 90, "termin": [90, 146, 148, 149], "my_solv": 91, "my_initial_solut": 91, "entireti": 91, "check_valid": 91, "tradit": [91, 97], "run_data": 91, "f_file_nam": [91, 98], "f_path": 91, "compute_f": [91, 98], "densiti": [91, 98, 102, 106, 108, 149, 150, 167], "file_prefix_p": 91, "prepend": 91, "nstepout": [91, 98], "out_tim": 91, "outdir_p": 91, "output_file_prefix": [91, 98], "_pyclaw_io": 91, "output_opt": 91, "runmak": 91, "xdir": 91, "xclawcmd": 91, "savecod": 91, "viewable_attribut": 91, "cygwin": 91, "xclawerr": 91, "xclawout": 91, "dtdx": 92, "act": [92, 164], "num_wav": [92, 102, 140, 148, 150, 152], "07": [92, 102, 161], "minmod": [92, 94, 104, 148, 150, 152], "minmod_limit": 92, "superbe": [92, 148, 150, 152], "superbee_limit": 92, "van": [92, 104, 148, 150, 152], "leer": [92, 104, 148, 150, 152], "mc": [92, 99, 148, 150, 152], "mc_limit": 92, "beam": 92, "warm": 92, "frommm": 92, "albada": 92, "klein": 92, "sharpen": 92, "van_leer_klein_sharpening_limit": 92, "roe": [92, 102, 132, 140], "scheme": [92, 102], "arora": 92, "arora_ro": 92, "theta": 92, "95": [92, 105], "safeti": 92, "theta_limit": 92, "ultrabe": 92, "cfl_superbe": 92, "cfl_superbee_theta": 92, "beta_limit": 92, "hyperbe": 92, "hyperbee_limit": 92, "superpow": 92, "superpower_limit": 92, "cada": 92, "torrilhon": 92, "cada_torrilhon_limit": 92, "cada_torrilhon_limiter_nonlinear": 92, "1st": [92, 104, 148, 150, 152, 167], "upper_bound_limit": 92, "friedemann": 92, "kemm": 92, "kemm_2009": 92, "08": [92, 94, 161], "depdend": 92, "6666666666666666": 92, "epsilon": 92, "caut": 92, "use_petsc": [93, 99], "solver_typ": [93, 104], "shouldn": 93, "htmlplot": 93, "acoustics_1d_homogen": [93, 116], "love": [93, 140], "nearli": 94, "arg": [94, 103], "patch_index": 94, "add_dimens": 94, "get_dim_attribut": 94, "attr": [94, 103], "lower_glob": 94, "num_cells_glob": 94, "upper_glob": 94, "node": [94, 127], "unmap": 94, "set_printopt": 94, "doctest": 94, "roundoff": 94, "c_center": 94, "p_node": 94, "grid1d": 94, "c_centers_with_ghost": 94, "lambda": [94, 164], "xarr": 94, "p_center": [94, 108], "49": [94, 164], "81": [94, 142, 151], "add_gaug": [94, 98], "gauge_coord": 94, "ind": 94, "c_nodes_with_ghost": 94, "mark_nod": 94, "mark_cent": 94, "setup_gauge_fil": 94, "_compute_c_cent": 94, "c_node": 94, "_compute_c_nod": 94, "gauge_dir_nam": 94, "gauge_file_nam": 94, "gauge_fil": 94, "_compute_p_cent": 94, "_compute_p_nod": 94, "on_lower_boundari": 94, "on_upper_boundari": 94, "995": 94, "101": [94, 161], "centers_with_ghost": 94, "ndarrari": 94, "nodes_with_ghost": 94, "geom": [94, 106], "clawsolver2d": [94, 104], "dimensional_split": [94, 123, 148, 150, 152], "strang": [94, 104, 148, 150, 152, 167], "enabl": [94, 97, 98, 105, 109, 125], "unsplit": [94, 148, 150, 152], "transverse_wav": [94, 148, 150, 152], "no_tran": 94, "trans_inc": 94, "trans_cor": 94, "mthlim": [94, 104], "famili": [94, 104, 150, 152], "enumer": [94, 104], "lax": [94, 104, 148, 150, 152, 170], "wendroff": [94, 104, 148, 150, 152, 170], "source_split": [94, 104, 148, 150, 152, 167], "fwave": [94, 102, 104, 140], "step_sourc": [94, 101, 104], "kernel_languag": [94, 104, 109, 116], "callabl": [96, 109], "precompil": 96, "massiv": 96, "biggest": 96, "supercomput": [96, 98, 99], "rung": [96, 104], "kutta": [96, 104], "intuit": 96, "guidelin": 96, "pyflak": 96, "pylint": 96, "coverag": [96, 116], "advection_1d": [96, 102], "burger": [96, 140, 167], "burgers_1d": [96, 102], "euler_exact_1d": [96, 102], "euler_hll_1d": [96, 102], "euler_hllc_1d": [96, 102], "euler_roe_1d": [96, 102], "shallow_exact_1d": [96, 102], "shallow_fwave_1d": [96, 102, 141], "shallow_hll_1d": [96, 102, 141], "shallow_roe_1d": [96, 102, 141], "2nd": [96, 101, 104, 148, 150, 152, 167], "leveque1997": 96, "32": [97, 99, 107, 149], "netcdf3": 97, "netcdf4": [97, 162, 164], "read_": [97, 103], "write_": 97, "write_aux": [97, 103], "thoroughli": 97, "read_aux": [97, 103], "txxxx": 97, "qxxxx": 97, "read_arrai": 97, "num_var": 97, "read_patch_head": 97, "read_t": 97, "nstate": 97, "write_p": [97, 103], "write_arrai": 97, "why": 97, "bxxxx": 97, "h5py": 97, "pytabl": 97, "moin": 97, "whichev": 97, "wrapper": [97, 164], "hdfgroup": 97, "obtain5": 97, "lzf": 97, "szip": 97, "dataset": [97, 162, 164, 166], "deflat": 97, "compression_opt": 97, "filter": [97, 164], "legal": 97, "ec": 97, "nn": 97, "chunk": 97, "guess": 97, "shuffl": 97, "fletcher32": 97, "pupyner": 97, "effort": 97, "unidata": 97, "ucar": 97, "17": [97, 125, 126, 138, 167], "netcdf3_class": 97, "netcdf3_64bit": 97, "netcdf4_class": 97, "clobber": [97, 124], "zlib": 97, "complevel": 97, "fastest": [97, 105], "poorest": 97, "slowest": 97, "checksum": 97, "trigger": 97, "chunksiz": 97, "hdf": 97, "least_significant_digit": 97, "quantiz": 97, "lossi": 97, "significantli": [97, 127], "endian": 97, "big": 97, "nativ": 97, "gain": 97, "ness": 97, "_fillvalu": 97, "silent": 97, "customari": 98, "_outdir": 98, "hdf5": 98, "write_aux_int": 98, "energi": [98, 102], "trace": 98, "p_function": 98, "absolut": [98, 115, 116, 127, 149, 150], "mf": [98, 106], "elementwis": 98, "total_energi": 98, "tidal": [98, 143], "whenc": 98, "compute_gauge_valu": 98, "sent": [98, 106], "logger": [98, 106], "interac": 98, "silenc": 98, "gone": 98, "reject": [98, 104, 148], "problemat": 98, "shaheen": 98, "getlogg": 98, "setlevel": 98, "desktop": 99, "mainli": 99, "mpirun": [99, 105, 116], "ll": [99, 108], "toolkit": [99, 168], "petsc4pi": [99, 105, 106, 116], "mercuri": 99, "anl": 99, "hg": 99, "bitbucket": 99, "buildsystem": 99, "config": 99, "zsh": 99, "architectur": 99, "csh": 99, "tcsh": 99, "setenv": 99, "cc": [99, 102, 108], "gcc": [99, 105], "cxx": 99, "mpich": 99, "phase": [99, 110, 124, 130, 149], "googlecod": 99, "iinstal": 99, "cython": 99, "demo": 99, "petsc_hello_world": 99, "hello": 99, "easy_instal": 99, "serial": [99, 103, 109, 161], "certainli": 99, "importantli": 99, "ng": 99, "lowerg": 99, "addition": [99, 158], "excerpt": 99, "320": 99, "partit": 99, "html_plot": 100, "interactive_plot": [100, 108], "3rd": [101, 104, 141], "user_bc_low": 101, "custom_bc": 101, "dim": [101, 102, 104], "qbc": [101, 104, 106], "xrang": 101, "aux_bc_low": 101, "aux_bc_upp": 101, "auxbc": [101, 104, 106], "damiansra": 101, "empyclaw": 101, "maxwell_1d_homogen": 101, "mail": [101, 107], "worthwhil": 101, "impati": 101, "reaction": 101, "diffus": 101, "psi": [101, 167, 170], "dq_src": [101, 104], "shockbubbl": 101, "rp_sourc": 101, "rp_": 102, "q_l": [102, 140, 141], "q_r": [102, 140, 141], "aux_l": [102, 140], "aux_r": [102, 140], "oft": 102, "he": 102, "miscellan": 102, "amdq": [102, 140], "fluctuat": [102, 104, 170], "apdq": [102, 140], "ith": 102, "leveque_book_2002": 102, "matrix": 102, "acoustics_1d_pi": 102, "zz": [102, 108], "advection_1d_pi": 102, "u_t": [102, 108], "burgers_1d_pi": 102, "efix": [102, 141], "entropi": [102, 141], "euler_1d_pi": 102, "exact": 102, "hll": 102, "w_1": 102, "q_hat": 102, "s_1": [102, 142], "u_l": [102, 141], "c_l": 102, "lambda_roe_1": 102, "lambda_roe_2": 102, "w_2": 102, "s_2": [102, 142], "u_r": [102, 141], "c_r": 102, "heat": 102, "gamma1": 102, "hllc": 102, "q_hat_l": 102, "q_hat_r": 102, "s_m": 102, "w_3": 102, "s_3": 102, "p_r": 102, "p_l": 102, "rho_l": 102, "s_l": 102, "rho_r": 102, "s_r": 102, "e_l": 102, "e_r": 102, "aug_glob": 102, "26": [102, 135, 136, 138], "calucl": 102, "newton": 102, "shallow_1d_pi": [102, 141], "wari": 102, "grav": [102, 141], "dry_toler": 102, "ubar": 102, "h_l": [102, 141], "h_r": [102, 141], "cbar": [102, 164], "a1": 102, "delta_hu": 102, "delta_h": 102, "a2": 102, "karg": 103, "reachabl": 103, "truli": 103, "capa": 103, "is_valid": [103, 106], "ioerror": 103, "unsuccess": 103, "signitur": 103, "set_all_st": 103, "Will": 103, "start_fram": 103, "acoustics_2d": 104, "sharpclawsolver2d": 104, "expens": [104, 115, 120, 125], "galerkin": 104, "instantan": 104, "bubbl": 104, "clawsolv": [104, 140], "sharpclawsolv": 104, "superclass": 104, "t_end": 104, "sharpclawsolver1d": 104, "riemann_solv": 104, "claw_packag": 104, "sharpclawnd": 104, "semi": 104, "discret": 104, "dq": [104, 162], "ought": 104, "molsolv": 104, "lim_typ": 104, "weno_ord": 104, "17th": 104, "time_integr": 104, "ssp33": 104, "strong": [104, 110], "shu": 104, "osher": 104, "ssp104": 104, "4th": 104, "ssplmm32": 104, "multistep": 104, "ssplmm43": 104, "ssprk22": 104, "butcher": 104, "lmm": 104, "char_decomp": 104, "characterist": 104, "transmiss": 104, "tfluct_solv": 104, "tfluct": 104, "default_tfluct": 104, "aux_time_dep": 104, "cfl_desir": [104, 148, 150, 152], "cfl_max": [104, 148, 150, 152], "call_before_step_each_stag": 104, "before_step": 104, "stage": [104, 143, 144, 162, 164], "accept_reject_step": 104, "check_3rd_ord_cond": 104, "step_index": 104, "dtfe": 104, "ssplmm": 104, "posteriori": 104, "violat": [104, 164], "muct": 104, "dqdt": 104, "get_dt_new": 104, "take_one_step": 104, "update_saved_valu": 104, "check_lmm_cond": 104, "0001": 104, "max_step": 104, "500": [104, 149, 152], "get_dt": 104, "succeed": 104, "step_hyperbol": 104, "my_custom_bc": 104, "soon": 104, "bc_arrai": 104, "difficulti": [105, 107, 111], "modern": [105, 118, 127, 140], "gnu": 105, "ibm": 105, "xlf": 105, "wiki": 105, "gfortranbinari": 105, "ce": 105, "enthought": [105, 107], "canopi": 105, "live": 106, "constructor": 106, "get_aux_glob": 106, "get_auxbc_from_aux": 106, "get_q_glob": 106, "get_qbc_from_q": 106, "set_aux_from_auxbc": 106, "fortran_modul": 106, "seem": [106, 111, 130, 147, 154], "fragil": 106, "interdepend": 106, "set_num_ghost": 106, "set_q_from_qbc": 106, "gauge_data": 106, "keep_gaug": 106, "hack": 106, "stencil_width": 106, "da": 106, "stencil": 106, "worth": 106, "temporari": 106, "processor": 106, "fset": 106, "consult": 107, "g77": 107, "undefin": 107, "bash_profil": [107, 146], "academ": 107, "epd": 107, "ordinarili": 107, "kappa": [108, 170], "eqnarrai": 108, "p_t": 108, "u_x": 108, "p_x": 108, "tipe": 108, "haven": [108, 110], "deepli": 108, "acquaint": 108, "framecount": 109, "counter": [109, 164], "get_count": 109, "reset_count": 109, "set_count": 109, "new_frame_num": 109, "verifyerror": 109, "add_parent_doc": 109, "check_diff": [109, 116], "abstol": 109, "reltol": 109, "compile_librari": 109, "source_list": 109, "module_nam": 109, "interface_funct": 109, "local_path": 109, "library_path": 109, "f2py_flag": 109, "ioexcept": 109, "f95": 109, "lgomp": 109, "o3": 109, "funrol": 109, "finlin": 109, "fdefault": 109, "construct_function_handl": 109, "function_nam": 109, "func": [109, 158], "convert_fort_double_to_float": 109, "0d0": 109, "gen_vari": [109, 116], "disable_petsc": 109, "runnabl": 109, "kernel": 109, "against": [109, 116, 124, 160], "test_app": [109, 116], "unrecogn": 109, "read_data_lin": 109, "inputfil": [109, 164], "num_entri": 109, "data_typ": 109, "run_app_from_main": 109, "run_seri": 109, "fun": 109, "decor": 109, "comm_world": 109, "check_valu": [109, 116], "januari": [110, 117, 125, 138], "ceas": 110, "python3stat": 110, "howto": 110, "pyport": 110, "bewar": [111, 164], "__file__": 111, "subpackag": 111, "_subpackag": 111, "forestclaw": [111, 123], "getusersitepackag": 111, "getsitepackag": 111, "bad": [111, 116], "harm": 111, "drawback": 111, "cmdline": 111, "echo": 111, "perturb": [112, 151, 162], "workshop": [113, 130], "ik": 113, "basin": 113, "distant": [113, 115], "parameter": [113, 127, 142, 151, 158, 159], "_surge_modul": 113, "workflow": [113, 153, 158], "concentr": 113, "hurrican": [113, 158], "katrina": 113, "directorti": 113, "orlean": 113, "atcf": [113, 127, 158, 159], "chile2010b": 114, "topotools_exampl": [114, 164], "regrid_interv": [115, 149, 150], "surround": [115, 164], "escap": [115, 150], "regrid_buffer_width": [115, 149, 150], "tradeoff": 115, "clustering_cutoff": [115, 149, 150], "amrnez": 115, "undivid": 115, "q_": [115, 140, 170], "divid": [115, 148], "exceed": [115, 127], "largest": [115, 143], "suppli": [115, 158, 167, 170], "constrain": 115, "forbidden": 115, "amrflag": 115, "doflag": 115, "dontflag": 115, "adjoint_flag": 115, "tolsp": 115, "errest": 115, "anywher": 115, "wave_toler": [115, 151], "perfom": 116, "yml": 116, "_output_old": 116, "_output_new": 116, "xxdiff": 116, "opendiff": 116, "_plots_old": 116, "_plots_new": 116, "discoveri": 116, "supplementari": 116, "prime": 116, "stdout": 116, "spawn": 116, "occasion": [116, 125], "failur": [116, 128, 144], "acoustics_3d_vari": 116, "combinatori": 116, "test_acoust": 116, "comprehens": 116, "test_shallow_spher": 116, "meson": [118, 137], "sphere_sourc": [118, 136, 137, 154], "checkpt_styl": [118, 124, 139, 148, 150], "granular": 118, "clawpack_tan": 118, "imshow_norm": 118, "imshow_alpha": 118, "facet": 118, "mpeg": 118, "movi": 118, "ffmpeg": 118, "mp4_movi": 118, "movie_fign": 118, "mp4": 118, "jsanim": [118, 119, 123, 135], "gif": 118, "movie_name_prefix": 118, "chile2010_": 118, "movie_": 118, "chile2010_fign": 118, "kill": 118, "enddo": [118, 167], "storag": [118, 124, 132], "topo_modul": 118, "ntogo": 118, "di": [118, 119], "cleanup": [118, 126], "ipython_displai": 119, "underflow": 119, "nest": [119, 125, 149, 150], "refactor": [119, 120, 121, 123, 125, 126, 128, 132], "geolib": [119, 123], "dtopo_modul": 119, "movetopo": 119, "cellgridintegr": 119, "topo_upd": 119, "cellgridintegrate2": 119, "dt_max_dtopo": [119, 151], "dt_initi": [119, 148, 150, 151, 152], "juli": [120, 121, 138], "nohup": 120, "recalcul": 120, "unnecessarili": 120, "clamshel": 120, "test_topotool": [120, 164], "octob": [121, 122, 123, 129, 130, 133, 134, 136, 137, 138], "dtdx1d": 121, "dtdy1d": 121, "jsanimation_frametool": 121, "rpn2_vc_advect": 121, "dtdtopo": 122, "refinementdata": 122, "ticklabel": 122, "114": 122, "didn": 122, "glitch": 122, "nbtool": 123, "formerli": 123, "makefile_kml": 123, "extran": 123, "compare_gaug": 123, "topoplotdata": 123, "favor": [123, 127, 137, 149, 164], "riemann_tool": [123, 141], "amrlib": 123, "dumpgaug": 123, "stepgrid_dimsplit": 123, "step2x": 123, "step2i": 123, "flux2_dimsplit": 123, "step3x": 123, "step3i": 123, "step3z": 123, "flux3_dimsplit": 123, "advection_3d_swirl": [123, 161], "advection_2d_inflow": 123, "allocat": 123, "igetsp": 123, "holland_storm_modul": 123, "stommel_storm_modul": 123, "constant_storm_modul": 123, "storm_modul": 123, "friction_modul": 123, "geoclaw_modul": 123, "consolid": 123, "amr_data_show": 124, "datadir": 124, "riemann_interact": 124, "nbviewer": 124, "maojr": 124, "ipynotebook": 124, "blob": [124, 141], "interactive_test": 124, "unstabl": 124, "guard": 124, "crash": [124, 148, 149], "chk00100": 124, "tck00100": 124, "chkaaaaa": 124, "tckaaaaa": 124, "chkbbbbb": 124, "tckbbbbb": 124, "tck": 124, "chk": 124, "flush": 124, "lose": 124, "unneed": 124, "spend": 124, "inconsist": 124, "__future__": 125, "absolute_import": 125, "print_funct": 125, "capabilit": 125, "num_proc": 125, "coupl": [125, 170], "instabl": [125, 132], "transon": 125, "insidi": 125, "enlarg": 125, "june": [126, 127, 128, 129, 138], "woodward": 126, "collela": 126, "blast": 126, "219": 126, "legend_tool": 126, "legend": [126, 142], "riemann_aug_jcp": 126, "geoclaw_riemann_util": 126, "challeng": 126, "timer": 126, "gradient": [126, 170], "xllower": 127, "yllower": 127, "capabili": 127, "landfal": 127, "highli": [127, 144], "code_of_conduct": 127, "conduct": 127, "plot_timing_stat": [127, 129], "226": 127, "cumul": 127, "maxgr": 127, "rnode": 127, "listofgrid": 127, "10000": [127, 164], "resiz": 127, "10k": 127, "bndlist": 127, "amr_2d": [127, 128], "nodal": 127, "owner": 127, "lookup": 127, "rearrang": 127, "303": 127, "capabilti": 127, "hurdat": [127, 158, 159], "jma": [127, 158, 159], "ibtrac": [127, 158], "tcvital": [127, 158, 159], "wind": [127, 151, 158, 159, 164], "holland": [127, 151, 159], "1980": [127, 151, 159], "stub": 127, "establis": 127, "hwrf": [127, 151, 159], "mimic": 127, "test_etopo1": [127, 162], "etopotool": [127, 162], "etopo1": [127, 142, 143, 162, 164, 166], "gave": 127, "incorrect": [127, 128, 144, 158], "308": 127, "287": 127, "hlle": 128, "adjoint_modul": 128, "amr_1d": 128, "adjointsup_modul": 128, "robustli": 128, "maketopo": [128, 162], "typo": 128, "subprocess": 129, "staff": 129, "timing_plot": 129, "mhd": 129, "faster": [129, 130, 132, 164], "clearer": [129, 132, 133], "topo_miss": 129, "bowl": 129, "slosh": 129, "3764278": [130, 138], "among": 130, "bzip2": 130, "unpack": 130, "get_remote_fil": [130, 164], "notebook_html": 130, "nbconvert": 130, "animation_tool": [130, 131], "ride": 130, "skip_patches_outside_xylimit": [130, 132], "ruled_rectangl": 130, "lagrangian_gaug": 130, "million": 130, "set_eta_init": [130, 144], "subsid": [130, 144, 151], "uplift": [130, 144, 151], "septemb": [131, 138], "weren": 131, "verbosity_regrid": [131, 149, 150], "2021": [132, 133, 134, 135, 138], "4503024": [132, 138], "memsiz": [132, 149], "implicitli": [132, 151], "rpt2_geoclaw": [132, 141], "unnecessari": 132, "prepc": 132, "thought": [132, 143], "advertis": 132, "topotyp": [132, 151, 162], "5595424": [133, 138], "rp1_shallow_hl": 133, "geotiff": 133, "decemb": [134, 135, 138], "5781749": [134, 138], "segment": [134, 142], "2022": [135, 136, 138], "7026045": [135, 138], "trucat": 135, "svg": 135, "pcolor_kwarg": 135, "286": 135, "to_jshtml": 135, "8400237": [136, 138], "claw_python": 136, "pytest": 136, "add_attribut": 136, "cmd": 136, "fgmax_fin": 136, "fgmaxdata": 136, "compabl": 136, "xxx": [137, 162], "redon": 137, "fixed_grid_data": 137, "tba": 138, "10076317": 138, "3528429": 138, "3237295": 138, "1405834": 138, "262111": 138, "50982": 138, "tchknnnnn": 139, "chknnnnn": [139, 148, 150, 152], "nnnnn": [139, 148], "containt": 139, "restart_fil": [139, 148, 150, 152], "commenc": 139, "undesir": 139, "fashion": 139, "traffic": [140, 167], "rp1": [140, 170], "maxm": 140, "ql": 140, "qr": 140, "auxl": 140, "auxr": 140, "mwave": 140, "q_i": [140, 170], "x_": [140, 170], "ell": 140, "cal": [140, 167, 170], "p_": [140, 170], "_ptwise": 140, "rp1_ptwise": 140, "rpn2_ptwise": 140, "rpt2_ptwise": 140, "har": 140, "x_i": [140, 167, 170], "jacobian": [140, 170], "use_fwav": [140, 148, 150, 152], "my_riemann_solv": 140, "solver_nam": 140, "sole": 140, "bmatrix": 141, "graviti": [141, 151], "rp1_shallow_roe_with_efix": 141, "shallow_roe_with_efix_1d": 141, "shallow_1d": 141, "dam_break": 141, "passiv": 141, "rp1_shallow_roe_trac": 141, "shallow_roe_tracer_1d": 141, "shallow_trac": 141, "rp1_shallow_bathymetry_fwav": 141, "shallow_bathymetry_fwave_1d": 141, "sill": 141, "rpn2_shallow_roe_with_efix": 141, "rpt2_shallow_roe_with_efix": 141, "shallow_roe_with_efix_2d": 141, "shallow_2d": 141, "radial_dam_break": 141, "rpn2_shallow_bathymetry_fwav": 141, "shallow_bathymetry_fwave_2d": 141, "rpn2_shallow_spher": 141, "rpt2_shallow_spher": 141, "shallow_sphere_2d": 141, "rossby_wav": 141, "costli": 141, "rpn2_geoclaw": 141, "sw_aug_2d": 141, "rpn2_sw_aug": 141, "reval": 141, "riemann_solut": 141, "plot_phas": 141, "inclus": 142, "union": [142, 162], "y_": 142, "scriptstyl": 142, "x_c": 142, "y_c": 142, "ldot": 142, "unequ": 142, "vstack": 142, "31": 142, "zm": 142, "rrzigzag": 142, "rr2": 142, "readlin": 142, "strip": [142, 164], "nrule": 142, "000000000": 142, "admiralti": 142, "inlet": 142, "kitsap": 142, "peninsula": 142, "strait": 142, "juan": 142, "fuca": 142, "ruledrectangle_admiraltyinlet": 142, "400": 142, "851": 142, "529": 142, "036": 142, "578": 142, "577": 142, "187": 142, "623": 142, "191": 142, "684": 142, "221": 142, "755": 142, "rr_admiralti": 142, "rr_name": 142, "compactli": 142, "enforc": 142, "x_center": 142, "y_center": 142, "logical_or": 142, "edgecolor": 142, "dark": 142, "loc": [142, 164], "129": 142, "degener": 142, "vancouv": 142, "shoal": 142, "inundataion": [143, 166], "relief": [143, 166], "msl": [143, 166], "hilo": [143, 166], "feet": [143, 166], "arc": 143, "presum": 143, "vastli": 143, "fall": [143, 151], "mhhw": 143, "astronom": 143, "aht": 143, "worst": 143, "spacial": 144, "variable_eta_init": [144, 151], "nearfield": 144, "steepli": 144, "siesmic": 144, "eta_init": 144, "ever": [147, 151], "ff9999": 147, "claw_pkg": [148, 149, 150, 151, 152], "analog": [148, 149], "capa_index": [148, 150, 152], "dt_variabl": [148, 150, 152], "output_q_compon": [148, 150, 152], "unsur": 148, "lenght": 148, "dt_max": [148, 150, 152], "stiff": 148, "retak": [148, 150, 152], "contamin": 148, "500000": 148, "steps_max": [148, 150, 152], "infinit": 148, "donor": [148, 150, 152], "upwind": 148, "transmit": 148, "transport": [148, 150, 152], "tranpsort": 148, "central": [148, 158, 159], "decomposit": 148, "srcn": [148, 167], "hyperol": 148, "src_split": [148, 150, 152], "thn": 148, "harder": 148, "checkpt_tim": [148, 150], "checkpt_interv": [148, 150], "refinement_ratios_x": [149, 150], "refinement_ratios_t": [149, 150, 151], "variable_dt_refinement_ratio": [149, 151], "xleft": [149, 150], "yleft": [149, 150], "travel": 149, "pt": [149, 150], "forbiddn": 149, "omp": 149, "spent": [149, 161], "1048575": 149, "4194303": 149, "8388607": 149, "dprint": [149, 150], "eprint": [149, 150], "edebug": [149, 150], "gprint": [149, 150], "bisect": [149, 150], "nprint": [149, 150], "pprint": [149, 150], "rprint": [149, 150], "sprint": [149, 150], "tprint": [149, 150], "uprint": [149, 150], "upbnd": [149, 150], "acoustics_2d_radi": [150, 167], "assert": [150, 152], "probdata": [150, 152], "new_userdata": [150, 152], "add_param": [150, 152], "medium": [150, 167], "000000e": 150, "000000": 150, "chk00006": [150, 152], "ntime": 150, "step_interv": 150, "00000e": 150, "900000": 150, "50000": 150, "amr_level_max": 150, "auxtyp": 150, "001000e": 150, "alg": 150, "toggl": 150, "err": 150, "est": 150, "proj": 150, "__name__": [150, 152], "__main__": [150, 152], "argv": [150, 152], "setrun_setgeo": 151, "refinement_data": 151, "speed_toler": 151, "earth_radiu": 151, "6367": 151, "5e3": 151, "friction_forc": 151, "manning_coeffici": 151, "delin": 151, "manning_break": 151, "file1info": 151, "file2info": 151, "dtopotyp": [151, 162], "qinit_typ": [151, 162], "qinitfil": 151, "qinitdata": 151, "coseism": 151, "surge_data": 151, "wind_forc": 151, "drag": 151, "drag_law": 151, "deterimin": [151, 164], "garret": 151, "powel": 151, "pressure_forc": 151, "wind_index": 151, "pressure_index": 151, "display_landfall_tim": 151, "wind_refin": 151, "r_refin": 151, "storm_specification_typ": 151, "chava": 151, "lin": 151, "emmanuel": 151, "storm_fil": [151, 158], "storm_specif": 151, "classic4": 152, "tout": 152, "javascript": 153, "publicli": 153, "develp": 154, "tropic": 154, "polar": 154, "variat": 154, "circumst": 154, "src1d": 157, "src3": [157, 167], "ensembl": 158, "my_storm": 158, "my_geoclaw_storm": 158, "imd": [158, 159], "nodataerror": 158, "nhc": 158, "japanes": 158, "meterolog": 158, "indian": 158, "meteorlog": 158, "datetiem": 158, "time_offset": 158, "eye_loc": 158, "ey": [158, 159], "decimc": 158, "max_wind_spe": 158, "max_wind_radiu": 158, "central_pressur": 158, "storm_radiu": 158, "iso": 158, "wind_spe": 158, "34kt": 158, "50kt": 158, "64kt": 158, "radii": 158, "categori": 158, "categor": 158, "cat_nam": 158, "car_nam": 158, "read_atcf": 158, "read_geoclaw": 158, "human": 158, "readabl": [158, 159], "read_hurdat": 158, "aoml": 158, "hrd": 158, "data_storm": 158, "single_storm": 158, "risen": 158, "read_ibtrac": 158, "sid": 158, "storm_nam": 158, "start_dat": 158, "agency_pref": 158, "wmo": 158, "usa": 158, "tokyo": 158, "newdelhi": 158, "reunion": 158, "bom": 158, "nadi": 158, "wellington": 158, "cma": 158, "hko": 158, "ds824": 158, "td9636": 158, "td9635": 158, "neumann": 158, "mlc": 158, "v4": 158, "unnam": 158, "wmo_": 158, "wmo_ag": 158, "usa_ag": 158, "closest": 158, "read_imd": 158, "read_jma": 158, "jp": 158, "eng": 158, "rsmc": 158, "hp": 158, "eg": 158, "besttrack": 158, "e_format_bst": 158, "read_tcvit": 158, "write_atcf": 158, "write_geoclaw": 158, "max_wind_radius_fil": 158, "storm_radius_fil": 158, "forecast": 158, "redund": 158, "write_hurdat": 158, "write_imd": 158, "write_jma": 158, "write_tcvit": 158, "available_format": 158, "available_model": 158, "fill_rad_w_other_sourc": 158, "storm_targ": 158, "interp_kwarg": 158, "tri": 158, "storm_ibtrac": 158, "path_to_ibtrac": 158, "2018300n26315": 158, "storm_atcf": 158, "path_to_atcf": 158, "fill_mwr": 158, "out_path": 158, "make_multi_structur": 158, "observerd": 159, "parametr": 159, "gride": 159, "dens": 159, "profil": [159, 164], "_storm_modul": 159, "stepgrid": 161, "850": 161, "853": 161, "288e": 161, "214": 161, "552": 161, "373e": 161, "92": 161, "774": 161, "370": 161, "259": 161, "260e": 161, "108": 161, "838": 161, "414": 161, "664": 161, "301e": 161, "440": 161, "392": 161, "473": 161, "014": 161, "801": 161, "508": 161, "447": 161, "413": 161, "402": 161, "483": 161, "472": 161, "470": 161, "85": 161, "uniformli": 162, "nw": 162, "deduc": 162, "input_path": 162, "output_path": 162, "nodatav": 162, "northernmost": 162, "west": 162, "convens": 162, "subsurfac": 162, "gigabyt": 162, "remote_topo_url": [162, 164], "topo1": 162, "navd88": 162, "determine_topo_typ": 164, "create_topo_func": 164, "topo1writ": 164, "topo2writ": 164, "topo3writ": 164, "swaphead": 164, "capab": 164, "mayb": 164, "in_poli": 164, "topo_func": 164, "unstructur": 164, "topo_fil": 164, "filter_region": 164, "generate_2d_topo": 164, "rai": 164, "cast": 164, "versu": 164, "arrang": 164, "x_mask": 164, "maskedarrai": 164, "interp_unstructur": 164, "fill_topo": 164, "delta_limit": 164, "no_data_valu": 164, "buffer_length": 164, "proximity_radiu": 164, "resolution_limit": 164, "gap": 164, "griddata": 164, "delta_x": 164, "delta_i": 164, "make_shoreline_xi": 164, "shoreline_xi": 164, "segement": 164, "npy": 164, "reload": 164, "long_lat": 164, "cb_kwarg": 164, "linestyl": 164, "compens": 164, "shrink": 164, "nc_param": 164, "read_head": 164, "swap": 164, "replace_no_data_valu": 164, "replace_valu": 164, "smooth_data": 164, "ball": 164, "inf": 164, "oscillatori": 164, "header_styl": 164, "7e": 164, "infer": 164, "arcgi": 164, "asc": 164, "millimet": 164, "15e": 164, "7i": 164, "coorind": 164, "specfi": 164, "topgraphi": 164, "__________________o": 164, "fetch_topo_url": 164, "local_fnam": 164, "ask_us": 164, "get_topo": 164, "claw_topo_download": 164, "run_exampl": 164, "topo_fnam": 164, "remote_directori": 164, "zvar": 164, "return_topo": 164, "return_xarrai": 164, "band1": 164, "xarrai": 164, "xarray_d": 164, "etopo_sample_2min": 164, "0f": 164, "western": 164, "outputfil": 164, "outfil": 164, "nxpoint": 164, "nypoint": 164, "topotype1": 164, "99999": 164, "forget": 165, "whichclaw": 165, "gnufcompil": 165, "tarbal": 165, "config_fc": 165, "fcompil": 165, "printenv": 165, "154": 165, "wc": 166, "catalog": 166, "mllw": 166, "gloss": 166, "sonel": 166, "mbc": 167, "5d0": 167, "heterogen": 167, "b4stepn": 167, "advection_2d_swirl": 167, "1drad": 167, "mx1d": 167, "q1d": 167, "aux1d": 167, "reader": 168, "time_files_scanf": 168, "04d": 168, "grid_files_scanf": 168, "silo": 168, "vm": 169, "equiv": 170, "m_w": 170, "sum_": 170, "sum_p": 170, "qquad": 170, "nonconserv": 170, "eqn": 170, "claw_1dnoncon": 170, "tild": 170, "f_": 170, "kappa_i": 170}, "objects": {"": [[0, 0, 1, "", "ClawPlotAxes"], [1, 0, 1, "", "ClawPlotData"], [2, 0, 1, "", "ClawPlotFigure"], [3, 0, 1, "", "ClawPlotItem"], [1, 2, 1, "", "clearfigures"], [1, 2, 1, "", "clearframes"], [1, 2, 1, "", "getaxes"], [1, 2, 1, "", "getfigure"], [3, 2, 1, "", "getframe"], [3, 2, 1, "", "gethandle"], [1, 2, 1, "", "getitem"], [1, 2, 1, "", "iplotclaw"], [2, 2, 1, "", "new_plotaxes"], [1, 2, 1, "", "new_plotfigure"], [0, 2, 1, "", "new_plotitem"], [1, 2, 1, "", "plotframe"], [1, 2, 1, "", "printframes"], [1, 2, 1, "", "showitems"]], "clawpack.geoclaw": [[32, 1, 0, "-", "dtopotools"], [35, 1, 0, "-", "fgmax_tools"], [37, 1, 0, "-", "fgout_tools"], [63, 1, 0, "-", "kmltools"], [164, 1, 0, "-", "topotools"], [51, 1, 0, "-", "util"]], "clawpack.geoclaw.dtopotools": [[32, 0, 1, "", "CSVFault"], [32, 0, 1, "", "DTopography"], [32, 0, 1, "", "DTopography1d"], [32, 0, 1, "", "Fault"], [32, 0, 1, "", "Fault1d"], [32, 3, 1, "", "Mw"], [32, 0, 1, "", "SiftFault"], [32, 0, 1, "", "SubFault"], [32, 0, 1, "", "SubFault1d"], [32, 0, 1, "", "SubdividedPlaneFault"], [32, 0, 1, "", "TensorProductFault"], [32, 0, 1, "", "UCSBFault"], [32, 3, 1, "", "plot_dZ_colors"], [32, 3, 1, "", "plot_dZ_contours"], [32, 3, 1, "", "rise_fraction"], [32, 3, 1, "", "strike_direction"]], "clawpack.geoclaw.dtopotools.CSVFault": [[32, 2, 1, "", "read"]], "clawpack.geoclaw.dtopotools.DTopography": [[32, 2, 1, "", "dZ_at_t"], [32, 2, 1, "", "dZ_max"], [32, 2, 1, "", "plot_dZ_colors"], [32, 2, 1, "", "plot_dZ_contours"], [32, 2, 1, "", "read"], [32, 2, 1, "", "write"]], "clawpack.geoclaw.dtopotools.DTopography1d": [[32, 2, 1, "", "dZ_at_t"], [32, 2, 1, "", "dZ_cellave_at_t"], [32, 2, 1, "", "read"], [32, 2, 1, "", "write"]], "clawpack.geoclaw.dtopotools.Fault": [[32, 2, 1, "", "Mo"], [32, 2, 1, "", "Mw"], [32, 2, 1, "", "containing_rect"], [32, 2, 1, "", "create_dtopo_xy"], [32, 2, 1, "", "create_dtopography"], [32, 2, 1, "", "plot_subfaults"], [32, 2, 1, "", "plot_subfaults_depth"], [32, 2, 1, "", "read"], [32, 2, 1, "", "set_dynamic_slip"], [32, 2, 1, "", "write"]], "clawpack.geoclaw.dtopotools.SiftFault": [[32, 2, 1, "", "set_subfaults"]], "clawpack.geoclaw.dtopotools.SubFault": [[32, 2, 1, "", "Mo"], [32, 2, 1, "", "calculate_geometry"], [32, 2, 1, "", "calculate_geometry_triangles"], [32, 4, 1, "", "centers"], [32, 2, 1, "", "convert_to_standard_units"], [32, 5, 1, "", "coordinate_specification"], [32, 4, 1, "", "corners"], [32, 5, 1, "", "depth"], [32, 5, 1, "", "dip"], [32, 2, 1, "", "dynamic_slip"], [32, 4, 1, "", "gauss_pts"], [32, 5, 1, "", "latitude"], [32, 5, 1, "", "length"], [32, 5, 1, "", "longitude"], [32, 5, 1, "", "mu"], [32, 2, 1, "", "okada"], [32, 5, 1, "", "rake"], [32, 5, 1, "", "rise_shape"], [32, 5, 1, "", "rise_time"], [32, 5, 1, "", "rise_time_starting"], [32, 5, 1, "", "rupture_time"], [32, 5, 1, "", "rupture_type"], [32, 2, 1, "", "set_corners"], [32, 5, 1, "", "slip"], [32, 5, 1, "", "strike"], [32, 5, 1, "", "width"]], "clawpack.geoclaw.dtopotools.SubFault1d": [[32, 5, 1, "", "coordinate_specification"], [32, 5, 1, "", "latitude"], [32, 5, 1, "", "length"], [32, 5, 1, "", "longitude"], [32, 5, 1, "", "rake"], [32, 5, 1, "", "strike"]], "clawpack.geoclaw.dtopotools.SubdividedPlaneFault": [[32, 2, 1, "", "subdivide"]], "clawpack.geoclaw.dtopotools.UCSBFault": [[32, 2, 1, "", "read"]], "clawpack.geoclaw.fgmax_tools": [[35, 0, 1, "", "FGmaxGrid"], [35, 3, 1, "", "adjust_fgmax_1d"]], "clawpack.geoclaw.fgmax_tools.FGmaxGrid": [[35, 2, 1, "", "bounding_box"], [35, 2, 1, "", "interp_dz"], [35, 2, 1, "", "ps4_to_arrays"], [35, 2, 1, "", "read_fgmax_grids_data"], [35, 2, 1, "", "read_output"], [35, 2, 1, "", "write_to_fgmax_data"]], "clawpack.geoclaw.fgout_tools": [[37, 0, 1, "", "FGoutFrame"], [37, 0, 1, "", "FGoutGrid"], [37, 3, 1, "", "get_as_array"], [37, 3, 1, "", "make_fgout_fcn_xy"], [37, 3, 1, "", "make_fgout_fcn_xyt"], [37, 3, 1, "", "print_netcdf_info"], [37, 3, 1, "", "read_netcdf"], [37, 3, 1, "", "read_netcdf_arrays"], [37, 3, 1, "", "write_netcdf"]], "clawpack.geoclaw.fgout_tools.FGoutFrame": [[37, 4, 1, "", "B"], [37, 4, 1, "", "eta"], [37, 4, 1, "", "h"], [37, 4, 1, "", "hss"], [37, 4, 1, "", "hu"], [37, 4, 1, "", "hv"], [37, 4, 1, "", "s"], [37, 4, 1, "", "u"], [37, 4, 1, "", "v"]], "clawpack.geoclaw.fgout_tools.FGoutGrid": [[37, 4, 1, "", "X"], [37, 4, 1, "", "Y"], [37, 4, 1, "", "extent_centers"], [37, 4, 1, "", "extent_edges"], [37, 2, 1, "", "read_fgout_grids_data"], [37, 2, 1, "", "read_frame"], [37, 2, 1, "", "set_plotdata"], [37, 2, 1, "", "write_to_fgout_data"], [37, 4, 1, "", "x"], [37, 4, 1, "", "y"]], "clawpack.geoclaw.kmltools": [[63, 3, 1, "", "box2kml"], [63, 3, 1, "", "deg2dms"], [63, 3, 1, "", "dtopo2kml"], [63, 3, 1, "", "f2s"], [63, 3, 1, "", "fgmax2kml"], [63, 3, 1, "", "fgout2kml"], [63, 3, 1, "", "gauges2kml"], [63, 3, 1, "", "kml_build_colorbar"], [63, 3, 1, "", "kml_cb"], [63, 3, 1, "", "kml_png"], [63, 3, 1, "", "kml_timespan"], [63, 3, 1, "", "line2kml"], [63, 3, 1, "", "make_input_data_kmls"], [63, 3, 1, "", "pcolorcells_for_kml"], [63, 3, 1, "", "png2kml"], [63, 3, 1, "", "poly2kml"], [63, 3, 1, "", "quad2kml"], [63, 3, 1, "", "regions2kml"], [63, 3, 1, "", "topo2kml"], [63, 3, 1, "", "topo2kmz"], [63, 3, 1, "", "transect2kml"]], "clawpack.geoclaw.surge": [[158, 1, 0, "-", "storm"]], "clawpack.geoclaw.surge.storm": [[158, 6, 1, "", "NoDataError"], [158, 0, 1, "", "Storm"], [158, 3, 1, "", "available_formats"], [158, 3, 1, "", "available_models"], [158, 3, 1, "", "fill_rad_w_other_source"], [158, 3, 1, "", "make_multi_structure"]], "clawpack.geoclaw.surge.storm.Storm": [[158, 2, 1, "", "category"], [158, 2, 1, "", "read"], [158, 2, 1, "", "read_atcf"], [158, 2, 1, "", "read_geoclaw"], [158, 2, 1, "", "read_hurdat"], [158, 2, 1, "", "read_ibtracs"], [158, 2, 1, "", "read_imd"], [158, 2, 1, "", "read_jma"], [158, 2, 1, "", "read_tcvitals"], [158, 2, 1, "", "write"], [158, 2, 1, "", "write_atcf"], [158, 2, 1, "", "write_geoclaw"], [158, 2, 1, "", "write_hurdat"], [158, 2, 1, "", "write_imd"], [158, 2, 1, "", "write_jma"], [158, 2, 1, "", "write_tcvitals"]], "clawpack.geoclaw.topotools": [[164, 0, 1, "", "Topography"], [164, 3, 1, "", "create_topo_func"], [164, 3, 1, "", "determine_topo_type"], [164, 3, 1, "", "fetch_topo_url"], [164, 3, 1, "", "get_topo"], [164, 3, 1, "", "read_netcdf"], [164, 3, 1, "", "swapheader"], [164, 3, 1, "", "topo1writer"], [164, 3, 1, "", "topo2writer"], [164, 3, 1, "", "topo3writer"]], "clawpack.geoclaw.topotools.Topography": [[164, 4, 1, "", "X"], [164, 4, 1, "", "Y"], [164, 4, 1, "", "Z"], [164, 2, 1, "", "crop"], [164, 4, 1, "", "delta"], [164, 4, 1, "", "extent"], [164, 2, 1, "", "generate_2d_coordinates"], [164, 2, 1, "", "generate_2d_topo"], [164, 2, 1, "", "in_poly"], [164, 2, 1, "", "interp_unstructured"], [164, 2, 1, "", "make_shoreline_xy"], [164, 2, 1, "", "plot"], [164, 2, 1, "", "read"], [164, 2, 1, "", "read_header"], [164, 2, 1, "", "replace_no_data_values"], [164, 2, 1, "", "replace_values"], [164, 2, 1, "", "set_xyZ"], [164, 2, 1, "", "smooth_data"], [164, 2, 1, "", "write"], [164, 4, 1, "", "x"], [164, 4, 1, "", "y"], [164, 4, 1, "", "z"]], "clawpack.geoclaw.util": [[51, 3, 1, "", "bearing"], [51, 3, 1, "", "dist_latlong2meters"], [51, 3, 1, "", "dist_meters2latlong"], [51, 3, 1, "", "dms2decimal"], [51, 3, 1, "", "fetch_noaa_tide_data"], [51, 3, 1, "", "gctransect"], [51, 3, 1, "", "haversine"], [51, 3, 1, "", "inv_haversine"]], "clawpack.petclaw.geometry": [[94, 0, 1, "", "Domain"], [94, 0, 1, "", "Patch"]], "clawpack.petclaw.geometry.Domain": [[94, 5, 1, "", "dimensional_split"], [94, 5, 1, "", "fwave"], [94, 5, 1, "", "kernel_language"], [94, 5, 1, "", "mthlim"], [94, 5, 1, "", "order"], [94, 5, 1, "", "source_split"], [94, 5, 1, "", "step_source"], [94, 5, 1, "", "transverse_waves"], [94, 5, 1, "", "verbosity"]], "clawpack.petclaw.state": [[106, 0, 1, "", "State"]], "clawpack.petclaw.state.State": [[106, 4, 1, "", "F"], [106, 4, 1, "", "aux"], [106, 4, 1, "", "fset"], [106, 5, 1, "", "gauge_data"], [106, 2, 1, "", "get_aux_global"], [106, 2, 1, "", "get_auxbc_from_aux"], [106, 2, 1, "", "get_q_global"], [106, 2, 1, "", "get_qbc_from_q"], [106, 5, 1, "", "keep_gauges"], [106, 4, 1, "", "mF"], [106, 4, 1, "", "mp"], [106, 4, 1, "", "num_aux"], [106, 4, 1, "", "num_eqn"], [106, 4, 1, "", "p"], [106, 5, 1, "", "problem_data"], [106, 4, 1, "", "q"], [106, 2, 1, "", "set_num_ghost"], [106, 5, 1, "", "t"]], "clawpack.pyclaw.classic.solver": [[104, 0, 1, "", "ClawSolver"]], "clawpack.pyclaw.classic.solver.ClawSolver": [[104, 5, 1, "", "fwave"], [104, 5, 1, "", "kernel_language"], [104, 5, 1, "", "mthlim"], [104, 5, 1, "", "order"], [104, 2, 1, "", "setup"], [104, 5, 1, "", "source_split"], [104, 2, 1, "", "step"], [104, 2, 1, "", "step_hyperbolic"], [104, 5, 1, "", "step_source"], [104, 5, 1, "", "verbosity"]], "clawpack.pyclaw.controller": [[91, 0, 1, "", "Controller"]], "clawpack.pyclaw.controller.Controller": [[91, 5, 1, "", "F_file_name"], [91, 4, 1, "", "F_path"], [91, 2, 1, "", "check_validity"], [91, 5, 1, "", "compute_F"], [91, 5, 1, "", "compute_p"], [91, 5, 1, "", "file_prefix_p"], [91, 5, 1, "", "frames"], [91, 5, 1, "", "keep_copy"], [91, 5, 1, "", "nstepout"], [91, 5, 1, "", "num_output_times"], [91, 5, 1, "", "out_times"], [91, 5, 1, "", "outdir"], [91, 4, 1, "", "outdir_p"], [91, 5, 1, "", "output_file_prefix"], [91, 5, 1, "", "output_format"], [91, 5, 1, "", "output_options"], [91, 5, 1, "", "output_style"], [91, 5, 1, "", "overwrite"], [91, 2, 1, "", "plot"], [91, 5, 1, "", "plotdata"], [91, 2, 1, "", "run"], [91, 5, 1, "", "rundir"], [91, 5, 1, "", "runmake"], [91, 5, 1, "", "savecode"], [91, 5, 1, "", "solver"], [91, 5, 1, "", "tfinal"], [91, 4, 1, "", "verbosity"], [91, 5, 1, "", "viewable_attributes"], [91, 5, 1, "", "write_aux_always"], [91, 5, 1, "", "write_aux_init"], [91, 5, 1, "", "xclawcmd"], [91, 5, 1, "", "xclawerr"], [91, 5, 1, "", "xclawout"], [91, 5, 1, "", "xdir"]], "clawpack.pyclaw.fileio": [[97, 1, 0, "-", "ascii"], [97, 1, 0, "-", "binary"], [97, 1, 0, "-", "hdf5"], [97, 1, 0, "-", "netcdf"]], "clawpack.pyclaw.fileio.ascii": [[97, 3, 1, "", "read"], [97, 3, 1, "", "read_array"], [97, 3, 1, "", "read_patch_header"], [97, 3, 1, "", "read_t"], [97, 3, 1, "", "write"], [97, 3, 1, "", "write_array"]], "clawpack.pyclaw.fileio.binary": [[97, 3, 1, "", "read"]], "clawpack.pyclaw.fileio.hdf5": [[97, 3, 1, "", "read"], [97, 3, 1, "", "write"]], "clawpack.pyclaw.fileio.netcdf": [[97, 3, 1, "", "read"], [97, 3, 1, "", "write"]], "clawpack.pyclaw.geometry": [[94, 0, 1, "", "Dimension"], [94, 0, 1, "", "Domain"], [94, 0, 1, "", "Grid"], [94, 0, 1, "", "Patch"]], "clawpack.pyclaw.geometry.Dimension": [[94, 4, 1, "", "centers"], [94, 2, 1, "", "centers_with_ghost"], [94, 4, 1, "", "delta"], [94, 4, 1, "", "nodes"], [94, 2, 1, "", "nodes_with_ghost"]], "clawpack.pyclaw.geometry.Domain": [[94, 4, 1, "", "grid"], [94, 4, 1, "", "num_dim"], [94, 4, 1, "", "patch"]], "clawpack.pyclaw.geometry.Grid": [[94, 2, 1, "", "add_dimension"], [94, 2, 1, "", "add_gauges"], [94, 2, 1, "", "c_center"], [94, 4, 1, "", "c_centers"], [94, 2, 1, "", "c_centers_with_ghost"], [94, 4, 1, "", "c_nodes"], [94, 2, 1, "", "c_nodes_with_ghost"], [94, 4, 1, "", "dimensions"], [94, 5, 1, "", "gauge_dir_name"], [94, 5, 1, "", "gauge_file_names"], [94, 5, 1, "", "gauge_files"], [94, 5, 1, "", "gauges"], [94, 2, 1, "", "get_dim_attribute"], [94, 4, 1, "", "num_dim"], [94, 2, 1, "", "p_center"], [94, 4, 1, "", "p_centers"], [94, 4, 1, "", "p_nodes"], [94, 2, 1, "", "plot"], [94, 2, 1, "", "setup_gauge_files"]], "clawpack.pyclaw.geometry.Patch": [[94, 2, 1, "", "add_dimension"], [94, 4, 1, "", "delta"], [94, 4, 1, "", "dimensions"], [94, 2, 1, "", "get_dim_attribute"], [94, 5, 1, "", "level"], [94, 4, 1, "", "lower_global"], [94, 4, 1, "", "name"], [94, 4, 1, "", "num_cells_global"], [94, 4, 1, "", "num_dim"], [94, 5, 1, "", "patch_index"], [94, 4, 1, "", "upper_global"]], "clawpack.pyclaw.limiters": [[92, 1, 0, "-", "tvd"]], "clawpack.pyclaw.limiters.tvd": [[92, 3, 1, "", "arora_roe"], [92, 3, 1, "", "beta_limiter"], [92, 3, 1, "", "cada_torrilhon_limiter"], [92, 3, 1, "", "cada_torrilhon_limiter_nonlinear"], [92, 3, 1, "", "cfl_superbee"], [92, 3, 1, "", "cfl_superbee_theta"], [92, 3, 1, "", "hyperbee_limiter"], [92, 3, 1, "", "limit"], [92, 3, 1, "", "mc_limiter"], [92, 3, 1, "", "minmod_limiter"], [92, 3, 1, "", "superbee_limiter"], [92, 3, 1, "", "superpower_limiter"], [92, 3, 1, "", "theta_limiter"], [92, 3, 1, "", "upper_bound_limiter"], [92, 3, 1, "", "van_leer_klein_sharpening_limiter"]], "clawpack.pyclaw.sharpclaw.solver": [[104, 0, 1, "", "SharpClawSolver"]], "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver": [[104, 2, 1, "", "accept_reject_step"], [104, 5, 1, "", "aux_time_dep"], [104, 5, 1, "", "call_before_step_each_stage"], [104, 5, 1, "", "cfl_desired"], [104, 5, 1, "", "cfl_max"], [104, 5, 1, "", "char_decomp"], [104, 2, 1, "", "check_3rd_ord_cond"], [104, 2, 1, "", "dq"], [104, 5, 1, "", "dq_src"], [104, 2, 1, "", "dqdt"], [104, 5, 1, "", "fwave"], [104, 2, 1, "", "get_dt_new"], [104, 5, 1, "", "kernel_language"], [104, 5, 1, "", "lim_type"], [104, 5, 1, "", "num_ghost"], [104, 2, 1, "", "setup"], [104, 2, 1, "", "step"], [104, 5, 1, "", "tfluct"], [104, 5, 1, "", "tfluct_solver"], [104, 5, 1, "", "time_integrator"], [104, 2, 1, "", "update_saved_values"], [104, 5, 1, "", "weno_order"]], "clawpack.pyclaw.solution": [[103, 0, 1, "", "Solution"]], "clawpack.pyclaw.solution.Solution": [[103, 2, 1, "", "is_valid"], [103, 4, 1, "", "patch"], [103, 2, 1, "", "plot"], [103, 2, 1, "", "read"], [103, 2, 1, "", "set_all_states"], [103, 4, 1, "", "start_frame"], [103, 4, 1, "", "state"], [103, 2, 1, "", "write"]], "clawpack.pyclaw.state": [[106, 0, 1, "", "State"]], "clawpack.pyclaw.state.State": [[106, 5, 1, "", "F"], [106, 5, 1, "", "gauge_data"], [106, 2, 1, "", "get_aux_global"], [106, 2, 1, "", "get_auxbc_from_aux"], [106, 2, 1, "", "get_q_global"], [106, 2, 1, "", "get_qbc_from_q"], [106, 2, 1, "", "is_valid"], [106, 5, 1, "", "keep_gauges"], [106, 4, 1, "", "mF"], [106, 4, 1, "", "mp"], [106, 4, 1, "", "num_aux"], [106, 4, 1, "", "num_eqn"], [106, 5, 1, "", "p"], [106, 5, 1, "", "problem_data"], [106, 2, 1, "", "set_aux_from_auxbc"], [106, 2, 1, "", "set_cparam"], [106, 2, 1, "", "set_num_ghost"], [106, 2, 1, "", "set_q_from_qbc"], [106, 5, 1, "", "t"]], "clawpack.pyclaw": [[109, 1, 0, "-", "util"]], "clawpack.pyclaw.util": [[109, 0, 1, "", "FrameCounter"], [109, 6, 1, "", "VerifyError"], [109, 3, 1, "", "add_parent_doc"], [109, 3, 1, "", "check_diff"], [109, 3, 1, "", "compile_library"], [109, 3, 1, "", "construct_function_handle"], [109, 3, 1, "", "convert_fort_double_to_float"], [109, 3, 1, "", "gen_variants"], [109, 3, 1, "", "read_data_line"], [109, 3, 1, "", "run_app_from_main"], [109, 3, 1, "", "run_serialized"], [109, 3, 1, "", "test_app"]], "clawpack.pyclaw.util.FrameCounter": [[109, 2, 1, "", "get_counter"], [109, 2, 1, "", "increment"], [109, 2, 1, "", "reset_counter"], [109, 2, 1, "", "set_counter"]], "clawpack.riemann": [[102, 1, 0, "-", "acoustics_1D_py"], [102, 1, 0, "-", "advection_1D_py"], [102, 1, 0, "-", "burgers_1D_py"], [102, 1, 0, "-", "euler_1D_py"], [102, 1, 0, "-", "shallow_1D_py"]], "clawpack.riemann.acoustics_1D_py": [[102, 3, 1, "", "acoustics_1D"]], "clawpack.riemann.advection_1D_py": [[102, 3, 1, "", "advection_1D"]], "clawpack.riemann.burgers_1D_py": [[102, 3, 1, "", "burgers_1D"]], "clawpack.riemann.euler_1D_py": [[102, 3, 1, "", "euler_exact_1D"], [102, 3, 1, "", "euler_hll_1D"], [102, 3, 1, "", "euler_hllc_1D"], [102, 3, 1, "", "euler_roe_1D"]], "clawpack.riemann.shallow_1D_py": [[102, 3, 1, "", "shallow_exact_1D"], [102, 3, 1, "", "shallow_fwave_1d"], [102, 3, 1, "", "shallow_hll_1D"], [102, 3, 1, "", "shallow_roe_1D"]]}, "objtypes": {"0": "py:class", "1": "py:module", "2": "py:method", "3": "py:function", "4": "py:property", "5": "py:attribute", "6": "py:exception"}, "objnames": {"0": ["py", "class", "Python class"], "1": ["py", "module", "Python module"], "2": ["py", "method", "Python method"], "3": ["py", "function", "Python function"], "4": ["py", "property", "Python property"], "5": ["py", "attribute", "Python attribute"], "6": ["py", "exception", "Python exception"]}, "titleterms": {"clawplotax": 0, "attribut": [0, 1, 2, 3, 29, 34, 55, 82, 142], "gaug": [0, 47, 55, 64, 98, 166], "plot": [0, 3, 13, 24, 27, 34, 36, 47, 50, 53, 55, 64, 66, 71, 80, 81, 82, 83, 84, 93, 99, 100, 116, 147, 153, 165, 168], "method": [0, 1, 2, 3, 142, 170], "clawplotdata": 1, "clawplotfigur": 2, "clawplotitem": [3, 82], "special": [3, 149], "all": [3, 62, 70], "1d": [3, 8, 18], "plot_typ": 3, "1d_plot": 3, "1d_fill_between": 3, "1d_from_2d_data": 3, "2d": [3, 19, 140], "2d_contour": 3, "2d_pcolor": 3, "2d_imshow": 3, "2d_hillshad": 3, "amr": [3, 5, 6, 24, 70, 76, 115, 142, 149, 151], "colorbar": [3, 55], "about": [4, 86], "thi": [4, 58], "softwar": [4, 17], "licens": [4, 65, 86], "author": 4, "cite": [4, 96], "work": [4, 35, 37, 93, 163, 164, 167], "fund": [4, 86], "guid": [5, 30, 58, 59, 113, 114], "adjoint": 5, "flag": [5, 6, 66, 70, 115, 142, 149], "us": [5, 13, 18, 19, 27, 31, 36, 41, 52, 56, 62, 64, 67, 71, 73, 76, 78, 98, 101, 104, 107, 140, 141, 144, 147, 165, 167], "geoclaw": [5, 15, 16, 20, 24, 27, 42, 48, 49, 50, 51, 52, 53, 55, 76, 79, 83, 112, 115, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 142, 145, 151, 156, 157], "adapt": [6, 16, 27, 41], "mesh": [6, 27], "refin": [6, 16, 27, 41, 115, 151], "algorithm": [6, 17, 70, 78, 170], "ghost": 6, "cell": [6, 42, 142, 151], "boundari": [6, 16, 101, 167, 170], "condit": [6, 16, 101, 108, 167, 170], "choos": [6, 70], "initi": [6, 42, 70, 101, 108, 144, 151, 167], "finer": 6, "grid": [6, 16, 34, 35, 36, 37, 49, 57, 64, 76, 94, 151], "For": 6, "more": [6, 39, 43], "detail": [6, 7, 48], "amrclaw": [7, 8, 9, 10, 20, 27, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 149, 150, 167], "descript": [7, 48], "content": [7, 27, 30, 42, 48, 70, 82, 88, 98, 104, 116, 142], "problem": [8, 89, 101, 108, 167], "old": 8, "approach": 8, "deprec": [8, 151], "doxygen": 9, "document": [9, 11, 32, 35, 37, 51, 58, 59, 63, 96, 126, 127, 155, 164], "flowchart": 10, "applic": [11, 12, 17, 27, 28, 66, 74, 99], "convert": [11, 21, 22], "readm": 11, "rst": 11, "html": [11, 84], "code": [11, 18, 19, 27, 30, 42, 50, 61, 62, 79, 116, 165, 167], "clawcode2html": 11, "clawpack": [12, 13, 17, 20, 21, 22, 23, 24, 25, 26, 27, 31, 46, 56, 58, 59, 60, 61, 66, 78, 79, 89, 92, 104, 105, 118, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 141, 152, 169], "repositori": [12, 20, 25, 30, 54, 58, 59, 118, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 140], "jupyt": [12, 31, 40, 153], "notebook": [12, 31, 40, 110, 153], "submodul": 12, "exampl": [12, 19, 27, 28, 34, 36, 38, 39, 40, 42, 45, 47, 50, 55, 62, 70, 71, 74, 80, 93, 96, 99, 142], "includ": [12, 58], "amazon": 13, "web": 13, "servic": 13, "ec2": 13, "ami": 13, "find": [13, 70, 82], "launch": 13, "an": [13, 38, 39, 40, 55, 64, 70, 74, 99], "instanc": 13, "log": [13, 98], "your": [13, 30, 31, 39, 55, 99, 101, 105, 153, 160], "view": 13, "result": [13, 50, 55, 100, 153], "webpag": [13, 58, 153], "directli": [13, 36], "from": [13, 21, 22, 24, 27, 30, 32, 35, 37, 40, 42, 45, 51, 58, 63, 70, 84, 89, 93, 100, 142, 164], "transfer": 13, "file": [13, 31, 33, 34, 36, 42, 55, 57, 58, 59, 61, 67, 71, 82, 84, 116, 139, 142, 151, 162, 167], "stop": [13, 31], "creat": [13, 31, 42, 55, 59, 70, 71, 74, 88], "own": [13, 31, 101], "b4run": 14, "function": [14, 51, 63, 69, 70, 84, 98, 104, 170], "b4step": [15, 167], "default": [15, 112, 144, 145, 156, 157], "routin": [15, 24, 67, 83, 112, 145, 156, 157], "clamshel": 16, "sphere": [16, 154], "user": [16, 26, 78, 167], "defin": [16, 142], "bibliographi": 17, "paper": 17, "describ": 17, "other": [17, 20, 25, 26, 31, 34, 58, 82, 118, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 142, 144], "refer": [17, 27, 56, 96, 110], "boussinesq": [18, 19], "solver": [18, 19, 78, 88, 96, 101, 102, 104, 108, 140, 141, 167], "One": [18, 49, 140, 141, 170], "space": [18, 19, 49, 170], "dimens": [18, 19, 49, 94, 141, 170], "makefil": [18, 19, 43, 66, 67, 101, 139], "setrun": [18, 19, 24, 47, 148, 149, 150, 151, 152], "py": [18, 19, 24, 36, 82, 111, 147, 148, 149, 150, 151, 152], "two": [19, 141], "type": 19, "dispers": 19, "equat": [19, 102, 108, 141], "The": [19, 55, 69, 70, 71, 108], "sgn": 19, "madsen": 19, "sorensen": 19, "m": 19, "prerequisit": [19, 85], "wave": [19, 140, 170], "break": 19, "switch": [19, 71], "swe": 19, "chang": [20, 24, 82, 104, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137], "master": [20, 30], "sinc": 20, "v5": [20, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137], "9": [20, 31, 135, 136, 137], "2": [20, 110, 120, 121, 122, 134, 137], "ar": [20, 82, 118, 127, 128, 129, 130, 131, 132, 133, 134, 135], "backward": [20, 118, 127, 128, 129, 130, 131, 132, 133, 134, 135], "compat": [20, 118, 127, 128, 129, 130, 131, 132, 133, 134, 135], "gener": [20, 24, 32, 35, 37, 51, 58, 63, 127, 128, 129, 130, 131, 132, 133, 134, 135, 137, 151, 164], "classic": [20, 27, 38, 39, 104, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 148, 152, 160], "clawutil": [20, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137], "visclaw": [20, 27, 64, 81, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137], "riemann": [20, 27, 96, 101, 102, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 140, 141, 167], "pyclaw": [20, 24, 27, 38, 40, 62, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96, 97, 98, 100, 103, 104, 105, 106, 108, 109, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 160], "4": [21, 22, 23, 24, 89, 125, 126, 138], "3": [21, 42, 70, 123, 124], "6": [21, 22, 89, 128, 129], "5": [22, 24, 31, 127], "0": [22, 24, 31, 117, 118, 119, 120, 123, 125, 127, 128, 130, 132, 135], "python": [22, 84, 85, 105, 110, 111, 130, 163], "convers": 22, "tool": [22, 27, 47, 53, 64, 116, 158, 163], "x": [23, 24, 89, 138], "link": 23, "fortran": [24, 27, 33, 39, 42, 43, 44, 61, 85, 107, 116, 165, 167], "packag": [24, 62, 97, 102], "input": [24, 34, 36, 97, 148, 149], "paramet": [24, 47, 82, 84, 108, 148, 149, 151], "compon": [25, 82], "commun": [26, 30, 79], "workshop": [26, 79], "clinic": 26, "tutori": [26, 108, 110], "avail": [26, 45], "stream": 26, "upcom": 26, "recent": [26, 30], "develop": [26, 27, 30, 79], "sprint": [26, 79], "session": 26, "previou": [26, 58], "event": [26, 55], "full": 27, "tabl": [27, 96], "overview": [27, 147], "get": [27, 31, 50, 71], "start": [27, 31, 50, 113, 114], "geophys": 27, "flow": [27, 88], "visual": [27, 55], "migrat": 27, "older": 27, "version": [27, 31, 43, 54, 56, 58, 59, 62, 111], "resourc": 27, "contribut": [28, 30, 141], "current_data": [29, 84], "guidelin": 30, "report": 30, "fix": [30, 34, 36, 76, 151], "bug": 30, "instal": [30, 39, 40, 60, 61, 62, 78, 85, 96, 99, 105, 107, 111, 160, 165], "instruct": [30, 62], "clone": [30, 61], "most": 30, "github": [30, 59], "check": [30, 116], "out": [30, 70], "branch": [30, 58], "each": [30, 167], "updat": [30, 58, 59], "latest": 30, "never": 30, "commit": 30, "ad": [30, 55, 93, 101, 140], "fork": 30, "remot": 30, "modifi": [30, 67, 139], "issu": 30, "pull": 30, "request": 30, "test": [30, 39, 40, 99, 105, 116, 160], "top": 30, "level": [30, 144, 151], "git": [30, 54, 58, 61, 85], "workflow": 30, "catch": 30, "error": [30, 107], "pyflak": 30, "pylint": 30, "coverag": 30, "troubl": [30, 71, 165], "shoot": [30, 71], "tip": [30, 43, 53, 55, 99], "docker": 31, "abov": 31, "contain": 31, "restart": [31, 88, 139], "run": [31, 38, 39, 40, 50, 88, 90, 93, 99, 100, 116, 148, 149, 165], "move": [31, 32, 49], "between": [31, 82], "host": 31, "machin": [31, 169], "some": [31, 82, 151, 166], "command": [31, 40, 71, 84, 93, 165], "imag": [31, 55], "dockerfil": [31, 59], "binder": 31, "dtopotool": 32, "modul": [32, 35, 37, 51, 63, 96, 109, 150, 152, 164], "topographi": [32, 42, 50, 55, 70, 151, 162, 164, 166], "auto": [32, 35, 37, 51, 63, 164], "docstr": [32, 35, 37, 51, 63, 164], "77": 33, "v": 33, "90": 33, "monitor": [34, 151], "fgmax": [34, 35, 70], "specif": [34, 36, 108, 116, 151, 158, 167], "differ": [34, 55, 62, 67, 78, 82], "point": [34, 70], "style": [34, 58, 77], "valu": [34, 88], "choic": [34, 36], "interpol": [34, 36, 72], "procedur": [34, 36], "A": [34, 36, 142], "simpl": [34, 36, 142], "process": [34, 81], "output": [34, 36, 66, 70, 71, 73, 76, 77, 88, 97, 98, 116, 139, 148, 149, 151, 165], "format": [34, 36, 77, 162], "fgmax_tool": 35, "fgout": [36, 37, 64], "setplot": [36, 71, 82, 84, 147], "produc": [36, 84], "read": [36, 42, 142], "arrai": [36, 42, 70, 77, 107], "registr": [36, 57], "fgout_tool": 37, "ipython": [40, 93], "interpret": 40, "line": [40, 84, 93, 116, 165], "specifi": [41, 64, 82, 84, 115, 147, 148, 149, 151, 167], "flagregion": 41, "rule": [41, 142], "rectangl": [41, 142], "forc": [42, 151], "dry": [42, 70, 151], "sampl": [42, 70, 150, 152], "1": [42, 70, 119, 121, 124, 126, 129, 131, 133, 136], "arcsecond": [42, 70], "dem": [42, 70], "force_dry_init": 42, "usag": 42, "intern": 42, "modif": 42, "compil": [44, 66, 107, 155, 165], "fc": [44, 146], "environ": [44, 146], "variabl": [44, 66, 101, 146], "fflag": 44, "lflag": 44, "pre": 44, "processor": 44, "ppflag": 44, "gfortran": [44, 105], "intel": 44, "book": 45, "fvmhp": 45, "youtub": 45, "video": 45, "galleri": [46, 58, 71], "locat": 47, "coordin": [49, 53, 55], "system": [49, 85], "uniform": 49, "map": [49, 55], "topograpi": 49, "data": [49, 55, 77, 147, 151, 159, 162, 164, 165, 166, 167], "dtopo": [49, 163], "set": [50, 71, 82, 84, 101, 143, 144, 146, 165], "up": [50, 101], "new": [50, 58, 74, 93, 116], "util": [51, 63, 109], "cautionari": 52, "hint": [52, 82, 110], "tsunami": [52, 55, 114, 166], "hazard": 52, "model": [52, 75, 113, 114, 166], "water": [53, 102, 141, 154], "depth": 53, "surfac": [53, 144], "elev": [53, 70, 144], "latitud": [53, 55], "longitud": [53, 55], "ax": 53, "keep": 54, "track": [54, 64], "googl": 55, "earth": 55, "basic": [55, 87, 100], "requir": [55, 167], "option": [55, 61, 84, 99, 101], "gdal": 55, "librari": [55, 67], "chile": 55, "2010": [55, 79], "need": 55, "plotdata": 55, "plotfigur": 55, "figur": [55, 82], "plotax": 55, "plotitem": 55, "overlai": 55, "addit": [55, 149, 151], "kml": 55, "kmz": 55, "tile": 55, "faster": 55, "load": 55, "remov": 55, "alias": 55, "artifact": 55, "multipl": 55, "resolut": [55, 170], "publish": 55, "gpu": 56, "netcdf": [57, 73, 77, 97, 162], "tag": 58, "configur": 58, "doc": 58, "releas": [58, 59, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138], "To": 58, "major": 58, "extra": 58, "built": [58, 93], "sphinx": [58, 155], "page": 58, "do": 59, "prepar": 59, "number": 59, "candid": 59, "tar": [59, 61], "final": 59, "pypi": 59, "zenodo": 59, "open": 59, "scienc": 59, "framework": 59, "osf": 59, "app": 59, "next": [60, 61, 62, 105], "step": [60, 61, 62, 105, 167], "pip": [62, 85, 165], "quick": [62, 113, 114], "experi": 62, "directori": [62, 66, 74, 82], "troubleshoot": [62, 107, 165], "kmltool": 63, "lagrangian": 64, "particl": 64, "altern": 64, "duplic": 66, "base": 66, "sourc": [66, 75, 101, 154, 159, 166, 167, 170], "name": [66, 67], "replac": 67, "same": 67, "man": 68, "friction": 68, "term": [68, 101, 154, 167, 170], "mapc2p": 69, "march": 70, "front": 70, "argument": 70, "mask": 70, "topofil": 70, "region": [70, 115, 142, 151], "previous_pts_chosen": 70, "below": 70, "given": 70, "buffer": 70, "zone": 70, "along": 70, "shore": 70, "onli": 70, "write": [70, 101, 116, 142], "indic": [70, 96], "determin": 70, "area": 70, "mhw": 70, "matlab": 71, "search": 71, "path": [71, 111], "plotclaw": 71, "afterfram": 71, "help": 71, "found": 71, "maxfram": 71, "nearshor": 72, "copi": 74, "exist": 74, "earthquak": [75, 166], "fault": 75, "slip": 75, "okada": 75, "rectangular": 75, "subfault": 75, "kinemat": 75, "ruptur": 75, "triangular": 75, "openmp": 76, "sytl": 77, "ascii": [77, 97], "fort": [77, 82], "t0002": 77, "q0002": 77, "raw": 77, "binari": [77, 97], "aux": [77, 88], "which": [78, 111], "should": 78, "i": [78, 98], "interfac": 78, "parallel": [78, 94, 99, 100, 106], "comput": [78, 139], "photo": 79, "2016": 79, "univers": 79, "washington": 79, "2015": 79, "utah": 79, "2014": 79, "hpc3": 79, "kaust": 79, "2013": 79, "claw": [79, 146], "dev": 79, "uw": 79, "2012": 79, "2011": 79, "hack": 79, "post": 81, "fly": 81, "faq": 82, "what": [82, 84, 98, 141], "": [82, 93, 104, 141, 170], "make": [82, 99, 153, 165], "how": [82, 84, 98], "someth": 82, "than": 82, "q": 82, "add": 82, "anoth": 82, "curv": 82, "e": 82, "g": 82, "true": 82, "solut": [82, 88, 103], "titl": 82, "outdir": 82, "item": 82, "provid": 82, "size": 82, "background": 82, "color": 82, "colormap": 82, "pcolor": 82, "contourf": 82, "debug": [82, 149], "latex": 84, "interact": [84, 93], "iplotclaw": 84, "access": 84, "printfram": 84, "oper": 85, "contributor": 86, "understand": 88, "class": [88, 91, 158], "simul": 88, "creation": 88, "control": [88, 91, 108], "deriv": [88, 98], "quantiti": [88, 98], "port": 89, "cloud": 90, "sage": 90, "math": 90, "limit": 92, "tvd": 92, "cfl": 92, "independ": 92, "depend": [92, 105], "geometri": 94, "serial": [94, 106, 116], "object": [94, 147], "domain": [94, 108], "patch": 94, "petclaw": [94, 106], "go": 95, "further": 95, "featur": 96, "fileio": 97, "hdf5": 97, "frame": 98, "when": 98, "save": [98, 153], "written": 98, "where": 98, "petsc": 99, "correctli": 99, "pass": 99, "script": 101, "auxiliari": 101, "acoust": [102, 108], "advect": 102, "burger": 102, "euler": 102, "shallow": [102, 141, 154], "sharpclaw": 104, "custom": [104, 140], "bc": 104, "signatur": 104, "numpi": 105, "matplotlib": 105, "obtain": 105, "nose": 105, "state": 106, "order": 107, "solv": 108, "drop": 110, "support": [110, 130], "7": [110, 130, 131], "whichclaw": 111, "wa": 111, "import": 111, "sy": 111, "easi": 111, "pth": 111, "pythonpath": [111, 146], "qinit": [112, 151, 162], "storm": [113, 151, 158, 159], "surg": [113, 159], "criteria": 115, "flag2refin": 115, "richardson": 115, "extrapol": 115, "implement": 115, "regress": 116, "travi": 116, "continu": 116, "integr": 116, "diff": 116, "chardiff": 116, "comparison": 116, "imagediff": 116, "pixel": 116, "simultan": 116, "doctest": 116, "note": [117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138], "10": 118, "global": 125, "8": [132, 133, 134], "checkpoint": 139, "after": 139, "dimension": 140, "pointwis": 140, "f": [140, 170], "layer": 141, "potenti": 141, "miss": 141, "demonstr": 141, "roe": 141, "hll": 141, "relat": 142, "convex": 142, "polygon": 142, "d": 142, "slu": 142, "bounding_box": 142, "mask_outsid": 142, "instanti": 142, "make_kml": 142, "cover": 142, "select": 142, "continent": 142, "shelf": 142, "sea_level": 143, "eta": 144, "init": 144, "spatial": [144, 167], "vari": [144, 167], "behavior": 144, "adjust": [144, 151], "sea": [144, 151], "seismic": 144, "deform": 144, "case": 144, "setaux": [145, 167], "desir": 147, "time": [148, 149, 151, 161, 167], "print": 149, "geo": 151, "fixedgrid": 151, "maximum": 151, "arriv": 151, "share": 153, "local": 155, "src1d": [156, 167], "src": [157, 167], "statist": 161, "download": 162, "displac": 162, "topo": 163, "topotool": 164, "f2py": 165, "ex": 165, "bathymetri": 166, "dart": 166, "buoi": 166, "tide": 166, "done": 167, "befor": 167, "visit": 168, "virtual": 169, "propag": 170, "godunov": 170, "high": 170, "formul": 170, "capac": 170}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 57}, "alltitles": {"ClawPlotAxes": [[0, "clawplotaxes"]], "Attributes": [[0, "attributes"], [1, "attributes"], [2, "attributes"], [3, "attributes"]], "Attributes for gauge plots": [[0, "attributes-for-gauge-plots"]], "Methods": [[0, "methods"], [1, "methods"], [2, "methods"], [3, "methods"]], "ClawPlotData": [[1, "clawplotdata"]], "ClawPlotFigure": [[2, "clawplotfigure"]], "ClawPlotItem": [[3, "clawplotitem"]], "Special attributes for all 1d plots, plot_type = \u20181d\u2026\u2019": [[3, "special-attributes-for-all-1d-plots-plot-type-1d"]], "Special attributes for plot_type = \u20181d_plot\u2019": [[3, "special-attributes-for-plot-type-1d-plot"]], "Special attributes for plot_type = \u20181d_fill_between\u2019": [[3, "special-attributes-for-plot-type-1d-fill-between"]], "Special attributes for plot_type = \u20181d_from_2d_data\u2019": [[3, "special-attributes-for-plot-type-1d-from-2d-data"]], "Special attributes for all 2d plots, plot_type = \u20182d\u2026\u2019": [[3, "special-attributes-for-all-2d-plots-plot-type-2d"]], "Special attributes for plot_type = \u20182d_contour\u2019": [[3, "special-attributes-for-plot-type-2d-contour"]], "Special attributes for plot_type = \u20182d_pcolor\u2019": [[3, "special-attributes-for-plot-type-2d-pcolor"]], "Special attributes for plot_type = \u20182d_imshow\u2019": [[3, "special-attributes-for-plot-type-2d-imshow"]], "Special attributes for plot_type = \u20182d_hillshade\u2019": [[3, "special-attributes-for-plot-type-2d-hillshade"]], "AMR Attributes": [[3, "amr-attributes"]], "Colorbar attributes": [[3, "colorbar-attributes"]], "About this software": [[4, "about-this-software"]], "License": [[4, "license"], [65, "license"], [86, "license"]], "Authors": [[4, "authors"]], "Citing this work": [[4, "citing-this-work"]], "Funding": [[4, "funding"], [86, "funding"]], "Guiding AMR with adjoint flagging": [[5, "guiding-amr-with-adjoint-flagging"]], "Using adjoint flagging in GeoClaw": [[5, "using-adjoint-flagging-in-geoclaw"]], "Adaptive mesh refinement (AMR) algorithms": [[6, "adaptive-mesh-refinement-amr-algorithms"]], "Ghost cells and boundary conditions for AMR": [[6, "ghost-cells-and-boundary-conditions-for-amr"]], "Choosing and initializing finer grids": [[6, "choosing-and-initializing-finer-grids"]], "Flagging cells for refinement": [[6, "flagging-cells-for-refinement"]], "For more details": [[6, "for-more-details"]], "AMRClaw Description and Detailed Contents": [[7, "amrclaw-description-and-detailed-contents"]], "AMRClaw for 1d problems": [[8, "amrclaw-for-1d-problems"]], "Old approach, deprecated:": [[8, "old-approach-deprecated"]], "Doxygen documentation of AMRClaw": [[9, "doxygen-documentation-of-amrclaw"]], "AMRClaw Flowcharts": [[10, "amrclaw-flowcharts"]], "Application documentation": [[11, "application-documentation"]], "Converting README.rst to README.html": [[11, "converting-readme-rst-to-readme-html"]], "Converting code to html with clawcode2html": [[11, "converting-code-to-html-with-clawcode2html"]], "Clawpack Applications repository": [[12, "clawpack-applications-repository"]], "Jupyter Notebooks": [[12, "jupyter-notebooks"]], "Submodules": [[12, "submodules"]], "Examples included with Clawpack": [[12, "examples-included-with-clawpack"]], "Amazon Web Services EC2 Clawpack AMI": [[13, "amazon-web-services-ec2-clawpack-ami"]], "Finding the Clawpack AMI": [[13, "finding-the-clawpack-ami"]], "Launching an instance": [[13, "launching-an-instance"]], "Logging on to your instance": [[13, "logging-on-to-your-instance"]], "Using Clawpack": [[13, "using-clawpack"]], "Viewing plots of results": [[13, "viewing-plots-of-results"]], "Viewing webpages directly from your instance": [[13, "viewing-webpages-directly-from-your-instance"]], "Transferring files to/from your instance": [[13, "transferring-files-to-from-your-instance"]], "Stopping your instance": [[13, "stopping-your-instance"]], "Creating your own AMI": [[13, "creating-your-own-ami"]], "b4run function": [[14, "b4run-function"]], "b4step default routines": [[15, "b4step-default-routines"]], "b4step routine in GeoClaw": [[15, "b4step-routine-in-geoclaw"]], "Boundary conditions": [[16, "boundary-conditions"], [170, "boundary-conditions"]], "Boundary conditions for adaptive refinement": [[16, "boundary-conditions-for-adaptive-refinement"]], "Boundary conditions for GeoClaw": [[16, "boundary-conditions-for-geoclaw"]], "Boundary conditions for clamshell grids on the sphere": [[16, "boundary-conditions-for-clamshell-grids-on-the-sphere"]], "User-defined boundary conditions": [[16, "user-defined-boundary-conditions"]], "Bibliography": [[17, "bibliography"]], "Papers describing the Clawpack software and algorithms": [[17, "papers-describing-the-clawpack-software-and-algorithms"]], "Papers describing applications": [[17, "papers-describing-applications"]], "Other references": [[17, "other-references"]], "Boussinesq solvers in One Space Dimension": [[18, "boussinesq-solvers-in-one-space-dimension"]], "Using the 1d Boussinesq code": [[18, "using-the-1d-boussinesq-code"]], "Makefile": [[18, "makefile"], [19, "makefile"]], "setrun.py": [[18, "setrun-py"], [19, "setrun-py"]], "Boussinesq solvers in Two Space Dimensions": [[19, "boussinesq-solvers-in-two-space-dimensions"]], "Boussinesq-type dispersive equations": [[19, "boussinesq-type-dispersive-equations"]], "The SGN equations": [[19, "the-sgn-equations"]], "The Madsen-Sorensen (MS) equations": [[19, "the-madsen-sorensen-ms-equations"]], "Using the 2d Boussinesq code": [[19, "using-the-2d-boussinesq-code"]], "Prerequisites for the 2d Boussinesq code": [[19, "prerequisites-for-the-2d-boussinesq-code"]], "Wave breaking and switching to SWE": [[19, "wave-breaking-and-switching-to-swe"]], "Examples": [[19, "examples"], [42, "examples"], [47, "examples"], [70, "examples"], [96, "examples"], [142, "examples"]], "Changes to master since v5.9.2": [[20, "changes-to-master-since-v5-9-2"]], "Changes that are not backward compatible": [[20, "changes-that-are-not-backward-compatible"], [118, "changes-that-are-not-backward-compatible"], [127, "changes-that-are-not-backward-compatible"], [128, "changes-that-are-not-backward-compatible"], [129, "changes-that-are-not-backward-compatible"], [130, "changes-that-are-not-backward-compatible"], [131, "changes-that-are-not-backward-compatible"], [132, "changes-that-are-not-backward-compatible"], [133, "changes-that-are-not-backward-compatible"], [134, "changes-that-are-not-backward-compatible"], [135, "changes-that-are-not-backward-compatible"]], "General changes": [[20, "general-changes"], [127, "general-changes"], [128, "general-changes"], [129, "general-changes"], [130, "general-changes"], [131, "general-changes"], [132, "general-changes"], [133, "general-changes"], [134, "general-changes"], [135, "general-changes"], [137, "general-changes"]], "Changes to classic": [[20, "changes-to-classic"], [118, "changes-to-classic"], [119, "changes-to-classic"], [120, "changes-to-classic"], [121, "changes-to-classic"], [122, "changes-to-classic"], [123, "changes-to-classic"], [124, "changes-to-classic"], [125, "changes-to-classic"], [126, "changes-to-classic"], [127, "changes-to-classic"], [128, "changes-to-classic"], [129, "changes-to-classic"], [130, "changes-to-classic"], [131, "changes-to-classic"], [132, "changes-to-classic"], [133, "changes-to-classic"], [134, "changes-to-classic"], [135, "changes-to-classic"], [136, "changes-to-classic"], [137, "changes-to-classic"]], "Changes to clawutil": [[20, "changes-to-clawutil"], [118, "changes-to-clawutil"], [119, "changes-to-clawutil"], [120, "changes-to-clawutil"], [121, "changes-to-clawutil"], [122, "changes-to-clawutil"], [123, "changes-to-clawutil"], [124, "changes-to-clawutil"], [125, "changes-to-clawutil"], [126, "changes-to-clawutil"], [127, "changes-to-clawutil"], [128, "changes-to-clawutil"], [129, "changes-to-clawutil"], [130, "changes-to-clawutil"], [131, "changes-to-clawutil"], [132, "changes-to-clawutil"], [133, "changes-to-clawutil"], [134, "changes-to-clawutil"], [135, "changes-to-clawutil"], [136, "changes-to-clawutil"], [137, "changes-to-clawutil"]], "Changes to visclaw": [[20, "changes-to-visclaw"], [118, "changes-to-visclaw"], [119, "changes-to-visclaw"], [120, "changes-to-visclaw"], [121, "changes-to-visclaw"], [122, "changes-to-visclaw"], [123, "changes-to-visclaw"], [124, "changes-to-visclaw"], [125, "changes-to-visclaw"], [126, "changes-to-visclaw"], [127, "changes-to-visclaw"], [128, "changes-to-visclaw"], [129, "changes-to-visclaw"], [130, "changes-to-visclaw"], [131, "changes-to-visclaw"], [132, "changes-to-visclaw"], [133, "changes-to-visclaw"], [134, "changes-to-visclaw"], [135, "changes-to-visclaw"], [136, "changes-to-visclaw"], [137, "changes-to-visclaw"]], "Changes to riemann": [[20, "changes-to-riemann"], [118, "changes-to-riemann"], [119, "changes-to-riemann"], [120, "changes-to-riemann"], [121, "changes-to-riemann"], [122, "changes-to-riemann"], [123, "changes-to-riemann"], [124, "changes-to-riemann"], [125, "changes-to-riemann"], [126, "changes-to-riemann"], [127, "changes-to-riemann"], [128, "changes-to-riemann"], [129, "changes-to-riemann"], [130, "changes-to-riemann"], [131, "changes-to-riemann"], [132, "changes-to-riemann"], [133, "changes-to-riemann"], [134, "changes-to-riemann"], [135, "changes-to-riemann"], [136, "changes-to-riemann"], [137, "changes-to-riemann"]], "Changes to amrclaw": [[20, "changes-to-amrclaw"], [118, "changes-to-amrclaw"], [119, "changes-to-amrclaw"], [120, "changes-to-amrclaw"], [121, "changes-to-amrclaw"], [122, "changes-to-amrclaw"], [123, "changes-to-amrclaw"], [124, "changes-to-amrclaw"], [125, "changes-to-amrclaw"], [126, "changes-to-amrclaw"], [127, "changes-to-amrclaw"], [128, "changes-to-amrclaw"], [129, "changes-to-amrclaw"], [130, "changes-to-amrclaw"], [131, "changes-to-amrclaw"], [132, "changes-to-amrclaw"], [133, "changes-to-amrclaw"], [134, "changes-to-amrclaw"], [135, "changes-to-amrclaw"], [136, "changes-to-amrclaw"], [137, "changes-to-amrclaw"]], "Changes to geoclaw": [[20, "changes-to-geoclaw"], [118, "changes-to-geoclaw"], [119, "changes-to-geoclaw"], [120, "changes-to-geoclaw"], [121, "changes-to-geoclaw"], [122, "changes-to-geoclaw"], [123, "changes-to-geoclaw"], [124, "changes-to-geoclaw"], [125, "changes-to-geoclaw"], [126, "changes-to-geoclaw"], [127, "changes-to-geoclaw"], [128, "changes-to-geoclaw"], [129, "changes-to-geoclaw"], [130, "changes-to-geoclaw"], [131, "changes-to-geoclaw"], [132, "changes-to-geoclaw"], [133, "changes-to-geoclaw"], [134, "changes-to-geoclaw"], [135, "changes-to-geoclaw"], [136, "changes-to-geoclaw"], [137, "changes-to-geoclaw"]], "Changes to PyClaw": [[20, "changes-to-pyclaw"], [117, "changes-to-pyclaw"], [118, "changes-to-pyclaw"], [119, "changes-to-pyclaw"], [120, "changes-to-pyclaw"], [121, "changes-to-pyclaw"], [122, "changes-to-pyclaw"], [123, "changes-to-pyclaw"], [124, "changes-to-pyclaw"], [125, "changes-to-pyclaw"], [126, "changes-to-pyclaw"], [127, "changes-to-pyclaw"], [128, "changes-to-pyclaw"], [129, "changes-to-pyclaw"], [130, "changes-to-pyclaw"], [131, "changes-to-pyclaw"], [132, "changes-to-pyclaw"], [133, "changes-to-pyclaw"], [134, "changes-to-pyclaw"], [135, "changes-to-pyclaw"], [136, "changes-to-pyclaw"], [137, "changes-to-pyclaw"]], "Other Clawpack Repositories": [[20, "other-clawpack-repositories"], [118, "other-clawpack-repositories"], [126, "other-clawpack-repositories"], [127, "other-clawpack-repositories"], [128, "other-clawpack-repositories"], [129, "other-clawpack-repositories"], [130, "other-clawpack-repositories"], [131, "other-clawpack-repositories"], [132, "other-clawpack-repositories"], [133, "other-clawpack-repositories"], [134, "other-clawpack-repositories"], [135, "other-clawpack-repositories"], [136, "other-clawpack-repositories"], [137, "other-clawpack-repositories"]], "Converting from Clawpack 4.3 to 4.6": [[21, "converting-from-clawpack-4-3-to-4-6"]], "Converting from Clawpack 4.6 to 5.0": [[22, "converting-from-clawpack-4-6-to-5-0"]], "Python conversion tool": [[22, "python-conversion-tool"]], "Clawpack 4.x links": [[23, "clawpack-4-x-links"]], "Changes in Clawpack 5.0": [[24, "changes-in-clawpack-5-0"]], "PyClaw in 5.0": [[24, "pyclaw-in-5-0"]], "Fortran package changes": [[24, "fortran-package-changes"]], "Changes to input parameters in setrun.py from 4.x to 5.0": [[24, "changes-to-input-parameters-in-setrun-py-from-4-x-to-5-0"]], "Changes to general parameters": [[24, "changes-to-general-parameters"]], "Changes to AMR parameters": [[24, "changes-to-amr-parameters"]], "Changes to GeoClaw parameters": [[24, "changes-to-geoclaw-parameters"]], "Changes to plotting routines": [[24, "changes-to-plotting-routines"]], "Clawpack components": [[25, "clawpack-components"]], "Other repositories": [[25, "other-repositories"]], "Clawpack Community": [[26, "clawpack-community"]], "User Workshops, Clinics, and Tutorials": [[26, "user-workshops-clinics-and-tutorials"]], "Available for streaming": [[26, "available-for-streaming"]], "Upcoming": [[26, "upcoming"], [26, "id1"]], "Recent": [[26, "recent"]], "Developer Workshops and Sprint Sessions": [[26, "developer-workshops-and-sprint-sessions"]], "Previous": [[26, "previous"]], "Other Clawpack events": [[26, "other-clawpack-events"]], "Contents": [[27, "id1"], [30, "contents"], [42, "contents"], [70, "contents"], [82, "contents"], [88, "contents"], [98, "contents"], [104, "contents"], [116, "contents"], [142, "contents"]], "Full Table of Contents": [[27, "full-table-of-contents"]], "Overview and Getting Started": [[27, "overview-and-getting-started"]], "Examples and Applications": [[27, "examples-and-applications"]], "Classic, AMRClaw, and GeoClaw": [[27, "classic-amrclaw-and-geoclaw"]], "Using the Fortran codes": [[27, "using-the-fortran-codes"]], "AMRClaw: adaptive mesh refinement": [[27, "amrclaw-adaptive-mesh-refinement"]], "GeoClaw: geophysical flows": [[27, "geoclaw-geophysical-flows"]], "PyClaw": [[27, "pyclaw"], [38, "pyclaw"], [96, "pyclaw"], [116, "pyclaw"], [160, "pyclaw"]], "Riemann": [[27, "riemann"]], "VisClaw: Plotting and Visualization Tools": [[27, "visclaw-plotting-and-visualization-tools"]], "Migrating applications from older versions of Clawpack": [[27, "migrating-applications-from-older-versions-of-clawpack"]], "Developers\u2019 resources": [[27, "developers-resources"]], "References": [[27, "references"], [56, "references"]], "Contributing examples and applications": [[28, "contributing-examples-and-applications"]], "current_data": [[29, "current-data"]], "Attributes of current_data:": [[29, "attributes-of-current-data"]], "Developers\u2019 Guide": [[30, "developers-guide"]], "Guidelines for contributing": [[30, "guidelines-for-contributing"]], "Reporting and fixing bugs": [[30, "reporting-and-fixing-bugs"]], "Developer communication": [[30, "developer-communication"]], "Installation instructions for developers": [[30, "installation-instructions-for-developers"]], "Cloning the most recent code from Github": [[30, "cloning-the-most-recent-code-from-github"]], "Checking out the master branch on each repository": [[30, "checking-out-the-master-branch-on-each-repository"]], "Updating to the latest master branch": [[30, "updating-to-the-latest-master-branch"]], "Never commit to master": [[30, "never-commit-to-master"]], "Adding your fork as a remote": [[30, "adding-your-fork-as-a-remote"]], "Modifying code": [[30, "modifying-code"]], "Issuing a pull request": [[30, "issuing-a-pull-request"]], "Testing a pull request": [[30, "testing-a-pull-request"]], "Top-level pull requests": [[30, "top-level-pull-requests"]], "Git workflow": [[30, "git-workflow"]], "Catching errors with Pyflakes and Pylint": [[30, "catching-errors-with-pyflakes-and-pylint"]], "Checking test coverage": [[30, "checking-test-coverage"]], "Trouble-Shooting Tips": [[30, "trouble-shooting-tips"]], "Docker for Clawpack": [[31, "docker-for-clawpack"]], "Using Version 5.9.0 or above": [[31, "using-version-5-9-0-or-above"]], "Getting started": [[31, "getting-started"]], "Stopping a container": [[31, "stopping-a-container"]], "Restarting a container": [[31, "restarting-a-container"]], "Running Jupyter notebooks": [[31, "running-jupyter-notebooks"]], "Moving files between the docker container and the host machine": [[31, "moving-files-between-the-docker-container-and-the-host-machine"]], "Some other useful docker commands": [[31, "some-other-useful-docker-commands"]], "Creating your own docker image": [[31, "creating-your-own-docker-image"]], "Dockerfiles for binder": [[31, "dockerfiles-for-binder"]], "dtopotools module for moving topography": [[32, "dtopotools-module-for-moving-topography"]], "Documentation auto-generated from the module docstrings": [[32, "module-clawpack.geoclaw.dtopotools"], [35, "module-clawpack.geoclaw.fgmax_tools"], [37, "module-clawpack.geoclaw.fgout_tools"], [51, "module-clawpack.geoclaw.util"], [63, "module-clawpack.geoclaw.kmltools"], [164, "module-clawpack.geoclaw.topotools"]], "Fortran 77 vs. Fortran 90 files": [[33, "fortran-77-vs-fortran-90-files"]], "Fixed grid monitoring (fgmax)": [[34, "fixed-grid-monitoring-fgmax"]], "Input file specification": [[34, "input-file-specification"], [36, "input-file-specification"]], "Different point styles": [[34, "different-point-styles"]], "Other attributes": [[34, "other-attributes"]], "Values to monitor": [[34, "values-to-monitor"]], "Choice of interpolation procedure": [[34, "choice-of-interpolation-procedure"], [36, "choice-of-interpolation-procedure"]], "A simple example": [[34, "a-simple-example"], [36, "a-simple-example"]], "Processing and plotting fgmax output": [[34, "processing-and-plotting-fgmax-output"]], "Format of the output files": [[34, "format-of-the-output-files"]], "fgmax examples": [[34, "fgmax-examples"]], "fgmax_tools module for working with fgmax grids": [[35, "fgmax-tools-module-for-working-with-fgmax-grids"]], "Fixed grid output (fgout)": [[36, "fixed-grid-output-fgout"]], "Format of fgout output": [[36, "format-of-fgout-output"]], "Using setplot.py to produce plots": [[36, "using-setplot-py-to-produce-plots"]], "Reading and plotting fgout arrays directly": [[36, "reading-and-plotting-fgout-arrays-directly"]], "fgout grid registration": [[36, "fgout-grid-registration"]], "fgout examples": [[36, "fgout-examples"]], "fgout_tools module for working with fgout grids": [[37, "fgout-tools-module-for-working-with-fgout-grids"]], "Running an example": [[38, "running-an-example"], [39, "running-an-example"], [40, "running-an-example"]], "Classic": [[38, "classic"], [39, "classic"], [160, "classic"]], "Testing your Fortran installation and running an example": [[39, "testing-your-fortran-installation-and-running-an-example"]], "More examples": [[39, "more-examples"]], "Testing a PyClaw installation and running an example": [[40, "testing-a-pyclaw-installation-and-running-an-example"]], "From the Jupyter notebook": [[40, "from-the-jupyter-notebook"]], "From the IPython interpreter": [[40, "from-the-ipython-interpreter"]], "From the command line": [[40, "from-the-command-line"], [93, "from-the-command-line"]], "Specifying flagregions for adaptive refinement": [[41, "specifying-flagregions-for-adaptive-refinement"]], "Using ruled rectangles as flagregions": [[41, "using-ruled-rectangles-as-flagregions"]], "Force Cells to be Dry Initially": [[42, "force-cells-to-be-dry-initially"]], "Sample topography from a 1/3 arcsecond DEM": [[42, "sample-topography-from-a-1-3-arcsecond-dem"], [70, "sample-topography-from-a-1-3-arcsecond-dem"]], "Creating the force_dry_init array": [[42, "creating-the-force-dry-init-array"]], "Create file to read into GeoClaw": [[42, "create-file-to-read-into-geoclaw"]], "Usage in GeoClaw Fortran code": [[42, "usage-in-geoclaw-fortran-code"]], "Internal GeoClaw modifications": [[42, "internal-geoclaw-modifications"]], "Fortran version": [[43, "fortran-version"]], "Makefiles": [[43, "makefiles"]], "More tips": [[43, "more-tips"]], "Fortran Compilers": [[44, "fortran-compilers"]], "FC environment variable": [[44, "fc-environment-variable"]], "FFLAGS environment variable": [[44, "fflags-environment-variable"]], "LFLAGS environment variable": [[44, "lflags-environment-variable"]], "Pre-Processor and the PPFLAGS environment variable": [[44, "pre-processor-and-the-ppflags-environment-variable"]], "gfortran compiler": [[44, "gfortran-compiler"]], "Intel fortran compiler": [[44, "intel-fortran-compiler"]], "Examples from the book FVMHP": [[45, "examples-from-the-book-fvmhp"]], "Available examples": [[45, "available-examples"]], "YouTube Videos": [[45, "youtube-videos"]], "Clawpack Gallery": [[46, "clawpack-gallery"]], "Gauges": [[47, "gauges"]], "Gauge parameters in setrun": [[47, "gauge-parameters-in-setrun"]], "Plotting tools": [[47, "plotting-tools"]], "Plotting gauge locations": [[47, "plotting-gauge-locations"]], "GeoClaw Description and Detailed Contents": [[48, "geoclaw-description-and-detailed-contents"]], "GeoClaw in One Space Dimension": [[49, "geoclaw-in-one-space-dimension"]], "Coordinate systems": [[49, "coordinate-systems"]], "Uniform and mapped grids": [[49, "uniform-and-mapped-grids"]], "Topograpy data": [[49, "topograpy-data"]], "Moving topograpy (dtopo) data": [[49, "moving-topograpy-dtopo-data"]], "Getting started with GeoClaw": [[50, "getting-started-with-geoclaw"]], "Running a GeoClaw code": [[50, "running-a-geoclaw-code"]], "Topography": [[50, "topography"]], "Plotting GeoClaw results": [[50, "plotting-geoclaw-results"]], "Setting up a new example": [[50, "setting-up-a-new-example"]], "geoclaw.util module of utility functions": [[51, "geoclaw-util-module-of-utility-functions"]], "Cautionary Hints on using GeoClaw": [[52, "cautionary-hints-on-using-geoclaw"]], "Tsunami hazard modeling": [[52, "tsunami-hazard-modeling"]], "GeoClaw plotting tools": [[53, "geoclaw-plotting-tools"]], "Plotting water depth or surface elevation": [[53, "plotting-water-depth-or-surface-elevation"]], "Tips on latitude-longitude coordinate axes": [[53, "tips-on-latitude-longitude-coordinate-axes"]], "Keeping track of repository versions with Git": [[54, "keeping-track-of-repository-versions-with-git"]], "Visualizing GeoClaw results in Google Earth": [[55, "visualizing-geoclaw-results-in-google-earth"]], "Basic requirements": [[55, "basic-requirements"]], "Optional GDAL library": [[55, "optional-gdal-library"]], "An example : The Chile 2010 tsunami event": [[55, "an-example-the-chile-2010-tsunami-event"]], "Plotting attributes needed for Google Earth": [[55, "plotting-attributes-needed-for-google-earth"]], "plotdata attributes": [[55, "plotdata-attributes"]], "plotfigure attributes": [[55, "plotfigure-attributes"]], "Creating the figures": [[55, "creating-the-figures"]], "plotaxes attributes": [[55, "plotaxes-attributes"]], "plotitem attributes": [[55, "plotitem-attributes"]], "Adding a colorbar overlay": [[55, "adding-a-colorbar-overlay"]], "Gauge plots": [[55, "gauge-plots"]], "Additional plotdata attributes": [[55, "additional-plotdata-attributes"]], "Plotting tips": [[55, "plotting-tips"]], "KML and KMZ files": [[55, "kml-and-kmz-files"]], "Tiling images for faster loading": [[55, "tiling-images-for-faster-loading"]], "Removing aliasing artifacts": [[55, "removing-aliasing-artifacts"]], "Creating multiple figures at different resolutions": [[55, "creating-multiple-figures-at-different-resolutions"]], "Mapping topography data to latitude/longitude coordinates": [[55, "mapping-topography-data-to-latitude-longitude-coordinates"]], "Publishing your results": [[55, "id1"]], "Using the GPU version of Clawpack": [[56, "using-the-gpu-version-of-clawpack"]], "Grid registration": [[57, "grid-registration"]], "NetCDF files": [[57, "netcdf-files"]], "Guide for updating this documentation": [[58, "guide-for-updating-this-documentation"]], "Git branches and tags": [[58, "git-branches-and-tags"]], "Configuration and style files": [[58, "configuration-and-style-files"]], "Updating the docs for a new release": [[58, "updating-the-docs-for-a-new-release"]], "To generate docs including previous versions": [[58, "to-generate-docs-including-previous-versions"]], "Updating for a new major version": [[58, "updating-for-a-new-major-version"]], "Updating the gallery": [[58, "updating-the-gallery"]], "Updating the webpages": [[58, "updating-the-webpages"]], "Extra files for webpages not built by Sphinx": [[58, "extra-files-for-webpages-not-built-by-sphinx"]], "Pages from other clawpack repositories": [[58, "pages-from-other-clawpack-repositories"]], "Guide for doing a Clawpack release": [[59, "guide-for-doing-a-clawpack-release"]], "Preparation": [[59, "preparation"]], "Version numbers": [[59, "version-numbers"]], "Release candidates": [[59, "release-candidates"]], "Create a tar file and a Github release": [[59, "create-a-tar-file-and-a-github-release"]], "Final release": [[59, "final-release"]], "Pypi": [[59, "pypi"]], "Zenodo": [[59, "zenodo"]], "Open Science Framework (OSF)": [[59, "open-science-framework-osf"]], "Updating the documentation": [[59, "updating-the-documentation"]], "Updating the apps repository": [[59, "updating-the-apps-repository"]], "Updating the Dockerfile": [[59, "updating-the-dockerfile"]], "Installing Clawpack": [[60, "installing-clawpack"]], "Next steps:": [[60, "next-steps"], [61, "next-steps"], [62, "next-steps"]], "Options for installing Clawpack Fortran codes": [[61, "options-for-installing-clawpack-fortran-codes"]], "tar file": [[61, "tar-file"]], "git clone": [[61, "git-clone"]], "pip install instructions": [[62, "pip-install-instructions"]], "Quick Installation of PyClaw with pip": [[62, "quick-installation-of-pyclaw-with-pip"]], "Quick Installation of all packages with pip": [[62, "quick-installation-of-all-packages-with-pip"]], "Using pip to install a different version": [[62, "using-pip-to-install-a-different-version"]], "Experimenting with code in the examples directories": [[62, "experimenting-with-code-in-the-examples-directories"]], "Troubleshooting pip install": [[62, "troubleshooting-pip-install"]], "kmltools module of utility functions": [[63, "kmltools-module-of-utility-functions"]], "Lagrangian gauges for particle tracking": [[64, "lagrangian-gauges-for-particle-tracking"]], "Specifying Lagrangian Gauges": [[64, "specifying-lagrangian-gauges"]], "Visclaw tools for plotting": [[64, "visclaw-tools-for-plotting"]], "An alternative using fgout grids": [[64, "an-alternative-using-fgout-grids"]], "Clawpack Makefiles": [[66, "clawpack-makefiles"]], "Applications directory Makefiles": [[66, "applications-directory-makefiles"]], "output": [[66, "output"]], "plots": [[66, "plots"]], "Variables": [[66, "variables"]], "Compiler flags": [[66, "compiler-flags"]], "Duplicate Base Source Name": [[66, "duplicate-base-source-name"]], "Library routines in Makefiles": [[67, "library-routines-in-makefiles"]], "Replacing files with the same name as library files": [[67, "replacing-files-with-the-same-name-as-library-files"]], "Using a modified library routine with a different name": [[67, "using-a-modified-library-routine-with-a-different-name"]], "Manning friction term": [[68, "manning-friction-term"]], "The mapc2p function": [[69, "the-mapc2p-function"]], "Marching Front algorithm": [[70, "marching-front-algorithm"]], "Function arguments": [[70, "function-arguments"]], "output array": [[70, "output-array"]], "creating a masked array": [[70, "creating-a-masked-array"]], "topofile mask for initializing dry points": [[70, "topofile-mask-for-initializing-dry-points"]], "fgmax points": [[70, "fgmax-points"]], "flag regions": [[70, "flag-regions"]], "The mask argument": [[70, "the-mask-argument"]], "The previous_pts_chosen argument": [[70, "the-previous-pts-chosen-argument"]], "Finding all points below a given elevation": [[70, "finding-all-points-below-a-given-elevation"]], "Create a buffer zone along shore": [[70, "create-a-buffer-zone-along-shore"]], "Choose points only near shore": [[70, "choose-points-only-near-shore"]], "Write out the masked array indicating fgmax points": [[70, "write-out-the-masked-array-indicating-fgmax-points"]], "Creating an AMR flag region": [[70, "creating-an-amr-flag-region"]], "Determining dry areas below MHW": [[70, "determining-dry-areas-below-mhw"]], "Plotting using Matlab": [[71, "plotting-using-matlab"]], "The Matlab search path": [[71, "the-matlab-search-path"]], "Creating output files": [[71, "creating-output-files"]], "The plotclaw command": [[71, "the-plotclaw-command"]], "The setplot file": [[71, "the-setplot-file"]], "The afterframe file": [[71, "the-afterframe-file"]], "Getting help": [[71, "getting-help"]], "Trouble shooting": [[71, "trouble-shooting"]], "Output files not found": [[71, "output-files-not-found"]], "MaxFrames not set": [[71, "maxframes-not-set"]], "Switching examples": [[71, "switching-examples"]], "Matlab Gallery": [[71, "matlab-gallery"]], "Nearshore interpolation": [[72, "nearshore-interpolation"]], "Using NetCDF output": [[73, "using-netcdf-output"]], "Creating a new application directory": [[74, "creating-a-new-application-directory"]], "Copying an existing example": [[74, "copying-an-existing-example"]], "Earthquake sources: Fault slip and the Okada model": [[75, "earthquake-sources-fault-slip-and-the-okada-model"]], "Fault slip on rectangular subfaults": [[75, "fault-slip-on-rectangular-subfaults"]], "Okada model": [[75, "okada-model"]], "Kinematic rupture": [[75, "kinematic-rupture"]], "Fault slip on triangular subfaults": [[75, "fault-slip-on-triangular-subfaults"]], "Using OpenMP": [[76, "using-openmp"]], "Using OpenMP with AMR": [[76, "using-openmp-with-amr"]], "Fixed grid output in GeoClaw": [[76, "fixed-grid-output-in-geoclaw"]], "Output data sytles and formats": [[77, "output-data-sytles-and-formats"]], "Output style": [[77, "output-style"]], "Output data formats": [[77, "output-data-formats"]], "ASCII output data format": [[77, "ascii-output-data-format"]], "fort.t0002": [[77, "fort-t0002"]], "fort.q0002": [[77, "fort-q0002"]], "Raw binary output data formats": [[77, "raw-binary-output-data-formats"]], "NetCDF output data format": [[77, "netcdf-output-data-format"]], "Output of aux arrays": [[77, "output-of-aux-arrays"]], "Which Clawpack solver should I use?": [[78, "which-clawpack-solver-should-i-use"]], "Installation and user interface": [[78, "installation-and-user-interface"]], "Algorithmic differences": [[78, "algorithmic-differences"]], "Parallel computing": [[78, "parallel-computing"]], "Clawpack Community Photos": [[79, "clawpack-community-photos"]], "2016 Developers\u2019 workshop at University of Washington": [[79, "id1"]], "2015 Developers\u2019 workshop at University of Utah": [[79, "id2"]], "2014 HPC3 workshop at KAUST": [[79, "id3"]], "2013 Claw-Dev workshop at UW": [[79, "id4"]], "2012 HPC3 workshop at KAUST": [[79, "id6"]], "2011 coding sprints at UW": [[79, "coding-sprints-at-uw"]], "2010 GeoClaw hacking UW": [[79, "geoclaw-hacking-uw"]], "Plotting examples": [[80, "plotting-examples"]], "Plotting with Visclaw": [[81, "plotting-with-visclaw"]], "Plotting as post-processing": [[81, "plotting-as-post-processing"]], "Plotting on the fly": [[81, "plotting-on-the-fly"]], "Plotting hints and FAQ": [[82, "plotting-hints-and-faq"]], "What\u2019s the difference between make .plots and make plots ?": [[82, "what-s-the-difference-between-make-plots-and-make-plots"]], "How to plot a something other than a component of q?": [[82, "how-to-plot-a-something-other-than-a-component-of-q"]], "How to add another curve to a plot, e.g. the true solution?": [[82, "how-to-add-another-curve-to-a-plot-e-g-the-true-solution"]], "How to change the title in a plot?": [[82, "how-to-change-the-title-in-a-plot"]], "How to specify outdir, the directory to find fort.* files for plotting?": [[82, "how-to-specify-outdir-the-directory-to-find-fort-files-for-plotting"]], "How to specify a different outdir for some plot item?": [[82, "how-to-specify-a-different-outdir-for-some-plot-item"]], "How to set plot parameters that are not provided as attributes of ClawPlotItem?": [[82, "how-to-set-plot-parameters-that-are-not-provided-as-attributes-of-clawplotitem"]], "How to change the size or background color of a figure?": [[82, "how-to-change-the-size-or-background-color-of-a-figure"]], "Specifying colormaps for pcolor or contourf plots": [[82, "specifying-colormaps-for-pcolor-or-contourf-plots"]], "How to debug setplot.py?": [[82, "how-to-debug-setplot-py"]], "Plotting routines for GeoClaw": [[83, "plotting-routines-for-geoclaw"]], "Plotting options in Python": [[84, "plotting-options-in-python"]], "Producing html plots from the command line": [[84, "producing-html-plots-from-the-command-line"]], "Producing a latex file with plots from the command line": [[84, "producing-a-latex-file-with-plots-from-the-command-line"]], "Setting plot parameters with a setplot function": [[84, "setting-plot-parameters-with-a-setplot-function"]], "Interactive plotting with Iplotclaw": [[84, "interactive-plotting-with-iplotclaw"]], "Access to current_data": [[84, "access-to-current-data"]], "printframes": [[84, "printframes"]], "Specifying what and how to plot": [[84, "specifying-what-and-how-to-plot"]], "Installation Prerequisites": [[85, "installation-prerequisites"]], "Operating system": [[85, "operating-system"]], "Fortran": [[85, "fortran"]], "Python": [[85, "python"]], "pip": [[85, "pip"]], "Git": [[85, "git"]], "About PyClaw": [[86, "about-pyclaw"]], "Contributors": [[86, "contributors"]], "PyClaw Basics": [[87, "pyclaw-basics"]], "Understanding Pyclaw Classes": [[88, "understanding-pyclaw-classes"]], "Flow of a Pyclaw Simulation": [[88, "flow-of-a-pyclaw-simulation"]], "Creation of a Pyclaw Solution": [[88, "creation-of-a-pyclaw-solution"]], "Creation of a Pyclaw Solver": [[88, "creation-of-a-pyclaw-solver"]], "Creating and Running a Simulation with Controller": [[88, "creating-and-running-a-simulation-with-controller"]], "Restarting a simulation": [[88, "restarting-a-simulation"]], "Outputting aux values": [[88, "outputting-aux-values"]], "Outputting derived quantities": [[88, "outputting-derived-quantities"], [98, "outputting-derived-quantities"]], "Porting a problem from Clawpack 4.6.x to PyClaw": [[89, "porting-a-problem-from-clawpack-4-6-x-to-pyclaw"]], "Running PyClaw in the cloud": [[90, "running-pyclaw-in-the-cloud"]], "Sage Math Cloud": [[90, "sage-math-cloud"]], "Pyclaw Controller Class": [[91, "pyclaw-controller-class"]], "pyclaw.controller.Controller": [[91, "pyclaw-controller-controller"]], "Pyclaw Limiters": [[92, "pyclaw-limiters"]], "clawpack.pyclaw.limiters.tvd": [[92, "module-clawpack.pyclaw.limiters.tvd"]], "CFL Independent Limiters": [[92, "cfl-independent-limiters"]], "CFL Dependent Limiters": [[92, "cfl-dependent-limiters"]], "Working with PyClaw\u2019s built-in examples": [[93, "working-with-pyclaw-s-built-in-examples"]], "Running and plotting examples": [[93, "running-and-plotting-examples"]], "Interactively in IPython": [[93, "interactively-in-ipython"]], "Built-in examples": [[93, "built-in-examples"]], "Adding new examples": [[93, "adding-new-examples"]], "PyClaw Geometry": [[94, "pyclaw-geometry"]], "Serial Geometry Objects": [[94, "serial-geometry-objects"]], "pyclaw.geometry.Domain": [[94, "pyclaw-geometry-domain"]], "pyclaw.geometry.Patch": [[94, "pyclaw-geometry-patch"]], "pyclaw.geometry.Grid": [[94, "pyclaw-geometry-grid"]], "pyclaw.geometry.Dimension": [[94, "pyclaw-geometry-dimension"]], "Parallel Geometry Objects": [[94, "parallel-geometry-objects"]], "petclaw.geometry.Domain": [[94, "petclaw-geometry-domain"]], "petclaw.geometry.Patch": [[94, "petclaw-geometry-patch"]], "Going Further": [[95, "going-further"]], "PyClaw installation": [[96, "pyclaw-installation"]], "Features": [[96, "features"]], "PyClaw Documentation": [[96, "pyclaw-documentation"]], "PyClaw Modules reference documentation": [[96, "pyclaw-modules-reference-documentation"]], "Riemann Solvers reference documentation": [[96, "riemann-solvers-reference-documentation"]], "Indices and tables": [[96, "indices-and-tables"]], "Citing PyClaw": [[96, "citing-pyclaw"]], "Pyclaw Input/Output Package": [[97, "pyclaw-input-output-package"]], "pyclaw.fileio.ascii": [[97, "module-clawpack.pyclaw.fileio.ascii"]], "pyclaw.fileio.binary": [[97, "module-clawpack.pyclaw.fileio.binary"]], "pyclaw.fileio.hdf5": [[97, "module-clawpack.pyclaw.fileio.hdf5"]], "pyclaw.fileio.netcdf": [[97, "module-clawpack.pyclaw.fileio.netcdf"]], "PyClaw output": [[98, "pyclaw-output"]], "Output frames": [[98, "output-frames"]], "When output is saved/written": [[98, "when-output-is-saved-written"]], "Where and how output is written": [[98, "where-and-how-output-is-written"]], "What output is written": [[98, "what-output-is-written"]], "Outputting functionals": [[98, "outputting-functionals"]], "Using gauges": [[98, "using-gauges"]], "Logging": [[98, "logging"]], "Running in parallel": [[99, "running-in-parallel"]], "Installing PETSc": [[99, "installing-petsc"]], "Testing your installation": [[99, "testing-your-installation"], [160, "testing-your-installation"]], "Running and plotting an example": [[99, "running-and-plotting-an-example"]], "Tips for making your application run correctly in parallel": [[99, "tips-for-making-your-application-run-correctly-in-parallel"]], "Passing options to PETSc": [[99, "passing-options-to-petsc"]], "Plotting PyClaw results": [[100, "plotting-pyclaw-results"]], "Basics": [[100, "basics"]], "Plotting result from parallel runs": [[100, "plotting-result-from-parallel-runs"]], "Setting up your own problem": [[101, "setting-up-your-own-problem"]], "Writing the initialization script": [[101, "writing-the-initialization-script"]], "Setting initial conditions": [[101, "setting-initial-conditions"]], "Setting auxiliary variables": [[101, "setting-auxiliary-variables"]], "Setting boundary conditions": [[101, "setting-boundary-conditions"]], "Setting solver options": [[101, "setting-solver-options"]], "Using your own Riemann solver": [[101, "using-your-own-riemann-solver"]], "Adding source terms": [[101, "adding-source-terms"]], "Setting up the Makefile": [[101, "setting-up-the-makefile"]], "Riemann Solver Package": [[102, "riemann-solver-package"]], "Acoustics": [[102, "acoustics"]], "Advection": [[102, "advection"]], "Burgers Equation": [[102, "burgers-equation"]], "Euler Equations": [[102, "euler-equations"]], "Shallow Water Equations": [[102, "shallow-water-equations"]], "PyClaw Solutions": [[103, "pyclaw-solutions"]], "pyclaw.solution.Solution": [[103, "pyclaw-solution-solution"]], "Using PyClaw\u2019s solvers: Classic and SharpClaw": [[104, "using-pyclaw-s-solvers-classic-and-sharpclaw"]], "SharpClaw Solvers": [[104, "sharpclaw-solvers"]], "pyclaw.sharpclaw": [[104, "pyclaw-sharpclaw"]], "Pyclaw Classic Clawpack Solvers": [[104, "pyclaw-classic-clawpack-solvers"]], "pyclaw.classic.solver": [[104, "pyclaw-classic-solver"]], "Change to Custom BC Function Signatures": [[104, "change-to-custom-bc-function-signatures"]], "Installing PyClaw": [[105, "installing-pyclaw"]], "Dependencies: Python, gfortran, numpy, and matplotlib": [[105, "dependencies-python-gfortran-numpy-and-matplotlib"]], "Obtaining Python, numpy, and matplotlib": [[105, "obtaining-python-numpy-and-matplotlib"]], "Clawpack": [[105, "clawpack"]], "Testing your installation with nose": [[105, "testing-your-installation-with-nose"]], "Next steps": [[105, "next-steps"]], "PyClaw State": [[106, "pyclaw-state"]], "Serial pyclaw.state.State": [[106, "serial-pyclaw-state-state"]], "Parallel petclaw.state.State": [[106, "parallel-petclaw-state-state"]], "Troubleshooting": [[107, "troubleshooting"], [165, "troubleshooting"]], "Compilation errors": [[107, "compilation-errors"]], "Use Fortran-ordered arrays": [[107, "use-fortran-ordered-arrays"]], "Installation": [[107, "installation"]], "PyClaw tutorial: Solve the acoustics equations": [[108, "pyclaw-tutorial-solve-the-acoustics-equations"]], "The Solver": [[108, "the-solver"]], "The domain": [[108, "the-domain"]], "Initial condition": [[108, "initial-condition"]], "Problem-specific parameters": [[108, "problem-specific-parameters"]], "The controller": [[108, "the-controller"]], "Pyclaw Utility Module": [[109, "pyclaw-utility-module"]], "pyclaw.util": [[109, "module-clawpack.pyclaw.util"]], "Python Hints": [[110, "python-hints"]], "Dropping support for Python 2.7": [[110, "dropping-support-for-python-2-7"]], "References and tutorials": [[110, "references-and-tutorials"]], "Notebooks": [[110, "notebooks"]], "Python path": [[111, "python-path"]], "whichclaw.py": [[111, "whichclaw-py"]], "Which version was imported?": [[111, "which-version-was-imported"]], "sys.path": [[111, "sys-path"]], "easy-install.pth": [[111, "easy-install-pth"]], "PYTHONPATH": [[111, "pythonpath"], [146, "pythonpath"]], "qinit default routines": [[112, "qinit-default-routines"]], "qinit routine in GeoClaw": [[112, "qinit-routine-in-geoclaw"]], "Quick start guide for storm surge modeling": [[113, "quick-start-guide-for-storm-surge-modeling"]], "Quick start guide for tsunami modeling": [[114, "quick-start-guide-for-tsunami-modeling"]], "AMR refinement criteria": [[115, "amr-refinement-criteria"]], "Flagging criteria": [[115, "flagging-criteria"]], "flag2refine": [[115, "flag2refine"]], "Richardson extrapolation": [[115, "richardson-extrapolation"]], "Specifying AMR regions": [[115, "specifying-amr-regions"]], "Implementation": [[115, "implementation"]], "Flagging criteria in GeoClaw": [[115, "flagging-criteria-in-geoclaw"]], "Regression testing": [[116, "regression-testing"]], "Running the tests": [[116, "running-the-tests"], [116, "id2"]], "Fortran codes": [[116, "fortran-codes"]], "Travis continuous integration": [[116, "travis-continuous-integration"]], "Diff tools for checking test output": [[116, "diff-tools-for-checking-test-output"]], "chardiff tool for line-by-line comparison of output files": [[116, "chardiff-tool-for-line-by-line-comparison-of-output-files"]], "imagediff tool for pixel comparison of plots": [[116, "imagediff-tool-for-pixel-comparison-of-plots"]], "Running and writing tests in PyClaw": [[116, "running-and-writing-tests-in-pyclaw"]], "Running serial tests simultaneously": [[116, "running-serial-tests-simultaneously"]], "Running a specific test": [[116, "running-a-specific-test"]], "Doctests": [[116, "doctests"]], "Writing New Tests": [[116, "writing-new-tests"]], "v5.0.0 release notes": [[117, "v5-0-0-release-notes"]], "Changes to classic, riemann, amrclaw, geoclaw, visclaw": [[117, "changes-to-classic-riemann-amrclaw-geoclaw-visclaw"]], "v5.10.0 release notes": [[118, "v5-10-0-release-notes"]], "v5.1.0 release notes": [[119, "v5-1-0-release-notes"]], "v5.2.0 release notes": [[120, "v5-2-0-release-notes"]], "v5.2.1 release notes": [[121, "v5-2-1-release-notes"]], "v5.2.2 release notes": [[122, "v5-2-2-release-notes"]], "v5.3.0 release notes": [[123, "v5-3-0-release-notes"]], "v5.3.1 release notes": [[124, "v5-3-1-release-notes"]], "v5.4.0 release notes": [[125, "v5-4-0-release-notes"]], "Global changes": [[125, "global-changes"]], "v5.4.1 release notes": [[126, "v5-4-1-release-notes"]], "Changes to documentation": [[126, "changes-to-documentation"], [127, "changes-to-documentation"]], "v5.5.0 release notes": [[127, "v5-5-0-release-notes"]], "v5.6.0 release notes": [[128, "v5-6-0-release-notes"]], "v5.6.1 release notes": [[129, "v5-6-1-release-notes"]], "v5.7.0 release notes": [[130, "v5-7-0-release-notes"]], "Python support": [[130, "python-support"]], "v5.7.1 release notes": [[131, "v5-7-1-release-notes"]], "v5.8.0 release notes": [[132, "v5-8-0-release-notes"]], "v5.8.1 release notes": [[133, "v5-8-1-release-notes"]], "v5.8.2 release notes": [[134, "v5-8-2-release-notes"]], "v5.9.0 release notes": [[135, "v5-9-0-release-notes"]], "v5.9.1 release notes": [[136, "v5-9-1-release-notes"]], "v5.9.2 release notes": [[137, "v5-9-2-release-notes"]], "Releases of Clawpack and release notes": [[138, "releases-of-clawpack-and-release-notes"]], "Other notes:": [[138, "other-notes"]], "Releases:": [[138, "id1"]], "Clawpack 4.x": [[138, "clawpack-4-x"]], "Checkpointing and restarting": [[139, "checkpointing-and-restarting"]], "Checkpointing a computation": [[139, "checkpointing-a-computation"]], "Restarting a computation": [[139, "restarting-a-computation"]], "Modifying the Makefile for a restart": [[139, "modifying-the-makefile-for-a-restart"]], "Output files after a restart": [[139, "output-files-after-a-restart"]], "Riemann solvers": [[140, "riemann-solvers"]], "One-dimensional Riemann solver": [[140, "one-dimensional-riemann-solver"]], "Pointwise Riemann solvers": [[140, "pointwise-riemann-solvers"]], "f-wave Riemann solvers": [[140, "f-wave-riemann-solvers"]], "2D Riemann solvers": [[140, "d-riemann-solvers"]], "Using a custom solver": [[140, "using-a-custom-solver"]], "Adding a solver to the Riemann repository": [[140, "adding-a-solver-to-the-riemann-repository"]], "Shallow water Riemann solvers in Clawpack": [[141, "shallow-water-riemann-solvers-in-clawpack"]], "One dimension": [[141, "one-dimension"]], "Two dimensions": [[141, "two-dimensions"]], "Layered shallow water equations": [[141, "layered-shallow-water-equations"]], "Potentially useful contributions (what\u2019s missing)": [[141, "potentially-useful-contributions-whats-missing"]], "Demonstrations": [[141, "demonstrations"]], "Roe": [[141, "roe"]], "HLL": [[141, "hll"]], "Ruled Rectangles": [[142, "ruled-rectangles"]], "Relation to convex polygons": [[142, "relation-to-convex-polygons"]], "Other attributes and methods": [[142, "other-attributes-and-methods"]], "ds": [[142, "ds"]], "slu": [[142, "slu"]], "bounding_box": [[142, "bounding-box"]], "mask_outside": [[142, "mask-outside"]], "read and write, and instantiating from a file": [[142, "read-and-write-and-instantiating-from-a-file"]], "make_kml": [[142, "make-kml"]], "A GeoClaw AMR flag region": [[142, "a-geoclaw-amr-flag-region"]], "A simple rectangle": [[142, "a-simple-rectangle"]], "Defining a Ruled Rectangle covering selected cells": [[142, "defining-a-ruled-rectangle-covering-selected-cells"]], "Example covering the continental shelf": [[142, "example-covering-the-continental-shelf"]], "Setting sea_level": [[143, "setting-sea-level"]], "Set Eta Init \u2013 spatially varying initial surface elevation": [[144, "set-eta-init-spatially-varying-initial-surface-elevation"]], "Default behavior, adjusting sea level by seismic deformation": [[144, "default-behavior-adjusting-sea-level-by-seismic-deformation"]], "Other use cases": [[144, "other-use-cases"]], "setaux default routines": [[145, "setaux-default-routines"]], "setaux routine in GeoClaw": [[145, "setaux-routine-in-geoclaw"]], "Set environment variables": [[146, "set-environment-variables"]], "CLAW": [[146, "claw"]], "FC": [[146, "fc"]], "Using setplot.py to specify the desired plots": [[147, "using-setplot-py-to-specify-the-desired-plots"]], "Plotting Data Objects": [[147, "plotting-data-objects"]], "Overview": [[147, "overview"]], "Specifying classic run-time parameters in setrun.py": [[148, "specifying-classic-run-time-parameters-in-setrun-py"]], "Input": [[148, "input"], [149, "input"]], "Output": [[148, "output"], [149, "output"]], "Run-time parameters": [[148, "run-time-parameters"], [149, "run-time-parameters"]], "Specifying AMRClaw run-time parameters in setrun.py": [[149, "specifying-amrclaw-run-time-parameters-in-setrun-py"]], "Special AMR parameters": [[149, "special-amr-parameters"]], "Debugging flags for additional printing": [[149, "debugging-flags-for-additional-printing"]], "Sample setrun.py module for AMRClaw": [[150, "sample-setrun-py-module-for-amrclaw"]], "Specifying GeoClaw parameters in setrun.py": [[151, "specifying-geoclaw-parameters-in-setrun-py"]], "Additional AMR parameters": [[151, "additional-amr-parameters"]], "General geo parameters": [[151, "general-geo-parameters"]], "Topography data file parameters": [[151, "topography-data-file-parameters"]], "qinit data file parameters": [[151, "qinit-data-file-parameters"]], "Force some cells to be initially dry": [[151, "force-some-cells-to-be-initially-dry"]], "Adjust sea level in some regions": [[151, "adjust-sea-level-in-some-regions"]], "AMR refinement region parameters": [[151, "amr-refinement-region-parameters"]], "Deprecated Fixedgrid output parameters": [[151, "deprecated-fixedgrid-output-parameters"]], "Fixed grid maximum monitoring / arrival times": [[151, "fixed-grid-maximum-monitoring-arrival-times"]], "Fixed grid output": [[151, "fixed-grid-output"]], "Storm Specification Data": [[151, "storm-specification-data"]], "Sample setrun.py module for classic Clawpack": [[152, "sample-setrun-py-module-for-classic-clawpack"]], "Saving and sharing results": [[153, "saving-and-sharing-results"]], "Making webpages of plots": [[153, "making-webpages-of-plots"]], "Sharing your results": [[153, "sharing-your-results"]], "Jupyter notebooks": [[153, "jupyter-notebooks"]], "Source terms for shallow water on the sphere": [[154, "source-terms-for-shallow-water-on-the-sphere"]], "Compiling the Sphinx documentation locally": [[155, "compiling-the-sphinx-documentation-locally"]], "src1d default routines": [[156, "src1d-default-routines"]], "src1d routine in GeoClaw": [[156, "src1d-routine-in-geoclaw"]], "src default routines": [[157, "src-default-routines"]], "src routine in GeoClaw": [[157, "src-routine-in-geoclaw"]], "Storm Specification Class and Tools": [[158, "storm-specification-class-and-tools"]], "Sources for Storm Surge Data": [[159, "sources-for-storm-surge-data"]], "Timing Statistics": [[161, "timing-statistics"]], "Topography data": [[162, "topography-data"]], "Downloading topography files": [[162, "downloading-topography-files"]], "NetCDF format": [[162, "netcdf-format"]], "Topography displacement files": [[162, "topography-displacement-files"]], "qinit data file": [[162, "qinit-data-file"]], "Python tools for working with topo and dtopo": [[163, "python-tools-for-working-with-topo-and-dtopo"]], "topotools module for working with topography data": [[164, "topotools-module-for-working-with-topography-data"]], "Troubleshooting Installation": [[165, "troubleshooting-installation"]], "Troubleshooting Fortran:": [[165, "troubleshooting-fortran"]], "Setting the Fortran compiler to be used by f2py (pip)": [[165, "setting-the-fortran-compiler-to-be-used-by-f2py-pip"]], "Trouble compiling Fortran code at the command line": [[165, "trouble-compiling-fortran-code-at-the-command-line"]], "Trouble running \u201cmake .exe\u201d": [[165, "trouble-running-make-exe"]], "Trouble running \u201cmake .data\u201d": [[165, "trouble-running-make-data"]], "Trouble running \u201cmake .output\u201d": [[165, "trouble-running-make-output"]], "Trouble running \u201cmake .plots\u201d": [[165, "trouble-running-make-plots"]], "Some sources of tsunami data": [[166, "some-sources-of-tsunami-data"]], "Topography / bathymetry": [[166, "topography-bathymetry"]], "Earthquake source models": [[166, "earthquake-source-models"]], "DART buoy data": [[166, "dart-buoy-data"]], "Tide gauges": [[166, "tide-gauges"]], "User files required for the Fortran code": [[167, "user-files-required-for-the-fortran-code"]], "Specifying the initial conditions": [[167, "specifying-the-initial-conditions"]], "Specifying the Riemann solver": [[167, "specifying-the-riemann-solver"]], "Specifying boundary conditions": [[167, "specifying-boundary-conditions"]], "Specifying problem-specific data": [[167, "specifying-problem-specific-data"]], "Specifying spatially-varying data using setaux": [[167, "specifying-spatially-varying-data-using-setaux"]], "Using b4step for work to be done before each time step": [[167, "using-b4step-for-work-to-be-done-before-each-time-step"]], "Using src for source terms": [[167, "using-src-for-source-terms"]], "Using src1d for source terms with AMRClaw": [[167, "using-src1d-for-source-terms-with-amrclaw"]], "Plotting with VisIt": [[168, "plotting-with-visit"]], "Clawpack Virtual Machine": [[169, "clawpack-virtual-machine"]], "Wave-propagation algorithms": [[170, "wave-propagation-algorithms"]], "One space dimension": [[170, "one-space-dimension"]], "Godunov\u2019s method": [[170, "godunov-s-method"]], "High-resolution methods": [[170, "high-resolution-methods"]], "f-wave formulation": [[170, "f-wave-formulation"]], "Capacity functions": [[170, "capacity-functions"]], "Source terms": [[170, "source-terms"]]}, "indexentries": {"clawplotaxes (built-in class)": [[0, "ClawPlotAxes"]], "gethandle()": [[0, "gethandle"], [2, "gethandle"], [3, "gethandle"]], "new_plotitem()": [[0, "new_plotitem"]], "clawplotdata (built-in class)": [[1, "ClawPlotData"]], "clearfigures()": [[1, "clearfigures"]], "clearframes()": [[1, "clearframes"]], "getaxes()": [[1, "getaxes"]], "getfigure()": [[1, "getfigure"]], "getframe()": [[1, "getframe"], [3, "getframe"]], "getitem()": [[1, "getitem"]], "iplotclaw()": [[1, "iplotclaw"]], "new_plotfigure()": [[1, "new_plotfigure"]], "plotframe()": [[1, "plotframe"]], "printframes()": [[1, "printframes"]], "showitems()": [[1, "showitems"]], "clawplotfigure (built-in class)": [[2, "ClawPlotFigure"]], "new_plotaxes()": [[2, "new_plotaxes"]], "clawplotitem (built-in class)": [[3, "ClawPlotItem"]], "csvfault (class in clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.CSVFault"]], "dtopography (class in clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.DTopography"]], "dtopography1d (class in clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.DTopography1d"]], "fault (class in clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.Fault"]], "fault1d (class in clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.Fault1d"]], "mo() (clawpack.geoclaw.dtopotools.fault method)": [[32, "clawpack.geoclaw.dtopotools.Fault.Mo"]], "mo() (clawpack.geoclaw.dtopotools.subfault method)": [[32, "clawpack.geoclaw.dtopotools.SubFault.Mo"]], "mw() (clawpack.geoclaw.dtopotools.fault method)": [[32, "clawpack.geoclaw.dtopotools.Fault.Mw"]], "mw() (in module clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.Mw"]], "siftfault (class in clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.SiftFault"]], "subfault (class in clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.SubFault"]], "subfault1d (class in clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.SubFault1d"]], "subdividedplanefault (class in clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.SubdividedPlaneFault"]], "tensorproductfault (class in clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.TensorProductFault"]], "ucsbfault (class in clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.UCSBFault"]], "calculate_geometry() (clawpack.geoclaw.dtopotools.subfault method)": [[32, "clawpack.geoclaw.dtopotools.SubFault.calculate_geometry"]], "calculate_geometry_triangles() (clawpack.geoclaw.dtopotools.subfault method)": [[32, "clawpack.geoclaw.dtopotools.SubFault.calculate_geometry_triangles"]], "centers (clawpack.geoclaw.dtopotools.subfault property)": [[32, "clawpack.geoclaw.dtopotools.SubFault.centers"]], "clawpack.geoclaw.dtopotools": [[32, "module-clawpack.geoclaw.dtopotools"]], "containing_rect() (clawpack.geoclaw.dtopotools.fault method)": [[32, "clawpack.geoclaw.dtopotools.Fault.containing_rect"]], "convert_to_standard_units() (clawpack.geoclaw.dtopotools.subfault method)": [[32, "clawpack.geoclaw.dtopotools.SubFault.convert_to_standard_units"]], "coordinate_specification (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.coordinate_specification"]], "coordinate_specification (clawpack.geoclaw.dtopotools.subfault1d attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault1d.coordinate_specification"]], "corners (clawpack.geoclaw.dtopotools.subfault property)": [[32, "clawpack.geoclaw.dtopotools.SubFault.corners"]], "create_dtopo_xy() (clawpack.geoclaw.dtopotools.fault method)": [[32, "clawpack.geoclaw.dtopotools.Fault.create_dtopo_xy"]], "create_dtopography() (clawpack.geoclaw.dtopotools.fault method)": [[32, "clawpack.geoclaw.dtopotools.Fault.create_dtopography"]], "dz_at_t() (clawpack.geoclaw.dtopotools.dtopography method)": [[32, "clawpack.geoclaw.dtopotools.DTopography.dZ_at_t"]], "dz_at_t() (clawpack.geoclaw.dtopotools.dtopography1d method)": [[32, "clawpack.geoclaw.dtopotools.DTopography1d.dZ_at_t"]], "dz_cellave_at_t() (clawpack.geoclaw.dtopotools.dtopography1d method)": [[32, "clawpack.geoclaw.dtopotools.DTopography1d.dZ_cellave_at_t"]], "dz_max() (clawpack.geoclaw.dtopotools.dtopography method)": [[32, "clawpack.geoclaw.dtopotools.DTopography.dZ_max"]], "depth (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.depth"]], "dip (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.dip"]], "dynamic_slip() (clawpack.geoclaw.dtopotools.subfault method)": [[32, "clawpack.geoclaw.dtopotools.SubFault.dynamic_slip"]], "gauss_pts (clawpack.geoclaw.dtopotools.subfault property)": [[32, "clawpack.geoclaw.dtopotools.SubFault.gauss_pts"]], "latitude (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.latitude"]], "latitude (clawpack.geoclaw.dtopotools.subfault1d attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault1d.latitude"]], "length (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.length"]], "length (clawpack.geoclaw.dtopotools.subfault1d attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault1d.length"]], "longitude (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.longitude"]], "longitude (clawpack.geoclaw.dtopotools.subfault1d attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault1d.longitude"]], "module": [[32, "module-clawpack.geoclaw.dtopotools"], [35, "module-clawpack.geoclaw.fgmax_tools"], [37, "module-clawpack.geoclaw.fgout_tools"], [51, "module-clawpack.geoclaw.util"], [63, "module-clawpack.geoclaw.kmltools"], [92, "module-clawpack.pyclaw.limiters.tvd"], [97, "module-clawpack.pyclaw.fileio.ascii"], [97, "module-clawpack.pyclaw.fileio.binary"], [97, "module-clawpack.pyclaw.fileio.hdf5"], [97, "module-clawpack.pyclaw.fileio.netcdf"], [102, "module-clawpack.riemann.acoustics_1D_py"], [102, "module-clawpack.riemann.advection_1D_py"], [102, "module-clawpack.riemann.burgers_1D_py"], [102, "module-clawpack.riemann.euler_1D_py"], [102, "module-clawpack.riemann.shallow_1D_py"], [109, "module-clawpack.pyclaw.util"], [158, "module-clawpack.geoclaw.surge.storm"], [164, "module-clawpack.geoclaw.topotools"]], "mu (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.mu"]], "okada() (clawpack.geoclaw.dtopotools.subfault method)": [[32, "clawpack.geoclaw.dtopotools.SubFault.okada"]], "plot_dz_colors() (clawpack.geoclaw.dtopotools.dtopography method)": [[32, "clawpack.geoclaw.dtopotools.DTopography.plot_dZ_colors"]], "plot_dz_colors() (in module clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.plot_dZ_colors"]], "plot_dz_contours() (clawpack.geoclaw.dtopotools.dtopography method)": [[32, "clawpack.geoclaw.dtopotools.DTopography.plot_dZ_contours"]], "plot_dz_contours() (in module clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.plot_dZ_contours"]], "plot_subfaults() (clawpack.geoclaw.dtopotools.fault method)": [[32, "clawpack.geoclaw.dtopotools.Fault.plot_subfaults"]], "plot_subfaults_depth() (clawpack.geoclaw.dtopotools.fault method)": [[32, "clawpack.geoclaw.dtopotools.Fault.plot_subfaults_depth"]], "rake (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.rake"]], "rake (clawpack.geoclaw.dtopotools.subfault1d attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault1d.rake"]], "read() (clawpack.geoclaw.dtopotools.csvfault method)": [[32, "clawpack.geoclaw.dtopotools.CSVFault.read"]], "read() (clawpack.geoclaw.dtopotools.dtopography method)": [[32, "clawpack.geoclaw.dtopotools.DTopography.read"]], "read() (clawpack.geoclaw.dtopotools.dtopography1d method)": [[32, "clawpack.geoclaw.dtopotools.DTopography1d.read"]], "read() (clawpack.geoclaw.dtopotools.fault method)": [[32, "clawpack.geoclaw.dtopotools.Fault.read"]], "read() (clawpack.geoclaw.dtopotools.ucsbfault method)": [[32, "clawpack.geoclaw.dtopotools.UCSBFault.read"]], "rise_fraction() (in module clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.rise_fraction"]], "rise_shape (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.rise_shape"]], "rise_time (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.rise_time"]], "rise_time_starting (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.rise_time_starting"]], "rupture_time (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.rupture_time"]], "rupture_type (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.rupture_type"]], "set_corners() (clawpack.geoclaw.dtopotools.subfault method)": [[32, "clawpack.geoclaw.dtopotools.SubFault.set_corners"]], "set_dynamic_slip() (clawpack.geoclaw.dtopotools.fault method)": [[32, "clawpack.geoclaw.dtopotools.Fault.set_dynamic_slip"]], "set_subfaults() (clawpack.geoclaw.dtopotools.siftfault method)": [[32, "clawpack.geoclaw.dtopotools.SiftFault.set_subfaults"]], "slip (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.slip"]], "strike (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.strike"]], "strike (clawpack.geoclaw.dtopotools.subfault1d attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault1d.strike"]], "strike_direction() (in module clawpack.geoclaw.dtopotools)": [[32, "clawpack.geoclaw.dtopotools.strike_direction"]], "subdivide() (clawpack.geoclaw.dtopotools.subdividedplanefault method)": [[32, "clawpack.geoclaw.dtopotools.SubdividedPlaneFault.subdivide"]], "width (clawpack.geoclaw.dtopotools.subfault attribute)": [[32, "clawpack.geoclaw.dtopotools.SubFault.width"]], "write() (clawpack.geoclaw.dtopotools.dtopography method)": [[32, "clawpack.geoclaw.dtopotools.DTopography.write"]], "write() (clawpack.geoclaw.dtopotools.dtopography1d method)": [[32, "clawpack.geoclaw.dtopotools.DTopography1d.write"]], "write() (clawpack.geoclaw.dtopotools.fault method)": [[32, "clawpack.geoclaw.dtopotools.Fault.write"]], "fgmaxgrid (class in clawpack.geoclaw.fgmax_tools)": [[35, "clawpack.geoclaw.fgmax_tools.FGmaxGrid"]], "adjust_fgmax_1d() (in module clawpack.geoclaw.fgmax_tools)": [[35, "clawpack.geoclaw.fgmax_tools.adjust_fgmax_1d"]], "bounding_box() (clawpack.geoclaw.fgmax_tools.fgmaxgrid method)": [[35, "clawpack.geoclaw.fgmax_tools.FGmaxGrid.bounding_box"]], "clawpack.geoclaw.fgmax_tools": [[35, "module-clawpack.geoclaw.fgmax_tools"]], "interp_dz() (clawpack.geoclaw.fgmax_tools.fgmaxgrid method)": [[35, "clawpack.geoclaw.fgmax_tools.FGmaxGrid.interp_dz"]], "ps4_to_arrays() (clawpack.geoclaw.fgmax_tools.fgmaxgrid method)": [[35, "clawpack.geoclaw.fgmax_tools.FGmaxGrid.ps4_to_arrays"]], "read_fgmax_grids_data() (clawpack.geoclaw.fgmax_tools.fgmaxgrid method)": [[35, "clawpack.geoclaw.fgmax_tools.FGmaxGrid.read_fgmax_grids_data"]], "read_output() (clawpack.geoclaw.fgmax_tools.fgmaxgrid method)": [[35, "clawpack.geoclaw.fgmax_tools.FGmaxGrid.read_output"]], "write_to_fgmax_data() (clawpack.geoclaw.fgmax_tools.fgmaxgrid method)": [[35, "clawpack.geoclaw.fgmax_tools.FGmaxGrid.write_to_fgmax_data"]], "b (clawpack.geoclaw.fgout_tools.fgoutframe property)": [[37, "clawpack.geoclaw.fgout_tools.FGoutFrame.B"]], "fgoutframe (class in clawpack.geoclaw.fgout_tools)": [[37, "clawpack.geoclaw.fgout_tools.FGoutFrame"]], "fgoutgrid (class in clawpack.geoclaw.fgout_tools)": [[37, "clawpack.geoclaw.fgout_tools.FGoutGrid"]], "x (clawpack.geoclaw.fgout_tools.fgoutgrid property)": [[37, "clawpack.geoclaw.fgout_tools.FGoutGrid.X"], [37, "clawpack.geoclaw.fgout_tools.FGoutGrid.x"]], "y (clawpack.geoclaw.fgout_tools.fgoutgrid property)": [[37, "clawpack.geoclaw.fgout_tools.FGoutGrid.Y"], [37, "clawpack.geoclaw.fgout_tools.FGoutGrid.y"]], "clawpack.geoclaw.fgout_tools": [[37, "module-clawpack.geoclaw.fgout_tools"]], "eta (clawpack.geoclaw.fgout_tools.fgoutframe property)": [[37, "clawpack.geoclaw.fgout_tools.FGoutFrame.eta"]], "extent_centers (clawpack.geoclaw.fgout_tools.fgoutgrid property)": [[37, "clawpack.geoclaw.fgout_tools.FGoutGrid.extent_centers"]], "extent_edges (clawpack.geoclaw.fgout_tools.fgoutgrid property)": [[37, "clawpack.geoclaw.fgout_tools.FGoutGrid.extent_edges"]], "get_as_array() (in module clawpack.geoclaw.fgout_tools)": [[37, "clawpack.geoclaw.fgout_tools.get_as_array"]], "h (clawpack.geoclaw.fgout_tools.fgoutframe property)": [[37, "clawpack.geoclaw.fgout_tools.FGoutFrame.h"]], "hss (clawpack.geoclaw.fgout_tools.fgoutframe property)": [[37, "clawpack.geoclaw.fgout_tools.FGoutFrame.hss"]], "hu (clawpack.geoclaw.fgout_tools.fgoutframe property)": [[37, "clawpack.geoclaw.fgout_tools.FGoutFrame.hu"]], "hv (clawpack.geoclaw.fgout_tools.fgoutframe property)": [[37, "clawpack.geoclaw.fgout_tools.FGoutFrame.hv"]], "make_fgout_fcn_xy() (in module clawpack.geoclaw.fgout_tools)": [[37, "clawpack.geoclaw.fgout_tools.make_fgout_fcn_xy"]], "make_fgout_fcn_xyt() (in module clawpack.geoclaw.fgout_tools)": [[37, "clawpack.geoclaw.fgout_tools.make_fgout_fcn_xyt"]], "print_netcdf_info() (in module clawpack.geoclaw.fgout_tools)": [[37, "clawpack.geoclaw.fgout_tools.print_netcdf_info"]], "read_fgout_grids_data() (clawpack.geoclaw.fgout_tools.fgoutgrid method)": [[37, "clawpack.geoclaw.fgout_tools.FGoutGrid.read_fgout_grids_data"]], "read_frame() (clawpack.geoclaw.fgout_tools.fgoutgrid method)": [[37, "clawpack.geoclaw.fgout_tools.FGoutGrid.read_frame"]], "read_netcdf() (in module clawpack.geoclaw.fgout_tools)": [[37, "clawpack.geoclaw.fgout_tools.read_netcdf"]], "read_netcdf_arrays() (in module clawpack.geoclaw.fgout_tools)": [[37, "clawpack.geoclaw.fgout_tools.read_netcdf_arrays"]], "s (clawpack.geoclaw.fgout_tools.fgoutframe property)": [[37, "clawpack.geoclaw.fgout_tools.FGoutFrame.s"]], "set_plotdata() (clawpack.geoclaw.fgout_tools.fgoutgrid method)": [[37, "clawpack.geoclaw.fgout_tools.FGoutGrid.set_plotdata"]], "u (clawpack.geoclaw.fgout_tools.fgoutframe property)": [[37, "clawpack.geoclaw.fgout_tools.FGoutFrame.u"]], "v (clawpack.geoclaw.fgout_tools.fgoutframe property)": [[37, "clawpack.geoclaw.fgout_tools.FGoutFrame.v"]], "write_netcdf() (in module clawpack.geoclaw.fgout_tools)": [[37, "clawpack.geoclaw.fgout_tools.write_netcdf"]], "write_to_fgout_data() (clawpack.geoclaw.fgout_tools.fgoutgrid method)": [[37, "clawpack.geoclaw.fgout_tools.FGoutGrid.write_to_fgout_data"]], "bearing() (in module clawpack.geoclaw.util)": [[51, "clawpack.geoclaw.util.bearing"]], "clawpack.geoclaw.util": [[51, "module-clawpack.geoclaw.util"]], "dist_latlong2meters() (in module clawpack.geoclaw.util)": [[51, "clawpack.geoclaw.util.dist_latlong2meters"]], "dist_meters2latlong() (in module clawpack.geoclaw.util)": [[51, "clawpack.geoclaw.util.dist_meters2latlong"]], "dms2decimal() (in module clawpack.geoclaw.util)": [[51, "clawpack.geoclaw.util.dms2decimal"]], "fetch_noaa_tide_data() (in module clawpack.geoclaw.util)": [[51, "clawpack.geoclaw.util.fetch_noaa_tide_data"]], "gctransect() (in module clawpack.geoclaw.util)": [[51, "clawpack.geoclaw.util.gctransect"]], "haversine() (in module clawpack.geoclaw.util)": [[51, "clawpack.geoclaw.util.haversine"]], "inv_haversine() (in module clawpack.geoclaw.util)": [[51, "clawpack.geoclaw.util.inv_haversine"]], "box2kml() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.box2kml"]], "clawpack.geoclaw.kmltools": [[63, "module-clawpack.geoclaw.kmltools"]], "deg2dms() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.deg2dms"]], "dtopo2kml() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.dtopo2kml"]], "f2s() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.f2s"]], "fgmax2kml() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.fgmax2kml"]], "fgout2kml() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.fgout2kml"]], "gauges2kml() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.gauges2kml"]], "kml_build_colorbar() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.kml_build_colorbar"]], "kml_cb() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.kml_cb"]], "kml_png() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.kml_png"]], "kml_timespan() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.kml_timespan"]], "line2kml() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.line2kml"]], "make_input_data_kmls() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.make_input_data_kmls"]], "pcolorcells_for_kml() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.pcolorcells_for_kml"]], "png2kml() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.png2kml"]], "poly2kml() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.poly2kml"]], "quad2kml() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.quad2kml"]], "regions2kml() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.regions2kml"]], "topo2kml() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.topo2kml"]], "topo2kmz() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.topo2kmz"]], "transect2kml() (in module clawpack.geoclaw.kmltools)": [[63, "clawpack.geoclaw.kmltools.transect2kml"]], "controller (class in clawpack.pyclaw.controller)": [[91, "clawpack.pyclaw.controller.Controller"]], "f_file_name (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.F_file_name"]], "f_path (clawpack.pyclaw.controller.controller property)": [[91, "clawpack.pyclaw.controller.Controller.F_path"]], "check_validity() (clawpack.pyclaw.controller.controller method)": [[91, "clawpack.pyclaw.controller.Controller.check_validity"]], "compute_f (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.compute_F"]], "compute_p (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.compute_p"]], "file_prefix_p (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.file_prefix_p"]], "frames (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.frames"]], "keep_copy (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.keep_copy"]], "nstepout (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.nstepout"]], "num_output_times (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.num_output_times"]], "out_times (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.out_times"]], "outdir (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.outdir"]], "outdir_p (clawpack.pyclaw.controller.controller property)": [[91, "clawpack.pyclaw.controller.Controller.outdir_p"]], "output_file_prefix (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.output_file_prefix"]], "output_format (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.output_format"]], "output_options (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.output_options"]], "output_style (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.output_style"]], "overwrite (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.overwrite"]], "plot() (clawpack.pyclaw.controller.controller method)": [[91, "clawpack.pyclaw.controller.Controller.plot"]], "plotdata (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.plotdata"]], "run() (clawpack.pyclaw.controller.controller method)": [[91, "clawpack.pyclaw.controller.Controller.run"]], "rundir (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.rundir"]], "runmake (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.runmake"]], "savecode (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.savecode"]], "solver (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.solver"]], "tfinal (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.tfinal"]], "verbosity (clawpack.pyclaw.controller.controller property)": [[91, "clawpack.pyclaw.controller.Controller.verbosity"]], "viewable_attributes (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.viewable_attributes"]], "write_aux_always (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.write_aux_always"]], "write_aux_init (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.write_aux_init"]], "xclawcmd (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.xclawcmd"]], "xclawerr (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.xclawerr"]], "xclawout (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.xclawout"]], "xdir (clawpack.pyclaw.controller.controller attribute)": [[91, "clawpack.pyclaw.controller.Controller.xdir"]], "arora_roe() (in module clawpack.pyclaw.limiters.tvd)": [[92, "clawpack.pyclaw.limiters.tvd.arora_roe"]], "beta_limiter() (in module clawpack.pyclaw.limiters.tvd)": [[92, "clawpack.pyclaw.limiters.tvd.beta_limiter"]], "cada_torrilhon_limiter() (in module clawpack.pyclaw.limiters.tvd)": [[92, "clawpack.pyclaw.limiters.tvd.cada_torrilhon_limiter"]], "cada_torrilhon_limiter_nonlinear() (in module clawpack.pyclaw.limiters.tvd)": [[92, "clawpack.pyclaw.limiters.tvd.cada_torrilhon_limiter_nonlinear"]], "cfl_superbee() (in module clawpack.pyclaw.limiters.tvd)": [[92, "clawpack.pyclaw.limiters.tvd.cfl_superbee"]], "cfl_superbee_theta() (in module clawpack.pyclaw.limiters.tvd)": [[92, "clawpack.pyclaw.limiters.tvd.cfl_superbee_theta"]], "clawpack.pyclaw.limiters.tvd": [[92, "module-clawpack.pyclaw.limiters.tvd"]], "hyperbee_limiter() (in module clawpack.pyclaw.limiters.tvd)": [[92, "clawpack.pyclaw.limiters.tvd.hyperbee_limiter"]], "limit() (in module clawpack.pyclaw.limiters.tvd)": [[92, "clawpack.pyclaw.limiters.tvd.limit"]], "mc_limiter() (in module clawpack.pyclaw.limiters.tvd)": [[92, "clawpack.pyclaw.limiters.tvd.mc_limiter"]], "minmod_limiter() (in module clawpack.pyclaw.limiters.tvd)": [[92, "clawpack.pyclaw.limiters.tvd.minmod_limiter"]], "superbee_limiter() (in module clawpack.pyclaw.limiters.tvd)": [[92, "clawpack.pyclaw.limiters.tvd.superbee_limiter"]], "superpower_limiter() (in module clawpack.pyclaw.limiters.tvd)": [[92, "clawpack.pyclaw.limiters.tvd.superpower_limiter"]], "theta_limiter() (in module clawpack.pyclaw.limiters.tvd)": [[92, "clawpack.pyclaw.limiters.tvd.theta_limiter"]], "upper_bound_limiter() (in module clawpack.pyclaw.limiters.tvd)": [[92, "clawpack.pyclaw.limiters.tvd.upper_bound_limiter"]], "van_leer_klein_sharpening_limiter() (in module clawpack.pyclaw.limiters.tvd)": [[92, "clawpack.pyclaw.limiters.tvd.van_leer_klein_sharpening_limiter"]], "dimension (class in clawpack.pyclaw.geometry)": [[94, "clawpack.pyclaw.geometry.Dimension"]], "domain (class in clawpack.petclaw.geometry)": [[94, "clawpack.petclaw.geometry.Domain"]], "domain (class in clawpack.pyclaw.geometry)": [[94, "clawpack.pyclaw.geometry.Domain"]], "grid (class in clawpack.pyclaw.geometry)": [[94, "clawpack.pyclaw.geometry.Grid"]], "patch (class in clawpack.petclaw.geometry)": [[94, "clawpack.petclaw.geometry.Patch"]], "patch (class in clawpack.pyclaw.geometry)": [[94, "clawpack.pyclaw.geometry.Patch"]], "add_dimension() (clawpack.pyclaw.geometry.grid method)": [[94, "clawpack.pyclaw.geometry.Grid.add_dimension"]], "add_dimension() (clawpack.pyclaw.geometry.patch method)": [[94, "clawpack.pyclaw.geometry.Patch.add_dimension"]], "add_gauges() (clawpack.pyclaw.geometry.grid method)": [[94, "clawpack.pyclaw.geometry.Grid.add_gauges"]], "c_center() (clawpack.pyclaw.geometry.grid method)": [[94, "clawpack.pyclaw.geometry.Grid.c_center"]], "c_centers (clawpack.pyclaw.geometry.grid property)": [[94, "clawpack.pyclaw.geometry.Grid.c_centers"]], "c_centers_with_ghost() (clawpack.pyclaw.geometry.grid method)": [[94, "clawpack.pyclaw.geometry.Grid.c_centers_with_ghost"]], "c_nodes (clawpack.pyclaw.geometry.grid property)": [[94, "clawpack.pyclaw.geometry.Grid.c_nodes"]], "c_nodes_with_ghost() (clawpack.pyclaw.geometry.grid method)": [[94, "clawpack.pyclaw.geometry.Grid.c_nodes_with_ghost"]], "centers (clawpack.pyclaw.geometry.dimension property)": [[94, "clawpack.pyclaw.geometry.Dimension.centers"]], "centers_with_ghost() (clawpack.pyclaw.geometry.dimension method)": [[94, "clawpack.pyclaw.geometry.Dimension.centers_with_ghost"]], "delta (clawpack.pyclaw.geometry.dimension property)": [[94, "clawpack.pyclaw.geometry.Dimension.delta"]], "delta (clawpack.pyclaw.geometry.patch property)": [[94, "clawpack.pyclaw.geometry.Patch.delta"]], "dimensional_split (clawpack.petclaw.geometry.domain attribute)": [[94, "clawpack.petclaw.geometry.Domain.dimensional_split"]], "dimensions (clawpack.pyclaw.geometry.grid property)": [[94, "clawpack.pyclaw.geometry.Grid.dimensions"]], "dimensions (clawpack.pyclaw.geometry.patch property)": [[94, "clawpack.pyclaw.geometry.Patch.dimensions"]], "fwave (clawpack.petclaw.geometry.domain attribute)": [[94, "clawpack.petclaw.geometry.Domain.fwave"]], "gauge_dir_name (clawpack.pyclaw.geometry.grid attribute)": [[94, "clawpack.pyclaw.geometry.Grid.gauge_dir_name"]], "gauge_file_names (clawpack.pyclaw.geometry.grid attribute)": [[94, "clawpack.pyclaw.geometry.Grid.gauge_file_names"]], "gauge_files (clawpack.pyclaw.geometry.grid attribute)": [[94, "clawpack.pyclaw.geometry.Grid.gauge_files"]], "gauges (clawpack.pyclaw.geometry.grid attribute)": [[94, "clawpack.pyclaw.geometry.Grid.gauges"]], "get_dim_attribute() (clawpack.pyclaw.geometry.grid method)": [[94, "clawpack.pyclaw.geometry.Grid.get_dim_attribute"]], "get_dim_attribute() (clawpack.pyclaw.geometry.patch method)": [[94, "clawpack.pyclaw.geometry.Patch.get_dim_attribute"]], "grid (clawpack.pyclaw.geometry.domain property)": [[94, "clawpack.pyclaw.geometry.Domain.grid"]], "kernel_language (clawpack.petclaw.geometry.domain attribute)": [[94, "clawpack.petclaw.geometry.Domain.kernel_language"]], "level (clawpack.pyclaw.geometry.patch attribute)": [[94, "clawpack.pyclaw.geometry.Patch.level"]], "lower_global (clawpack.pyclaw.geometry.patch property)": [[94, "clawpack.pyclaw.geometry.Patch.lower_global"]], "mthlim (clawpack.petclaw.geometry.domain attribute)": [[94, "clawpack.petclaw.geometry.Domain.mthlim"]], "name (clawpack.pyclaw.geometry.patch property)": [[94, "clawpack.pyclaw.geometry.Patch.name"]], "nodes (clawpack.pyclaw.geometry.dimension property)": [[94, "clawpack.pyclaw.geometry.Dimension.nodes"]], "nodes_with_ghost() (clawpack.pyclaw.geometry.dimension method)": [[94, "clawpack.pyclaw.geometry.Dimension.nodes_with_ghost"]], "num_cells_global (clawpack.pyclaw.geometry.patch property)": [[94, "clawpack.pyclaw.geometry.Patch.num_cells_global"]], "num_dim (clawpack.pyclaw.geometry.domain property)": [[94, "clawpack.pyclaw.geometry.Domain.num_dim"]], "num_dim (clawpack.pyclaw.geometry.grid property)": [[94, "clawpack.pyclaw.geometry.Grid.num_dim"]], "num_dim (clawpack.pyclaw.geometry.patch property)": [[94, "clawpack.pyclaw.geometry.Patch.num_dim"]], "order (clawpack.petclaw.geometry.domain attribute)": [[94, "clawpack.petclaw.geometry.Domain.order"]], "p_center() (clawpack.pyclaw.geometry.grid method)": [[94, "clawpack.pyclaw.geometry.Grid.p_center"]], "p_centers (clawpack.pyclaw.geometry.grid property)": [[94, "clawpack.pyclaw.geometry.Grid.p_centers"]], "p_nodes (clawpack.pyclaw.geometry.grid property)": [[94, "clawpack.pyclaw.geometry.Grid.p_nodes"]], "patch (clawpack.pyclaw.geometry.domain property)": [[94, "clawpack.pyclaw.geometry.Domain.patch"]], "patch_index (clawpack.pyclaw.geometry.patch attribute)": [[94, "clawpack.pyclaw.geometry.Patch.patch_index"]], "plot() (clawpack.pyclaw.geometry.grid method)": [[94, "clawpack.pyclaw.geometry.Grid.plot"]], "setup_gauge_files() (clawpack.pyclaw.geometry.grid method)": [[94, "clawpack.pyclaw.geometry.Grid.setup_gauge_files"]], "source_split (clawpack.petclaw.geometry.domain attribute)": [[94, "clawpack.petclaw.geometry.Domain.source_split"]], "step_source (clawpack.petclaw.geometry.domain attribute)": [[94, "clawpack.petclaw.geometry.Domain.step_source"]], "transverse_waves (clawpack.petclaw.geometry.domain attribute)": [[94, "clawpack.petclaw.geometry.Domain.transverse_waves"]], "upper_global (clawpack.pyclaw.geometry.patch property)": [[94, "clawpack.pyclaw.geometry.Patch.upper_global"]], "verbosity (clawpack.petclaw.geometry.domain attribute)": [[94, "clawpack.petclaw.geometry.Domain.verbosity"]], "clawpack.pyclaw.fileio.ascii": [[97, "module-clawpack.pyclaw.fileio.ascii"]], "clawpack.pyclaw.fileio.binary": [[97, "module-clawpack.pyclaw.fileio.binary"]], "clawpack.pyclaw.fileio.hdf5": [[97, "module-clawpack.pyclaw.fileio.hdf5"]], "clawpack.pyclaw.fileio.netcdf": [[97, "module-clawpack.pyclaw.fileio.netcdf"]], "read() (in module clawpack.pyclaw.fileio.ascii)": [[97, "clawpack.pyclaw.fileio.ascii.read"]], "read() (in module clawpack.pyclaw.fileio.binary)": [[97, "clawpack.pyclaw.fileio.binary.read"]], "read() (in module clawpack.pyclaw.fileio.hdf5)": [[97, "clawpack.pyclaw.fileio.hdf5.read"]], "read() (in module clawpack.pyclaw.fileio.netcdf)": [[97, "clawpack.pyclaw.fileio.netcdf.read"]], "read_array() (in module clawpack.pyclaw.fileio.ascii)": [[97, "clawpack.pyclaw.fileio.ascii.read_array"]], "read_patch_header() (in module clawpack.pyclaw.fileio.ascii)": [[97, "clawpack.pyclaw.fileio.ascii.read_patch_header"]], "read_t() (in module clawpack.pyclaw.fileio.ascii)": [[97, "clawpack.pyclaw.fileio.ascii.read_t"]], "write() (in module clawpack.pyclaw.fileio.ascii)": [[97, "clawpack.pyclaw.fileio.ascii.write"]], "write() (in module clawpack.pyclaw.fileio.hdf5)": [[97, "clawpack.pyclaw.fileio.hdf5.write"]], "write() (in module clawpack.pyclaw.fileio.netcdf)": [[97, "clawpack.pyclaw.fileio.netcdf.write"]], "write_array() (in module clawpack.pyclaw.fileio.ascii)": [[97, "clawpack.pyclaw.fileio.ascii.write_array"]], "acoustics_1d() (in module clawpack.riemann.acoustics_1d_py)": [[102, "clawpack.riemann.acoustics_1D_py.acoustics_1D"]], "advection_1d() (in module clawpack.riemann.advection_1d_py)": [[102, "clawpack.riemann.advection_1D_py.advection_1D"]], "burgers_1d() (in module clawpack.riemann.burgers_1d_py)": [[102, "clawpack.riemann.burgers_1D_py.burgers_1D"]], "clawpack.riemann.acoustics_1d_py": [[102, "module-clawpack.riemann.acoustics_1D_py"]], "clawpack.riemann.advection_1d_py": [[102, "module-clawpack.riemann.advection_1D_py"]], "clawpack.riemann.burgers_1d_py": [[102, "module-clawpack.riemann.burgers_1D_py"]], "clawpack.riemann.euler_1d_py": [[102, "module-clawpack.riemann.euler_1D_py"]], "clawpack.riemann.shallow_1d_py": [[102, "module-clawpack.riemann.shallow_1D_py"]], "euler_exact_1d() (in module clawpack.riemann.euler_1d_py)": [[102, "clawpack.riemann.euler_1D_py.euler_exact_1D"]], "euler_hll_1d() (in module clawpack.riemann.euler_1d_py)": [[102, "clawpack.riemann.euler_1D_py.euler_hll_1D"]], "euler_hllc_1d() (in module clawpack.riemann.euler_1d_py)": [[102, "clawpack.riemann.euler_1D_py.euler_hllc_1D"]], "euler_roe_1d() (in module clawpack.riemann.euler_1d_py)": [[102, "clawpack.riemann.euler_1D_py.euler_roe_1D"]], "shallow_exact_1d() (in module clawpack.riemann.shallow_1d_py)": [[102, "clawpack.riemann.shallow_1D_py.shallow_exact_1D"]], "shallow_fwave_1d() (in module clawpack.riemann.shallow_1d_py)": [[102, "clawpack.riemann.shallow_1D_py.shallow_fwave_1d"]], "shallow_hll_1d() (in module clawpack.riemann.shallow_1d_py)": [[102, "clawpack.riemann.shallow_1D_py.shallow_hll_1D"]], "shallow_roe_1d() (in module clawpack.riemann.shallow_1d_py)": [[102, "clawpack.riemann.shallow_1D_py.shallow_roe_1D"]], "solution (class in clawpack.pyclaw.solution)": [[103, "clawpack.pyclaw.solution.Solution"]], "is_valid() (clawpack.pyclaw.solution.solution method)": [[103, "clawpack.pyclaw.solution.Solution.is_valid"]], "patch (clawpack.pyclaw.solution.solution property)": [[103, "clawpack.pyclaw.solution.Solution.patch"]], "plot() (clawpack.pyclaw.solution.solution method)": [[103, "clawpack.pyclaw.solution.Solution.plot"]], "read() (clawpack.pyclaw.solution.solution method)": [[103, "clawpack.pyclaw.solution.Solution.read"]], "set_all_states() (clawpack.pyclaw.solution.solution method)": [[103, "clawpack.pyclaw.solution.Solution.set_all_states"]], "start_frame (clawpack.pyclaw.solution.solution property)": [[103, "clawpack.pyclaw.solution.Solution.start_frame"]], "state (clawpack.pyclaw.solution.solution property)": [[103, "clawpack.pyclaw.solution.Solution.state"]], "write() (clawpack.pyclaw.solution.solution method)": [[103, "clawpack.pyclaw.solution.Solution.write"]], "clawsolver (class in clawpack.pyclaw.classic.solver)": [[104, "clawpack.pyclaw.classic.solver.ClawSolver"]], "sharpclawsolver (class in clawpack.pyclaw.sharpclaw.solver)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver"]], "accept_reject_step() (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver method)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.accept_reject_step"]], "aux_time_dep (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver attribute)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.aux_time_dep"]], "call_before_step_each_stage (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver attribute)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.call_before_step_each_stage"]], "cfl_desired (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver attribute)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.cfl_desired"]], "cfl_max (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver attribute)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.cfl_max"]], "char_decomp (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver attribute)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.char_decomp"]], "check_3rd_ord_cond() (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver method)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.check_3rd_ord_cond"]], "dq() (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver method)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.dq"]], "dq_src (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver attribute)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.dq_src"]], "dqdt() (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver method)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.dqdt"]], "fwave (clawpack.pyclaw.classic.solver.clawsolver attribute)": [[104, "clawpack.pyclaw.classic.solver.ClawSolver.fwave"]], "fwave (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver attribute)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.fwave"]], "get_dt_new() (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver method)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.get_dt_new"]], "kernel_language (clawpack.pyclaw.classic.solver.clawsolver attribute)": [[104, "clawpack.pyclaw.classic.solver.ClawSolver.kernel_language"]], "kernel_language (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver attribute)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.kernel_language"]], "lim_type (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver attribute)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.lim_type"]], "mthlim (clawpack.pyclaw.classic.solver.clawsolver attribute)": [[104, "clawpack.pyclaw.classic.solver.ClawSolver.mthlim"]], "num_ghost (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver attribute)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.num_ghost"]], "order (clawpack.pyclaw.classic.solver.clawsolver attribute)": [[104, "clawpack.pyclaw.classic.solver.ClawSolver.order"]], "setup() (clawpack.pyclaw.classic.solver.clawsolver method)": [[104, "clawpack.pyclaw.classic.solver.ClawSolver.setup"]], "setup() (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver method)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.setup"]], "source_split (clawpack.pyclaw.classic.solver.clawsolver attribute)": [[104, "clawpack.pyclaw.classic.solver.ClawSolver.source_split"]], "step() (clawpack.pyclaw.classic.solver.clawsolver method)": [[104, "clawpack.pyclaw.classic.solver.ClawSolver.step"]], "step() (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver method)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.step"]], "step_hyperbolic() (clawpack.pyclaw.classic.solver.clawsolver method)": [[104, "clawpack.pyclaw.classic.solver.ClawSolver.step_hyperbolic"]], "step_source (clawpack.pyclaw.classic.solver.clawsolver attribute)": [[104, "clawpack.pyclaw.classic.solver.ClawSolver.step_source"]], "tfluct (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver attribute)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.tfluct"]], "tfluct_solver (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver attribute)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.tfluct_solver"]], "time_integrator (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver attribute)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.time_integrator"]], "update_saved_values() (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver method)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.update_saved_values"]], "verbosity (clawpack.pyclaw.classic.solver.clawsolver attribute)": [[104, "clawpack.pyclaw.classic.solver.ClawSolver.verbosity"]], "weno_order (clawpack.pyclaw.sharpclaw.solver.sharpclawsolver attribute)": [[104, "clawpack.pyclaw.sharpclaw.solver.SharpClawSolver.weno_order"]], "f (clawpack.petclaw.state.state property)": [[106, "clawpack.petclaw.state.State.F"]], "f (clawpack.pyclaw.state.state attribute)": [[106, "clawpack.pyclaw.state.State.F"]], "state (class in clawpack.petclaw.state)": [[106, "clawpack.petclaw.state.State"]], "state (class in clawpack.pyclaw.state)": [[106, "clawpack.pyclaw.state.State"]], "aux (clawpack.petclaw.state.state property)": [[106, "clawpack.petclaw.state.State.aux"]], "fset (clawpack.petclaw.state.state property)": [[106, "clawpack.petclaw.state.State.fset"]], "gauge_data (clawpack.petclaw.state.state attribute)": [[106, "clawpack.petclaw.state.State.gauge_data"]], "gauge_data (clawpack.pyclaw.state.state attribute)": [[106, "clawpack.pyclaw.state.State.gauge_data"]], "get_aux_global() (clawpack.petclaw.state.state method)": [[106, "clawpack.petclaw.state.State.get_aux_global"]], "get_aux_global() (clawpack.pyclaw.state.state method)": [[106, "clawpack.pyclaw.state.State.get_aux_global"]], "get_auxbc_from_aux() (clawpack.petclaw.state.state method)": [[106, "clawpack.petclaw.state.State.get_auxbc_from_aux"]], "get_auxbc_from_aux() (clawpack.pyclaw.state.state method)": [[106, "clawpack.pyclaw.state.State.get_auxbc_from_aux"]], "get_q_global() (clawpack.petclaw.state.state method)": [[106, "clawpack.petclaw.state.State.get_q_global"]], "get_q_global() (clawpack.pyclaw.state.state method)": [[106, "clawpack.pyclaw.state.State.get_q_global"]], "get_qbc_from_q() (clawpack.petclaw.state.state method)": [[106, "clawpack.petclaw.state.State.get_qbc_from_q"]], "get_qbc_from_q() (clawpack.pyclaw.state.state method)": [[106, "clawpack.pyclaw.state.State.get_qbc_from_q"]], "is_valid() (clawpack.pyclaw.state.state method)": [[106, "clawpack.pyclaw.state.State.is_valid"]], "keep_gauges (clawpack.petclaw.state.state attribute)": [[106, "clawpack.petclaw.state.State.keep_gauges"]], "keep_gauges (clawpack.pyclaw.state.state attribute)": [[106, "clawpack.pyclaw.state.State.keep_gauges"]], "mf (clawpack.petclaw.state.state property)": [[106, "clawpack.petclaw.state.State.mF"]], "mf (clawpack.pyclaw.state.state property)": [[106, "clawpack.pyclaw.state.State.mF"]], "mp (clawpack.petclaw.state.state property)": [[106, "clawpack.petclaw.state.State.mp"]], "mp (clawpack.pyclaw.state.state property)": [[106, "clawpack.pyclaw.state.State.mp"]], "num_aux (clawpack.petclaw.state.state property)": [[106, "clawpack.petclaw.state.State.num_aux"]], "num_aux (clawpack.pyclaw.state.state property)": [[106, "clawpack.pyclaw.state.State.num_aux"]], "num_eqn (clawpack.petclaw.state.state property)": [[106, "clawpack.petclaw.state.State.num_eqn"]], "num_eqn (clawpack.pyclaw.state.state property)": [[106, "clawpack.pyclaw.state.State.num_eqn"]], "p (clawpack.petclaw.state.state property)": [[106, "clawpack.petclaw.state.State.p"]], "p (clawpack.pyclaw.state.state attribute)": [[106, "clawpack.pyclaw.state.State.p"]], "problem_data (clawpack.petclaw.state.state attribute)": [[106, "clawpack.petclaw.state.State.problem_data"]], "problem_data (clawpack.pyclaw.state.state attribute)": [[106, "clawpack.pyclaw.state.State.problem_data"]], "q (clawpack.petclaw.state.state property)": [[106, "clawpack.petclaw.state.State.q"]], "set_aux_from_auxbc() (clawpack.pyclaw.state.state method)": [[106, "clawpack.pyclaw.state.State.set_aux_from_auxbc"]], "set_cparam() (clawpack.pyclaw.state.state method)": [[106, "clawpack.pyclaw.state.State.set_cparam"]], "set_num_ghost() (clawpack.petclaw.state.state method)": [[106, "clawpack.petclaw.state.State.set_num_ghost"]], "set_num_ghost() (clawpack.pyclaw.state.state method)": [[106, "clawpack.pyclaw.state.State.set_num_ghost"]], "set_q_from_qbc() (clawpack.pyclaw.state.state method)": [[106, "clawpack.pyclaw.state.State.set_q_from_qbc"]], "t (clawpack.petclaw.state.state attribute)": [[106, "clawpack.petclaw.state.State.t"]], "t (clawpack.pyclaw.state.state attribute)": [[106, "clawpack.pyclaw.state.State.t"]], "framecounter (class in clawpack.pyclaw.util)": [[109, "clawpack.pyclaw.util.FrameCounter"]], "verifyerror": [[109, "clawpack.pyclaw.util.VerifyError"]], "add_parent_doc() (in module clawpack.pyclaw.util)": [[109, "clawpack.pyclaw.util.add_parent_doc"]], "check_diff() (in module clawpack.pyclaw.util)": [[109, "clawpack.pyclaw.util.check_diff"]], "clawpack.pyclaw.util": [[109, "module-clawpack.pyclaw.util"]], "compile_library() (in module clawpack.pyclaw.util)": [[109, "clawpack.pyclaw.util.compile_library"]], "construct_function_handle() (in module clawpack.pyclaw.util)": [[109, "clawpack.pyclaw.util.construct_function_handle"]], "convert_fort_double_to_float() (in module clawpack.pyclaw.util)": [[109, "clawpack.pyclaw.util.convert_fort_double_to_float"]], "gen_variants() (in module clawpack.pyclaw.util)": [[109, "clawpack.pyclaw.util.gen_variants"]], "get_counter() (clawpack.pyclaw.util.framecounter method)": [[109, "clawpack.pyclaw.util.FrameCounter.get_counter"]], "increment() (clawpack.pyclaw.util.framecounter method)": [[109, "clawpack.pyclaw.util.FrameCounter.increment"]], "read_data_line() (in module clawpack.pyclaw.util)": [[109, "clawpack.pyclaw.util.read_data_line"]], "reset_counter() (clawpack.pyclaw.util.framecounter method)": [[109, "clawpack.pyclaw.util.FrameCounter.reset_counter"]], "run_app_from_main() (in module clawpack.pyclaw.util)": [[109, "clawpack.pyclaw.util.run_app_from_main"]], "run_serialized() (in module clawpack.pyclaw.util)": [[109, "clawpack.pyclaw.util.run_serialized"]], "set_counter() (clawpack.pyclaw.util.framecounter method)": [[109, "clawpack.pyclaw.util.FrameCounter.set_counter"]], "test_app() (in module clawpack.pyclaw.util)": [[109, "clawpack.pyclaw.util.test_app"]], "nodataerror": [[158, "clawpack.geoclaw.surge.storm.NoDataError"]], "storm (class in clawpack.geoclaw.surge.storm)": [[158, "clawpack.geoclaw.surge.storm.Storm"]], "available_formats() (in module clawpack.geoclaw.surge.storm)": [[158, "clawpack.geoclaw.surge.storm.available_formats"]], "available_models() (in module clawpack.geoclaw.surge.storm)": [[158, "clawpack.geoclaw.surge.storm.available_models"]], "category() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.category"]], "clawpack.geoclaw.surge.storm": [[158, "module-clawpack.geoclaw.surge.storm"]], "fill_rad_w_other_source() (in module clawpack.geoclaw.surge.storm)": [[158, "clawpack.geoclaw.surge.storm.fill_rad_w_other_source"]], "make_multi_structure() (in module clawpack.geoclaw.surge.storm)": [[158, "clawpack.geoclaw.surge.storm.make_multi_structure"]], "read() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.read"]], "read_atcf() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.read_atcf"]], "read_geoclaw() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.read_geoclaw"]], "read_hurdat() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.read_hurdat"]], "read_ibtracs() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.read_ibtracs"]], "read_imd() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.read_imd"]], "read_jma() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.read_jma"]], "read_tcvitals() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.read_tcvitals"]], "write() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.write"]], "write_atcf() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.write_atcf"]], "write_geoclaw() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.write_geoclaw"]], "write_hurdat() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.write_hurdat"]], "write_imd() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.write_imd"]], "write_jma() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.write_jma"]], "write_tcvitals() (clawpack.geoclaw.surge.storm.storm method)": [[158, "clawpack.geoclaw.surge.storm.Storm.write_tcvitals"]], "topography (class in clawpack.geoclaw.topotools)": [[164, "clawpack.geoclaw.topotools.Topography"]], "x (clawpack.geoclaw.topotools.topography property)": [[164, "clawpack.geoclaw.topotools.Topography.X"], [164, "clawpack.geoclaw.topotools.Topography.x"]], "y (clawpack.geoclaw.topotools.topography property)": [[164, "clawpack.geoclaw.topotools.Topography.Y"], [164, "clawpack.geoclaw.topotools.Topography.y"]], "z (clawpack.geoclaw.topotools.topography property)": [[164, "clawpack.geoclaw.topotools.Topography.Z"], [164, "clawpack.geoclaw.topotools.Topography.z"]], "clawpack.geoclaw.topotools": [[164, "module-clawpack.geoclaw.topotools"]], "create_topo_func() (in module clawpack.geoclaw.topotools)": [[164, "clawpack.geoclaw.topotools.create_topo_func"]], "crop() (clawpack.geoclaw.topotools.topography method)": [[164, "clawpack.geoclaw.topotools.Topography.crop"]], "delta (clawpack.geoclaw.topotools.topography property)": [[164, "clawpack.geoclaw.topotools.Topography.delta"]], "determine_topo_type() (in module clawpack.geoclaw.topotools)": [[164, "clawpack.geoclaw.topotools.determine_topo_type"]], "extent (clawpack.geoclaw.topotools.topography property)": [[164, "clawpack.geoclaw.topotools.Topography.extent"]], "fetch_topo_url() (in module clawpack.geoclaw.topotools)": [[164, "clawpack.geoclaw.topotools.fetch_topo_url"]], "generate_2d_coordinates() (clawpack.geoclaw.topotools.topography method)": [[164, "clawpack.geoclaw.topotools.Topography.generate_2d_coordinates"]], "generate_2d_topo() (clawpack.geoclaw.topotools.topography method)": [[164, "clawpack.geoclaw.topotools.Topography.generate_2d_topo"]], "get_topo() (in module clawpack.geoclaw.topotools)": [[164, "clawpack.geoclaw.topotools.get_topo"]], "in_poly() (clawpack.geoclaw.topotools.topography method)": [[164, "clawpack.geoclaw.topotools.Topography.in_poly"]], "interp_unstructured() (clawpack.geoclaw.topotools.topography method)": [[164, "clawpack.geoclaw.topotools.Topography.interp_unstructured"]], "make_shoreline_xy() (clawpack.geoclaw.topotools.topography method)": [[164, "clawpack.geoclaw.topotools.Topography.make_shoreline_xy"]], "plot() (clawpack.geoclaw.topotools.topography method)": [[164, "clawpack.geoclaw.topotools.Topography.plot"]], "read() (clawpack.geoclaw.topotools.topography method)": [[164, "clawpack.geoclaw.topotools.Topography.read"]], "read_header() (clawpack.geoclaw.topotools.topography method)": [[164, "clawpack.geoclaw.topotools.Topography.read_header"]], "read_netcdf() (in module clawpack.geoclaw.topotools)": [[164, "clawpack.geoclaw.topotools.read_netcdf"]], "replace_no_data_values() (clawpack.geoclaw.topotools.topography method)": [[164, "clawpack.geoclaw.topotools.Topography.replace_no_data_values"]], "replace_values() (clawpack.geoclaw.topotools.topography method)": [[164, "clawpack.geoclaw.topotools.Topography.replace_values"]], "set_xyz() (clawpack.geoclaw.topotools.topography method)": [[164, "clawpack.geoclaw.topotools.Topography.set_xyZ"]], "smooth_data() (clawpack.geoclaw.topotools.topography method)": [[164, "clawpack.geoclaw.topotools.Topography.smooth_data"]], "swapheader() (in module clawpack.geoclaw.topotools)": [[164, "clawpack.geoclaw.topotools.swapheader"]], "topo1writer() (in module clawpack.geoclaw.topotools)": [[164, "clawpack.geoclaw.topotools.topo1writer"]], "topo2writer() (in module clawpack.geoclaw.topotools)": [[164, "clawpack.geoclaw.topotools.topo2writer"]], "topo3writer() (in module clawpack.geoclaw.topotools)": [[164, "clawpack.geoclaw.topotools.topo3writer"]], "write() (clawpack.geoclaw.topotools.topography method)": [[164, "clawpack.geoclaw.topotools.Topography.write"]]}}) \ No newline at end of file diff --git a/v5.10.x/set_eta_init.html b/v5.10.x/set_eta_init.html new file mode 100644 index 0000000000..c38b6d65b4 --- /dev/null +++ b/v5.10.x/set_eta_init.html @@ -0,0 +1,273 @@ + + + + + + + + + Set Eta Init – spatially varying initial surface elevation — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Set Eta Init – spatially varying initial surface elevation

    +

    Prior to Version 5.7.0, +GeoClaw had a single scalar parameter sea_level and the water +surface is initialized to this value in every cell where the GeoClaw +cell-averaged topography value B is smaller, i.e., the water depth +in each cell is initialized to:

    +

    h[i,j] = max(0, sea_level - B[i,j]).

    +

    In some cases it is desirable to initialize the depth so that the +surface is spatially varying.

    +

    Starting in v5.7.0, the library routine +$CLAW/geoclaw/src/2d/shallow/set_eta_init.f90 can be used to set +the desired initial water surface eta = B + h in a spacially varying +manner. In order to invoke this routine, in setrun.py you should set:

    +
    rundata.qinit_data.variable_eta_init = True
    +
    +
    +
    +

    Default behavior, adjusting sea level by seismic deformation

    +

    The default library routine +$CLAW/geoclaw/src/2d/shallow/set_eta_init.f90 +is set up for the use case in which a region subsides or is uplifted by a +local earthquake. +In tsunami modeling of a nearfield event, the seafloor +deformation due to the earthquake often extends onto shore in the region +being modeled. If the coastal region subsides, for example, then the +land drops near the shore and the water adjacent drops as well. If a +grid patch was initialized before the deformation specified in the dtopo +file by the formula above, then the depth h[i,j] does not decrease +during the subsidence, which is the correct behavior.

    +

    However, in some +cases the tsunami does not arrive at the shore quickly and so it is +desirable to use coarser grids in early stages of the computation, +introducing highly refined grids only after some specified time. When +new levels of refinement are first introduced into a simulation then the +formula given above is used to initialize cells near the coast. But if the +coast subsided (or is uplifted), the the formula above should be replaced by:

    +

    h[i,j] = max(0, sea_level + dz[i,j] - B[i,j])

    +

    where dz[i,j] is obtained by interpolating the co-seismic +deformation specified in the dtopo file to the cell center. Failure to +do this can sometimes result in large areas being flooded by the +initialization that should not be flooded by the tsunami.

    +

    The default version of $CLAW/geoclaw/src/2d/shallow/set_eta_init.f90 +loops over all (possibly time-dependent) +dtopo files and interpolates from these +files to the points on the grid patch, at the specified time, to adjust the +initial constant sea_level value at each point on the patch.

    +

    Note that this set_eta_init function is only called when a grid cell is +first initialized at a given AMR level. It is called from qinit.f90 to +initialize any patches that exist at the initial time (which may be before +the earthquake starts, in which case no adjustment to sea_level would be +made).

    +

    It is also called if a region is refined to a higher level than +previously, but the resulting value is used only in cells where the +the water surface level h+B cannot be interpolated from coarser levels, due +to the fact that one or more neighboring cells was dry (in which case +h+B=B may be huge if the land rises steeply, and using this value in an +interpolation of the sea surface would lead to artificially high surface +elevation, and hence incorrect depth h when this is computed as eta - B. +So such cells near the coast must be filled with water up to the value +specified by set_eta_init. In previous versions they were always filled +to the level specified by sea_level, but this was incorrect +in regions where the water level subsided (or was uplifted) along with the +land.

    +

    As noted above, +this is particularly important in coastal regions where there is seismic +deformation but it takes some time for the tsunami to arrive and so the fine +grids needed to resolve the region are not introduced until some time after the +seismic deformation.

    +
    +
    +

    Other use cases

    +

    For other uses one can copy the library routine +$CLAW/geoclaw/src/2d/shallow/set_eta_init.f90 +to the application directory and modify it as desired (and change the +Makefile to point to the modified version).

    +

    For example, there may be onshore lakes whose initial surface elevation +should be different than sea_level. This could be added to the existing +routine, so that siesmic displacement of both the offshore water and onshore +lakes is also handled, or the dtopo adjustments can be removed if not needed.

    +

    When modeling dam break problems, there may one or more lakes +of interest at different initial elevations. +As an example, to develop a custom routine in the case +where a lake behind a dam is desired to be set to one elevation while +everywhere else there should be no water, this routine could check the +(x,y) location of each cell and set eta_init either to the lake +elevation, if in a specified region, +or to a very negative value lower than any topography (to force h = 0), +when outside the region covered by the lake.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/setaux_defaults.html b/v5.10.x/setaux_defaults.html new file mode 100644 index 0000000000..10b7403a57 --- /dev/null +++ b/v5.10.x/setaux_defaults.html @@ -0,0 +1,193 @@ + + + + + + + + + setaux default routines — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    setaux default routines

    +

    Below are links to the default setaux library routines for Classic and AMRClaw. +By default these do nothing. If you wish to specify aux arrays you will +need to copy one of these files to your application directory and modify it +as needed. Remember to change to Makefile to point to the proper version.

    + +

    (Note: these links are for the version checked in to the master branch. +You can select a different branch or tag from the GitHub page.)

    +
    +

    setaux routine in GeoClaw

    +

    In GeoClaw, there is a library routine that sets aux(1,i,j) to the cell +average of the bathymetry, aux(2,i,j) to the ratio of the true cell area +to dx*dy (the capacity function), and aux(3,i,j) to the length ratio of +the bottom edge to dx (The latter two quantities vary +with latitude when coordinate_system == 2).

    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/setenv.html b/v5.10.x/setenv.html new file mode 100644 index 0000000000..94069aeb1d --- /dev/null +++ b/v5.10.x/setenv.html @@ -0,0 +1,229 @@ + + + + + + + + + Set environment variables — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Set environment variables

    +

    The export commands below work in the bash shell. The syntax may +be different in other shells.

    +
    +

    CLAW

    +

    To use the Fortran versions of Clawpack you will need to set the +environment variable CLAW to point to the top level of clawpack tree +(there is no need to perform this step if you will only use PyClaw). +In the bash shell these can be set via:

    +
    export CLAW=/full/path/to/clawpack  # to top level clawpack directory
    +
    +
    +
    +
    +

    FC

    +

    You also need to set FC to point to the desired Fortran compiler, +e.g.:

    +
    export FC=gfortran   # or other preferred Fortran compiler
    +
    +
    +

    Consider putting the two commands above in a file that is executed every +time you open a new shell or terminal window. On Linux machines +with the bash shell this is generally the file .bashrc in your home +directory. On a Mac it may be called .bash_profile.

    +

    If your environment variable CLAW is properly set, the command

    +
    ls $CLAW
    +
    +
    +

    should list the top level directory, and report for example:

    +
    README.md       riemann/        pyclaw/
    +amrclaw/        setup.py        clawutil/
    +geoclaw/        visclaw/        classic/
    +
    +
    +
    +
    +

    PYTHONPATH

    +

    If you used pip to install Clawpack then you should not set this +environment variable. But if you installed without pip, e.g. following +Options for installing Clawpack Fortran codes, then you need to set PYTHONPATH to include +the directory $CLAW. If PYTHONPATH is already set, then you may want to +insert $CLAW into the list of directories searched by Python via:

    +
    export PYTHONPATH=$CLAW:$PYTHONPATH
    +
    +
    +

    See Python path for more information.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/setplot.html b/v5.10.x/setplot.html new file mode 100644 index 0000000000..5c7e891b02 --- /dev/null +++ b/v5.10.x/setplot.html @@ -0,0 +1,303 @@ + + + + + + + + + Using setplot.py to specify the desired plots — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Using setplot.py to specify the desired plots

    +

    The desired plots are specified by creating an object +of class ClawPlotData that contains specifications of what figures should be +created, and within each figure what sets of axes should be drawn, and +within each axes what items should be plotted (lines, contour plots, +etc.).

    +
    +

    Plotting Data Objects

    +

    More details about each class of objects can be found +on these pages:

    + +

    For examples, see Plotting examples.

    +
    +
    +

    Overview

    +

    The approach outlined below may seem more complicated than necessary, and it +would be if all you ever want to do is plot one set of data at each output +time. However, when adaptive mesh refinement is used each frame of data may +contain several patches and so creating the desired plot requires looping over +all patches. This is done by the plotting utilities described in Plotting with Visclaw, +but for this to work it is necessary to specify what plot(s) are desired.

    +

    Most example directories contain a file setplot.py that contains a +function setplot(plotdata). This function +sets various attributes of plotdata +in order to specify how plotting is to be done.

    +

    The object plotdata is of class ClawPlotData. The way to set up the plot +structure is to follow this outline:

    +
    +
      +
    • Specify some attributes of setplot that determine what sort of plots +will be produced and where they will be stored, e.g.:

      +
      plotdata.plotdir = '_plots'
      +
      +
      +

      will cause hardcopy to go to subdirectory _plots of the current directory. +(Attributes like plotdir that are only used for hardcopy are often set in +the script plotclaw.py rather than in setplot. See Specifying what and how to plot.)

      +

      There are many other ClawPlotData attributes and methods.

      +
    • +
    • Specify one or more Figures to be created for each frame, e.g.:

      +
      plotfigure = plotdata.new_plotfigure(name='Solution', figno=1)
      +
      +
      +

      plotfigure is now an object of class ClawPlotFigure and various attributes +can be set, e.g.:

      +
      plotfigure.kwargs = {'figsize':[8,12], 'facecolor':'#ff9999'}
      +
      +
      +

      to specify any keyword arguments +that should be used when creating this figure in matplotlib. +The above would create a figure that is +8 inches by 12 inches with a pink background.

      +

      For more options, +see the matplotlib documentation +for the figure command.

      +

      There are many other plotfigure attributes and methods.

      +
    • +
    • Specify one or more Axes to be created within each figure, e.g.:

      +
      plotaxes = plotfigure.new_plotaxes()
      +
      +
      +

      Note that new_plotaxes is a method of class ClawPlotFigure and creates a set +of axes specific to the particular object plotfigure.

      +

      plotaxes is now an object of class ClawPlotAxes and various attributes +can be set, e.g.:

      +
      plotfigure.ylimits = [-1, 1]
      +
      +
      +

      There are many other ClawPlotAxes attributes and methods.

      +
    • +
    • Specify one or more Items to be created within these axes, e.g.:

      +
      plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
      +
      +
      +

      Note that new_plotitem is a method of class ClawPlotAxes and creates a plot +object (e.g. line, contour plot, etc) +specific to the particular object plotaxes.

      +

      plotitem is now an object of class ClawPlotItem and various attributes +can be set, e.g.:

      +
      plotitem.plotstyle = '-'
      +plotitem.color = 'r'
      +
      +
      +

      for a solid line that is red.

      +

      There are many other ClawPlotItem attributes and methods.

      +
    • +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/setrun.html b/v5.10.x/setrun.html new file mode 100644 index 0000000000..cb4030abad --- /dev/null +++ b/v5.10.x/setrun.html @@ -0,0 +1,597 @@ + + + + + + + + + Specifying classic run-time parameters in setrun.py — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Specifying classic run-time parameters in setrun.py

    +

    It may be useful to look at a specific example, e.g. +Sample setrun.py module for classic Clawpack.

    +

    Note: Many parameters have changed name since Version 4.X and some new +ones have been added. See Changes to input parameters in setrun.py from 4.x to 5.0 for a summary.

    +

    To convert a Version 4.x setrun.py file to Version 5.0, see Converting from Clawpack 4.6 to 5.0.

    +
    +

    Input

    +

    setrun takes a single argument claw_pkg that should be set to classic.

    +
    +
    +

    Output

    +

    rundata, an object of class ClawRunData, created in the +setrun file with the commands:

    +
    from clawpack.clawutil import clawdata
    +rundata = clawdata.ClawRunData(claw_pkg, num_dim)
    +
    +
    +

    The rundata object has an attribute rundata.clawdata whose +attributes are described below.

    +

    This section explains the parameters needed for the classic single-grid +Clawpack code. Additional parameters are needed by extensions of the code. +For these, see:

    +
    +
    +
    +
    +
    +

    Run-time parameters

    +

    The parameters needed in 1 space dimension (ndim=1) are described. In 2d +and 3d there are analogous parameters in y and z required, as mentioned +below.

    +
    +
    +num_dim : integer from [1,2,3]
    +

    number of space dimensions.

    +
    + +
    +
    +lower : list of floats
    +

    lower limits in the x, [y,z] directions.

    +
    + +
    +
    +upper : list of floats
    +

    upper limits in the x, [y ,z] directions.

    +
    + +
    +
    +num_cells : list of integers
    +

    The number of grid cells in the x, [y, ,z] directions.

    +

    Note that when AMR is used, num_cells determines the number of cells in +each dimension on the coarsest Level 1 grid. Additional parameters +described below determine refinement ratios to finer levels.

    +
    + +
    +
    +num_eqn : integer
    +

    Number of equations in the system (e.g. num_eqn=1 for a scalar problem).

    +
    + +
    +
    +num_aux : integer
    +

    Number of auxiliary variables in the aux array (initialized in setaux.f)

    +
    + +
    +
    +capa_index : integer
    +

    Index of aux array corresponding to capacity function, if there is one.

    +
    + +
    +
    +t0 : float
    +

    Initial time, often t0 = 0.

    +
    + +
    +
    +restart : boolean
    +

    Currently only available in amrclaw and geoclaw.

    +

    Set True to restart a previous computation. To use this option, +see Checkpointing and restarting. Note that a change in the Makefile is also +required.

    +
    + +
    +
    +restart_file : str
    +

    If restart == True then this should be the name of the checkpoint +file containing all the information needed to do a restart. This will +generally be of the form fort.chkNNNNN where NNNNN is the (coarse +grid) timestep from the previous computation to restart from. +This file is assumed to be in the directory specified for output from +this run. +See Checkpointing and restarting for more details.

    +
    + +
    +
    +output_style: integer
    +

    There are three possible ways to specify the output +times. This parameter selects the desired manner to specify the times, +and affects what other attributes are required.

    +
    +
      +
    • output_style = 1 : Output at fixed time intervals.

      +

      Requires additional parameters:

      +
        +
      • num_output_times : integer, number of output times

      • +
      • tfinal : float, final time

      • +
      • output_t0 : boolean, whether to also output at initial time t0.

      • +
      +

      The time steps will be adjusted to hit these times exactly. (Provided +dt_variable = True. Otherwise dt_initial must divide +tfinal/num_output_times an integer number of times.)

      +
    • +
    • output_style = 2 : Output at specified times.

      +

      Requires the additional parameter:

      +
        +
      • output_times : list of floats, +times to output (include t0 explicitly if desired)

      • +
      +
    • +
    • output_style = 3 : Output every so many steps. +Most often used for debugging, e.g to output every time step.

      +

      Requires additional parameters:

      +
        +
      • output_step_interval : integer, number of steps between outputs

      • +
      • total_steps : integer, total number of steps to take

      • +
      • output_t0 : boolean, whether to also output at initial time t0.

      • +
      +
    • +
    +
    +
    + +
    +
    +output_format: str
    +

    Format of output. Currently the following are supported in amrclaw and +geoclaw (only ‘ascii’ in classic):

    +
      +
    • ‘ascii’ : the files fort.q0000 etc. are ASCII files,

    • +
    • ‘binary64’ : Raw binary dump of full float64 (kind=8) values,

    • +
    • ‘binary32’ : Raw binary dump of float32 (kind=4) truncated values. +This is almost always sufficient precision for plotting or +post-processing purposes, and results in files that are +half as large as ‘binary64’.

    • +
    +
    + +
    +
    +output_q_components: list of booleans or str
    +
      +
    • A list such as [1,0,1] would indicate to output q[0] and q[2] only. +This might not be working yet.

    • +
    • The string ‘all’ indicates that all components should be output

    • +
    • The string ‘none’ indicates that no components should be output

    • +
    +
    + +
    +
    +output_aux_components: list of booleans or str
    +
      +
    • A list such as [1,0,1] would indicate to output aux[0] and aux[2] only. +This might not be working yet.

    • +
    • The string ‘all’ indicates that all components should be output

    • +
    • The string ‘none’ indicates that no components should be output

    • +
    +
    + +
    +
    +output_aux_onlyonce: boolean
    +

    If output_aux_components is not ‘none’ or an empty list, this +indicates whether aux arrays should be only output at time t0 or at +every output time. The latter is generally necessary for AMR +applications unless the grids never change (and the component of aux +are never modified except in setaux).

    +
    + +
    +
    +verbosity: integer >= 0
    +

    A line of output (reporting t, dt and CFL number) is written to the +terminal every time step, but only at Level verbosity or coarser.

    +

    Set to 0 to suppress all such output.

    +
    + +
    +
    +dt_initial: float >= 0.
    +

    Initial time step to try in first step. If using dt_variable == True +and are unsure of an appropriate +timestep, set to a very small value (e.g. 1.e-10). After the first +step the wave speeds observed in all Riemann solutions will be used to +set the time step appropriately for the next step.

    +
    + +
    +
    +dt_variable: boolean
    +

    If True, time steps are adjusted automatically based on the desired +Courant number cfl_desired.

    +

    If False, fixed time steps of lenght dt_initial are used.

    +
    + +
    +
    +dt_max: float >= 0.
    +

    If dt_variable = True then this is an upper bound on the allowable time +step regardless of the Courant number. Useful if there are other reasons +to limit the time step (e.g. stiff source terms).

    +
    + +
    +
    +cfl_desired: float >= 0.
    +

    If dt_variable = True then this is the desired Courant number. Time +steps will be adjusted based on the maximum wave speed seen in the last +time step taken. For a nonlinear problem this may not result in the +Courant number being exactly the desired value in the next step.

    +

    Usually cfl_desired = 0.9 or less.

    +
    + +
    +
    +cfl_max: float
    +

    If dt_variable = True then this is the maximum Courant number that can +be allowed. If a time step results in a Courant number that is greater +than cfl_desired but less than or equal to cfl_max, the step is +accepted. If the Courant number is greater than cfl_max then the step +is rejected and a smaller step is taken. (At this point the maximum wave +speed from Riemann solutions is known, so the step can be adjusted to +exactly hit the desired value cfl_desired.)

    +

    Note: With AMRClaw it is impossible to retake a step and so if +cfl > cfl_max then a warning message is printed and the computation +continues. Note that results may be contaminated if the Courant number +is much above 1. +This means that with AMR it is important to choose an appropriate time +step dt_initial for the first time step, or use a very small value.

    +

    Usually cfl_max = 1.0 is fine, e.g. 500000.

    +
    + +
    +
    +steps_max: int
    +

    Maximum number of time steps allowed between output times. This is just +to avoid infinite loops and generally a large value is fine.

    +
    + +
    +
    +order : int
    +

    order == 1 : Use Godunov’s method

    +

    order == 2 : Use second order corrections with limiters in normal +direction.

    +
    + +
    +
    +dimensional_split : str
    +

    dimensional_split == ‘unsplit’ is the only option currently allowed +for AMRClaw.

    +
    + +
    +
    +transverse_waves : int or str
    +

    transverse_waves == 0 or ‘none’ : No transverse correction terms +(Donor cell upwind if also order == 1).

    +

    transverse_waves == 1 or ‘increment’ : Only the increment waves are +transmitted transversely. +(Corner transport upwind if also order == 1, should be second order +accurate if order == 2).

    +

    transverse_waves == 2 or ‘all’ : Corner tranpsort of second order +corrections as well. (Somewhat improved stability.)

    +
    + +
    +
    +num_waves : int
    +

    Number of waves the Riemann solver returns.

    +
    + +
    +
    +limiter : list of int or str, of length num_waves
    +

    Each element of the list can take the values:

    +
    +
      +
    • 0 or ‘none’ : no limiter (Lax-Wendroff)

    • +
    • 1 or ‘minmod’ : minmod

    • +
    • 2 or ‘superbee’ : superbee

    • +
    • 3 or ‘mc’ : monotonized central (MC) limiter

    • +
    • 4 or ‘vanleer’ : van Leer

    • +
    +
    +

    See Chapter 6 of [LeVeque-FVMHP] for details.

    +
    + +
    +
    +use_fwaves : boolean
    +

    If True, the Riemann solvers should return f-waves (a decomposition of +the the flux difference) rather than the usual waves (which give +a decomposition of the jump in Q between adjacent states). +See f-wave formulation, f-wave Riemann solvers and +Section 16.4 of [LeVeque-FVMHP] or [BaleLevMitRoss02] for details.

    +
    + +
    +
    +source_split : list of int or str, of length num_waves
    +

    Determines form of fractional step algorithm used to apply source terms +(if any). Source terms must be implemented by providing a subroutine +srcN.f (in N space dimensions) that is called each time step +and should advance the solution by solving the source term equations +(the PDE after dropping the hyperolic terms). +See Using src for source terms.

    +
    +
      +
    • src_split == 0 or ‘none’ : no source term (srcN routine never called)

    • +
    • src_split == 1 or ‘godunov’ : Godunov (1st order) splitting used,

    • +
    • src_split == 2 or ‘strang’ : Strang (2nd order) splitting used.

    • +
    +
    +

    The Strang splitting requires calling the source term routine twice each +time step (before and after the hyperbolic step, with half the time step) +and is generally not recommended. It is often no more accurate thn the +Godunov splitting, requires more work, and can make it harder to properly +set ghost cells for boundary conditions.

    +
    + +
    +
    +num_ghost : int
    +

    number of ghost cells at each boundary. Should be at least 1 if +order == 1 and at least 2 if order == 2.

    +
    + +
    +
    +bc_lower : list of int or str, of length num_ghost
    +

    Choice of boundary conditions at the lower boundary in each dimension. +Each element can take the following values:

    +
    +
      +
    • 0 or ‘user’ : user specified (must modify bcNamr.f to use this option)

    • +
    • 1 or ‘extrap’ : extrapolation (non-reflecting outflow)

    • +
    • 2 or ‘periodic’ : periodic (must specify this at both boundaries)

    • +
    • 3 or ‘wall’ : solid wall for systems where q(2) is normal velocity

    • +
    +

    If the value is 0 or ‘user’, then the user must modify the boundary +condition routine bcNamr.f to fill ghost cells in the desired manner. +See Boundary conditions for more details.

    +
    +
    + +
    +
    +bc_upper : list of int or str, of length num_ghost
    +

    Choice of boundary conditions at the upper boundary in each dimension. +The same choices are available as for bc_lower.

    +

    Note that if periodic boundary conditions are specified at the lower +boundary in some dimension then the same should be specified at the upper.

    +
    + +
    +
    +checkpt_style :: int
    +

    Currently only available in amrclaw and geoclaw.

    +

    Specify how often checkpoint files should be created that can be used to +restart a computation. +See Checkpointing and restarting for more details.

    +
    +
      +
    • checkpt_style = 0 : Do not checkpoint at all

    • +
    • checkpt_style = 1 : Checkpoint only at the final time.

    • +
    • checkpt_style = 2 : Specify a list of checkpoint times.

      +

      This is generally not recommended because time steps will be +adjusted to hit the checkpoint times, but may be useful in order to +create a checkpoint file just before some event of interest (e.g. +when debugging a code that is known to crash at a certain time).

      +

      Requires additional parameter:

      +
        +
      • checkpt_times : list of floats

      • +
      +
    • +
    • checkpt_style = 3 : Specify an interval for checkpointing.

      +

      Requires additional parameter:

      +
        +
      • checkpt_interval : int

        +

        Checkpoint every checkpt_interval time steps on Level 1 (coarsest +level).

        +
      • +
      +
    • +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/setrun_amrclaw.html b/v5.10.x/setrun_amrclaw.html new file mode 100644 index 0000000000..6156dc900a --- /dev/null +++ b/v5.10.x/setrun_amrclaw.html @@ -0,0 +1,464 @@ + + + + + + + + + Specifying AMRClaw run-time parameters in setrun.py — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Specifying AMRClaw run-time parameters in setrun.py

    +

    It may be useful to look at a specific example, e.g. +Sample setrun.py module for AMRClaw.

    +

    Note: Many parameters have changed name since Version 4.X and some new +ones have been added. See Changes to input parameters in setrun.py from 4.x to 5.0 for a summary.

    +

    To convert a Version 4.x setrun.py file to Version 5.0, see Converting from Clawpack 4.6 to 5.0.

    +
    +

    Input

    +

    setrun takes a single argument claw_pkg that should be set to amrclaw.

    +
    +
    +

    Output

    +

    rundata, an object of class ClawRunData, created in the +setrun file with the commands:

    +
    from clawpack.clawutil import clawdata
    +rundata = clawdata.ClawRunData(claw_pkg, num_dim)
    +
    +
    +

    The rundata object has an attribute rundata.clawdata whose +attributes are described in Specifying classic run-time parameters in setrun.py.

    +

    In addition, for AMRClaw rundata has an attribute rundata.amrdata +whose attributes are described below.

    +
    +
    +

    Run-time parameters

    +

    The parameters needed in 2 space dimensions (ndim=2) are described. In 3d +there are analogous parameters in z required, as mentioned below.

    +

    In addition to the parameters in rundata.clawdata (see Specifying classic run-time parameters in setrun.py), +the AMR parameters that can be set are the following attributes of +rundata.amrdata:

    +
    +
    +

    Special AMR parameters

    +
    +
    +amr_levels_max : int
    +

    Maximum levels of refinement to use.

    +
    + +
    +
    +refinement_ratios_x : list of int
    +

    Refinement ratios to use in the x direction.

    +

    Example: If num_cells[0] = 10 and refinement_ratios_x = [2,4] +then the Level 1 grid will have 10 cells in the x-direction, +Level 2 patches will be refined by a factor of 2, +and Level 3 will be refined by 4 relative to Level 2 +(by 8 relative to Level 1).

    +
    + +
    +
    +refinement_ratios_y : list of int
    +

    Refinement ratios to use in the y direction.

    +
    + +
    +
    +refinement_ratios_t : list of int
    +

    Refinement ratios to use in time. For an explicit method, maintaining +the Courant number usually requires refining in time by the same factor as +in space (or the maximum of the refinement ratio in the different space +directions).

    +

    Note: Rather than specifying this list, in GeoClaw it is possible to set +to set variable_dt_refinement_ratios = True so refinement ratios in +time are chosen automatically. This might be ported to AMRClaw?

    +
    + +
    +
    +aux_type : list of str, of length num_aux
    +

    Specifies the type of variable stored in each aux variable. +These are used when coarsening aux arrays. Each +element can be one of the following (but at most one can be ‘capacity’):

    +
    +
      +
    • ‘center’ for cell-centered values (e.g. density)

    • +
    • ‘capacity’ for a cell-centered capacity function (e.g. cell volume)

    • +
    • ‘xleft’ for a value centered on the left edge in x (e.g. normal velocity u)

    • +
    • ‘yleft’ for a value centered on the left edge in y (e.g. normal velocity v)

    • +
    +
    +
    + +
    +
    +flag_richardson : boolean
    +

    Determines whether Richardson extrapolation will be used as an error +estimator. If True, patches will be coarsened by a factor of 2 each +time regridding is done and the result from a single step on the +coarsened patch with double the time step will be compared to the +solution after 2 steps on the original patch in order to estimate the error.

    +
    + +
    +
    +flag_richardson_tol : float
    +

    When flag_richardson == True, cells will be flagged for refinement +if the absolute value of the estimated error exceeds this value.

    +

    When flag_richardson == False, this value is not used.

    +
    + +
    +
    +flag2refine : boolean
    +

    Determines whether the subroutine flag2refine is used to flag cells +for refinement.

    +
    + +
    +
    +flag2refine_tol : float
    +

    When flag2refine == True, the default library version flag2refine.f +checks the maximum absolute value of the difference between any component +of q in this cell with the corresponding component in any of the +neighboring cells. The cell is flagged for refinement if the maximum +value is greater than this tolerance.

    +
    + +
    +
    +regrid_interval : int
    +

    The number of time steps to take on each level between regridding to the +next finer level.

    +
    + +
    +
    +regrid_buffer_width : int
    +

    The number of points to flag for refining around any point flagged by +error estimation or flag2refine. This buffer zone is to insure that +waves do not leave the refined region before the next regridding and so +is generally chosen based on the value of regrid_interval, typically to +be the same value since waves can travel at most one grid cell per time +step.

    +
    + +
    +
    +clustering_cutoff  : float between 0 and 1
    +

    Cut-off used in clustering flagged points into rectangular patches for +refinement. Clusters are chosen to minimize the number of patches +subject to the constraint:

    +
    (# flagged pts) / (total # of cells refined) < clustering_cutoff
    +
    +
    +

    If clustering_cutoff is close to 1, only flagged cells will be refined, +which could lead to many 1 x 1 patches.

    +

    The default value 0.7 usually works well.

    +
    + +
    +
    +verbosity_regrid : int
    +

    Additional information is printed to the terminal each time regridding is +done at this level or coarser. Set to 0 to suppress regridding output.

    +
    + +
    +
    +regions : list
    +

    List of lists of the form +[minlevel,maxlevel,t1,t2,x1,x2,y1,y2]. +See Specifying AMR regions. +This attribute may be phased out in the future in favor of flagregions, +but currently both are supported.

    +
    + +
    +
    +flagregions : list
    +

    (Introduced in v5.7.0) +List of objects of class clawpack.amrclaw.data.FlagRegion that specify +regions where further adaptive refinement is either forced or forbiddne. +These objects are more flexible than the +older regions lists and are now preferred. See Specifying flagregions for adaptive refinement.

    +
    + +
    +
    +max1d : int
    +

    The maximum size (in each spatial dimension) of any grid patch. If +a larger region must be refined then it it split into multiple patches. +This can be tuned if desired based on cache size and OMP efficiency +(recall that multiple patches can be advanced in time in parallel). +For debugging it may also be useful to vary this parameter. +For most cases the default values work fine: 500 in 1D, 60 in 2D, 32 in 3D.

    +
    + +
    +
    +memsize : int
    +

    The initial length of the alloc array used internally in AMRClaw for +dynamic allocation of grid patch data. The default values depend on +the number of space dimensions and may be large enough. If the +alloc array is not long enough, then Fortran’s dynamic memory +allocation will be used to double the size of this array and copy over +all previous data, so it is not necessary to specify a value unless you +are running a large problem and are concerned about the time spent +repeatedly doubling and copying. The default values are:

    +
    2**20 - 1 = 1048575 in 1D,
    +2**22 - 1 = 4194303 in 2D,
    +2**23 - 1 = 8388607 in 3D.
    +
    +
    +

    These are chosen so that repeated doubling can get as close to 2**30 - 1 as +possible, the limit of int*4 array indices. The code will crash if +more memory is needed, in which case you may have to recompile with +int*8 index variables.

    +
    + +
    +
    +

    Debugging flags for additional printing

    +

    Setting one or more of these to True will cause additional information to +be written to the file fort.amr in the output directory.

    +
    +
    +dprint : boolean
    +

    Print domain flags

    +
    + +
    +
    +eprint : boolean
    +

    Print error estimation flags

    +
    + +
    +
    +edebug : boolean
    +

    Print even more error estimation flags

    +
    + +
    +
    +gprint : boolean
    +

    Print grid bisection and clustering information

    +
    + +
    +
    +nprint : boolean
    +

    Print proper nesting output

    +
    + +
    +
    +pprint : boolean
    +

    Print projection of tagged points

    +
    + +
    +
    +rprint : boolean
    +

    Print regridding summary

    +
    + +
    +
    +sprint : boolean
    +

    Print space/memory output

    +
    + +
    +
    +tprint : boolean
    +

    Print time step info on each level

    +
    + +
    +
    +uprint : boolean
    +

    Print update/upbnd information

    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/setrun_amrclaw_sample.html b/v5.10.x/setrun_amrclaw_sample.html new file mode 100644 index 0000000000..e19b6a3ee1 --- /dev/null +++ b/v5.10.x/setrun_amrclaw_sample.html @@ -0,0 +1,527 @@ + + + + + + + + + Sample setrun.py module for AMRClaw — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Sample setrun.py module for AMRClaw

    +

    This sample setrun.py module is for two-dimensional acoustics, from the +example in $CLAW/amrclaw/examples/acoustics_2d_radial.

    +
    """
    +Module to set up run time parameters for Clawpack.
    +
    +The values set in the function setrun are then written out to data files
    +that will be read in by the Fortran code.
    +
    +"""
    +
    +import os
    +import numpy as np
    +
    +#------------------------------
    +def setrun(claw_pkg='amrclaw'):
    +#------------------------------
    +
    +    """
    +    Define the parameters used for running Clawpack.
    +
    +    INPUT:
    +        claw_pkg expected to be "amrclaw" for this setrun.
    +
    +    OUTPUT:
    +        rundata - object of class ClawRunData
    +
    +    """
    +
    +    from clawpack.clawutil import clawdata
    +
    +
    +    assert claw_pkg.lower() == 'amrclaw',  "Expected claw_pkg = 'amrclaw'"
    +
    +    num_dim = 2
    +    rundata = clawdata.ClawRunData(claw_pkg, num_dim)
    +
    +    #------------------------------------------------------------------
    +    # Problem-specific parameters to be written to setprob.data:
    +    #------------------------------------------------------------------
    +
    +    probdata = rundata.new_UserData(name='probdata',fname='setprob.data')
    +    probdata.add_param('rho',     1.,  'density of medium')
    +    probdata.add_param('bulk',    4.,  'bulk modulus')
    +
    +    #------------------------------------------------------------------
    +    # Standard Clawpack parameters to be written to claw.data:
    +    #   (or to amrclaw.data for AMR)
    +    #------------------------------------------------------------------
    +
    +    clawdata = rundata.clawdata  # initialized when rundata instantiated
    +
    +
    +    # Set single grid parameters first.
    +    # See below for AMR parameters.
    +
    +
    +    # ---------------
    +    # Spatial domain:
    +    # ---------------
    +
    +    # Number of space dimensions:
    +    clawdata.num_dim = num_dim
    +
    +    # Lower and upper edge of computational domain:
    +    clawdata.lower[0] = -1.000000e+00          # xlower
    +    clawdata.upper[0] = 1.000000e+00          # xupper
    +    clawdata.lower[1] = -1.000000e+00          # ylower
    +    clawdata.upper[1] = 1.000000e+00          # yupper
    +
    +    # Number of grid cells:
    +    clawdata.num_cells[0] = 50      # mx
    +    clawdata.num_cells[1] = 50      # my
    +
    +
    +    # ---------------
    +    # Size of system:
    +    # ---------------
    +
    +    # Number of equations in the system:
    +    clawdata.num_eqn = 3
    +
    +    # Number of auxiliary variables in the aux array (initialized in setaux)
    +    clawdata.num_aux = 0
    +
    +    # Index of aux array corresponding to capacity function, if there is one:
    +    clawdata.capa_index = 0
    +
    +
    +    # -------------
    +    # Initial time:
    +    # -------------
    +
    +    clawdata.t0 = 0.000000
    +
    +
    +    # Restart from checkpoint file of a previous run?
    +    # Note: If restarting, you must also change the Makefile to set:
    +    #    RESTART = True
    +    # If restarting, t0 above should be from original run, and the
    +    # restart_file 'fort.chkNNNNN' specified below should be in
    +    # the OUTDIR indicated in Makefile.
    +
    +    clawdata.restart = False               # True to restart from prior results
    +    clawdata.restart_file = 'fort.chk00006'  # File to use for restart data
    +
    +
    +    # -------------
    +    # Output times:
    +    #--------------
    +
    +    # Specify at what times the results should be written to fort.q files.
    +    # Note that the time integration stops after the final output time.
    +
    +    clawdata.output_style = 1
    +
    +    if clawdata.output_style==1:
    +        # Output ntimes frames at equally spaced times up to tfinal:
    +        # Can specify num_output_times = 0 for no output
    +        clawdata.num_output_times = 20
    +        clawdata.tfinal = 1.0
    +        clawdata.output_t0 = True  # output at initial (or restart) time?
    +
    +    elif clawdata.output_style == 2:
    +        # Specify a list or numpy array of output times:
    +        # Include t0 if you want output at the initial time.
    +        clawdata.output_times =  [0., 0.1]
    +
    +    elif clawdata.output_style == 3:
    +        # Output every step_interval timesteps over total_steps timesteps:
    +        clawdata.output_step_interval = 2
    +        clawdata.total_steps = 4
    +        clawdata.output_t0 = True  # output at initial (or restart) time?
    +
    +
    +    clawdata.output_format = 'ascii'       # 'ascii', 'binary32', 'binary64'
    +
    +    clawdata.output_q_components = 'all'   # could be list such as [True,True]
    +    clawdata.output_aux_components = 'none'  # could be list
    +    clawdata.output_aux_onlyonce = True    # output aux arrays only at t0
    +
    +
    +    # ---------------------------------------------------
    +    # Verbosity of messages to screen during integration:
    +    # ---------------------------------------------------
    +
    +    # The current t, dt, and cfl will be printed every time step
    +    # at AMR levels <= verbosity.  Set verbosity = 0 for no printing.
    +    #   (E.g. verbosity == 2 means print only on levels 1 and 2.)
    +    clawdata.verbosity = 0
    +
    +
    +
    +    # --------------
    +    # Time stepping:
    +    # --------------
    +
    +    # if dt_variable==True:  variable time steps used based on cfl_desired,
    +    # if dt_variable==False: fixed time steps dt = dt_initial always used.
    +    clawdata.dt_variable = True
    +
    +    # Initial time step for variable dt.
    +    # (If dt_variable==0 then dt=dt_initial for all steps)
    +    clawdata.dt_initial = 1.00000e-02
    +
    +    # Max time step to be allowed if variable dt used:
    +    clawdata.dt_max = 1.000000e+99
    +
    +    # Desired Courant number if variable dt used
    +    clawdata.cfl_desired = 0.900000
    +    # max Courant number to allow without retaking step with a smaller dt:
    +    clawdata.cfl_max = 1.000000
    +
    +    # Maximum number of time steps to allow between output times:
    +    clawdata.steps_max = 50000
    +
    +
    +    # ------------------
    +    # Method to be used:
    +    # ------------------
    +
    +    # Order of accuracy:  1 => Godunov,  2 => Lax-Wendroff plus limiters
    +    clawdata.order = 2
    +
    +    # Use dimensional splitting? (not yet available for AMR)
    +    clawdata.dimensional_split = 'unsplit'
    +
    +    # For unsplit method, transverse_waves can be
    +    #  0 or 'none'      ==> donor cell (only normal solver used)
    +    #  1 or 'increment' ==> corner transport of waves
    +    #  2 or 'all'       ==> corner transport of 2nd order corrections too
    +    clawdata.transverse_waves = 2
    +
    +
    +    # Number of waves in the Riemann solution:
    +    clawdata.num_waves = 2
    +
    +    # List of limiters to use for each wave family:
    +    # Required:  len(limiter) == num_waves
    +    # Some options:
    +    #   0 or 'none'     ==> no limiter (Lax-Wendroff)
    +    #   1 or 'minmod'   ==> minmod
    +    #   2 or 'superbee' ==> superbee
    +    #   3 or 'mc'       ==> MC limiter
    +    #   4 or 'vanleer'  ==> van Leer
    +    clawdata.limiter = ['mc','mc']
    +
    +    clawdata.use_fwaves = False    # True ==> use f-wave version of algorithms
    +
    +    # Source terms splitting:
    +    #   src_split == 0 or 'none'    ==> no source term (src routine never called)
    +    #   src_split == 1 or 'godunov' ==> Godunov (1st order) splitting used,
    +    #   src_split == 2 or 'strang'  ==> Strang (2nd order) splitting used,  not recommended.
    +    clawdata.source_split = 0
    +
    +
    +    # --------------------
    +    # Boundary conditions:
    +    # --------------------
    +
    +    # Number of ghost cells (usually 2)
    +    clawdata.num_ghost = 2
    +
    +    # Choice of BCs at xlower and xupper:
    +    #   0 or 'user'     => user specified (must modify bcNamr.f to use this option)
    +    #   1 or 'extrap'   => extrapolation (non-reflecting outflow)
    +    #   2 or 'periodic' => periodic (must specify this at both boundaries)
    +    #   3 or 'wall'     => solid wall for systems where q(2) is normal velocity
    +
    +    clawdata.bc_lower[0] = 'extrap'   # at xlower
    +    clawdata.bc_upper[0] = 'extrap'   # at xupper
    +
    +    clawdata.bc_lower[1] = 'extrap'   # at ylower
    +    clawdata.bc_upper[1] = 'extrap'   # at yupper
    +
    +
    +    # ---------------
    +    # Gauges:
    +    # ---------------
    +    rundata.gaugedata.gauges = []
    +    # for gauges append lines of the form  [gaugeno, x, y, t1, t2]
    +    rundata.gaugedata.gauges.append([0, 0.0, 0.0, 0., 10.])
    +    rundata.gaugedata.gauges.append([1, 0.7, 0.0, 0., 10.])
    +    rundata.gaugedata.gauges.append([2, 0.7/np.sqrt(2.), 0.7/np.sqrt(2.), 0., 10.])
    +
    +    # --------------
    +    # Checkpointing:
    +    # --------------
    +
    +    # Specify when checkpoint files should be created that can be
    +    # used to restart a computation.
    +
    +    clawdata.checkpt_style = 1
    +
    +    if clawdata.checkpt_style == 0:
    +        # Do not checkpoint at all
    +        pass
    +
    +    elif clawdata.checkpt_style == 1:
    +        # Checkpoint only at tfinal.
    +        pass
    +
    +    elif clawdata.checkpt_style == 2:
    +        # Specify a list of checkpoint times.
    +        clawdata.checkpt_times = [0.1,0.15]
    +
    +    elif clawdata.checkpt_style == 3:
    +        # Checkpoint every checkpt_interval timesteps (on Level 1)
    +        # and at the final time.
    +        clawdata.checkpt_interval = 5
    +
    +
    +
    +    # ---------------
    +    # AMR parameters:
    +    # ---------------
    +
    +    amrdata = rundata.amrdata
    +
    +    # max number of refinement levels:
    +    amrdata.amr_levels_max = 3
    +
    +    # List of refinement ratios at each level (length at least amr_level_max-1)
    +    amrdata.refinement_ratios_x = [2, 2]
    +    amrdata.refinement_ratios_y = [2, 2]
    +    amrdata.refinement_ratios_t = [2, 2]
    +
    +
    +    # Specify type of each aux variable in clawdata.auxtype.
    +    # This must be a list of length num_aux, each element of which is one of:
    +    #   'center',  'capacity', 'xleft', or 'yleft'  (see documentation).
    +    amrdata.aux_type = []
    +
    +
    +    # Flag for refinement based on Richardson error estimater:
    +    amrdata.flag_richardson = False    # use Richardson?
    +    amrdata.flag_richardson_tol = 0.001000e+00  # Richardson tolerance
    +
    +    # Flag for refinement using routine flag2refine:
    +    amrdata.flag2refine = True      # use this?
    +    amrdata.flag2refine_tol = 0.2 # tolerance used in this routine
    +    # User can modify flag2refine to change the criterion for flagging.
    +    # Default: check maximum absolute difference of first component of q
    +    # between a cell and each of its neighbors.
    +
    +    # steps to take on each level L between regriddings of level L+1:
    +    amrdata.regrid_interval = 2
    +
    +    # width of buffer zone around flagged points:
    +    # (typically the same as regrid_interval so waves don't escape):
    +    amrdata.regrid_buffer_width  = 2
    +
    +    # clustering alg. cutoff for (# flagged pts) / (total # of cells refined)
    +    # (closer to 1.0 => more small grids may be needed to cover flagged cells)
    +    amrdata.clustering_cutoff = 0.7
    +
    +    # print info about each regridding up to this level:
    +    amrdata.verbosity_regrid = 0
    +
    +
    +    # ---------------
    +    # Regions:
    +    # ---------------
    +    rundata.regiondata.regions = []
    +    # to specify regions of refinement append lines of the form
    +    #  [minlevel,maxlevel,t1,t2,x1,x2,y1,y2]
    +
    +
    +    #  ----- For developers -----
    +    # Toggle debugging print statements:
    +    amrdata.dprint = False      # print domain flags
    +    amrdata.eprint = False      # print err est flags
    +    amrdata.edebug = False      # even more err est flags
    +    amrdata.gprint = False      # grid bisection/clustering
    +    amrdata.nprint = False      # proper nesting output
    +    amrdata.pprint = False      # proj. of tagged points
    +    amrdata.rprint = False      # print regridding summary
    +    amrdata.sprint = False      # space/memory output
    +    amrdata.tprint = False      # time step reporting each level
    +    amrdata.uprint = False      # update/upbnd reporting
    +
    +    return rundata
    +
    +    # end of function setrun
    +    # ----------------------
    +
    +
    +if __name__ == '__main__':
    +    # Set up run-time parameters and write all data files.
    +    import sys
    +    rundata = setrun(*sys.argv[1:])
    +    rundata.write()
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/setrun_geoclaw.html b/v5.10.x/setrun_geoclaw.html new file mode 100644 index 0000000000..8178c841ab --- /dev/null +++ b/v5.10.x/setrun_geoclaw.html @@ -0,0 +1,678 @@ + + + + + + + + + Specifying GeoClaw parameters in setrun.py — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Specifying GeoClaw parameters in setrun.py

    +

    Since GeoClaw Description and Detailed Contents is a modified version of AMRClaw Description and Detailed Contents, +all of the parameters that +are required for AMRClaw are also needed by GeoClaw. See +Specifying AMRClaw run-time parameters in setrun.py for a discussion of these, and Specifying classic run-time parameters in setrun.py for a +description of setrun.py input scripts more generally.

    +

    In addition, a number of other parameters should be set in the setrun.py +file in any GeoClaw Description and Detailed Contents application. +See also the Cautionary Hints on using GeoClaw for more about parameter choices.

    +

    It is best to look at a specific example while reading this section, for +example in one of the subdirectories of $CLAW/geoclaw/examples/tsunami.

    +

    The function setrun in this module is essentially the same as for AMRClaw, +except that it expects to be called with claw_pkg = ‘geoclaw’. This call +should be performed properly by the Makefile if you have CLAW_PKG = +geoclaw set properly there.

    +

    The new section setrun_setgeo +in this module contains the new GeoClaw parameters.

    +

    A brief summary of these:

    +
    +

    Additional AMR parameters

    +

    In addition to the standard AMRClaw parameters described in +Specifying AMRClaw run-time parameters in setrun.py, some additional parameters governing how refinement +is done should be specified for GeoClaw applications:

    +
    +
    +rundata.refinement_data.variable_dt_refinement_ratios : bool
    +

    The default is False, in which case refinement factors in time +are specified by the user as usual in the array +rundata.amrdata.refinement_ratios_t.

    +

    When True, this indicates that GeoClaw should automatically choose +refinement factors in time on each level based on an estimate of the maximum +wave speed on all grids at this level. For most hyperbolic problems the CFL +condition suggests that one should refine in time by the same factor as in +space. However, for GeoClaw applications where fine grids appear only in +shallow coastal regions this may not be the case.

    +
    + +
    +
    +rundata.refinement_data.wave_tolerance : float
    +

    Cells are flagged for refinement if the difference between the surface +elevation and sea level is larger than this tolerance. Note that whether +refinement is actually done depends also on how various AMR regions have +been set (see Section regions) and also on several other +attributes described below that contain information on minimum and +maximum refinement allowed in various regions.

    +
    + +
    +
    +rundata.refinement_data.speed_tolerance : list
    +

    Cells are flagged for refinement at a level if the magnitude of the +velocity is greater than the corresponding value in the list. For +instance if rundata.refinement_data.speed_tolerance = [1.0, 2.0, 3.0] +then cells with a speed of 1.0 would refine to level 2, cells with a +speed of 2.0 would refine to level 3, and cells with a speed of 3.0 +would refine to level 4.

    +
    + +
    +
    +

    General geo parameters

    +

    rundata.geo_data has the following additional attributes:

    +
    +
    +rundata.geo_data.gravity : float
    +

    gravitational constant in m/s**2, e.g. gravity = 9.81.

    +
    + +
    +
    +rundata.geo_data.coordinate_system : integer
    +

    coordinate_system = 1 for Cartesian x-y in meters,

    +

    coordinate_system = 2 for latitude-longitude on the sphere.

    +
    + +
    +
    +rundata.geo_data.earth_radius : float
    +

    radius of the earth in meters, e.g. earth_radius = 6367.5e3.

    +
    + +
    +
    +rundata.geo_data.coriolis_forcing : bool
    +

    coriolis_forcing = True to include Coriolis terms in momentum equations

    +

    coriolis_forcing = False to omit Coriolis terms (usually fine for tsunami modeling)

    +
    + +
    +
    +rundata.geo_data.sea_level : float
    +

    sea level (often sea_level = 0.) +This is relative to the 0 vertical datum of the topography files used. +It is important to set this properly for tsunami applications, see +Setting sea_level.

    +
    + +
    +
    +rundata.geo_data.friction_forcing : bool
    +

    Whether to apply friction source terms in momentum equations. +See Manning friction term for more discussion of the next three parameters.

    +
    + +
    +
    +rundata.geo_data.friction_depth : float
    +

    Friction source terms are only applied in water shallower than this, +i.e. if h < friction_depth, +assuming they have negligible effect in deeper water.

    +
    + +
    +
    +rundata.geo_data.manning_coefficient : float or list of floats
    +

    For friction source terms, the Manning coefficient. If a single value +is given, this value will be used where ever h < friction_depth. +If a list of values is given, then the next parameter delineates the +regions where each is used based on values of the topography B.

    +
    + +
    +
    +rundata.geo_data.manning_break : list of floats
    +

    If manning_coefficient is a list of length N, then this should be a +monotonically increasing list +of length N-1 giving break points in the topo B used to determine where +each Manning coefficient is used.

    +

    For example, if

    +
    manning_coefficient = [0.025, 0.06]
    +manning_break = [0.0]
    +
    +
    +

    then 0.025 will be used where B<0 and 0.06 used where B>0. +(Subject still to the restriction that no friction is applied +where h >= friction_depth.)

    +
    + +
    +
    +

    Topography data file parameters

    +

    See Topography data for more information about specifying topography (and +bathymetry) data files in GeoClaw.

    +
    +
    +rundata.topo_data.topofiles : list of lists
    +

    topofiles should be a list of the form [file1info, file2info, etc.] +where each element is itself a list of the form

    +
    +

    [topotype, fname]

    +
    +

    with values

    +
    +
    +

    topotype : integer

    +
    +

    1,2 or 3 depending on the format of the file (see Topography data).

    +
    +

    fname : string

    +
    +

    the name of the topo file.

    +
    +
    +

    Note: Starting in v5.8.0 implicitly specifying a flag region for +AMR is no longer supported in the specification of a topo file. +For more about controlling AMR in various regions, see Specifying flagregions for adaptive refinement.

    +
    +
    + +
    +
    +rundata.dtopo_data.dtopofiles : list of lists
    +

    Information about topography displacement files, giving perturbations to +topography generated by an earthquake, for example.

    +

    dtopofiles should be a list of the form [] or [file1info] +where each element (currently at most 1 is allowed!) +is itself a list of the form

    +
    +

    [dtopotype, fname]

    +
    +

    with values

    +
    +
    +

    dtopotype : integer

    +
    +

    1 or 3 depending on the format of the file (see Topography displacement files).

    +
    +

    fname : string

    +
    +

    the name of the dtopo file. See Topography displacement files for information about +the format of data in this file.

    +
    +
    +

    Note: Starting in v5.8.0 implicitly specifying a flag region for +AMR is no longer supported in the specification of a dtopo file. +For more about controlling AMR in various regions, see Specifying flagregions for adaptive refinement.

    +
    +
    + +
    +
    +rundata.dtopo_data.dt_max_dtopo : float
    +

    the maximum time step allowed during the time interval over which the +topography is moving. This is assumed to start at time t0 and to +extend to the maximum time that any of the dtopo files specified is +active. This avoids issues where the time step selected by the CFL +condition is much larger than the time scale over which the topography +changes. You must also set rundata.clawdata.dt_initial to the same +value (or smaller) to insure that the first time step is sufficiently small.

    +
    + +
    +
    +

    qinit data file parameters

    +

    A modification to the initial data specified by default can be made as +described at qinit data file.

    +
    +
    +rundata.qinit_data.qinit_type : integer
    +

    Specifies what type of perturbation is stored in the qinitfile, +see qinit data file for more information. Valid values for qinit_type +are

    +
    +
      +
    • 0 = No perturbation specified

    • +
    • 1 = Perturbation to depth h

    • +
    • 2 = Perturbation to x-momentum hu

    • +
    • 3 = Perturbation to y-momentum hv

    • +
    • 4 = Perturbation to surface level

    • +
    +
    +
    + +
    +
    +rundata.qinit_data.qinitfiles : list of lists
    +

    qinitfiles should be a list of the form [] or [file1info] +where each element (currently at most 1 is allowed!) +is itself a list of the form

    +
    +

    [fname]

    +
    +

    with values

    +
    +
    +

    fname : string

    +
    +

    the name of the qinitdata file. See Topography data for information about +the format of data in this file.

    +
    +
    +

    Note: Starting in v5.8.0 implicitly specifying a flag region for +AMR is no longer supported in the specification of a dtopo file. +For more about controlling AMR in various regions, see Specifying flagregions for adaptive refinement.

    +
    +
    + +

    See qinit data file for more details about the format.

    +
    +
    +

    Force some cells to be initially dry

    +
    +
    +rundata.qinit_data.force_dry_list: list of `clawpack.geoclaw.data.ForceDry` objects
    +
    + +

    Normally the finite volume cells with topography values below sea level (as +specified by rundata.geo_data.sea_level) are initialized as wet, with the +depth of water h needed to bring the surface eta to sea level. If the +computational domain includes regions where there is dry land below sea level +(e.g. behind a dike or levy), then these regions can be specified via this +attribute. See Force Cells to be Dry Initially.

    +
    +
    +

    Adjust sea level in some regions

    +
    +
    +rundata.qinit_data.variable_eta_init: logical
    +
    + +

    Normally a single constant value of sea level +(specified by rundata.geo_data.sea_level) is used to initialize the +depth of water required to bring the surface eta to sea level. +Sometimes sea level should have different values in different locations, +e.g. for an inland lake with surface level above the ocean level, or in +regions where coseismic uplift or subsidence moves the original water +vertically. If so, set this attribute to True and see Set Eta Init – spatially varying initial surface elevation +for more discussion on how to proceed.

    +
    +
    +

    AMR refinement region parameters

    +
    +

    As in AMRClaw (see Specifying AMRClaw run-time parameters in setrun.py), +one can specify regions and/or flagregions to control flagging cells +for refinement to the next level. +See Specifying AMR regions and Specifying flagregions for adaptive refinement for more details.

    +
    +
    +
    +rundata.regiondata.regions: list of regions
    +

    An old style region is a list of the form

    +
    +

    [minlevel,maxlevel,t1,t2,x1,x2,y1,y2]

    +
    +

    See Specifying AMR regions for more details.

    +
    + +
    +
    +rundata.regiondata.flagregions: list of flagregions
    +

    A new style flagregion is an object of class +clawpack.amrclaw.data.FlagRegion. +See Specifying flagregions for adaptive refinement for more details.

    +
    + +
    +
    +

    Deprecated Fixedgrid output parameters

    +
    +
    +rundata.fixedgrids : list of lists
    +

    Removed from GeoClaw as of v5.9.0. +Use Fixed grid maximum monitoring / arrival times and/or Fixed grid output instead, +see below.

    +
    + +
    +
    +

    Fixed grid maximum monitoring / arrival times

    +
    +
    +rundata.fgmax_grids : list of clawpack.geoclaw.fgmax_tools.FGoutGrid
    +
    +objects.
    +

    This can be used to specify a set of grids on which to monitor the +maximum flow depth (or other quantities) observed over the course of +the computation, and/or the arrival time of the flow or wave.

    +

    The “grids” also do not have to be rectangular grids aligned with the +coordinate directions, but can consist of an arbitrary list of points +that could also be points along a one-dimensional transect or points +following a coastline, for example.

    +

    You can set these via e.g.:

    +
    from clawpack.geoclaw import fgmax_tools
    +fgmax_grids = rundata.fgmax_data.fgmax_grids  # empty list initially
    +
    +fgmax = fgmax_tools.FGmaxGrid()
    +# set fgmax attributes
    +fgmax_grids.append(fgmax)    # written to fgmax_grids.data
    +
    +# repeat for additional fgout grids if desired
    +
    +
    +

    See Fixed grid monitoring (fgmax) for more details.

    +
    + +
    +
    +rundata.fgmax_data.num_fgmax_val : int
    +

    Should take the value 1, 2, or 5 and indicates how many values to monitor. +See Fixed grid monitoring (fgmax) for more details.

    +
    + +
    +
    +

    Fixed grid output

    +
    +
    +rundata.fgout_grids : list of clawpack.geoclaw.fgout_tools.FGoutGrid
    +
    +objects.
    +

    You can set these via e.g.:

    +
    from clawpack.geoclaw import fgout_tools
    +fgout_grids = rundata.fgout_data.fgout_grids  # empty list initially
    +
    +fgout = fgout_tools.FGoutGrid()
    +# set fgout attributes
    +fgout_grids.append(fgout)    # written to fgout_grids.data
    +
    +# repeat for additional fgout grids if desired
    +
    +
    +

    See Fixed grid output (fgout) for more details.

    +
    + +
    +
    +

    Storm Specification Data

    +
    +
    +rundata.surge_data.wind_forcing : bool
    +

    Includes the wind forcing term if True. The drag coefficient is specified +by rundata.surge_data.drag_law.

    +
    + +
    +
    +rundata.surge_data.drag_law : integer
    +

    This specifies how to deterimine the wind drag coefficient. Valid options +include include 0 implying use no wind drag (effectively eliminates the +wind source term but still computes the wind), 1 uses the Garret wind +drag law, and 2 uses the Powell (2006) wind drag law.

    +
    + +
    +
    +rundata.surge_data.pressure_forcing : bool
    +

    Includes the pressure forcing term if True.

    +
    + +
    +
    +rundata.surge_data.wind_index : int
    +

    Specifies at what index into the aux array the wind velocities are stored. +Note that this is Python indexed in the setrun but will be corrected in the +FORTRAN code (1 is added to the index).

    +
    + +
    +
    +rundata.surge_data.pressure_index : int
    +

    Specifies at what index into the aux array the wind velocities are stored. +Note that this is Python indexed in the setrun but will be corrected in the +FORTRAN code (1 is added to the index).

    +
    + +
    +
    +rundata.surge_data.display_landfall_time : bool
    +

    Sets whether the console output displays time relative to land fall in days. +In GeoClaw versions past 5.5 this only deterimines whether the time is +displayed in seconds or days.

    +
    + +
    +
    +rundata.surge_data.wind_refine : list
    +

    Similar to the speed_tolerance data, cells are flagged for refinement at +a level if the magnitude of the wind velocity in m/s is greater than the +corresponding value in the list. For +instance if wind_refine = [20.0, 30.0, 40.0] +then cells with a wind speed of 20.0 would refine to level 2, cells with a +wind speed of 30.0 would refine to level 3, and cells with a wind speed of +40.0 would refine to level 4. This can also be set to a boolean which if +False disables wind based refinement.

    +
    + +
    +
    +rundata.surge_data.R_refine : list
    +

    Similar to the wind_refine data, cells are flagged based on the radial +distance to the storm’s center. This can also be set to a boolean which if +False disables storm radial based refinement.

    +
    + +
    +
    +rundata.surge_data.storm_specification_type : int
    +

    Specifies the type of storm being used. Positive options refer to a +parameterized storm model where as negative integers refer to fully +specified storms, for instance from HWRF, to be specified.

    +

    Valid options

    +
    +
      +
    • -1: The input data is specified in the HWRF format.

    • +
    • 0: No storm specified

    • +
    • 1: Parameterized storm requested using the Holland 1980 modeled storm.

    • +
    • 2: Parameterized storm requested using the Holland 2010 modeled storm.

    • +
    • 3: Parameterized storm requested using the Chava, Lin, Emmanuel modeled +storm.

    • +
    +
    +
    + +
    +
    +rundata.surge_data.storm_file : string
    +

    Specifies the path to the storm data. IF storm_specification_type > 0 then +this should point to a GeoClaw formatted storm file (see Storm Specification Class and Tools for +details). If storm_specification < 0 then this should either specify a path +to files specifying the storm or a single file depending on the type of input +data.

    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/setrun_sample.html b/v5.10.x/setrun_sample.html new file mode 100644 index 0000000000..8174d0c9f2 --- /dev/null +++ b/v5.10.x/setrun_sample.html @@ -0,0 +1,414 @@ + + + + + + + + + Sample setrun.py module for classic Clawpack — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Sample setrun.py module for classic Clawpack

    +
    +

    Warning

    +

    Need to update link? Add 2d example?

    +
    +

    This sample setrun.py script is from the example in +$CLAW/classic/tests/advection.

    +
    """
    +Module to set up run time parameters for Clawpack.
    +
    +The values set in the function setrun are then written out to data files
    +that will be read in by the Fortran code.
    +
    +"""
    +
    +import clawpack.clawutil.clawdata
    +
    +
    +#------------------------------
    +def setrun(claw_pkg='Classic'):
    +#------------------------------
    +
    +    """
    +    Define the parameters used for running Clawpack.
    +
    +    INPUT:
    +        claw_pkg expected to be "Classic4" for this setrun.
    +
    +    OUTPUT:
    +        rundata - object of class ClawRunData
    +
    +    """
    +
    +    assert claw_pkg.lower() == 'classic',  "Expected claw_pkg = 'classic'"
    +
    +    rundata = clawpack.clawutil.clawdata.ClawRunData(pkg=claw_pkg, num_dim=1)
    +
    +    #------------------------------------------------------------------
    +    # Problem-specific parameters to be written to setprob.data:
    +    #------------------------------------------------------------------
    +
    +    probdata = rundata.new_UserData(name='probdata',fname='setprob.data')
    +    probdata.add_param('u',     1.0,  'advection velocity')
    +    probdata.add_param('beta', 200.,  'Gaussian width parameter')
    +
    +
    +    #------------------------------------------------------------------
    +    # Standard Clawpack parameters to be written to claw.data:
    +    #------------------------------------------------------------------
    +
    +    clawdata = rundata.clawdata  # initialized when rundata instantiated
    +
    +    # ---------------
    +    # Spatial domain:
    +    # ---------------
    +
    +    # Number of space dimensions:
    +    clawdata.num_dim = 1
    +
    +    # Lower and upper edge of computational domain:
    +    clawdata.lower[0] = 0.0
    +    clawdata.upper[0] = 1.0
    +
    +    # Number of grid cells:
    +    clawdata.num_cells[0] = 100
    +
    +
    +
    +    # ---------------
    +    # Size of system:
    +    # ---------------
    +
    +    # Number of equations in the system:
    +    clawdata.num_eqn = 1
    +
    +    # Number of auxiliary variables in the aux array (initialized in setaux)
    +    clawdata.num_aux = 0
    +
    +    # Index of aux array corresponding to capacity function, if there is one:
    +    clawdata.capa_index = 0
    +
    +
    +
    +    # -------------
    +    # Initial time:
    +    # -------------
    +
    +    clawdata.t0 = 0.0
    +
    +
    +    # Restart from checkpoint file of a previous run?
    +    # Note: If restarting, you must also change the Makefile to set:
    +    #    RESTART = True
    +    # If restarting, t0 above should be from original run, and the
    +    # restart_file 'fort.chkNNNNN' specified below should be in
    +    # the OUTDIR indicated in Makefile.
    +
    +    clawdata.restart = False               # True to restart from prior results
    +    clawdata.restart_file = 'fort.chk00006'  # File to use for restart data
    +
    +
    +    # -------------
    +    # Output times:
    +    #--------------
    +
    +    # Specify at what times the results should be written to fort.q files.
    +    # Note that the time integration stops after the final output time.
    +    # The solution at initial time t0 is always written in addition.
    +
    +    clawdata.output_style = 1
    +
    +    if clawdata.output_style == 1:
    +        # Output nout frames at equally spaced times up to tfinal:
    +        clawdata.num_output_times = 10
    +        clawdata.tfinal = 1.0
    +        clawdata.output_t0 = True  # output at initial (or restart) time?
    +
    +    elif clawdata.output_style == 2:
    +        # Specify a list of output times.
    +        clawdata.tout =  [0.5, 1.0]   # used if output_style == 2
    +        clawdata.num_output_times = len(clawdata.tout)
    +
    +    elif clawdata.output_style == 3:
    +        # Output every iout timesteps with a total of ntot time steps:
    +        clawdata.output_step_interval = 1
    +        clawdata.total_steps = 5
    +        clawdata.output_t0 = True
    +
    +
    +    clawdata.output_format = 'ascii'       # 'ascii', 'binary32', 'binary64'
    +
    +    clawdata.output_q_components = 'all'   # could be list such as [True,True]
    +    clawdata.output_aux_components = 'none'  # could be list
    +    clawdata.output_aux_onlyonce = True    # output aux arrays only at t0
    +
    +
    +
    +    # ---------------------------------------------------
    +    # Verbosity of messages to screen during integration:
    +    # ---------------------------------------------------
    +
    +    # The current t, dt, and cfl will be printed every time step
    +    # at AMR levels <= verbosity.  Set verbosity = 0 for no printing.
    +    #   (E.g. verbosity == 2 means print only on levels 1 and 2.)
    +    clawdata.verbosity = 1
    +
    +
    +
    +    # --------------
    +    # Time stepping:
    +    # --------------
    +
    +    # if dt_variable==1: variable time steps used based on cfl_desired,
    +    # if dt_variable==0: fixed time steps dt = dt_initial will always be used.
    +    clawdata.dt_variable = True
    +
    +    # Initial time step for variable dt.
    +    # If dt_variable==0 then dt=dt_initial for all steps:
    +    clawdata.dt_initial = 0.8 / float(clawdata.num_cells[0])
    +
    +    # Max time step to be allowed if variable dt used:
    +    clawdata.dt_max = 1e+99
    +
    +    # Desired Courant number if variable dt used, and max to allow without
    +    # retaking step with a smaller dt:
    +    clawdata.cfl_desired = 0.9
    +    clawdata.cfl_max = 1.0
    +
    +    # Maximum number of time steps to allow between output times:
    +    clawdata.steps_max = 500
    +
    +
    +
    +
    +    # ------------------
    +    # Method to be used:
    +    # ------------------
    +
    +    # Order of accuracy:  1 => Godunov,  2 => Lax-Wendroff plus limiters
    +    clawdata.order = 2
    +
    +    # Use dimensional splitting?
    +    clawdata.dimensional_split = 0
    +
    +    # For unsplit method, transverse_waves can be
    +    #  0 or 'none'      ==> donor cell (only normal solver used)
    +    #  1 or 'increment' ==> corner transport of waves
    +    #  2 or 'all'       ==> corner transport of 2nd order corrections too
    +    clawdata.transverse_waves = 0
    +
    +    # Number of waves in the Riemann solution:
    +    clawdata.num_waves = 1
    +
    +    # List of limiters to use for each wave family:
    +    # Required:  len(limiter) == num_waves
    +    # Some options:
    +    #   0 or 'none'     ==> no limiter (Lax-Wendroff)
    +    #   1 or 'minmod'   ==> minmod
    +    #   2 or 'superbee' ==> superbee
    +    #   3 or 'mc'       ==> MC limiter
    +    #   4 or 'vanleer'  ==> van Leer
    +    clawdata.limiter = ['mc']
    +
    +    clawdata.use_fwaves = False    # True ==> use f-wave version of algorithms
    +
    +    # Source terms splitting:
    +    #   src_split == 0 or 'none'    ==> no source term (src routine never called)
    +    #   src_split == 1 or 'godunov' ==> Godunov (1st order) splitting used,
    +    #   src_split == 2 or 'strang'  ==> Strang (2nd order) splitting used,  not recommended.
    +    clawdata.source_split = 'none'
    +
    +
    +    # --------------------
    +    # Boundary conditions:
    +    # --------------------
    +
    +    # Number of ghost cells (usually 2)
    +    clawdata.num_ghost = 2
    +
    +    # Choice of BCs at xlower and xupper:
    +    #   0 => user specified (must modify bcN.f to use this option)
    +    #   1 => extrapolation (non-reflecting outflow)
    +    #   2 => periodic (must specify this at both boundaries)
    +    #   3 => solid wall for systems where q(2) is normal velocity
    +
    +    clawdata.bc_lower[0] = 2
    +    clawdata.bc_upper[0] = 2
    +
    +    return rundata
    +    # end of function setrun
    +    # ----------------------
    +
    +
    +if __name__ == '__main__':
    +    # Set up run-time parameters and write all data files.
    +    import sys
    +    if len(sys.argv) == 2:
    +    rundata = setrun(sys.argv[1])
    +    else:
    +    rundata = setrun()
    +
    +    rundata.write()
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/sharing.html b/v5.10.x/sharing.html new file mode 100644 index 0000000000..0d145fba88 --- /dev/null +++ b/v5.10.x/sharing.html @@ -0,0 +1,214 @@ + + + + + + + + + Saving and sharing results — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Saving and sharing results

    +

    Clawpack now includes some tools to help facilitate archiving and sharing +results that you have obtained with this software. +These make it relatively easy to generate +a set of webpages such as those seen when browsing the examples collected in +Clawpack Gallery.

    +

    These webpages can easily be posted on your own website to be viewed by +others if you wish, for example to share on-going work with collaborators or +to supplement a journal article.

    +
    +

    Making webpages of plots

    +

    The “make .plots” option available via the standard Makefiles will create a +set of webpages illustrating the plots and allowing easy navigation between +frames. These webpages also allow viewing all frames of a plot as an +animation (via javascript within the browser).

    +

    See Plotting with Visclaw for more details on how to specify what plots will +appear on these webpages.

    +
    +
    +

    Sharing your results

    +

    To make it easy for others to view your code and the resulting plots, you +can simply copy the example directory (containing the code +and the _plots subdirectory) to your publicly visible web pages.

    +
    +
    +

    Jupyter notebooks

    +

    You should also consider creating an Jupyter notebook to explain your +problem, illustrate your workflow, and present plots and animations all in +one. See the +Gallery of Notebooks +for some examples.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/sphere_source.html b/v5.10.x/sphere_source.html new file mode 100644 index 0000000000..0db1fb0ba0 --- /dev/null +++ b/v5.10.x/sphere_source.html @@ -0,0 +1,199 @@ + + + + + + + + + Source terms for shallow water on the sphere — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Source terms for shallow water on the sphere

    +

    The shallow water equations on the sphere involve some geometric +source terms that are currently missing from GeoClaw. Experiments +during initial develpment of GeoClaw seemed to indicate that they were +not important, but more recently it has been found that at least the +source term in the mass equation can be quite important for properly +modeling waves moving between the tropics and polar regions due to the +variation in cell size with latitude.

    +

    As of v5.9.1, these source terms have been added to +$CLAW/geoclaw/src/2d/shallow/src2.f90. +There is a setrun.py parameter rundata.geo_data.sphere_source +that can be set to 0 for no source terms, 1 to add the source term +only in the mass equation, or 2 to add source terms in the momentum equations +too.

    +

    Change in default behavior:

    +

    Starting in v5.10.0, the default value

    +
    rundata.geo_data.sphere_source = 1
    +
    +
    +

    is used if this parameter is not +set otherwise in setrun.py, so that the source term in mass is included. +Adding the source terms in momentum seems to have almost no effect in +most practical problems, as illustrated in +this document, +which presents more discussion of these source terms and includes some +examples to illustrate the effect they have in various circumstances.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/sphinxdoc.html b/v5.10.x/sphinxdoc.html new file mode 100644 index 0000000000..f12fb246e2 --- /dev/null +++ b/v5.10.x/sphinxdoc.html @@ -0,0 +1,177 @@ + + + + + + + + + Compiling the Sphinx documentation locally — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Compiling the Sphinx documentation locally

    +

    For most users, the best way to view the documentation is +online.

    +

    The source files that create this documentation are included in the +repository +clawpack/doc repository in $CLAW/doc/doc. +See Guide for updating this documentation if you want to create and view them locally.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/src1d_defaults.html b/v5.10.x/src1d_defaults.html new file mode 100644 index 0000000000..a444c68a69 --- /dev/null +++ b/v5.10.x/src1d_defaults.html @@ -0,0 +1,193 @@ + + + + + + + + + src1d default routines — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    src1d default routines

    +

    See also Using src1d for source terms with AMRClaw.

    +

    Below are links to the default src1d library routines for AMRClaw. +The same form is used in both 2d and 3d. +By default these do nothing. If you wish to specify source terms, you +need to copy one of these files to your application directory and modify it +as needed. Remember to change to Makefile to point to the proper version.

    + +

    (Note: these links are for the version checked in to the master branch. +You can select a different branch or tag from the GitHub page.)

    +
    +

    src1d routine in GeoClaw

    +

    In GeoClaw, there is a library routine to impose source terms for bottom +friction (via a Manning term) and Coriolis terms. The topography source term +is built into the Riemann solver in a manner that achieves well balancing +(an ocean at rest remains at rest).

    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/src_defaults.html b/v5.10.x/src_defaults.html new file mode 100644 index 0000000000..6e23da2344 --- /dev/null +++ b/v5.10.x/src_defaults.html @@ -0,0 +1,195 @@ + + + + + + + + + src default routines — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    src default routines

    +

    See also Using src for source terms.

    +

    Below are links to the default src library routines for Classic and AMRClaw. +By default these do nothing. If you wish to specify source terms, you +need to copy one of these files to your application directory and modify it +as needed. Remember to change to Makefile to point to the proper version.

    +

    If you are using AMRClaw, you will also need to provide a routine src1d, +see Using src1d for source terms with AMRClaw.

    + +

    (Note: these links are for the version checked in to the master branch. +You can select a different branch or tag from the GitHub page.)

    +
    +

    src routine in GeoClaw

    +

    In GeoClaw, there is a library routine to impose source terms for bottom +friction (via a Manning term) and Coriolis terms. The topography source term +is built into the Riemann solver in a manner that achieves well balancing +(an ocean at rest remains at rest).

    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/storm_module.html b/v5.10.x/storm_module.html new file mode 100644 index 0000000000..3381575bb8 --- /dev/null +++ b/v5.10.x/storm_module.html @@ -0,0 +1,738 @@ + + + + + + + + + Storm Specification Class and Tools — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Storm Specification Class and Tools

    +
    +

    Warning

    +

    This describes new tools added in Clawpack 5.5

    +
    +

    Module defines a class and routines for managing storm best-track type input and +testing reconstructed wind and pressure fields. Additionally some support for +ensembles of storms from various providers is also included.

    +

    The primary class of interest in the module is the Storm class that +facilitates dealing with various best-track formats found around the world and +the expected GeoClaw storm format that is read into the FORTRAN code. The basic +workflow in a setrun.py file would do the following:

    +
      +
    1. Create a Storm object by reading in from a file:

      +
      storm = clawpack.geoclaw.surge.storm.Storm("my_storm.txt", file_format='ATCF')
      +
      +
      +
    2. +
    3. Write out the storm object created into the GeoClaw format:

      +
      storm.write("my_geoclaw_storm.txt", file_format="geoclaw")
      +
      +
      +
    4. +
    5. Specify the path to the GeoClaw formatted storm file, in this case +“my_geoclaw_storm.txt”.

    6. +
    +
    +
    Formats Supported:
    +
      +
    • GeoClaw (fully)

    • +
    • ATCF (reading only)

    • +
    • HURDAT (reading only)

    • +
    • IBTrACS (reading only)

    • +
    • JMA (reading only)

    • +
    • IMD (planned)

    • +
    • tcvitals (reading only)

    • +
    +
    +
    +
    +
    +exception clawpack.geoclaw.surge.storm.NoDataError
    +

    Exception to raise when no valid data in input file

    +
    + +
    +
    +class clawpack.geoclaw.surge.storm.Storm(path=None, file_format='ATCF', **kwargs)
    +

    Storm data object

    +

    This object contains a time series of time data that describe a particular +storm. This includes the attributes below and the ability to read from +multiple sources for data such as the U.S. National Hurricane Center (NHC), +the Japanese Meterological Agency (JMA), and the Indian Meteorlogical +Department (IMD). This class can then write out in any of these formats, +construct the wind and pressure fields using a supported parameterized +model, or output the GeoClaw supported storm format used for running storm +surge simulations.

    +

    TODO: Add description of unit handling

    +
    +
    Attributes:
    +
      +
    • t (list(datetime.datetiem)) Contains the time at which each entry of +the other arrays are at. These are expected to be datetime objects. +Note that when written some formats require a time_offset to be set.

    • +
    • eye_location (ndarray(:, :)) location of the eye of the storm. +Default units are in signed decimcal longitude and latitude.

    • +
    • max_wind_speed (ndarray(:)) Maximum wind speed. Default units are +meters/second.

    • +
    • max_wind_radius (ndarray(:)) Radius at which the maximum wind speed +occurs. Default units are meters.

    • +
    • central_pressure (ndarray(:)) Central pressure of storm. Default +units are Pascals.

    • +
    • storm_radius (ndarray(:)) Radius of storm, often defined as the last +closed iso-bar of pressure. Default units are meters.

    • +
    • time_offset (datetime.datetime) A date time that as an offset for the +simulation time. This will default to the beginning of the first of the +year that the first time point is found in.

    • +
    • wind_speeds (ndarray(:, :)) Wind speeds defined in every record, such +as 34kt, 50kt, 64kt, etc and their radii. Default units are meters/second +and meters.

    • +
    +
    +
    Initialization:
    +
      +
    1. Read in existing file at path.

    2. +
    3. Construct an empty storm and supply the fields needed. Note that these +fields must be converted to the appropriate units.

    4. +
    +
    +
    Input:
    +
      +
    • path (string) Path to file to be read in if requested.

    • +
    • file_format (string) Format of file at path. Default is “hurdat”

    • +
    • kwargs (dict) Other key-word arguments are passed to the appropriate +read routine.

    • +
    +
    +
    +
    +
    +category(categorization='NHC', cat_names=False)
    +

    Categorizes storm based on relevant storm data

    +
    +
    Input:
    +
      +
    • categorization (string) Type of categorization to use. Defaults +to the National Hurricane Center “NHC”.

    • +
    • cat_names (bool) If True returns the category name rather than a +number. Default to False.

    • +
    +
    +
    Output:
    +
      +
    • (ndarray) Integer array of categories at each time point of the +storm.

    • +
    • (list) Similar to the above but the name of the category as a +string. This is only returned if car_names = True.

    • +
    +
    +
    +
    + +
    +
    +read(path=None, file_format='atcf', **kwargs)
    +

    Read in storm data from path with format file_format

    +
    +
    Input:
    +
      +
    • path (string) Path to data file.

    • +
    • file_format (string) Format of the data file. See list of +supported formats for a list of valid strings. Defaults to +“hurdat”.

    • +
    • kwargs (dict) Keyword dictionary for additional arguments that can +be passed down to the appropriate read functions. Please refer to +the specific routine for a list of valid options.

    • +
    +
    +
    Raises:
    +
      +
    • ValueError If the file_format requested does not match any of +the available supported formats a ValueError is raised.

    • +
    +
    +
    +
    + +
    +
    +read_atcf(path, verbose=False)
    +

    Read in a ATCF formatted storm file

    +

    ATCF format has storm stored individually so there is no support for +multiple storms in a particular file.

    +
    +
    Input:
    +
      +
    • path (string) Path to the file to be read.

    • +
    • verbose (bool) Output more info regarding reading.

    • +
    +
    +
    +
    + +
    +
    +read_geoclaw(path, verbose=False)
    +

    Read in a GeoClaw formatted storm file

    +

    GeoClaw storm files are read in by the Fortran code and are not meant +to be human readable.

    +
    +
    Input:
    +
      +
    • path (string) Path to the file to be read.

    • +
    • verbose (bool) Output more info regarding reading.

    • +
    +
    +
    +
    + +
    +
    +read_hurdat(path, verbose=False)
    +

    Read in HURDAT formatted storm file

    +

    This is the current version of HURDAT data available (HURDAT 2). Note +that this assumes there is only one storm in the file (includes the +header information though). Future features will be added that will allow for +a file to be read with multiple storms defined.

    +

    For more details on the HURDAT format and getting data see

    +

    http://www.aoml.noaa.gov/hrd/hurdat/Data_Storm.html

    +
    +
    Input:
    +
      +
    • path (string) Path to the file to be read.

    • +
    • verbose (bool) Output more info regarding reading.

    • +
    +
    +
    Raises:
    +
      +
    • ValueError If the method cannot find the name/year matching the +storm or they are not provided when single_storm == False then a +value error is risen.

    • +
    +
    +
    +
    + +
    +
    +read_ibtracs(path, sid=None, storm_name=None, year=None, start_date=None, agency_pref=['wmo', 'usa', 'tokyo', 'newdelhi', 'reunion', 'bom', 'nadi', 'wellington', 'cma', 'hko', 'ds824', 'td9636', 'td9635', 'neumann', 'mlc'])
    +

    Read in IBTrACS formatted storm file

    +

    This reads in the netcdf-formatted IBTrACS v4 data. You must either pass +the sid of the storm (a unique identifier supplied by IBTrACS) OR +storm_name and year. The latter will not be unique for unnamed storms, +so you may optionally pass start_date as well. The wmo_* variable is +used when non-missing, with missing values filled in by the corresponding +variable of the agency specified in wmo_agency and/or usa_agency. If +still missing, the other agencies are checked in order of agency_pref to +see if any more non-missing values are available.

    +
    +
    Input:
    +
      +
    • path (string) Path to the file to be read.

    • +
    • +
      sid (string, optional) IBTrACS-supplied unique track identifier.

      Either sid OR storm_name and year must not be None.

      +
      +
      +
    • +
    • +
      storm_name (string, optional) name of storm of interest

      (NAME field in IBTrACS). Either sid OR storm_name and +year must not be None.

      +
      +
      +
    • +
    • +
      year (int, optional) year of storm of interest.

      Either sid OR storm_name and year must not be None.

      +
      +
      +
    • +
    • +
      start_date (datetime.datetime, optional) If storm is not

      named, will find closest unnamed storm to this start date. Only +used for unnamed storms when specifying storm_name and year +does not uniquely identify storm.

      +
      +
      +
    • +
    • +
      agency_pref (list, optional) Preference order to use if wmo_* variable

      is missing and wmo_agency and usa_agency are also missing.

      +
      +
      +
    • +
    +
    +
    Raises:
    +
      +
    • +
      ValueError If the method cannot find the matching storm then a

      value error is risen.

      +
      +
      +
    • +
    +
    +
    +
    + +
    +
    +read_imd(path, verbose=False)
    +
    +
    Extract relevant hurricane data from IMD file

    and update storm fields with proper values.

    +
    +
    +
    +
    Input:
    +
      +
    • path (string) Path to the file to be read.

    • +
    +
    +
    +

    Return ValueError if format incorrect or if file not IMD.

    +
    + +
    +
    +read_jma(path, verbose=False)
    +

    Read in JMA formatted storm file

    +

    Note that only files that contain one storm are currently supported.

    +

    For more details on the JMA format and getting data see

    +

    http://www.jma.go.jp/jma/jma-eng/jma-center/rsmc-hp-pub-eg/Besttracks/e_format_bst.html

    +
    +
    Input:
    +
      +
    • path (string) Path to the file to be read.

    • +
    • verbose (bool) Output more info regarding reading.

    • +
    +
    +
    Raises:
    +
      +
    • ValueError If the method cannot find the name/year matching the +storm or they are not provided when single_storm == False then a +value error is risen.

    • +
    +
    +
    +
    + +
    +
    +read_tcvitals(path, verbose=False)
    +
    +
    Extract relevant hurricane data from TCVITALS file

    and update storm fields with proper values.

    +
    +
    +
    +
    Input:
    +
      +
    • path (string) Path to the file to be read.

    • +
    • verbose (bool) Output more info regarding reading.

    • +
    +
    +
    +
    + +
    +
    +write(path, file_format='geoclaw', **kwargs)
    +

    Write out the storm data to path in format file_format

    +
    +
    Input:
    +
      +
    • path (string) Path to data file.

    • +
    • file_format (string) Format of the data file. See list of +supported formats for a list of valid strings. Defaults to +“geoclaw”.

    • +
    • kwargs (dict) Keyword dictionary for additional arguments that can +be passed down to the appropriate write functions. Please refer to +the specific routine for a list of valid options.

    • +
    +
    +
    Raises:
    +
      +
    • ValueError If the file_format requested does not match any of +the available supported formats a ValueError is raised.

    • +
    +
    +
    +
    + +
    +
    +write_atcf(path, verbose=False)
    +

    Write out a ATCF formatted storm file

    +
    +
    Input:
    +
      +
    • path (string) Path to the file to be written.

    • +
    • verbose (bool) Print out additional information when writing.

    • +
    +
    +
    +
    + +
    +
    +write_geoclaw(path, verbose=False, max_wind_radius_fill=None, storm_radius_fill=None)
    +

    Write out a GeoClaw formatted storm file

    +

    GeoClaw storm files are read in by the GeoClaw Fortran code.

    +
    +
    Input:
    +
      +
    • path (string) Path to the file to be written.

    • +
    • verbose (bool) Print out additional information when writing.

    • +
    • max_wind_radius_fill (func) Function that can be used to fill in +missing data for max_wind_radius values. This defaults to simply +setting the value to -1. The function signature should be +max_wind_radius(t, storm) where t is the time of the forecast and +storm is the storm object. Note that if this or storm_radius +field remains -1 that this data line will be assumed to be redundant +and not be written out.

    • +
    • storm_radius_fill (func) Function that can be used to fill in +missing data for storm_radius values. This defaults to simply +setting the value to -1. The function signature should be +storm_radius(t, storm) where t is the time of the forecast and +storm is the storm object. Note that if this or max_wind_radius +field remains -1 that this data line will be assumed to be redundant +and not be written

    • +
    +
    +
    +
    + +
    +
    +write_hurdat(path, verbose=False)
    +

    Write out a HURDAT formatted storm file

    +
    +
    Input:
    +
      +
    • path (string) Path to the file to be written.

    • +
    • verbose (bool) Print out additional information when writing.

    • +
    +
    +
    +
    + +
    +
    +write_imd(path, verbose=False)
    +

    Write out an IMD formatted storm file

    +
    +
    Input:
    +
      +
    • path (string) Path to the file to be written.

    • +
    • verbose (bool) Print out additional information when writing.

    • +
    +
    +
    +
    + +
    +
    +write_jma(path, verbose=False)
    +

    Write out a JMA formatted storm file

    +
    +
    Input:
    +
      +
    • path (string) Path to the file to be written.

    • +
    • verbose (bool) Print out additional information when writing.

    • +
    +
    +
    +
    + +
    +
    +write_tcvitals(path, verbose=False)
    +

    Write out an TCVITALS formatted storm file

    +
    +
    Input:
    +
      +
    • path (string) Path to the file to be written.

    • +
    • verbose (bool) Print out additional information when writing.

    • +
    +
    +
    +
    + +
    + +
    +
    +clawpack.geoclaw.surge.storm.available_formats()
    +

    Construct a string suitable for listing available storm file formats.

    +
    + +
    +
    +clawpack.geoclaw.surge.storm.available_models()
    +

    Construct a string suitable for listing available storm models.

    +
    + +
    +
    +clawpack.geoclaw.surge.storm.fill_rad_w_other_source(t, storm_targ, storm_fill, var, interp_kwargs={})
    +

    Fill in storm radius variable (max_wind_radius or storm_radius) with values from another source. i.e. +if you have missing radii in IBTrACS, you can fill with ATCF. +This function will assume storm_fill has more non-missing +values than storm_targ for this particular radius variable. +Thus, it first attempts to interpolate the variable in storm_fill +to the desired timestep. If that is missing, it tries to interpolate +the non-missing values of the variable in storm_targ. If that +also fails, it simply returns -1. The proper usage of this +function is to wrap it such that you can pass a function +with (t, storm) arguments to max_wind_radius_fill or +storm_radius_fill when calling write_geoclaw.

    +
    +
    Input:
    +

    +
    + +
      +
    • +
      t (datetime.datetime) the time corresponding to

      a missing value of max_wind_radius or storm_radius

      +
      +
      +
    • +
    • +
      storm_targ (clawpack.geoclaw.storm.Storm) storm

      that has missing values you want to fill

      +
      +
      +
    • +
    • +
      storm_fill (clawpack.geoclaw.storm.Storm) storm

      that has non-missing values you want to use to fill storm_targ

      +
      +
      +
    • +
    • var (str) Either ‘max_wind_radius’ or ‘storm_radius’

    • +
    • +
      interp_kwargs (dict) Additional keywords passed to scipy’s

      interpolator.

      +
      +
      +
    • +
    +
    +
    Returns:
    +

    +
    + +
      +
    • +
      (float) value to use to fill this time point in storm_targ. -1

      if still missing after using storm_fill to fill.

      +
      +
      +
    • +
    +
    +
    Examples:
    +

    +
    +
    >>> storm_ibtracs = Storm(file_format='IBTrACS', path='path_to_ibtracs.nc',
    +...     sid='2018300N26315')
    +
    +>>> storm_atcf = Storm(file_format='ATCF', path='path_to_atcf.dat')
    +
    +>>> def fill_mwr(t, storm):
    +...     return fill_rad_w_other_source(t, storm, storm_atcf, 'max_wind_radius')
    +
    +>>> storm_ibtracs.write(file_format = 'geoclaw',
    +...     path = 'out_path.storm',
    +...     max_wind_radius_fill = fill_mwr)
    +
    +
    +
    + +
    +
    +clawpack.geoclaw.surge.storm.make_multi_structure(path)
    +

    Create a dictionary of Storm objects for ATCF files with multiple storm tracks in them

    +
    + +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/surgedata.html b/v5.10.x/surgedata.html new file mode 100644 index 0000000000..e59494b00a --- /dev/null +++ b/v5.10.x/surgedata.html @@ -0,0 +1,205 @@ + + + + + + + + + Sources for Storm Surge Data — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Sources for Storm Surge Data

    +

    For storm surge computations the input data is very similar to tsunamis save +for the specification of the forcing storm (as opposed to an earthquake). There +are multiple ways to specify a storm forcing in GeoClaw which include

    +
      +
    1. Storms described by a set of observerd parameters for which the wind and pressure +fields are constructed by a parametric model such as the Holland 1980 model. These +generally require: +- the maximum wind speed, +- the radius at which the maximum winds occurs, +- the central pressure of the storm, +- the location of the center of the storm (the eye), +- and sometimes the maximum radius of the storm is also included.

    2. +
    3. Storm described by a grided set of data. This includes output from a +modeled storm such as from HWRF, or observed values if dense enough. Here GeoClaw +will interpolate this data to the grid cells as needed rather than assume a particular +profile for the wind and pressure.

    4. +
    +

    For the parameterized storm data there are a number of sources supported for this data and +there is a listing in _storm_module of available input formats. Valid input files +for this type of input are made available by the particular agency involved:

    +
    +
    +

    Note that not all these formats are currently fully supported and may require some work +to be readable.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/testing.html b/v5.10.x/testing.html new file mode 100644 index 0000000000..86d9178de3 --- /dev/null +++ b/v5.10.x/testing.html @@ -0,0 +1,219 @@ + + + + + + + + + Testing your installation — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Testing your installation

    +
    +

    PyClaw

    +

    If you downloaded Clawpack manually, you can test your PyClaw +installation as follows (starting from your clawpack directory):

    +
    cd pyclaw
    +nosetests
    +
    +
    +

    This should return ‘OK’. +(You may need to install nose +if nosetests is not on your system.)

    +
    +
    +

    Classic

    +

    As a first test of the Fortran code, try the following:

    +
    cd $CLAW/classic/tests
    +nosetests -sv
    +
    +
    +

    This will run several tests and compare a few numbers from the solution with +archived results. The tests should run in a few seconds and +you should see output similar to this:

    +
    runTest (tests.acoustics_1d_heterogeneous.regression_tests.Acoustics1DHeterogeneousTest) ... ok
    +runTest (tests.acoustics_3d_heterogeneous.regression_tests.Acoustics3DHeterogeneousTest) ... ok
    +runTest (tests.advection_2d_annulus.regression_tests.Advection2DAnnulusTest) ... ok
    +
    +----------------------------------------------------------------------
    +Ran 3 tests in 4.639s
    +OK
    +
    +
    +

    There are similar tests subdirectories of $CLAW/amrclaw and +$CLAW/geoclaw to do quick tests of these codes.

    +

    More extensive tests can be performed by running all of the examples in the +examples directory and comparing the resulting plots against those +archived in the Clawpack Gallery. See also Regression testing.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/timing.html b/v5.10.x/timing.html new file mode 100644 index 0000000000..8a29703b46 --- /dev/null +++ b/v5.10.x/timing.html @@ -0,0 +1,215 @@ + + + + + + + + + Timing Statistics — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Timing Statistics

    +

    The amrclaw and geoclaw Fortran codes provide some timing information at the +end of a run (and also stored at the end of the file fort.amr in the output +directory).

    +

    Typical output looks like this:

    +
    ============================== Timing Data ==============================
    +
    +Integration Time (stepgrid + BC + overhead)
    +Level           Wall Time (seconds)    CPU Time (seconds)   Total Cell Updates
    +  1                     2.850                  2.853            0.288E+07
    +  2                    13.214                 41.552            0.373E+08
    +  3                    92.774                370.259            0.260E+09
    +total                 108.838                414.664            0.301E+09
    +
    +All levels:
    +stepgrid              101.440                392.473
    +BC/ghost cells          5.014                 19.801
    +Regridding             40.508                 40.447
    +Output (valout)        15.413                 15.402
    +
    +Total time:           165.483                472.470
    +Using  4 thread(s)
    +
    +Note: The CPU times are summed over all threads.
    +      Total time includes more than the subroutines listed above
    +
    +=========================================================================
    +
    +
    +

    This was generated by running the code in +$CLAW/amrclaw/examples/advection_3d_swirl with a third level of AMR added (and +additional refinement factor 2) so that more grids are generated.

    +

    Note the following:

    +
      +
    • All times are in seconds.

    • +
    • For this example, more than 85% of the integration time is spent on the finest +Level 3 grids.

    • +
    • OpenMP was used in this run, specifying OMP_NUM_THREADS=4. Grid patches are +then split up between threads (see Using OpenMP). This test problem has enough +grid patches that the time spent in stepgrid (where updating each patch using +the finite volume method) uses roughly 1/4 as much wall time as CPU time, and +similarly for filling ghost cells.

    • +
    • Regridding and output are done in serial mode, however, so the wall time for +these portions agree with the CPU time.

    • +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/topo.html b/v5.10.x/topo.html new file mode 100644 index 0000000000..8490b5b561 --- /dev/null +++ b/v5.10.x/topo.html @@ -0,0 +1,459 @@ + + + + + + + + + Topography data — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Topography data

    + +

    The GeoClaw Description and Detailed Contents software for flow over topography requires at least one +topo file to be input, see Specifying GeoClaw parameters in setrun.py.

    +

    Currently topo files are restricted to three possible formats as ASCII files, or +NetCDF files are also allowed.

    +

    In the descriptions below it is assumed that the topo file gives the +elevation of the topography (relative to some reference level) as a value of +z at each (x,y) point on a rectangular grid. Only uniformly spaced +rectangular topo grids are currently recognized.

    +

    More than one topo file can be specified (see Topography data file parameters) that might +cover overlapping regions at different resolutions. The union of all the +topo files should cover the full computational domain specified (and may +extend outside it). Internally in GeoClaw Description and Detailed Contents a single +piecewise-bilinear function is constructed from the union of the topo files, +using the best information available in regions of overlap. This function +is then integrated over computational grid cells to obtain the single topo value +in each grid cell needed when solving depth averaged equations such as the +shallow water equations with these finite volume methods. Note that this +has the feature that if a grid cell is refined at some stage in the +computation, the topo used in the fine cells have an average value that is +equal to the coarse cell value. This is crucial in maintaining the +ocean-at-rest steady state, for example.

    +
    +

    Warning

    +

    Some changes were made in version 5.5.0 that affect how +topofiles with topo_type in [2,3] +are interpreted for files with a header specifying +xllcorner and yllcorner. +This may cause computed results to differ from previous results using +the same topofiles if the header contains this specification. +See Grid registration for more details on this llcorner +registration. +The description below has been modified to use lower registration, +equivalent to llcenter registration.

    +
    +

    The recognized topotypes are:

    +
    +

    topotype = 1

    +
    +

    x,y,z values on each line, progressing from upper left (NW) corner across +rows (moving east), then down in standard GIS form. +The size of the grid and spacing +between the grid points is deduced from the data.

    +

    Example: The data below would be used in the GeoClaw code +to define a bilinear function +over the domain 0. <= x <= 10. and 20. <= y <= 30. +that decreases (deeper water) as you move to the east or to the south:

    +
    0.  30.  -1000.
    +10. 30.  -2000.
    +0.  20.  -3000.
    +10. 20.  -4000.
    +
    +
    +

    These files are larger than necessary since they store the x,y values at +each point even though the points are required to be equally spaced. +Many data sets come this way, but note that you can convert a file of +this type to one of the more compact types below using e.g.:

    +
    from clawpack.geoclaw import topotools
    +topo = topotools.Topography(input_path, topo_type=1)
    +topo.write(output_path, topo_type=3)
    +
    +
    +
    +

    topotype = 2

    +
    +

    The file starts with a header consisting of 6 lines containing:

    +
    XXX  mx
    +XXX  my
    +XXX  xlower | xllcenter | xllcorner
    +XXX  ylower | yllcenter | yllcorner
    +XXX  cellsize
    +XXX  nodataval
    +
    +
    +

    and is followed by mx*my lines containing the z values at each x,y, +again progressing from upper left (NW) corner across +rows (moving east), then down in standard GIS form. +The lower left corner of the grid +is (xlower, ylower) and the distance between grid points in both +x and y is cellsize. The value nodataval indicates what value of z +is specified for missing data points (often something like -9999 in data +sets with missing values).

    +

    Note:

    +
    +
      +
    • The value XXX and the label (e.g. xlower) can appear in +either order in each of the header lines.

    • +
    • the cellsize line can include two values dx, dy rather than a single +value, in case the spacing is different in x and y.

    • +
    +
    +

    Example: For the same example as above, the topo file with +topotype==2 and lower registration would be:

    +
    2         mx
    +2         my
    +0.        xlower
    +20.       ylower
    +10.       cellsize
    +-9999     nodatavalue
    +-1000.
    +-2000.
    +-3000.
    +-4000.
    +
    +
    +

    This file would be interpreted the same way if llcenter registration +was specified on lines 3 and 4, but differently if llcorner +was specified – see Grid registration.

    +
    +

    topotype = 3

    +
    +

    The file starts with a header consisting of 6 lines as for topotype=2, +followed by my lines, each containing mx values for one row of data +(ordered as before, so the first line of data is the northernmost line +of data, going from west to east).

    +

    Example: For the same example as above, the topo file with +topotype==3 and lower registration would be:

    +
    2         mx
    +2         my
    +0.        xlower
    +20.       ylower
    +10.       cellsize
    +-9999     nodatavalue
    +-1000.  -2000.
    +-3000.  -4000.
    +
    +
    +

    This file would be interpreted the same way if llcenter registration +was specified on lines 3 and 4, but differently if llcorner +was specified – see Grid registration.

    +

    Note:

    +
    +
      +
    • The value XXX and the label (e.g. xlower) can appear in +either order in each of the header lines.

    • +
    • the cellsize line can include two values dx, dy rather than a single +value, in case the spacing is different in x and y.

    • +
    +
    +

    This is essentially the same as the ESRI ASCII Raster format, +but it is important to note which grid registration is used. +NCEI and etopo1 data sets generally have this format with llcorner +registration! See Grid registration for more details.

    +
    +

    topotype = 4

    +
    +

    This file type is not ASCII but rather in a NetCDF4 format supported by the +CF MetaData conventions (v. 1.6). Files +that conform to this standard can be read in by GeoClaw. The topotools +module also has support for reading and writing (including therefore +conversion) of these types of bathymetry files (see NetCDF format +below). To use this functionality +you will need to add -DNETCDF to the FFLAGS variable either by the +command line or in the Makefile.

    +
    +
    +

    The Fortran code will recognize headers for topotype 2 +or 3 that have the labels first and then the parameter values. +The order of lines is important.

    +

    It is also possible to specify values -1, -2, or -3 for topotype, in which +case the z values will be negated as they are read in (since some data +sets use different convensions for positive and negative values relative to +sea level).

    +

    For GeoClaw Description and Detailed Contents applications in the ocean or lakes (such as tsunami +modeling), it is generally assumed that sea_level = 0 has been set in +Specifying GeoClaw parameters in setrun.py and that z<0 corresponds to subsurface bathymetry +and z>0 to topograpy above sea level.

    +
    +

    Downloading topography files

    +

    The example +$CLAW/examples/tsunami/chile2010 +is set up to automatically download topo files via:

    +
    $ make topo
    +
    +
    +

    See the maketopo.py file in that directory.

    +

    Other such examples will appear in the future.

    +

    Several on-line databases are available for topograpy, see +Some sources of tsunami data for some links.

    +

    Some Python tools for working with topography files are available, see +Python tools for working with topo and dtopo.

    +
    +

    NetCDF format

    +

    Topofiles can be read in netCDF format, either from local .nc files or +from some online databases that provide netCDF servers, e.g. the +NOAA THREDDS server. +Use the +topotools.read_netcdf +function. Note that this also allows reading in only a subset of the data, +both limiting the extent and the resolution, e.g. by sampling every other +point (by setting coarsen=2). This is particularly useful if you only want +a subset of a huge online netCDF file (e.g. coastal DEMs at 1/3 arcsecond +resolution are typically several gigabytes).

    +

    The dictionary topotools.remote_topo_urls contains some useful URLs for +etopo1 and a few other NOAA THREDDS datasets. This allows reading etopo1 +data, for example, via:

    +
    >>> from clawpack.geoclaw import topotools
    +>>> topo1 = topotools.read_netcdf('etopo1',...)
    +
    +
    +

    See $CLAW/geoclaw/tests/test_etopo1.py for one example, in which a very +small patch from the global etopo1 database (which has 1 arcminute resolution) +is downloaded at different resolutions.

    +

    Note: Earlier versions of clawpack included etopotools.py providing a +different way to download subsampled etopo1 topography. That has been +deprecated since the old way is no longer supported by NOAA and did not +always do the subsampling properly.

    +

    Note: Data in the NOAA THREDDS server is referenced to NAVD88, not to MHW!

    +

    See also Grid registration for important information about the manner +in which the data downloaded should be interpreted. For netCDF files the +data points are generally interpreted as pointwise values at the points +specified in the lat and lon arrays included in the file (or as +cell-averaged values with these points as the cell centers).

    +
    +
    +
    +

    Topography displacement files

    +

    For tsunami generation a file dtopo is generally used to specify the +displacement of the topography relative to that specified in the topo files.

    +

    Currently two formats are supported for this file:

    +
    +

    dtopotype=1:

    +

    Similar to +topo files with topotype=1 as described above, except that each line +starts with a t value for the time, so each line contains t,x,y,dz

    +

    The x,y,dz values give the displacement dz at x,y at time t. It is assumed +that the grid is uniform and that the file contains mx*my*mt lines if mt +different times are specified for an mx*my grid.

    +

    dtopotype=3:

    +

    Similar to +topo files with topotype=3 as described above, but the header is +different, and contains lines specifying mx, my, mt, xlower, ylower, t0, +dx, dy, and dt. These are followed by mt sets of my lines, +each line containing mx values of dz.

    +
    +

    The Okada model can be used to generate dtopo files from fault parameters, +as described in Earthquake sources: Fault slip and the Okada model. See also dtopotools module for moving topography.

    +

    Note that if the topography is moving, it is important to insure that the +time step is small enough to capture the motion. Starting in Version 5.1.0, +there is a new parameter that can be specified in setrun.py +to limit the size time step used during the time when topography is moving. +See Topography data file parameters.

    +
    +
    +

    qinit data file

    +

    Instead of (or in addition to) specifying a displacement of the topography +it is possible to specify a perturbation to the depth, momentum, or surface +elevation of the initial data. This is generally useful only for tsunami +modeling where the initial data specified in the default qinit.f90 function +is the stationary water with surface elevation equal to sea_level as set in +setrun.py (see Specifying GeoClaw parameters in setrun.py).

    +

    Of course it is possible to copy the qinit.f90 function to your +directory and modify it, but for some applications the initial elevation may +be given on grid of the same type as described above. In this case file can +be provided as described at qinit data file parameters containing this +perturbation.

    +

    The file format is similar to what is described above for topotype=1, but +now each line contains x,y,dq where dq is a perturbation to one of the +components of q as specified by the value of qinit_type specified (see +qinit data file parameters). If qinit_type = 4, the value dq is instead the +surface elevation desired for the initial data and the depth h (first +component of q) is set accordingly.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/topotools.html b/v5.10.x/topotools.html new file mode 100644 index 0000000000..89b490914f --- /dev/null +++ b/v5.10.x/topotools.html @@ -0,0 +1,182 @@ + + + + + + + + + Python tools for working with topo and dtopo — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    + + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/topotools_module.html b/v5.10.x/topotools_module.html new file mode 100644 index 0000000000..58c893b0e5 --- /dev/null +++ b/v5.10.x/topotools_module.html @@ -0,0 +1,846 @@ + + + + + + + + + topotools module for working with topography data — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    topotools module for working with topography data

    + +

    The notebook +topotools_examples +illustrates how to use some of the tools.

    +

    The file $CLAW/geoclaw/tests/test_topotools.py contains some tests of these +tools. Looking at these test routines may also give some ideas on +how to use them.

    +
    +

    Documentation auto-generated from the module docstrings

    +

    GeoClaw topotools Module $CLAW/geoclaw/src/python/geoclaw/topotools.py

    +

    Module provides several functions for reading, writing and manipulating +topography (bathymetry) files.

    +
    +
    Classes:
    +
      +
    • Topography

    • +
    +
    +
    Functions:
    +
      +
    • determine_topo_type

    • +
    • create_topo_func

    • +
    • topo1writer

    • +
    • topo2writer

    • +
    • topo3writer

    • +
    • swapheader

    • +
    +
    +
    TODO:
    +
      +
    • Add sub and super sampling capababilities

    • +
    • Add functions for creating topography based off a topo function, incorporate +the create_topo_func into Topography class, maybe allow more broad +initialization ability to the class to handle this?

    • +
    • Fix in_poly function

    • +
    • Add remove/fill no data value

    • +
    • Add more robust plotting capabilities

    • +
    +
    +
    +
    +
    +class clawpack.geoclaw.topotools.Topography(path=None, topo_type=None, topo_func=None, unstructured=False)
    +

    Base topography class.

    +

    A class representing a single topography file.

    +
    +
    Properties:
    +

    +
    +

    Note: Modified to check the grid_registration when reading or writing +topo files and properly deal with llcorner registration in which case +the x,y data should be offset by dx/2, dy/2 from the lower left corner +specified in the header of a DEM file.

    +
    +
    Initialization:
    +
      +
    • +
    +
    +
    Examples:
    +
    >>> import clawpack.geoclaw.topotools as topo
    +>>> topo_file = topo.Topography()
    +>>> topo_file.read('./topo.tt3', topo_type=3)
    +>>> topo_file.plot()
    +
    +
    +
    +
    +
    +
    +property X
    +

    Two dimensional coordinate array in x direction.

    +
    + +
    +
    +property Y
    +

    Two dimensional coordinate array in y direction.

    +
    + +
    +
    +property Z
    +

    A representation of the data as a 2d array.

    +
    + +
    +
    +crop(filter_region=None, coarsen=1)
    +

    Crop region to filter_region

    +

    Create a new Topography object that is identical to this one but cropped +to the region specified by filter_region

    +
    +
    TODO:
    +
      +
    • Currently this does not work for unstructured data, could in principle

    • +
    • This could be a special case of in_poly although that routine could +leave the resulting topography as unstructured effectively.

    • +
    +
    +
    +
    + +
    +
    +property delta
    +

    Spacing of data points.

    +
    + +
    +
    +property extent
    +

    Extent of the topography.

    +
    + +
    +
    +generate_2d_coordinates(mask=False)
    +

    Generate 2d coordinate arrays.

    +
    + +
    +
    +generate_2d_topo(mask=False)
    +

    Generate a 2d array of the topo.

    +
    + +
    +
    +in_poly(polygon)
    +

    Mask points (x,y) that are not in the specified polygon.

    +

    Uses simple ray casting algorithm for speed so beware of corner cases!

    +
    +
    Input:
    +
      +
    • polygon (list) List of points that comprise the polygon. Note that +order of the points will effect if this works (positive versus negative +winding order). Points should be in counter-clockwise arrangement.

    • +
    +
    +
    Returns:
    +
      +
    • X_mask (numpy.ma.MaskedArray) Masked array of X coordinates where those +points outside of the polygon have been masked.

    • +
    • Y (numpy.ndarray) Coordinates in y direction in a meshgrid type of +configuration.

    • +
    +
    +
    +
    + +
    +
    +interp_unstructured(fill_topo, extent=None, method='nearest', delta=None, delta_limit=20.0, no_data_value=-9999, buffer_length=100.0, proximity_radius=100.0, resolution_limit=2000)
    +

    Interpolate unstructured data on to regular grid.

    +

    Function to interpolate the unstructured data in the topo object onto a +structured grid. Utilizes a bounding box plus a buffer of size +buffer_length (meters) containing all data unless extent is not None +is True. Then uses the fill topography fill_topo to fill in the +gaps in the unstructured data. By default this is done by masking the +fill data with the extents, the value no_data_value and if +proximity_radius (meters) is not 0, by a radius of proximity_radius +from all grid points in the object. Stores the +result in the self.X, self.Y and self.Z object attributes. The +resolution of the final grid is determined by calculating the minimum +distance between all x and y data with a hard lower limit of +delta_limit (meters).

    +

    Note that the function scipy.interpolate.griddata does not respect +masks so a call to numpy.ma.MaskedArray.compressed() must be made to +remove the masked data.

    +
    +
    Input:
    +
      +
    • fill_topo (list) - List of Topography objects to use as fill data +in the projection.

    • +
    • extent (tuple) - A tuple defining the rectangle of the sub-section. +Must be in the form (x lower,x upper,y lower, y upper).

    • +
    • method (string) - Method used for interpolation, valid methods are +found in scipy.interpolate.griddata. Default is nearest.

    • +
    • delta (tuple) - Directly set the grid spacing of the interpolation +rather than determining it from the data itself. Defaults to None +which causes the method to determine this value itself. +Should be a 2-tuple of floats (delta_x, delta_y).

    • +
    • delta_limit (float) - Limit of finest horizontal resolution, +default is 20 meters.

    • +
    • no_data_value (float) - Value to use if no data was found to fill in a +missing value, ignored if method = ‘nearest’. Default is -9999.

    • +
    • buffer_length (float) - Buffer around bounding box, only applicable +when extent is None. Default is 100.0 meters.

    • +
    • proximity_radius (float) - Radius every unstructured data point +used to mask the fill data with. Default is 100.0 meters.

    • +
    • resolution_limit (int) - Limit the number of grid points in a +single dimension. Raises a ValueError if the limit is violated. +Default value is 2000.

    • +
    +
    +
    +

    Sets this object’s unstructured attribute to False if successful.

    +
    + +
    +
    +make_shoreline_xy(sea_level=0)
    +

    Returns an array shoreline_xy with 2 columns containing x and y values +for all segements of the shoreline (defined to be the contour +where self.z = sea_level) separated by [nan,nan] pairs. +This allows all shorelines to be quickly plotted via:

    +
    >>> plot(shoreline_xy[:,0], shoreline_xy[:,1])
    +
    +
    +

    The shoreline can be saved as a binary .npy file via:

    +
    >>> numpy.save(filename, shoreline_xy)
    +
    +
    +

    which is much smaller than the original topography file. +Reload via:

    +
    >>> shoreline_xy = numpy.load(filename)
    +
    +
    +
    + +
    +
    +plot(axes=None, contour_levels=None, contour_kwargs={}, limits=None, cmap=None, add_colorbar=True, plot_box=False, long_lat=True, fig_kwargs={}, data_break=0.0, cb_kwargs={})
    +

    Plot the topography.

    +
    +
    Input:
    +
      +
    • axes (matplotlib.pyplot.axes) - If passed in, plot will be +added to this axes. Otherwise a new plot figure will be created +(using fig_kwargs) and a new axes object created and returned.

    • +
    • contour_levels (list) - levels for contour lines if these are +to be added (default None). Set to [0.] to plot shoreline.

    • +
    • contour_kwargs (dict) - keyword arguments to be passed to +contour command, e.g. {‘colors’:’r’, ‘linestyles’: ‘-‘}. +Default is empty dict.

    • +
    • limits (list) - (min, max) of topo values for color map. +Defaults to None, in which case (self.Z.min(), self.Z.max()) used.

    • +
    • cmap (matplotlib.colors.Colormap) - colormap, defaults to +specialized map with blues for bathymetry and green/browns for topo.

    • +
    • fig_kwargs (dict) - keyword arguments to be passed to figure.

    • +
    • plot_box (bool or color specifier) - If evaluates to True, plot +a box around limits of this topo.

    • +
    • long_lat (bool) - If this is a longitude-latitude plot then set the +aspect of the plot to compensate for stretching. If not then the +aspect is set to “equal”.

    • +
    • data_break (float) - when default cmap is used, the value to use +to break between water and land colormaps. +Defaults to 0., but for some topo files may need to use e.g. 0.01 +Or may want to show plots at different tide stage.

    • +
    • cb_kwargs (dict) - keyword arguments to be passed to colorbar +e.g. ‘shrink’, ‘extend’, ‘label’. Can also set ‘title’ for cbar

    • +
    +
    +
    Output:
    +
      +
    • axes (matplotlib.pyplot.axes) - the axes on which plot created.

    • +
    +
    +
    +
    +
    Note that:
      +
    • if type(self.Z) is numpy.ma.MaskedArray then pcolor is used,

    • +
    • if type(self.Z) is numpy.ndarray then imshow is used. +(This is faster for large files)

    • +
    +
    +
    +
    + +
    +
    +read(path=None, topo_type=None, unstructured=False, mask=False, filter_region=None, force=False, stride=[1, 1], nc_params={})
    +

    Read in the data from the object’s path attribute.

    +

    Stores the resulting data in one of the sets of x, y, and z or +X, Y, and Z.

    +
    +
    Input:
    +
      +
    • path (str) file to read

    • +
    • topo_type (int) - GeoClaw format topo_type

    • +
    • unstructured (bool) - default is False for lat-long grids.

    • +
    • mask (bool) - whether to store as masked array for missing +values (default if False)

    • +
    • filter_region (tuple)

    • +
    • stride (list) - List of strides for the x and y dimensions +respectively. Default is [1, 1]. Note that this is only +implemented for NetCDF reading currently.

    • +
    • nc_params (dict) -

    • +
    +
    +
    +

    The first three might have already been set when instatiating object.

    +
    + +
    +
    +read_header()
    +

    Read in header of topography file at path.

    +

    If a value returns numpy.nan then the value was not retrievable. Note +that this routine can read in headers whose values and labels are +swapped.

    +
    + +
    +
    +replace_no_data_values(method='fill')
    +

    Replace no_data_value with other values as specified by method.

    +

    self.no_data_value

    +
    +
    Input:
    +
      +
    • method can be one of:

      +
      +
        +
      • fill - Fill in all no_data_value locations with value

      • +
      • nearest - Fill in no_data_value locations with +average of nearest neighbors.

      • +
      +
      +
    • +
    +
    +
    +
    + +
    +
    +replace_values(indices, value=nan, method='fill')
    +

    Replace the values at indices by the specified method

    +
    +
    Methods:
    +
      +
    • “fill”

    • +
    • “nearest”

    • +
    +
    +
    +
    + +
    +
    +set_xyZ(X, Y, Z)
    +

    Set _x, _y, and _Z attributes and then generate X,Y,Z.

    +

    If X,Y are 1d arrays, then shape of Z should be (len(Y), len(X)).

    +

    Allow X,Y to be 2d arrays of shape Z.shape, in which case +first extract x,y

    +
    + +
    +
    +smooth_data(indices, r=1)
    +

    Filter topo data at indices by averaging surrounding data.

    +

    Surrounding data is considered within the ball of radius r in the +inf-norm. Acts as a low-band pass filter and removes oscillatory data.

    +
    +
    Input:
    +
      +
    • indices (list)

    • +
    • r (int)

    • +
    +
    +
    Output:
    +

    None

    +
    +
    +
    + +
    +
    +write(path, topo_type=None, no_data_value=None, fill_value=None, header_style='geoclaw', Z_format='%15.7e', grid_registration=None)
    +

    Write out a topography file to path of type topo_type.

    +

    Writes out a topography file of topo type specified with topo_type or +inferred from the output file’s extension, defaulting to 3, to path +from data in Z. The rest of the arguments are used to write the header +data.

    +
    +
    Input:
    +
      +
    • path (str) - file to write

    • +
    • topo_type (int) - GeoClaw format topo_type +Note: this is second positional argument, agreeing with +the read function in this class. It was the third argument in +GeoClaw version 5.3.1 and earlier.

    • +
    • no_data_value - values used to indicate missing data

    • +
    • fill_value (float) - value to use if filling a masked array

    • +
    • +
      header_style (str) - indicates format of header lines
      +
      ‘geoclaw’ or ‘default’ ==> write value then label

      with grid_registration == ‘lower’ as default

      +
      +
      ‘arcgis’ or ‘asc’ ==> write label then value

      with grid_registration == ‘llcorner’ as default +(needed for .asc files in ArcGIS)

      +
      +
      +
      +
      +
    • +
    • Z_format (str) - string format to use for Z values +The default format “%15.7e” gives at least millimeter precision +for topography with abs(Z) < 10000 and results in +smaller files than the previous default of “%22.15e” used in +GeoClaw version 5.3.1 and earlier. A shorter format can be used +if the user knows there are fewer significant digits, e.g. +etopo1 data is integers and so has a resolution of 1 meter. +In this case a cropped or coarsened version might be written +with Z_format = “%7i”, for example.

    • +
    • +
      grid_registration (str) - ‘lower’, ‘llcorner’, ‘llcenter’

      or None for defaults described above.

      +
      +
      +
    • +
    +
    +
    +
    + +
    +
    +property x
    +

    One dimensional coorindate array in x direction.

    +
    + +
    +
    +property y
    +

    One dimensional coordinate array in y direction.

    +
    + +
    +
    +property z
    +

    A representation of the data as an 1d array.

    +
    + +
    + +
    +
    +clawpack.geoclaw.topotools.create_topo_func(loc, verbose=False)
    +

    Given a 1-dimensional topography profile specfied by a set of (x,z) +values, create a lambda function that when evaluated will give the +topgraphy at the point (x,y). (The resulting function is constant in y.)

    +
    +
    Example:
    +
    >>> f = create_topo_func(loc)
    +>>> b = f(x, y)
    +
    +
    +
    +
    Input:
    +
      +
    • loc (list) - Create a topography file with the profile denoted by the +tuples inside of loc. A sample set of points are shown below. Note +that the first value of the list is the x location and the second is +the height of the topography.

      +
      z (m)
      +^                                                  o loc[5]  o
      +|                                                    
      +|                                          loc[4]   
      +|--------------------------------------------o-----> x (m) (sea level)
      +|                                            
      +|                                o loc[2] o loc[3]
      +|                         
      +|                         
      +|                           o loc[1]
      +|           
      +|                               
      +|__________________o loc[0]
      +0.0               
      +
      +
      +
    • +
    +
    +
    +
    + +
    +
    +clawpack.geoclaw.topotools.determine_topo_type(path, default=None)
    +

    Using the file suffix of path, attempt to deterimine the topo type.

    +
    +
    Input:
    +
      +
    • path (string) - Path to the file. Can include archive extensions (they +will be stripped off).

    • +
    • default (object) - Value returned if no suitable topo type was +determined. Default is None.

    • +
    +
    +
    +

    returns integer between 1-3 or default if nothing matches.

    +
    + +
    +
    +clawpack.geoclaw.topotools.fetch_topo_url(url, local_fname=None, force=None, verbose=False, ask_user=False)
    +

    DEPRECATED: Use clawpack.clawutil.data.get_remote_file instead (see note below).

    +

    Replaces get_topo function.

    +

    Download a topo file from the web, provided the file does not +already exist locally.

    +
    +
    Input:
    +
      +
    • url (str) URL including file name

    • +
    • local_fname (str) name of local file to create. +If local_fname == None, take file name from URL

    • +
    • force (bool) If False, prompt user before downloading.

    • +
    +
    +
    +

    For GeoClaw examples, some topo files can be found in +`http://www.geoclaw.org/topo`_ +See that website for a list of archived topo datasets.

    +

    If force==False then prompt the user to make sure it’s ok to download,

    +

    If force==None then check for environment variable CLAW_TOPO_DOWNLOAD +and if this exists use its value. This is useful for the script +python/run_examples.py that runs all examples so it won’t stop to prompt.

    +

    This routine has been deprecated in favor of +clawpack.clawutil.data.get_remote_file. All the functionality should be +the same but calls the other routine internally.

    +
    + +
    +
    +clawpack.geoclaw.topotools.get_topo(topo_fname, remote_directory, force=None)
    +

    DEPRECATED: Use clawpack.geoclaw.util.get_remote_file instead

    +

    Download a topo file from the web, provided the file does not +already exist locally.

    +

    remote_directory should be a URL. For GeoClaw data it may be a +subdirectory of http://www.clawpack.org/geoclaw/topo +See that website for a list of archived topo datasets.

    +

    If force==False then prompt the user to make sure it’s ok to download, +with option to first get small file of metadata.

    +

    If force==None then check for environment variable CLAW_TOPO_DOWNLOAD +and if this exists use its value. This is useful for the script +python/run_examples.py that runs all examples so it won’t stop to prompt.

    +
    + +
    +
    +clawpack.geoclaw.topotools.read_netcdf(path, zvar=None, extent='all', coarsen=1, return_topo=True, return_xarray=False, verbose=False)
    +
    +
    Input:
    +
      +
    • path (str) - Path to the file to read, or url to remote file, +or a key into the topotools.remote_topo_urls dictionary.

    • +
    • zvar (str) - variable to read as Z=elevation. +if None, will try ‘Band1’, ‘z’, ‘elevation’.

    • +
    • extent - [x1,x2,y1,y2] for desired subset, or ‘all’ for entire file

    • +
    • coarsen (int) - factor to coarsen by, 1 by default.

    • +
    • return_topo (bool) - if True, return a topotools.Topography object. +default is True

    • +
    • return_xarray (bool) - if True, return an xarray.Dataset object. +default is False

    • +
    +
    +
    Output:
    +
      +
    • topo and/or xarray_ds depending on what was requested. +(either a single object or a tuple of two objects.)

    • +
    +
    +
    +

    If return_xarray == True then xarray is used to read the data, +otherwise netCDF4 is used directly.

    +

    Sample usage:

    +
    +

    from clawpack.geoclaw import topotools +extent = [-126,-122,46,49] +path = ‘etopo1’ +topo = topotools.read_netcdf(path, extent=extent, coarsen=2, verbose=True)

    +

    # to plot: +topo.plot()

    +

    # to save topofile for input to GeoClaw: +topo.write(‘etopo_sample_2min.tt3’, topo_type=3, Z_format=’%.0f’)

    +
    +

    This should give a 2-minute resolution DEM of the Western Washington coast. +Note that etopo1 Z values are integers (vertical resolution is 1 meter) +and using Z_format=’%.0f’ will save as integers to minimize file size.

    +
    + +
    +
    +clawpack.geoclaw.topotools.swapheader(inputfile, outputfile)
    +

    Swap the order of key and value in header to value first.

    +

    Note that this is a wrapper around functionality in the Topography class.

    +
    + +
    +
    +clawpack.geoclaw.topotools.topo1writer(outfile, topo, xlower, xupper, ylower, yupper, nxpoints, nypoints)
    +

    Function topo1writer will write out the topofiles by evaluating the +function topo on the grid specified by the other parameters.

    +

    Assumes topo can be called on arrays X,Y produced by numpy.meshgrid.

    +

    Output file is of “topotype1,” which we use to refer to a file with +(x,y,z) values on each line, progressing from upper left corner across +rows, then down.

    +
    + +
    +
    +clawpack.geoclaw.topotools.topo2writer(outfile, topo, xlower, xupper, ylower, yupper, nxpoints, nypoints, nodata_value=-99999)
    +

    Write out a topo type 2 file by evaluating the function topo.

    +

    This routine is here for backwards compatibility and simply creates a new +topography object and writes it out.

    +
    + +
    +
    +clawpack.geoclaw.topotools.topo3writer(outfile, topo, xlower, xupper, ylower, yupper, nxpoints, nypoints, nodata_value=-99999)
    +

    Write out a topo type 3 file by evaluating the function topo.

    +

    This routine is here for backwards compatibility and simply creates a new +topography object and writes it out.

    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/trouble.html b/v5.10.x/trouble.html new file mode 100644 index 0000000000..44221f18d3 --- /dev/null +++ b/v5.10.x/trouble.html @@ -0,0 +1,307 @@ + + + + + + + + + Troubleshooting — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Troubleshooting

    +
    +

    Troubleshooting Installation

    +

    Don’t forget to Set environment variables, if necessary.

    +

    See Python path for problems with your Python path.

    +

    The utility function whichclaw.py may be useful for sorting out path issues.

    +
    +
    +

    Troubleshooting Fortran:

    +
    +

    Setting the Fortran compiler to be used by f2py (pip)

    +

    When trying to install with pip (see pip install instructions) +or python setup.py install, if you get an error like:

    +
    error: f90 not supported by GnuFCompiler
    +
    +
    +

    then f2py is trying to use your f77 compiler. This may happen even if +you also have an f90 compiler like gfortran installed. In this case, +pip install will not work; you should download a tarball or clone +the code from Github. Then, in order to see the compilers detected by f2py, +run:

    +
    python setup.py config_fc --help-fcompiler
    +
    +
    +

    Then to install using a different compiler, do e.g.:

    +
    python setup.py config_fc --fcompiler=gfortran install
    +
    +
    +

    You may replace gfortran with the compiler you wish to use.

    +
    +
    +

    Trouble compiling Fortran code at the command line

    +

    The packages Classic, AMRClaw, and GeoClaw all require compiling Fortran +code in the process of running an example. This is typically done with the +make .exe command in an example or application directory that contains a +Clawpack Makefiles. Even if you don’t do this explicitly, due to dependency +checking in the Makefile the code will be compiled if necessary if you do +make .output, or make .plots (or make all).

    +
    +
    +

    Trouble running “make .exe”

    +

    If the code does not compile, check the following:

    +
    +
      +
    • Make sure your environment variable CLAW is set properly:

      +
      $ printenv CLAW
      +
      +
      +

      to print the value. +The Makefiles use this variable to find the common Makefile and +library routines.

      +

      If you get the error message:

      +
      Makefile:154: /clawutil/src/Makefile.common: No such file or directory
      +
      +
      +

      then CLAW is not set properly. It is looking for the file +$CLAW/clawutil/src/Makefile.common and if CLAW is not set, the path +will be missing.

      +
    • +
    • Make sure your environment variable FC is set properly. This +should be set to +the command used to invoke the Fortran compiler, e.g. gfortran.

      +

      If you get an error like:

      +
      make[1]: gfortran: No such file or directory
      +
      +
      +

      then the gfortran compiler is not being found.

      +
    • +
    +
    +
    +
    +
    +

    Trouble running “make .data”

    +

    If there are errors in the setrun function (usually defined in +setrun.py) then the these may show up when you try to “make .data” +since this function must be executed.

    +

    See Specifying classic run-time parameters in setrun.py for information about the setrun function.

    +
    +
    +

    Trouble running “make .output”

    +

    If you want to re-run the code and you get:

    +
    $ make .output
    +make: `.output' is up to date.
    +
    +
    +

    then you can force it to run again by removing the file .output:

    +
    $ rm -f .output
    +$ make .output
    +
    +
    +

    This happens for example if you changed something that you know +will affect the output but that isn’t in the Makefile’s set of +dependencies.

    +

    You can also do

    +
    +

    $ make output

    +
    +

    (with no dot before output) to run the code without checking dependencies. +See Clawpack Makefiles for more details and warnings.

    +
    +
    +

    Trouble running “make .plots”

    +

    The Python plotting routines require NumPy and matplotlib. See +Python Hints for information on installing these.

    +

    If there are errors in the setplot function (usually defined in +setplot.py) then the these may show up when you try to “make .plots” +since this function must be executed. See Using setplot.py to specify the desired plots.

    +

    You can also do

    +
    +

    $ make plots

    +
    +

    (with no dot before plots) to plot the output without checking dependencies. +This will never run the code, it will only attempt to plot the output files +found in _output directory (or wherever the OUTDIR variable in the +Makefile points).

    +

    See Clawpack Makefiles for more details and warnings.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/tsunamidata.html b/v5.10.x/tsunamidata.html new file mode 100644 index 0000000000..ccf2bb3f54 --- /dev/null +++ b/v5.10.x/tsunamidata.html @@ -0,0 +1,259 @@ + + + + + + + + + Some sources of tsunami data — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Some sources of tsunami data

    +
    +

    See also

    +

    Topography data

    +
    +
    +

    Topography / bathymetry

    +

    Note that it is important to know what elevation \(B=0\) +corresponds to for each +topography dataset you might use (i.e. the +vertical datum) +Global ETOPO1 bathymetry is relative to MSL (Mean Sea Level), +while tsunami inundation relief is often relative to MHW (Mean High Water). +These can often be combined since the difference is small relative to the +resolution of the global bathymetry and the result assumed to be relative to +MHW. This is important if comparing to tide gauge observation or when +modeling inundation.

    +

    The NOAA Design-a-Grid tool no longer exists but you can download data sets +from:

    + +

    It is also possible to open a remote NetCDF file on the +NOAA THREDDS server +to download data, which allows downloading only a +subsampled subset of a large DEM. See NetCDF format for more +details.

    +
    +
    +

    Earthquake source models

    +

    An earthquake source is typically specified by giving the slip along the +fault on a set of fault planes or on subfaults making up a single plane. +This data must then be converted into seafloor deformation to create the +dtopo file needed for GeoClaw (see Topography displacement files). This conversion +is often done using the Okada model as described at +Earthquake sources: Fault slip and the Okada model.

    + +
    +
    +

    DART buoy data

    + +
    +
    +

    Tide gauges

    +

    Tide gauge data is often recorded relative to MLLW (Mean Lower-Low Water), so be +sure to check the +vertical datum.

    +

    For example, if you go to a station page such as +Hilo Bay, +you will see a Datums link on the left menu that gives the difference +between MLLW and other water levels such as MHW, which might be the +reference level for the bathymetry. (Be sure to switch from feet to +meters!) Sometimes you can also select the Datum to use when retrieving +data.

    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/user_routines.html b/v5.10.x/user_routines.html new file mode 100644 index 0000000000..d9b5d10527 --- /dev/null +++ b/v5.10.x/user_routines.html @@ -0,0 +1,396 @@ + + + + + + + + + User files required for the Fortran code — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    User files required for the Fortran code

    +

    The Makefile in an application directory shows the set of Fortran source +code files that are being used. Most of these files are typically in one of +the libraries, but a few subroutines must be provided by the user in order to +specify the hyperbolic problem to be solved and the initial conditions. +Other subroutines may also be provided that are application-specific. +This page summarizes some of the most common user-modified routines.

    +

    The calling sequence for each subroutine differs with the number of space +dimensions. The sample calling sequences shown below are for one space +dimension.

    +

    The subroutines described below have default versions in the +corresponding library and the Makefile can point to these if +application-specific versions are not needed.

    +

    See the examples in the following directories for additional samples:

    +
      +
    • $CLAW/classic/examples

    • +
    • $CLAW/amrclaw/examples

    • +
    • $CLAW/geoclaw/examples

    • +
    +

    You can also browse from the Clawpack Gallery to the README file for an +example and then to the source code for the application-specific codes.

    +
    +

    Specifying the initial conditions

    +

    Calling sequence in 1d:

    +
    subroutine qinit(meqn,mbc,mx,xlower,dx,q,maux,aux)
    +
    +
    +

    See the qinit default routines for other calling sequences and the proper +declaration of input/output parameters.

    +

    Typically every application directory contains a file qinit.f or +qinit.f90 that sets the initial conditions, typically in a loop such as:

    +
    do i=1,mx
    +    xi = xlower + (i-0.5d0)*dx
    +    q(1,i) = xi**2
    +    enddo
    +
    +
    +

    This loop would set the value of \(q^1\) in the i’th cell to +\(x_i^2\) where \(x_i\) is the cell center. +For the finite volume methods used in Clawpack, the initial data should +really be set to be the cell average of the data over each grid cell, +determined by integrating the data for the PDE. +If the initial data is given by a smooth function, then evaluating the +function at the center of the grid cell generally agrees with the cell +average to \({\cal O}(\Delta x^2)\) and is consistent with the +second-order accurate high-resolution methods being used in Clawpack.

    +

    For a system of more than 1 equation, you must set q(m,i) for m = +1, 2, …, num_eqn.

    +

    For adaptive mesh refinement codes, the qinit subroutine will be called +for each grid patch at the initial time, so it is always necessary to +compute the cell centers based on the information passed in.

    +
    +
    +

    Specifying the Riemann solver

    +

    The Riemann solver defines the hyperbolic equation that is being solved and +does the bulk of the computational work – it is called at every cell +interface every time step and returns the information about waves and speeds +that is needed to update the solution.

    +

    See Riemann solvers for more details about the Riemann solvers.

    +

    All of the examples that come with Clawpack use Riemann solvers that are +provided in the directory $CLAW/riemann/src, see the Makefile in one of +the examples to determine what Riemann solver file(s) are being used (in two +and three space dimensions, transverse Riemann solvers are also required).

    +

    The directory $CLAW/riemann/src contains Riemann solvers for many +applications, including advection, acoustics, shallow water equations, Euler +equations, traffic flow, Burgers’ equation, etc.

    +
    +
    +

    Specifying boundary conditions

    +

    Boundary conditions are set by the library routines:

    +
      +
    • $CLAW/classic/src/Nd/bcN.f for the classic code (N = 1, 2, 3).

    • +
    • $CLAW/amrclaw/src/Nd/bcNamr.f for the amrclaw code (N = 2, 3).

    • +
    +

    Several standard choices of boundary condition procedures are provided in +these routines – see Boundary conditions for details.

    +

    For user-supplied boundary conditions that are not implemented in the +library routines, the library routine can be copied to the application +directory and changes made as described at User-defined boundary conditions. +The Makefile should then be modified to point to the local version.

    +
    +
    +

    Specifying problem-specific data

    +

    Often an application problem has data or parameters that is most +conveniently specified in a user-supplied routine named setprob. There is +a library version that does nothing in case one is not specified in the +application directory. As usual, the Makefile indicates what file is +used.

    +

    The setprob subroutine takes no arguments. Data set in setprob is often +passed in common blocks to other routines, such as qinit or the Riemann +solver. This is appropriate only for data that does not change with time +and does not vary in space (e.g. the gravitational constant g in the +shallow water equations, or the density and bulk modulus for acoustics in +a homogenous medium).

    +

    Note that named common blocks must have the same name in each routine where +they are used. Check any Riemann solvers you use (including those from +$CLAW/riemann/src) to see if they require some parameters to be passed in +via a common block. If so, setprob is the place to set them.

    +

    For spatially-varying data, see Specifying spatially-varying data using setaux below.

    +

    Often setprob is written so that it reads in data values from a file, +often called setprob.data. This makes it easier to modify parameter +values without recompiling the code. It is also possible to set these +values in setrun.py so that this input data is specified in the same file +as other input parameters. For a sample, see +$CLAW/classic/examples/acoustics_1d_heterogeneous, for example.

    +
    +
    +

    Specifying spatially-varying data using setaux

    +

    Some problems require specifying spatially varying data, for example the +density and bulk modulus for acoustics in a heterogenous medium might vary +in space and in principle could be different in each grid cell. The best +way to specify such data is by use of auxiliary arrays that are created +whenever a grid patch for the solution is created and have the same number +of cells with num_aux components in each cell. The value num_aux is +specified in setrun.py, and the contents of the aux arrays are filled by +a subroutine named setaux, which in one dimension has the calling +sequence:

    +
    subroutine setaux(mbc,mx,xlower,dx,maux,aux)
    +
    +
    +

    See the setaux default routines for other calling sequences and the proper +declaration of input/output parameters.

    +

    If adaptive refinement is being used, then every time a new grid patch is +created at any refinement level this subroutine will be called to fill in +the corresponding aux arrays. For a sample, see +$CLAW/classic/examples/acoustics_1d_heterogeneous, for example.

    +

    If the aux arrays need to be time-dependent, the easiest way to adjust +them each time step is in the routine b4step described below.

    +
    +
    +

    Using b4step for work to be done before each time step

    +

    The routine b4stepN is called in N space dimensions (N=1,2,3) just +before a time step is taken (and after ghost cells have been filled by the +boundary conditions). The library version of this routine does +nothing, but this can be modified to do something prior to every time step.

    +

    In one dimension the calling sequence is:

    +
    subroutine b4step1(mbc,mx,meqn,q,xlower,dx,t,dt,maux,aux)
    +
    +
    +

    See the b4step default routines for other calling sequences and the proper +declaration of input/output parameters.

    +

    For example, in $CLAW/amrclaw/examples/advection_2d_swirl the advection +equation is solved with an advection velocity that varies in time as well as +space. This is initialized for each grid patch in setaux, but is adjusted +each time step in b4step2.

    +
    +
    +

    Using src for source terms

    +

    Problems of the form +\(q_t(x,t) + f(q(x,t))_x = \psi(q,x,t)\) +can be solved using a fractional step approach, as described in Chapter 17 +of [LeVeque-FVMHP]. The user can provide a subroutine named srcN in N +space dimensions that takes a single time step on the equation +\(q_t = \psi\). In one dimension the calling sequence is:

    +
    subroutine src1(meqn,mbc,mx,xlower,dx,q,maux,aux,t,dt)
    +
    +
    +

    On output the q array should have been updated by using the input values +as initial data for a single step of length dt starting at time t.

    +

    See the src default routines for other calling sequences and the proper +declaration of input/output parameters.

    +

    The library version of srcN does nothing. If you copy this to an +application directory and modify for your equation, you must modify the +Makefile to point to the local version. You must also set the +source_split parameter in setrun.py (see Specifying classic run-time parameters in setrun.py) to either +“godunov” or “strang”. In the former case, the 1st order Godunov +splitting is used (after each time step on the homogenous +hyperbolic equation, a time step of the same length is taken on the source +terms). In the latter case the 2nd order Strang splitting is used: the time +step on the hyperbolic part is both preceeded and followed by +a time step of half the length on the source terms.

    +

    For an example where source terms are used, see +$CLAW/classic/examples/acoustics_2d_radial/1drad where a one-dimensional +acoustic equation with a geometric source term is solved in order to provide +a reference solution for the two-dimensional radially symmetric problem +solved in $CLAW/classic/examples/acoustics_2d_radial.

    +
    +
    +

    Using src1d for source terms with AMRClaw

    +

    When the AMRClaw code is used for a problem in 2 or 3 dimensions with source +terms, then a subroutine srcN must be provided as described above. In +addition, for the AMR procedure to work properly it is also necessary to +provide another subroutine src1d with calling sequence:

    +
    subroutine src1d(meqn,mbc,mx1d,q1d,maux,aux1d,t,dt)
    +
    +
    +

    See the src1d default routines for other calling sequences and the proper +declaration of input/output parameters.

    +

    This routine should be a simplified version of src2 or src3 that takes a +one-dimensional set of data in q1d rather than a full 2- or 3-dimensional +array of data. The input array aux1d has the corresponding set of +auxiliary variables in case these are needed in stepping forward with the +source terms.

    +

    If the source terms depend only on q, it should be easy to +adapt src2 to create this routine, simply by looping over i=1:mx1d rather +than over a multi-dimensional array.

    +

    This routine is used in computing adjustments around a fine grid patch that +are needed in order to maintain global conservation after values in a +coarser grid cell have been overwritten with the average of the more +accurate fine grid values. Adjustment of the coarse grid values in the +cells bordering this patch is then required to maintain conservation. +This requires solving a set of Riemann problems between fine-grid and +coarse-grid values around the edge of the patch and src1d is used in +advancing coarse grid values to intermediate time steps.

    +

    The code may work fine without applying source terms in this +context, so using the dummy library routine src1d might be +successful even when source terms are present.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/visit_plotting.html b/v5.10.x/visit_plotting.html new file mode 100644 index 0000000000..f2c84b5af3 --- /dev/null +++ b/v5.10.x/visit_plotting.html @@ -0,0 +1,199 @@ + + + + + + + + + Plotting with VisIt — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Plotting with VisIt

    +

    2d and 3d plots can be rendered using the visualization package +VisIt. +VisIt has a Claw reader that can be used to +import data from Clawpack, see Application Toolkit Formats +for other formats that VisIt supports.

    +

    The ASCII output files generated by Clawpack can be read in +directly to VisIt if one additional file is added to the directory +of output files: a file named plot.claw is required with contents:

    +
    DIR=.
    +TIME_FILES_SCANF=fort.t%04d
    +GRID_FILES_SCANF=fort.q%04d
    +
    +
    +

    When using the VisIt GUI, simply open this file to load the data. +See the VisIt documentation +for information on how to use the GUI.

    +

    To do:

    +
    +
      +
    • Create Python tools using the Python interface to VisIt so that plots +can be specified in setplot.py.

    • +
    • Add routines to Clawpack to output data in Silo format, the binary +format recommended for VisIt, and/or other binary formats.

    • +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/vm.html b/v5.10.x/vm.html new file mode 100644 index 0000000000..6a0673f991 --- /dev/null +++ b/v5.10.x/vm.html @@ -0,0 +1,177 @@ + + + + + + + + + Clawpack Virtual Machine — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Clawpack Virtual Machine

    +

    See also Docker for Clawpack, which is now the suggested way to use a virtual +machine.

    +

    There is no Clawpack 5.0 VM yet.

    +

    See The Clawpack 4.6 VM documentation for now. +This VM should work with Clawpack 5.0 if you install it following the +Installing Clawpack.

    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.10.x/wp_algorithms.html b/v5.10.x/wp_algorithms.html new file mode 100644 index 0000000000..7dfb0710e5 --- /dev/null +++ b/v5.10.x/wp_algorithms.html @@ -0,0 +1,303 @@ + + + + + + + + + Wave-propagation algorithms — Clawpack 5.10.x documentation + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    +
    +
    + +
    +

    Wave-propagation algorithms

    +
    +

    One space dimension

    +

    Clawpack can be used to solve a system of equations of the form

    +
    +\[\kappa(x)q_t+f(q)_x = \psi(q,x,t),\]
    +

    where \(q=q(x,t)\in{\cal R}^m\). The standard case of a homogeneous +conservation law has \(\kappa\equiv 1\) and \(\psi\equiv 0\),

    +
    +(1)\[q_t+f(q)_x=0.\]
    +

    The flux function \(f(q)\) can also depend explicitly on \(x\) and +\(t\) as well as on \(q\). +Hyperbolic systems that are not in conservation form, e.g.,

    +
    +\[q_t+A(x,t)q_x=0,\]
    +

    can also be solved. See [LeVeque-FVMHP] for more details about the +wave-propagation algorithms that are briefly described here.

    +

    The basic requirement on the homogeneous system is that it be hyperbolic in +the sense that a Riemann solver can be specified that, for any two states +\(q_{i-1}\) and \(Q_i\), returns a set of \(M_w\) waves +\({\cal W}^p_{i-1/2}\) and speeds +\(s^p_{i-1/2}\) +satisfying

    +
    +\[\sum_{p=1}^{M_w} {\cal W}^p_{i-1/2} = Q_i-Q_{i-1} \equiv \Delta Q_{i-1/2}.\]
    +

    The Riemann solver must also return a left-going fluctuation +\({\cal A}^-\Delta Q_{i-1/2}\) and +a right-going fluctuation \({\cal A}^+\Delta Q_{i-1/2}\). In +the standard conservative case (1) these should satisfy

    +
    +(2)\[{\cal A}^-\Delta Q_{i-1/2}+{\cal A}^+\Delta Q_{i-1/2} = f(Q_i)-f(Q_{i-1})\]
    +

    and the fluctuations then define a “flux-difference splitting”.

    +
    +\[{\cal A}^-\Delta Q_{i-1/2} = \sum_p (s^p_{i-1/2})^- {\cal W}^p_{i-1/2}, +\qquad {\cal A}^+\Delta Q_{i-1/2} = \sum_p (s^p_{i-1/2})^+ {\cal W}^p_{i-1/2},\]
    +

    where \(s^- = \min(s,0)\) and \(s^+ = \max(s,0)\). In the +nonconservative case eqn{claw_1dnoncon}, there is no “flux function” +\(f(q)\), +and the constraint (2) need not be satisfied.

    +
    +
    +

    Godunov’s method

    +

    Only the fluctuations are used for the first-order Godunov method, which is +implemented in the form

    +
    +\[Q_i^{n+1} = Q_i^n - \frac{\Delta t}{\Delta x}\left[{\cal A}^+\Delta Q_{i-1/2} ++ {\cal A}^-\Delta Q_{i+1/2}\right],\]
    +

    assuming \(\kappa \equiv 1\).

    +

    The Riemann solver must be supplied by the user in the form of a subroutine +rp1, as described in Specifying the Riemann solver.

    +

    Typically the Riemann solver first computes waves and speeds and then uses +these to compute \({\cal A}^+Q_{i-1/2}\) and \({\cal A}^-Q_{i-1/2}\) +internally in the Riemann solver.

    +
    +
    +

    High-resolution methods

    +

    The waves and speeds must also +be returned by the Riemann solver in order to use the high-resolution +methods described in [LeVeque-FVMHP], which reduce to a second-order +accurate Lax-Wendroff type method when limiters are not used. +By introducing wave limiters, non-physical oscillations near discontinuities +or steep gradients in the solution can be avoided. The limiters are based +on the theory of TVD methods for nonlinear scalar equations and extended in +a natural way to systems of equations.

    +

    These methods take the form

    +
    +\[Q_i^{n+1} = Q_i^n - \frac{\Delta t}{\Delta x}\left[{\cal A}^+Q_{i-1/2} ++ {\cal A}^-Q_{i+1/2}\right] +- \frac{\Delta t}{\Delta x}(\tilde F_{i+1/2} - \tilde F_{i-1/2})\]
    +

    where

    +
    +\[\tilde F_{i-1/2} = \frac 1 2 \sum_{p=1}^{M_w} |s^p_{i-1/2}| +\left( 1-\frac{\Delta t}{\Delta x} |s^p_{i-1/2}|\right) +\tilde{\cal W}_{i-1/2}^p.\]
    +

    Here \(\tilde{\cal W}_{i-1/2}^p\) represents a limited version of the wave +\({\cal W}_{i-1/2}^p\), obtained by comparing \({\cal W}_{i-1/2}^p\) to +\({\cal W}_{i-3/2}^p\) if \(s^p>0\) or to \({\cal W}_{i+1/2}^p\) +if \(s^p<0\).

    +
    +
    +

    f-wave formulation

    +

    For equations with spatially-varying flux functions, such as

    +
    +(3)\[q_t+f(q,x)_x=0.\]
    +

    it is often convenient to use the f-wave formulation of the algorithm, as +proposed in [BaleLevMitRoss02]. Rather than decomposing the jump +\(Q_i-Q_{i-1}\) into waves, the idea of the f-wave approach is to +decompose the flux difference \(f(Q_i,x_i) - f(Q_{i-1},x_{i-1})\) into +f-waves using appropriate eigenvectors of the Jacobian matrices to either +side of the interface. See f-wave Riemann solvers for more details.

    +
    +
    +

    Capacity functions

    +

    When a capacity function \(\kappa(x)\) is present, the Godunov method becomes

    +
    +\[Q_i^{n+1} = Q_i^n - \frac{\Delta t}{\kappa_i \Delta x} +\left[{\cal A}^+Q_{i-1/2} + {\cal A}^-Q_{i+1/2}\right],\]
    +

    See [LeVeque-FVMHP] for discussion of this algorithm and its extension to +the high-resolution method. +Capacity functions are useful in particular for solving equations on a +mapped grid.

    +
    +
    +

    Source terms

    +

    If the equation has a source term, +a routine src1 must also be supplied that +solves the source term equation \(q_t=\psi\) over a time step. +A fractional step method is used to couple this with the homogeneous +solution, as described in Using src for source terms.

    +
    +
    +

    Boundary conditions

    +

    Boundary conditions are imposed by setting values in ghost cells each time +step, as described in Boundary conditions.

    +

    TODO: Continue description – 2d and 3d, transverse solvers.

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/v5.7.x/.buildinfo b/v5.7.x/.buildinfo index cdf36573dc..425800fea1 100644 --- a/v5.7.x/.buildinfo +++ b/v5.7.x/.buildinfo @@ -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: 8f4476fee1f8e439ba1b9be10243689b +config: df02c833bda747614d0e40a521e115be tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v5.7.x/.doctrees/ClawPlotAxes.doctree b/v5.7.x/.doctrees/ClawPlotAxes.doctree index 6df3718db6..5f47c9b623 100644 Binary files a/v5.7.x/.doctrees/ClawPlotAxes.doctree and b/v5.7.x/.doctrees/ClawPlotAxes.doctree differ diff --git a/v5.7.x/.doctrees/ClawPlotData.doctree b/v5.7.x/.doctrees/ClawPlotData.doctree index 4832c5c3df..19cde928ad 100644 Binary files a/v5.7.x/.doctrees/ClawPlotData.doctree and b/v5.7.x/.doctrees/ClawPlotData.doctree differ diff --git a/v5.7.x/.doctrees/ClawPlotFigure.doctree b/v5.7.x/.doctrees/ClawPlotFigure.doctree index 1a16a454e5..6f8df63a79 100644 Binary files a/v5.7.x/.doctrees/ClawPlotFigure.doctree and b/v5.7.x/.doctrees/ClawPlotFigure.doctree differ diff --git a/v5.7.x/.doctrees/ClawPlotItem.doctree b/v5.7.x/.doctrees/ClawPlotItem.doctree index 129cf595f9..51e2e1ee47 100644 Binary files a/v5.7.x/.doctrees/ClawPlotItem.doctree and b/v5.7.x/.doctrees/ClawPlotItem.doctree differ diff --git a/v5.7.x/.doctrees/about.doctree b/v5.7.x/.doctrees/about.doctree index 2dd2fa1b92..e74b3c1c75 100644 Binary files a/v5.7.x/.doctrees/about.doctree and b/v5.7.x/.doctrees/about.doctree differ diff --git a/v5.7.x/.doctrees/adjoint.doctree b/v5.7.x/.doctrees/adjoint.doctree index 80d837fa54..fe82cc3dd1 100644 Binary files a/v5.7.x/.doctrees/adjoint.doctree and b/v5.7.x/.doctrees/adjoint.doctree differ diff --git a/v5.7.x/.doctrees/amr_algorithm.doctree b/v5.7.x/.doctrees/amr_algorithm.doctree index 97914da610..f84c75fc4f 100644 Binary files a/v5.7.x/.doctrees/amr_algorithm.doctree and b/v5.7.x/.doctrees/amr_algorithm.doctree differ diff --git a/v5.7.x/.doctrees/amrclaw.doctree b/v5.7.x/.doctrees/amrclaw.doctree index 21d1a41a71..3cd04b2e1e 100644 Binary files a/v5.7.x/.doctrees/amrclaw.doctree and b/v5.7.x/.doctrees/amrclaw.doctree differ diff --git a/v5.7.x/.doctrees/amrclaw1d.doctree b/v5.7.x/.doctrees/amrclaw1d.doctree index 0643b643d9..ecfb1a391e 100644 Binary files a/v5.7.x/.doctrees/amrclaw1d.doctree and b/v5.7.x/.doctrees/amrclaw1d.doctree differ diff --git a/v5.7.x/.doctrees/amrclaw_doxygen.doctree b/v5.7.x/.doctrees/amrclaw_doxygen.doctree index be1fa8eca2..a244ba3e13 100644 Binary files a/v5.7.x/.doctrees/amrclaw_doxygen.doctree and b/v5.7.x/.doctrees/amrclaw_doxygen.doctree differ diff --git a/v5.7.x/.doctrees/amrclaw_flowcharts.doctree b/v5.7.x/.doctrees/amrclaw_flowcharts.doctree index b84375c629..56277273d5 100644 Binary files a/v5.7.x/.doctrees/amrclaw_flowcharts.doctree and b/v5.7.x/.doctrees/amrclaw_flowcharts.doctree differ diff --git a/v5.7.x/.doctrees/application_documentation.doctree b/v5.7.x/.doctrees/application_documentation.doctree index 5d56d0dc7b..cfc25b300a 100644 Binary files a/v5.7.x/.doctrees/application_documentation.doctree and b/v5.7.x/.doctrees/application_documentation.doctree differ diff --git a/v5.7.x/.doctrees/apps.doctree b/v5.7.x/.doctrees/apps.doctree index 31e72bb0e1..4b5ee9fad1 100644 Binary files a/v5.7.x/.doctrees/apps.doctree and b/v5.7.x/.doctrees/apps.doctree differ diff --git a/v5.7.x/.doctrees/aws.doctree b/v5.7.x/.doctrees/aws.doctree index 8289e10947..bf5a13cd25 100644 Binary files a/v5.7.x/.doctrees/aws.doctree and b/v5.7.x/.doctrees/aws.doctree differ diff --git a/v5.7.x/.doctrees/b4run.doctree b/v5.7.x/.doctrees/b4run.doctree index b44c77ed70..37f37b4fbb 100644 Binary files a/v5.7.x/.doctrees/b4run.doctree and b/v5.7.x/.doctrees/b4run.doctree differ diff --git a/v5.7.x/.doctrees/b4step_defaults.doctree b/v5.7.x/.doctrees/b4step_defaults.doctree index 0e6930565f..795fd7743e 100644 Binary files a/v5.7.x/.doctrees/b4step_defaults.doctree and b/v5.7.x/.doctrees/b4step_defaults.doctree differ diff --git a/v5.7.x/.doctrees/bc.doctree b/v5.7.x/.doctrees/bc.doctree index 925eaf98c2..e3f2cb105f 100644 Binary files a/v5.7.x/.doctrees/bc.doctree and b/v5.7.x/.doctrees/bc.doctree differ diff --git a/v5.7.x/.doctrees/biblio.doctree b/v5.7.x/.doctrees/biblio.doctree index 081ce981c4..b7f3ccb7b4 100644 Binary files a/v5.7.x/.doctrees/biblio.doctree and b/v5.7.x/.doctrees/biblio.doctree differ diff --git a/v5.7.x/.doctrees/changes_to_master.doctree b/v5.7.x/.doctrees/changes_to_master.doctree index 8490188d98..bb0d230e00 100644 Binary files a/v5.7.x/.doctrees/changes_to_master.doctree and b/v5.7.x/.doctrees/changes_to_master.doctree differ diff --git a/v5.7.x/.doctrees/claw43to46.doctree b/v5.7.x/.doctrees/claw43to46.doctree index 656c943096..fa83b8b269 100644 Binary files a/v5.7.x/.doctrees/claw43to46.doctree and b/v5.7.x/.doctrees/claw43to46.doctree differ diff --git a/v5.7.x/.doctrees/claw46to50.doctree b/v5.7.x/.doctrees/claw46to50.doctree index 503d78aed7..d02b10014e 100644 Binary files a/v5.7.x/.doctrees/claw46to50.doctree and b/v5.7.x/.doctrees/claw46to50.doctree differ diff --git a/v5.7.x/.doctrees/claw4x.doctree b/v5.7.x/.doctrees/claw4x.doctree index 4590177d0b..660edc847a 100644 Binary files a/v5.7.x/.doctrees/claw4x.doctree and b/v5.7.x/.doctrees/claw4x.doctree differ diff --git a/v5.7.x/.doctrees/clawpack5.doctree b/v5.7.x/.doctrees/clawpack5.doctree index d4ca841032..edf0c94e83 100644 Binary files a/v5.7.x/.doctrees/clawpack5.doctree and b/v5.7.x/.doctrees/clawpack5.doctree differ diff --git a/v5.7.x/.doctrees/clawpack_components.doctree b/v5.7.x/.doctrees/clawpack_components.doctree index d68647700f..b4040afc59 100644 Binary files a/v5.7.x/.doctrees/clawpack_components.doctree and b/v5.7.x/.doctrees/clawpack_components.doctree differ diff --git a/v5.7.x/.doctrees/community.doctree b/v5.7.x/.doctrees/community.doctree index de7e37fe66..eefe64e6e0 100644 Binary files a/v5.7.x/.doctrees/community.doctree and b/v5.7.x/.doctrees/community.doctree differ diff --git a/v5.7.x/.doctrees/contents.doctree b/v5.7.x/.doctrees/contents.doctree index 2ab34ccc0e..e5b34fe1ff 100644 Binary files a/v5.7.x/.doctrees/contents.doctree and b/v5.7.x/.doctrees/contents.doctree differ diff --git a/v5.7.x/.doctrees/contribute_apps.doctree b/v5.7.x/.doctrees/contribute_apps.doctree index 0a1be6c007..3e281aee82 100644 Binary files a/v5.7.x/.doctrees/contribute_apps.doctree and b/v5.7.x/.doctrees/contribute_apps.doctree differ diff --git a/v5.7.x/.doctrees/current_data.doctree b/v5.7.x/.doctrees/current_data.doctree index 572e969d61..a79df58ce4 100644 Binary files a/v5.7.x/.doctrees/current_data.doctree and b/v5.7.x/.doctrees/current_data.doctree differ diff --git a/v5.7.x/.doctrees/developers.doctree b/v5.7.x/.doctrees/developers.doctree index 0fd660c661..2e1101b306 100644 Binary files a/v5.7.x/.doctrees/developers.doctree and b/v5.7.x/.doctrees/developers.doctree differ diff --git a/v5.7.x/.doctrees/docker_image.doctree b/v5.7.x/.doctrees/docker_image.doctree index eca32d055d..01a038acd3 100644 Binary files a/v5.7.x/.doctrees/docker_image.doctree and b/v5.7.x/.doctrees/docker_image.doctree differ diff --git a/v5.7.x/.doctrees/dtopotools_module.doctree b/v5.7.x/.doctrees/dtopotools_module.doctree index 5b2289a094..3051e9a0a5 100644 Binary files a/v5.7.x/.doctrees/dtopotools_module.doctree and b/v5.7.x/.doctrees/dtopotools_module.doctree differ diff --git a/v5.7.x/.doctrees/environment.pickle b/v5.7.x/.doctrees/environment.pickle index 1b43102458..3e8f5b6dc5 100644 Binary files a/v5.7.x/.doctrees/environment.pickle and b/v5.7.x/.doctrees/environment.pickle differ diff --git a/v5.7.x/.doctrees/f77_vs_f90.doctree b/v5.7.x/.doctrees/f77_vs_f90.doctree index a95fe65f4c..f3743a8e22 100644 Binary files a/v5.7.x/.doctrees/f77_vs_f90.doctree and b/v5.7.x/.doctrees/f77_vs_f90.doctree differ diff --git a/v5.7.x/.doctrees/fgmax.doctree b/v5.7.x/.doctrees/fgmax.doctree index 31d1da394e..f37430e689 100644 Binary files a/v5.7.x/.doctrees/fgmax.doctree and b/v5.7.x/.doctrees/fgmax.doctree differ diff --git a/v5.7.x/.doctrees/fgmax_tools_module.doctree b/v5.7.x/.doctrees/fgmax_tools_module.doctree index 3ac938a0c1..dbed3622aa 100644 Binary files a/v5.7.x/.doctrees/fgmax_tools_module.doctree and b/v5.7.x/.doctrees/fgmax_tools_module.doctree differ diff --git a/v5.7.x/.doctrees/fgout.doctree b/v5.7.x/.doctrees/fgout.doctree index 76329513bb..acba666b9e 100644 Binary files a/v5.7.x/.doctrees/fgout.doctree and b/v5.7.x/.doctrees/fgout.doctree differ diff --git a/v5.7.x/.doctrees/first_run.doctree b/v5.7.x/.doctrees/first_run.doctree index d914e00e30..66a2ca3c49 100644 Binary files a/v5.7.x/.doctrees/first_run.doctree and b/v5.7.x/.doctrees/first_run.doctree differ diff --git a/v5.7.x/.doctrees/first_run_fortran.doctree b/v5.7.x/.doctrees/first_run_fortran.doctree index 60e24bdb35..7dec50f4b5 100644 Binary files a/v5.7.x/.doctrees/first_run_fortran.doctree and b/v5.7.x/.doctrees/first_run_fortran.doctree differ diff --git a/v5.7.x/.doctrees/first_run_pyclaw.doctree b/v5.7.x/.doctrees/first_run_pyclaw.doctree index 793c42eb91..40c4510a9f 100644 Binary files a/v5.7.x/.doctrees/first_run_pyclaw.doctree and b/v5.7.x/.doctrees/first_run_pyclaw.doctree differ diff --git a/v5.7.x/.doctrees/flagregions.doctree b/v5.7.x/.doctrees/flagregions.doctree index 23e0c81ead..13e6fd4c35 100644 Binary files a/v5.7.x/.doctrees/flagregions.doctree and b/v5.7.x/.doctrees/flagregions.doctree differ diff --git a/v5.7.x/.doctrees/force_dry.doctree b/v5.7.x/.doctrees/force_dry.doctree index f82fbdd707..38c4b5c2ac 100644 Binary files a/v5.7.x/.doctrees/force_dry.doctree and b/v5.7.x/.doctrees/force_dry.doctree differ diff --git a/v5.7.x/.doctrees/fortran.doctree b/v5.7.x/.doctrees/fortran.doctree index cca1e55b1f..43030ecdd2 100644 Binary files a/v5.7.x/.doctrees/fortran.doctree and b/v5.7.x/.doctrees/fortran.doctree differ diff --git a/v5.7.x/.doctrees/fortran_compilers.doctree b/v5.7.x/.doctrees/fortran_compilers.doctree index 8c4f897259..c3e75126e8 100644 Binary files a/v5.7.x/.doctrees/fortran_compilers.doctree and b/v5.7.x/.doctrees/fortran_compilers.doctree differ diff --git a/v5.7.x/.doctrees/fvmbook.doctree b/v5.7.x/.doctrees/fvmbook.doctree index 2a401bd0fe..b047e63cd2 100644 Binary files a/v5.7.x/.doctrees/fvmbook.doctree and b/v5.7.x/.doctrees/fvmbook.doctree differ diff --git a/v5.7.x/.doctrees/galleries.doctree b/v5.7.x/.doctrees/galleries.doctree index 7c22bb3d9f..2a39c9d8de 100644 Binary files a/v5.7.x/.doctrees/galleries.doctree and b/v5.7.x/.doctrees/galleries.doctree differ diff --git a/v5.7.x/.doctrees/gauges.doctree b/v5.7.x/.doctrees/gauges.doctree index 6fb094e747..030d81c7c1 100644 Binary files a/v5.7.x/.doctrees/gauges.doctree and b/v5.7.x/.doctrees/gauges.doctree differ diff --git a/v5.7.x/.doctrees/geoclaw.doctree b/v5.7.x/.doctrees/geoclaw.doctree index 4b36adff50..3d49c0cc09 100644 Binary files a/v5.7.x/.doctrees/geoclaw.doctree and b/v5.7.x/.doctrees/geoclaw.doctree differ diff --git a/v5.7.x/.doctrees/geoclaw_started.doctree b/v5.7.x/.doctrees/geoclaw_started.doctree index 4a2a1c3275..48cd2642bd 100644 Binary files a/v5.7.x/.doctrees/geoclaw_started.doctree and b/v5.7.x/.doctrees/geoclaw_started.doctree differ diff --git a/v5.7.x/.doctrees/geoclaw_util_module.doctree b/v5.7.x/.doctrees/geoclaw_util_module.doctree index ede955b97f..c6ea441194 100644 Binary files a/v5.7.x/.doctrees/geoclaw_util_module.doctree and b/v5.7.x/.doctrees/geoclaw_util_module.doctree differ diff --git a/v5.7.x/.doctrees/geohints.doctree b/v5.7.x/.doctrees/geohints.doctree index ce2979f7c9..52ed0cca7b 100644 Binary files a/v5.7.x/.doctrees/geohints.doctree and b/v5.7.x/.doctrees/geohints.doctree differ diff --git a/v5.7.x/.doctrees/geoplot.doctree b/v5.7.x/.doctrees/geoplot.doctree index abd6997624..4dc38c9e19 100644 Binary files a/v5.7.x/.doctrees/geoplot.doctree and b/v5.7.x/.doctrees/geoplot.doctree differ diff --git a/v5.7.x/.doctrees/git_versions.doctree b/v5.7.x/.doctrees/git_versions.doctree index 54a5c9f00a..028e0cd1f5 100644 Binary files a/v5.7.x/.doctrees/git_versions.doctree and b/v5.7.x/.doctrees/git_versions.doctree differ diff --git a/v5.7.x/.doctrees/googleearth_plotting.doctree b/v5.7.x/.doctrees/googleearth_plotting.doctree index 02e7f2a9aa..485397b66c 100644 Binary files a/v5.7.x/.doctrees/googleearth_plotting.doctree and b/v5.7.x/.doctrees/googleearth_plotting.doctree differ diff --git a/v5.7.x/.doctrees/gpu.doctree b/v5.7.x/.doctrees/gpu.doctree index 0002bbb867..829fd43f2e 100644 Binary files a/v5.7.x/.doctrees/gpu.doctree and b/v5.7.x/.doctrees/gpu.doctree differ diff --git a/v5.7.x/.doctrees/grid_registration.doctree b/v5.7.x/.doctrees/grid_registration.doctree index 67ec18c80f..437ccc5e34 100644 Binary files a/v5.7.x/.doctrees/grid_registration.doctree and b/v5.7.x/.doctrees/grid_registration.doctree differ diff --git a/v5.7.x/.doctrees/howto_doc.doctree b/v5.7.x/.doctrees/howto_doc.doctree index 8cce889dd7..2c338558fe 100644 Binary files a/v5.7.x/.doctrees/howto_doc.doctree and b/v5.7.x/.doctrees/howto_doc.doctree differ diff --git a/v5.7.x/.doctrees/howto_release.doctree b/v5.7.x/.doctrees/howto_release.doctree index 2873eff1db..d69ab35593 100644 Binary files a/v5.7.x/.doctrees/howto_release.doctree and b/v5.7.x/.doctrees/howto_release.doctree differ diff --git a/v5.7.x/.doctrees/installing.doctree b/v5.7.x/.doctrees/installing.doctree index 3a7dc58d6e..4597aa30ca 100644 Binary files a/v5.7.x/.doctrees/installing.doctree and b/v5.7.x/.doctrees/installing.doctree differ diff --git a/v5.7.x/.doctrees/installing_more_options.doctree b/v5.7.x/.doctrees/installing_more_options.doctree index 02c02974e1..a7a7dc055f 100644 Binary files a/v5.7.x/.doctrees/installing_more_options.doctree and b/v5.7.x/.doctrees/installing_more_options.doctree differ diff --git a/v5.7.x/.doctrees/installing_pip.doctree b/v5.7.x/.doctrees/installing_pip.doctree index c4751343f9..66c4825464 100644 Binary files a/v5.7.x/.doctrees/installing_pip.doctree and b/v5.7.x/.doctrees/installing_pip.doctree differ diff --git a/v5.7.x/.doctrees/kmltools_module.doctree b/v5.7.x/.doctrees/kmltools_module.doctree index ba4aa5ca44..48fd3063ab 100644 Binary files a/v5.7.x/.doctrees/kmltools_module.doctree and b/v5.7.x/.doctrees/kmltools_module.doctree differ diff --git a/v5.7.x/.doctrees/lagrangian_gauges.doctree b/v5.7.x/.doctrees/lagrangian_gauges.doctree index 99e9693386..f3ff73afa3 100644 Binary files a/v5.7.x/.doctrees/lagrangian_gauges.doctree and b/v5.7.x/.doctrees/lagrangian_gauges.doctree differ diff --git a/v5.7.x/.doctrees/license.doctree b/v5.7.x/.doctrees/license.doctree index 1a9c081178..5e8839230b 100644 Binary files a/v5.7.x/.doctrees/license.doctree and b/v5.7.x/.doctrees/license.doctree differ diff --git a/v5.7.x/.doctrees/makefiles.doctree b/v5.7.x/.doctrees/makefiles.doctree index 36d72d4d26..04f6362c6a 100644 Binary files a/v5.7.x/.doctrees/makefiles.doctree and b/v5.7.x/.doctrees/makefiles.doctree differ diff --git a/v5.7.x/.doctrees/makefiles_library.doctree b/v5.7.x/.doctrees/makefiles_library.doctree index 536477c57f..08c5bdf2b3 100644 Binary files a/v5.7.x/.doctrees/makefiles_library.doctree and b/v5.7.x/.doctrees/makefiles_library.doctree differ diff --git a/v5.7.x/.doctrees/manning.doctree b/v5.7.x/.doctrees/manning.doctree index 2751c415fb..30c33a5671 100644 Binary files a/v5.7.x/.doctrees/manning.doctree and b/v5.7.x/.doctrees/manning.doctree differ diff --git a/v5.7.x/.doctrees/mapc2p.doctree b/v5.7.x/.doctrees/mapc2p.doctree index ebb3b8cfcf..75da36d491 100644 Binary files a/v5.7.x/.doctrees/mapc2p.doctree and b/v5.7.x/.doctrees/mapc2p.doctree differ diff --git a/v5.7.x/.doctrees/marching_front.doctree b/v5.7.x/.doctrees/marching_front.doctree index bcc68de8bf..c7109a99af 100644 Binary files a/v5.7.x/.doctrees/marching_front.doctree and b/v5.7.x/.doctrees/marching_front.doctree differ diff --git a/v5.7.x/.doctrees/matlab_plotting.doctree b/v5.7.x/.doctrees/matlab_plotting.doctree index 0ff6d7184a..9f59c2aa3a 100644 Binary files a/v5.7.x/.doctrees/matlab_plotting.doctree and b/v5.7.x/.doctrees/matlab_plotting.doctree differ diff --git a/v5.7.x/.doctrees/netcdf.doctree b/v5.7.x/.doctrees/netcdf.doctree index 2dd336323e..fadfe7d4a0 100644 Binary files a/v5.7.x/.doctrees/netcdf.doctree and b/v5.7.x/.doctrees/netcdf.doctree differ diff --git a/v5.7.x/.doctrees/newapp.doctree b/v5.7.x/.doctrees/newapp.doctree index 7c4bd15e2c..6c7efcef14 100644 Binary files a/v5.7.x/.doctrees/newapp.doctree and b/v5.7.x/.doctrees/newapp.doctree differ diff --git a/v5.7.x/.doctrees/okada.doctree b/v5.7.x/.doctrees/okada.doctree index 4c2a7a2081..0ad3a94b3f 100644 Binary files a/v5.7.x/.doctrees/okada.doctree and b/v5.7.x/.doctrees/okada.doctree differ diff --git a/v5.7.x/.doctrees/openmp.doctree b/v5.7.x/.doctrees/openmp.doctree index f910fccf37..36df560f7b 100644 Binary files a/v5.7.x/.doctrees/openmp.doctree and b/v5.7.x/.doctrees/openmp.doctree differ diff --git a/v5.7.x/.doctrees/output_styles.doctree b/v5.7.x/.doctrees/output_styles.doctree index 01ea409a27..70b293f18f 100644 Binary files a/v5.7.x/.doctrees/output_styles.doctree and b/v5.7.x/.doctrees/output_styles.doctree differ diff --git a/v5.7.x/.doctrees/packages.doctree b/v5.7.x/.doctrees/packages.doctree index d601e0b8bb..194b964c7b 100644 Binary files a/v5.7.x/.doctrees/packages.doctree and b/v5.7.x/.doctrees/packages.doctree differ diff --git a/v5.7.x/.doctrees/photos.doctree b/v5.7.x/.doctrees/photos.doctree index e6e7236b41..47e96d688d 100644 Binary files a/v5.7.x/.doctrees/photos.doctree and b/v5.7.x/.doctrees/photos.doctree differ diff --git a/v5.7.x/.doctrees/plotexamples.doctree b/v5.7.x/.doctrees/plotexamples.doctree index 872aec1dff..8d6c1339fb 100644 Binary files a/v5.7.x/.doctrees/plotexamples.doctree and b/v5.7.x/.doctrees/plotexamples.doctree differ diff --git a/v5.7.x/.doctrees/plotting.doctree b/v5.7.x/.doctrees/plotting.doctree index 26eda257bc..329609b16e 100644 Binary files a/v5.7.x/.doctrees/plotting.doctree and b/v5.7.x/.doctrees/plotting.doctree differ diff --git a/v5.7.x/.doctrees/plotting_faq.doctree b/v5.7.x/.doctrees/plotting_faq.doctree index fe285661a7..8a8727845b 100644 Binary files a/v5.7.x/.doctrees/plotting_faq.doctree and b/v5.7.x/.doctrees/plotting_faq.doctree differ diff --git a/v5.7.x/.doctrees/plotting_geoclaw.doctree b/v5.7.x/.doctrees/plotting_geoclaw.doctree index 2b69efe4a6..52640ec042 100644 Binary files a/v5.7.x/.doctrees/plotting_geoclaw.doctree and b/v5.7.x/.doctrees/plotting_geoclaw.doctree differ diff --git a/v5.7.x/.doctrees/plotting_python.doctree b/v5.7.x/.doctrees/plotting_python.doctree index e7c8ea2809..11e6e97e6f 100644 Binary files a/v5.7.x/.doctrees/plotting_python.doctree and b/v5.7.x/.doctrees/plotting_python.doctree differ diff --git a/v5.7.x/.doctrees/prereqs.doctree b/v5.7.x/.doctrees/prereqs.doctree index 1c1c3018e8..2d68bec328 100644 Binary files a/v5.7.x/.doctrees/prereqs.doctree and b/v5.7.x/.doctrees/prereqs.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/about.doctree b/v5.7.x/.doctrees/pyclaw/about.doctree index 093d0d6b31..ccdd330393 100644 Binary files a/v5.7.x/.doctrees/pyclaw/about.doctree and b/v5.7.x/.doctrees/pyclaw/about.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/basics.doctree b/v5.7.x/.doctrees/pyclaw/basics.doctree index 43bc7c36ec..ff2f16b0f7 100644 Binary files a/v5.7.x/.doctrees/pyclaw/basics.doctree and b/v5.7.x/.doctrees/pyclaw/basics.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/classes.doctree b/v5.7.x/.doctrees/pyclaw/classes.doctree index 50d9f056d2..ca49cfacbd 100644 Binary files a/v5.7.x/.doctrees/pyclaw/classes.doctree and b/v5.7.x/.doctrees/pyclaw/classes.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/clawpack_and_pyclaw.doctree b/v5.7.x/.doctrees/pyclaw/clawpack_and_pyclaw.doctree index 18ab455110..34d376de91 100644 Binary files a/v5.7.x/.doctrees/pyclaw/clawpack_and_pyclaw.doctree and b/v5.7.x/.doctrees/pyclaw/clawpack_and_pyclaw.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/cloud.doctree b/v5.7.x/.doctrees/pyclaw/cloud.doctree index 170ea8da9c..dd66157147 100644 Binary files a/v5.7.x/.doctrees/pyclaw/cloud.doctree and b/v5.7.x/.doctrees/pyclaw/cloud.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/controller.doctree b/v5.7.x/.doctrees/pyclaw/controller.doctree index 9850661da3..ce5c659af9 100644 Binary files a/v5.7.x/.doctrees/pyclaw/controller.doctree and b/v5.7.x/.doctrees/pyclaw/controller.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/evolve/limiters.doctree b/v5.7.x/.doctrees/pyclaw/evolve/limiters.doctree index 261f10e9df..247378a956 100644 Binary files a/v5.7.x/.doctrees/pyclaw/evolve/limiters.doctree and b/v5.7.x/.doctrees/pyclaw/evolve/limiters.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/examples.doctree b/v5.7.x/.doctrees/pyclaw/examples.doctree index 4a7423c20b..7fafda7926 100644 Binary files a/v5.7.x/.doctrees/pyclaw/examples.doctree and b/v5.7.x/.doctrees/pyclaw/examples.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/geometry.doctree b/v5.7.x/.doctrees/pyclaw/geometry.doctree index 71431012d8..b497f3ed7c 100644 Binary files a/v5.7.x/.doctrees/pyclaw/geometry.doctree and b/v5.7.x/.doctrees/pyclaw/geometry.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/going_further.doctree b/v5.7.x/.doctrees/pyclaw/going_further.doctree index 3fd31f2306..1d47e79c4f 100644 Binary files a/v5.7.x/.doctrees/pyclaw/going_further.doctree and b/v5.7.x/.doctrees/pyclaw/going_further.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/index.doctree b/v5.7.x/.doctrees/pyclaw/index.doctree index d2dcd4e99e..3ad8fd5fe1 100644 Binary files a/v5.7.x/.doctrees/pyclaw/index.doctree and b/v5.7.x/.doctrees/pyclaw/index.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/io.doctree b/v5.7.x/.doctrees/pyclaw/io.doctree index 1dd2142eae..b55a1d1f67 100644 Binary files a/v5.7.x/.doctrees/pyclaw/io.doctree and b/v5.7.x/.doctrees/pyclaw/io.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/output.doctree b/v5.7.x/.doctrees/pyclaw/output.doctree index 6c2d441672..a26586ba6d 100644 Binary files a/v5.7.x/.doctrees/pyclaw/output.doctree and b/v5.7.x/.doctrees/pyclaw/output.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/parallel.doctree b/v5.7.x/.doctrees/pyclaw/parallel.doctree index cdff2b1662..8d704abca6 100644 Binary files a/v5.7.x/.doctrees/pyclaw/parallel.doctree and b/v5.7.x/.doctrees/pyclaw/parallel.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/plotting.doctree b/v5.7.x/.doctrees/pyclaw/plotting.doctree index 197169e310..70cea644d4 100644 Binary files a/v5.7.x/.doctrees/pyclaw/plotting.doctree and b/v5.7.x/.doctrees/pyclaw/plotting.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/problem.doctree b/v5.7.x/.doctrees/pyclaw/problem.doctree index 422517fcc1..40d457839a 100644 Binary files a/v5.7.x/.doctrees/pyclaw/problem.doctree and b/v5.7.x/.doctrees/pyclaw/problem.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/rp.doctree b/v5.7.x/.doctrees/pyclaw/rp.doctree index 9530f53678..98f1e0209c 100644 Binary files a/v5.7.x/.doctrees/pyclaw/rp.doctree and b/v5.7.x/.doctrees/pyclaw/rp.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/solution.doctree b/v5.7.x/.doctrees/pyclaw/solution.doctree index 6f5d512b44..4f6099fe59 100644 Binary files a/v5.7.x/.doctrees/pyclaw/solution.doctree and b/v5.7.x/.doctrees/pyclaw/solution.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/solvers.doctree b/v5.7.x/.doctrees/pyclaw/solvers.doctree index fab78a25c6..ea7d377d21 100644 Binary files a/v5.7.x/.doctrees/pyclaw/solvers.doctree and b/v5.7.x/.doctrees/pyclaw/solvers.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/started.doctree b/v5.7.x/.doctrees/pyclaw/started.doctree index bd96e34a9c..cf84af1b51 100644 Binary files a/v5.7.x/.doctrees/pyclaw/started.doctree and b/v5.7.x/.doctrees/pyclaw/started.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/state.doctree b/v5.7.x/.doctrees/pyclaw/state.doctree index a1234b92f7..6962abdd84 100644 Binary files a/v5.7.x/.doctrees/pyclaw/state.doctree and b/v5.7.x/.doctrees/pyclaw/state.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/troubleshooting.doctree b/v5.7.x/.doctrees/pyclaw/troubleshooting.doctree index 209a2803cb..f1070802a9 100644 Binary files a/v5.7.x/.doctrees/pyclaw/troubleshooting.doctree and b/v5.7.x/.doctrees/pyclaw/troubleshooting.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/tutorial.doctree b/v5.7.x/.doctrees/pyclaw/tutorial.doctree index 2f83552847..42ee3fa4c0 100644 Binary files a/v5.7.x/.doctrees/pyclaw/tutorial.doctree and b/v5.7.x/.doctrees/pyclaw/tutorial.doctree differ diff --git a/v5.7.x/.doctrees/pyclaw/util.doctree b/v5.7.x/.doctrees/pyclaw/util.doctree index cfc9265467..fe4b2bc7a5 100644 Binary files a/v5.7.x/.doctrees/pyclaw/util.doctree and b/v5.7.x/.doctrees/pyclaw/util.doctree differ diff --git a/v5.7.x/.doctrees/python.doctree b/v5.7.x/.doctrees/python.doctree index 3defdaf47f..49268d9354 100644 Binary files a/v5.7.x/.doctrees/python.doctree and b/v5.7.x/.doctrees/python.doctree differ diff --git a/v5.7.x/.doctrees/python_path.doctree b/v5.7.x/.doctrees/python_path.doctree index 66e262dbe7..c6fdf509fe 100644 Binary files a/v5.7.x/.doctrees/python_path.doctree and b/v5.7.x/.doctrees/python_path.doctree differ diff --git a/v5.7.x/.doctrees/qinit_defaults.doctree b/v5.7.x/.doctrees/qinit_defaults.doctree index d833133ed5..b011cb2d01 100644 Binary files a/v5.7.x/.doctrees/qinit_defaults.doctree and b/v5.7.x/.doctrees/qinit_defaults.doctree differ diff --git a/v5.7.x/.doctrees/quick_surge.doctree b/v5.7.x/.doctrees/quick_surge.doctree index 802ad5099d..ba227daec8 100644 Binary files a/v5.7.x/.doctrees/quick_surge.doctree and b/v5.7.x/.doctrees/quick_surge.doctree differ diff --git a/v5.7.x/.doctrees/quick_tsunami.doctree b/v5.7.x/.doctrees/quick_tsunami.doctree index 80d13b8f7a..7714bc6447 100644 Binary files a/v5.7.x/.doctrees/quick_tsunami.doctree and b/v5.7.x/.doctrees/quick_tsunami.doctree differ diff --git a/v5.7.x/.doctrees/refinement.doctree b/v5.7.x/.doctrees/refinement.doctree index 2c89d54b29..2cef771a1f 100644 Binary files a/v5.7.x/.doctrees/refinement.doctree and b/v5.7.x/.doctrees/refinement.doctree differ diff --git a/v5.7.x/.doctrees/regression.doctree b/v5.7.x/.doctrees/regression.doctree index 65d450e1fa..f45d8c1652 100644 Binary files a/v5.7.x/.doctrees/regression.doctree and b/v5.7.x/.doctrees/regression.doctree differ diff --git a/v5.7.x/.doctrees/release_5_0_0.doctree b/v5.7.x/.doctrees/release_5_0_0.doctree index f22196875e..337fa8d99f 100644 Binary files a/v5.7.x/.doctrees/release_5_0_0.doctree and b/v5.7.x/.doctrees/release_5_0_0.doctree differ diff --git a/v5.7.x/.doctrees/release_5_1_0.doctree b/v5.7.x/.doctrees/release_5_1_0.doctree index fe0cf3e801..d02a61f815 100644 Binary files a/v5.7.x/.doctrees/release_5_1_0.doctree and b/v5.7.x/.doctrees/release_5_1_0.doctree differ diff --git a/v5.7.x/.doctrees/release_5_2_0.doctree b/v5.7.x/.doctrees/release_5_2_0.doctree index 51d7cb7629..431664aa1e 100644 Binary files a/v5.7.x/.doctrees/release_5_2_0.doctree and b/v5.7.x/.doctrees/release_5_2_0.doctree differ diff --git a/v5.7.x/.doctrees/release_5_2_1.doctree b/v5.7.x/.doctrees/release_5_2_1.doctree index dabc608976..bf99c6e877 100644 Binary files a/v5.7.x/.doctrees/release_5_2_1.doctree and b/v5.7.x/.doctrees/release_5_2_1.doctree differ diff --git a/v5.7.x/.doctrees/release_5_2_2.doctree b/v5.7.x/.doctrees/release_5_2_2.doctree index e39cab07f1..9d1852768d 100644 Binary files a/v5.7.x/.doctrees/release_5_2_2.doctree and b/v5.7.x/.doctrees/release_5_2_2.doctree differ diff --git a/v5.7.x/.doctrees/release_5_3_0.doctree b/v5.7.x/.doctrees/release_5_3_0.doctree index 3c2766af70..1c749b1117 100644 Binary files a/v5.7.x/.doctrees/release_5_3_0.doctree and b/v5.7.x/.doctrees/release_5_3_0.doctree differ diff --git a/v5.7.x/.doctrees/release_5_3_1.doctree b/v5.7.x/.doctrees/release_5_3_1.doctree index 9199b0134a..61f4af1554 100644 Binary files a/v5.7.x/.doctrees/release_5_3_1.doctree and b/v5.7.x/.doctrees/release_5_3_1.doctree differ diff --git a/v5.7.x/.doctrees/release_5_4_0.doctree b/v5.7.x/.doctrees/release_5_4_0.doctree index 0b0999faa8..f511c7f689 100644 Binary files a/v5.7.x/.doctrees/release_5_4_0.doctree and b/v5.7.x/.doctrees/release_5_4_0.doctree differ diff --git a/v5.7.x/.doctrees/release_5_4_1.doctree b/v5.7.x/.doctrees/release_5_4_1.doctree index 1aa7634ad8..57cc9ca56f 100644 Binary files a/v5.7.x/.doctrees/release_5_4_1.doctree and b/v5.7.x/.doctrees/release_5_4_1.doctree differ diff --git a/v5.7.x/.doctrees/release_5_5_0.doctree b/v5.7.x/.doctrees/release_5_5_0.doctree index 01140a6237..0a6bfe9b43 100644 Binary files a/v5.7.x/.doctrees/release_5_5_0.doctree and b/v5.7.x/.doctrees/release_5_5_0.doctree differ diff --git a/v5.7.x/.doctrees/release_5_6_0.doctree b/v5.7.x/.doctrees/release_5_6_0.doctree index d25c3a8375..332519f927 100644 Binary files a/v5.7.x/.doctrees/release_5_6_0.doctree and b/v5.7.x/.doctrees/release_5_6_0.doctree differ diff --git a/v5.7.x/.doctrees/release_5_6_1.doctree b/v5.7.x/.doctrees/release_5_6_1.doctree index 8929a2a9bc..4e0ec0c0b4 100644 Binary files a/v5.7.x/.doctrees/release_5_6_1.doctree and b/v5.7.x/.doctrees/release_5_6_1.doctree differ diff --git a/v5.7.x/.doctrees/release_5_7_0.doctree b/v5.7.x/.doctrees/release_5_7_0.doctree index eb9158929f..db41ea2dfd 100644 Binary files a/v5.7.x/.doctrees/release_5_7_0.doctree and b/v5.7.x/.doctrees/release_5_7_0.doctree differ diff --git a/v5.7.x/.doctrees/release_5_7_1.doctree b/v5.7.x/.doctrees/release_5_7_1.doctree index e5cf047b85..453939b398 100644 Binary files a/v5.7.x/.doctrees/release_5_7_1.doctree and b/v5.7.x/.doctrees/release_5_7_1.doctree differ diff --git a/v5.7.x/.doctrees/releases.doctree b/v5.7.x/.doctrees/releases.doctree index bdb93325a9..313e2a4591 100644 Binary files a/v5.7.x/.doctrees/releases.doctree and b/v5.7.x/.doctrees/releases.doctree differ diff --git a/v5.7.x/.doctrees/restart.doctree b/v5.7.x/.doctrees/restart.doctree index 3d4bf600ac..86bc674632 100644 Binary files a/v5.7.x/.doctrees/restart.doctree and b/v5.7.x/.doctrees/restart.doctree differ diff --git a/v5.7.x/.doctrees/riemann.doctree b/v5.7.x/.doctrees/riemann.doctree index 1c3c8a9a0e..7ef5704053 100644 Binary files a/v5.7.x/.doctrees/riemann.doctree and b/v5.7.x/.doctrees/riemann.doctree differ diff --git a/v5.7.x/.doctrees/riemann/Shallow_water_Riemann_solvers.doctree b/v5.7.x/.doctrees/riemann/Shallow_water_Riemann_solvers.doctree index e2b73545b6..87dbf0fc56 100644 Binary files a/v5.7.x/.doctrees/riemann/Shallow_water_Riemann_solvers.doctree and b/v5.7.x/.doctrees/riemann/Shallow_water_Riemann_solvers.doctree differ diff --git a/v5.7.x/.doctrees/ruled_rectangles.doctree b/v5.7.x/.doctrees/ruled_rectangles.doctree index 63c4e4b2ff..ab78d3f9ba 100644 Binary files a/v5.7.x/.doctrees/ruled_rectangles.doctree and b/v5.7.x/.doctrees/ruled_rectangles.doctree differ diff --git a/v5.7.x/.doctrees/sealevel.doctree b/v5.7.x/.doctrees/sealevel.doctree index 39de5e6d20..4a830ddbe9 100644 Binary files a/v5.7.x/.doctrees/sealevel.doctree and b/v5.7.x/.doctrees/sealevel.doctree differ diff --git a/v5.7.x/.doctrees/set_eta_init.doctree b/v5.7.x/.doctrees/set_eta_init.doctree index 11bf816bef..790f879534 100644 Binary files a/v5.7.x/.doctrees/set_eta_init.doctree and b/v5.7.x/.doctrees/set_eta_init.doctree differ diff --git a/v5.7.x/.doctrees/setaux_defaults.doctree b/v5.7.x/.doctrees/setaux_defaults.doctree index 7f45d1712c..25d5f631f4 100644 Binary files a/v5.7.x/.doctrees/setaux_defaults.doctree and b/v5.7.x/.doctrees/setaux_defaults.doctree differ diff --git a/v5.7.x/.doctrees/setenv.doctree b/v5.7.x/.doctrees/setenv.doctree index 4556372c48..26dad874e5 100644 Binary files a/v5.7.x/.doctrees/setenv.doctree and b/v5.7.x/.doctrees/setenv.doctree differ diff --git a/v5.7.x/.doctrees/setplot.doctree b/v5.7.x/.doctrees/setplot.doctree index 254459a69e..07e4d76673 100644 Binary files a/v5.7.x/.doctrees/setplot.doctree and b/v5.7.x/.doctrees/setplot.doctree differ diff --git a/v5.7.x/.doctrees/setrun.doctree b/v5.7.x/.doctrees/setrun.doctree index 5c95e2a8d8..820618dae5 100644 Binary files a/v5.7.x/.doctrees/setrun.doctree and b/v5.7.x/.doctrees/setrun.doctree differ diff --git a/v5.7.x/.doctrees/setrun_amrclaw.doctree b/v5.7.x/.doctrees/setrun_amrclaw.doctree index bbb04ac83e..4042e1134a 100644 Binary files a/v5.7.x/.doctrees/setrun_amrclaw.doctree and b/v5.7.x/.doctrees/setrun_amrclaw.doctree differ diff --git a/v5.7.x/.doctrees/setrun_amrclaw_sample.doctree b/v5.7.x/.doctrees/setrun_amrclaw_sample.doctree index 1d735a5000..dd5b59709f 100644 Binary files a/v5.7.x/.doctrees/setrun_amrclaw_sample.doctree and b/v5.7.x/.doctrees/setrun_amrclaw_sample.doctree differ diff --git a/v5.7.x/.doctrees/setrun_geoclaw.doctree b/v5.7.x/.doctrees/setrun_geoclaw.doctree index 633ab14ada..9e1fd8d2ee 100644 Binary files a/v5.7.x/.doctrees/setrun_geoclaw.doctree and b/v5.7.x/.doctrees/setrun_geoclaw.doctree differ diff --git a/v5.7.x/.doctrees/setrun_sample.doctree b/v5.7.x/.doctrees/setrun_sample.doctree index 3c508c319f..8b0130dd98 100644 Binary files a/v5.7.x/.doctrees/setrun_sample.doctree and b/v5.7.x/.doctrees/setrun_sample.doctree differ diff --git a/v5.7.x/.doctrees/sharing.doctree b/v5.7.x/.doctrees/sharing.doctree index 2b6d64821e..8c2e7d98a8 100644 Binary files a/v5.7.x/.doctrees/sharing.doctree and b/v5.7.x/.doctrees/sharing.doctree differ diff --git a/v5.7.x/.doctrees/sphinxdoc.doctree b/v5.7.x/.doctrees/sphinxdoc.doctree index 3b816202f1..16cebe3ace 100644 Binary files a/v5.7.x/.doctrees/sphinxdoc.doctree and b/v5.7.x/.doctrees/sphinxdoc.doctree differ diff --git a/v5.7.x/.doctrees/src1d_defaults.doctree b/v5.7.x/.doctrees/src1d_defaults.doctree index 0da44d9d2e..d4e9fe42b6 100644 Binary files a/v5.7.x/.doctrees/src1d_defaults.doctree and b/v5.7.x/.doctrees/src1d_defaults.doctree differ diff --git a/v5.7.x/.doctrees/src_defaults.doctree b/v5.7.x/.doctrees/src_defaults.doctree index bed64b08ca..a53de93529 100644 Binary files a/v5.7.x/.doctrees/src_defaults.doctree and b/v5.7.x/.doctrees/src_defaults.doctree differ diff --git a/v5.7.x/.doctrees/storm_module.doctree b/v5.7.x/.doctrees/storm_module.doctree index 50f5ffabf9..29d49ccb87 100644 Binary files a/v5.7.x/.doctrees/storm_module.doctree and b/v5.7.x/.doctrees/storm_module.doctree differ diff --git a/v5.7.x/.doctrees/surgedata.doctree b/v5.7.x/.doctrees/surgedata.doctree index c514efe2b9..0d1066b9f4 100644 Binary files a/v5.7.x/.doctrees/surgedata.doctree and b/v5.7.x/.doctrees/surgedata.doctree differ diff --git a/v5.7.x/.doctrees/testing.doctree b/v5.7.x/.doctrees/testing.doctree index 8fffc259d9..761256b64c 100644 Binary files a/v5.7.x/.doctrees/testing.doctree and b/v5.7.x/.doctrees/testing.doctree differ diff --git a/v5.7.x/.doctrees/timing.doctree b/v5.7.x/.doctrees/timing.doctree index 6f461e5479..2636d233bf 100644 Binary files a/v5.7.x/.doctrees/timing.doctree and b/v5.7.x/.doctrees/timing.doctree differ diff --git a/v5.7.x/.doctrees/topo.doctree b/v5.7.x/.doctrees/topo.doctree index 4a4a91d24a..9f9b2a5088 100644 Binary files a/v5.7.x/.doctrees/topo.doctree and b/v5.7.x/.doctrees/topo.doctree differ diff --git a/v5.7.x/.doctrees/topotools.doctree b/v5.7.x/.doctrees/topotools.doctree index 0cad206512..f8e4705193 100644 Binary files a/v5.7.x/.doctrees/topotools.doctree and b/v5.7.x/.doctrees/topotools.doctree differ diff --git a/v5.7.x/.doctrees/topotools_module.doctree b/v5.7.x/.doctrees/topotools_module.doctree index 6f5b756752..c0463c9dc9 100644 Binary files a/v5.7.x/.doctrees/topotools_module.doctree and b/v5.7.x/.doctrees/topotools_module.doctree differ diff --git a/v5.7.x/.doctrees/trouble.doctree b/v5.7.x/.doctrees/trouble.doctree index 6c14f69bbe..fe17e0a1b8 100644 Binary files a/v5.7.x/.doctrees/trouble.doctree and b/v5.7.x/.doctrees/trouble.doctree differ diff --git a/v5.7.x/.doctrees/tsunamidata.doctree b/v5.7.x/.doctrees/tsunamidata.doctree index 5e31b406ba..56a30afa2f 100644 Binary files a/v5.7.x/.doctrees/tsunamidata.doctree and b/v5.7.x/.doctrees/tsunamidata.doctree differ diff --git a/v5.7.x/.doctrees/user_routines.doctree b/v5.7.x/.doctrees/user_routines.doctree index 337ad07912..da36c33c37 100644 Binary files a/v5.7.x/.doctrees/user_routines.doctree and b/v5.7.x/.doctrees/user_routines.doctree differ diff --git a/v5.7.x/.doctrees/visit_plotting.doctree b/v5.7.x/.doctrees/visit_plotting.doctree index 7aba48ca49..5d1fabce85 100644 Binary files a/v5.7.x/.doctrees/visit_plotting.doctree and b/v5.7.x/.doctrees/visit_plotting.doctree differ diff --git a/v5.7.x/.doctrees/vm.doctree b/v5.7.x/.doctrees/vm.doctree index ccf56294eb..6f59fc8dee 100644 Binary files a/v5.7.x/.doctrees/vm.doctree and b/v5.7.x/.doctrees/vm.doctree differ diff --git a/v5.7.x/.doctrees/wp_algorithms.doctree b/v5.7.x/.doctrees/wp_algorithms.doctree index 50a3cc9108..4d95ac6436 100644 Binary files a/v5.7.x/.doctrees/wp_algorithms.doctree and b/v5.7.x/.doctrees/wp_algorithms.doctree differ diff --git a/v5.7.x/ClawPlotAxes.html b/v5.7.x/ClawPlotAxes.html index b8089532be..a360c14f39 100644 --- a/v5.7.x/ClawPlotAxes.html +++ b/v5.7.x/ClawPlotAxes.html @@ -284,12 +284,13 @@

    Quick search

    Latest Version

    Older Versions

    @@ -297,7 +298,7 @@

    Older Versions