

\subsection{Create a vertical Z-axis: {\tt zaxisCreate}}
\index{zaxisCreate}
\label{zaxisCreate}

The function {\tt zaxisCreate} creates a vertical Z-axis.

\subsubsection*{Usage}

\begin{verbatim}
    int zaxisCreate(int zaxistype, int size);
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt zaxistype\ }
\item[{\tt zaxistype}]
The type of the Z-axis, one of the set of predefined {\CDI} Z-axis types.
                      The valid {\CDI} Z-axis types are {\tt ZAXIS\_GENERIC}, {\tt ZAXIS\_SURFACE},
                      {\tt ZAXIS\_HYBRID}, {\tt ZAXIS\_SIGMA}, {\tt ZAXIS\_PRESSURE}, {\tt ZAXIS\_HEIGHT},
                      {\tt ZAXIS\_ISENTROPIC}, {\tt ZAXIS\_ALTITUDE}, {\tt ZAXIS\_MEANSEA}, {\tt ZAXIS\_TOA},
                      {\tt ZAXIS\_SEA\_BOTTOM}, {\tt ZAXIS\_ATMOSPHERE}, {\tt ZAXIS\_CLOUD\_BASE},
                      {\tt ZAXIS\_CLOUD\_TOP}, {\tt ZAXIS\_ISOTHERM\_ZERO}, 
                      {\tt ZAXIS\_DEPTH\_BELOW\_SEA} and {\tt ZAXIS\_DEPTH\_BELOW\_LAND}.
\item[{\tt size}]
Number of levels.

\end{deflist}
\end{minipage}

\subsubsection*{Result}

{\tt zaxisCreate} returns an identifier to the Z-axis.


\subsubsection*{Example}

Here is an example using {\tt zaxisCreate} to create a pressure level Z-axis:

\begin{lstlisting}[language=C, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]

    #include "cdi.h"
       ...
    #define  nlev    5
       ...
    double levs[nlev] = {101300, 92500, 85000, 50000, 20000};
    int zaxisID;
       ...
    zaxisID = zaxisCreate(ZAXIS_PRESSURE, nlev);
    zaxisDefLevels(zaxisID, levs);
       ...
\end{lstlisting}


\subsection{Destroy a vertical Z-axis: {\tt zaxisDestroy}}
\index{zaxisDestroy}
\label{zaxisDestroy}
\subsubsection*{Usage}

\begin{verbatim}
    void zaxisDestroy(int zaxisID);
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt zaxisID\ }
\item[{\tt zaxisID}]
Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}}.

\end{deflist}
\end{minipage}


\subsection{Get the type of a Z-axis: {\tt zaxisInqType}}
\index{zaxisInqType}
\label{zaxisInqType}

The function {\tt zaxisInqType} returns the type of a Z-axis.

\subsubsection*{Usage}

\begin{verbatim}
    int zaxisInqType(int zaxisID);
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt zaxisID\ }
\item[{\tt zaxisID}]
Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}}.

\end{deflist}
\end{minipage}

\subsubsection*{Result}

{\tt zaxisInqType} returns the type of the Z-axis,
one of the set of predefined {\CDI} Z-axis types.
The valid {\CDI} Z-axis types are {\tt ZAXIS\_GENERIC}, {\tt ZAXIS\_SURFACE},
{\tt ZAXIS\_HYBRID}, {\tt ZAXIS\_SIGMA}, {\tt ZAXIS\_PRESSURE}, {\tt ZAXIS\_HEIGHT},
{\tt ZAXIS\_ISENTROPIC}, {\tt ZAXIS\_ALTITUDE}, {\tt ZAXIS\_MEANSEA}, {\tt ZAXIS\_TOA},
{\tt ZAXIS\_SEA\_BOTTOM}, {\tt ZAXIS\_ATMOSPHERE}, {\tt ZAXIS\_CLOUD\_BASE},
{\tt ZAXIS\_CLOUD\_TOP}, {\tt ZAXIS\_ISOTHERM\_ZERO}, 
{\tt ZAXIS\_DEPTH\_BELOW\_SEA} and {\tt ZAXIS\_DEPTH\_BELOW\_LAND}.



\subsection{Get the size of a Z-axis: {\tt zaxisInqSize}}
\index{zaxisInqSize}
\label{zaxisInqSize}

The function {\tt zaxisInqSize} returns the size of a Z-axis.

\subsubsection*{Usage}

\begin{verbatim}
    int zaxisInqSize(int zaxisID);
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt zaxisID\ }
\item[{\tt zaxisID}]
Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}}

\end{deflist}
\end{minipage}

\subsubsection*{Result}

{\tt zaxisInqSize} returns the number of levels of a Z-axis.



\subsection{Define the levels of a Z-axis: {\tt zaxisDefLevels}}
\index{zaxisDefLevels}
\label{zaxisDefLevels}

The function {\tt zaxisDefLevels} defines the levels of a Z-axis.

\subsubsection*{Usage}

\begin{verbatim}
    void zaxisDefLevels(int zaxisID, const double *levels);
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt zaxisID\ }
\item[{\tt zaxisID}]
Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}}.
\item[{\tt levels}]
All levels of the Z-axis.

\end{deflist}
\end{minipage}


