/[MITgcm]/manual/s_outp_pkgs/text/grid_gen.tex
ViewVC logotype

Diff of /manual/s_outp_pkgs/text/grid_gen.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2 by edhill, Fri Jun 30 15:40:20 2006 UTC revision 1.3 by edhill, Fri Jun 30 20:53:52 2006 UTC
# Line 21  flexibility.  To date, general curviline Line 21  flexibility.  To date, general curviline
21  been used primarily (in fact, almost exclusively) in conjunction with  been used primarily (in fact, almost exclusively) in conjunction with
22  so-called ``cube-sphere'' grids.  However, it is important to observe  so-called ``cube-sphere'' grids.  However, it is important to observe
23  that cube-sphere arrangements are only one example of what is possible  that cube-sphere arrangements are only one example of what is possible
24  with domain-decomposed logically rectangular tiles each containing  with domain-decomposed logically rectangular regions each containing
25  curvilinear orthogonal coordinate systems.  Much more sophisticated  curvilinear orthogonal coordinate systems.  Much more sophisticated
26  domains can be imagined and constructed.  domains can be imagined and constructed.
27    
28  In order to explore the possibilities of domain-decomposed curvilinear  In order to explore the possibilities of domain-decomposed curvilinear
29  orthogonal coordinate systems, a suite of grid generation software  orthogonal coordinate systems, a suite of grid generation software
30  called ``SPGrid'' (for SPherical Gridding) has developed.  SPGrid is a  called ``SPGrid'' (for SPherical Gridding) has been developed.  SPGrid
31  relatively new facility and papers detailing its algorithms are in  is a relatively new facility and papers detailing its algorithms are
32  preparation.  Althogh SPGrid is new and still rapidly developing, it  in preparation.  Althogh SPGrid is new and rapidly developing, it has
33  has already demonstrated the ability to generate some useful and  already demonstrated the ability to generate some useful and
34  interesting grids.  interesting grids.
35    
36  This section provides a very brief introduction to SPGrid and shows  This section provides a very brief introduction to SPGrid and shows
37  some early results.  For further information, please contact the  some early results.  For further information, please contact the
38  MITgcm support list:  MITgcm support list at:
39  \begin{center}  \begin{center}
   \begin{rawhtml} <A href="mailto:MITgcm-support@mitgcm.org"> \end{rawhtml}  
40    MITgcm-support@mitgcm.org    MITgcm-support@mitgcm.org
   \begin{rawhtml} </A> \end{rawhtml}  
