Changeset 2779


Ignore:
Timestamp:
Apr 28, 2006, 2:08:58 PM (18 years ago)
Author:
howard
Message:

Some material on file formats added to Chapter 5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentation/user_manual/anuga_user_manual.tex

    r2751 r2779  
    267267
    268268   \item a list \code{points} of length $N$, where $N = (m + 1)(n + 1)$,
    269 comprising the coordinates $(x, y)$ of each of the $N$ mesh points,
     269comprising the coordinates \code{(x, y)} of each of the $N$ mesh
     270points,
    270271
    271272   \item a list \code{vertices} of length $2mn$ (each entry specifies the three
     
    392393
    393394{\small \begin{verbatim}
    394     h = 0.00 # Constant depth
    395     domain.set_quantity('stage', -.4)
    396 \end{verbatim}}
    397 
    398 That is, the value of \code{stage} is set to $\code{h} = 0.00$ plus the
    399 value of \code{elevation} already defined.
     395    h = 0.05 # Constant depth
     396    domain.set_quantity('stage', expression = 'elevation + %f' %h)
     397\end{verbatim}}
     398
     399That is, the value of \code{stage} is set to $\code{h} = 0.05$ plus
     400the value of \code{elevation} already defined.
    400401
    401402The reader will probably appreciate that this capability to
     
    489490contains stage and momentum information and can be used with the
    490491\code{swollen} visualisation package to generate a visual display.
     492See Section \ref{sec:file formats} (page \pageref{sec:file formats})
     493for more on NetCDF and other file formats.
    491494
    492495
     
    754757function is both more complex and more interesting.
    755758
    756 The function returns the water displacement for all \code{x}
    757 and \code{y} in the domain. The water displacement is a ?? function that depends
    758 on the characteristics of the slump (length, thickness, slope, etc), its
    759 location (origin) and the depth at that location.
     759The function returns the water displacement for all \code{x} and
     760\code{y} in the domain. The water displacement is a double Gaussian
     761function that depends on the characteristics of the slump (length,
     762thickness, slope, etc), its location (origin) and the depth at that
     763location.
    760764
    761765
     
    15121516            northing_min = None,
    15131517            northing_max = None,
    1514             expand_search = False, #To avoid intractable situations (This will be fixed when least_squares gets redesigned)
     1518            expand_search = False,
    15151519            verbose = False,
    15161520            origin = None,
    15171521            datum = 'WGS84',
    1518         format = 'ers'}
     1522            format = 'ers'}
    15191523  Module: \module{pyvolution.data\_manager}
    15201524
     
    15231527
    15241528
    1525   \begin{funcdesc}{dem2pts}{???}
     1529  \begin{funcdesc}{dem2pts}{basename_in, basename_out=None,
     1530            easting_min=None, easting_max=None,
     1531            northing_min=None, northing_max=None,
     1532            use_cache=False, verbose=False}
    15261533  Module: \module{pyvolution.data\_manager}
    15271534
     
    15311538\bigskip
    15321539
    1533 \subsection{Samples}
    1534 
    1535 The following is an excerpt from a CDL representation of the output file \code{bedslope.sww}.
     1540\subsection{SWW and TMS Formats}
     1541
     1542The SWW and TMS formats are both NetCDF formats, and are of key
     1543importance for \anuga.
     1544
     1545The output from \anuga is stored in an SWW file. The contents may be
     1546viewed using the visualisation tool \code{swollen}, which creates an
     1547on-screen geometric representation. See section \ref{sec:swollen}
     1548(page \pageref{sec:swollen}) in Appendix \ref{ch:supporting_tools}
     1549 for more on \code{swollen}.
     1550
     1551Alternatively, there are tools, such as \code{ncdump}, that allow
     1552you to convert an NetCDF file into a readable format such as the
     1553Class Definition Language (CDL). The following is an excerpt from a
     1554CDL representation of the output file \file{bedslope.sww} generated
     1555from running the simple example \filename{bedslopephysical.py}.
    15361556
    15371557\verbatiminput{examples/bedslopeexcerpt.cdl}
     1558
     1559
     1560
     1561\subsection{Meshfile Formats}
     1562
     1563A meshfile is a file of a specific format used for holding data that
     1564specifies a mesh suitable for use with \anuga. A meshfile can have
     1565one of two formats: it can be either a TSH file, which is an ASCII
     1566file, or an MSH file, which is a NetCDF file.
     1567
     1568A meshfile describes the outline of the mesh---the vertices and line
     1569segments that enclose the region in which the mesh is created---and
     1570the triangular mesh itself, which is specified by listing the
     1571triangles and their vertices, and the segments, which are those
     1572sides of the triangles that are associated with boundary conditions.
     1573
     1574In addition, a meshfile may contain `holes' and/or `regions'. A hole
     1575or region is defined by specifying a point and a number of segments
     1576that enclose the point. A hole represents an area where no mesh is
     1577to be created, while a region is a labelled area used for defining
     1578properties of a mesh, such as friction values.
     1579
     1580A meshfile can also contain a georeference, which describes the
     1581offset of the x,y values eg, the offset of the vertices.
     1582
     1583
     1584\subsection{}
    15381585
    15391586
     
    16021649
    16031650\chapter{Supporting Tools}
     1651\label{ch:supporting_tools}
    16041652
    16051653This section describes a number of supporting tools, supplied with \anuga, that offer a
     
    16581706
    16591707\section{swollen}
    1660 The output generated by \anuga may be viewed by means of the visualisation tool \code{swollen},
    1661 which takes the \code{sww} file output by \anuga and creates a visual representation of the data.
    1662 Examples may be seen in Figures \ref{fig:bedslopestart} and \ref{fig:bedslope2}.
    1663 To view an \code{sww} file with \code{swollen} in the
    1664 Windows environment, you can simply drag the icon representing the file over an icon on the desktop
    1665 for the \code{swollen} executable file (or a shortcut to it). Alternatively, you can operate \code{swollen}
    1666 from the command line, in both Windows and Linux environments.
     1708\label{sec:swollen}
     1709 The output generated by \anuga may be viewed by
     1710means of the visualisation tool \code{swollen}, which takes the
     1711\code{sww} file output by \anuga and creates a visual representation
     1712of the data. Examples may be seen in Figures \ref{fig:bedslopestart}
     1713and \ref{fig:bedslope2}. To view an \code{sww} file with
     1714\code{swollen} in the Windows environment, you can simply drag the
     1715icon representing the file over an icon on the desktop for the
     1716\code{swollen} executable file (or a shortcut to it). Alternatively,
     1717you can operate \code{swollen} from the command line, in both
     1718Windows and Linux environments.
    16671719
    16681720On successful operation, you will see an interactive moving-picture display. You can use keys and the mouse
Note: See TracChangeset for help on using the changeset viewer.