\subsection{Get all levels of a Z-axis: {\tt zaxisInqLevels}}
\index{zaxisInqLevels}
\label{zaxisInqLevels}

The function {\tt zaxisInqLevels} returns all levels of a Z-axis.

\subsubsection*{Usage}

\begin{verbatim}
    void zaxisInqLevels(int zaxisID, double *levels);
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt zaxisID\ }
\item[{\tt zaxisID}]
Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}}.
\item[{\tt levels}]
Pointer to the location into which the levels are read.
                    The caller must allocate space for the returned values.

\end{deflist}
\end{minipage}

\subsubsection*{Result}

{\tt zaxisInqLevels} saves all levels to the parameter {\tt levels}.


\subsection{Get one level of a Z-axis: {\tt zaxisInqLevel}}
\index{zaxisInqLevel}
\label{zaxisInqLevel}

The function {\tt zaxisInqLevel} returns one level of a Z-axis.

\subsubsection*{Usage}

\begin{verbatim}
    double zaxisInqLevel(int zaxisID, int levelID);
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt zaxisID\ }
\item[{\tt zaxisID}]
Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}}.
\item[{\tt levelID}]
Level index (range: 0 to nlevel-1).

\end{deflist}
\end{minipage}

\subsubsection*{Result}

{\tt zaxisInqLevel} returns the level of a Z-axis.


\subsection{Define the name of a Z-axis: {\tt zaxisDefName}}
\index{zaxisDefName}
\label{zaxisDefName}

The function {\tt zaxisDefName} defines the name of a Z-axis.

\subsubsection*{Usage}

\begin{verbatim}
    void zaxisDefName(int zaxisID, const char *name);
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt zaxisID\ }
\item[{\tt zaxisID}]
Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}}.
\item[{\tt name}]
Name of the Z-axis.

\end{deflist}
\end{minipage}


\subsection{Get the name of a Z-axis: {\tt zaxisInqName}}
\index{zaxisInqName}
\label{zaxisInqName}

The function {\tt zaxisInqName} returns the name of a Z-axis.

\subsubsection*{Usage}

\begin{verbatim}
    void zaxisInqName(int zaxisID, char *name);
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt zaxisID\ }
\item[{\tt zaxisID}]
Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}}.
\item[{\tt name}]
Name of the Z-axis. The caller must allocate space for the
                    returned string. The maximum possible length, in characters, of
                    the string is given by the predefined constant {\tt CDI\_MAX\_NAME}.

\end{deflist}
\end{minipage}

\subsubsection*{Result}

{\tt zaxisInqName} returns the name of the Z-axis to the parameter name.



\subsection{Define the longname of a Z-axis: {\tt zaxisDefLongname}}
\index{zaxisDefLongname}
\label{zaxisDefLongname}

The function {\tt zaxisDefLongname} defines the longname of a Z-axis.

\subsubsection*{Usage}

\begin{verbatim}
    void zaxisDefLongname(int zaxisID, const char *longname);
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt longname\ }
\item[{\tt zaxisID}]
Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}}.
\item[{\tt longname}]
Longname of the Z-axis.

\end{deflist}
\end{minipage}


\subsection{Get the longname of a Z-axis: {\tt zaxisInqLongname}}
\index{zaxisInqLongname}
\label{zaxisInqLongname}

The function {\tt zaxisInqLongname} returns the longname of a Z-axis.

\subsubsection*{Usage}

\begin{verbatim}
    void zaxisInqLongname(int zaxisID, char *longname);
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt longname\ }
\item[{\tt zaxisID}]
Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}}.
\item[{\tt longname}]
Longname of the Z-axis. The caller must allocate space for the
                    returned string. The maximum possible length, in characters, of
                    the string is given by the predefined constant {\tt CDI\_MAX\_NAME}.

\end{deflist}
\end{minipage}

\subsubsection*{Result}

{\tt zaxisInqLongname} returns the longname of the Z-axis to the parameter longname.



\subsection{Define the units of a Z-axis: {\tt zaxisDefUnits}}
\index{zaxisDefUnits}
\label{zaxisDefUnits}

The function {\tt zaxisDefUnits} defines the units of a Z-axis.

\subsubsection*{Usage}

\begin{verbatim}
    void zaxisDefUnits(int zaxisID, const char *units);
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt zaxisID\ }
\item[{\tt zaxisID}]
Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}}.
\item[{\tt units}]
Units of the Z-axis.

\end{deflist}
\end{minipage}


\subsection{Get the units of a Z-axis: {\tt zaxisInqUnits}}
\index{zaxisInqUnits}
\label{zaxisInqUnits}

The function {\tt zaxisInqUnits} returns the units of a Z-axis.

\subsubsection*{Usage}

\begin{verbatim}
    void zaxisInqUnits(int zaxisID, char *units);
\end{verbatim}

\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\tt zaxisID\ }
\item[{\tt zaxisID}]
Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}}
\item[{\tt units}]
Units of the Z-axis. The caller must allocate space for the
                    returned string. The maximum possible length, in characters, of
                    the string is given by the predefined constant {\tt CDI\_MAX\_NAME}.

\end{deflist}
\end{minipage}

\subsubsection*{Result}

{\tt zaxisInqUnits} returns the units of the Z-axis to the parameter units.

