Ignore:
Timestamp:
May 5, 2006, 5:03:01 PM (18 years ago)
Author:
howard
Message:

New material on file formats and some other minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentation/user_manual/anuga_user_manual.tex

    r2805 r2809  
    279279\code{`right'}, \code{`top'} and \code{`bottom'}, indicating
    280280which boundary the edge in question belongs to.
     281
     282# TO DO: Clarify the description of vertices to make it clear the
     283entries are *indices* to points. Also good to have an example
    281284
    282285\end{itemize}
     
    847850
    848851\chapter{\anuga Public Interface}
     852\label{ch:interface}
    849853
    850854This chapter gives an overview of the features of \anuga available
     
    909913and are omitted from the descriptions given below:
    910914
    911 \begin{tabular}{|l|l|}  \hline
    912 \textbf{Name } & \textbf{Description}\\
    913 \hline
    914 \code{usecache} & Specifies whether caching is to be used\\
    915 \code{verbose} & If \code{True}, provides detailed terminal output
    916 to the user\\   \hline
     915%\begin{center}
     916\begin{tabular}{ll}  %\hline
     917%\textbf{Name } & \textbf{Description}\\
     918%\hline
     919\emph{usecache} & Specifies whether caching is to be used\\
     920\emph{verbose} & If \code{True}, provides detailed terminal output
     921to the user\\  % \hline
    917922\end{tabular}
    918 
     923%\end{center}
    919924
    920925\section{Mesh Generation}
     
    930935Module: \module{pmesh.mesh\_interface}
    931936
     937This function allows a user to initiate the automatic creation of a
     938mesh inside a specified polygon. Among the parameters that can be
     939set are the \emph{resolution} (maximal area for any triangle in the
     940mesh) and the minimal angle allowable in any triangle. The user can
     941specify a number of internal polygons within each of which a
     942separate mesh is to be created, generally with a smaller resolution.
     943Additionally, the user specifies a list of boundary tags, one for
     944each edge of the bounding polygon.
     945\end{funcdesc}
     946
     947
     948\begin{funcdesc}  {Mesh}{userSegments=None,
     949                 userVertices=None,
     950                 holes=None,
     951                 regions=None,
     952                 geo_reference=None}
     953Module: \module{pmesh.mesh}
    932954
    933955% Translate following into layman's language
    934 This function is used to create a triangular mesh suitable for use with
    935 \anuga, within a specified region. The region is specified as the interior of a polygon
    936 (the \emph{bounding polygon}). The user specifies the bounding polygon and the
    937 \emph{resolution}---that is, maximal area of any triangle in the mesh. There is
    938 also an option to specify a number of internal polygons within each of which a
    939 separate mesh is created, generally with a smaller resolution. Additionally,
    940 the user specifies a list of boundary tags, one for each edge of the bounding
    941 polygon.
    942 \end{funcdesc}
    943 
    944 
    945 \begin{funcdesc}  {Mesh}{}
    946 Module: \module{pmesh.mesh}
    947 
    948 % Translate following into layman's language
    949 This function is used to create a Mesh instance.  This can then be
    950 used to build the outline of the mesh and then generate the
     956An instance of the class \class{Mesh} is used to store .  This can
     957then be used to build the outline of the mesh and then generate the
    951958mesh.
    952959\end{funcdesc}
     
    958965
    959966% Translate following into layman's language
    960 This method is used to add a region to a Mesh instance.  The region is
    961 described by the polygon passed in.  Additionally,
    962 the user specifies a list of boundary tags, one for each edge of the bounding
    963 polygon.
     967This method is used to add a region to a \class{Mesh} instance.  The
     968region is described by the polygon passed in.  Additionally, the
     969user specifies a list of boundary tags, one for each edge of the
     970bounding polygon.
     971
     972
    964973\end{funcdesc}
    965974
     
    969978
    970979% Translate following into layman's language
    971 This method is used to add a region where the triangular mesh will not
    972 be generated to a Mesh instance.  The region is
    973 described by the polygon passed in.  Additionally,
    974 the user specifies a list of boundary tags, one for each edge of the bounding
    975 polygon.
     980This method is used to add a `hole'---that is, a region where the
     981triangular mesh will not be generated---to a \class{Mesh} instance.
     982The region is described by the polygon passed in.  Additionally, the
     983user specifies a list of boundary tags, one for each edge of the
     984bounding polygon.
    976985\end{funcdesc}
    977986
     
    10041013Module: \module{pyvolution.pmesh2domain}
    10051014
    1006 Once the initial mesh file has been created, this function is applied
    1007 to convert it to a domain object---that is, to a member of
    1008 the special Python class Domain (or a subclass of Domain), which provides access to properties and
    1009 methods that allow quantities to be set and other operations to be carried out.
     1015Once the initial mesh file has been created, this function is
     1016applied to convert it to a domain object---that is, to a member of
     1017the special Python class \class{Domain} (or a subclass of
     1018\class{Domain}), which provides access to properties and methods
     1019that allow quantities to be set and other operations to be carried
     1020out.
    10101021
    10111022\code{file\_name} is the name of the mesh file to be converted,
     
    10311042
    10321043    Returns the name assigned to the domain by \code{set_name}. If no name has been
    1033     assigned, returns `domain'.
     1044    assigned, returns \code{`domain'}.
    10341045\end{funcdesc}
    10351046
     
    10471058    in your code, before the first appearance of \code{set\_datadir}.
    10481059
    1049     For example, if you wished to set the data directory to a subdirectory
    1050     \code{data} of the directory \code{project}, you might use
    1051     statements of the following type:
     1060    For example, to set the data directory to a subdirectory
     1061    \code{data} of the directory \code{project}, you could use
     1062    the statements:
    10521063
    10531064    {\small \begin{verbatim}
     
    15351546    \item \code{volumes}, a list specifying the points at the vertices of each of the
    15361547    triangles
     1548    % Refer here to the example to be provided in describing the simple example
    15371549    \item \code{time}, a Numeric array containing times for model
    15381550    evaluation
     
    15511563CDL representation of the output file \file{bedslope.sww} generated
    15521564from running the simple example \file{bedslopephysical.py} of
    1553 Chapter \ref{ch:getstarted}.
     1565Chapter \ref{ch:getstarted}:
    15541566
    15551567\verbatiminput{examples/bedslopeexcerpt.cdl}
    15561568
    1557 A TMS file is used to store time series...
     1569The SWW format is used not only for output but also serves as input
     1570for functions such as \function{file_boundary} and
     1571\function{file_function}, described in Chapter \ref{ch:interface}.
     1572
     1573A TMS file is used to store time series data that is independent of
     1574position.
    15581575
    15591576
     
    15631580mesh data for \anuga. A meshfile can have one of two formats: it can
    15641581be either a TSH file, which is an ASCII file, or an MSH file, which
    1565 is a NetCDF file.
     1582is a NetCDF file. A meshfile can be generated from the function
     1583\function{create_mesh_from_regions} (see ) and used to initialise a
     1584domain.
    15661585
    15671586A meshfile describes the outline of the mesh---the vertices and line
     
    15861605attributes associated with a set of points.
    15871606
    1588 The format for a .xya file is:
    1589 \begin{verbatim}
    1590             1st line:     [attribute names]
    1591             other lines:  x y [attributes]
    1592 
    1593             for example:
    1594             elevation, friction
    1595             0.6, 0.7, 4.9, 0.3
    1596             1.9, 2.8, 5, 0.3
    1597             2.7, 2.4, 5.2, 0.3
    1598 
    1599         The first two columns are always implicitly assumed to be x, y coordinates.
    1600         Use the same delimiter for the attribute names and the data
    1601 
    1602         An xya file can optionally end with
    1603             #geo reference
    1604             56
    1605             466600.0
    1606             8644444.0
    1607 
    1608         When the 1st # is the zone,
    1609         2nd # the xllcorner and
    1610         3rd # the yllcorner
    1611 \end{verbatim}
     1607The format for an XYA file is:
     1608%\begin{verbatim}
     1609
     1610            first line:     \code{[attribute names]}\\
     1611            other lines:  \code{x y [attributes]}\\
     1612
     1613            for example:\\
     1614            \code{elevation, friction}\\
     1615            \code{0.6, 0.7, 4.9, 0.3}\\
     1616            \code{1.9, 2.8, 5, 0.3}\\
     1617            \code{2.7, 2.4, 5.2, 0.3}
     1618
     1619        The first two columns are always implicitly assumed to be $x$, $y$ coordinates.
     1620        Use the same delimiter for the attribute names and the data.
     1621
     1622        An XYA file can optionally end with lines having the format exemplified here:
     1623
     1624            \code{\#geo reference}\\
     1625            \code{56}\\
     1626            \code{466600.0}\\
     1627            \code{8644444.0}
     1628
     1629        where the first number specifies the zone (here 56)  and other numbers are the
     1630        coordinates of the lower left corner (466600.0, 8644444.0).
     1631
     1632A PTS file is a NetCDF representation of the data held in an XYA
     1633file. If the data is associated with a set of $N$ points, then the
     1634data is stored using an $N \times 2$ Numeric array of float
     1635variables for the points and an $N \times 1$ Numeric array for each
     1636attribute.
     1637
     1638%\end{verbatim}
    16121639
    16131640\subsection{ArcView Formats}
    16141641
     1642Files of the three formats ASC, PRJ and ERS are all associated with
     1643data from ArcView.
     1644
     1645An ASC file is an ASCII representation of DEM output from ArcView.
     1646It has the following format...
     1647
     1648A PRJ file is an ArcView file used in conjunction with an ASC file
     1649to represent metadata for a DEM.
     1650
     1651
     1652\subsection{DEM Format}
     1653
     1654A DEM file is a NetCDF representation of regular DEM data.
     1655
    16151656
    16161657\subsection{Other Formats}
     1658
     1659
     1660
    16171661
    16181662\subsection{Basic File Conversions}
Note: See TracChangeset for help on using the changeset viewer.