41  \end{center}  \end{center}
42    
43    
44  \subsection{Using SPGrid}  \subsection{Using SPGrid}
45    
46  The SPGrid software is not a single program.  Rather, it is a  The SPGrid software is not a single program.  Rather, it is a
47  collection of \CC code and MatLAB scripts that can be used as a  collection of C++ code and MatLAB scripts that can be used as a
48  framework or library for grid generation.  Currently, grid creation is  framework or library for grid generation and manipulation.  Currently,
49  accomplished by writing a \CC ``driver'' program that specifies the  grid creation is accomplished by either directly running matlab
50  shape and connectivity of tiles and the preferred grid sizes (in the  scripts or by writing a C++ ``driver'' program.  The matlab scripts
51  sense of the number of grid cells) and edge locations of the cells at  are suitable for grids composed of a single ``face'' (that is, a
52  the edges of grid faces.  The driver program then passes this  single logically rectangular region on the surface of a sphere).  The
53  information to the SPGrid library which generates the actual grid and  C++ driver programs are appropriate for grids composed of multiple
54  produces the output files that describe it.  connected logically rectangular patches.  Each driver is program is
55    written to specify the shape and connectivity of tiles and the
56    preferred grid density (that is, the number of grid cells in each
57    logical direction) and edge locations of the cells where they meet the
58    edges of each face.  The driver programs pass this information to the
59    SPGrid library which generates the actual grid and produces the output
60    files that describe it.
61    
62  Currently, driver programs are available for a few examples including  Currently, driver programs are available for a few examples including
63  cubes, ``lat-lon caps'' (cube topologies that have conformal caps at  cubes, ``lat-lon caps'' (cube topologies that have conformal caps at
# Line 80  the SPGrid suite: Line 84  the SPGrid suite:
84    \texttt{http://www.mathworks.com}    \texttt{http://www.mathworks.com}
85    \begin{rawhtml} </A> \end{rawhtml}    \begin{rawhtml} </A> \end{rawhtml}
86    
87  \item the Wild Magic graphics engine (a \CC library) is needed for the  \item the Wild Magic graphics engine (a C++ library) is needed for the
88    main ``driver'' code: \\    main ``driver'' code: \\
89    \begin{rawhtml} <A href="http://geometrictools.com/"> \end{rawhtml}    \begin{rawhtml} <A href="http://geometrictools.com/"> \end{rawhtml}
90    \texttt{http://geometrictools.com/}    \texttt{http://geometrictools.com/}
# Line 96  the SPGrid suite: Line 100  the SPGrid suite:
100    \texttt{http://www.boost.org}    \texttt{http://www.boost.org}
101    \begin{rawhtml} </A> \end{rawhtml}    \begin{rawhtml} </A> \end{rawhtml}
102    
103  \item a typical Unix/Linux build environment including the make  \item a typical Linux/Unix build environment including the make
104    utility (preferably Gnu Make) and a \CC compiler (SPGrid was    utility (preferably Gnu Make) and a C++ compiler (SPGrid was
105    developed with g++ v3.x and v4.x).    developed with g++ v4.x).
106  \end{itemize}  \end{itemize}
107    
108    
# Line 125  The procedure for building is similar to Line 129  The procedure for building is similar to
129       ./configure       ./configure
130       make       make
131  \end{verbatim}  \end{verbatim}
132  where the \texttt{CPPFLAGS} and\texttt{LDFLAGS} environment variables  where the \texttt{CPPFLAGS} and \texttt{LDFLAGS} environment variables
133  can be edited to reflect the locations of all the necessary  can be edited to reflect the locations of all the necessary
134  dependencies.  SPGrid is known to work on Fedora Core Linux and is  dependencies.  SPGrid is known to work on Fedora Core Linux (versions
135  likely to work on most any Linux distribution that provides the needed  4 and 5) and is likely to work on most any Linux distribution that
136  dependencies.  provides the needed dependencies.
137    
138    
139  \subsubsection{Using SPGrid}  \subsubsection{Running SPGrid}
140    
141  Within the \texttt{src} sub-directory, various example programs  Within the \texttt{src} sub-directory, various example driver programs
142  exist.  These example programs describe small but complete domains and  exist.  These examples describe small, simple domains and can generate
143  can generate the input (formatted as either binary ``mitgrid'' or  the input files (formatted as either binary \texttt{*.mitgrid} or
144  netCDF) files required by MITgcm.  netCDF) used by MITgcm.
145    
146  One such example is called ``SpF\_test\_cube\_cap'' and it can be run  One such example is called ``SpF\_test\_cube\_cap'' and it can be run
147  with the following sequence of commands:  with the following sequence of commands:
148  \begin{verbatim}  \begin{verbatim}
149       cd spgrid-0.9.4/src       cd spgrid-0.9.4/src
150         make SpF_test_cube_cap
151       mkdir SpF_test_cube_cap.d       mkdir SpF_test_cube_cap.d
152       ( cd SpF_test_cube_cap.d && ln -s ../../scripts/*.m . )       ( cd SpF_test_cube_cap.d && ln -s ../../scripts/*.m . )
153       ./SpF_test_cube_cap       ./SpF_test_cube_cap
154  \end{verbatim}  \end{verbatim}
155  which should create a series of output files of the form  which should create a series of output files:
156  \begin{verbatim}  \begin{verbatim}
157       SpF_test_cube_cap.d/grid_*.mitgrid       SpF_test_cube_cap.d/grid_*.mitgrid
158       SpF_test_cube_cap.d/grid_*.nc       SpF_test_cube_cap.d/grid_*.nc
159       SpF_test_cube_cap.d/std_topology.nc       SpF_test_cube_cap.d/std_topology.nc
160  \end{verbatim}  \end{verbatim}
161  which describe each face of the domain and how the faces are  where the \texttt{grid\_*.mitgrid} and \texttt{grid\_*.nc} files
162  connected.  contain the grid information in binary and netCDF formats and the
163    \texttt{std\_topology.nc} file contains the information describing the
164    connectivity (both edge--edge and corner--corner contacts) between all
165    the faces.
166    
167    
168  \subsection{Example Grids}  \subsection{Example Grids}

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22