% $Id$
%
% Earth System Modeling Framework
% Copyright (c) 2002-2023, University Corporation for Atmospheric Research, 
% Massachusetts Institute of Technology, Geophysical Fluid Dynamics 
% Laboratory, University of Michigan, National Centers for Environmental 
% Prediction, Los Alamos National Laboratory, Argonne National Laboratory, 
% NASA Goddard Space Flight Center.
% Licensed under the University of Illinois-NCSA License.

%\subsection{Usage}

ESMF encourages application organization in which there is a single 
top-level Gridded Component.  This provides a simple, clear sequence
of operations at the highest level, and also enables the entire 
application to be treated as a sub-Component of another, larger 
application if desired.  When a simple application is organized in this fashion 
the standard AppDriver can probably be used without much modification.  

\begin{sloppypar}
Examples of program organization using the AppDriver can be found in the 
{\tt src/Superstructure/AppDriver} directory.  A set of subdirectories 
within the AppDriver directory follows the naming convention:
\end{sloppypar}
\begin{verbatim}
<seq|concur>_<pairwise|hub>_<f|c>driver_<spmd|mpmd>
\end{verbatim}

The example that is currently implemented is
{\tt seq\_pairwise\_fdriver\_spmd}, which
has sequential component execution, a pairwise coupler, a main program
in Fortran, and all processors launching the same executable.
It is also copied automatically into a top-level 
{\tt quick\_start} directory at compilation time.  

The user can copy the AppDriver files into
their own local directory. Some of the files can be used unchanged.
Others are template files which have the rough outline of the code but
need additional application-specific code added in order to perform a
meaningful function.  The {\tt README} file in the AppDriver 
subdirectory or {\tt quick\_start} directory contains instructions about 
which files to change.

Examples of concurrent component execution can be found in the
system tests that are bundled with the ESMF distribution.



