--- manual/s_phys_pkgs/mnc.tex	2004/02/13 21:35:59	1.6
+++ manual/s_phys_pkgs/mnc.tex	2004/04/03 23:05:05	1.8
@@ -1,4 +1,4 @@
-% $Header: /home/ubuntu/mnt/e9_copy/manual/s_phys_pkgs/Attic/mnc.tex,v 1.6 2004/02/13 21:35:59 edhill Exp $
+% $Header: /home/ubuntu/mnt/e9_copy/manual/s_phys_pkgs/Attic/mnc.tex,v 1.8 2004/04/03 23:05:05 edhill Exp $
 % $Name:  $
 
 \section{NetCDF I/O Integration: MNC}
@@ -99,8 +99,8 @@
 \begin{center}
   \begin{tabular}[h]{|ccc|c|c|}\hline
     \multicolumn{3}{|c|}{Horizontal} & Vertical & Time \\
-    \textit{H0}: location & \textit{H1}: dimensions & \textit{H2}: halo 
-          & \textit{V}: location & \textit{T}: level  \\\hline
+    \textbf{H0}: location & \textbf{H1}: dimensions & \textbf{H2}: halo 
+          & \textbf{V}: location & \textbf{T}: level  \\\hline
     \texttt{-} & xy & Hn & \texttt{-} & \texttt{-} \\
     U  &  x  &  Hy  &  i  &  t  \\
     V  &  y  &      &  c  &     \\
@@ -114,6 +114,18 @@
   \texttt{pkg/mnc/pre-defined\_grids.txt}.
 \end{center}
 
+The variable type is an association between a variable type name and the
+following items:
+\begin{center}
+  \begin{tabular}[h]{|ll|}\hline
+    \textbf{Item}  & \textbf{Purpose}  \\\hline
+    grid type  &  defines the in-memory arrangement  \\
+    \texttt{bi,bj} dimensions  &  tiling indices, if present  \\\hline
+  \end{tabular}
+\end{center}
+and is used by the \texttt{mnc\_cw\_*\_[R|W]} subroutines for reading
+and writing variables.
+
 
 \subsubsection{An Example}
 
@@ -125,16 +137,31 @@
 necessary, the current time level within the model.
 
 Examples of the initialization calls can be found in the file 
-\filelink{model/src/initialise\_fixed.F}{model-src-initialise_fixed.F}
+\filelink{model/src/ini\_mnc\_io.F}{model-src-ini_mnc_io.F}
 where these four function calls:
 {\footnotesize
 \begin{verbatim}
-  C     Create MNC definitions for DYNVARS.h variables
-        CALL MNC_CW_ADD_VNAME(myThid, 'iter', '-_-_--__-__t', 0,0)
-        CALL MNC_CW_ADD_VATTR_TEXT(myThid,'iter',1,
-       &     'long_name','iteration_count')
-        CALL MNC_CW_ADD_VNAME(myThid, 'U', 'U_xy_Hn__C__t', 4,5)
-        CALL MNC_CW_ADD_VATTR_TEXT(myThid,'U',1,'units','m/s')
+C     Create MNC definitions for DYNVARS.h variables
+      CALL MNC_CW_ADD_VNAME('iter', '-_-_--__-__t', 0,0, myThid)
+      CALL MNC_CW_ADD_VATTR_TEXT('iter',1,
+     &     'long_name','iteration_count', myThid)
+
+      CALL MNC_CW_ADD_VNAME('model_time', '-_-_--__-__t', 0,0, myThid)
+      CALL MNC_CW_ADD_VATTR_TEXT('model_time',1,
+     &     'long_name','Model Time', myThid)
+      CALL MNC_CW_ADD_VATTR_TEXT('model_time',1,'units','s', myThid)
+
+      CALL MNC_CW_ADD_VNAME('U', 'U_xy_Hn__C__t', 4,5, myThid)
+      CALL MNC_CW_ADD_VATTR_TEXT('U',1,'units','m/s', myThid)
+      CALL MNC_CW_ADD_VATTR_TEXT('U',1,
+     &     'coordinates','XU YU RC iter', myThid)
+
+      CALL MNC_CW_ADD_VNAME('T', 'Cen_xy_Hn__C__t', 4,5, myThid)
+      CALL MNC_CW_ADD_VATTR_TEXT('T',1,'units','degC', myThid)
+      CALL MNC_CW_ADD_VATTR_TEXT('T',1,'long_name',
+     &     'potential_temperature', myThid)
+      CALL MNC_CW_ADD_VATTR_TEXT('T',1,
+     &     'coordinates','XC YC RC iter', myThid)
 \end{verbatim}
 }
 {\noindent initialize two \texttt{VNAME}s and add one NetCDF
@@ -146,20 +173,18 @@
 using the function calls:
 {\footnotesize
 \begin{verbatim}
-  C     Write the DYNVARS.h variables using the MNC package
+C       Write dynvars using the MNC package
         mnc_iter = myIter
-        CALL MNC_CW_RL_W_R(myThid,'state',0,0,'iter',-1,mnc_iter)
-        CALL MNC_CW_RL_W_D(myThid,'state',0,0,'U', 0, uVel)
+        CALL MNC_CW_SET_UDIM('state', -1, myThid)
+        CALL MNC_CW_RL_W('D','state',0,0,'iter',mnc_iter, myThid)
+        CALL MNC_CW_SET_UDIM('state', 0, myThid)
+        CALL MNC_CW_RL_W('D','state',0,0,'model_time',myTime, myThid)
+        CALL MNC_CW_RL_W('D','state',0,0,'U', uVel, myThid)
+        CALL MNC_CW_RL_W('D','state',0,0,'T', theta, myThid)
 \end{verbatim}
 }
 
-
-\subsection{Key subroutines, parameters and files}
-
-All of the variables used to implement the lookup tables are described
-in \filelink{model/src/write\_state.F}{model-src-write_state.F}
-
-
+%\subsection{Key subroutines, parameters and files}
 
 \subsection{Package Reference}
 
