% $Id$
%
% Earth System Modeling Framework
% Copyright (c) 2002-2024, 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.

\begin{sloppypar}
There are a few methods that every ESMF application must contain. First,
{\tt ESMF\_Initialize()} and {\tt ESMF\_Finalize()} are in complete analogy 
to {\tt MPI\_Init()} and {\tt MPI\_Finalize()} known from MPI. All ESMF
programs, serial or parallel, must initialize the ESMF system at the beginning,
and finalize it at the end of execution. The behavior of calling any
ESMF method before {\tt ESMF\_Initialize()}, or after {\tt ESMF\_Finalize()}
is undefined.
\end{sloppypar}

Second, every ESMF Component that is accessed by an ESMF application requires
that its set services routine is called through
{\tt ESMF\_<Grid/Cpl>CompSetServices()}. The Component must implement
one public entry point, its set services routine, that can be called
through the {\tt ESMF\_<Grid/Cpl>CompSetServices()} library routine. The
Component set services routine is responsible for setting entry points
for the standard ESMF Component methods Initialize, Run, and Finalize.

\begin{sloppypar}
Finally, the Component can optionally call {\tt ESMF\_<Grid/Cpl>CompSetVM()}
{\em before} calling
{\tt ESMF\_<Grid/Cpl>CompSetServices()}. Similar to 
{\tt ESMF\_<Grid/Cpl>CompSetServices()}, the 
{\tt ESMF\_<Grid/Cpl>CompSetVM()}
call requires a public entry point into the Component. It allows the Component
to adjust certain aspects of its execution environment, i.e. its own VM, before
it is started up.
\end{sloppypar}

The following sections discuss the above mentioned aspects in more detail.
