diff --git a/ChangeLog b/ChangeLog
index 94862ae32617b509e4cb363a2c5b471314d3e543..2c69a9388abc04de92e964ba3091bd5415c3353f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,58 @@
+2017-04-13  Uwe Schulzweida
+
+	* Version 1.8.1 released
+
+2017-04-12  Uwe Schulzweida
+
+	* file_fill_buffer: set offset (bug fix) [patch from Harald Anlauf]
+
+2017-04-10  Uwe Schulzweida
+
+	* gribapi: use keys iScansNegatively and jScansPositively
+
+2017-04-09  Uwe Schulzweida
+
+	* Refactor GRID_LCC to GRID_PROJECTION
+
+2017-04-05  Uwe Schulzweida
+
+	* Scalar Z-Coordinate: added support for bounds (bug fix)
+
+2017-03-18  Uwe Schulzweida
+
+	* grid_check_cyclic: check yvals for curvilinear grids (bug fix)
+
+2017-03-17  Uwe Schulzweida
+
+	* gridCompareSearch: change 3rd parameter of gridCompare() to true.
+
+2017-03-14  Uwe Schulzweida
+
+	* set chunk size of time axis to 512
+	* set min deflate size of data variables to 16
+	* streamOpenAppend: set defmiss = true (Needed for NetCDF4)
+
+2017-03-08  Uwe Schulzweida
+
+	* Preserve netcdf time units attribute
+
+2017-03-07  Uwe Schulzweida
+
+	* Added function streamGrbChangeParameterIdentification() (patch from Michal Koutek, KMNI)
+
+2017-02-27  Uwe Schulzweida
+
+	* Added function gridDefUvRelativeToGrid()
+	* gridInqUvRelativeToGrid(): added cgribex support
+
+2017-02-24  Uwe Schulzweida
+
+	* Added function gridInqUvRelativeToGrid() (patch from Michal Koutek, KMNI)
+
+2017-02-22  Uwe Schulzweida
+
+	* CDI_CHUNK_AUTO: set chunk_size_max to 65536
+
 2017-02-14  Uwe Schulzweida
 
         * using CGRIBEX library version 1.7.6
diff --git a/Makefile.in b/Makefile.in
index d48da22c245fd13e195dff256ab8fe4f4f1c3d6b..a13b31c9e04bb199185fac7414016db99e6f26d4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -108,6 +108,7 @@ am__aclocal_m4_deps =  \
 	$(top_srcdir)/m4/acx_lt_problems.m4 \
 	$(top_srcdir)/m4/acx_option_search_libs.m4 \
 	$(top_srcdir)/m4/acx_options.m4 \
+	$(top_srcdir)/m4/acx_prog_cc_posix.m4 \
 	$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
 	$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
 	$(top_srcdir)/m4/asx_tr_arg.m4 $(top_srcdir)/m4/asx_unset.m4 \
diff --git a/aclocal.m4 b/aclocal.m4
index f7f2c3b5e03026e4f27e8ad245d7375b1b8b5fce..74a336f8b8cafd6dbe174aa68afd5db075bdb040 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1196,6 +1196,7 @@ m4_include([m4/acx_lang_package.m4])
 m4_include([m4/acx_lt_problems.m4])
 m4_include([m4/acx_option_search_libs.m4])
 m4_include([m4/acx_options.m4])
+m4_include([m4/acx_prog_cc_posix.m4])
 m4_include([m4/acx_sl_fc_mod_path_flag.m4])
 m4_include([m4/acx_sl_mod_suffix.m4])
 m4_include([m4/asx_tr_arg.m4])
diff --git a/app/Makefile.in b/app/Makefile.in
index bcaa36a56d5f324229b67cdbb6f55ac13656f37b..c5c9cad22abadfcc8cce6c5c413d78effd645dc9 100644
--- a/app/Makefile.in
+++ b/app/Makefile.in
@@ -101,6 +101,7 @@ am__aclocal_m4_deps =  \
 	$(top_srcdir)/m4/acx_lt_problems.m4 \
 	$(top_srcdir)/m4/acx_option_search_libs.m4 \
 	$(top_srcdir)/m4/acx_options.m4 \
+	$(top_srcdir)/m4/acx_prog_cc_posix.m4 \
 	$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
 	$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
 	$(top_srcdir)/m4/asx_tr_arg.m4 $(top_srcdir)/m4/asx_unset.m4 \
diff --git a/app/printinfo.h b/app/printinfo.h
index f019c8ef12a8d9e2766f96d1ae7ee7f3f3d10169..e0fe4b4a96de5b7b6f5677ac7647fd838d56544a 100644
--- a/app/printinfo.h
+++ b/app/printinfo.h
@@ -226,7 +226,7 @@ void print_xyvals2D(int gridID, int dig)
           int xsize = gridInqXsize(gridID);
           if ( xsize > 1 )
             {
-              double *xvals = (double*) malloc(xsize*sizeof(double));
+              double *xvals = (double*) malloc((size_t)xsize*sizeof(double));
               for ( int i = 0; i < xsize; ++i ) xvals[i] = xvals2D[i];
               xinc = fabs(xvals[xsize-1] - xvals[0])/(xsize-1);
               for ( int i = 2; i < xsize; i++ )
@@ -236,7 +236,7 @@ void print_xyvals2D(int gridID, int dig)
           int ysize = gridInqYsize(gridID);
           if ( ysize > 1 )
             {
-              double *yvals = (double*) malloc(ysize*sizeof(double));
+              double *yvals = (double*) malloc((size_t)ysize*sizeof(double));
               for ( int i = 0; i < ysize; ++i ) yvals[i] = yvals2D[i*xsize];
               yinc = fabs(yvals[ysize-1] - yvals[0])/(ysize-1);
               for ( int i = 2; i < ysize; i++ )
@@ -279,6 +279,10 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
   // int prec     = gridInqPrec(gridID);
   // int dig = (prec == CDI_DATATYPE_FLT64) ? 15 : 7;
   int dig = 7;
+#ifdef CDO
+  extern int CDO_flt_digits;
+  dig = CDO_flt_digits;
+#endif
 
   if ( !lproj )
     {
@@ -406,27 +410,6 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
 
       print_xyvals2D(gridID, dig);
     }
-  else if ( gridtype == GRID_LCC )
-    {
-      double originLon, originLat, lonParY, lat1, lat2, xincm, yincm;
-      int projflag, scanflag;
-
-      gridInqParamLCC(gridID, &originLon, &originLat, &lonParY, &lat1, &lat2, &xincm, &yincm,
-                 &projflag, &scanflag);
-
-#ifdef CDO
-      set_text_color(stdout, RESET, GREEN);
-#endif
-      fprintf(stdout, "points=%d (%dx%d)  ", gridsize, xsize, ysize);
-      if ( (projflag&128) == 0 )
-        fprintf(stdout, "North Pole\n");
-      else
-        fprintf(stdout, "South Pole\n");
-      my_reset_text_color(stdout);
-
-      fprintf(stdout, "%33s : originLon=%g  originLat=%g  lonParY=%g\n", " ", originLon, originLat, lonParY);
-      fprintf(stdout, "%33s : lat1=%g  lat2=%g  xinc=%g m  yinc=%g m\n", " ", lat1, lat2, xincm, yincm);
-    }
   else /* if ( gridtype == GRID_GENERIC ) */
     {
 #ifdef CDO
@@ -439,7 +422,7 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
       my_reset_text_color(stdout);
     }
 
-  if ( gridtype == GRID_CURVILINEAR || gridtype == GRID_UNSTRUCTURED || gridtype == GRID_LCC )
+  if ( gridtype == GRID_CURVILINEAR || gridtype == GRID_UNSTRUCTURED )
     {
       if ( gridHasArea(gridID) ||
            gridInqXbounds(gridID, NULL) || gridInqYbounds(gridID, NULL) )
@@ -495,6 +478,10 @@ void printZaxisInfo(int vlistID)
       // int prec      = zaxisInqPrec(zaxisID);
       // int dig = (prec == CDI_DATATYPE_FLT64) ? 15 : 7;
       int dig = 7;
+#ifdef CDO
+      extern int CDO_flt_digits;
+      dig = CDO_flt_digits;
+#endif
 
       zaxisName(zaxistype, zaxisname);
       zaxisInqName(zaxisID, zname);
diff --git a/cdi.settings.in b/cdi.settings.in
index a53f5fc7130366a204e6560aafac6dc37ee26138..b4d2c67ecaa278c9c0da04d0629bc728491e0ec9 100644
--- a/cdi.settings.in
+++ b/cdi.settings.in
@@ -47,9 +47,6 @@
       "grib_api" : {
         "lib"      : "@GRIB_API_LIBS@",
         "include"  : "@GRIB_API_INCLUDE@"
-      },
-      "jasper" : {
-        "lib"      : "@JASPER_LIBS@"
       }
     }
   },
diff --git a/configure b/configure
index 412985104e8f880fb4da5b917bcfe402fa7bd950..896321c1689a8953ac8dae86100bcd32b27b793e 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for cdi 1.8.0.
+# Generated by GNU Autoconf 2.68 for cdi 1.8.1.
 #
 # Report bugs to <http://mpimet.mpg.de/cdi>.
 #
@@ -570,8 +570,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='cdi'
 PACKAGE_TARNAME='cdi'
-PACKAGE_VERSION='1.8.0'
-PACKAGE_STRING='cdi 1.8.0'
+PACKAGE_VERSION='1.8.1'
+PACKAGE_STRING='cdi 1.8.1'
 PACKAGE_BUGREPORT='http://mpimet.mpg.de/cdi'
 PACKAGE_URL=''
 
@@ -674,6 +674,8 @@ MPI_C_INCLUDE
 MPIROOT
 ENABLE_NETCDF_FALSE
 ENABLE_NETCDF_TRUE
+ENABLE_HIRLAM_EXTENSIONS_FALSE
+ENABLE_HIRLAM_EXTENSIONS_TRUE
 ENABLE_ALL_STATIC_FALSE
 ENABLE_ALL_STATIC_TRUE
 ENABLE_CDI_LIB
@@ -865,6 +867,7 @@ enable_service
 enable_extra
 enable_ieg
 enable_all_static
+enable_hirlam_extensions
 enable_mpi
 with_mpi_root
 with_mpi_include
@@ -1460,7 +1463,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures cdi 1.8.0 to adapt to many kinds of systems.
+\`configure' configures cdi 1.8.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1530,7 +1533,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of cdi 1.8.0:";;
+     short | recursive ) echo "Configuration of cdi 1.8.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1560,6 +1563,8 @@ Optional Features:
   --enable-ieg            Use the ieg library [default=yes]
   --enable-all-static     build a completely statically linked CDO binary
                           [default=no]
+  --enable-hirlam-extensions
+                          HIRLAM extensions [default=no]
   --enable-mpi            Compile with MPI compiler [default=no]
   --enable-iso-c-interface
                           Create Fortran Interface via iso_c_bindings facility
@@ -1723,7 +1728,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-cdi configure 1.8.0
+cdi configure 1.8.1
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2568,7 +2573,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by cdi $as_me 1.8.0, which was
+It was created by cdi $as_me 1.8.1, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -3520,7 +3525,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='cdi'
- VERSION='1.8.0'
+ VERSION='1.8.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4949,6 +4954,54 @@ fi
 
 
 
+acx_prog_cc_posix_version_value=200112
+             acx_prog_cc_posix_version_print="POSIX.1-2001"
+   ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking For conformance to ${acx_prog_cc_posix_version_print}." >&5
+$as_echo_n "checking For conformance to ${acx_prog_cc_posix_version_print}.... " >&6; }
+if ${acx_cv_cc_posix_support2001+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+int
+main ()
+{
+  int n[(_POSIX_VERSION >= ${acx_prog_cc_posix_version_value}L) * 2 - 1];
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  acx_cv_cc_posix_support2001=yes
+else
+  acx_cv_cc_posix_support2001=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_posix_support2001" >&5
+$as_echo "$acx_cv_cc_posix_support2001" >&6; }
+   if test "x$acx_cv_cc_posix_support2001" = xno; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: It seems your system does not define _POSIX_VERSION to a value
+greater-or-equal ${acx_prog_cc_posix_version_value}. This is typically the case when the
+compiler is instructed to make ISO C features available only,
+e.g. when using gcc -std=c99" >&5
+$as_echo "$as_me: It seems your system does not define _POSIX_VERSION to a value
+greater-or-equal ${acx_prog_cc_posix_version_value}. This is typically the case when the
+compiler is instructed to make ISO C features available only,
+e.g. when using gcc -std=c99" >&6;}
+      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "${acx_prog_cc_posix_version_print} profile required
+See \`config.log' for more details" "$LINENO" 5; }
+fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
@@ -23389,7 +23442,7 @@ Usage: $0 [OPTIONS]
 Report bugs to <bug-libtool@gnu.org>."
 
 lt_cl_version="\
-cdi config.lt 1.8.0
+cdi config.lt 1.8.1
 configured by $0, generated by GNU Autoconf 2.68.
 
 Copyright (C) 2011 Free Software Foundation, Inc.
@@ -27877,6 +27930,35 @@ else
   ENABLE_ALL_STATIC_FALSE=
 fi
 
+#  ----------------------------------------------------------------------
+#  Build CDO with HIRLAM extensions
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HIRLAM extensions" >&5
+$as_echo_n "checking for HIRLAM extensions... " >&6; }
+# Check whether --enable-hirlam-extensions was given.
+if test "${enable_hirlam_extensions+set}" = set; then :
+  enableval=$enable_hirlam_extensions; if test "x$enable_hirlam_extensions" != "xno"; then :
+
+$as_echo "#define HIRLAM_EXTENSIONS 1" >>confdefs.h
+
+                     enable_hirlam_extensions=yes
+else
+  enable_hirlam_extensions=no
+fi
+else
+  enable_hirlam_extensions=no
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_hirlam_extensions" >&5
+$as_echo "$enable_hirlam_extensions" >&6; }
+ if test x$enable_hirlam_extensions = 'xyes'; then
+  ENABLE_HIRLAM_EXTENSIONS_TRUE=
+  ENABLE_HIRLAM_EXTENSIONS_FALSE='#'
+else
+  ENABLE_HIRLAM_EXTENSIONS_TRUE='#'
+  ENABLE_HIRLAM_EXTENSIONS_FALSE=
+fi
+
+#
 
  if test x$ENABLE_NETCDF = xyes; then
   ENABLE_NETCDF_TRUE=
@@ -30073,6 +30155,10 @@ if test -z "${ENABLE_ALL_STATIC_TRUE}" && test -z "${ENABLE_ALL_STATIC_FALSE}";
   as_fn_error $? "conditional \"ENABLE_ALL_STATIC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_HIRLAM_EXTENSIONS_TRUE}" && test -z "${ENABLE_HIRLAM_EXTENSIONS_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_HIRLAM_EXTENSIONS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${ENABLE_NETCDF_TRUE}" && test -z "${ENABLE_NETCDF_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_NETCDF\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -30534,7 +30620,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by cdi $as_me 1.8.0, which was
+This file was extended by cdi $as_me 1.8.1, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -30600,7 +30686,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-cdi config.status 1.8.0
+cdi config.status 1.8.1
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 63bedadf757817cbb9279fb2429c093770ea5d83..8ffba062058b6bfe48f65ab799a63d5e24b1f3fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@
 #  autoconf 2.68
 #  libtool  2.4.2
 
-AC_INIT([cdi], [1.8.0], [http://mpimet.mpg.de/cdi])
+AC_INIT([cdi], [1.8.1], [http://mpimet.mpg.de/cdi])
 
 AC_DEFINE_UNQUOTED(CDI, ["$PACKAGE_VERSION"], [CDI version])
 
@@ -26,6 +26,8 @@ AM_MAINTAINER_MODE([disable])
 # Check building environment
 AC_CHECK_TOOL([CC],[gcc],[:])
 AC_PROG_CC_C99
+dnl verify the setup supports POSIX 2001
+ACX_PROG_CC_POSIX([2001])
 AM_PROG_CC_C_O
 AC_C_RESTRICT
 AC_PROG_FC
diff --git a/doc/pio/tex/c_quick_ref.tex b/doc/pio/tex/c_quick_ref.tex
index e2856b4f936c35c714383394ca63d4e2cd74ab33..3a105165d24ba109f5f6d1b021f0642402c7c3d2 100644
--- a/doc/pio/tex/c_quick_ref.tex
+++ b/doc/pio/tex/c_quick_ref.tex
@@ -119,6 +119,21 @@ set function to be called after
 setup of client/server communications of configuration object.
 
 
+\section*{\tt \htmlref{cdiPioConfSetRedistCache}{cdiPioConfSetRedistCache}}
+
+\begin{verbatim}
+    void cdiPioConfSetRedistCache (int confResH, int doCache);
+\end{verbatim}
+
+set doCache to anything non-zero if data
+for internal data exchanges is to be cached. This makes sense when
+the data passed via streamWriteVarPart or streamWriteScatteredVarPart
+is always decomposed statically using the same partitioning
+description objects and the sequence of calls to streamWriteVarPart
+or streamWriteScatteredVarPart for a stream matches the sequence
+of the previous sequence (divided by pioWriteTimestep).
+
+
 \section*{\tt \htmlref{cdiPioInit}{cdiPioInit}}
 
 \begin{verbatim}
diff --git a/doc/pio/tex/f_quick_ref.tex b/doc/pio/tex/f_quick_ref.tex
index b82dc479f78c3973659dce19523ef561479a0884..45756d48c3a1cf8173b631c894c65f515c778c85 100644
--- a/doc/pio/tex/f_quick_ref.tex
+++ b/doc/pio/tex/f_quick_ref.tex
@@ -122,6 +122,21 @@ set function to be called after
 setup of client/server communications of configuration object.
 
 
+\section*{\tt \htmlref{cdiPioConfSetRedistCache}{cdiPioConfSetRedistCache}}
+
+\begin{verbatim}
+    SUBROUTINE cdiPioConfSetRedistCache (INTEGER confResH, INTEGER doCache)
+\end{verbatim}
+
+set doCache to anything non-zero if data
+for internal data exchanges is to be cached. This makes sense when
+the data passed via streamWriteVarPart or streamWriteScatteredVarPart
+is always decomposed statically using the same partitioning
+description objects and the sequence of calls to streamWriteVarPart
+or streamWriteScatteredVarPart for a stream matches the sequence
+of the previous sequence (divided by pioWriteTimestep).
+
+
 \section*{\tt \htmlref{cdiPioInit}{cdiPioInit}}
 
 \begin{verbatim}
diff --git a/doc/tex/attribute.tex b/doc/tex/attribute.tex
index 3d83cf37a244b818d18980d5a6eede59cd9335ee..a53328b1da45837444472f326810d04c68f8f8f5 100644
--- a/doc/tex/attribute.tex
+++ b/doc/tex/attribute.tex
@@ -1,7 +1,7 @@
 Attributes may be associated with each variable to specify non
 CDI standard properties. CDI standard properties as code, name,
 units, and missing value are directly associated with each variable by
-the corresponding CDI function (e.g. {\htmlref{\tt vlistDefVarName}{vlistDefVarName}}).
+the corresponding CDI function (e.g. {\htmlref{\texttt{vlistDefVarName}}{vlistDefVarName}}).
 An attribute has a variable to which it is assigned, a name, a type,
 a length, and a sequence of one or more values.
 The attributes have to be defined after the variable is created and 
@@ -17,11 +17,11 @@ by the following predefined constants:
 
 \vspace*{3mm}
 \hspace*{8mm}\begin{minipage}{15cm}
-\begin{deflist}{{\large\tt CDI\_DATATYPE\_TXT \ \ }}
-\item[{\large\tt CDI\_DATATYPE\_INT16}]   16-bit integer attribute
-\item[{\large\tt CDI\_DATATYPE\_INT32}]   32-bit integer attribute
-\item[{\large\tt CDI\_DATATYPE\_FLT32}]   32-bit floating point attribute
-\item[{\large\tt CDI\_DATATYPE\_FLT64}]   64-bit floating point attribute
-\item[{\large\tt CDI\_DATATYPE\_TXT}]     Text attribute
+\begin{deflist}{\large\texttt{CDI\_DATATYPE\_TXT \ \ }}
+\item[\large\texttt{CDI\_DATATYPE\_INT16}]   16-bit integer attribute
+\item[\large\texttt{CDI\_DATATYPE\_INT32}]   32-bit integer attribute
+\item[\large\texttt{CDI\_DATATYPE\_FLT32}]   32-bit floating point attribute
+\item[\large\texttt{CDI\_DATATYPE\_FLT64}]   64-bit floating point attribute
+\item[\large\texttt{CDI\_DATATYPE\_TXT}]     Text attribute
 \end{deflist}
 \end{minipage}
diff --git a/doc/tex/c_cdi_att.tex b/doc/tex/c_cdi_att.tex
index 5d588e7d70d68a2ceab8190037e01716ff2e96f8..1e24ca3c754fa0d5a188129a8c8f29295746199e 100644
--- a/doc/tex/c_cdi_att.tex
+++ b/doc/tex/c_cdi_att.tex
@@ -1,10 +1,10 @@
 
 
-\subsection{Get number of attributes: {\tt cdiInqNatts}}
+\subsection{Get number of attributes: \texttt{cdiInqNatts}}
 \index{cdiInqNatts}
 \label{cdiInqNatts}
 
-The function {\tt cdiInqNatts} gets the number of attributes assigned to this variable.
+The function {\texttt{cdiInqNatts}} gets the number of attributes assigned to this variable.
 
 \subsubsection*{Usage}
 
@@ -13,23 +13,23 @@ The function {\tt cdiInqNatts} gets the number of attributes assigned to this va
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt nattsp\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}, {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt nattsp}]
+\begin{deflist}{\texttt{nattsp}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{nattsp}]
 Pointer to location for returned number of attributes.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get information about an attribute: {\tt cdiInqAtt}}
+\subsection{Get information about an attribute: \texttt{cdiInqAtt}}
 \index{cdiInqAtt}
 \label{cdiInqAtt}
 
-The function {\tt cdiInqAtt} gets information about an attribute.
+The function {\texttt{cdiInqAtt}} gets information about an attribute.
 
 \subsubsection*{Usage}
 
@@ -38,31 +38,31 @@ The function {\tt cdiInqAtt} gets information about an attribute.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt attnum\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}, {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt attnum}]
+\begin{deflist}{\texttt{attnum}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{attnum}]
 Attribute number (from 0 to natts-1).
-\item[{\tt name}]
+\item[\texttt{name}]
 Pointer to the location for the returned attribute name. 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}.
-\item[{\tt typep}]
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
+\item[\texttt{typep}]
 Pointer to location for returned attribute type.
-\item[{\tt lenp}]
+\item[\texttt{lenp}]
 Pointer to location for returned attribute number.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Define an integer attribute: {\tt cdiDefAttInt}}
+\subsection{Define an integer attribute: \texttt{cdiDefAttInt}}
 \index{cdiDefAttInt}
 \label{cdiDefAttInt}
 
-The function {\tt cdiDefAttInt} defines an integer attribute.
+The function {\texttt{cdiDefAttInt}} defines an integer attribute.
 
 \subsubsection*{Usage}
 
@@ -72,29 +72,29 @@ The function {\tt cdiDefAttInt} defines an integer attribute.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt cdiID\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt name}]
+\begin{deflist}{\texttt{cdiID}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{name}]
 Attribute name.
-\item[{\tt type}]
-External data type ({\tt CDI\_DATATYPE\_INT16} or {\tt CDI\_DATATYPE\_INT32}).
-\item[{\tt len}]
+\item[\texttt{type}]
+External data type ({\texttt{CDI\_DATATYPE\_INT16}} or {\texttt{CDI\_DATATYPE\_INT32}}).
+\item[\texttt{len}]
 Number of values provided for the attribute.
-\item[{\tt ip}]
+\item[\texttt{ip}]
 Pointer to one or more integer values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the value(s) of an integer attribute: {\tt cdiInqAttInt}}
+\subsection{Get the value(s) of an integer attribute: \texttt{cdiInqAttInt}}
 \index{cdiInqAttInt}
 \label{cdiInqAttInt}
 
-The function {\tt cdiInqAttInt} gets the values(s) of an integer attribute.
+The function {\texttt{cdiInqAttInt}} gets the values(s) of an integer attribute.
 
 \subsubsection*{Usage}
 
@@ -103,27 +103,27 @@ The function {\tt cdiInqAttInt} gets the values(s) of an integer attribute.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt cdiID\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}, {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt name}]
+\begin{deflist}{\texttt{cdiID}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{name}]
 Attribute name.
-\item[{\tt mlen}]
+\item[\texttt{mlen}]
 Number of allocated values provided for the attribute.
-\item[{\tt ip}]
+\item[\texttt{ip}]
 Pointer location for returned integer attribute value(s).
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Define a floating point attribute: {\tt cdiDefAttFlt}}
+\subsection{Define a floating point attribute: \texttt{cdiDefAttFlt}}
 \index{cdiDefAttFlt}
 \label{cdiDefAttFlt}
 
-The function {\tt cdiDefAttFlt} defines a floating point attribute.
+The function {\texttt{cdiDefAttFlt}} defines a floating point attribute.
 
 \subsubsection*{Usage}
 
@@ -133,29 +133,29 @@ The function {\tt cdiDefAttFlt} defines a floating point attribute.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt cdiID\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt name}]
+\begin{deflist}{\texttt{cdiID}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{name}]
 Attribute name.
-\item[{\tt type}]
-External data type ({\tt CDI\_DATATYPE\_FLT32} or {\tt CDI\_DATATYPE\_FLT64}).
-\item[{\tt len}]
+\item[\texttt{type}]
+External data type ({\texttt{CDI\_DATATYPE\_FLT32}} or {\texttt{CDI\_DATATYPE\_FLT64}}).
+\item[\texttt{len}]
 Number of values provided for the attribute.
-\item[{\tt dp}]
+\item[\texttt{dp}]
 Pointer to one or more floating point values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the value(s) of a floating point attribute: {\tt cdiInqAttFlt}}
+\subsection{Get the value(s) of a floating point attribute: \texttt{cdiInqAttFlt}}
 \index{cdiInqAttFlt}
 \label{cdiInqAttFlt}
 
-The function {\tt cdiInqAttFlt} gets the values(s) of a floating point attribute.
+The function {\texttt{cdiInqAttFlt}} gets the values(s) of a floating point attribute.
 
 \subsubsection*{Usage}
 
@@ -164,27 +164,27 @@ The function {\tt cdiInqAttFlt} gets the values(s) of a floating point attribute
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt cdiID\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}, {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt name}]
+\begin{deflist}{\texttt{cdiID}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{name}]
 Attribute name.
-\item[{\tt mlen}]
+\item[\texttt{mlen}]
 Number of allocated values provided for the attribute.
-\item[{\tt dp}]
+\item[\texttt{dp}]
 Pointer location for returned floating point attribute value(s).
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Define a text attribute: {\tt cdiDefAttTxt}}
+\subsection{Define a text attribute: \texttt{cdiDefAttTxt}}
 \index{cdiDefAttTxt}
 \label{cdiDefAttTxt}
 
-The function {\tt cdiDefAttTxt} defines a text attribute.
+The function {\texttt{cdiDefAttTxt}} defines a text attribute.
 
 \subsubsection*{Usage}
 
@@ -193,27 +193,27 @@ The function {\tt cdiDefAttTxt} defines a text attribute.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt cdiID\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt name}]
+\begin{deflist}{\texttt{cdiID}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{name}]
 Attribute name.
-\item[{\tt len}]
+\item[\texttt{len}]
 Number of values provided for the attribute.
-\item[{\tt tp}]
+\item[\texttt{tp}]
 Pointer to one or more character values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the value(s) of a text attribute: {\tt cdiInqAttTxt}}
+\subsection{Get the value(s) of a text attribute: \texttt{cdiInqAttTxt}}
 \index{cdiInqAttTxt}
 \label{cdiInqAttTxt}
 
-The function {\tt cdiInqAttTxt} gets the values(s) of a text attribute.
+The function {\texttt{cdiInqAttTxt}} gets the values(s) of a text attribute.
 
 \subsubsection*{Usage}
 
@@ -222,16 +222,16 @@ The function {\tt cdiInqAttTxt} gets the values(s) of a text attribute.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt cdiID\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}, {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt name}]
+\begin{deflist}{\texttt{cdiID}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{name}]
 Attribute name.
-\item[{\tt mlen}]
+\item[\texttt{mlen}]
 Number of allocated values provided for the attribute.
-\item[{\tt tp}]
+\item[\texttt{tp}]
 Pointer location for returned text attribute value(s).
 
 \end{deflist}
diff --git a/doc/tex/c_examples.tex b/doc/tex/c_examples.tex
index 836f07ce6f655c91f356de65e10912d0fb0d420d..83fd331c9e86818c54f16b4b8ead98a176322e29 100644
--- a/doc/tex/c_examples.tex
+++ b/doc/tex/c_examples.tex
@@ -19,7 +19,7 @@ levels. Both variables are on the same lon/lat grid.
 
 \subsection{Result}
 
-This is the {\tt ncdump -h} output of the resulting NetCDF file {\tt example.nc}.
+This is the \texttt{ncdump -h} output of the resulting NetCDF file \texttt{example.nc}.
 
 \begin{lstlisting}[]
 netcdf example {
@@ -59,7 +59,7 @@ data:
 
 \section{Read a dataset}
 
-This example reads the NetCDF file {\tt example.nc} from \htmlref{Appendix B.1}{example_write}.
+This example reads the NetCDF file \texttt{example.nc} from \htmlref{Appendix B.1}{example_write}.
 
 \lstinputlisting[language=C]
 {../../examples/cdi_read.c}
@@ -67,9 +67,9 @@ This example reads the NetCDF file {\tt example.nc} from \htmlref{Appendix B.1}{
 
 \section{Copy a dataset}
 
-This example reads the NetCDF file {\tt example.nc} from \htmlref{Appendix B.1}{example_write}
+This example reads the NetCDF file \texttt{example.nc} from \htmlref{Appendix B.1}{example_write}
 and writes the result to a GRIB dataset by simple setting the output file type
-to {\tt CDI\_FILETYPE\_GRB}.
+to \texttt{CDI\_FILETYPE\_GRB}.
 
 \lstinputlisting[language=C]
 {../../examples/cdi_copy.c}
diff --git a/doc/tex/c_grid.tex b/doc/tex/c_grid.tex
index 053860c8a10ce03825b6c153f72f5fa8bdf80484..0196bfcf0b8d74eb1571759813cdf3f208bf54d5 100644
--- a/doc/tex/c_grid.tex
+++ b/doc/tex/c_grid.tex
@@ -1,10 +1,10 @@
 
 
-\subsection{Create a horizontal Grid: {\tt gridCreate}}
+\subsection{Create a horizontal Grid: \texttt{gridCreate}}
 \index{gridCreate}
 \label{gridCreate}
 
-The function {\tt gridCreate} creates a horizontal Grid.
+The function {\texttt{gridCreate}} creates a horizontal Grid.
 
 \subsubsection*{Usage}
 
@@ -13,13 +13,13 @@ The function {\tt gridCreate} creates a horizontal Grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridtype\ }
-\item[{\tt gridtype}]
+\begin{deflist}{\texttt{gridtype}\ }
+\item[\texttt{gridtype}]
 The type of the grid, one of the set of predefined {\CDI} grid types.
-                     The valid {\CDI} grid types are {\tt GRID\_GENERIC}, {\tt GRID\_GAUSSIAN},
-                     {\tt GRID\_LONLAT}, {\tt GRID\_LCC}, {\tt GRID\_SPECTRAL},
-                     {\tt GRID\_GME}, {\tt GRID\_CURVILINEAR} and {\tt GRID\_UNSTRUCTURED}.
-\item[{\tt size}]
+                     The valid {\CDI} grid types are {\texttt{GRID\_GENERIC}}, {\texttt{GRID\_GAUSSIAN}},
+                     {\texttt{GRID\_LONLAT}}, {\texttt{GRID\_PROJECTION}}, {\texttt{GRID\_SPECTRAL}},
+                     {\texttt{GRID\_GME}}, {\texttt{GRID\_CURVILINEAR}} and {\texttt{GRID\_UNSTRUCTURED}}.
+\item[\texttt{size}]
 Number of gridpoints.
 
 \end{deflist}
@@ -27,12 +27,12 @@ Number of gridpoints.
 
 \subsubsection*{Result}
 
-{\tt gridCreate} returns an identifier to the Grid.
+{\texttt{gridCreate}} returns an identifier to the Grid.
 
 
 \subsubsection*{Example}
 
-Here is an example using {\tt gridCreate} to create a regular lon/lat Grid:
+Here is an example using {\texttt{gridCreate}} to create a regular lon/lat Grid:
 
 \begin{lstlisting}[language=C, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
 
@@ -54,7 +54,7 @@ Here is an example using {\tt gridCreate} to create a regular lon/lat Grid:
 \end{lstlisting}
 
 
-\subsection{Destroy a horizontal Grid: {\tt gridDestroy}}
+\subsection{Destroy a horizontal Grid: \texttt{gridDestroy}}
 \index{gridDestroy}
 \label{gridDestroy}
 \subsubsection*{Usage}
@@ -64,19 +64,19 @@ Here is an example using {\tt gridCreate} to create a regular lon/lat Grid:
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Duplicate a horizontal Grid: {\tt gridDuplicate}}
+\subsection{Duplicate a horizontal Grid: \texttt{gridDuplicate}}
 \index{gridDuplicate}
 \label{gridDuplicate}
 
-The function {\tt gridDuplicate} duplicates a horizontal Grid.
+The function {\texttt{gridDuplicate}} duplicates a horizontal Grid.
 
 \subsubsection*{Usage}
 
@@ -85,24 +85,24 @@ The function {\tt gridDuplicate} duplicates a horizontal Grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridDuplicate} returns an identifier to the duplicated Grid.
+{\texttt{gridDuplicate}} returns an identifier to the duplicated Grid.
 
 
 
-\subsection{Get the type of a Grid: {\tt gridInqType}}
+\subsection{Get the type of a Grid: \texttt{gridInqType}}
 \index{gridInqType}
 \label{gridInqType}
 
-The function {\tt gridInqType} returns the type of a Grid.
+The function {\texttt{gridInqType}} returns the type of a Grid.
 
 \subsubsection*{Usage}
 
@@ -111,28 +111,28 @@ The function {\tt gridInqType} returns the type of a Grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqType} returns the type of the grid,
+{\texttt{gridInqType}} returns the type of the grid,
 one of the set of predefined {\CDI} grid types.
-The valid {\CDI} grid types are {\tt GRID\_GENERIC}, {\tt GRID\_GAUSSIAN},
-{\tt GRID\_LONLAT}, {\tt GRID\_LCC}, {\tt GRID\_SPECTRAL}, {\tt GRID\_GME},
-{\tt GRID\_CURVILINEAR} and {\tt GRID\_UNSTRUCTURED}.
+The valid {\CDI} grid types are {\texttt{GRID\_GENERIC}}, {\texttt{GRID\_GAUSSIAN}},
+{\texttt{GRID\_LONLAT}}, {\texttt{GRID\_PROJECTION}}, {\texttt{GRID\_SPECTRAL}}, {\texttt{GRID\_GME}},
+{\texttt{GRID\_CURVILINEAR}} and {\texttt{GRID\_UNSTRUCTURED}}.
 
 
 
-\subsection{Get the size of a Grid: {\tt gridInqSize}}
+\subsection{Get the size of a Grid: \texttt{gridInqSize}}
 \index{gridInqSize}
 \label{gridInqSize}
 
-The function {\tt gridInqSize} returns the size of a Grid.
+The function {\texttt{gridInqSize}} returns the size of a Grid.
 
 \subsubsection*{Usage}
 
@@ -141,24 +141,24 @@ The function {\tt gridInqSize} returns the size of a Grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqSize} returns the number of grid points of a Grid.
+{\texttt{gridInqSize}} returns the number of grid points of a Grid.
 
 
 
-\subsection{Define the number of values of a X-axis: {\tt gridDefXsize}}
+\subsection{Define the number of values of a X-axis: \texttt{gridDefXsize}}
 \index{gridDefXsize}
 \label{gridDefXsize}
 
-The function {\tt gridDefXsize} defines the number of values of a X-axis.
+The function {\texttt{gridDefXsize}} defines the number of values of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -167,21 +167,21 @@ The function {\tt gridDefXsize} defines the number of values of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt xsize}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{xsize}]
 Number of values of a X-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the number of values of a X-axis: {\tt gridInqXsize}}
+\subsection{Get the number of values of a X-axis: \texttt{gridInqXsize}}
 \index{gridInqXsize}
 \label{gridInqXsize}
 
-The function {\tt gridInqXsize} returns the number of values of a X-axis.
+The function {\texttt{gridInqXsize}} returns the number of values of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -190,24 +190,24 @@ The function {\tt gridInqXsize} returns the number of values of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqXsize} returns the number of values of a X-axis.
+{\texttt{gridInqXsize}} returns the number of values of a X-axis.
 
 
 
-\subsection{Define the number of values of a Y-axis: {\tt gridDefYsize}}
+\subsection{Define the number of values of a Y-axis: \texttt{gridDefYsize}}
 \index{gridDefYsize}
 \label{gridDefYsize}
 
-The function {\tt gridDefYsize} defines the number of values of a Y-axis.
+The function {\texttt{gridDefYsize}} defines the number of values of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -216,21 +216,21 @@ The function {\tt gridDefYsize} defines the number of values of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt ysize}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{ysize}]
 Number of values of a Y-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the number of values of a Y-axis: {\tt gridInqYsize}}
+\subsection{Get the number of values of a Y-axis: \texttt{gridInqYsize}}
 \index{gridInqYsize}
 \label{gridInqYsize}
 
-The function {\tt gridInqYsize} returns the number of values of a Y-axis.
+The function {\texttt{gridInqYsize}} returns the number of values of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -239,24 +239,24 @@ The function {\tt gridInqYsize} returns the number of values of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqYsize} returns the number of values of a Y-axis.
+{\texttt{gridInqYsize}} returns the number of values of a Y-axis.
 
 
 
-\subsection{Define the number of parallels between a pole and the equator: {\tt gridDefNP}}
+\subsection{Define the number of parallels between a pole and the equator: \texttt{gridDefNP}}
 \index{gridDefNP}
 \label{gridDefNP}
 
-The function {\tt gridDefNP} defines the number of parallels between a pole and the equator
+The function {\texttt{gridDefNP}} defines the number of parallels between a pole and the equator
 of a Gaussian grid.
 
 \subsubsection*{Usage}
@@ -266,21 +266,21 @@ of a Gaussian grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt np}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{np}]
 Number of parallels between a pole and the equator.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the number of parallels between a pole and the equator: {\tt gridInqNP}}
+\subsection{Get the number of parallels between a pole and the equator: \texttt{gridInqNP}}
 \index{gridInqNP}
 \label{gridInqNP}
 
-The function {\tt gridInqNP} returns the number of parallels between a pole and the equator
+The function {\texttt{gridInqNP}} returns the number of parallels between a pole and the equator
 of a Gaussian grid.
 
 \subsubsection*{Usage}
@@ -290,24 +290,24 @@ of a Gaussian grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqNP} returns the number of parallels between a pole and the equator.
+{\texttt{gridInqNP}} returns the number of parallels between a pole and the equator.
 
 
 
-\subsection{Define the values of a X-axis: {\tt gridDefXvals}}
+\subsection{Define the values of a X-axis: \texttt{gridDefXvals}}
 \index{gridDefXvals}
 \label{gridDefXvals}
 
-The function {\tt gridDefXvals} defines all values of the X-axis.
+The function {\texttt{gridDefXvals}} defines all values of the X-axis.
 
 \subsubsection*{Usage}
 
@@ -316,21 +316,21 @@ The function {\tt gridDefXvals} defines all values of the X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt xvals}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{xvals}]
 X-values of the grid.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get all values of a X-axis: {\tt gridInqXvals}}
+\subsection{Get all values of a X-axis: \texttt{gridInqXvals}}
 \index{gridInqXvals}
 \label{gridInqXvals}
 
-The function {\tt gridInqXvals} returns all values of the X-axis.
+The function {\texttt{gridInqXvals}} returns all values of the X-axis.
 
 \subsubsection*{Usage}
 
@@ -339,10 +339,10 @@ The function {\tt gridInqXvals} returns all values of the X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt xvals}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{xvals}]
 Pointer to the location into which the X-values are read.
                     The caller must allocate space for the returned values.
 
@@ -351,17 +351,17 @@ Pointer to the location into which the X-values are read.
 
 \subsubsection*{Result}
 
-Upon successful completion {\tt gridInqXvals} returns the number of values and
-the values are stored in {\tt xvals}.
-Otherwise, 0 is returned and {\tt xvals} is empty.
+Upon successful completion {\texttt{gridInqXvals}} returns the number of values and
+the values are stored in {\texttt{xvals}}.
+Otherwise, 0 is returned and {\texttt{xvals}} is empty.
 
 
 
-\subsection{Define the values of a Y-axis: {\tt gridDefYvals}}
+\subsection{Define the values of a Y-axis: \texttt{gridDefYvals}}
 \index{gridDefYvals}
 \label{gridDefYvals}
 
-The function {\tt gridDefYvals} defines all values of the Y-axis.
+The function {\texttt{gridDefYvals}} defines all values of the Y-axis.
 
 \subsubsection*{Usage}
 
@@ -370,21 +370,21 @@ The function {\tt gridDefYvals} defines all values of the Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt yvals}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{yvals}]
 Y-values of the grid.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get all values of a Y-axis: {\tt gridInqYvals}}
+\subsection{Get all values of a Y-axis: \texttt{gridInqYvals}}
 \index{gridInqYvals}
 \label{gridInqYvals}
 
-The function {\tt gridInqYvals} returns all values of the Y-axis.
+The function {\texttt{gridInqYvals}} returns all values of the Y-axis.
 
 \subsubsection*{Usage}
 
@@ -393,10 +393,10 @@ The function {\tt gridInqYvals} returns all values of the Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt yvals}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{yvals}]
 Pointer to the location into which the Y-values are read.
                     The caller must allocate space for the returned values.
 
@@ -405,17 +405,17 @@ Pointer to the location into which the Y-values are read.
 
 \subsubsection*{Result}
 
-Upon successful completion {\tt gridInqYvals} returns the number of values and
-the values are stored in {\tt yvals}.
-Otherwise, 0 is returned and {\tt yvals} is empty.
+Upon successful completion {\texttt{gridInqYvals}} returns the number of values and
+the values are stored in {\texttt{yvals}}.
+Otherwise, 0 is returned and {\texttt{yvals}} is empty.
 
 
 
-\subsection{Define the bounds of a X-axis: {\tt gridDefXbounds}}
+\subsection{Define the bounds of a X-axis: \texttt{gridDefXbounds}}
 \index{gridDefXbounds}
 \label{gridDefXbounds}
 
-The function {\tt gridDefXbounds} defines all bounds of the X-axis.
+The function {\texttt{gridDefXbounds}} defines all bounds of the X-axis.
 
 \subsubsection*{Usage}
 
@@ -424,21 +424,21 @@ The function {\tt gridDefXbounds} defines all bounds of the X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt xbounds\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt xbounds}]
+\begin{deflist}{\texttt{xbounds}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{xbounds}]
 X-bounds of the grid.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the bounds of a X-axis: {\tt gridInqXbounds}}
+\subsection{Get the bounds of a X-axis: \texttt{gridInqXbounds}}
 \index{gridInqXbounds}
 \label{gridInqXbounds}
 
-The function {\tt gridInqXbounds} returns the bounds of the X-axis.
+The function {\texttt{gridInqXbounds}} returns the bounds of the X-axis.
 
 \subsubsection*{Usage}
 
@@ -447,10 +447,10 @@ The function {\tt gridInqXbounds} returns the bounds of the X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt xbounds\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt xbounds}]
+\begin{deflist}{\texttt{xbounds}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{xbounds}]
 Pointer to the location into which the X-bounds are read.
                     The caller must allocate space for the returned values.
 
@@ -459,17 +459,17 @@ Pointer to the location into which the X-bounds are read.
 
 \subsubsection*{Result}
 
-Upon successful completion {\tt gridInqXbounds} returns the number of bounds and
-the bounds are stored in {\tt xbounds}.
-Otherwise, 0 is returned and {\tt xbounds} is empty.
+Upon successful completion {\texttt{gridInqXbounds}} returns the number of bounds and
+the bounds are stored in {\texttt{xbounds}}.
+Otherwise, 0 is returned and {\texttt{xbounds}} is empty.
 
 
 
-\subsection{Define the bounds of a Y-axis: {\tt gridDefYbounds}}
+\subsection{Define the bounds of a Y-axis: \texttt{gridDefYbounds}}
 \index{gridDefYbounds}
 \label{gridDefYbounds}
 
-The function {\tt gridDefYbounds} defines all bounds of the Y-axis.
+The function {\texttt{gridDefYbounds}} defines all bounds of the Y-axis.
 
 \subsubsection*{Usage}
 
@@ -478,21 +478,21 @@ The function {\tt gridDefYbounds} defines all bounds of the Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt ybounds\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt ybounds}]
+\begin{deflist}{\texttt{ybounds}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{ybounds}]
 Y-bounds of the grid.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the bounds of a Y-axis: {\tt gridInqYbounds}}
+\subsection{Get the bounds of a Y-axis: \texttt{gridInqYbounds}}
 \index{gridInqYbounds}
 \label{gridInqYbounds}
 
-The function {\tt gridInqYbounds} returns the bounds of the Y-axis.
+The function {\texttt{gridInqYbounds}} returns the bounds of the Y-axis.
 
 \subsubsection*{Usage}
 
@@ -501,10 +501,10 @@ The function {\tt gridInqYbounds} returns the bounds of the Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt ybounds\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt ybounds}]
+\begin{deflist}{\texttt{ybounds}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{ybounds}]
 Pointer to the location into which the Y-bounds are read.
                     The caller must allocate space for the returned values.
 
@@ -513,17 +513,17 @@ Pointer to the location into which the Y-bounds are read.
 
 \subsubsection*{Result}
 
-Upon successful completion {\tt gridInqYbounds} returns the number of bounds and
-the bounds are stored in {\tt ybounds}.
-Otherwise, 0 is returned and {\tt ybounds} is empty.
+Upon successful completion {\texttt{gridInqYbounds}} returns the number of bounds and
+the bounds are stored in {\texttt{ybounds}}.
+Otherwise, 0 is returned and {\texttt{ybounds}} is empty.
 
 
 
-\subsection{Define the name of a X-axis: {\tt gridDefXname}}
+\subsection{Define the name of a X-axis: \texttt{gridDefXname}}
 \index{gridDefXname}
 \label{gridDefXname}
 
-The function {\tt gridDefXname} defines the name of a X-axis.
+The function {\texttt{gridDefXname}} defines the name of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -532,21 +532,21 @@ The function {\tt gridDefXname} defines the name of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt name}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{name}]
 Name of the X-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the name of a X-axis: {\tt gridInqXname}}
+\subsection{Get the name of a X-axis: \texttt{gridInqXname}}
 \index{gridInqXname}
 \label{gridInqXname}
 
-The function {\tt gridInqXname} returns the name of a X-axis.
+The function {\texttt{gridInqXname}} returns the name of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -555,28 +555,28 @@ The function {\tt gridInqXname} returns the name of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt name}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{name}]
 Name of the X-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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqXname} returns the name of the X-axis to the parameter name.
+{\texttt{gridInqXname}} returns the name of the X-axis to the parameter name.
 
 
 
-\subsection{Define the longname of a X-axis: {\tt gridDefXlongname}}
+\subsection{Define the longname of a X-axis: \texttt{gridDefXlongname}}
 \index{gridDefXlongname}
 \label{gridDefXlongname}
 
-The function {\tt gridDefXlongname} defines the longname of a X-axis.
+The function {\texttt{gridDefXlongname}} defines the longname of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -585,21 +585,21 @@ The function {\tt gridDefXlongname} defines the longname of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt longname\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt longname}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{longname}]
 Longname of the X-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the longname of a X-axis: {\tt gridInqXlongname}}
+\subsection{Get the longname of a X-axis: \texttt{gridInqXlongname}}
 \index{gridInqXlongname}
 \label{gridInqXlongname}
 
-The function {\tt gridInqXlongname} returns the longname of a X-axis.
+The function {\texttt{gridInqXlongname}} returns the longname of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -608,28 +608,28 @@ The function {\tt gridInqXlongname} returns the longname of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt longname\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt longname}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{longname}]
 Longname of the X-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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqXlongname} returns the longname of the X-axis to the parameter longname.
+{\texttt{gridInqXlongname}} returns the longname of the X-axis to the parameter longname.
 
 
 
-\subsection{Define the units of a X-axis: {\tt gridDefXunits}}
+\subsection{Define the units of a X-axis: \texttt{gridDefXunits}}
 \index{gridDefXunits}
 \label{gridDefXunits}
 
-The function {\tt gridDefXunits} defines the units of a X-axis.
+The function {\texttt{gridDefXunits}} defines the units of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -638,21 +638,21 @@ The function {\tt gridDefXunits} defines the units of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt units}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{units}]
 Units of the X-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the units of a X-axis: {\tt gridInqXunits}}
+\subsection{Get the units of a X-axis: \texttt{gridInqXunits}}
 \index{gridInqXunits}
 \label{gridInqXunits}
 
-The function {\tt gridInqXunits} returns the units of a X-axis.
+The function {\texttt{gridInqXunits}} returns the units of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -661,28 +661,28 @@ The function {\tt gridInqXunits} returns the units of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt units}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{units}]
 Units of the X-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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqXunits} returns the units of the X-axis to the parameter units.
+{\texttt{gridInqXunits}} returns the units of the X-axis to the parameter units.
 
 
 
-\subsection{Define the name of a Y-axis: {\tt gridDefYname}}
+\subsection{Define the name of a Y-axis: \texttt{gridDefYname}}
 \index{gridDefYname}
 \label{gridDefYname}
 
-The function {\tt gridDefYname} defines the name of a Y-axis.
+The function {\texttt{gridDefYname}} defines the name of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -691,21 +691,21 @@ The function {\tt gridDefYname} defines the name of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt name}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{name}]
 Name of the Y-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the name of a Y-axis: {\tt gridInqYname}}
+\subsection{Get the name of a Y-axis: \texttt{gridInqYname}}
 \index{gridInqYname}
 \label{gridInqYname}
 
-The function {\tt gridInqYname} returns the name of a Y-axis.
+The function {\texttt{gridInqYname}} returns the name of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -714,28 +714,28 @@ The function {\tt gridInqYname} returns the name of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt name}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{name}]
 Name of the Y-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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqYname} returns the name of the Y-axis to the parameter name.
+{\texttt{gridInqYname}} returns the name of the Y-axis to the parameter name.
 
 
 
-\subsection{Define the longname of a Y-axis: {\tt gridDefYlongname}}
+\subsection{Define the longname of a Y-axis: \texttt{gridDefYlongname}}
 \index{gridDefYlongname}
 \label{gridDefYlongname}
 
-The function {\tt gridDefYlongname} defines the longname of a Y-axis.
+The function {\texttt{gridDefYlongname}} defines the longname of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -744,21 +744,21 @@ The function {\tt gridDefYlongname} defines the longname of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt longname\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt longname}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{longname}]
 Longname of the Y-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the longname of a Y-axis: {\tt gridInqYlongname}}
+\subsection{Get the longname of a Y-axis: \texttt{gridInqYlongname}}
 \index{gridInqYlongname}
 \label{gridInqYlongname}
 
-The function {\tt gridInqYlongname} returns the longname of a Y-axis.
+The function {\texttt{gridInqYlongname}} returns the longname of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -767,28 +767,28 @@ The function {\tt gridInqYlongname} returns the longname of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt longname\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt longname}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{longname}]
 Longname of the Y-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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqYlongname} returns the longname of the Y-axis to the parameter longname.
+{\texttt{gridInqYlongname}} returns the longname of the Y-axis to the parameter longname.
 
 
 
-\subsection{Define the units of a Y-axis: {\tt gridDefYunits}}
+\subsection{Define the units of a Y-axis: \texttt{gridDefYunits}}
 \index{gridDefYunits}
 \label{gridDefYunits}
 
-The function {\tt gridDefYunits} defines the units of a Y-axis.
+The function {\texttt{gridDefYunits}} defines the units of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -797,21 +797,21 @@ The function {\tt gridDefYunits} defines the units of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt units}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{units}]
 Units of the Y-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the units of a Y-axis: {\tt gridInqYunits}}
+\subsection{Get the units of a Y-axis: \texttt{gridInqYunits}}
 \index{gridInqYunits}
 \label{gridInqYunits}
 
-The function {\tt gridInqYunits} returns the units of a Y-axis.
+The function {\texttt{gridInqYunits}} returns the units of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -820,28 +820,28 @@ The function {\tt gridInqYunits} returns the units of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt units}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{units}]
 Units of the Y-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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqYunits} returns the units of the Y-axis to the parameter units.
+{\texttt{gridInqYunits}} returns the units of the Y-axis to the parameter units.
 
 
 
-\subsection{Define the reference number for an unstructured grid: {\tt gridDefNumber}}
+\subsection{Define the reference number for an unstructured grid: \texttt{gridDefNumber}}
 \index{gridDefNumber}
 \label{gridDefNumber}
 
-The function {\tt gridDefNumber} defines the reference number for an unstructured grid.
+The function {\texttt{gridDefNumber}} defines the reference number for an unstructured grid.
 
 \subsubsection*{Usage}
 
@@ -850,21 +850,21 @@ The function {\tt gridDefNumber} defines the reference number for an unstructure
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt number}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{number}]
 Reference number for an unstructured grid.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the reference number to an unstructured grid: {\tt gridInqNumber}}
+\subsection{Get the reference number to an unstructured grid: \texttt{gridInqNumber}}
 \index{gridInqNumber}
 \label{gridInqNumber}
 
-The function {\tt gridInqNumber} returns the reference number to an unstructured grid.
+The function {\texttt{gridInqNumber}} returns the reference number to an unstructured grid.
 
 \subsubsection*{Usage}
 
@@ -873,23 +873,23 @@ The function {\tt gridInqNumber} returns the reference number to an unstructured
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqNumber} returns the reference number to an unstructured grid.
+{\texttt{gridInqNumber}} returns the reference number to an unstructured grid.
 
 
-\subsection{Define the position of grid in the reference file: {\tt gridDefPosition}}
+\subsection{Define the position of grid in the reference file: \texttt{gridDefPosition}}
 \index{gridDefPosition}
 \label{gridDefPosition}
 
-The function {\tt gridDefPosition} defines the position of grid in the reference file.
+The function {\texttt{gridDefPosition}} defines the position of grid in the reference file.
 
 \subsubsection*{Usage}
 
@@ -898,21 +898,21 @@ The function {\tt gridDefPosition} defines the position of grid in the reference
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt position\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt position}]
+\begin{deflist}{\texttt{position}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{position}]
 Position of grid in the reference file.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the position of grid in the reference file: {\tt gridInqPosition}}
+\subsection{Get the position of grid in the reference file: \texttt{gridInqPosition}}
 \index{gridInqPosition}
 \label{gridInqPosition}
 
-The function {\tt gridInqPosition} returns the position of grid in the reference file.
+The function {\texttt{gridInqPosition}} returns the position of grid in the reference file.
 
 \subsubsection*{Usage}
 
@@ -921,23 +921,23 @@ The function {\tt gridInqPosition} returns the position of grid in the reference
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqPosition} returns the position of grid in the reference file.
+{\texttt{gridInqPosition}} returns the position of grid in the reference file.
 
 
-\subsection{Define the reference URI for an unstructured grid: {\tt gridDefReference}}
+\subsection{Define the reference URI for an unstructured grid: \texttt{gridDefReference}}
 \index{gridDefReference}
 \label{gridDefReference}
 
-The function {\tt gridDefReference} defines the reference URI for an unstructured grid.
+The function {\texttt{gridDefReference}} defines the reference URI for an unstructured grid.
 
 \subsubsection*{Usage}
 
@@ -946,21 +946,21 @@ The function {\tt gridDefReference} defines the reference URI for an unstructure
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt reference\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt reference}]
+\begin{deflist}{\texttt{reference}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{reference}]
 Reference URI for an unstructured grid.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the reference URI to an unstructured grid: {\tt gridInqReference}}
+\subsection{Get the reference URI to an unstructured grid: \texttt{gridInqReference}}
 \index{gridInqReference}
 \label{gridInqReference}
 
-The function {\tt gridInqReference} returns the reference URI to an unstructured grid.
+The function {\texttt{gridInqReference}} returns the reference URI to an unstructured grid.
 
 \subsubsection*{Usage}
 
@@ -969,23 +969,23 @@ The function {\tt gridInqReference} returns the reference URI to an unstructured
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqReference} returns the reference URI to an unstructured grid.
+{\texttt{gridInqReference}} returns the reference URI to an unstructured grid.
 
 
-\subsection{Define the UUID for an unstructured grid: {\tt gridDefUUID}}
+\subsection{Define the UUID for an unstructured grid: \texttt{gridDefUUID}}
 \index{gridDefUUID}
 \label{gridDefUUID}
 
-The function {\tt gridDefUUID} defines the UUID for an unstructured grid.
+The function {\texttt{gridDefUUID}} defines the UUID for an unstructured grid.
 
 \subsubsection*{Usage}
 
@@ -994,21 +994,21 @@ The function {\tt gridDefUUID} defines the UUID for an unstructured grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt uuid}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{uuid}]
 UUID for an unstructured grid.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the UUID to an unstructured grid: {\tt gridInqUUID}}
+\subsection{Get the UUID to an unstructured grid: \texttt{gridInqUUID}}
 \index{gridInqUUID}
 \label{gridInqUUID}
 
-The function {\tt gridInqUUID} returns the UUID to an unstructured grid.
+The function {\texttt{gridInqUUID}} returns the UUID to an unstructured grid.
 
 \subsubsection*{Usage}
 
@@ -1017,13 +1017,13 @@ The function {\tt gridInqUUID} returns the UUID to an unstructured grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqUUID} returns the UUID to an unstructured grid to the parameter uuid.
+{\texttt{gridInqUUID}} returns the UUID to an unstructured grid to the parameter uuid.
diff --git a/doc/tex/c_link.tex b/doc/tex/c_link.tex
index b20a3671b2d9a67ceb53bb7618361963772ddbcb..044b20271236c5739b7de358652ee2feb8339d1e 100644
--- a/doc/tex/c_link.tex
+++ b/doc/tex/c_link.tex
@@ -1,24 +1,24 @@
 Every C file that references {\CDI} functions or constants must contain
-an appropriate {\tt include} statement before the first such reference:
+an appropriate \texttt{include} statement before the first such reference:
 
 \begin{verbatim}
    #include "cdi.h"
 \end{verbatim}
 
-Unless the {\tt cdi.h} file is installed in a standard directory where
-C compiler always looks, you must use the {\tt -I} option when invoking
-the compiler, to specify a directory where {\tt cdi.h} is installed, for example:
+Unless the \texttt{cdi.h} file is installed in a standard directory where
+C compiler always looks, you must use the \texttt{-I} option when invoking
+the compiler, to specify a directory where \texttt{cdi.h} is installed, for example:
 
 \begin{verbatim}
    cc -c -I/usr/local/cdi/include myprogram.c
 \end{verbatim}
 
-Alternatively, you could specify an absolute path name in the {\tt include}
+Alternatively, you could specify an absolute path name in the \texttt{include}
 statement, but then your program would not compile on another platform
 where {\CDI} is installed in a different location.
 
 Unless the {\CDI} library is installed in a standard directory where the linker
-always looks, you must use the {\tt -L} and {\tt -l} options to links an object file that
+always looks, you must use the \texttt{-L} and \texttt{-l} options to links an object file that
 uses the {\CDI} library. For example:
 
 \begin{verbatim}
diff --git a/doc/tex/c_ref.tex b/doc/tex/c_ref.tex
index 8392ca6b66f50428334b5952de999234ac7de2c9..99e375caa2b4952e121f4ed1e81249536d673222 100644
--- a/doc/tex/c_ref.tex
+++ b/doc/tex/c_ref.tex
@@ -1,12 +1,12 @@
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiDefAttFlt]{cdiDefAttFlt}
 \else
 cdiDefAttFlt
 \fi
-}
+}}
 \begin{verbatim}
     int cdiDefAttFlt(int cdiID, int varID, const char *name, int type, int len, 
                      const double *dp);
@@ -16,13 +16,13 @@ Define a floating point attribute
 \ifpdfoutput{}{(\ref{cdiDefAttFlt})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiDefAttInt]{cdiDefAttInt}
 \else
 cdiDefAttInt
 \fi
-}
+}}
 \begin{verbatim}
     int cdiDefAttInt(int cdiID, int varID, const char *name, int type, int len, 
                      const int *ip);
@@ -32,13 +32,13 @@ Define an integer attribute
 \ifpdfoutput{}{(\ref{cdiDefAttInt})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiDefAttTxt]{cdiDefAttTxt}
 \else
 cdiDefAttTxt
 \fi
-}
+}}
 \begin{verbatim}
     int cdiDefAttTxt(int cdiID, int varID, const char *name, int len, const char *tp);
 \end{verbatim}
@@ -47,13 +47,13 @@ Define a text attribute
 \ifpdfoutput{}{(\ref{cdiDefAttTxt})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiInqAtt]{cdiInqAtt}
 \else
 cdiInqAtt
 \fi
-}
+}}
 \begin{verbatim}
     int cdiInqAtt(int cdiID, int varID, int attnum, char *name, int *typep, int *lenp);
 \end{verbatim}
@@ -62,13 +62,13 @@ Get information about an attribute
 \ifpdfoutput{}{(\ref{cdiInqAtt})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiInqAttFlt]{cdiInqAttFlt}
 \else
 cdiInqAttFlt
 \fi
-}
+}}
 \begin{verbatim}
     int cdiInqAttFlt(int cdiID, int varID, const char *name, int mlen, double *dp);
 \end{verbatim}
@@ -77,13 +77,13 @@ Get the value(s) of a floating point attribute
 \ifpdfoutput{}{(\ref{cdiInqAttFlt})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiInqAttInt]{cdiInqAttInt}
 \else
 cdiInqAttInt
 \fi
-}
+}}
 \begin{verbatim}
     int cdiInqAttInt(int cdiID, int varID, const char *name, int mlen, int *ip);
 \end{verbatim}
@@ -92,13 +92,13 @@ Get the value(s) of an integer attribute
 \ifpdfoutput{}{(\ref{cdiInqAttInt})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiInqAttTxt]{cdiInqAttTxt}
 \else
 cdiInqAttTxt
 \fi
-}
+}}
 \begin{verbatim}
     int cdiInqAttTxt(int cdiID, int varID, const char *name, int mlen, char *tp);
 \end{verbatim}
@@ -107,13 +107,13 @@ Get the value(s) of a text attribute
 \ifpdfoutput{}{(\ref{cdiInqAttTxt})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiInqNatts]{cdiInqNatts}
 \else
 cdiInqNatts
 \fi
-}
+}}
 \begin{verbatim}
     int cdiInqNatts(int cdiID, int varID, int *nattsp);
 \end{verbatim}
@@ -122,13 +122,13 @@ Get number of attributes
 \ifpdfoutput{}{(\ref{cdiInqNatts})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridCreate]{gridCreate}
 \else
 gridCreate
 \fi
-}
+}}
 \begin{verbatim}
     int gridCreate(int gridtype, int size);
 \end{verbatim}
@@ -137,13 +137,13 @@ Create a horizontal Grid
 \ifpdfoutput{}{(\ref{gridCreate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefNP]{gridDefNP}
 \else
 gridDefNP
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefNP(int gridID, int np);
 \end{verbatim}
@@ -152,13 +152,13 @@ Define the number of parallels between a pole and the equator
 \ifpdfoutput{}{(\ref{gridDefNP})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefNumber]{gridDefNumber}
 \else
 gridDefNumber
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefNumber(int gridID, const int number);
 \end{verbatim}
@@ -167,13 +167,13 @@ Define the reference number for an unstructured grid
 \ifpdfoutput{}{(\ref{gridDefNumber})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefPosition]{gridDefPosition}
 \else
 gridDefPosition
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefPosition(int gridID, const int position);
 \end{verbatim}
@@ -182,13 +182,13 @@ Define the position of grid in the reference file
 \ifpdfoutput{}{(\ref{gridDefPosition})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefReference]{gridDefReference}
 \else
 gridDefReference
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefReference(int gridID, const char *reference);
 \end{verbatim}
@@ -197,13 +197,13 @@ Define the reference URI for an unstructured grid
 \ifpdfoutput{}{(\ref{gridDefReference})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefUUID]{gridDefUUID}
 \else
 gridDefUUID
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefUUID(int gridID, const char *uuid);
 \end{verbatim}
@@ -212,13 +212,13 @@ Define the UUID for an unstructured grid
 \ifpdfoutput{}{(\ref{gridDefUUID})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefXbounds]{gridDefXbounds}
 \else
 gridDefXbounds
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefXbounds(int gridID, const double *xbounds);
 \end{verbatim}
@@ -227,13 +227,13 @@ Define the bounds of a X-axis
 \ifpdfoutput{}{(\ref{gridDefXbounds})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefXlongname]{gridDefXlongname}
 \else
 gridDefXlongname
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefXlongname(int gridID, const char *longname);
 \end{verbatim}
@@ -242,13 +242,13 @@ Define the longname of a X-axis
 \ifpdfoutput{}{(\ref{gridDefXlongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefXname]{gridDefXname}
 \else
 gridDefXname
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefXname(int gridID, const char *name);
 \end{verbatim}
@@ -257,13 +257,13 @@ Define the name of a X-axis
 \ifpdfoutput{}{(\ref{gridDefXname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefXsize]{gridDefXsize}
 \else
 gridDefXsize
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefXsize(int gridID, int xsize);
 \end{verbatim}
@@ -272,13 +272,13 @@ Define the number of values of a X-axis
 \ifpdfoutput{}{(\ref{gridDefXsize})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefXunits]{gridDefXunits}
 \else
 gridDefXunits
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefXunits(int gridID, const char *units);
 \end{verbatim}
@@ -287,13 +287,13 @@ Define the units of a X-axis
 \ifpdfoutput{}{(\ref{gridDefXunits})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefXvals]{gridDefXvals}
 \else
 gridDefXvals
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefXvals(int gridID, const double *xvals);
 \end{verbatim}
@@ -302,13 +302,13 @@ Define the values of a X-axis
 \ifpdfoutput{}{(\ref{gridDefXvals})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefYbounds]{gridDefYbounds}
 \else
 gridDefYbounds
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefYbounds(int gridID, const double *ybounds);
 \end{verbatim}
@@ -317,13 +317,13 @@ Define the bounds of a Y-axis
 \ifpdfoutput{}{(\ref{gridDefYbounds})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefYlongname]{gridDefYlongname}
 \else
 gridDefYlongname
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefYlongname(int gridID, const char *longname);
 \end{verbatim}
@@ -332,13 +332,13 @@ Define the longname of a Y-axis
 \ifpdfoutput{}{(\ref{gridDefYlongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefYname]{gridDefYname}
 \else
 gridDefYname
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefYname(int gridID, const char *name);
 \end{verbatim}
@@ -347,13 +347,13 @@ Define the name of a Y-axis
 \ifpdfoutput{}{(\ref{gridDefYname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefYsize]{gridDefYsize}
 \else
 gridDefYsize
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefYsize(int gridID, int ysize);
 \end{verbatim}
@@ -362,13 +362,13 @@ Define the number of values of a Y-axis
 \ifpdfoutput{}{(\ref{gridDefYsize})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefYunits]{gridDefYunits}
 \else
 gridDefYunits
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefYunits(int gridID, const char *units);
 \end{verbatim}
@@ -377,13 +377,13 @@ Define the units of a Y-axis
 \ifpdfoutput{}{(\ref{gridDefYunits})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefYvals]{gridDefYvals}
 \else
 gridDefYvals
 \fi
-}
+}}
 \begin{verbatim}
     void gridDefYvals(int gridID, const double *yvals);
 \end{verbatim}
@@ -392,13 +392,13 @@ Define the values of a Y-axis
 \ifpdfoutput{}{(\ref{gridDefYvals})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDestroy]{gridDestroy}
 \else
 gridDestroy
 \fi
-}
+}}
 \begin{verbatim}
     void gridDestroy(int gridID);
 \end{verbatim}
@@ -407,13 +407,13 @@ Destroy a horizontal Grid
 \ifpdfoutput{}{(\ref{gridDestroy})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDuplicate]{gridDuplicate}
 \else
 gridDuplicate
 \fi
-}
+}}
 \begin{verbatim}
     int gridDuplicate(int gridID);
 \end{verbatim}
@@ -422,13 +422,13 @@ Duplicate a horizontal Grid
 \ifpdfoutput{}{(\ref{gridDuplicate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqNP]{gridInqNP}
 \else
 gridInqNP
 \fi
-}
+}}
 \begin{verbatim}
     int gridInqNP(int gridID);
 \end{verbatim}
@@ -437,13 +437,13 @@ Get the number of parallels between a pole and the equator
 \ifpdfoutput{}{(\ref{gridInqNP})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqNumber]{gridInqNumber}
 \else
 gridInqNumber
 \fi
-}
+}}
 \begin{verbatim}
     int gridInqNumber(int gridID);
 \end{verbatim}
@@ -452,13 +452,13 @@ Get the reference number to an unstructured grid
 \ifpdfoutput{}{(\ref{gridInqNumber})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqPosition]{gridInqPosition}
 \else
 gridInqPosition
 \fi
-}
+}}
 \begin{verbatim}
     int gridInqPosition(int gridID);
 \end{verbatim}
@@ -467,13 +467,13 @@ Get the position of grid in the reference file
 \ifpdfoutput{}{(\ref{gridInqPosition})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqReference]{gridInqReference}
 \else
 gridInqReference
 \fi
-}
+}}
 \begin{verbatim}
     char *gridInqReference(int gridID, char *reference);
 \end{verbatim}
@@ -482,13 +482,13 @@ Get the reference URI to an unstructured grid
 \ifpdfoutput{}{(\ref{gridInqReference})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqSize]{gridInqSize}
 \else
 gridInqSize
 \fi
-}
+}}
 \begin{verbatim}
     int gridInqSize(int gridID);
 \end{verbatim}
@@ -497,13 +497,13 @@ Get the size of a Grid
 \ifpdfoutput{}{(\ref{gridInqSize})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqType]{gridInqType}
 \else
 gridInqType
 \fi
-}
+}}
 \begin{verbatim}
     int gridInqType(int gridID);
 \end{verbatim}
@@ -512,13 +512,13 @@ Get the type of a Grid
 \ifpdfoutput{}{(\ref{gridInqType})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqUUID]{gridInqUUID}
 \else
 gridInqUUID
 \fi
-}
+}}
 \begin{verbatim}
     void gridInqUUID(int gridID, char *uuid);
 \end{verbatim}
@@ -527,13 +527,13 @@ Get the UUID to an unstructured grid
 \ifpdfoutput{}{(\ref{gridInqUUID})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqXbounds]{gridInqXbounds}
 \else
 gridInqXbounds
 \fi
-}
+}}
 \begin{verbatim}
     int gridInqXbounds(int gridID, double *xbounds);
 \end{verbatim}
@@ -542,13 +542,13 @@ Get the bounds of a X-axis
 \ifpdfoutput{}{(\ref{gridInqXbounds})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqXlongname]{gridInqXlongname}
 \else
 gridInqXlongname
 \fi
-}
+}}
 \begin{verbatim}
     void gridInqXlongname(int gridID, char *longname);
 \end{verbatim}
@@ -557,13 +557,13 @@ Get the longname of a X-axis
 \ifpdfoutput{}{(\ref{gridInqXlongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqXname]{gridInqXname}
 \else
 gridInqXname
 \fi
-}
+}}
 \begin{verbatim}
     void gridInqXname(int gridID, char *name);
 \end{verbatim}
@@ -572,13 +572,13 @@ Get the name of a X-axis
 \ifpdfoutput{}{(\ref{gridInqXname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqXsize]{gridInqXsize}
 \else
 gridInqXsize
 \fi
-}
+}}
 \begin{verbatim}
     int gridInqXsize(int gridID);
 \end{verbatim}
@@ -587,13 +587,13 @@ Get the number of values of a X-axis
 \ifpdfoutput{}{(\ref{gridInqXsize})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqXunits]{gridInqXunits}
 \else
 gridInqXunits
 \fi
-}
+}}
 \begin{verbatim}
     void gridInqXunits(int gridID, char *units);
 \end{verbatim}
@@ -602,13 +602,13 @@ Get the units of a X-axis
 \ifpdfoutput{}{(\ref{gridInqXunits})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqXvals]{gridInqXvals}
 \else
 gridInqXvals
 \fi
-}
+}}
 \begin{verbatim}
     int gridInqXvals(int gridID, double *xvals);
 \end{verbatim}
@@ -617,13 +617,13 @@ Get all values of a X-axis
 \ifpdfoutput{}{(\ref{gridInqXvals})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqYbounds]{gridInqYbounds}
 \else
 gridInqYbounds
 \fi
-}
+}}
 \begin{verbatim}
     int gridInqYbounds(int gridID, double *ybounds);
 \end{verbatim}
@@ -632,13 +632,13 @@ Get the bounds of a Y-axis
 \ifpdfoutput{}{(\ref{gridInqYbounds})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqYlongname]{gridInqYlongname}
 \else
 gridInqYlongname
 \fi
-}
+}}
 \begin{verbatim}
     void gridInqYlongname(int gridID, char *longname);
 \end{verbatim}
@@ -647,13 +647,13 @@ Get the longname of a Y-axis
 \ifpdfoutput{}{(\ref{gridInqYlongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqYname]{gridInqYname}
 \else
 gridInqYname
 \fi
-}
+}}
 \begin{verbatim}
     void gridInqYname(int gridID, char *name);
 \end{verbatim}
@@ -662,13 +662,13 @@ Get the name of a Y-axis
 \ifpdfoutput{}{(\ref{gridInqYname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqYsize]{gridInqYsize}
 \else
 gridInqYsize
 \fi
-}
+}}
 \begin{verbatim}
     int gridInqYsize(int gridID);
 \end{verbatim}
@@ -677,13 +677,13 @@ Get the number of values of a Y-axis
 \ifpdfoutput{}{(\ref{gridInqYsize})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqYunits]{gridInqYunits}
 \else
 gridInqYunits
 \fi
-}
+}}
 \begin{verbatim}
     void gridInqYunits(int gridID, char *units);
 \end{verbatim}
@@ -692,13 +692,13 @@ Get the units of a Y-axis
 \ifpdfoutput{}{(\ref{gridInqYunits})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqYvals]{gridInqYvals}
 \else
 gridInqYvals
 \fi
-}
+}}
 \begin{verbatim}
     int gridInqYvals(int gridID, double *yvals);
 \end{verbatim}
@@ -707,13 +707,13 @@ Get all values of a Y-axis
 \ifpdfoutput{}{(\ref{gridInqYvals})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamClose]{streamClose}
 \else
 streamClose
 \fi
-}
+}}
 \begin{verbatim}
     void streamClose(int streamID);
 \end{verbatim}
@@ -722,13 +722,13 @@ Close an open dataset
 \ifpdfoutput{}{(\ref{streamClose})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamDefByteorder]{streamDefByteorder}
 \else
 streamDefByteorder
 \fi
-}
+}}
 \begin{verbatim}
     void streamDefByteorder(int streamID, int byteorder);
 \end{verbatim}
@@ -737,13 +737,13 @@ Define the byte order
 \ifpdfoutput{}{(\ref{streamDefByteorder})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamDefRecord]{streamDefRecord}
 \else
 streamDefRecord
 \fi
-}
+}}
 \begin{verbatim}
     void streamDefRecord(int streamID, int varID, int levelID);
 \end{verbatim}
@@ -752,13 +752,13 @@ Define the next record
 \ifpdfoutput{}{(\ref{streamDefRecord})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamDefTimestep]{streamDefTimestep}
 \else
 streamDefTimestep
 \fi
-}
+}}
 \begin{verbatim}
     int streamDefTimestep(int streamID, int tsID);
 \end{verbatim}
@@ -767,13 +767,13 @@ Define time step
 \ifpdfoutput{}{(\ref{streamDefTimestep})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamDefVlist]{streamDefVlist}
 \else
 streamDefVlist
 \fi
-}
+}}
 \begin{verbatim}
     void streamDefVlist(int streamID, int vlistID);
 \end{verbatim}
@@ -782,13 +782,13 @@ Define the variable list
 \ifpdfoutput{}{(\ref{streamDefVlist})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamInqByteorder]{streamInqByteorder}
 \else
 streamInqByteorder
 \fi
-}
+}}
 \begin{verbatim}
     int streamInqByteorder(int streamID);
 \end{verbatim}
@@ -797,13 +797,13 @@ Get the byte order
 \ifpdfoutput{}{(\ref{streamInqByteorder})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamInqFiletype]{streamInqFiletype}
 \else
 streamInqFiletype
 \fi
-}
+}}
 \begin{verbatim}
     int streamInqFiletype(int streamID);
 \end{verbatim}
@@ -812,13 +812,13 @@ Get the filetype
 \ifpdfoutput{}{(\ref{streamInqFiletype})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamInqTimestep]{streamInqTimestep}
 \else
 streamInqTimestep
 \fi
-}
+}}
 \begin{verbatim}
     int streamInqTimestep(int streamID, int tsID);
 \end{verbatim}
@@ -827,13 +827,13 @@ Get time step
 \ifpdfoutput{}{(\ref{streamInqTimestep})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamInqVlist]{streamInqVlist}
 \else
 streamInqVlist
 \fi
-}
+}}
 \begin{verbatim}
     int streamInqVlist(int streamID);
 \end{verbatim}
@@ -842,13 +842,13 @@ Get the variable list
 \ifpdfoutput{}{(\ref{streamInqVlist})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamOpenRead]{streamOpenRead}
 \else
 streamOpenRead
 \fi
-}
+}}
 \begin{verbatim}
     int streamOpenRead(const char *path);
 \end{verbatim}
@@ -857,13 +857,13 @@ Open a dataset for reading
 \ifpdfoutput{}{(\ref{streamOpenRead})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamOpenWrite]{streamOpenWrite}
 \else
 streamOpenWrite
 \fi
-}
+}}
 \begin{verbatim}
     int streamOpenWrite(const char *path, int filetype);
 \end{verbatim}
@@ -872,13 +872,13 @@ Create a new dataset
 \ifpdfoutput{}{(\ref{streamOpenWrite})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamReadVar]{streamReadVar}
 \else
 streamReadVar
 \fi
-}
+}}
 \begin{verbatim}
     void streamReadVar(int streamID, int varID, double *data, int *nmiss);
 \end{verbatim}
@@ -887,13 +887,13 @@ Read a variable
 \ifpdfoutput{}{(\ref{streamReadVar})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamReadVarF]{streamReadVarF}
 \else
 streamReadVarF
 \fi
-}
+}}
 \begin{verbatim}
     void streamReadVar(int streamID, int varID, float *data, int *nmiss);
 \end{verbatim}
@@ -902,13 +902,13 @@ Read a variable
 \ifpdfoutput{}{(\ref{streamReadVarF})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamReadVarSlice]{streamReadVarSlice}
 \else
 streamReadVarSlice
 \fi
-}
+}}
 \begin{verbatim}
     void streamReadVarSlice(int streamID, int varID, int levelID, double *data, 
                             int *nmiss);
@@ -918,13 +918,13 @@ Read a horizontal slice of a variable
 \ifpdfoutput{}{(\ref{streamReadVarSlice})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamReadVarSliceF]{streamReadVarSliceF}
 \else
 streamReadVarSliceF
 \fi
-}
+}}
 \begin{verbatim}
     void streamReadVarSliceF(int streamID, int varID, int levelID, float *data, 
                              int *nmiss);
@@ -934,13 +934,13 @@ Read a horizontal slice of a variable
 \ifpdfoutput{}{(\ref{streamReadVarSliceF})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamWriteVar]{streamWriteVar}
 \else
 streamWriteVar
 \fi
-}
+}}
 \begin{verbatim}
     void streamWriteVar(int streamID, int varID, const double *data, int nmiss);
 \end{verbatim}
@@ -949,13 +949,13 @@ Write a variable
 \ifpdfoutput{}{(\ref{streamWriteVar})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamWriteVarF]{streamWriteVarF}
 \else
 streamWriteVarF
 \fi
-}
+}}
 \begin{verbatim}
     void streamWriteVarF(int streamID, int varID, const float *data, int nmiss);
 \end{verbatim}
@@ -964,13 +964,13 @@ Write a variable
 \ifpdfoutput{}{(\ref{streamWriteVarF})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamWriteVarSlice]{streamWriteVarSlice}
 \else
 streamWriteVarSlice
 \fi
-}
+}}
 \begin{verbatim}
     void streamWriteVarSlice(int streamID, int varID, int levelID, const double *data, 
                              int nmiss);
@@ -980,13 +980,13 @@ Write a horizontal slice of a variable
 \ifpdfoutput{}{(\ref{streamWriteVarSlice})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamWriteVarSliceF]{streamWriteVarSliceF}
 \else
 streamWriteVarSliceF
 \fi
-}
+}}
 \begin{verbatim}
     void streamWriteVarSliceF(int streamID, int varID, int levelID, const float *data, 
                               int nmiss);
@@ -996,13 +996,13 @@ Write a horizontal slice of a variable
 \ifpdfoutput{}{(\ref{streamWriteVarSliceF})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisCreate]{taxisCreate}
 \else
 taxisCreate
 \fi
-}
+}}
 \begin{verbatim}
     int taxisCreate(int taxistype);
 \end{verbatim}
@@ -1011,13 +1011,13 @@ Create a Time axis
 \ifpdfoutput{}{(\ref{taxisCreate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisDefCalendar]{taxisDefCalendar}
 \else
 taxisDefCalendar
 \fi
-}
+}}
 \begin{verbatim}
     void taxisDefCalendar(int taxisID, int calendar);
 \end{verbatim}
@@ -1026,13 +1026,13 @@ Define the calendar
 \ifpdfoutput{}{(\ref{taxisDefCalendar})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisDefRdate]{taxisDefRdate}
 \else
 taxisDefRdate
 \fi
-}
+}}
 \begin{verbatim}
     void taxisDefRdate(int taxisID, int rdate);
 \end{verbatim}
@@ -1041,13 +1041,13 @@ Define the reference date
 \ifpdfoutput{}{(\ref{taxisDefRdate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisDefRtime]{taxisDefRtime}
 \else
 taxisDefRtime
 \fi
-}
+}}
 \begin{verbatim}
     void taxisDefRtime(int taxisID, int rtime);
 \end{verbatim}
@@ -1056,13 +1056,13 @@ Define the reference time
 \ifpdfoutput{}{(\ref{taxisDefRtime})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisDefVdate]{taxisDefVdate}
 \else
 taxisDefVdate
 \fi
-}
+}}
 \begin{verbatim}
     void taxisDefVdate(int taxisID, int vdate);
 \end{verbatim}
@@ -1071,13 +1071,13 @@ Define the verification date
 \ifpdfoutput{}{(\ref{taxisDefVdate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisDefVtime]{taxisDefVtime}
 \else
 taxisDefVtime
 \fi
-}
+}}
 \begin{verbatim}
     void taxisDefVtime(int taxisID, int vtime);
 \end{verbatim}
@@ -1086,13 +1086,13 @@ Define the verification time
 \ifpdfoutput{}{(\ref{taxisDefVtime})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisDestroy]{taxisDestroy}
 \else
 taxisDestroy
 \fi
-}
+}}
 \begin{verbatim}
     void taxisDestroy(int taxisID);
 \end{verbatim}
@@ -1101,13 +1101,13 @@ Destroy a Time axis
 \ifpdfoutput{}{(\ref{taxisDestroy})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisInqCalendar]{taxisInqCalendar}
 \else
 taxisInqCalendar
 \fi
-}
+}}
 \begin{verbatim}
     int taxisInqCalendar(int taxisID);
 \end{verbatim}
@@ -1116,13 +1116,13 @@ Get the calendar
 \ifpdfoutput{}{(\ref{taxisInqCalendar})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisInqRdate]{taxisInqRdate}
 \else
 taxisInqRdate
 \fi
-}
+}}
 \begin{verbatim}
     int taxisInqRdate(int taxisID);
 \end{verbatim}
@@ -1131,13 +1131,13 @@ Get the reference date
 \ifpdfoutput{}{(\ref{taxisInqRdate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisInqRtime]{taxisInqRtime}
 \else
 taxisInqRtime
 \fi
-}
+}}
 \begin{verbatim}
     int taxisInqRtime(int taxisID);
 \end{verbatim}
@@ -1146,13 +1146,13 @@ Get the reference time
 \ifpdfoutput{}{(\ref{taxisInqRtime})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisInqVdate]{taxisInqVdate}
 \else
 taxisInqVdate
 \fi
-}
+}}
 \begin{verbatim}
     int taxisInqVdate(int taxisID);
 \end{verbatim}
@@ -1161,13 +1161,13 @@ Get the verification date
 \ifpdfoutput{}{(\ref{taxisInqVdate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisInqVtime]{taxisInqVtime}
 \else
 taxisInqVtime
 \fi
-}
+}}
 \begin{verbatim}
     int taxisInqVtime(int taxisID);
 \end{verbatim}
@@ -1176,13 +1176,13 @@ Get the verification time
 \ifpdfoutput{}{(\ref{taxisInqVtime})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistCat]{vlistCat}
 \else
 vlistCat
 \fi
-}
+}}
 \begin{verbatim}
     void vlistCat(int vlistID2, int vlistID1);
 \end{verbatim}
@@ -1191,13 +1191,13 @@ Concatenate two variable lists
 \ifpdfoutput{}{(\ref{vlistCat})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistCopy]{vlistCopy}
 \else
 vlistCopy
 \fi
-}
+}}
 \begin{verbatim}
     void vlistCopy(int vlistID2, int vlistID1);
 \end{verbatim}
@@ -1206,13 +1206,13 @@ Copy a variable list
 \ifpdfoutput{}{(\ref{vlistCopy})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistCopyFlag]{vlistCopyFlag}
 \else
 vlistCopyFlag
 \fi
-}
+}}
 \begin{verbatim}
     void vlistCopyFlag(int vlistID2, int vlistID1);
 \end{verbatim}
@@ -1221,13 +1221,13 @@ Copy some entries of a variable list
 \ifpdfoutput{}{(\ref{vlistCopyFlag})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistCreate]{vlistCreate}
 \else
 vlistCreate
 \fi
-}
+}}
 \begin{verbatim}
     int vlistCreate(void);
 \end{verbatim}
@@ -1236,13 +1236,13 @@ Create a variable list
 \ifpdfoutput{}{(\ref{vlistCreate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefTaxis]{vlistDefTaxis}
 \else
 vlistDefTaxis
 \fi
-}
+}}
 \begin{verbatim}
     void vlistDefTaxis(int vlistID, int taxisID);
 \end{verbatim}
@@ -1251,13 +1251,13 @@ Define the time axis
 \ifpdfoutput{}{(\ref{vlistDefTaxis})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVar]{vlistDefVar}
 \else
 vlistDefVar
 \fi
-}
+}}
 \begin{verbatim}
     int vlistDefVar(int vlistID, int gridID, int zaxisID, int tsteptype);
 \end{verbatim}
@@ -1266,13 +1266,13 @@ Define a Variable
 \ifpdfoutput{}{(\ref{vlistDefVar})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVarCode]{vlistDefVarCode}
 \else
 vlistDefVarCode
 \fi
-}
+}}
 \begin{verbatim}
     void vlistDefVarCode(int vlistID, int varID, int code);
 \end{verbatim}
@@ -1281,13 +1281,13 @@ Define the code number of a Variable
 \ifpdfoutput{}{(\ref{vlistDefVarCode})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVarDatatype]{vlistDefVarDatatype}
 \else
 vlistDefVarDatatype
 \fi
-}
+}}
 \begin{verbatim}
     void vlistDefVarDatatype(int vlistID, int varID, int datatype);
 \end{verbatim}
@@ -1296,13 +1296,13 @@ Define the data type of a Variable
 \ifpdfoutput{}{(\ref{vlistDefVarDatatype})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVarLongname]{vlistDefVarLongname}
 \else
 vlistDefVarLongname
 \fi
-}
+}}
 \begin{verbatim}
     void vlistDefVarLongname(int vlistID, int varID, const char *longname);
 \end{verbatim}
@@ -1311,13 +1311,13 @@ Define the long name of a Variable
 \ifpdfoutput{}{(\ref{vlistDefVarLongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVarMissval]{vlistDefVarMissval}
 \else
 vlistDefVarMissval
 \fi
-}
+}}
 \begin{verbatim}
     void vlistDefVarMissval(int vlistID, int varID, double missval);
 \end{verbatim}
@@ -1326,13 +1326,13 @@ Define the missing value of a Variable
 \ifpdfoutput{}{(\ref{vlistDefVarMissval})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVarName]{vlistDefVarName}
 \else
 vlistDefVarName
 \fi
-}
+}}
 \begin{verbatim}
     void vlistDefVarName(int vlistID, int varID, const char *name);
 \end{verbatim}
@@ -1341,13 +1341,13 @@ Define the name of a Variable
 \ifpdfoutput{}{(\ref{vlistDefVarName})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVarStdname]{vlistDefVarStdname}
 \else
 vlistDefVarStdname
 \fi
-}
+}}
 \begin{verbatim}
     void vlistDefVarStdname(int vlistID, int varID, const char *stdname);
 \end{verbatim}
@@ -1356,13 +1356,13 @@ Define the standard name of a Variable
 \ifpdfoutput{}{(\ref{vlistDefVarStdname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVarUnits]{vlistDefVarUnits}
 \else
 vlistDefVarUnits
 \fi
-}
+}}
 \begin{verbatim}
     void vlistDefVarUnits(int vlistID, int varID, const char *units);
 \end{verbatim}
@@ -1371,13 +1371,13 @@ Define the units of a Variable
 \ifpdfoutput{}{(\ref{vlistDefVarUnits})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDestroy]{vlistDestroy}
 \else
 vlistDestroy
 \fi
-}
+}}
 \begin{verbatim}
     void vlistDestroy(int vlistID);
 \end{verbatim}
@@ -1386,13 +1386,13 @@ Destroy a variable list
 \ifpdfoutput{}{(\ref{vlistDestroy})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDuplicate]{vlistDuplicate}
 \else
 vlistDuplicate
 \fi
-}
+}}
 \begin{verbatim}
     int vlistDuplicate(int vlistID);
 \end{verbatim}
@@ -1401,13 +1401,13 @@ Duplicate a variable list
 \ifpdfoutput{}{(\ref{vlistDuplicate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqTaxis]{vlistInqTaxis}
 \else
 vlistInqTaxis
 \fi
-}
+}}
 \begin{verbatim}
     int vlistInqTaxis(int vlistID);
 \end{verbatim}
@@ -1416,13 +1416,13 @@ Get the time axis
 \ifpdfoutput{}{(\ref{vlistInqTaxis})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarCode]{vlistInqVarCode}
 \else
 vlistInqVarCode
 \fi
-}
+}}
 \begin{verbatim}
     int vlistInqVarCode(int vlistID, int varID);
 \end{verbatim}
@@ -1431,13 +1431,13 @@ Get the Code number of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarCode})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarDatatype]{vlistInqVarDatatype}
 \else
 vlistInqVarDatatype
 \fi
-}
+}}
 \begin{verbatim}
     int vlistInqVarDatatype(int vlistID, int varID);
 \end{verbatim}
@@ -1446,13 +1446,13 @@ Get the data type of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarDatatype})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarGrid]{vlistInqVarGrid}
 \else
 vlistInqVarGrid
 \fi
-}
+}}
 \begin{verbatim}
     int vlistInqVarGrid(int vlistID, int varID);
 \end{verbatim}
@@ -1461,13 +1461,13 @@ Get the Grid ID of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarGrid})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarLongname]{vlistInqVarLongname}
 \else
 vlistInqVarLongname
 \fi
-}
+}}
 \begin{verbatim}
     void vlistInqVarLongname(int vlistID, int varID, char *longname);
 \end{verbatim}
@@ -1476,13 +1476,13 @@ Get the longname of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarLongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarMissval]{vlistInqVarMissval}
 \else
 vlistInqVarMissval
 \fi
-}
+}}
 \begin{verbatim}
     double vlistInqVarMissval(int vlistID, int varID);
 \end{verbatim}
@@ -1491,13 +1491,13 @@ Get the missing value of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarMissval})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarName]{vlistInqVarName}
 \else
 vlistInqVarName
 \fi
-}
+}}
 \begin{verbatim}
     void vlistInqVarName(int vlistID, int varID, char *name);
 \end{verbatim}
@@ -1506,13 +1506,13 @@ Get the name of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarName})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarStdname]{vlistInqVarStdname}
 \else
 vlistInqVarStdname
 \fi
-}
+}}
 \begin{verbatim}
     void vlistInqVarStdname(int vlistID, int varID, char *stdname);
 \end{verbatim}
@@ -1521,13 +1521,13 @@ Get the standard name of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarStdname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarTsteptype]{vlistInqVarTsteptype}
 \else
 vlistInqVarTsteptype
 \fi
-}
+}}
 \begin{verbatim}
     int vlistInqVarTsteptype(int vlistID, int varID);
 \end{verbatim}
@@ -1536,13 +1536,13 @@ Get the timestep type of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarTsteptype})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarUnits]{vlistInqVarUnits}
 \else
 vlistInqVarUnits
 \fi
-}
+}}
 \begin{verbatim}
     void vlistInqVarUnits(int vlistID, int varID, char *units);
 \end{verbatim}
@@ -1551,13 +1551,13 @@ Get the units of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarUnits})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarZaxis]{vlistInqVarZaxis}
 \else
 vlistInqVarZaxis
 \fi
-}
+}}
 \begin{verbatim}
     int vlistInqVarZaxis(int vlistID, int varID);
 \end{verbatim}
@@ -1566,13 +1566,13 @@ Get the Zaxis ID of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarZaxis})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistNgrids]{vlistNgrids}
 \else
 vlistNgrids
 \fi
-}
+}}
 \begin{verbatim}
     int vlistNgrids(int vlistID);
 \end{verbatim}
@@ -1581,13 +1581,13 @@ Number of grids in a variable list
 \ifpdfoutput{}{(\ref{vlistNgrids})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistNvars]{vlistNvars}
 \else
 vlistNvars
 \fi
-}
+}}
 \begin{verbatim}
     int vlistNvars(int vlistID);
 \end{verbatim}
@@ -1596,13 +1596,13 @@ Number of variables in a variable list
 \ifpdfoutput{}{(\ref{vlistNvars})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistNzaxis]{vlistNzaxis}
 \else
 vlistNzaxis
 \fi
-}
+}}
 \begin{verbatim}
     int vlistNzaxis(int vlistID);
 \end{verbatim}
@@ -1611,13 +1611,13 @@ Number of zaxis in a variable list
 \ifpdfoutput{}{(\ref{vlistNzaxis})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisCreate]{zaxisCreate}
 \else
 zaxisCreate
 \fi
-}
+}}
 \begin{verbatim}
     int zaxisCreate(int zaxistype, int size);
 \end{verbatim}
@@ -1626,13 +1626,13 @@ Create a vertical Z-axis
 \ifpdfoutput{}{(\ref{zaxisCreate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisDefLevels]{zaxisDefLevels}
 \else
 zaxisDefLevels
 \fi
-}
+}}
 \begin{verbatim}
     void zaxisDefLevels(int zaxisID, const double *levels);
 \end{verbatim}
@@ -1641,13 +1641,13 @@ Define the levels of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisDefLevels})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisDefLongname]{zaxisDefLongname}
 \else
 zaxisDefLongname
 \fi
-}
+}}
 \begin{verbatim}
     void zaxisDefLongname(int zaxisID, const char *longname);
 \end{verbatim}
@@ -1656,13 +1656,13 @@ Define the longname of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisDefLongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisDefName]{zaxisDefName}
 \else
 zaxisDefName
 \fi
-}
+}}
 \begin{verbatim}
     void zaxisDefName(int zaxisID, const char *name);
 \end{verbatim}
@@ -1671,13 +1671,13 @@ Define the name of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisDefName})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisDefUnits]{zaxisDefUnits}
 \else
 zaxisDefUnits
 \fi
-}
+}}
 \begin{verbatim}
     void zaxisDefUnits(int zaxisID, const char *units);
 \end{verbatim}
@@ -1686,13 +1686,13 @@ Define the units of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisDefUnits})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisDestroy]{zaxisDestroy}
 \else
 zaxisDestroy
 \fi
-}
+}}
 \begin{verbatim}
     void zaxisDestroy(int zaxisID);
 \end{verbatim}
@@ -1701,13 +1701,13 @@ Destroy a vertical Z-axis
 \ifpdfoutput{}{(\ref{zaxisDestroy})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisInqLevel]{zaxisInqLevel}
 \else
 zaxisInqLevel
 \fi
-}
+}}
 \begin{verbatim}
     double zaxisInqLevel(int zaxisID, int levelID);
 \end{verbatim}
@@ -1716,13 +1716,13 @@ Get one level of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisInqLevel})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisInqLevels]{zaxisInqLevels}
 \else
 zaxisInqLevels
 \fi
-}
+}}
 \begin{verbatim}
     void zaxisInqLevels(int zaxisID, double *levels);
 \end{verbatim}
@@ -1731,13 +1731,13 @@ Get all levels of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisInqLevels})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisInqLongname]{zaxisInqLongname}
 \else
 zaxisInqLongname
 \fi
-}
+}}
 \begin{verbatim}
     void zaxisInqLongname(int zaxisID, char *longname);
 \end{verbatim}
@@ -1746,13 +1746,13 @@ Get the longname of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisInqLongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisInqName]{zaxisInqName}
 \else
 zaxisInqName
 \fi
-}
+}}
 \begin{verbatim}
     void zaxisInqName(int zaxisID, char *name);
 \end{verbatim}
@@ -1761,13 +1761,13 @@ Get the name of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisInqName})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisInqSize]{zaxisInqSize}
 \else
 zaxisInqSize
 \fi
-}
+}}
 \begin{verbatim}
     int zaxisInqSize(int zaxisID);
 \end{verbatim}
@@ -1776,13 +1776,13 @@ Get the size of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisInqSize})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisInqType]{zaxisInqType}
 \else
 zaxisInqType
 \fi
-}
+}}
 \begin{verbatim}
     int zaxisInqType(int zaxisID);
 \end{verbatim}
@@ -1791,13 +1791,13 @@ Get the type of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisInqType})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisInqUnits]{zaxisInqUnits}
 \else
 zaxisInqUnits
 \fi
-}
+}}
 \begin{verbatim}
     void zaxisInqUnits(int zaxisID, char *units);
 \end{verbatim}
diff --git a/doc/tex/c_stream.tex b/doc/tex/c_stream.tex
index dea76546388014b88617ff17bafa3f7e2acfaad3..b51f7f22a0d6314de7de118dcbea832e701bdbb1 100644
--- a/doc/tex/c_stream.tex
+++ b/doc/tex/c_stream.tex
@@ -1,10 +1,10 @@
 
 
-\subsection{Create a new dataset: {\tt streamOpenWrite}}
+\subsection{Create a new dataset: \texttt{streamOpenWrite}}
 \index{streamOpenWrite}
 \label{streamOpenWrite}
 
-The function {\tt streamOpenWrite} creates a new datset.
+The function {\texttt{streamOpenWrite}} creates a new datset.
 \subsubsection*{Usage}
 
 \begin{verbatim}
@@ -12,21 +12,21 @@ The function {\tt streamOpenWrite} creates a new datset.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt filetype\ }
-\item[{\tt path}]
+\begin{deflist}{\texttt{filetype}\ }
+\item[\texttt{path}]
 The name of the new dataset.
-\item[{\tt filetype}]
+\item[\texttt{filetype}]
 The type of the file format, one of the set of predefined {\CDI} file format types.
-                     The valid {\CDI} file format types are {\tt CDI\_FILETYPE\_GRB}, {\tt CDI\_FILETYPE\_GRB2}, {\tt CDI\_FILETYPE\_NC},
-                     {\tt CDI\_FILETYPE\_NC2}, {\tt CDI\_FILETYPE\_NC4}, {\tt CDI\_FILETYPE\_NC4C}, {\tt CDI\_FILETYPE\_SRV},
-                     {\tt CDI\_FILETYPE\_EXT} and {\tt CDI\_FILETYPE\_IEG}.
+                     The valid {\CDI} file format types are {\texttt{CDI\_FILETYPE\_GRB}}, {\texttt{CDI\_FILETYPE\_GRB2}}, {\texttt{CDI\_FILETYPE\_NC}},
+                     {\texttt{CDI\_FILETYPE\_NC2}}, {\texttt{CDI\_FILETYPE\_NC4}}, {\texttt{CDI\_FILETYPE\_NC4C}}, {\texttt{CDI\_FILETYPE\_SRV}},
+                     {\texttt{CDI\_FILETYPE\_EXT}} and {\texttt{CDI\_FILETYPE\_IEG}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-Upon successful completion {\tt streamOpenWrite} returns an identifier to the
+Upon successful completion {\texttt{streamOpenWrite}} returns an identifier to the
 open stream. Otherwise, a negative number with the error status is returned.
 
 
@@ -34,14 +34,14 @@ open stream. Otherwise, a negative number with the error status is returned.
 
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt CDI\_EUFILETYPE\ }
-\item[{\tt CDI\_ESYSTEM}]
+\begin{deflist}{\texttt{CDI\_EUFILETYPE}\ }
+\item[\texttt{CDI\_ESYSTEM}]
 Operating system error.
-\item[{\tt CDI\_EINVAL}]
+\item[\texttt{CDI\_EINVAL}]
 Invalid argument.
-\item[{\tt CDI\_EUFILETYPE}]
+\item[\texttt{CDI\_EUFILETYPE}]
 Unsupported file type.
-\item[{\tt CDI\_ELIBNAVAIL}]
+\item[\texttt{CDI\_ELIBNAVAIL}]
 Library support not compiled in.
 \end{deflist}
 \end{minipage}
@@ -49,7 +49,7 @@ Library support not compiled in.
 
 \subsubsection*{Example}
 
-Here is an example using {\tt streamOpenWrite} to create a new NetCDF file named {\tt foo.nc} for writing:
+Here is an example using {\texttt{streamOpenWrite}} to create a new NetCDF file named {\texttt{foo.nc}} for writing:
 
 \begin{lstlisting}[language=C, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
 
@@ -63,11 +63,11 @@ Here is an example using {\tt streamOpenWrite} to create a new NetCDF file named
 \end{lstlisting}
 
 
-\subsection{Open a dataset for reading: {\tt streamOpenRead}}
+\subsection{Open a dataset for reading: \texttt{streamOpenRead}}
 \index{streamOpenRead}
 \label{streamOpenRead}
 
-The function {\tt streamOpenRead} opens an existing dataset for reading.
+The function {\texttt{streamOpenRead}} opens an existing dataset for reading.
 
 \subsubsection*{Usage}
 
@@ -76,8 +76,8 @@ The function {\tt streamOpenRead} opens an existing dataset for reading.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt path\ }
-\item[{\tt path}]
+\begin{deflist}{\texttt{path}\ }
+\item[\texttt{path}]
 The name of the dataset to be read.
 
 \end{deflist}
@@ -85,7 +85,7 @@ The name of the dataset to be read.
 
 \subsubsection*{Result}
 
-Upon successful completion {\tt streamOpenRead} returns an identifier to the
+Upon successful completion {\texttt{streamOpenRead}} returns an identifier to the
 open stream. Otherwise, a negative number with the error status is returned.
 
 
@@ -93,14 +93,14 @@ open stream. Otherwise, a negative number with the error status is returned.
 
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt CDI\_EUFILETYPE\ }
-\item[{\tt CDI\_ESYSTEM}]
+\begin{deflist}{\texttt{CDI\_EUFILETYPE}\ }
+\item[\texttt{CDI\_ESYSTEM}]
 Operating system error.
-\item[{\tt CDI\_EINVAL}]
+\item[\texttt{CDI\_EINVAL}]
 Invalid argument.
-\item[{\tt CDI\_EUFILETYPE}]
+\item[\texttt{CDI\_EUFILETYPE}]
 Unsupported file type.
-\item[{\tt CDI\_ELIBNAVAIL}]
+\item[\texttt{CDI\_ELIBNAVAIL}]
 Library support not compiled in.
 \end{deflist}
 \end{minipage}
@@ -108,8 +108,8 @@ Library support not compiled in.
 
 \subsubsection*{Example}
 
-Here is an example using {\tt streamOpenRead} to open an existing NetCDF
-file named {\tt foo.nc} for reading:
+Here is an example using {\texttt{streamOpenRead}} to open an existing NetCDF
+file named {\texttt{foo.nc}} for reading:
 
 \begin{lstlisting}[language=C, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
 
@@ -123,11 +123,11 @@ file named {\tt foo.nc} for reading:
 \end{lstlisting}
 
 
-\subsection{Close an open dataset: {\tt streamClose}}
+\subsection{Close an open dataset: \texttt{streamClose}}
 \index{streamClose}
 \label{streamClose}
 
-The function {\tt streamClose} closes an open dataset.
+The function {\texttt{streamClose}} closes an open dataset.
 
 \subsubsection*{Usage}
 
@@ -136,19 +136,19 @@ The function {\tt streamClose} closes an open dataset.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}} or {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}} or {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the filetype: {\tt streamInqFiletype}}
+\subsection{Get the filetype: \texttt{streamInqFiletype}}
 \index{streamInqFiletype}
 \label{streamInqFiletype}
 
-The function {\tt streamInqFiletype} returns the filetype of a stream.
+The function {\texttt{streamInqFiletype}} returns the filetype of a stream.
 
 \subsubsection*{Usage}
 
@@ -157,28 +157,28 @@ The function {\tt streamInqFiletype} returns the filetype of a stream.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}} or {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}} or {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt streamInqFiletype} returns the type of the file format,
+{\texttt{streamInqFiletype}} returns the type of the file format,
 one of the set of predefined {\CDI} file format types.
-The valid {\CDI} file format types are {\tt CDI\_FILETYPE\_GRB}, {\tt CDI\_FILETYPE\_GRB2}, {\tt CDI\_FILETYPE\_NC}, {\tt CDI\_FILETYPE\_NC2},
-{\tt CDI\_FILETYPE\_NC4}, {\tt CDI\_FILETYPE\_NC4C}, {\tt CDI\_FILETYPE\_SRV}, {\tt CDI\_FILETYPE\_EXT} and {\tt CDI\_FILETYPE\_IEG}.
+The valid {\CDI} file format types are {\texttt{CDI\_FILETYPE\_GRB}}, {\texttt{CDI\_FILETYPE\_GRB2}}, {\texttt{CDI\_FILETYPE\_NC}}, {\texttt{CDI\_FILETYPE\_NC2}},
+{\texttt{CDI\_FILETYPE\_NC4}}, {\texttt{CDI\_FILETYPE\_NC4C}}, {\texttt{CDI\_FILETYPE\_SRV}}, {\texttt{CDI\_FILETYPE\_EXT}} and {\texttt{CDI\_FILETYPE\_IEG}}.
 
 
 
-\subsection{Define the byte order: {\tt streamDefByteorder}}
+\subsection{Define the byte order: \texttt{streamDefByteorder}}
 \index{streamDefByteorder}
 \label{streamDefByteorder}
 
-The function {\tt streamDefByteorder} defines the byte order of a binary dataset
-with the file format type {\tt CDI\_FILETYPE\_SRV}, {\tt CDI\_FILETYPE\_EXT} or {\tt CDI\_FILETYPE\_IEG}.
+The function {\texttt{streamDefByteorder}} defines the byte order of a binary dataset
+with the file format type {\texttt{CDI\_FILETYPE\_SRV}}, {\texttt{CDI\_FILETYPE\_EXT}} or {\texttt{CDI\_FILETYPE\_IEG}}.
 
 \subsubsection*{Usage}
 
@@ -187,23 +187,23 @@ with the file format type {\tt CDI\_FILETYPE\_SRV}, {\tt CDI\_FILETYPE\_EXT} or
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt byteorder\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt byteorder}]
-The byte order of a dataset, one of the {\CDI} constants {\tt CDI\_BIGENDIAN} and
-                     {\tt CDI\_LITTLEENDIAN}.
+\begin{deflist}{\texttt{byteorder}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{byteorder}]
+The byte order of a dataset, one of the {\CDI} constants {\texttt{CDI\_BIGENDIAN}} and
+                     {\texttt{CDI\_LITTLEENDIAN}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the byte order: {\tt streamInqByteorder}}
+\subsection{Get the byte order: \texttt{streamInqByteorder}}
 \index{streamInqByteorder}
 \label{streamInqByteorder}
 
-The function {\tt streamInqByteorder} returns the byte order of a binary dataset
-with the file format type {\tt CDI\_FILETYPE\_SRV}, {\tt CDI\_FILETYPE\_EXT} or {\tt CDI\_FILETYPE\_IEG}.
+The function {\texttt{streamInqByteorder}} returns the byte order of a binary dataset
+with the file format type {\texttt{CDI\_FILETYPE\_SRV}}, {\texttt{CDI\_FILETYPE\_EXT}} or {\texttt{CDI\_FILETYPE\_IEG}}.
 
 \subsubsection*{Usage}
 
@@ -212,25 +212,25 @@ with the file format type {\tt CDI\_FILETYPE\_SRV}, {\tt CDI\_FILETYPE\_EXT} or
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}} or {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}} or {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt streamInqByteorder} returns the type of the byte order.
-The valid {\CDI} byte order types are {\tt CDI\_BIGENDIAN} and {\tt CDI\_LITTLEENDIAN}
+{\texttt{streamInqByteorder}} returns the type of the byte order.
+The valid {\CDI} byte order types are {\texttt{CDI\_BIGENDIAN}} and {\texttt{CDI\_LITTLEENDIAN}}
 
 
 
-\subsection{Define the variable list: {\tt streamDefVlist}}
+\subsection{Define the variable list: \texttt{streamDefVlist}}
 \index{streamDefVlist}
 \label{streamDefVlist}
 
-The function {\tt streamDefVlist} defines the variable list of a stream.
+The function {\texttt{streamDefVlist}} defines the variable list of a stream.
 
 To safeguard against errors by modifying the wrong vlist object,
 this function makes the passed vlist object immutable.
@@ -243,21 +243,21 @@ All further vlist changes have to use the vlist object returned by streamInqVlis
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the variable list: {\tt streamInqVlist}}
+\subsection{Get the variable list: \texttt{streamInqVlist}}
 \index{streamInqVlist}
 \label{streamInqVlist}
 
-The function {\tt streamInqVlist} returns the variable list of a stream.
+The function {\texttt{streamInqVlist}} returns the variable list of a stream.
 
 \subsubsection*{Usage}
 
@@ -266,24 +266,24 @@ The function {\tt streamInqVlist} returns the variable list of a stream.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}} or {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}} or {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt streamInqVlist} returns an identifier to the variable list.
+{\texttt{streamInqVlist}} returns an identifier to the variable list.
 
 
 
-\subsection{Define time step: {\tt streamDefTimestep}}
+\subsection{Define time step: \texttt{streamDefTimestep}}
 \index{streamDefTimestep}
 \label{streamDefTimestep}
 
-The function {\tt streamDefTimestep} defines the time step of a stream.
+The function {\texttt{streamDefTimestep}} defines the time step of a stream.
 
 \subsubsection*{Usage}
 
@@ -292,10 +292,10 @@ The function {\tt streamDefTimestep} defines the time step of a stream.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt tsID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{tsID}]
 Timestep identifier.
 
 \end{deflist}
@@ -303,15 +303,15 @@ Timestep identifier.
 
 \subsubsection*{Result}
 
-{\tt streamDefTimestep} returns the number of records of the time step.
+{\texttt{streamDefTimestep}} returns the number of records of the time step.
 
 
 
-\subsection{Get time step: {\tt streamInqTimestep}}
+\subsection{Get time step: \texttt{streamInqTimestep}}
 \index{streamInqTimestep}
 \label{streamInqTimestep}
 
-The function {\tt streamInqTimestep} returns the time step of a stream.
+The function {\texttt{streamInqTimestep}} returns the time step of a stream.
 
 \subsubsection*{Usage}
 
@@ -320,10 +320,10 @@ The function {\tt streamInqTimestep} returns the time step of a stream.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}} or {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt tsID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}} or {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{tsID}]
 Timestep identifier.
 
 \end{deflist}
@@ -331,5 +331,5 @@ Timestep identifier.
 
 \subsubsection*{Result}
 
-{\tt streamInqTimestep} returns the number of records of the time step.
+{\texttt{streamInqTimestep}} returns the number of records of the time step.
 
diff --git a/doc/tex/c_stream_read.tex b/doc/tex/c_stream_read.tex
index 60aa9df3e5105fe15222fbce25b52fa4379de8db..ba24df36c6b25eab2bad96985cc04d3806c0b632 100644
--- a/doc/tex/c_stream_read.tex
+++ b/doc/tex/c_stream_read.tex
@@ -1,6 +1,6 @@
 
 
-\subsection{Read a variable: {\tt streamReadVar}}
+\subsection{Read a variable: \texttt{streamReadVar}}
 \index{streamReadVar}
 \label{streamReadVar}
 
@@ -13,22 +13,22 @@ from an open dataset.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to the location into which the data values are read.
                      The caller must allocate space for the returned values.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Read a variable: {\tt streamReadVarF}}
+\subsection{Read a variable: \texttt{streamReadVarF}}
 \index{streamReadVarF}
 \label{streamReadVarF}
 
@@ -41,22 +41,22 @@ from an open dataset.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to the location into which the data values are read.
                      The caller must allocate space for the returned values.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Read a horizontal slice of a variable: {\tt streamReadVarSlice}}
+\subsection{Read a horizontal slice of a variable: \texttt{streamReadVarSlice}}
 \index{streamReadVarSlice}
 \label{streamReadVarSlice}
 
@@ -70,24 +70,24 @@ from an open dataset.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt levelID}]
+\item[\texttt{levelID}]
 Level identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to the location into which the data values are read.
                      The caller must allocate space for the returned values.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Read a horizontal slice of a variable: {\tt streamReadVarSliceF}}
+\subsection{Read a horizontal slice of a variable: \texttt{streamReadVarSliceF}}
 \index{streamReadVarSliceF}
 \label{streamReadVarSliceF}
 
@@ -101,17 +101,17 @@ from an open dataset.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt levelID}]
+\item[\texttt{levelID}]
 Level identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to the location into which the data values are read.
                      The caller must allocate space for the returned values.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
diff --git a/doc/tex/c_stream_record.tex b/doc/tex/c_stream_record.tex
index 1bdb249484aee7581f2c1cd9f2b5593bc3df148d..56fce22232c1f38d6c538fcc4c1dc7930f9b312b 100644
--- a/doc/tex/c_stream_record.tex
+++ b/doc/tex/c_stream_record.tex
@@ -1,6 +1,6 @@
 
 
-\subsection{Define the next record: {\tt streamDefRecord}}
+\subsection{Define the next record: \texttt{streamDefRecord}}
 \index{streamDefRecord}
 \label{streamDefRecord}
 
@@ -12,12 +12,12 @@ The function streamDefRecord defines the meta-data of the next record.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt levelID}]
+\item[\texttt{levelID}]
 Level identifier.
 
 \end{deflist}
diff --git a/doc/tex/c_stream_write.tex b/doc/tex/c_stream_write.tex
index e4897550ebeb73babae628caabae62d5c3d9d12d..093b3f1b1ed4251bfa89d4f368c2662c25ad5bb5 100644
--- a/doc/tex/c_stream_write.tex
+++ b/doc/tex/c_stream_write.tex
@@ -1,6 +1,6 @@
 
 
-\subsection{Write a variable: {\tt streamWriteVar}}
+\subsection{Write a variable: \texttt{streamWriteVar}}
 \index{streamWriteVar}
 \label{streamWriteVar}
 
@@ -13,21 +13,21 @@ The values are converted to the external data type of the variable, if necessary
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to a block of double precision floating point data values to be written.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Write a variable: {\tt streamWriteVarF}}
+\subsection{Write a variable: \texttt{streamWriteVarF}}
 \index{streamWriteVarF}
 \label{streamWriteVarF}
 
@@ -40,21 +40,21 @@ The values are converted to the external data type of the variable, if necessary
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to a block of single precision floating point data values to be written.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Write a horizontal slice of a variable: {\tt streamWriteVarSlice}}
+\subsection{Write a horizontal slice of a variable: \texttt{streamWriteVarSlice}}
 \index{streamWriteVarSlice}
 \label{streamWriteVarSlice}
 
@@ -68,23 +68,23 @@ The values are converted to the external data type of the variable, if necessary
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt levelID}]
+\item[\texttt{levelID}]
 Level identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to a block of double precision floating point data values to be written.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Write a horizontal slice of a variable: {\tt streamWriteVarSliceF}}
+\subsection{Write a horizontal slice of a variable: \texttt{streamWriteVarSliceF}}
 \index{streamWriteVarSliceF}
 \label{streamWriteVarSliceF}
 
@@ -98,16 +98,16 @@ The values are converted to the external data type of the variable, if necessary
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt levelID}]
+\item[\texttt{levelID}]
 Level identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to a block of single precision floating point data values to be written.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
diff --git a/doc/tex/c_taxis.tex b/doc/tex/c_taxis.tex
index 589c1d9f7ff9997469daa330a73339f0afd51f5b..8911586912787882332f39931b8adc2ed1c8679b 100644
--- a/doc/tex/c_taxis.tex
+++ b/doc/tex/c_taxis.tex
@@ -1,10 +1,10 @@
 
 
-\subsection{Create a Time axis: {\tt taxisCreate}}
+\subsection{Create a Time axis: \texttt{taxisCreate}}
 \index{taxisCreate}
 \label{taxisCreate}
 
-The function {\tt taxisCreate} creates a Time axis.
+The function {\texttt{taxisCreate}} creates a Time axis.
 
 \subsubsection*{Usage}
 
@@ -13,22 +13,22 @@ The function {\tt taxisCreate} creates a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxistype\ }
-\item[{\tt taxistype}]
+\begin{deflist}{\texttt{taxistype}\ }
+\item[\texttt{taxistype}]
 The type of the Time axis, one of the set of predefined {\CDI} time axis types.
-                      The valid {\CDI} time axis types are {\tt TAXIS\_ABSOLUTE} and {\tt TAXIS\_RELATIVE}.
+                      The valid {\CDI} time axis types are {\texttt{TAXIS\_ABSOLUTE}} and {\texttt{TAXIS\_RELATIVE}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt taxisCreate} returns an identifier to the Time axis.
+{\texttt{taxisCreate}} returns an identifier to the Time axis.
 
 
 \subsubsection*{Example}
 
-Here is an example using {\tt taxisCreate} to create a relative T-axis
+Here is an example using {\texttt{taxisCreate}} to create a relative T-axis
 with a standard calendar.
 
 \begin{lstlisting}[language=C, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
@@ -45,7 +45,7 @@ with a standard calendar.
 \end{lstlisting}
 
 
-\subsection{Destroy a Time axis: {\tt taxisDestroy}}
+\subsection{Destroy a Time axis: \texttt{taxisDestroy}}
 \index{taxisDestroy}
 \label{taxisDestroy}
 \subsubsection*{Usage}
@@ -55,19 +55,19 @@ with a standard calendar.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\tt taxisCreate}
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\texttt{taxisCreate}}
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Define the reference date: {\tt taxisDefRdate}}
+\subsection{Define the reference date: \texttt{taxisDefRdate}}
 \index{taxisDefRdate}
 \label{taxisDefRdate}
 
-The function {\tt taxisDefRdate} defines the reference date of a Time axis.
+The function {\texttt{taxisDefRdate}} defines the reference date of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -76,21 +76,21 @@ The function {\tt taxisDefRdate} defines the reference date of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}}
-\item[{\tt rdate}]
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}}
+\item[\texttt{rdate}]
 Reference date (YYYYMMDD)
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the reference date: {\tt taxisInqRdate}}
+\subsection{Get the reference date: \texttt{taxisInqRdate}}
 \index{taxisInqRdate}
 \label{taxisInqRdate}
 
-The function {\tt taxisInqRdate} returns the reference date of a Time axis.
+The function {\texttt{taxisInqRdate}} returns the reference date of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -99,24 +99,24 @@ The function {\tt taxisInqRdate} returns the reference date of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}} or {\htmlref{\tt vlistInqTaxis}{vlistInqTaxis}}
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}} or {\htmlref{\texttt{vlistInqTaxis}}{vlistInqTaxis}}
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt taxisInqRdate} returns the reference date.
+{\texttt{taxisInqRdate}} returns the reference date.
 
 
 
-\subsection{Define the reference time: {\tt taxisDefRtime}}
+\subsection{Define the reference time: \texttt{taxisDefRtime}}
 \index{taxisDefRtime}
 \label{taxisDefRtime}
 
-The function {\tt taxisDefRtime} defines the reference time of a Time axis.
+The function {\texttt{taxisDefRtime}} defines the reference time of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -125,21 +125,21 @@ The function {\tt taxisDefRtime} defines the reference time of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}}
-\item[{\tt rtime}]
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}}
+\item[\texttt{rtime}]
 Reference time (hhmmss)
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the reference time: {\tt taxisInqRtime}}
+\subsection{Get the reference time: \texttt{taxisInqRtime}}
 \index{taxisInqRtime}
 \label{taxisInqRtime}
 
-The function {\tt taxisInqRtime} returns the reference time of a Time axis.
+The function {\texttt{taxisInqRtime}} returns the reference time of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -148,24 +148,24 @@ The function {\tt taxisInqRtime} returns the reference time of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}} or {\htmlref{\tt vlistInqTaxis}{vlistInqTaxis}}
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}} or {\htmlref{\texttt{vlistInqTaxis}}{vlistInqTaxis}}
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt taxisInqRtime} returns the reference time.
+{\texttt{taxisInqRtime}} returns the reference time.
 
 
 
-\subsection{Define the verification date: {\tt taxisDefVdate}}
+\subsection{Define the verification date: \texttt{taxisDefVdate}}
 \index{taxisDefVdate}
 \label{taxisDefVdate}
 
-The function {\tt taxisDefVdate} defines the verification date of a Time axis.
+The function {\texttt{taxisDefVdate}} defines the verification date of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -174,21 +174,21 @@ The function {\tt taxisDefVdate} defines the verification date of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}}
-\item[{\tt vdate}]
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}}
+\item[\texttt{vdate}]
 Verification date (YYYYMMDD)
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the verification date: {\tt taxisInqVdate}}
+\subsection{Get the verification date: \texttt{taxisInqVdate}}
 \index{taxisInqVdate}
 \label{taxisInqVdate}
 
-The function {\tt taxisInqVdate} returns the verification date of a Time axis.
+The function {\texttt{taxisInqVdate}} returns the verification date of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -197,24 +197,24 @@ The function {\tt taxisInqVdate} returns the verification date of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}} or {\htmlref{\tt vlistInqTaxis}{vlistInqTaxis}}
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}} or {\htmlref{\texttt{vlistInqTaxis}}{vlistInqTaxis}}
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt taxisInqVdate} returns the verification date.
+{\texttt{taxisInqVdate}} returns the verification date.
 
 
 
-\subsection{Define the verification time: {\tt taxisDefVtime}}
+\subsection{Define the verification time: \texttt{taxisDefVtime}}
 \index{taxisDefVtime}
 \label{taxisDefVtime}
 
-The function {\tt taxisDefVtime} defines the verification time of a Time axis.
+The function {\texttt{taxisDefVtime}} defines the verification time of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -223,21 +223,21 @@ The function {\tt taxisDefVtime} defines the verification time of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}}
-\item[{\tt vtime}]
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}}
+\item[\texttt{vtime}]
 Verification time (hhmmss)
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the verification time: {\tt taxisInqVtime}}
+\subsection{Get the verification time: \texttt{taxisInqVtime}}
 \index{taxisInqVtime}
 \label{taxisInqVtime}
 
-The function {\tt taxisInqVtime} returns the verification time of a Time axis.
+The function {\texttt{taxisInqVtime}} returns the verification time of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -246,24 +246,24 @@ The function {\tt taxisInqVtime} returns the verification time of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}} or {\htmlref{\tt vlistInqTaxis}{vlistInqTaxis}}
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}} or {\htmlref{\texttt{vlistInqTaxis}}{vlistInqTaxis}}
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt taxisInqVtime} returns the verification time.
+{\texttt{taxisInqVtime}} returns the verification time.
 
 
 
-\subsection{Define the calendar: {\tt taxisDefCalendar}}
+\subsection{Define the calendar: \texttt{taxisDefCalendar}}
 \index{taxisDefCalendar}
 \label{taxisDefCalendar}
 
-The function {\tt taxisDefCalendar} defines the calendar of a Time axis.
+The function {\texttt{taxisDefCalendar}} defines the calendar of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -272,23 +272,23 @@ The function {\tt taxisDefCalendar} defines the calendar of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt calendar\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}}
-\item[{\tt calendar}]
+\begin{deflist}{\texttt{calendar}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}}
+\item[\texttt{calendar}]
 The type of the calendar, one of the set of predefined {\CDI} calendar types.
-                    The valid {\CDI} calendar types are {\tt CALENDAR\_STANDARD}, {\tt CALENDAR\_PROLEPTIC},
-                    {\tt CALENDAR\_360DAYS}, {\tt CALENDAR\_365DAYS} and {\tt CALENDAR\_366DAYS}.
+                    The valid {\CDI} calendar types are {\texttt{CALENDAR\_STANDARD}}, {\texttt{CALENDAR\_PROLEPTIC}},
+                    {\texttt{CALENDAR\_360DAYS}}, {\texttt{CALENDAR\_365DAYS}} and {\texttt{CALENDAR\_366DAYS}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the calendar: {\tt taxisInqCalendar}}
+\subsection{Get the calendar: \texttt{taxisInqCalendar}}
 \index{taxisInqCalendar}
 \label{taxisInqCalendar}
 
-The function {\tt taxisInqCalendar} returns the calendar of a Time axis.
+The function {\texttt{taxisInqCalendar}} returns the calendar of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -297,17 +297,17 @@ The function {\tt taxisInqCalendar} returns the calendar of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}} or {\htmlref{\tt vlistInqTaxis}{vlistInqTaxis}}
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}} or {\htmlref{\texttt{vlistInqTaxis}}{vlistInqTaxis}}
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt taxisInqCalendar} returns the type of the calendar,
+{\texttt{taxisInqCalendar}} returns the type of the calendar,
 one of the set of predefined {\CDI} calendar types.
-The valid {\CDI} calendar types are {\tt CALENDAR\_STANDARD}, {\tt CALENDAR\_PROLEPTIC},
-{\tt CALENDAR\_360DAYS}, {\tt CALENDAR\_365DAYS} and {\tt CALENDAR\_366DAYS}.
+The valid {\CDI} calendar types are {\texttt{CALENDAR\_STANDARD}}, {\texttt{CALENDAR\_PROLEPTIC}},
+{\texttt{CALENDAR\_360DAYS}}, {\texttt{CALENDAR\_365DAYS}} and {\texttt{CALENDAR\_366DAYS}}.
 
diff --git a/doc/tex/c_vlist.tex b/doc/tex/c_vlist.tex
index a91777d1728aae536f46d388a408b856c5db6f7e..7ba4a013c8b505c991e6d1d1500e9e6fedee4445 100644
--- a/doc/tex/c_vlist.tex
+++ b/doc/tex/c_vlist.tex
@@ -1,6 +1,6 @@
 
 
-\subsection{Create a variable list: {\tt vlistCreate}}
+\subsection{Create a variable list: \texttt{vlistCreate}}
 \index{vlistCreate}
 \label{vlistCreate}
 \subsubsection*{Usage}
@@ -11,8 +11,8 @@
 
 \subsubsection*{Example}
 
-Here is an example using {\tt vlistCreate} to create a variable list
-and add a variable with {\tt vlistDefVar}.
+Here is an example using {\texttt{vlistCreate}} to create a variable list
+and add a variable with {\texttt{vlistDefVar}}.
 
 \begin{lstlisting}[language=C, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
 
@@ -30,7 +30,7 @@ and add a variable with {\tt vlistDefVar}.
 \end{lstlisting}
 
 
-\subsection{Destroy a variable list: {\tt vlistDestroy}}
+\subsection{Destroy a variable list: \texttt{vlistDestroy}}
 \index{vlistDestroy}
 \label{vlistDestroy}
 \subsubsection*{Usage}
@@ -40,19 +40,19 @@ and add a variable with {\tt vlistDefVar}.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Copy a variable list: {\tt vlistCopy}}
+\subsection{Copy a variable list: \texttt{vlistCopy}}
 \index{vlistCopy}
 \label{vlistCopy}
 
-The function {\tt vlistCopy} copies all entries from vlistID1 to vlistID2.
+The function {\texttt{vlistCopy}} copies all entries from vlistID1 to vlistID2.
 
 \subsubsection*{Usage}
 
@@ -61,21 +61,21 @@ The function {\tt vlistCopy} copies all entries from vlistID1 to vlistID2.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID2\ }
-\item[{\tt vlistID2}]
+\begin{deflist}{\texttt{vlistID2}\ }
+\item[\texttt{vlistID2}]
 Target variable list ID.
-\item[{\tt vlistID1}]
+\item[\texttt{vlistID1}]
 Source variable list ID.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Duplicate a variable list: {\tt vlistDuplicate}}
+\subsection{Duplicate a variable list: \texttt{vlistDuplicate}}
 \index{vlistDuplicate}
 \label{vlistDuplicate}
 
-The function {\tt vlistDuplicate} duplicates the variable list from vlistID1.
+The function {\texttt{vlistDuplicate}} duplicates the variable list from vlistID1.
 
 \subsubsection*{Usage}
 
@@ -84,20 +84,20 @@ The function {\tt vlistDuplicate} duplicates the variable list from vlistID1.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistDuplicate} returns an identifier to the duplicated variable list.
+{\texttt{vlistDuplicate}} returns an identifier to the duplicated variable list.
 
 
 
-\subsection{Concatenate two variable lists: {\tt vlistCat}}
+\subsection{Concatenate two variable lists: \texttt{vlistCat}}
 \index{vlistCat}
 \label{vlistCat}
 
@@ -110,21 +110,21 @@ Concatenate the variable list vlistID1 at the end of vlistID2.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID2\ }
-\item[{\tt vlistID2}]
+\begin{deflist}{\texttt{vlistID2}\ }
+\item[\texttt{vlistID2}]
 Target variable list ID.
-\item[{\tt vlistID1}]
+\item[\texttt{vlistID1}]
 Source variable list ID.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Copy some entries of a variable list: {\tt vlistCopyFlag}}
+\subsection{Copy some entries of a variable list: \texttt{vlistCopyFlag}}
 \index{vlistCopyFlag}
 \label{vlistCopyFlag}
 
-The function {\tt vlistCopyFlag} copies all entries with a flag from vlistID1 to vlistID2.
+The function {\texttt{vlistCopyFlag}} copies all entries with a flag from vlistID1 to vlistID2.
 
 \subsubsection*{Usage}
 
@@ -133,21 +133,21 @@ The function {\tt vlistCopyFlag} copies all entries with a flag from vlistID1 to
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID2\ }
-\item[{\tt vlistID2}]
+\begin{deflist}{\texttt{vlistID2}\ }
+\item[\texttt{vlistID2}]
 Target variable list ID.
-\item[{\tt vlistID1}]
+\item[\texttt{vlistID1}]
 Source variable list ID.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Number of variables in a variable list: {\tt vlistNvars}}
+\subsection{Number of variables in a variable list: \texttt{vlistNvars}}
 \index{vlistNvars}
 \label{vlistNvars}
 
-The function {\tt vlistNvars} returns the number of variables in the variable list vlistID.
+The function {\texttt{vlistNvars}} returns the number of variables in the variable list vlistID.
 
 \subsubsection*{Usage}
 
@@ -156,24 +156,24 @@ The function {\tt vlistNvars} returns the number of variables in the variable li
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistNvars} returns the number of variables in a variable list.
+{\texttt{vlistNvars}} returns the number of variables in a variable list.
 
 
 
-\subsection{Number of grids in a variable list: {\tt vlistNgrids}}
+\subsection{Number of grids in a variable list: \texttt{vlistNgrids}}
 \index{vlistNgrids}
 \label{vlistNgrids}
 
-The function {\tt vlistNgrids} returns the number of grids in the variable list vlistID.
+The function {\texttt{vlistNgrids}} returns the number of grids in the variable list vlistID.
 
 \subsubsection*{Usage}
 
@@ -182,24 +182,24 @@ The function {\tt vlistNgrids} returns the number of grids in the variable list
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistNgrids} returns the number of grids in a variable list.
+{\texttt{vlistNgrids}} returns the number of grids in a variable list.
 
 
 
-\subsection{Number of zaxis in a variable list: {\tt vlistNzaxis}}
+\subsection{Number of zaxis in a variable list: \texttt{vlistNzaxis}}
 \index{vlistNzaxis}
 \label{vlistNzaxis}
 
-The function {\tt vlistNzaxis} returns the number of zaxis in the variable list vlistID.
+The function {\texttt{vlistNzaxis}} returns the number of zaxis in the variable list vlistID.
 
 \subsubsection*{Usage}
 
@@ -208,24 +208,24 @@ The function {\tt vlistNzaxis} returns the number of zaxis in the variable list
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistNzaxis} returns the number of zaxis in a variable list.
+{\texttt{vlistNzaxis}} returns the number of zaxis in a variable list.
 
 
 
-\subsection{Define the time axis: {\tt vlistDefTaxis}}
+\subsection{Define the time axis: \texttt{vlistDefTaxis}}
 \index{vlistDefTaxis}
 \label{vlistDefTaxis}
 
-The function {\tt vlistDefTaxis} defines the time axis of a variable list.
+The function {\texttt{vlistDefTaxis}} defines the time axis of a variable list.
 
 \subsubsection*{Usage}
 
@@ -234,21 +234,21 @@ The function {\tt vlistDefTaxis} defines the time axis of a variable list.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}}.
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the time axis: {\tt vlistInqTaxis}}
+\subsection{Get the time axis: \texttt{vlistInqTaxis}}
 \index{vlistInqTaxis}
 \label{vlistInqTaxis}
 
-The function {\tt vlistInqTaxis} returns the time axis of a variable list.
+The function {\texttt{vlistInqTaxis}} returns the time axis of a variable list.
 
 \subsubsection*{Usage}
 
@@ -257,14 +257,14 @@ The function {\tt vlistInqTaxis} returns the time axis of a variable list.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistInqTaxis} returns an identifier to the time axis.
+{\texttt{vlistInqTaxis}} returns an identifier to the time axis.
 
diff --git a/doc/tex/c_vlist_var.tex b/doc/tex/c_vlist_var.tex
index d22b206b55eadec50c36539a055d80d358d344f1..474cce6329b580ee9d8935fe502016cec1e4b593 100644
--- a/doc/tex/c_vlist_var.tex
+++ b/doc/tex/c_vlist_var.tex
@@ -1,10 +1,10 @@
 
 
-\subsection{Define a Variable: {\tt vlistDefVar}}
+\subsection{Define a Variable: \texttt{vlistDefVar}}
 \index{vlistDefVar}
 \label{vlistDefVar}
 
-The function {\tt vlistDefVar} adds a new variable to vlistID.
+The function {\texttt{vlistDefVar}} adds a new variable to vlistID.
 
 \subsubsection*{Usage}
 
@@ -13,30 +13,30 @@ The function {\tt vlistDefVar} adds a new variable to vlistID.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt tsteptype\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt zaxisID}]
-Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}}.
-\item[{\tt tsteptype}]
+\begin{deflist}{\texttt{tsteptype}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
+\item[\texttt{tsteptype}]
 One of the set of predefined {\CDI} timestep types.
-                     The valid {\CDI} timestep types are {\tt TSTEP\_CONSTANT}, {\tt TSTEP\_INSTANT},
-                     {\tt TSTEP\_ACCUM}, {\tt TSTEP\_AVG}, {\tt TSTEP\_MAX}, {\tt TSTEP\_MIN} and {\tt TSTEP\_SD}.
+                     The valid {\CDI} timestep types are {\texttt{TSTEP\_CONSTANT}}, {\texttt{TSTEP\_INSTANT}},
+                     {\texttt{TSTEP\_ACCUM}}, {\texttt{TSTEP\_AVG}}, {\texttt{TSTEP\_MAX}}, {\texttt{TSTEP\_MIN}} and {\texttt{TSTEP\_SD}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistDefVar} returns an identifier to the new variable.
+{\texttt{vlistDefVar}} returns an identifier to the new variable.
 
 
 \subsubsection*{Example}
 
-Here is an example using {\tt vlistCreate} to create a variable list
-and add a variable with {\tt vlistDefVar}.
+Here is an example using {\texttt{vlistCreate}} to create a variable list
+and add a variable with {\texttt{vlistDefVar}}.
 
 \begin{lstlisting}[language=C, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
 
@@ -54,11 +54,11 @@ and add a variable with {\tt vlistDefVar}.
 \end{lstlisting}
 
 
-\subsection{Get the Grid ID of a Variable: {\tt vlistInqVarGrid}}
+\subsection{Get the Grid ID of a Variable: \texttt{vlistInqVarGrid}}
 \index{vlistInqVarGrid}
 \label{vlistInqVarGrid}
 
-The function {\tt vlistInqVarGrid} returns the grid ID of a Variable.
+The function {\texttt{vlistInqVarGrid}} returns the grid ID of a Variable.
 
 \subsubsection*{Usage}
 
@@ -67,10 +67,10 @@ The function {\tt vlistInqVarGrid} returns the grid ID of a Variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
 
 \end{deflist}
@@ -78,15 +78,15 @@ Variable identifier.
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarGrid} returns the grid ID of the Variable.
+{\texttt{vlistInqVarGrid}} returns the grid ID of the Variable.
 
 
 
-\subsection{Get the Zaxis ID of a Variable: {\tt vlistInqVarZaxis}}
+\subsection{Get the Zaxis ID of a Variable: \texttt{vlistInqVarZaxis}}
 \index{vlistInqVarZaxis}
 \label{vlistInqVarZaxis}
 
-The function {\tt vlistInqVarZaxis} returns the zaxis ID of a variable.
+The function {\texttt{vlistInqVarZaxis}} returns the zaxis ID of a variable.
 
 \subsubsection*{Usage}
 
@@ -95,10 +95,10 @@ The function {\tt vlistInqVarZaxis} returns the zaxis ID of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
 
 \end{deflist}
@@ -106,15 +106,15 @@ Variable identifier.
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarZaxis} returns the zaxis ID of the variable.
+{\texttt{vlistInqVarZaxis}} returns the zaxis ID of the variable.
 
 
 
-\subsection{Get the timestep type of a Variable: {\tt vlistInqVarTsteptype}}
+\subsection{Get the timestep type of a Variable: \texttt{vlistInqVarTsteptype}}
 \index{vlistInqVarTsteptype}
 \label{vlistInqVarTsteptype}
 
-The function {\tt vlistInqVarTsteptype} returns the timestep type of a Variable.
+The function {\texttt{vlistInqVarTsteptype}} returns the timestep type of a Variable.
 
 \subsubsection*{Usage}
 
@@ -123,10 +123,10 @@ The function {\tt vlistInqVarTsteptype} returns the timestep type of a Variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
 
 \end{deflist}
@@ -134,18 +134,18 @@ Variable identifier.
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarTsteptype} returns the timestep type of the Variable,
+{\texttt{vlistInqVarTsteptype}} returns the timestep type of the Variable,
 one of the set of predefined {\CDI} timestep types.
-The valid {\CDI} timestep types are {\tt TSTEP\_CONSTANT}, {\tt TSTEP\_INSTANT},
-{\tt TSTEP\_ACCUM}, {\tt TSTEP\_AVG}, {\tt TSTEP\_MAX}, {\tt TSTEP\_MIN} and {\tt TSTEP\_SD}.
+The valid {\CDI} timestep types are {\texttt{TSTEP\_CONSTANT}}, {\texttt{TSTEP\_INSTANT}},
+{\texttt{TSTEP\_ACCUM}}, {\texttt{TSTEP\_AVG}}, {\texttt{TSTEP\_MAX}}, {\texttt{TSTEP\_MIN}} and {\texttt{TSTEP\_SD}}.
 
 
 
-\subsection{Define the code number of a Variable: {\tt vlistDefVarCode}}
+\subsection{Define the code number of a Variable: \texttt{vlistDefVarCode}}
 \index{vlistDefVarCode}
 \label{vlistDefVarCode}
 
-The function {\tt vlistDefVarCode} defines the code number of a variable.
+The function {\texttt{vlistDefVarCode}} defines the code number of a variable.
 
 \subsubsection*{Usage}
 
@@ -154,23 +154,23 @@ The function {\tt vlistDefVarCode} defines the code number of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt code}]
+\item[\texttt{code}]
 Code number.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the Code number of a Variable: {\tt vlistInqVarCode}}
+\subsection{Get the Code number of a Variable: \texttt{vlistInqVarCode}}
 \index{vlistInqVarCode}
 \label{vlistInqVarCode}
 
-The function {\tt vlistInqVarCode} returns the code number of a variable.
+The function {\texttt{vlistInqVarCode}} returns the code number of a variable.
 
 \subsubsection*{Usage}
 
@@ -179,10 +179,10 @@ The function {\tt vlistInqVarCode} returns the code number of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
 
 \end{deflist}
@@ -190,15 +190,15 @@ Variable identifier.
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarCode} returns the code number of the variable.
+{\texttt{vlistInqVarCode}} returns the code number of the variable.
 
 
 
-\subsection{Define the name of a Variable: {\tt vlistDefVarName}}
+\subsection{Define the name of a Variable: \texttt{vlistDefVarName}}
 \index{vlistDefVarName}
 \label{vlistDefVarName}
 
-The function {\tt vlistDefVarName} defines the name of a variable.
+The function {\texttt{vlistDefVarName}} defines the name of a variable.
 
 \subsubsection*{Usage}
 
@@ -207,23 +207,23 @@ The function {\tt vlistDefVarName} defines the name of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt name}]
+\item[\texttt{name}]
 Name of the variable.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the name of a Variable: {\tt vlistInqVarName}}
+\subsection{Get the name of a Variable: \texttt{vlistInqVarName}}
 \index{vlistInqVarName}
 \label{vlistInqVarName}
 
-The function {\tt vlistInqVarName} returns the name of a variable.
+The function {\texttt{vlistInqVarName}} returns the name of a variable.
 
 \subsubsection*{Usage}
 
@@ -232,31 +232,31 @@ The function {\tt vlistInqVarName} returns the name of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt name}]
+\item[\texttt{name}]
 Returned variable name. 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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarName} returns the name of the variable to the parameter name if available,
+{\texttt{vlistInqVarName}} returns the name of the variable to the parameter name if available,
 otherwise the result is an empty string.
 
 
 
-\subsection{Define the long name of a Variable: {\tt vlistDefVarLongname}}
+\subsection{Define the long name of a Variable: \texttt{vlistDefVarLongname}}
 \index{vlistDefVarLongname}
 \label{vlistDefVarLongname}
 
-The function {\tt vlistDefVarLongname} defines the long name of a variable.
+The function {\texttt{vlistDefVarLongname}} defines the long name of a variable.
 
 \subsubsection*{Usage}
 
@@ -265,23 +265,23 @@ The function {\tt vlistDefVarLongname} defines the long name of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt longname\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt longname}]
+\item[\texttt{longname}]
 Long name of the variable.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the longname of a Variable: {\tt vlistInqVarLongname}}
+\subsection{Get the longname of a Variable: \texttt{vlistInqVarLongname}}
 \index{vlistInqVarLongname}
 \label{vlistInqVarLongname}
 
-The function {\tt vlistInqVarLongname} returns the longname of a variable if available,
+The function {\texttt{vlistInqVarLongname}} returns the longname of a variable if available,
 otherwise the result is an empty string.
 
 \subsubsection*{Usage}
@@ -291,30 +291,30 @@ otherwise the result is an empty string.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt longname\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt longname}]
+\item[\texttt{longname}]
 Long name of the variable. 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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistInqVaeLongname} returns the longname of the variable to the parameter longname.
+{\texttt{vlistInqVaeLongname}} returns the longname of the variable to the parameter longname.
 
 
 
-\subsection{Define the standard name of a Variable: {\tt vlistDefVarStdname}}
+\subsection{Define the standard name of a Variable: \texttt{vlistDefVarStdname}}
 \index{vlistDefVarStdname}
 \label{vlistDefVarStdname}
 
-The function {\tt vlistDefVarStdname} defines the standard name of a variable.
+The function {\texttt{vlistDefVarStdname}} defines the standard name of a variable.
 
 \subsubsection*{Usage}
 
@@ -323,23 +323,23 @@ The function {\tt vlistDefVarStdname} defines the standard name of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt stdname}]
+\item[\texttt{stdname}]
 Standard name of the variable.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the standard name of a Variable: {\tt vlistInqVarStdname}}
+\subsection{Get the standard name of a Variable: \texttt{vlistInqVarStdname}}
 \index{vlistInqVarStdname}
 \label{vlistInqVarStdname}
 
-The function {\tt vlistInqVarStdname} returns the standard name of a variable if available,
+The function {\texttt{vlistInqVarStdname}} returns the standard name of a variable if available,
 otherwise the result is an empty string.
 
 \subsubsection*{Usage}
@@ -349,30 +349,30 @@ otherwise the result is an empty string.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt stdname}]
+\item[\texttt{stdname}]
 Standard name of the variable. 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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarStdname} returns the standard name of the variable to the parameter stdname.
+{\texttt{vlistInqVarStdname}} returns the standard name of the variable to the parameter stdname.
 
 
 
-\subsection{Define the units of a Variable: {\tt vlistDefVarUnits}}
+\subsection{Define the units of a Variable: \texttt{vlistDefVarUnits}}
 \index{vlistDefVarUnits}
 \label{vlistDefVarUnits}
 
-The function {\tt vlistDefVarUnits} defines the units of a variable.
+The function {\texttt{vlistDefVarUnits}} defines the units of a variable.
 
 \subsubsection*{Usage}
 
@@ -381,23 +381,23 @@ The function {\tt vlistDefVarUnits} defines the units of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt units}]
+\item[\texttt{units}]
 Units of the variable.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the units of a Variable: {\tt vlistInqVarUnits}}
+\subsection{Get the units of a Variable: \texttt{vlistInqVarUnits}}
 \index{vlistInqVarUnits}
 \label{vlistInqVarUnits}
 
-The function {\tt vlistInqVarUnits} returns the units of a variable if available,
+The function {\texttt{vlistInqVarUnits}} returns the units of a variable if available,
 otherwise the result is an empty string.
 
 \subsubsection*{Usage}
@@ -407,30 +407,30 @@ otherwise the result is an empty string.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt units}]
+\item[\texttt{units}]
 Units of the variable. 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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarUnits} returns the units of the variable to the parameter units.
+{\texttt{vlistInqVarUnits}} returns the units of the variable to the parameter units.
 
 
 
-\subsection{Define the data type of a Variable: {\tt vlistDefVarDatatype}}
+\subsection{Define the data type of a Variable: \texttt{vlistDefVarDatatype}}
 \index{vlistDefVarDatatype}
 \label{vlistDefVarDatatype}
 
-The function {\tt vlistDefVarDatatype} defines the data type of a variable.
+The function {\texttt{vlistDefVarDatatype}} defines the data type of a variable.
 
 \subsubsection*{Usage}
 
@@ -439,26 +439,26 @@ The function {\tt vlistDefVarDatatype} defines the data type of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt datatype\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{datatype}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt datatype}]
+\item[\texttt{datatype}]
 The data type identifier.
-                    The valid {\CDI} data types are {\tt CDI\_DATATYPE\_PACK8}, {\tt CDI\_DATATYPE\_PACK16},
-                    {\tt CDI\_DATATYPE\_PACK24}, {\tt CDI\_DATATYPE\_FLT32}, {\tt CDI\_DATATYPE\_FLT64},
-                    {\tt CDI\_DATATYPE\_INT8}, {\tt CDI\_DATATYPE\_INT16} and {\tt CDI\_DATATYPE\_INT32}.
+                    The valid {\CDI} data types are {\texttt{CDI\_DATATYPE\_PACK8}}, {\texttt{CDI\_DATATYPE\_PACK16}},
+                    {\texttt{CDI\_DATATYPE\_PACK24}}, {\texttt{CDI\_DATATYPE\_FLT32}}, {\texttt{CDI\_DATATYPE\_FLT64}},
+                    {\texttt{CDI\_DATATYPE\_INT8}}, {\texttt{CDI\_DATATYPE\_INT16}} and {\texttt{CDI\_DATATYPE\_INT32}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the data type of a Variable: {\tt vlistInqVarDatatype}}
+\subsection{Get the data type of a Variable: \texttt{vlistInqVarDatatype}}
 \index{vlistInqVarDatatype}
 \label{vlistInqVarDatatype}
 
-The function {\tt vlistInqVarDatatype} returns the data type of a variable.
+The function {\texttt{vlistInqVarDatatype}} returns the data type of a variable.
 
 \subsubsection*{Usage}
 
@@ -467,10 +467,10 @@ The function {\tt vlistInqVarDatatype} returns the data type of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
 
 \end{deflist}
@@ -478,18 +478,18 @@ Variable identifier.
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarDatatype} returns an identifier to the data type of the variable.
-The valid {\CDI} data types are {\tt CDI\_DATATYPE\_PACK8}, {\tt CDI\_DATATYPE\_PACK16}, {\tt CDI\_DATATYPE\_PACK24},
-{\tt CDI\_DATATYPE\_FLT32}, {\tt CDI\_DATATYPE\_FLT64}, {\tt CDI\_DATATYPE\_INT8}, {\tt CDI\_DATATYPE\_INT16} and 
-{\tt CDI\_DATATYPE\_INT32}.
+{\texttt{vlistInqVarDatatype}} returns an identifier to the data type of the variable.
+The valid {\CDI} data types are {\texttt{CDI\_DATATYPE\_PACK8}}, {\texttt{CDI\_DATATYPE\_PACK16}}, {\texttt{CDI\_DATATYPE\_PACK24}},
+{\texttt{CDI\_DATATYPE\_FLT32}}, {\texttt{CDI\_DATATYPE\_FLT64}}, {\texttt{CDI\_DATATYPE\_INT8}}, {\texttt{CDI\_DATATYPE\_INT16}} and 
+{\texttt{CDI\_DATATYPE\_INT32}}.
 
 
 
-\subsection{Define the missing value of a Variable: {\tt vlistDefVarMissval}}
+\subsection{Define the missing value of a Variable: \texttt{vlistDefVarMissval}}
 \index{vlistDefVarMissval}
 \label{vlistDefVarMissval}
 
-The function {\tt vlistDefVarMissval} defines the missing value of a variable.
+The function {\texttt{vlistDefVarMissval}} defines the missing value of a variable.
 
 \subsubsection*{Usage}
 
@@ -498,23 +498,23 @@ The function {\tt vlistDefVarMissval} defines the missing value of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt missval}]
+\item[\texttt{missval}]
 Missing value.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the missing value of a Variable: {\tt vlistInqVarMissval}}
+\subsection{Get the missing value of a Variable: \texttt{vlistInqVarMissval}}
 \index{vlistInqVarMissval}
 \label{vlistInqVarMissval}
 
-The function {\tt vlistInqVarMissval} returns the missing value of a variable.
+The function {\texttt{vlistInqVarMissval}} returns the missing value of a variable.
 
 \subsubsection*{Usage}
 
@@ -523,10 +523,10 @@ The function {\tt vlistInqVarMissval} returns the missing value of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
 
 \end{deflist}
@@ -534,5 +534,5 @@ Variable identifier.
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarMissval} returns the missing value of the variable.
+{\texttt{vlistInqVarMissval}} returns the missing value of the variable.
 
diff --git a/doc/tex/c_zaxis.tex b/doc/tex/c_zaxis.tex
index fa7176593aea93c7c2a765bee2cd10e1ddfad622..0dfe57bc06e79f01845f10e35888f7a74653f024 100644
--- a/doc/tex/c_zaxis.tex
+++ b/doc/tex/c_zaxis.tex
@@ -1,10 +1,10 @@
 
 
-\subsection{Create a vertical Z-axis: {\tt zaxisCreate}}
+\subsection{Create a vertical Z-axis: \texttt{zaxisCreate}}
 \index{zaxisCreate}
 \label{zaxisCreate}
 
-The function {\tt zaxisCreate} creates a vertical Z-axis.
+The function {\texttt{zaxisCreate}} creates a vertical Z-axis.
 
 \subsubsection*{Usage}
 
@@ -13,18 +13,18 @@ The function {\tt zaxisCreate} creates a vertical Z-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt zaxistype\ }
-\item[{\tt zaxistype}]
+\begin{deflist}{\texttt{zaxistype}\ }
+\item[\texttt{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\_SNOW},
-                      {\tt ZAXIS\_LAKE\_BOTTOM}, {\tt ZAXIS\_SEDIMENT\_BOTTOM}, {\tt ZAXIS\_SEDIMENT\_BOTTOM\_TA},
-                      {\tt ZAXIS\_SEDIMENT\_BOTTOM\_TW}, {\tt ZAXIS\_MIX\_LAYER},
-                      {\tt ZAXIS\_DEPTH\_BELOW\_SEA} and {\tt ZAXIS\_DEPTH\_BELOW\_LAND}.
-\item[{\tt size}]
+                      The valid {\CDI} Z-axis types are {\texttt{ZAXIS\_GENERIC}}, {\texttt{ZAXIS\_SURFACE}},
+                      {\texttt{ZAXIS\_HYBRID}}, {\texttt{ZAXIS\_SIGMA}}, {\texttt{ZAXIS\_PRESSURE}}, {\texttt{ZAXIS\_HEIGHT}},
+                      {\texttt{ZAXIS\_ISENTROPIC}}, {\texttt{ZAXIS\_ALTITUDE}}, {\texttt{ZAXIS\_MEANSEA}}, {\texttt{ZAXIS\_TOA}},
+                      {\texttt{ZAXIS\_SEA\_BOTTOM}}, {\texttt{ZAXIS\_ATMOSPHERE}}, {\texttt{ZAXIS\_CLOUD\_BASE}},
+                      {\texttt{ZAXIS\_CLOUD\_TOP}}, {\texttt{ZAXIS\_ISOTHERM\_ZERO}}, {\texttt{ZAXIS\_SNOW}},
+                      {\texttt{ZAXIS\_LAKE\_BOTTOM}}, {\texttt{ZAXIS\_SEDIMENT\_BOTTOM}}, {\texttt{ZAXIS\_SEDIMENT\_BOTTOM\_TA}},
+                      {\texttt{ZAXIS\_SEDIMENT\_BOTTOM\_TW}}, {\texttt{ZAXIS\_MIX\_LAYER}},
+                      {\texttt{ZAXIS\_DEPTH\_BELOW\_SEA}} and {\texttt{ZAXIS\_DEPTH\_BELOW\_LAND}}.
+\item[\texttt{size}]
 Number of levels.
 
 \end{deflist}
@@ -32,12 +32,12 @@ Number of levels.
 
 \subsubsection*{Result}
 
-{\tt zaxisCreate} returns an identifier to the Z-axis.
+{\texttt{zaxisCreate}} returns an identifier to the Z-axis.
 
 
 \subsubsection*{Example}
 
-Here is an example using {\tt zaxisCreate} to create a pressure level Z-axis:
+Here is an example using {\texttt{zaxisCreate}} to create a pressure level Z-axis:
 
 \begin{lstlisting}[language=C, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
 
@@ -54,7 +54,7 @@ Here is an example using {\tt zaxisCreate} to create a pressure level Z-axis:
 \end{lstlisting}
 
 
-\subsection{Destroy a vertical Z-axis: {\tt zaxisDestroy}}
+\subsection{Destroy a vertical Z-axis: \texttt{zaxisDestroy}}
 \index{zaxisDestroy}
 \label{zaxisDestroy}
 \subsubsection*{Usage}
@@ -64,19 +64,19 @@ Here is an example using {\tt zaxisCreate} to create a pressure level Z-axis:
 \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}}.
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the type of a Z-axis: {\tt zaxisInqType}}
+\subsection{Get the type of a Z-axis: \texttt{zaxisInqType}}
 \index{zaxisInqType}
 \label{zaxisInqType}
 
-The function {\tt zaxisInqType} returns the type of a Z-axis.
+The function {\texttt{zaxisInqType}} returns the type of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -85,33 +85,33 @@ The function {\tt zaxisInqType} returns the type of a Z-axis.
 \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}} or {\htmlref{\tt vlistInqVarZaxis}{vlistInqVarZaxis}}.
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}} or {\htmlref{\texttt{vlistInqVarZaxis}}{vlistInqVarZaxis}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt zaxisInqType} returns the type of the Z-axis,
+{\texttt{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\_SNOW},
-{\tt ZAXIS\_LAKE\_BOTTOM}, {\tt ZAXIS\_SEDIMENT\_BOTTOM}, {\tt ZAXIS\_SEDIMENT\_BOTTOM\_TA},
-{\tt ZAXIS\_SEDIMENT\_BOTTOM\_TW}, {\tt ZAXIS\_MIX\_LAYER},
-{\tt ZAXIS\_DEPTH\_BELOW\_SEA} and {\tt ZAXIS\_DEPTH\_BELOW\_LAND}.
+The valid {\CDI} Z-axis types are {\texttt{ZAXIS\_GENERIC}}, {\texttt{ZAXIS\_SURFACE}},
+{\texttt{ZAXIS\_HYBRID}}, {\texttt{ZAXIS\_SIGMA}}, {\texttt{ZAXIS\_PRESSURE}}, {\texttt{ZAXIS\_HEIGHT}},
+{\texttt{ZAXIS\_ISENTROPIC}}, {\texttt{ZAXIS\_ALTITUDE}}, {\texttt{ZAXIS\_MEANSEA}}, {\texttt{ZAXIS\_TOA}},
+{\texttt{ZAXIS\_SEA\_BOTTOM}}, {\texttt{ZAXIS\_ATMOSPHERE}}, {\texttt{ZAXIS\_CLOUD\_BASE}},
+{\texttt{ZAXIS\_CLOUD\_TOP}}, {\texttt{ZAXIS\_ISOTHERM\_ZERO}}, {\texttt{ZAXIS\_SNOW}},
+{\texttt{ZAXIS\_LAKE\_BOTTOM}}, {\texttt{ZAXIS\_SEDIMENT\_BOTTOM}}, {\texttt{ZAXIS\_SEDIMENT\_BOTTOM\_TA}},
+{\texttt{ZAXIS\_SEDIMENT\_BOTTOM\_TW}}, {\texttt{ZAXIS\_MIX\_LAYER}},
+{\texttt{ZAXIS\_DEPTH\_BELOW\_SEA}} and {\texttt{ZAXIS\_DEPTH\_BELOW\_LAND}}.
 
 
 
-\subsection{Get the size of a Z-axis: {\tt zaxisInqSize}}
+\subsection{Get the size of a Z-axis: \texttt{zaxisInqSize}}
 \index{zaxisInqSize}
 \label{zaxisInqSize}
 
-The function {\tt zaxisInqSize} returns the size of a Z-axis.
+The function {\texttt{zaxisInqSize}} returns the size of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -120,24 +120,24 @@ The function {\tt zaxisInqSize} returns the size of a Z-axis.
 \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}} or {\htmlref{\tt vlistInqVarZaxis}{vlistInqVarZaxis}}.
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}} or {\htmlref{\texttt{vlistInqVarZaxis}}{vlistInqVarZaxis}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt zaxisInqSize} returns the number of levels of a Z-axis.
+{\texttt{zaxisInqSize}} returns the number of levels of a Z-axis.
 
 
 
-\subsection{Define the levels of a Z-axis: {\tt zaxisDefLevels}}
+\subsection{Define the levels of a Z-axis: \texttt{zaxisDefLevels}}
 \index{zaxisDefLevels}
 \label{zaxisDefLevels}
 
-The function {\tt zaxisDefLevels} defines the levels of a Z-axis.
+The function {\texttt{zaxisDefLevels}} defines the levels of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -146,21 +146,21 @@ The function {\tt zaxisDefLevels} defines the levels of a Z-axis.
 \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}]
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
+\item[\texttt{levels}]
 All levels of the Z-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get all levels of a Z-axis: {\tt zaxisInqLevels}}
+\subsection{Get all levels of a Z-axis: \texttt{zaxisInqLevels}}
 \index{zaxisInqLevels}
 \label{zaxisInqLevels}
 
-The function {\tt zaxisInqLevels} returns all levels of a Z-axis.
+The function {\texttt{zaxisInqLevels}} returns all levels of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -169,10 +169,10 @@ The function {\tt zaxisInqLevels} returns all levels of a Z-axis.
 \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}} or {\htmlref{\tt vlistInqVarZaxis}{vlistInqVarZaxis}}.
-\item[{\tt levels}]
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}} or {\htmlref{\texttt{vlistInqVarZaxis}}{vlistInqVarZaxis}}.
+\item[\texttt{levels}]
 Pointer to the location into which the levels are read.
                     The caller must allocate space for the returned values.
 
@@ -181,14 +181,14 @@ Pointer to the location into which the levels are read.
 
 \subsubsection*{Result}
 
-{\tt zaxisInqLevels} saves all levels to the parameter {\tt levels}.
+{\texttt{zaxisInqLevels}} saves all levels to the parameter {\texttt{levels}}.
 
 
-\subsection{Get one level of a Z-axis: {\tt zaxisInqLevel}}
+\subsection{Get one level of a Z-axis: \texttt{zaxisInqLevel}}
 \index{zaxisInqLevel}
 \label{zaxisInqLevel}
 
-The function {\tt zaxisInqLevel} returns one level of a Z-axis.
+The function {\texttt{zaxisInqLevel}} returns one level of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -197,10 +197,10 @@ The function {\tt zaxisInqLevel} returns one level of a Z-axis.
 \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}} or {\htmlref{\tt vlistInqVarZaxis}{vlistInqVarZaxis}}.
-\item[{\tt levelID}]
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}} or {\htmlref{\texttt{vlistInqVarZaxis}}{vlistInqVarZaxis}}.
+\item[\texttt{levelID}]
 Level index (range: 0 to nlevel-1).
 
 \end{deflist}
@@ -208,14 +208,14 @@ Level index (range: 0 to nlevel-1).
 
 \subsubsection*{Result}
 
-{\tt zaxisInqLevel} returns the level of a Z-axis.
+{\texttt{zaxisInqLevel}} returns the level of a Z-axis.
 
 
-\subsection{Define the name of a Z-axis: {\tt zaxisDefName}}
+\subsection{Define the name of a Z-axis: \texttt{zaxisDefName}}
 \index{zaxisDefName}
 \label{zaxisDefName}
 
-The function {\tt zaxisDefName} defines the name of a Z-axis.
+The function {\texttt{zaxisDefName}} defines the name of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -224,21 +224,21 @@ The function {\tt zaxisDefName} defines the name of a Z-axis.
 \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}]
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
+\item[\texttt{name}]
 Name of the Z-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the name of a Z-axis: {\tt zaxisInqName}}
+\subsection{Get the name of a Z-axis: \texttt{zaxisInqName}}
 \index{zaxisInqName}
 \label{zaxisInqName}
 
-The function {\tt zaxisInqName} returns the name of a Z-axis.
+The function {\texttt{zaxisInqName}} returns the name of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -247,28 +247,28 @@ The function {\tt zaxisInqName} returns the name of a Z-axis.
 \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}} or {\htmlref{\tt vlistInqVarZaxis}{vlistInqVarZaxis}}.
-\item[{\tt name}]
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}} or {\htmlref{\texttt{vlistInqVarZaxis}}{vlistInqVarZaxis}}.
+\item[\texttt{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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt zaxisInqName} returns the name of the Z-axis to the parameter name.
+{\texttt{zaxisInqName}} returns the name of the Z-axis to the parameter name.
 
 
 
-\subsection{Define the longname of a Z-axis: {\tt zaxisDefLongname}}
+\subsection{Define the longname of a Z-axis: \texttt{zaxisDefLongname}}
 \index{zaxisDefLongname}
 \label{zaxisDefLongname}
 
-The function {\tt zaxisDefLongname} defines the longname of a Z-axis.
+The function {\texttt{zaxisDefLongname}} defines the longname of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -277,21 +277,21 @@ The function {\tt zaxisDefLongname} defines the longname of a Z-axis.
 \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}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
+\item[\texttt{longname}]
 Longname of the Z-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the longname of a Z-axis: {\tt zaxisInqLongname}}
+\subsection{Get the longname of a Z-axis: \texttt{zaxisInqLongname}}
 \index{zaxisInqLongname}
 \label{zaxisInqLongname}
 
-The function {\tt zaxisInqLongname} returns the longname of a Z-axis.
+The function {\texttt{zaxisInqLongname}} returns the longname of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -300,28 +300,28 @@ The function {\tt zaxisInqLongname} returns the longname of a Z-axis.
 \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}} or {\htmlref{\tt vlistInqVarZaxis}{vlistInqVarZaxis}}.
-\item[{\tt longname}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}} or {\htmlref{\texttt{vlistInqVarZaxis}}{vlistInqVarZaxis}}.
+\item[\texttt{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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt zaxisInqLongname} returns the longname of the Z-axis to the parameter longname.
+{\texttt{zaxisInqLongname}} returns the longname of the Z-axis to the parameter longname.
 
 
 
-\subsection{Define the units of a Z-axis: {\tt zaxisDefUnits}}
+\subsection{Define the units of a Z-axis: \texttt{zaxisDefUnits}}
 \index{zaxisDefUnits}
 \label{zaxisDefUnits}
 
-The function {\tt zaxisDefUnits} defines the units of a Z-axis.
+The function {\texttt{zaxisDefUnits}} defines the units of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -330,21 +330,21 @@ The function {\tt zaxisDefUnits} defines the units of a Z-axis.
 \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}]
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
+\item[\texttt{units}]
 Units of the Z-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the units of a Z-axis: {\tt zaxisInqUnits}}
+\subsection{Get the units of a Z-axis: \texttt{zaxisInqUnits}}
 \index{zaxisInqUnits}
 \label{zaxisInqUnits}
 
-The function {\tt zaxisInqUnits} returns the units of a Z-axis.
+The function {\texttt{zaxisInqUnits}} returns the units of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -353,18 +353,18 @@ The function {\tt zaxisInqUnits} returns the units of a Z-axis.
 \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}} or {\htmlref{\tt vlistInqVarZaxis}{vlistInqVarZaxis}}.
-\item[{\tt units}]
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}} or {\htmlref{\texttt{vlistInqVarZaxis}}{vlistInqVarZaxis}}.
+\item[\texttt{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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt zaxisInqUnits} returns the units of the Z-axis to the parameter units.
+{\texttt{zaxisInqUnits}} returns the units of the Z-axis to the parameter units.
 
diff --git a/doc/tex/cdi_cman.tex b/doc/tex/cdi_cman.tex
index 31c8bdabe96a367d42775d367c87b988d1b1f379..17e152db5425fe36e202d22289f04bfb64164947 100644
--- a/doc/tex/cdi_cman.tex
+++ b/doc/tex/cdi_cman.tex
@@ -135,7 +135,7 @@
 \end{picture}
 
 \begin{flushright}
-{\large\bfseries Climate Data Interface \\ Version 1.8.0 \\ October 2016}
+{\large\bfseries Climate Data Interface \\ Version 1.8.1 \\ April 2017}
 \end{flushright}
 
 \vfill
diff --git a/doc/tex/cdi_fman.tex b/doc/tex/cdi_fman.tex
index d3735879dc068711871136641f1f17e23fc4f976..c5727d83cf8d312451d64c66061550b8460f7c10 100644
--- a/doc/tex/cdi_fman.tex
+++ b/doc/tex/cdi_fman.tex
@@ -132,7 +132,7 @@
 \end{picture}
 
 \begin{flushright}
-{\large\bfseries Climate Data Interface \\ Version 1.8.0 \\ October 2016}
+{\large\bfseries Climate Data Interface \\ Version 1.8.1 \\ April 2017}
 \end{flushright}
 
 \vfill
diff --git a/doc/tex/dataset.tex b/doc/tex/dataset.tex
index 68c530d3d917b5bd4f9fc07919a3c545b713a3b7..f7996bc9284a98abb3f9dcb2a7ebdaee2c96af1f 100644
--- a/doc/tex/dataset.tex
+++ b/doc/tex/dataset.tex
@@ -4,31 +4,31 @@ with one of the following predefined file format types:
 
 \vspace*{3mm}
 \hspace*{8mm}\begin{minipage}{15cm}
-\begin{deflist}{{\large\tt CDI\_FILETYPE\_GRB2 \ \ }}
-\item[{\large\tt CDI\_FILETYPE\_GRB}]   File type GRIB version 1
-\item[{\large\tt CDI\_FILETYPE\_GRB2}]  File type GRIB version 2          
-\item[{\large\tt CDI\_FILETYPE\_NC }]   File type NetCDF
-\item[{\large\tt CDI\_FILETYPE\_NC2}]   File type NetCDF version 2 (64-bit)
-\item[{\large\tt CDI\_FILETYPE\_NC4}]   File type NetCDF-4 (HDF5)
-\item[{\large\tt CDI\_FILETYPE\_NC4C}]  File type NetCDF-4 classic
-\item[{\large\tt CDI\_FILETYPE\_SRV}]   File type SERVICE
-\item[{\large\tt CDI\_FILETYPE\_EXT}]   File type EXTRA
-\item[{\large\tt CDI\_FILETYPE\_IEG}]   File type IEG
+\begin{deflist}{\large\texttt{CDI\_FILETYPE\_GRB2 \ \ }}
+\item[{\large\texttt{CDI\_FILETYPE\_GRB}}]   File type GRIB version 1
+\item[{\large\texttt{CDI\_FILETYPE\_GRB2}}]  File type GRIB version 2          
+\item[{\large\texttt{CDI\_FILETYPE\_NC }}]   File type NetCDF
+\item[{\large\texttt{CDI\_FILETYPE\_NC2}}]   File type NetCDF version 2 (64-bit)
+\item[{\large\texttt{CDI\_FILETYPE\_NC4}}]   File type NetCDF-4 (HDF5)
+\item[{\large\texttt{CDI\_FILETYPE\_NC4C}}]  File type NetCDF-4 classic
+\item[{\large\texttt{CDI\_FILETYPE\_SRV}}]   File type SERVICE
+\item[{\large\texttt{CDI\_FILETYPE\_EXT}}]   File type EXTRA
+\item[{\large\texttt{CDI\_FILETYPE\_IEG}}]   File type IEG
 \end{deflist}
 \end{minipage}
 \vspace*{3mm}
 
-{\tt CDI\_FILETYPE\_GRB2} is only available if the {\CDI} library was compiled with GRIB\_API support and all NetCDF file types are only available if the {\CDI} library was compiled with NetCDF support!
+\texttt{CDI\_FILETYPE\_GRB2} is only available if the {\CDI} library was compiled with GRIB\_API support and all NetCDF file types are only available if the {\CDI} library was compiled with NetCDF support!
 
 To set the byte order of a binary dataset with the file format
-type {\tt CDI\_FILETYPE\_SRV}, {\tt CDI\_FILETYPE\_EXT} or {\tt CDI\_FILETYPE\_IEG} use one of the
-following predefined constants in the call to {\htmlref{\tt streamDefByteorder}{streamDefByteorder}}:
+type \texttt{CDI\_FILETYPE\_SRV}, \texttt{CDI\_FILETYPE\_EXT} or \texttt{CDI\_FILETYPE\_IEG} use one of the
+following predefined constants in the call to {\htmlref{\texttt{streamDefByteorder}{streamDefByteorder}}:
 
 \vspace*{3mm}
 \hspace*{8mm}\begin{minipage}{15cm}
-\begin{deflist}{{\large\tt CDI\_LITTLEENDIAN \ \ }}
-\item[{\large\tt CDI\_BIGENDIAN   }]  Byte order big endian
-\item[{\large\tt CDI\_LITTLEENDIAN}]  Byte order little endian
+\begin{deflist}{\large\texttt{CDI\_LITTLEENDIAN \ \ }}
+\item[{\large\texttt{CDI\_BIGENDIAN   }}]  Byte order big endian
+\item[{\large\texttt{CDI\_LITTLEENDIAN}}]  Byte order little endian
 \end{deflist}
 \end{minipage}
 \vspace*{3mm}
diff --git a/doc/tex/environment.tex b/doc/tex/environment.tex
index 7af774a8faf8ac35d8ff12015079ec25a3d40ecf..14cca6f95c86aa39871780129d69a302ebf5e1da 100644
--- a/doc/tex/environment.tex
+++ b/doc/tex/environment.tex
@@ -9,7 +9,7 @@ The following table describes the environment variables that affect {\CDI}.
 \hline
 \rowcolor{pcolor2}
 %\cellcolor{pcolor2}
-{\bf Variable name}           &  {\bfseries Default} & {\bfseries Description} \\ \hline
+{\bfseries Variable name}           &  {\bfseries Default} & {\bfseries Description} \\ \hline
 CDI\_INVENTORY\_MODE   &   None   &  Set to time to skip double variable entries. \\
 CDI\_VERSION\_INFO          &         1   &  Set to 0 to disable NetCDF global attribute CDI.
 \end{tabular}
diff --git a/doc/tex/f_cdi_att.tex b/doc/tex/f_cdi_att.tex
index 898354417da47ae7c2e19a196c0012a1a36d6b17..83ddbcdf1797b06150818ebb38270dc00a1e3894 100644
--- a/doc/tex/f_cdi_att.tex
+++ b/doc/tex/f_cdi_att.tex
@@ -1,10 +1,10 @@
 
 
-\subsection{Get number of attributes: {\tt cdiInqNatts}}
+\subsection{Get number of attributes: \texttt{cdiInqNatts}}
 \index{cdiInqNatts}
 \label{cdiInqNatts}
 
-The function {\tt cdiInqNatts} gets the number of attributes assigned to this variable.
+The function {\texttt{cdiInqNatts}} gets the number of attributes assigned to this variable.
 
 \subsubsection*{Usage}
 
@@ -13,23 +13,23 @@ The function {\tt cdiInqNatts} gets the number of attributes assigned to this va
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt nattsp\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}, {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt nattsp}]
+\begin{deflist}{\texttt{nattsp}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{nattsp}]
 Pointer to location for returned number of attributes.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get information about an attribute: {\tt cdiInqAtt}}
+\subsection{Get information about an attribute: \texttt{cdiInqAtt}}
 \index{cdiInqAtt}
 \label{cdiInqAtt}
 
-The function {\tt cdiInqAtt} gets information about an attribute.
+The function {\texttt{cdiInqAtt}} gets information about an attribute.
 
 \subsubsection*{Usage}
 
@@ -39,31 +39,31 @@ The function {\tt cdiInqAtt} gets information about an attribute.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt attnum\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}, {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt attnum}]
+\begin{deflist}{\texttt{attnum}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{attnum}]
 Attribute number (from 0 to natts-1).
-\item[{\tt name}]
+\item[\texttt{name}]
 Pointer to the location for the returned attribute name. 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}.
-\item[{\tt typep}]
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
+\item[\texttt{typep}]
 Pointer to location for returned attribute type.
-\item[{\tt lenp}]
+\item[\texttt{lenp}]
 Pointer to location for returned attribute number.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Define an integer attribute: {\tt cdiDefAttInt}}
+\subsection{Define an integer attribute: \texttt{cdiDefAttInt}}
 \index{cdiDefAttInt}
 \label{cdiDefAttInt}
 
-The function {\tt cdiDefAttInt} defines an integer attribute.
+The function {\texttt{cdiDefAttInt}} defines an integer attribute.
 
 \subsubsection*{Usage}
 
@@ -73,29 +73,29 @@ The function {\tt cdiDefAttInt} defines an integer attribute.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt cdiID\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt name}]
+\begin{deflist}{\texttt{cdiID}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{name}]
 Attribute name.
-\item[{\tt type}]
-External data type ({\tt CDI\_DATATYPE\_INT16} or {\tt CDI\_DATATYPE\_INT32}).
-\item[{\tt len}]
+\item[\texttt{type}]
+External data type ({\texttt{CDI\_DATATYPE\_INT16}} or {\texttt{CDI\_DATATYPE\_INT32}}).
+\item[\texttt{len}]
 Number of values provided for the attribute.
-\item[{\tt ip}]
+\item[\texttt{ip}]
 Pointer to one or more integer values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the value(s) of an integer attribute: {\tt cdiInqAttInt}}
+\subsection{Get the value(s) of an integer attribute: \texttt{cdiInqAttInt}}
 \index{cdiInqAttInt}
 \label{cdiInqAttInt}
 
-The function {\tt cdiInqAttInt} gets the values(s) of an integer attribute.
+The function {\texttt{cdiInqAttInt}} gets the values(s) of an integer attribute.
 
 \subsubsection*{Usage}
 
@@ -105,27 +105,27 @@ The function {\tt cdiInqAttInt} gets the values(s) of an integer attribute.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt cdiID\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}, {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt name}]
+\begin{deflist}{\texttt{cdiID}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{name}]
 Attribute name.
-\item[{\tt mlen}]
+\item[\texttt{mlen}]
 Number of allocated values provided for the attribute.
-\item[{\tt ip}]
+\item[\texttt{ip}]
 Pointer location for returned integer attribute value(s).
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Define a floating point attribute: {\tt cdiDefAttFlt}}
+\subsection{Define a floating point attribute: \texttt{cdiDefAttFlt}}
 \index{cdiDefAttFlt}
 \label{cdiDefAttFlt}
 
-The function {\tt cdiDefAttFlt} defines a floating point attribute.
+The function {\texttt{cdiDefAttFlt}} defines a floating point attribute.
 
 \subsubsection*{Usage}
 
@@ -135,29 +135,29 @@ The function {\tt cdiDefAttFlt} defines a floating point attribute.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt cdiID\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt name}]
+\begin{deflist}{\texttt{cdiID}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{name}]
 Attribute name.
-\item[{\tt type}]
-External data type ({\tt CDI\_DATATYPE\_FLT32} or {\tt CDI\_DATATYPE\_FLT64}).
-\item[{\tt len}]
+\item[\texttt{type}]
+External data type ({\texttt{CDI\_DATATYPE\_FLT32}} or {\texttt{CDI\_DATATYPE\_FLT64}}).
+\item[\texttt{len}]
 Number of values provided for the attribute.
-\item[{\tt dp}]
+\item[\texttt{dp}]
 Pointer to one or more floating point values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the value(s) of a floating point attribute: {\tt cdiInqAttFlt}}
+\subsection{Get the value(s) of a floating point attribute: \texttt{cdiInqAttFlt}}
 \index{cdiInqAttFlt}
 \label{cdiInqAttFlt}
 
-The function {\tt cdiInqAttFlt} gets the values(s) of a floating point attribute.
+The function {\texttt{cdiInqAttFlt}} gets the values(s) of a floating point attribute.
 
 \subsubsection*{Usage}
 
@@ -167,27 +167,27 @@ The function {\tt cdiInqAttFlt} gets the values(s) of a floating point attribute
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt cdiID\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}, {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt name}]
+\begin{deflist}{\texttt{cdiID}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{name}]
 Attribute name.
-\item[{\tt mlen}]
+\item[\texttt{mlen}]
 Number of allocated values provided for the attribute.
-\item[{\tt dp}]
+\item[\texttt{dp}]
 Pointer location for returned floating point attribute value(s).
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Define a text attribute: {\tt cdiDefAttTxt}}
+\subsection{Define a text attribute: \texttt{cdiDefAttTxt}}
 \index{cdiDefAttTxt}
 \label{cdiDefAttTxt}
 
-The function {\tt cdiDefAttTxt} defines a text attribute.
+The function {\texttt{cdiDefAttTxt}} defines a text attribute.
 
 \subsubsection*{Usage}
 
@@ -197,27 +197,27 @@ The function {\tt cdiDefAttTxt} defines a text attribute.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt cdiID\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt name}]
+\begin{deflist}{\texttt{cdiID}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{name}]
 Attribute name.
-\item[{\tt len}]
+\item[\texttt{len}]
 Number of values provided for the attribute.
-\item[{\tt tp}]
+\item[\texttt{tp}]
 Pointer to one or more character values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the value(s) of a text attribute: {\tt cdiInqAttTxt}}
+\subsection{Get the value(s) of a text attribute: \texttt{cdiInqAttTxt}}
 \index{cdiInqAttTxt}
 \label{cdiInqAttTxt}
 
-The function {\tt cdiInqAttTxt} gets the values(s) of a text attribute.
+The function {\texttt{cdiInqAttTxt}} gets the values(s) of a text attribute.
 
 \subsubsection*{Usage}
 
@@ -227,16 +227,16 @@ The function {\tt cdiInqAttTxt} gets the values(s) of a text attribute.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt cdiID\ }
-\item[{\tt cdiID}]
-CDI ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}, {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
-Variable identifier, or {\tt CDI\_GLOBAL} for a global attribute.
-\item[{\tt name}]
+\begin{deflist}{\texttt{cdiID}\ }
+\item[\texttt{cdiID}]
+CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
+Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
+\item[\texttt{name}]
 Attribute name.
-\item[{\tt mlen}]
+\item[\texttt{mlen}]
 Number of allocated values provided for the attribute.
-\item[{\tt tp}]
+\item[\texttt{tp}]
 Pointer location for returned text attribute value(s).
 
 \end{deflist}
diff --git a/doc/tex/f_examples.tex b/doc/tex/f_examples.tex
index b8be0f63364b1f85b1b381fb91d8937656c3760f..3b7f84a64b9dee98fc313bd367409f9f3fd80d7b 100644
--- a/doc/tex/f_examples.tex
+++ b/doc/tex/f_examples.tex
@@ -19,7 +19,7 @@ levels. Both variables are on the same lon/lat grid.
 
 \subsection{Result}
 
-This is the {\tt ncdump -h} output of the resulting NetCDF file {\tt example.nc}.
+This is the \texttt{ncdump -h} output of the resulting NetCDF file \texttt{example.nc}.
 
 \begin{lstlisting}[]
 netcdf example {
@@ -59,7 +59,7 @@ data:
 
 \section{\label{example_read}Read a dataset}
 
-This example reads the NetCDF file {\tt example.nc} from \htmlref{Appendix \ref{example_write}}{example_write}.
+This example reads the NetCDF file \texttt{example.nc} from \htmlref{Appendix \ref{example_write}}{example_write}.
 
 \lstinputlisting[language=Fortran]
 {../../examples/cdi_read_f.f}
@@ -67,9 +67,9 @@ This example reads the NetCDF file {\tt example.nc} from \htmlref{Appendix \ref{
 
 \section{Copy a dataset}
 
-This example reads the NetCDF file {\tt example.nc} from \htmlref{Appendix B.1}{example_write}
+This example reads the NetCDF file \texttt{example.nc} from \htmlref{Appendix B.1}{example_write}
 and writes the result to a GRIB dataset by simple setting the output file type
-to {\tt CDI\_FILETYPE\_GRB}.
+to \texttt{CDI\_FILETYPE\_GRB}.
 
 \lstinputlisting[language=Fortran]
 {../../examples/cdi_copy_f.f}
@@ -77,14 +77,14 @@ to {\tt CDI\_FILETYPE\_GRB}.
 \section{\label{examples_f2003}Fortran 2003: mo\_cdi and iso\_c\_binding}
 
 This is the Fortran 2003 version of the reading and writing examples above.
-The main differenc to {\tt cfortran.h} is the
-character handling. Here {\tt CHARACTER(type=c\_char)} is used instead of
-{\tt CHARACTER}. Additionally plain fortran charcters and character variables
+The main differenc to \texttt{cfortran.h} is the
+character handling. Here \texttt{CHARACTER(type=c\_char)} is used instead of
+\texttt{CHARACTER}. Additionally plain fortran charcters and character variables
 have to be convertet to C charcters by
 \begin{itemize}
-\item appending {\tt '\textbackslash 0'} with {\tt //C\_NULL\_CHAR} 
-\item prepending {\tt C\_CHAR\_} to plain charcters
-\item take {\tt ctrim} from {\tt mo\_cdi} for {\tt CHARACTER(type=c\_char)} variables
+\item appending \texttt{'\textbackslash 0'} with \texttt{//C\_NULL\_CHAR} 
+\item prepending \texttt{C\_CHAR\_} to plain charcters
+\item take \texttt{ctrim} from \texttt{mo\_cdi} for \texttt{CHARACTER(type=c\_char)} variables
 \end{itemize}
 
 \lstinputlisting[language=Fortran]
diff --git a/doc/tex/f_grid.tex b/doc/tex/f_grid.tex
index 5be73085566441d08d22d6ad3cbe9bed55eec77e..ad24327b8a00736a977fd635ec3b889f7232e36d 100644
--- a/doc/tex/f_grid.tex
+++ b/doc/tex/f_grid.tex
@@ -1,10 +1,10 @@
 
 
-\subsection{Create a horizontal Grid: {\tt gridCreate}}
+\subsection{Create a horizontal Grid: \texttt{gridCreate}}
 \index{gridCreate}
 \label{gridCreate}
 
-The function {\tt gridCreate} creates a horizontal Grid.
+The function {\texttt{gridCreate}} creates a horizontal Grid.
 
 \subsubsection*{Usage}
 
@@ -13,13 +13,13 @@ The function {\tt gridCreate} creates a horizontal Grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridtype\ }
-\item[{\tt gridtype}]
+\begin{deflist}{\texttt{gridtype}\ }
+\item[\texttt{gridtype}]
 The type of the grid, one of the set of predefined {\CDI} grid types.
-                     The valid {\CDI} grid types are {\tt GRID\_GENERIC}, {\tt GRID\_GAUSSIAN},
-                     {\tt GRID\_LONLAT}, {\tt GRID\_LCC}, {\tt GRID\_SPECTRAL},
-                     {\tt GRID\_GME}, {\tt GRID\_CURVILINEAR} and {\tt GRID\_UNSTRUCTURED}.
-\item[{\tt size}]
+                     The valid {\CDI} grid types are {\texttt{GRID\_GENERIC}}, {\texttt{GRID\_GAUSSIAN}},
+                     {\texttt{GRID\_LONLAT}}, {\texttt{GRID\_PROJECTION}}, {\texttt{GRID\_SPECTRAL}},
+                     {\texttt{GRID\_GME}}, {\texttt{GRID\_CURVILINEAR}} and {\texttt{GRID\_UNSTRUCTURED}}.
+\item[\texttt{size}]
 Number of gridpoints.
 
 \end{deflist}
@@ -27,12 +27,12 @@ Number of gridpoints.
 
 \subsubsection*{Result}
 
-{\tt gridCreate} returns an identifier to the Grid.
+{\texttt{gridCreate}} returns an identifier to the Grid.
 
 
 \subsubsection*{Example}
 
-Here is an example using {\tt gridCreate} to create a regular lon/lat Grid:
+Here is an example using {\texttt{gridCreate}} to create a regular lon/lat Grid:
 
 \begin{lstlisting}[language=Fortran, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
 
@@ -54,7 +54,7 @@ Here is an example using {\tt gridCreate} to create a regular lon/lat Grid:
 \end{lstlisting}
 
 
-\subsection{Destroy a horizontal Grid: {\tt gridDestroy}}
+\subsection{Destroy a horizontal Grid: \texttt{gridDestroy}}
 \index{gridDestroy}
 \label{gridDestroy}
 \subsubsection*{Usage}
@@ -64,19 +64,19 @@ Here is an example using {\tt gridCreate} to create a regular lon/lat Grid:
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Duplicate a horizontal Grid: {\tt gridDuplicate}}
+\subsection{Duplicate a horizontal Grid: \texttt{gridDuplicate}}
 \index{gridDuplicate}
 \label{gridDuplicate}
 
-The function {\tt gridDuplicate} duplicates a horizontal Grid.
+The function {\texttt{gridDuplicate}} duplicates a horizontal Grid.
 
 \subsubsection*{Usage}
 
@@ -85,24 +85,24 @@ The function {\tt gridDuplicate} duplicates a horizontal Grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridDuplicate} returns an identifier to the duplicated Grid.
+{\texttt{gridDuplicate}} returns an identifier to the duplicated Grid.
 
 
 
-\subsection{Get the type of a Grid: {\tt gridInqType}}
+\subsection{Get the type of a Grid: \texttt{gridInqType}}
 \index{gridInqType}
 \label{gridInqType}
 
-The function {\tt gridInqType} returns the type of a Grid.
+The function {\texttt{gridInqType}} returns the type of a Grid.
 
 \subsubsection*{Usage}
 
@@ -111,28 +111,28 @@ The function {\tt gridInqType} returns the type of a Grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqType} returns the type of the grid,
+{\texttt{gridInqType}} returns the type of the grid,
 one of the set of predefined {\CDI} grid types.
-The valid {\CDI} grid types are {\tt GRID\_GENERIC}, {\tt GRID\_GAUSSIAN},
-{\tt GRID\_LONLAT}, {\tt GRID\_LCC}, {\tt GRID\_SPECTRAL}, {\tt GRID\_GME},
-{\tt GRID\_CURVILINEAR} and {\tt GRID\_UNSTRUCTURED}.
+The valid {\CDI} grid types are {\texttt{GRID\_GENERIC}}, {\texttt{GRID\_GAUSSIAN}},
+{\texttt{GRID\_LONLAT}}, {\texttt{GRID\_PROJECTION}}, {\texttt{GRID\_SPECTRAL}}, {\texttt{GRID\_GME}},
+{\texttt{GRID\_CURVILINEAR}} and {\texttt{GRID\_UNSTRUCTURED}}.
 
 
 
-\subsection{Get the size of a Grid: {\tt gridInqSize}}
+\subsection{Get the size of a Grid: \texttt{gridInqSize}}
 \index{gridInqSize}
 \label{gridInqSize}
 
-The function {\tt gridInqSize} returns the size of a Grid.
+The function {\texttt{gridInqSize}} returns the size of a Grid.
 
 \subsubsection*{Usage}
 
@@ -141,24 +141,24 @@ The function {\tt gridInqSize} returns the size of a Grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqSize} returns the number of grid points of a Grid.
+{\texttt{gridInqSize}} returns the number of grid points of a Grid.
 
 
 
-\subsection{Define the number of values of a X-axis: {\tt gridDefXsize}}
+\subsection{Define the number of values of a X-axis: \texttt{gridDefXsize}}
 \index{gridDefXsize}
 \label{gridDefXsize}
 
-The function {\tt gridDefXsize} defines the number of values of a X-axis.
+The function {\texttt{gridDefXsize}} defines the number of values of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -167,21 +167,21 @@ The function {\tt gridDefXsize} defines the number of values of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt xsize}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{xsize}]
 Number of values of a X-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the number of values of a X-axis: {\tt gridInqXsize}}
+\subsection{Get the number of values of a X-axis: \texttt{gridInqXsize}}
 \index{gridInqXsize}
 \label{gridInqXsize}
 
-The function {\tt gridInqXsize} returns the number of values of a X-axis.
+The function {\texttt{gridInqXsize}} returns the number of values of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -190,24 +190,24 @@ The function {\tt gridInqXsize} returns the number of values of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqXsize} returns the number of values of a X-axis.
+{\texttt{gridInqXsize}} returns the number of values of a X-axis.
 
 
 
-\subsection{Define the number of values of a Y-axis: {\tt gridDefYsize}}
+\subsection{Define the number of values of a Y-axis: \texttt{gridDefYsize}}
 \index{gridDefYsize}
 \label{gridDefYsize}
 
-The function {\tt gridDefYsize} defines the number of values of a Y-axis.
+The function {\texttt{gridDefYsize}} defines the number of values of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -216,21 +216,21 @@ The function {\tt gridDefYsize} defines the number of values of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt ysize}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{ysize}]
 Number of values of a Y-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the number of values of a Y-axis: {\tt gridInqYsize}}
+\subsection{Get the number of values of a Y-axis: \texttt{gridInqYsize}}
 \index{gridInqYsize}
 \label{gridInqYsize}
 
-The function {\tt gridInqYsize} returns the number of values of a Y-axis.
+The function {\texttt{gridInqYsize}} returns the number of values of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -239,24 +239,24 @@ The function {\tt gridInqYsize} returns the number of values of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqYsize} returns the number of values of a Y-axis.
+{\texttt{gridInqYsize}} returns the number of values of a Y-axis.
 
 
 
-\subsection{Define the number of parallels between a pole and the equator: {\tt gridDefNP}}
+\subsection{Define the number of parallels between a pole and the equator: \texttt{gridDefNP}}
 \index{gridDefNP}
 \label{gridDefNP}
 
-The function {\tt gridDefNP} defines the number of parallels between a pole and the equator
+The function {\texttt{gridDefNP}} defines the number of parallels between a pole and the equator
 of a Gaussian grid.
 
 \subsubsection*{Usage}
@@ -266,21 +266,21 @@ of a Gaussian grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt np}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{np}]
 Number of parallels between a pole and the equator.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the number of parallels between a pole and the equator: {\tt gridInqNP}}
+\subsection{Get the number of parallels between a pole and the equator: \texttt{gridInqNP}}
 \index{gridInqNP}
 \label{gridInqNP}
 
-The function {\tt gridInqNP} returns the number of parallels between a pole and the equator
+The function {\texttt{gridInqNP}} returns the number of parallels between a pole and the equator
 of a Gaussian grid.
 
 \subsubsection*{Usage}
@@ -290,24 +290,24 @@ of a Gaussian grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqNP} returns the number of parallels between a pole and the equator.
+{\texttt{gridInqNP}} returns the number of parallels between a pole and the equator.
 
 
 
-\subsection{Define the values of a X-axis: {\tt gridDefXvals}}
+\subsection{Define the values of a X-axis: \texttt{gridDefXvals}}
 \index{gridDefXvals}
 \label{gridDefXvals}
 
-The function {\tt gridDefXvals} defines all values of the X-axis.
+The function {\texttt{gridDefXvals}} defines all values of the X-axis.
 
 \subsubsection*{Usage}
 
@@ -316,21 +316,21 @@ The function {\tt gridDefXvals} defines all values of the X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt xvals}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{xvals}]
 X-values of the grid.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get all values of a X-axis: {\tt gridInqXvals}}
+\subsection{Get all values of a X-axis: \texttt{gridInqXvals}}
 \index{gridInqXvals}
 \label{gridInqXvals}
 
-The function {\tt gridInqXvals} returns all values of the X-axis.
+The function {\texttt{gridInqXvals}} returns all values of the X-axis.
 
 \subsubsection*{Usage}
 
@@ -339,10 +339,10 @@ The function {\tt gridInqXvals} returns all values of the X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt xvals}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{xvals}]
 Pointer to the location into which the X-values are read.
                     The caller must allocate space for the returned values.
 
@@ -351,17 +351,17 @@ Pointer to the location into which the X-values are read.
 
 \subsubsection*{Result}
 
-Upon successful completion {\tt gridInqXvals} returns the number of values and
-the values are stored in {\tt xvals}.
-Otherwise, 0 is returned and {\tt xvals} is empty.
+Upon successful completion {\texttt{gridInqXvals}} returns the number of values and
+the values are stored in {\texttt{xvals}}.
+Otherwise, 0 is returned and {\texttt{xvals}} is empty.
 
 
 
-\subsection{Define the values of a Y-axis: {\tt gridDefYvals}}
+\subsection{Define the values of a Y-axis: \texttt{gridDefYvals}}
 \index{gridDefYvals}
 \label{gridDefYvals}
 
-The function {\tt gridDefYvals} defines all values of the Y-axis.
+The function {\texttt{gridDefYvals}} defines all values of the Y-axis.
 
 \subsubsection*{Usage}
 
@@ -370,21 +370,21 @@ The function {\tt gridDefYvals} defines all values of the Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt yvals}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{yvals}]
 Y-values of the grid.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get all values of a Y-axis: {\tt gridInqYvals}}
+\subsection{Get all values of a Y-axis: \texttt{gridInqYvals}}
 \index{gridInqYvals}
 \label{gridInqYvals}
 
-The function {\tt gridInqYvals} returns all values of the Y-axis.
+The function {\texttt{gridInqYvals}} returns all values of the Y-axis.
 
 \subsubsection*{Usage}
 
@@ -393,10 +393,10 @@ The function {\tt gridInqYvals} returns all values of the Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt yvals}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{yvals}]
 Pointer to the location into which the Y-values are read.
                     The caller must allocate space for the returned values.
 
@@ -405,17 +405,17 @@ Pointer to the location into which the Y-values are read.
 
 \subsubsection*{Result}
 
-Upon successful completion {\tt gridInqYvals} returns the number of values and
-the values are stored in {\tt yvals}.
-Otherwise, 0 is returned and {\tt yvals} is empty.
+Upon successful completion {\texttt{gridInqYvals}} returns the number of values and
+the values are stored in {\texttt{yvals}}.
+Otherwise, 0 is returned and {\texttt{yvals}} is empty.
 
 
 
-\subsection{Define the bounds of a X-axis: {\tt gridDefXbounds}}
+\subsection{Define the bounds of a X-axis: \texttt{gridDefXbounds}}
 \index{gridDefXbounds}
 \label{gridDefXbounds}
 
-The function {\tt gridDefXbounds} defines all bounds of the X-axis.
+The function {\texttt{gridDefXbounds}} defines all bounds of the X-axis.
 
 \subsubsection*{Usage}
 
@@ -424,21 +424,21 @@ The function {\tt gridDefXbounds} defines all bounds of the X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt xbounds\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt xbounds}]
+\begin{deflist}{\texttt{xbounds}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{xbounds}]
 X-bounds of the grid.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the bounds of a X-axis: {\tt gridInqXbounds}}
+\subsection{Get the bounds of a X-axis: \texttt{gridInqXbounds}}
 \index{gridInqXbounds}
 \label{gridInqXbounds}
 
-The function {\tt gridInqXbounds} returns the bounds of the X-axis.
+The function {\texttt{gridInqXbounds}} returns the bounds of the X-axis.
 
 \subsubsection*{Usage}
 
@@ -447,10 +447,10 @@ The function {\tt gridInqXbounds} returns the bounds of the X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt xbounds\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt xbounds}]
+\begin{deflist}{\texttt{xbounds}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{xbounds}]
 Pointer to the location into which the X-bounds are read.
                     The caller must allocate space for the returned values.
 
@@ -459,17 +459,17 @@ Pointer to the location into which the X-bounds are read.
 
 \subsubsection*{Result}
 
-Upon successful completion {\tt gridInqXbounds} returns the number of bounds and
-the bounds are stored in {\tt xbounds}.
-Otherwise, 0 is returned and {\tt xbounds} is empty.
+Upon successful completion {\texttt{gridInqXbounds}} returns the number of bounds and
+the bounds are stored in {\texttt{xbounds}}.
+Otherwise, 0 is returned and {\texttt{xbounds}} is empty.
 
 
 
-\subsection{Define the bounds of a Y-axis: {\tt gridDefYbounds}}
+\subsection{Define the bounds of a Y-axis: \texttt{gridDefYbounds}}
 \index{gridDefYbounds}
 \label{gridDefYbounds}
 
-The function {\tt gridDefYbounds} defines all bounds of the Y-axis.
+The function {\texttt{gridDefYbounds}} defines all bounds of the Y-axis.
 
 \subsubsection*{Usage}
 
@@ -478,21 +478,21 @@ The function {\tt gridDefYbounds} defines all bounds of the Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt ybounds\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt ybounds}]
+\begin{deflist}{\texttt{ybounds}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{ybounds}]
 Y-bounds of the grid.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the bounds of a Y-axis: {\tt gridInqYbounds}}
+\subsection{Get the bounds of a Y-axis: \texttt{gridInqYbounds}}
 \index{gridInqYbounds}
 \label{gridInqYbounds}
 
-The function {\tt gridInqYbounds} returns the bounds of the Y-axis.
+The function {\texttt{gridInqYbounds}} returns the bounds of the Y-axis.
 
 \subsubsection*{Usage}
 
@@ -501,10 +501,10 @@ The function {\tt gridInqYbounds} returns the bounds of the Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt ybounds\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt ybounds}]
+\begin{deflist}{\texttt{ybounds}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{ybounds}]
 Pointer to the location into which the Y-bounds are read.
                     The caller must allocate space for the returned values.
 
@@ -513,17 +513,17 @@ Pointer to the location into which the Y-bounds are read.
 
 \subsubsection*{Result}
 
-Upon successful completion {\tt gridInqYbounds} returns the number of bounds and
-the bounds are stored in {\tt ybounds}.
-Otherwise, 0 is returned and {\tt ybounds} is empty.
+Upon successful completion {\texttt{gridInqYbounds}} returns the number of bounds and
+the bounds are stored in {\texttt{ybounds}}.
+Otherwise, 0 is returned and {\texttt{ybounds}} is empty.
 
 
 
-\subsection{Define the name of a X-axis: {\tt gridDefXname}}
+\subsection{Define the name of a X-axis: \texttt{gridDefXname}}
 \index{gridDefXname}
 \label{gridDefXname}
 
-The function {\tt gridDefXname} defines the name of a X-axis.
+The function {\texttt{gridDefXname}} defines the name of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -532,21 +532,21 @@ The function {\tt gridDefXname} defines the name of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt name}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{name}]
 Name of the X-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the name of a X-axis: {\tt gridInqXname}}
+\subsection{Get the name of a X-axis: \texttt{gridInqXname}}
 \index{gridInqXname}
 \label{gridInqXname}
 
-The function {\tt gridInqXname} returns the name of a X-axis.
+The function {\texttt{gridInqXname}} returns the name of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -555,28 +555,28 @@ The function {\tt gridInqXname} returns the name of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt name}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{name}]
 Name of the X-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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqXname} returns the name of the X-axis to the parameter name.
+{\texttt{gridInqXname}} returns the name of the X-axis to the parameter name.
 
 
 
-\subsection{Define the longname of a X-axis: {\tt gridDefXlongname}}
+\subsection{Define the longname of a X-axis: \texttt{gridDefXlongname}}
 \index{gridDefXlongname}
 \label{gridDefXlongname}
 
-The function {\tt gridDefXlongname} defines the longname of a X-axis.
+The function {\texttt{gridDefXlongname}} defines the longname of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -585,21 +585,21 @@ The function {\tt gridDefXlongname} defines the longname of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt longname\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt longname}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{longname}]
 Longname of the X-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the longname of a X-axis: {\tt gridInqXlongname}}
+\subsection{Get the longname of a X-axis: \texttt{gridInqXlongname}}
 \index{gridInqXlongname}
 \label{gridInqXlongname}
 
-The function {\tt gridInqXlongname} returns the longname of a X-axis.
+The function {\texttt{gridInqXlongname}} returns the longname of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -608,28 +608,28 @@ The function {\tt gridInqXlongname} returns the longname of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt longname\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt longname}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{longname}]
 Longname of the X-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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqXlongname} returns the longname of the X-axis to the parameter longname.
+{\texttt{gridInqXlongname}} returns the longname of the X-axis to the parameter longname.
 
 
 
-\subsection{Define the units of a X-axis: {\tt gridDefXunits}}
+\subsection{Define the units of a X-axis: \texttt{gridDefXunits}}
 \index{gridDefXunits}
 \label{gridDefXunits}
 
-The function {\tt gridDefXunits} defines the units of a X-axis.
+The function {\texttt{gridDefXunits}} defines the units of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -638,21 +638,21 @@ The function {\tt gridDefXunits} defines the units of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt units}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{units}]
 Units of the X-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the units of a X-axis: {\tt gridInqXunits}}
+\subsection{Get the units of a X-axis: \texttt{gridInqXunits}}
 \index{gridInqXunits}
 \label{gridInqXunits}
 
-The function {\tt gridInqXunits} returns the units of a X-axis.
+The function {\texttt{gridInqXunits}} returns the units of a X-axis.
 
 \subsubsection*{Usage}
 
@@ -661,28 +661,28 @@ The function {\tt gridInqXunits} returns the units of a X-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt units}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{units}]
 Units of the X-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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqXunits} returns the units of the X-axis to the parameter units.
+{\texttt{gridInqXunits}} returns the units of the X-axis to the parameter units.
 
 
 
-\subsection{Define the name of a Y-axis: {\tt gridDefYname}}
+\subsection{Define the name of a Y-axis: \texttt{gridDefYname}}
 \index{gridDefYname}
 \label{gridDefYname}
 
-The function {\tt gridDefYname} defines the name of a Y-axis.
+The function {\texttt{gridDefYname}} defines the name of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -691,21 +691,21 @@ The function {\tt gridDefYname} defines the name of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt name}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{name}]
 Name of the Y-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the name of a Y-axis: {\tt gridInqYname}}
+\subsection{Get the name of a Y-axis: \texttt{gridInqYname}}
 \index{gridInqYname}
 \label{gridInqYname}
 
-The function {\tt gridInqYname} returns the name of a Y-axis.
+The function {\texttt{gridInqYname}} returns the name of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -714,28 +714,28 @@ The function {\tt gridInqYname} returns the name of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt name}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{name}]
 Name of the Y-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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqYname} returns the name of the Y-axis to the parameter name.
+{\texttt{gridInqYname}} returns the name of the Y-axis to the parameter name.
 
 
 
-\subsection{Define the longname of a Y-axis: {\tt gridDefYlongname}}
+\subsection{Define the longname of a Y-axis: \texttt{gridDefYlongname}}
 \index{gridDefYlongname}
 \label{gridDefYlongname}
 
-The function {\tt gridDefYlongname} defines the longname of a Y-axis.
+The function {\texttt{gridDefYlongname}} defines the longname of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -744,21 +744,21 @@ The function {\tt gridDefYlongname} defines the longname of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt longname\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt longname}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{longname}]
 Longname of the Y-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the longname of a Y-axis: {\tt gridInqYlongname}}
+\subsection{Get the longname of a Y-axis: \texttt{gridInqYlongname}}
 \index{gridInqYlongname}
 \label{gridInqYlongname}
 
-The function {\tt gridInqYlongname} returns the longname of a Y-axis.
+The function {\texttt{gridInqYlongname}} returns the longname of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -767,28 +767,28 @@ The function {\tt gridInqYlongname} returns the longname of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt longname\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt longname}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{longname}]
 Longname of the Y-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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqYlongname} returns the longname of the Y-axis to the parameter longname.
+{\texttt{gridInqYlongname}} returns the longname of the Y-axis to the parameter longname.
 
 
 
-\subsection{Define the units of a Y-axis: {\tt gridDefYunits}}
+\subsection{Define the units of a Y-axis: \texttt{gridDefYunits}}
 \index{gridDefYunits}
 \label{gridDefYunits}
 
-The function {\tt gridDefYunits} defines the units of a Y-axis.
+The function {\texttt{gridDefYunits}} defines the units of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -797,21 +797,21 @@ The function {\tt gridDefYunits} defines the units of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt units}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{units}]
 Units of the Y-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the units of a Y-axis: {\tt gridInqYunits}}
+\subsection{Get the units of a Y-axis: \texttt{gridInqYunits}}
 \index{gridInqYunits}
 \label{gridInqYunits}
 
-The function {\tt gridInqYunits} returns the units of a Y-axis.
+The function {\texttt{gridInqYunits}} returns the units of a Y-axis.
 
 \subsubsection*{Usage}
 
@@ -820,28 +820,28 @@ The function {\tt gridInqYunits} returns the units of a Y-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
-\item[{\tt units}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
+\item[\texttt{units}]
 Units of the Y-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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqYunits} returns the units of the Y-axis to the parameter units.
+{\texttt{gridInqYunits}} returns the units of the Y-axis to the parameter units.
 
 
 
-\subsection{Define the reference number for an unstructured grid: {\tt gridDefNumber}}
+\subsection{Define the reference number for an unstructured grid: \texttt{gridDefNumber}}
 \index{gridDefNumber}
 \label{gridDefNumber}
 
-The function {\tt gridDefNumber} defines the reference number for an unstructured grid.
+The function {\texttt{gridDefNumber}} defines the reference number for an unstructured grid.
 
 \subsubsection*{Usage}
 
@@ -850,21 +850,21 @@ The function {\tt gridDefNumber} defines the reference number for an unstructure
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt number}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{number}]
 Reference number for an unstructured grid.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the reference number to an unstructured grid: {\tt gridInqNumber}}
+\subsection{Get the reference number to an unstructured grid: \texttt{gridInqNumber}}
 \index{gridInqNumber}
 \label{gridInqNumber}
 
-The function {\tt gridInqNumber} returns the reference number to an unstructured grid.
+The function {\texttt{gridInqNumber}} returns the reference number to an unstructured grid.
 
 \subsubsection*{Usage}
 
@@ -873,23 +873,23 @@ The function {\tt gridInqNumber} returns the reference number to an unstructured
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqNumber} returns the reference number to an unstructured grid.
+{\texttt{gridInqNumber}} returns the reference number to an unstructured grid.
 
 
-\subsection{Define the position of grid in the reference file: {\tt gridDefPosition}}
+\subsection{Define the position of grid in the reference file: \texttt{gridDefPosition}}
 \index{gridDefPosition}
 \label{gridDefPosition}
 
-The function {\tt gridDefPosition} defines the position of grid in the reference file.
+The function {\texttt{gridDefPosition}} defines the position of grid in the reference file.
 
 \subsubsection*{Usage}
 
@@ -898,21 +898,21 @@ The function {\tt gridDefPosition} defines the position of grid in the reference
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt position\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt position}]
+\begin{deflist}{\texttt{position}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{position}]
 Position of grid in the reference file.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the position of grid in the reference file: {\tt gridInqPosition}}
+\subsection{Get the position of grid in the reference file: \texttt{gridInqPosition}}
 \index{gridInqPosition}
 \label{gridInqPosition}
 
-The function {\tt gridInqPosition} returns the position of grid in the reference file.
+The function {\texttt{gridInqPosition}} returns the position of grid in the reference file.
 
 \subsubsection*{Usage}
 
@@ -921,23 +921,23 @@ The function {\tt gridInqPosition} returns the position of grid in the reference
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqPosition} returns the position of grid in the reference file.
+{\texttt{gridInqPosition}} returns the position of grid in the reference file.
 
 
-\subsection{Define the reference URI for an unstructured grid: {\tt gridDefReference}}
+\subsection{Define the reference URI for an unstructured grid: \texttt{gridDefReference}}
 \index{gridDefReference}
 \label{gridDefReference}
 
-The function {\tt gridDefReference} defines the reference URI for an unstructured grid.
+The function {\texttt{gridDefReference}} defines the reference URI for an unstructured grid.
 
 \subsubsection*{Usage}
 
@@ -946,21 +946,21 @@ The function {\tt gridDefReference} defines the reference URI for an unstructure
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt reference\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt reference}]
+\begin{deflist}{\texttt{reference}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{reference}]
 Reference URI for an unstructured grid.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the reference URI to an unstructured grid: {\tt gridInqReference}}
+\subsection{Get the reference URI to an unstructured grid: \texttt{gridInqReference}}
 \index{gridInqReference}
 \label{gridInqReference}
 
-The function {\tt gridInqReference} returns the reference URI to an unstructured grid.
+The function {\texttt{gridInqReference}} returns the reference URI to an unstructured grid.
 
 \subsubsection*{Usage}
 
@@ -969,23 +969,23 @@ The function {\tt gridInqReference} returns the reference URI to an unstructured
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqReference} returns the reference URI to an unstructured grid.
+{\texttt{gridInqReference}} returns the reference URI to an unstructured grid.
 
 
-\subsection{Define the UUID for an unstructured grid: {\tt gridDefUUID}}
+\subsection{Define the UUID for an unstructured grid: \texttt{gridDefUUID}}
 \index{gridDefUUID}
 \label{gridDefUUID}
 
-The function {\tt gridDefUUID} defines the UUID for an unstructured grid.
+The function {\texttt{gridDefUUID}} defines the UUID for an unstructured grid.
 
 \subsubsection*{Usage}
 
@@ -994,21 +994,21 @@ The function {\tt gridDefUUID} defines the UUID for an unstructured grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt uuid}]
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{uuid}]
 UUID for an unstructured grid.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the UUID to an unstructured grid: {\tt gridInqUUID}}
+\subsection{Get the UUID to an unstructured grid: \texttt{gridInqUUID}}
 \index{gridInqUUID}
 \label{gridInqUUID}
 
-The function {\tt gridInqUUID} returns the UUID to an unstructured grid.
+The function {\texttt{gridInqUUID}} returns the UUID to an unstructured grid.
 
 \subsubsection*{Usage}
 
@@ -1017,13 +1017,13 @@ The function {\tt gridInqUUID} returns the UUID to an unstructured grid.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt gridID\ }
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} or {\htmlref{\tt vlistInqVarGrid}{vlistInqVarGrid}}.
+\begin{deflist}{\texttt{gridID}\ }
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{vlistInqVarGrid}}{vlistInqVarGrid}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt gridInqUUID} returns the UUID to an unstructured grid to the parameter uuid.
+{\texttt{gridInqUUID}} returns the UUID to an unstructured grid to the parameter uuid.
diff --git a/doc/tex/f_link.tex b/doc/tex/f_link.tex
index d3fb2b602fc5c3fdf972d8ec00fcabb6ea2436c1..bbe120e9e6986d00825de38b99a94aacfeac27a1 100644
--- a/doc/tex/f_link.tex
+++ b/doc/tex/f_link.tex
@@ -1,28 +1,28 @@
 There are two different interfaces for using {\CDI} functions in Fortran:
-{\tt cfortran.h} and the instrinsic {\tt iso\_c\_binding} module from Fortran
+\texttt{cfortran.h} and the instrinsic \texttt{iso\_c\_binding} module from Fortran
 2003 standard. At  first, the preparations for compilers without F2003
 capabilities are described.\\\\
 Every FORTRAN file that references {\CDI} functions or constants must contain
-an appropriate {\tt INCLUDE} statement before the first such reference:
+an appropriate \texttt{INCLUDE} statement before the first such reference:
 
 \begin{verbatim}
    INCLUDE "cdi.inc"
 \end{verbatim}
 
-Unless the {\tt cdi.inc} file is installed in a standard directory where
-FORTRAN compiler always looks, you must use the {\tt -I} option when invoking
-the compiler, to specify a directory where {\tt cdi.inc} is installed, for example:
+Unless the \texttt{cdi.inc} file is installed in a standard directory where
+FORTRAN compiler always looks, you must use the \texttt{-I} option when invoking
+the compiler, to specify a directory where \texttt{cdi.inc} is installed, for example:
 
 \begin{verbatim}
    f77 -c -I/usr/local/cdi/include myprogram.f
 \end{verbatim}
 
-Alternatively, you could specify an absolute path name in the {\tt INCLUDE}
+Alternatively, you could specify an absolute path name in the \texttt{INCLUDE}
 statement, but then your program would not compile on another platform
 where {\CDI} is installed in a different location.
 
 Unless the {\CDI} library is installed in a standard directory where the linker
-always looks, you must use the {\tt -L} and {\tt -l} options to links an object file that
+always looks, you must use the \texttt{-L} and \texttt{-l} options to links an object file that
 uses the {\CDI} library. For example:
 
 \begin{verbatim}
@@ -44,19 +44,19 @@ For example with the NetCDF library:
                                 -L/usr/local/netcdf/lib -lnetcdf
 \end{verbatim}
 
-For using the {\tt iso\_c\_bindings} two things are necessary in a program or module
+For using the \texttt{iso\_c\_bindings} two things are necessary in a program or module
 
 \begin{verbatim}
    USE ISO_C_BINDING
    USE mo_cdi
 \end{verbatim}
 
-The {\tt iso\_c\_binding} module is included in {\tt mo\_cdi}, but without
-{\tt cfortran.h} characters and character variables have to be handled separately.
+The \texttt{iso\_c\_binding} module is included in \texttt{mo\_cdi}, but without
+\texttt{cfortran.h} characters and character variables have to be handled separately.
 Examples are available in section \ref{examples_f2003}.
 
-After installation {\tt mo\_cdi.o} and {\tt mo\_cdi.mod} are located in the
-library and header directory respectively. {\tt cdilib.o} has to be
+After installation \texttt{mo\_cdi.o} and \texttt{mo\_cdi.mod} are located in the
+library and header directory respectively. \texttt{cdilib.o} has to be
 mentioned directly on the command line. It can be found in the
 library directory, too. Depending on the {\CDI} configuration, a compile command
 should look like this:
diff --git a/doc/tex/f_ref.tex b/doc/tex/f_ref.tex
index 1f019d628526ac2d75d778ee8f7eb51fb13c1ff5..d771111267e3d9a27dac823cf12cdc62e4797242 100644
--- a/doc/tex/f_ref.tex
+++ b/doc/tex/f_ref.tex
@@ -1,12 +1,12 @@
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiDefAttFlt]{cdiDefAttFlt}
 \else
 cdiDefAttFlt
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION cdiDefAttFlt(INTEGER cdiID, INTEGER varID, CHARACTER*(*) name, 
                                   INTEGER type, INTEGER len, REAL*8 dp)
@@ -16,13 +16,13 @@ Define a floating point attribute
 \ifpdfoutput{}{(\ref{cdiDefAttFlt})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiDefAttInt]{cdiDefAttInt}
 \else
 cdiDefAttInt
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION cdiDefAttInt(INTEGER cdiID, INTEGER varID, CHARACTER*(*) name, 
                                   INTEGER type, INTEGER len, INTEGER ip)
@@ -32,13 +32,13 @@ Define an integer attribute
 \ifpdfoutput{}{(\ref{cdiDefAttInt})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiDefAttTxt]{cdiDefAttTxt}
 \else
 cdiDefAttTxt
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION cdiDefAttTxt(INTEGER cdiID, INTEGER varID, CHARACTER*(*) name, 
                                   INTEGER len, CHARACTER*(*) tp)
@@ -48,13 +48,13 @@ Define a text attribute
 \ifpdfoutput{}{(\ref{cdiDefAttTxt})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiInqAtt]{cdiInqAtt}
 \else
 cdiInqAtt
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION cdiInqAtt(INTEGER cdiID, INTEGER varID, INTEGER attnum, 
                                CHARACTER*(*) name, INTEGER typep, INTEGER lenp)
@@ -64,13 +64,13 @@ Get information about an attribute
 \ifpdfoutput{}{(\ref{cdiInqAtt})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiInqAttFlt]{cdiInqAttFlt}
 \else
 cdiInqAttFlt
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION cdiInqAttFlt(INTEGER cdiID, INTEGER varID, CHARACTER*(*) name, 
                                   INTEGER mlen, REAL*8 dp)
@@ -80,13 +80,13 @@ Get the value(s) of a floating point attribute
 \ifpdfoutput{}{(\ref{cdiInqAttFlt})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiInqAttInt]{cdiInqAttInt}
 \else
 cdiInqAttInt
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION cdiInqAttInt(INTEGER cdiID, INTEGER varID, CHARACTER*(*) name, 
                                   INTEGER mlen, INTEGER ip)
@@ -96,13 +96,13 @@ Get the value(s) of an integer attribute
 \ifpdfoutput{}{(\ref{cdiInqAttInt})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiInqAttTxt]{cdiInqAttTxt}
 \else
 cdiInqAttTxt
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION cdiInqAttTxt(INTEGER cdiID, INTEGER varID, CHARACTER*(*) name, 
                                   INTEGER mlen, CHARACTER*(*) tp)
@@ -112,13 +112,13 @@ Get the value(s) of a text attribute
 \ifpdfoutput{}{(\ref{cdiInqAttTxt})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[cdiInqNatts]{cdiInqNatts}
 \else
 cdiInqNatts
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION cdiInqNatts(INTEGER cdiID, INTEGER varID, INTEGER nattsp)
 \end{verbatim}
@@ -127,13 +127,13 @@ Get number of attributes
 \ifpdfoutput{}{(\ref{cdiInqNatts})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridCreate]{gridCreate}
 \else
 gridCreate
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION gridCreate(INTEGER gridtype, INTEGER size)
 \end{verbatim}
@@ -142,13 +142,13 @@ Create a horizontal Grid
 \ifpdfoutput{}{(\ref{gridCreate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefNP]{gridDefNP}
 \else
 gridDefNP
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefNP(INTEGER gridID, INTEGER np)
 \end{verbatim}
@@ -157,13 +157,13 @@ Define the number of parallels between a pole and the equator
 \ifpdfoutput{}{(\ref{gridDefNP})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefNumber]{gridDefNumber}
 \else
 gridDefNumber
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefNumber(INTEGER gridID, INTEGER number)
 \end{verbatim}
@@ -172,13 +172,13 @@ Define the reference number for an unstructured grid
 \ifpdfoutput{}{(\ref{gridDefNumber})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefPosition]{gridDefPosition}
 \else
 gridDefPosition
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefPosition(INTEGER gridID, INTEGER position)
 \end{verbatim}
@@ -187,13 +187,13 @@ Define the position of grid in the reference file
 \ifpdfoutput{}{(\ref{gridDefPosition})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefReference]{gridDefReference}
 \else
 gridDefReference
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefReference(INTEGER gridID, CHARACTER*(*) reference)
 \end{verbatim}
@@ -202,13 +202,13 @@ Define the reference URI for an unstructured grid
 \ifpdfoutput{}{(\ref{gridDefReference})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefUUID]{gridDefUUID}
 \else
 gridDefUUID
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefUUID(INTEGER gridID, CHARACTER*(*) uuid)
 \end{verbatim}
@@ -217,13 +217,13 @@ Define the UUID for an unstructured grid
 \ifpdfoutput{}{(\ref{gridDefUUID})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefXbounds]{gridDefXbounds}
 \else
 gridDefXbounds
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefXbounds(INTEGER gridID, REAL*8 xbounds)
 \end{verbatim}
@@ -232,13 +232,13 @@ Define the bounds of a X-axis
 \ifpdfoutput{}{(\ref{gridDefXbounds})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefXlongname]{gridDefXlongname}
 \else
 gridDefXlongname
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefXlongname(INTEGER gridID, CHARACTER*(*) longname)
 \end{verbatim}
@@ -247,13 +247,13 @@ Define the longname of a X-axis
 \ifpdfoutput{}{(\ref{gridDefXlongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefXname]{gridDefXname}
 \else
 gridDefXname
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefXname(INTEGER gridID, CHARACTER*(*) name)
 \end{verbatim}
@@ -262,13 +262,13 @@ Define the name of a X-axis
 \ifpdfoutput{}{(\ref{gridDefXname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefXsize]{gridDefXsize}
 \else
 gridDefXsize
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefXsize(INTEGER gridID, INTEGER xsize)
 \end{verbatim}
@@ -277,13 +277,13 @@ Define the number of values of a X-axis
 \ifpdfoutput{}{(\ref{gridDefXsize})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefXunits]{gridDefXunits}
 \else
 gridDefXunits
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefXunits(INTEGER gridID, CHARACTER*(*) units)
 \end{verbatim}
@@ -292,13 +292,13 @@ Define the units of a X-axis
 \ifpdfoutput{}{(\ref{gridDefXunits})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefXvals]{gridDefXvals}
 \else
 gridDefXvals
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefXvals(INTEGER gridID, REAL*8 xvals)
 \end{verbatim}
@@ -307,13 +307,13 @@ Define the values of a X-axis
 \ifpdfoutput{}{(\ref{gridDefXvals})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefYbounds]{gridDefYbounds}
 \else
 gridDefYbounds
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefYbounds(INTEGER gridID, REAL*8 ybounds)
 \end{verbatim}
@@ -322,13 +322,13 @@ Define the bounds of a Y-axis
 \ifpdfoutput{}{(\ref{gridDefYbounds})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefYlongname]{gridDefYlongname}
 \else
 gridDefYlongname
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefYlongname(INTEGER gridID, CHARACTER*(*) longname)
 \end{verbatim}
@@ -337,13 +337,13 @@ Define the longname of a Y-axis
 \ifpdfoutput{}{(\ref{gridDefYlongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefYname]{gridDefYname}
 \else
 gridDefYname
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefYname(INTEGER gridID, CHARACTER*(*) name)
 \end{verbatim}
@@ -352,13 +352,13 @@ Define the name of a Y-axis
 \ifpdfoutput{}{(\ref{gridDefYname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefYsize]{gridDefYsize}
 \else
 gridDefYsize
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefYsize(INTEGER gridID, INTEGER ysize)
 \end{verbatim}
@@ -367,13 +367,13 @@ Define the number of values of a Y-axis
 \ifpdfoutput{}{(\ref{gridDefYsize})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefYunits]{gridDefYunits}
 \else
 gridDefYunits
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefYunits(INTEGER gridID, CHARACTER*(*) units)
 \end{verbatim}
@@ -382,13 +382,13 @@ Define the units of a Y-axis
 \ifpdfoutput{}{(\ref{gridDefYunits})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDefYvals]{gridDefYvals}
 \else
 gridDefYvals
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDefYvals(INTEGER gridID, REAL*8 yvals)
 \end{verbatim}
@@ -397,13 +397,13 @@ Define the values of a Y-axis
 \ifpdfoutput{}{(\ref{gridDefYvals})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDestroy]{gridDestroy}
 \else
 gridDestroy
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridDestroy(INTEGER gridID)
 \end{verbatim}
@@ -412,13 +412,13 @@ Destroy a horizontal Grid
 \ifpdfoutput{}{(\ref{gridDestroy})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridDuplicate]{gridDuplicate}
 \else
 gridDuplicate
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION gridDuplicate(INTEGER gridID)
 \end{verbatim}
@@ -427,13 +427,13 @@ Duplicate a horizontal Grid
 \ifpdfoutput{}{(\ref{gridDuplicate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqNP]{gridInqNP}
 \else
 gridInqNP
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION gridInqNP(INTEGER gridID)
 \end{verbatim}
@@ -442,13 +442,13 @@ Get the number of parallels between a pole and the equator
 \ifpdfoutput{}{(\ref{gridInqNP})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqNumber]{gridInqNumber}
 \else
 gridInqNumber
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION gridInqNumber(INTEGER gridID)
 \end{verbatim}
@@ -457,13 +457,13 @@ Get the reference number to an unstructured grid
 \ifpdfoutput{}{(\ref{gridInqNumber})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqPosition]{gridInqPosition}
 \else
 gridInqPosition
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION gridInqPosition(INTEGER gridID)
 \end{verbatim}
@@ -472,13 +472,13 @@ Get the position of grid in the reference file
 \ifpdfoutput{}{(\ref{gridInqPosition})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqReference]{gridInqReference}
 \else
 gridInqReference
 \fi
-}
+}}
 \begin{verbatim}
     char *gridInqReference(INTEGER gridID, CHARACTER*(*) reference)
 \end{verbatim}
@@ -487,13 +487,13 @@ Get the reference URI to an unstructured grid
 \ifpdfoutput{}{(\ref{gridInqReference})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqSize]{gridInqSize}
 \else
 gridInqSize
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION gridInqSize(INTEGER gridID)
 \end{verbatim}
@@ -502,13 +502,13 @@ Get the size of a Grid
 \ifpdfoutput{}{(\ref{gridInqSize})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqType]{gridInqType}
 \else
 gridInqType
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION gridInqType(INTEGER gridID)
 \end{verbatim}
@@ -517,13 +517,13 @@ Get the type of a Grid
 \ifpdfoutput{}{(\ref{gridInqType})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqUUID]{gridInqUUID}
 \else
 gridInqUUID
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridInqUUID(INTEGER gridID, CHARACTER*(*) uuid)
 \end{verbatim}
@@ -532,13 +532,13 @@ Get the UUID to an unstructured grid
 \ifpdfoutput{}{(\ref{gridInqUUID})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqXbounds]{gridInqXbounds}
 \else
 gridInqXbounds
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION gridInqXbounds(INTEGER gridID, REAL*8 xbounds)
 \end{verbatim}
@@ -547,13 +547,13 @@ Get the bounds of a X-axis
 \ifpdfoutput{}{(\ref{gridInqXbounds})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqXlongname]{gridInqXlongname}
 \else
 gridInqXlongname
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridInqXlongname(INTEGER gridID, CHARACTER*(*) longname)
 \end{verbatim}
@@ -562,13 +562,13 @@ Get the longname of a X-axis
 \ifpdfoutput{}{(\ref{gridInqXlongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqXname]{gridInqXname}
 \else
 gridInqXname
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridInqXname(INTEGER gridID, CHARACTER*(*) name)
 \end{verbatim}
@@ -577,13 +577,13 @@ Get the name of a X-axis
 \ifpdfoutput{}{(\ref{gridInqXname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqXsize]{gridInqXsize}
 \else
 gridInqXsize
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION gridInqXsize(INTEGER gridID)
 \end{verbatim}
@@ -592,13 +592,13 @@ Get the number of values of a X-axis
 \ifpdfoutput{}{(\ref{gridInqXsize})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqXunits]{gridInqXunits}
 \else
 gridInqXunits
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridInqXunits(INTEGER gridID, CHARACTER*(*) units)
 \end{verbatim}
@@ -607,13 +607,13 @@ Get the units of a X-axis
 \ifpdfoutput{}{(\ref{gridInqXunits})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqXvals]{gridInqXvals}
 \else
 gridInqXvals
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION gridInqXvals(INTEGER gridID, REAL*8 xvals)
 \end{verbatim}
@@ -622,13 +622,13 @@ Get all values of a X-axis
 \ifpdfoutput{}{(\ref{gridInqXvals})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqYbounds]{gridInqYbounds}
 \else
 gridInqYbounds
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION gridInqYbounds(INTEGER gridID, REAL*8 ybounds)
 \end{verbatim}
@@ -637,13 +637,13 @@ Get the bounds of a Y-axis
 \ifpdfoutput{}{(\ref{gridInqYbounds})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqYlongname]{gridInqYlongname}
 \else
 gridInqYlongname
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridInqYlongname(INTEGER gridID, CHARACTER*(*) longname)
 \end{verbatim}
@@ -652,13 +652,13 @@ Get the longname of a Y-axis
 \ifpdfoutput{}{(\ref{gridInqYlongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqYname]{gridInqYname}
 \else
 gridInqYname
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridInqYname(INTEGER gridID, CHARACTER*(*) name)
 \end{verbatim}
@@ -667,13 +667,13 @@ Get the name of a Y-axis
 \ifpdfoutput{}{(\ref{gridInqYname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqYsize]{gridInqYsize}
 \else
 gridInqYsize
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION gridInqYsize(INTEGER gridID)
 \end{verbatim}
@@ -682,13 +682,13 @@ Get the number of values of a Y-axis
 \ifpdfoutput{}{(\ref{gridInqYsize})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqYunits]{gridInqYunits}
 \else
 gridInqYunits
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE gridInqYunits(INTEGER gridID, CHARACTER*(*) units)
 \end{verbatim}
@@ -697,13 +697,13 @@ Get the units of a Y-axis
 \ifpdfoutput{}{(\ref{gridInqYunits})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[gridInqYvals]{gridInqYvals}
 \else
 gridInqYvals
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION gridInqYvals(INTEGER gridID, REAL*8 yvals)
 \end{verbatim}
@@ -712,13 +712,13 @@ Get all values of a Y-axis
 \ifpdfoutput{}{(\ref{gridInqYvals})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamClose]{streamClose}
 \else
 streamClose
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE streamClose(INTEGER streamID)
 \end{verbatim}
@@ -727,13 +727,13 @@ Close an open dataset
 \ifpdfoutput{}{(\ref{streamClose})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamDefByteorder]{streamDefByteorder}
 \else
 streamDefByteorder
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE streamDefByteorder(INTEGER streamID, INTEGER byteorder)
 \end{verbatim}
@@ -742,13 +742,13 @@ Define the byte order
 \ifpdfoutput{}{(\ref{streamDefByteorder})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamDefRecord]{streamDefRecord}
 \else
 streamDefRecord
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE streamDefRecord(INTEGER streamID, INTEGER varID, INTEGER levelID)
 \end{verbatim}
@@ -757,13 +757,13 @@ Define the next record
 \ifpdfoutput{}{(\ref{streamDefRecord})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamDefTimestep]{streamDefTimestep}
 \else
 streamDefTimestep
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION streamDefTimestep(INTEGER streamID, INTEGER tsID)
 \end{verbatim}
@@ -772,13 +772,13 @@ Define time step
 \ifpdfoutput{}{(\ref{streamDefTimestep})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamDefVlist]{streamDefVlist}
 \else
 streamDefVlist
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE streamDefVlist(INTEGER streamID, INTEGER vlistID)
 \end{verbatim}
@@ -787,13 +787,13 @@ Define the variable list
 \ifpdfoutput{}{(\ref{streamDefVlist})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamInqByteorder]{streamInqByteorder}
 \else
 streamInqByteorder
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION streamInqByteorder(INTEGER streamID)
 \end{verbatim}
@@ -802,13 +802,13 @@ Get the byte order
 \ifpdfoutput{}{(\ref{streamInqByteorder})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamInqFiletype]{streamInqFiletype}
 \else
 streamInqFiletype
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION streamInqFiletype(INTEGER streamID)
 \end{verbatim}
@@ -817,13 +817,13 @@ Get the filetype
 \ifpdfoutput{}{(\ref{streamInqFiletype})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamInqTimestep]{streamInqTimestep}
 \else
 streamInqTimestep
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION streamInqTimestep(INTEGER streamID, INTEGER tsID)
 \end{verbatim}
@@ -832,13 +832,13 @@ Get time step
 \ifpdfoutput{}{(\ref{streamInqTimestep})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamInqVlist]{streamInqVlist}
 \else
 streamInqVlist
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION streamInqVlist(INTEGER streamID)
 \end{verbatim}
@@ -847,13 +847,13 @@ Get the variable list
 \ifpdfoutput{}{(\ref{streamInqVlist})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamOpenRead]{streamOpenRead}
 \else
 streamOpenRead
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION streamOpenRead(CHARACTER*(*) path)
 \end{verbatim}
@@ -862,13 +862,13 @@ Open a dataset for reading
 \ifpdfoutput{}{(\ref{streamOpenRead})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamOpenWrite]{streamOpenWrite}
 \else
 streamOpenWrite
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION streamOpenWrite(CHARACTER*(*) path, INTEGER filetype)
 \end{verbatim}
@@ -877,13 +877,13 @@ Create a new dataset
 \ifpdfoutput{}{(\ref{streamOpenWrite})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamReadVar]{streamReadVar}
 \else
 streamReadVar
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE streamReadVar(INTEGER streamID, INTEGER varID, REAL*8 data, 
                              INTEGER nmiss)
@@ -893,13 +893,13 @@ Read a variable
 \ifpdfoutput{}{(\ref{streamReadVar})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamReadVarF]{streamReadVarF}
 \else
 streamReadVarF
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE streamReadVar(INTEGER streamID, INTEGER varID, REAL*4 data, 
                              INTEGER nmiss)
@@ -909,13 +909,13 @@ Read a variable
 \ifpdfoutput{}{(\ref{streamReadVarF})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamReadVarSlice]{streamReadVarSlice}
 \else
 streamReadVarSlice
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE streamReadVarSlice(INTEGER streamID, INTEGER varID, INTEGER levelID, 
                                   REAL*8 data, INTEGER nmiss)
@@ -925,13 +925,13 @@ Read a horizontal slice of a variable
 \ifpdfoutput{}{(\ref{streamReadVarSlice})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamReadVarSliceF]{streamReadVarSliceF}
 \else
 streamReadVarSliceF
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE streamReadVarSliceF(INTEGER streamID, INTEGER varID, INTEGER levelID, 
                                    REAL*4 data, INTEGER nmiss)
@@ -941,13 +941,13 @@ Read a horizontal slice of a variable
 \ifpdfoutput{}{(\ref{streamReadVarSliceF})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamWriteVar]{streamWriteVar}
 \else
 streamWriteVar
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE streamWriteVar(INTEGER streamID, INTEGER varID, REAL*8 data, 
                               INTEGER nmiss)
@@ -957,13 +957,13 @@ Write a variable
 \ifpdfoutput{}{(\ref{streamWriteVar})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamWriteVarF]{streamWriteVarF}
 \else
 streamWriteVarF
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE streamWriteVarF(INTEGER streamID, INTEGER varID, REAL*4 data, 
                                INTEGER nmiss)
@@ -973,13 +973,13 @@ Write a variable
 \ifpdfoutput{}{(\ref{streamWriteVarF})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamWriteVarSlice]{streamWriteVarSlice}
 \else
 streamWriteVarSlice
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE streamWriteVarSlice(INTEGER streamID, INTEGER varID, INTEGER levelID, 
                                    REAL*8 data, INTEGER nmiss)
@@ -989,13 +989,13 @@ Write a horizontal slice of a variable
 \ifpdfoutput{}{(\ref{streamWriteVarSlice})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[streamWriteVarSliceF]{streamWriteVarSliceF}
 \else
 streamWriteVarSliceF
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE streamWriteVarSliceF(INTEGER streamID, INTEGER varID, INTEGER levelID, 
                                     REAL*4 data, INTEGER nmiss)
@@ -1005,13 +1005,13 @@ Write a horizontal slice of a variable
 \ifpdfoutput{}{(\ref{streamWriteVarSliceF})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisCreate]{taxisCreate}
 \else
 taxisCreate
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION taxisCreate(INTEGER taxistype)
 \end{verbatim}
@@ -1020,13 +1020,13 @@ Create a Time axis
 \ifpdfoutput{}{(\ref{taxisCreate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisDefCalendar]{taxisDefCalendar}
 \else
 taxisDefCalendar
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE taxisDefCalendar(INTEGER taxisID, INTEGER calendar)
 \end{verbatim}
@@ -1035,13 +1035,13 @@ Define the calendar
 \ifpdfoutput{}{(\ref{taxisDefCalendar})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisDefRdate]{taxisDefRdate}
 \else
 taxisDefRdate
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE taxisDefRdate(INTEGER taxisID, INTEGER rdate)
 \end{verbatim}
@@ -1050,13 +1050,13 @@ Define the reference date
 \ifpdfoutput{}{(\ref{taxisDefRdate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisDefRtime]{taxisDefRtime}
 \else
 taxisDefRtime
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE taxisDefRtime(INTEGER taxisID, INTEGER rtime)
 \end{verbatim}
@@ -1065,13 +1065,13 @@ Define the reference time
 \ifpdfoutput{}{(\ref{taxisDefRtime})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisDefVdate]{taxisDefVdate}
 \else
 taxisDefVdate
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE taxisDefVdate(INTEGER taxisID, INTEGER vdate)
 \end{verbatim}
@@ -1080,13 +1080,13 @@ Define the verification date
 \ifpdfoutput{}{(\ref{taxisDefVdate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisDefVtime]{taxisDefVtime}
 \else
 taxisDefVtime
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE taxisDefVtime(INTEGER taxisID, INTEGER vtime)
 \end{verbatim}
@@ -1095,13 +1095,13 @@ Define the verification time
 \ifpdfoutput{}{(\ref{taxisDefVtime})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisDestroy]{taxisDestroy}
 \else
 taxisDestroy
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE taxisDestroy(INTEGER taxisID)
 \end{verbatim}
@@ -1110,13 +1110,13 @@ Destroy a Time axis
 \ifpdfoutput{}{(\ref{taxisDestroy})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisInqCalendar]{taxisInqCalendar}
 \else
 taxisInqCalendar
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION taxisInqCalendar(INTEGER taxisID)
 \end{verbatim}
@@ -1125,13 +1125,13 @@ Get the calendar
 \ifpdfoutput{}{(\ref{taxisInqCalendar})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisInqRdate]{taxisInqRdate}
 \else
 taxisInqRdate
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION taxisInqRdate(INTEGER taxisID)
 \end{verbatim}
@@ -1140,13 +1140,13 @@ Get the reference date
 \ifpdfoutput{}{(\ref{taxisInqRdate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisInqRtime]{taxisInqRtime}
 \else
 taxisInqRtime
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION taxisInqRtime(INTEGER taxisID)
 \end{verbatim}
@@ -1155,13 +1155,13 @@ Get the reference time
 \ifpdfoutput{}{(\ref{taxisInqRtime})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisInqVdate]{taxisInqVdate}
 \else
 taxisInqVdate
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION taxisInqVdate(INTEGER taxisID)
 \end{verbatim}
@@ -1170,13 +1170,13 @@ Get the verification date
 \ifpdfoutput{}{(\ref{taxisInqVdate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[taxisInqVtime]{taxisInqVtime}
 \else
 taxisInqVtime
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION taxisInqVtime(INTEGER taxisID)
 \end{verbatim}
@@ -1185,13 +1185,13 @@ Get the verification time
 \ifpdfoutput{}{(\ref{taxisInqVtime})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistCat]{vlistCat}
 \else
 vlistCat
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistCat(INTEGER vlistID2, INTEGER vlistID1)
 \end{verbatim}
@@ -1200,13 +1200,13 @@ Concatenate two variable lists
 \ifpdfoutput{}{(\ref{vlistCat})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistCopy]{vlistCopy}
 \else
 vlistCopy
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistCopy(INTEGER vlistID2, INTEGER vlistID1)
 \end{verbatim}
@@ -1215,13 +1215,13 @@ Copy a variable list
 \ifpdfoutput{}{(\ref{vlistCopy})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistCopyFlag]{vlistCopyFlag}
 \else
 vlistCopyFlag
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistCopyFlag(INTEGER vlistID2, INTEGER vlistID1)
 \end{verbatim}
@@ -1230,13 +1230,13 @@ Copy some entries of a variable list
 \ifpdfoutput{}{(\ref{vlistCopyFlag})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistCreate]{vlistCreate}
 \else
 vlistCreate
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION vlistCreate()
 \end{verbatim}
@@ -1245,13 +1245,13 @@ Create a variable list
 \ifpdfoutput{}{(\ref{vlistCreate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefTaxis]{vlistDefTaxis}
 \else
 vlistDefTaxis
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistDefTaxis(INTEGER vlistID, INTEGER taxisID)
 \end{verbatim}
@@ -1260,13 +1260,13 @@ Define the time axis
 \ifpdfoutput{}{(\ref{vlistDefTaxis})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVar]{vlistDefVar}
 \else
 vlistDefVar
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION vlistDefVar(INTEGER vlistID, INTEGER gridID, INTEGER zaxisID, 
                                  INTEGER tsteptype)
@@ -1276,13 +1276,13 @@ Define a Variable
 \ifpdfoutput{}{(\ref{vlistDefVar})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVarCode]{vlistDefVarCode}
 \else
 vlistDefVarCode
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistDefVarCode(INTEGER vlistID, INTEGER varID, INTEGER code)
 \end{verbatim}
@@ -1291,13 +1291,13 @@ Define the code number of a Variable
 \ifpdfoutput{}{(\ref{vlistDefVarCode})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVarDatatype]{vlistDefVarDatatype}
 \else
 vlistDefVarDatatype
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistDefVarDatatype(INTEGER vlistID, INTEGER varID, INTEGER datatype)
 \end{verbatim}
@@ -1306,13 +1306,13 @@ Define the data type of a Variable
 \ifpdfoutput{}{(\ref{vlistDefVarDatatype})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVarLongname]{vlistDefVarLongname}
 \else
 vlistDefVarLongname
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistDefVarLongname(INTEGER vlistID, INTEGER varID, 
                                    CHARACTER*(*) longname)
@@ -1322,13 +1322,13 @@ Define the long name of a Variable
 \ifpdfoutput{}{(\ref{vlistDefVarLongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVarMissval]{vlistDefVarMissval}
 \else
 vlistDefVarMissval
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistDefVarMissval(INTEGER vlistID, INTEGER varID, REAL*8 missval)
 \end{verbatim}
@@ -1337,13 +1337,13 @@ Define the missing value of a Variable
 \ifpdfoutput{}{(\ref{vlistDefVarMissval})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVarName]{vlistDefVarName}
 \else
 vlistDefVarName
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistDefVarName(INTEGER vlistID, INTEGER varID, CHARACTER*(*) name)
 \end{verbatim}
@@ -1352,13 +1352,13 @@ Define the name of a Variable
 \ifpdfoutput{}{(\ref{vlistDefVarName})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVarStdname]{vlistDefVarStdname}
 \else
 vlistDefVarStdname
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistDefVarStdname(INTEGER vlistID, INTEGER varID, 
                                   CHARACTER*(*) stdname)
@@ -1368,13 +1368,13 @@ Define the standard name of a Variable
 \ifpdfoutput{}{(\ref{vlistDefVarStdname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDefVarUnits]{vlistDefVarUnits}
 \else
 vlistDefVarUnits
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistDefVarUnits(INTEGER vlistID, INTEGER varID, CHARACTER*(*) units)
 \end{verbatim}
@@ -1383,13 +1383,13 @@ Define the units of a Variable
 \ifpdfoutput{}{(\ref{vlistDefVarUnits})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDestroy]{vlistDestroy}
 \else
 vlistDestroy
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistDestroy(INTEGER vlistID)
 \end{verbatim}
@@ -1398,13 +1398,13 @@ Destroy a variable list
 \ifpdfoutput{}{(\ref{vlistDestroy})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistDuplicate]{vlistDuplicate}
 \else
 vlistDuplicate
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION vlistDuplicate(INTEGER vlistID)
 \end{verbatim}
@@ -1413,13 +1413,13 @@ Duplicate a variable list
 \ifpdfoutput{}{(\ref{vlistDuplicate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqTaxis]{vlistInqTaxis}
 \else
 vlistInqTaxis
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION vlistInqTaxis(INTEGER vlistID)
 \end{verbatim}
@@ -1428,13 +1428,13 @@ Get the time axis
 \ifpdfoutput{}{(\ref{vlistInqTaxis})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarCode]{vlistInqVarCode}
 \else
 vlistInqVarCode
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION vlistInqVarCode(INTEGER vlistID, INTEGER varID)
 \end{verbatim}
@@ -1443,13 +1443,13 @@ Get the Code number of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarCode})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarDatatype]{vlistInqVarDatatype}
 \else
 vlistInqVarDatatype
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION vlistInqVarDatatype(INTEGER vlistID, INTEGER varID)
 \end{verbatim}
@@ -1458,13 +1458,13 @@ Get the data type of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarDatatype})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarGrid]{vlistInqVarGrid}
 \else
 vlistInqVarGrid
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION vlistInqVarGrid(INTEGER vlistID, INTEGER varID)
 \end{verbatim}
@@ -1473,13 +1473,13 @@ Get the Grid ID of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarGrid})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarLongname]{vlistInqVarLongname}
 \else
 vlistInqVarLongname
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistInqVarLongname(INTEGER vlistID, INTEGER varID, 
                                    CHARACTER*(*) longname)
@@ -1489,13 +1489,13 @@ Get the longname of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarLongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarMissval]{vlistInqVarMissval}
 \else
 vlistInqVarMissval
 \fi
-}
+}}
 \begin{verbatim}
     REAL*8 FUNCTION vlistInqVarMissval(INTEGER vlistID, INTEGER varID)
 \end{verbatim}
@@ -1504,13 +1504,13 @@ Get the missing value of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarMissval})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarName]{vlistInqVarName}
 \else
 vlistInqVarName
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistInqVarName(INTEGER vlistID, INTEGER varID, CHARACTER*(*) name)
 \end{verbatim}
@@ -1519,13 +1519,13 @@ Get the name of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarName})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarStdname]{vlistInqVarStdname}
 \else
 vlistInqVarStdname
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistInqVarStdname(INTEGER vlistID, INTEGER varID, 
                                   CHARACTER*(*) stdname)
@@ -1535,13 +1535,13 @@ Get the standard name of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarStdname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarTsteptype]{vlistInqVarTsteptype}
 \else
 vlistInqVarTsteptype
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION vlistInqVarTsteptype(INTEGER vlistID, INTEGER varID)
 \end{verbatim}
@@ -1550,13 +1550,13 @@ Get the timestep type of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarTsteptype})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarUnits]{vlistInqVarUnits}
 \else
 vlistInqVarUnits
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE vlistInqVarUnits(INTEGER vlistID, INTEGER varID, CHARACTER*(*) units)
 \end{verbatim}
@@ -1565,13 +1565,13 @@ Get the units of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarUnits})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistInqVarZaxis]{vlistInqVarZaxis}
 \else
 vlistInqVarZaxis
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION vlistInqVarZaxis(INTEGER vlistID, INTEGER varID)
 \end{verbatim}
@@ -1580,13 +1580,13 @@ Get the Zaxis ID of a Variable
 \ifpdfoutput{}{(\ref{vlistInqVarZaxis})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistNgrids]{vlistNgrids}
 \else
 vlistNgrids
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION vlistNgrids(INTEGER vlistID)
 \end{verbatim}
@@ -1595,13 +1595,13 @@ Number of grids in a variable list
 \ifpdfoutput{}{(\ref{vlistNgrids})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistNvars]{vlistNvars}
 \else
 vlistNvars
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION vlistNvars(INTEGER vlistID)
 \end{verbatim}
@@ -1610,13 +1610,13 @@ Number of variables in a variable list
 \ifpdfoutput{}{(\ref{vlistNvars})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[vlistNzaxis]{vlistNzaxis}
 \else
 vlistNzaxis
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION vlistNzaxis(INTEGER vlistID)
 \end{verbatim}
@@ -1625,13 +1625,13 @@ Number of zaxis in a variable list
 \ifpdfoutput{}{(\ref{vlistNzaxis})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisCreate]{zaxisCreate}
 \else
 zaxisCreate
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION zaxisCreate(INTEGER zaxistype, INTEGER size)
 \end{verbatim}
@@ -1640,13 +1640,13 @@ Create a vertical Z-axis
 \ifpdfoutput{}{(\ref{zaxisCreate})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisDefLevels]{zaxisDefLevels}
 \else
 zaxisDefLevels
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE zaxisDefLevels(INTEGER zaxisID, REAL*8 levels)
 \end{verbatim}
@@ -1655,13 +1655,13 @@ Define the levels of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisDefLevels})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisDefLongname]{zaxisDefLongname}
 \else
 zaxisDefLongname
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE zaxisDefLongname(INTEGER zaxisID, CHARACTER*(*) longname)
 \end{verbatim}
@@ -1670,13 +1670,13 @@ Define the longname of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisDefLongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisDefName]{zaxisDefName}
 \else
 zaxisDefName
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE zaxisDefName(INTEGER zaxisID, CHARACTER*(*) name)
 \end{verbatim}
@@ -1685,13 +1685,13 @@ Define the name of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisDefName})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisDefUnits]{zaxisDefUnits}
 \else
 zaxisDefUnits
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE zaxisDefUnits(INTEGER zaxisID, CHARACTER*(*) units)
 \end{verbatim}
@@ -1700,13 +1700,13 @@ Define the units of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisDefUnits})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisDestroy]{zaxisDestroy}
 \else
 zaxisDestroy
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE zaxisDestroy(INTEGER zaxisID)
 \end{verbatim}
@@ -1715,13 +1715,13 @@ Destroy a vertical Z-axis
 \ifpdfoutput{}{(\ref{zaxisDestroy})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisInqLevel]{zaxisInqLevel}
 \else
 zaxisInqLevel
 \fi
-}
+}}
 \begin{verbatim}
     REAL*8 FUNCTION zaxisInqLevel(INTEGER zaxisID, INTEGER levelID)
 \end{verbatim}
@@ -1730,13 +1730,13 @@ Get one level of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisInqLevel})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisInqLevels]{zaxisInqLevels}
 \else
 zaxisInqLevels
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE zaxisInqLevels(INTEGER zaxisID, REAL*8 levels)
 \end{verbatim}
@@ -1745,13 +1745,13 @@ Get all levels of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisInqLevels})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisInqLongname]{zaxisInqLongname}
 \else
 zaxisInqLongname
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE zaxisInqLongname(INTEGER zaxisID, CHARACTER*(*) longname)
 \end{verbatim}
@@ -1760,13 +1760,13 @@ Get the longname of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisInqLongname})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisInqName]{zaxisInqName}
 \else
 zaxisInqName
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE zaxisInqName(INTEGER zaxisID, CHARACTER*(*) name)
 \end{verbatim}
@@ -1775,13 +1775,13 @@ Get the name of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisInqName})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisInqSize]{zaxisInqSize}
 \else
 zaxisInqSize
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION zaxisInqSize(INTEGER zaxisID)
 \end{verbatim}
@@ -1790,13 +1790,13 @@ Get the size of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisInqSize})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisInqType]{zaxisInqType}
 \else
 zaxisInqType
 \fi
-}
+}}
 \begin{verbatim}
     INTEGER FUNCTION zaxisInqType(INTEGER zaxisID)
 \end{verbatim}
@@ -1805,13 +1805,13 @@ Get the type of a Z-axis
 \ifpdfoutput{}{(\ref{zaxisInqType})}
 
 
-\section*{\tt 
+\section*{\texttt{ 
 \ifpdf
 \hyperref[zaxisInqUnits]{zaxisInqUnits}
 \else
 zaxisInqUnits
 \fi
-}
+}}
 \begin{verbatim}
     SUBROUTINE zaxisInqUnits(INTEGER zaxisID, CHARACTER*(*) units)
 \end{verbatim}
diff --git a/doc/tex/f_stream.tex b/doc/tex/f_stream.tex
index ef426dc171725d4be3f53709e8501d62fdf8d506..7dd2191caa156f27e5e7f7dccaf76bb7faf240dc 100644
--- a/doc/tex/f_stream.tex
+++ b/doc/tex/f_stream.tex
@@ -1,10 +1,10 @@
 
 
-\subsection{Create a new dataset: {\tt streamOpenWrite}}
+\subsection{Create a new dataset: \texttt{streamOpenWrite}}
 \index{streamOpenWrite}
 \label{streamOpenWrite}
 
-The function {\tt streamOpenWrite} creates a new datset.
+The function {\texttt{streamOpenWrite}} creates a new datset.
 \subsubsection*{Usage}
 
 \begin{verbatim}
@@ -12,21 +12,21 @@ The function {\tt streamOpenWrite} creates a new datset.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt filetype\ }
-\item[{\tt path}]
+\begin{deflist}{\texttt{filetype}\ }
+\item[\texttt{path}]
 The name of the new dataset.
-\item[{\tt filetype}]
+\item[\texttt{filetype}]
 The type of the file format, one of the set of predefined {\CDI} file format types.
-                     The valid {\CDI} file format types are {\tt CDI\_FILETYPE\_GRB}, {\tt CDI\_FILETYPE\_GRB2}, {\tt CDI\_FILETYPE\_NC},
-                     {\tt CDI\_FILETYPE\_NC2}, {\tt CDI\_FILETYPE\_NC4}, {\tt CDI\_FILETYPE\_NC4C}, {\tt CDI\_FILETYPE\_SRV},
-                     {\tt CDI\_FILETYPE\_EXT} and {\tt CDI\_FILETYPE\_IEG}.
+                     The valid {\CDI} file format types are {\texttt{CDI\_FILETYPE\_GRB}}, {\texttt{CDI\_FILETYPE\_GRB2}}, {\texttt{CDI\_FILETYPE\_NC}},
+                     {\texttt{CDI\_FILETYPE\_NC2}}, {\texttt{CDI\_FILETYPE\_NC4}}, {\texttt{CDI\_FILETYPE\_NC4C}}, {\texttt{CDI\_FILETYPE\_SRV}},
+                     {\texttt{CDI\_FILETYPE\_EXT}} and {\texttt{CDI\_FILETYPE\_IEG}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-Upon successful completion {\tt streamOpenWrite} returns an identifier to the
+Upon successful completion {\texttt{streamOpenWrite}} returns an identifier to the
 open stream. Otherwise, a negative number with the error status is returned.
 
 
@@ -34,14 +34,14 @@ open stream. Otherwise, a negative number with the error status is returned.
 
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt CDI\_EUFILETYPE\ }
-\item[{\tt CDI\_ESYSTEM}]
+\begin{deflist}{\texttt{CDI\_EUFILETYPE}\ }
+\item[\texttt{CDI\_ESYSTEM}]
 Operating system error.
-\item[{\tt CDI\_EINVAL}]
+\item[\texttt{CDI\_EINVAL}]
 Invalid argument.
-\item[{\tt CDI\_EUFILETYPE}]
+\item[\texttt{CDI\_EUFILETYPE}]
 Unsupported file type.
-\item[{\tt CDI\_ELIBNAVAIL}]
+\item[\texttt{CDI\_ELIBNAVAIL}]
 Library support not compiled in.
 \end{deflist}
 \end{minipage}
@@ -49,7 +49,7 @@ Library support not compiled in.
 
 \subsubsection*{Example}
 
-Here is an example using {\tt streamOpenWrite} to create a new NetCDF file named {\tt foo.nc} for writing:
+Here is an example using {\texttt{streamOpenWrite}} to create a new NetCDF file named {\texttt{foo.nc}} for writing:
 
 \begin{lstlisting}[language=Fortran, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
 
@@ -63,11 +63,11 @@ Here is an example using {\tt streamOpenWrite} to create a new NetCDF file named
 \end{lstlisting}
 
 
-\subsection{Open a dataset for reading: {\tt streamOpenRead}}
+\subsection{Open a dataset for reading: \texttt{streamOpenRead}}
 \index{streamOpenRead}
 \label{streamOpenRead}
 
-The function {\tt streamOpenRead} opens an existing dataset for reading.
+The function {\texttt{streamOpenRead}} opens an existing dataset for reading.
 
 \subsubsection*{Usage}
 
@@ -76,8 +76,8 @@ The function {\tt streamOpenRead} opens an existing dataset for reading.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt path\ }
-\item[{\tt path}]
+\begin{deflist}{\texttt{path}\ }
+\item[\texttt{path}]
 The name of the dataset to be read.
 
 \end{deflist}
@@ -85,7 +85,7 @@ The name of the dataset to be read.
 
 \subsubsection*{Result}
 
-Upon successful completion {\tt streamOpenRead} returns an identifier to the
+Upon successful completion {\texttt{streamOpenRead}} returns an identifier to the
 open stream. Otherwise, a negative number with the error status is returned.
 
 
@@ -93,14 +93,14 @@ open stream. Otherwise, a negative number with the error status is returned.
 
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt CDI\_EUFILETYPE\ }
-\item[{\tt CDI\_ESYSTEM}]
+\begin{deflist}{\texttt{CDI\_EUFILETYPE}\ }
+\item[\texttt{CDI\_ESYSTEM}]
 Operating system error.
-\item[{\tt CDI\_EINVAL}]
+\item[\texttt{CDI\_EINVAL}]
 Invalid argument.
-\item[{\tt CDI\_EUFILETYPE}]
+\item[\texttt{CDI\_EUFILETYPE}]
 Unsupported file type.
-\item[{\tt CDI\_ELIBNAVAIL}]
+\item[\texttt{CDI\_ELIBNAVAIL}]
 Library support not compiled in.
 \end{deflist}
 \end{minipage}
@@ -108,8 +108,8 @@ Library support not compiled in.
 
 \subsubsection*{Example}
 
-Here is an example using {\tt streamOpenRead} to open an existing NetCDF
-file named {\tt foo.nc} for reading:
+Here is an example using {\texttt{streamOpenRead}} to open an existing NetCDF
+file named {\texttt{foo.nc}} for reading:
 
 \begin{lstlisting}[language=Fortran, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
 
@@ -123,11 +123,11 @@ file named {\tt foo.nc} for reading:
 \end{lstlisting}
 
 
-\subsection{Close an open dataset: {\tt streamClose}}
+\subsection{Close an open dataset: \texttt{streamClose}}
 \index{streamClose}
 \label{streamClose}
 
-The function {\tt streamClose} closes an open dataset.
+The function {\texttt{streamClose}} closes an open dataset.
 
 \subsubsection*{Usage}
 
@@ -136,19 +136,19 @@ The function {\tt streamClose} closes an open dataset.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}} or {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}} or {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the filetype: {\tt streamInqFiletype}}
+\subsection{Get the filetype: \texttt{streamInqFiletype}}
 \index{streamInqFiletype}
 \label{streamInqFiletype}
 
-The function {\tt streamInqFiletype} returns the filetype of a stream.
+The function {\texttt{streamInqFiletype}} returns the filetype of a stream.
 
 \subsubsection*{Usage}
 
@@ -157,28 +157,28 @@ The function {\tt streamInqFiletype} returns the filetype of a stream.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}} or {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}} or {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt streamInqFiletype} returns the type of the file format,
+{\texttt{streamInqFiletype}} returns the type of the file format,
 one of the set of predefined {\CDI} file format types.
-The valid {\CDI} file format types are {\tt CDI\_FILETYPE\_GRB}, {\tt CDI\_FILETYPE\_GRB2}, {\tt CDI\_FILETYPE\_NC}, {\tt CDI\_FILETYPE\_NC2},
-{\tt CDI\_FILETYPE\_NC4}, {\tt CDI\_FILETYPE\_NC4C}, {\tt CDI\_FILETYPE\_SRV}, {\tt CDI\_FILETYPE\_EXT} and {\tt CDI\_FILETYPE\_IEG}.
+The valid {\CDI} file format types are {\texttt{CDI\_FILETYPE\_GRB}}, {\texttt{CDI\_FILETYPE\_GRB2}}, {\texttt{CDI\_FILETYPE\_NC}}, {\texttt{CDI\_FILETYPE\_NC2}},
+{\texttt{CDI\_FILETYPE\_NC4}}, {\texttt{CDI\_FILETYPE\_NC4C}}, {\texttt{CDI\_FILETYPE\_SRV}}, {\texttt{CDI\_FILETYPE\_EXT}} and {\texttt{CDI\_FILETYPE\_IEG}}.
 
 
 
-\subsection{Define the byte order: {\tt streamDefByteorder}}
+\subsection{Define the byte order: \texttt{streamDefByteorder}}
 \index{streamDefByteorder}
 \label{streamDefByteorder}
 
-The function {\tt streamDefByteorder} defines the byte order of a binary dataset
-with the file format type {\tt CDI\_FILETYPE\_SRV}, {\tt CDI\_FILETYPE\_EXT} or {\tt CDI\_FILETYPE\_IEG}.
+The function {\texttt{streamDefByteorder}} defines the byte order of a binary dataset
+with the file format type {\texttt{CDI\_FILETYPE\_SRV}}, {\texttt{CDI\_FILETYPE\_EXT}} or {\texttt{CDI\_FILETYPE\_IEG}}.
 
 \subsubsection*{Usage}
 
@@ -187,23 +187,23 @@ with the file format type {\tt CDI\_FILETYPE\_SRV}, {\tt CDI\_FILETYPE\_EXT} or
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt byteorder\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt byteorder}]
-The byte order of a dataset, one of the {\CDI} constants {\tt CDI\_BIGENDIAN} and
-                     {\tt CDI\_LITTLEENDIAN}.
+\begin{deflist}{\texttt{byteorder}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{byteorder}]
+The byte order of a dataset, one of the {\CDI} constants {\texttt{CDI\_BIGENDIAN}} and
+                     {\texttt{CDI\_LITTLEENDIAN}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the byte order: {\tt streamInqByteorder}}
+\subsection{Get the byte order: \texttt{streamInqByteorder}}
 \index{streamInqByteorder}
 \label{streamInqByteorder}
 
-The function {\tt streamInqByteorder} returns the byte order of a binary dataset
-with the file format type {\tt CDI\_FILETYPE\_SRV}, {\tt CDI\_FILETYPE\_EXT} or {\tt CDI\_FILETYPE\_IEG}.
+The function {\texttt{streamInqByteorder}} returns the byte order of a binary dataset
+with the file format type {\texttt{CDI\_FILETYPE\_SRV}}, {\texttt{CDI\_FILETYPE\_EXT}} or {\texttt{CDI\_FILETYPE\_IEG}}.
 
 \subsubsection*{Usage}
 
@@ -212,25 +212,25 @@ with the file format type {\tt CDI\_FILETYPE\_SRV}, {\tt CDI\_FILETYPE\_EXT} or
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}} or {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}} or {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt streamInqByteorder} returns the type of the byte order.
-The valid {\CDI} byte order types are {\tt CDI\_BIGENDIAN} and {\tt CDI\_LITTLEENDIAN}
+{\texttt{streamInqByteorder}} returns the type of the byte order.
+The valid {\CDI} byte order types are {\texttt{CDI\_BIGENDIAN}} and {\texttt{CDI\_LITTLEENDIAN}}
 
 
 
-\subsection{Define the variable list: {\tt streamDefVlist}}
+\subsection{Define the variable list: \texttt{streamDefVlist}}
 \index{streamDefVlist}
 \label{streamDefVlist}
 
-The function {\tt streamDefVlist} defines the variable list of a stream.
+The function {\texttt{streamDefVlist}} defines the variable list of a stream.
 
 To safeguard against errors by modifying the wrong vlist object,
 this function makes the passed vlist object immutable.
@@ -243,21 +243,21 @@ All further vlist changes have to use the vlist object returned by streamInqVlis
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the variable list: {\tt streamInqVlist}}
+\subsection{Get the variable list: \texttt{streamInqVlist}}
 \index{streamInqVlist}
 \label{streamInqVlist}
 
-The function {\tt streamInqVlist} returns the variable list of a stream.
+The function {\texttt{streamInqVlist}} returns the variable list of a stream.
 
 \subsubsection*{Usage}
 
@@ -266,24 +266,24 @@ The function {\tt streamInqVlist} returns the variable list of a stream.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}} or {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}} or {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt streamInqVlist} returns an identifier to the variable list.
+{\texttt{streamInqVlist}} returns an identifier to the variable list.
 
 
 
-\subsection{Define time step: {\tt streamDefTimestep}}
+\subsection{Define time step: \texttt{streamDefTimestep}}
 \index{streamDefTimestep}
 \label{streamDefTimestep}
 
-The function {\tt streamDefTimestep} defines the time step of a stream.
+The function {\texttt{streamDefTimestep}} defines the time step of a stream.
 
 \subsubsection*{Usage}
 
@@ -292,10 +292,10 @@ The function {\tt streamDefTimestep} defines the time step of a stream.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt tsID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{tsID}]
 Timestep identifier.
 
 \end{deflist}
@@ -303,15 +303,15 @@ Timestep identifier.
 
 \subsubsection*{Result}
 
-{\tt streamDefTimestep} returns the number of records of the time step.
+{\texttt{streamDefTimestep}} returns the number of records of the time step.
 
 
 
-\subsection{Get time step: {\tt streamInqTimestep}}
+\subsection{Get time step: \texttt{streamInqTimestep}}
 \index{streamInqTimestep}
 \label{streamInqTimestep}
 
-The function {\tt streamInqTimestep} returns the time step of a stream.
+The function {\texttt{streamInqTimestep}} returns the time step of a stream.
 
 \subsubsection*{Usage}
 
@@ -320,10 +320,10 @@ The function {\tt streamInqTimestep} returns the time step of a stream.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}} or {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt tsID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}} or {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{tsID}]
 Timestep identifier.
 
 \end{deflist}
@@ -331,5 +331,5 @@ Timestep identifier.
 
 \subsubsection*{Result}
 
-{\tt streamInqTimestep} returns the number of records of the time step.
+{\texttt{streamInqTimestep}} returns the number of records of the time step.
 
diff --git a/doc/tex/f_stream_read.tex b/doc/tex/f_stream_read.tex
index c67875ee29cbbdfe488b682c2b2cf1486e89e058..3885aaa1a0d7c0ffc529d6506049fc996d370bc4 100644
--- a/doc/tex/f_stream_read.tex
+++ b/doc/tex/f_stream_read.tex
@@ -1,6 +1,6 @@
 
 
-\subsection{Read a variable: {\tt streamReadVar}}
+\subsection{Read a variable: \texttt{streamReadVar}}
 \index{streamReadVar}
 \label{streamReadVar}
 
@@ -14,22 +14,22 @@ from an open dataset.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to the location into which the data values are read.
                      The caller must allocate space for the returned values.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Read a variable: {\tt streamReadVarF}}
+\subsection{Read a variable: \texttt{streamReadVarF}}
 \index{streamReadVarF}
 \label{streamReadVarF}
 
@@ -43,22 +43,22 @@ from an open dataset.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to the location into which the data values are read.
                      The caller must allocate space for the returned values.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Read a horizontal slice of a variable: {\tt streamReadVarSlice}}
+\subsection{Read a horizontal slice of a variable: \texttt{streamReadVarSlice}}
 \index{streamReadVarSlice}
 \label{streamReadVarSlice}
 
@@ -72,24 +72,24 @@ from an open dataset.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt levelID}]
+\item[\texttt{levelID}]
 Level identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to the location into which the data values are read.
                      The caller must allocate space for the returned values.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Read a horizontal slice of a variable: {\tt streamReadVarSliceF}}
+\subsection{Read a horizontal slice of a variable: \texttt{streamReadVarSliceF}}
 \index{streamReadVarSliceF}
 \label{streamReadVarSliceF}
 
@@ -103,17 +103,17 @@ from an open dataset.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenRead}}{streamOpenRead}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt levelID}]
+\item[\texttt{levelID}]
 Level identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to the location into which the data values are read.
                      The caller must allocate space for the returned values.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
diff --git a/doc/tex/f_stream_record.tex b/doc/tex/f_stream_record.tex
index a49eb2f1ab1ae77de3c765f6636286faa36ccfb3..5322999ee9c1b52eef9a96d1ac02640be9c27120 100644
--- a/doc/tex/f_stream_record.tex
+++ b/doc/tex/f_stream_record.tex
@@ -1,6 +1,6 @@
 
 
-\subsection{Define the next record: {\tt streamDefRecord}}
+\subsection{Define the next record: \texttt{streamDefRecord}}
 \index{streamDefRecord}
 \label{streamDefRecord}
 
@@ -12,12 +12,12 @@ The function streamDefRecord defines the meta-data of the next record.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt levelID}]
+\item[\texttt{levelID}]
 Level identifier.
 
 \end{deflist}
diff --git a/doc/tex/f_stream_write.tex b/doc/tex/f_stream_write.tex
index 0c25b4f1db725bfc9f2c8f553dceb050341327dd..0f798e1cd45e7a52dc6c25fd50c265bfed11618a 100644
--- a/doc/tex/f_stream_write.tex
+++ b/doc/tex/f_stream_write.tex
@@ -1,6 +1,6 @@
 
 
-\subsection{Write a variable: {\tt streamWriteVar}}
+\subsection{Write a variable: \texttt{streamWriteVar}}
 \index{streamWriteVar}
 \label{streamWriteVar}
 
@@ -14,21 +14,21 @@ The values are converted to the external data type of the variable, if necessary
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to a block of double precision floating point data values to be written.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Write a variable: {\tt streamWriteVarF}}
+\subsection{Write a variable: \texttt{streamWriteVarF}}
 \index{streamWriteVarF}
 \label{streamWriteVarF}
 
@@ -42,21 +42,21 @@ The values are converted to the external data type of the variable, if necessary
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to a block of single precision floating point data values to be written.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Write a horizontal slice of a variable: {\tt streamWriteVarSlice}}
+\subsection{Write a horizontal slice of a variable: \texttt{streamWriteVarSlice}}
 \index{streamWriteVarSlice}
 \label{streamWriteVarSlice}
 
@@ -70,23 +70,23 @@ The values are converted to the external data type of the variable, if necessary
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt levelID}]
+\item[\texttt{levelID}]
 Level identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to a block of double precision floating point data values to be written.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Write a horizontal slice of a variable: {\tt streamWriteVarSliceF}}
+\subsection{Write a horizontal slice of a variable: \texttt{streamWriteVarSliceF}}
 \index{streamWriteVarSliceF}
 \label{streamWriteVarSliceF}
 
@@ -100,16 +100,16 @@ The values are converted to the external data type of the variable, if necessary
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt streamID\ }
-\item[{\tt streamID}]
-Stream ID, from a previous call to {\htmlref{\tt streamOpenWrite}{streamOpenWrite}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{streamID}\ }
+\item[\texttt{streamID}]
+Stream ID, from a previous call to {\htmlref{\texttt{streamOpenWrite}}{streamOpenWrite}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt levelID}]
+\item[\texttt{levelID}]
 Level identifier.
-\item[{\tt data}]
+\item[\texttt{data}]
 Pointer to a block of single precision floating point data values to be written.
-\item[{\tt nmiss}]
+\item[\texttt{nmiss}]
 Number of missing values.
 
 \end{deflist}
diff --git a/doc/tex/f_taxis.tex b/doc/tex/f_taxis.tex
index fb919a9d17954f5b4ff2316b0937d2076f3fe212..490fd0e06e99ddcaa8cc2eb28955c85e482a5dc1 100644
--- a/doc/tex/f_taxis.tex
+++ b/doc/tex/f_taxis.tex
@@ -1,10 +1,10 @@
 
 
-\subsection{Create a Time axis: {\tt taxisCreate}}
+\subsection{Create a Time axis: \texttt{taxisCreate}}
 \index{taxisCreate}
 \label{taxisCreate}
 
-The function {\tt taxisCreate} creates a Time axis.
+The function {\texttt{taxisCreate}} creates a Time axis.
 
 \subsubsection*{Usage}
 
@@ -13,22 +13,22 @@ The function {\tt taxisCreate} creates a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxistype\ }
-\item[{\tt taxistype}]
+\begin{deflist}{\texttt{taxistype}\ }
+\item[\texttt{taxistype}]
 The type of the Time axis, one of the set of predefined {\CDI} time axis types.
-                      The valid {\CDI} time axis types are {\tt TAXIS\_ABSOLUTE} and {\tt TAXIS\_RELATIVE}.
+                      The valid {\CDI} time axis types are {\texttt{TAXIS\_ABSOLUTE}} and {\texttt{TAXIS\_RELATIVE}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt taxisCreate} returns an identifier to the Time axis.
+{\texttt{taxisCreate}} returns an identifier to the Time axis.
 
 
 \subsubsection*{Example}
 
-Here is an example using {\tt taxisCreate} to create a relative T-axis
+Here is an example using {\texttt{taxisCreate}} to create a relative T-axis
 with a standard calendar.
 
 \begin{lstlisting}[language=Fortran, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
@@ -45,7 +45,7 @@ with a standard calendar.
 \end{lstlisting}
 
 
-\subsection{Destroy a Time axis: {\tt taxisDestroy}}
+\subsection{Destroy a Time axis: \texttt{taxisDestroy}}
 \index{taxisDestroy}
 \label{taxisDestroy}
 \subsubsection*{Usage}
@@ -55,19 +55,19 @@ with a standard calendar.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\tt taxisCreate}
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\texttt{taxisCreate}}
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Define the reference date: {\tt taxisDefRdate}}
+\subsection{Define the reference date: \texttt{taxisDefRdate}}
 \index{taxisDefRdate}
 \label{taxisDefRdate}
 
-The function {\tt taxisDefRdate} defines the reference date of a Time axis.
+The function {\texttt{taxisDefRdate}} defines the reference date of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -76,21 +76,21 @@ The function {\tt taxisDefRdate} defines the reference date of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}}
-\item[{\tt rdate}]
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}}
+\item[\texttt{rdate}]
 Reference date (YYYYMMDD)
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the reference date: {\tt taxisInqRdate}}
+\subsection{Get the reference date: \texttt{taxisInqRdate}}
 \index{taxisInqRdate}
 \label{taxisInqRdate}
 
-The function {\tt taxisInqRdate} returns the reference date of a Time axis.
+The function {\texttt{taxisInqRdate}} returns the reference date of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -99,24 +99,24 @@ The function {\tt taxisInqRdate} returns the reference date of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}} or {\htmlref{\tt vlistInqTaxis}{vlistInqTaxis}}
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}} or {\htmlref{\texttt{vlistInqTaxis}}{vlistInqTaxis}}
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt taxisInqRdate} returns the reference date.
+{\texttt{taxisInqRdate}} returns the reference date.
 
 
 
-\subsection{Define the reference time: {\tt taxisDefRtime}}
+\subsection{Define the reference time: \texttt{taxisDefRtime}}
 \index{taxisDefRtime}
 \label{taxisDefRtime}
 
-The function {\tt taxisDefRtime} defines the reference time of a Time axis.
+The function {\texttt{taxisDefRtime}} defines the reference time of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -125,21 +125,21 @@ The function {\tt taxisDefRtime} defines the reference time of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}}
-\item[{\tt rtime}]
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}}
+\item[\texttt{rtime}]
 Reference time (hhmmss)
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the reference time: {\tt taxisInqRtime}}
+\subsection{Get the reference time: \texttt{taxisInqRtime}}
 \index{taxisInqRtime}
 \label{taxisInqRtime}
 
-The function {\tt taxisInqRtime} returns the reference time of a Time axis.
+The function {\texttt{taxisInqRtime}} returns the reference time of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -148,24 +148,24 @@ The function {\tt taxisInqRtime} returns the reference time of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}} or {\htmlref{\tt vlistInqTaxis}{vlistInqTaxis}}
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}} or {\htmlref{\texttt{vlistInqTaxis}}{vlistInqTaxis}}
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt taxisInqRtime} returns the reference time.
+{\texttt{taxisInqRtime}} returns the reference time.
 
 
 
-\subsection{Define the verification date: {\tt taxisDefVdate}}
+\subsection{Define the verification date: \texttt{taxisDefVdate}}
 \index{taxisDefVdate}
 \label{taxisDefVdate}
 
-The function {\tt taxisDefVdate} defines the verification date of a Time axis.
+The function {\texttt{taxisDefVdate}} defines the verification date of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -174,21 +174,21 @@ The function {\tt taxisDefVdate} defines the verification date of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}}
-\item[{\tt vdate}]
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}}
+\item[\texttt{vdate}]
 Verification date (YYYYMMDD)
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the verification date: {\tt taxisInqVdate}}
+\subsection{Get the verification date: \texttt{taxisInqVdate}}
 \index{taxisInqVdate}
 \label{taxisInqVdate}
 
-The function {\tt taxisInqVdate} returns the verification date of a Time axis.
+The function {\texttt{taxisInqVdate}} returns the verification date of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -197,24 +197,24 @@ The function {\tt taxisInqVdate} returns the verification date of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}} or {\htmlref{\tt vlistInqTaxis}{vlistInqTaxis}}
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}} or {\htmlref{\texttt{vlistInqTaxis}}{vlistInqTaxis}}
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt taxisInqVdate} returns the verification date.
+{\texttt{taxisInqVdate}} returns the verification date.
 
 
 
-\subsection{Define the verification time: {\tt taxisDefVtime}}
+\subsection{Define the verification time: \texttt{taxisDefVtime}}
 \index{taxisDefVtime}
 \label{taxisDefVtime}
 
-The function {\tt taxisDefVtime} defines the verification time of a Time axis.
+The function {\texttt{taxisDefVtime}} defines the verification time of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -223,21 +223,21 @@ The function {\tt taxisDefVtime} defines the verification time of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}}
-\item[{\tt vtime}]
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}}
+\item[\texttt{vtime}]
 Verification time (hhmmss)
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the verification time: {\tt taxisInqVtime}}
+\subsection{Get the verification time: \texttt{taxisInqVtime}}
 \index{taxisInqVtime}
 \label{taxisInqVtime}
 
-The function {\tt taxisInqVtime} returns the verification time of a Time axis.
+The function {\texttt{taxisInqVtime}} returns the verification time of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -246,24 +246,24 @@ The function {\tt taxisInqVtime} returns the verification time of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}} or {\htmlref{\tt vlistInqTaxis}{vlistInqTaxis}}
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}} or {\htmlref{\texttt{vlistInqTaxis}}{vlistInqTaxis}}
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt taxisInqVtime} returns the verification time.
+{\texttt{taxisInqVtime}} returns the verification time.
 
 
 
-\subsection{Define the calendar: {\tt taxisDefCalendar}}
+\subsection{Define the calendar: \texttt{taxisDefCalendar}}
 \index{taxisDefCalendar}
 \label{taxisDefCalendar}
 
-The function {\tt taxisDefCalendar} defines the calendar of a Time axis.
+The function {\texttt{taxisDefCalendar}} defines the calendar of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -272,23 +272,23 @@ The function {\tt taxisDefCalendar} defines the calendar of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt calendar\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}}
-\item[{\tt calendar}]
+\begin{deflist}{\texttt{calendar}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}}
+\item[\texttt{calendar}]
 The type of the calendar, one of the set of predefined {\CDI} calendar types.
-                    The valid {\CDI} calendar types are {\tt CALENDAR\_STANDARD}, {\tt CALENDAR\_PROLEPTIC},
-                    {\tt CALENDAR\_360DAYS}, {\tt CALENDAR\_365DAYS} and {\tt CALENDAR\_366DAYS}.
+                    The valid {\CDI} calendar types are {\texttt{CALENDAR\_STANDARD}}, {\texttt{CALENDAR\_PROLEPTIC}},
+                    {\texttt{CALENDAR\_360DAYS}}, {\texttt{CALENDAR\_365DAYS}} and {\texttt{CALENDAR\_366DAYS}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the calendar: {\tt taxisInqCalendar}}
+\subsection{Get the calendar: \texttt{taxisInqCalendar}}
 \index{taxisInqCalendar}
 \label{taxisInqCalendar}
 
-The function {\tt taxisInqCalendar} returns the calendar of a Time axis.
+The function {\texttt{taxisInqCalendar}} returns the calendar of a Time axis.
 
 \subsubsection*{Usage}
 
@@ -297,17 +297,17 @@ The function {\tt taxisInqCalendar} returns the calendar of a Time axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt taxisID\ }
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}} or {\htmlref{\tt vlistInqTaxis}{vlistInqTaxis}}
+\begin{deflist}{\texttt{taxisID}\ }
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}} or {\htmlref{\texttt{vlistInqTaxis}}{vlistInqTaxis}}
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt taxisInqCalendar} returns the type of the calendar,
+{\texttt{taxisInqCalendar}} returns the type of the calendar,
 one of the set of predefined {\CDI} calendar types.
-The valid {\CDI} calendar types are {\tt CALENDAR\_STANDARD}, {\tt CALENDAR\_PROLEPTIC},
-{\tt CALENDAR\_360DAYS}, {\tt CALENDAR\_365DAYS} and {\tt CALENDAR\_366DAYS}.
+The valid {\CDI} calendar types are {\texttt{CALENDAR\_STANDARD}}, {\texttt{CALENDAR\_PROLEPTIC}},
+{\texttt{CALENDAR\_360DAYS}}, {\texttt{CALENDAR\_365DAYS}} and {\texttt{CALENDAR\_366DAYS}}.
 
diff --git a/doc/tex/f_vlist.tex b/doc/tex/f_vlist.tex
index 91b3065cd7d310b8b53736ddff021c78d9385d13..95599f6dc361d21e01dcacfeafa517c74cc9162c 100644
--- a/doc/tex/f_vlist.tex
+++ b/doc/tex/f_vlist.tex
@@ -1,6 +1,6 @@
 
 
-\subsection{Create a variable list: {\tt vlistCreate}}
+\subsection{Create a variable list: \texttt{vlistCreate}}
 \index{vlistCreate}
 \label{vlistCreate}
 \subsubsection*{Usage}
@@ -11,8 +11,8 @@
 
 \subsubsection*{Example}
 
-Here is an example using {\tt vlistCreate} to create a variable list
-and add a variable with {\tt vlistDefVar}.
+Here is an example using {\texttt{vlistCreate}} to create a variable list
+and add a variable with {\texttt{vlistDefVar}}.
 
 \begin{lstlisting}[language=Fortran, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
 
@@ -30,7 +30,7 @@ and add a variable with {\tt vlistDefVar}.
 \end{lstlisting}
 
 
-\subsection{Destroy a variable list: {\tt vlistDestroy}}
+\subsection{Destroy a variable list: \texttt{vlistDestroy}}
 \index{vlistDestroy}
 \label{vlistDestroy}
 \subsubsection*{Usage}
@@ -40,19 +40,19 @@ and add a variable with {\tt vlistDefVar}.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Copy a variable list: {\tt vlistCopy}}
+\subsection{Copy a variable list: \texttt{vlistCopy}}
 \index{vlistCopy}
 \label{vlistCopy}
 
-The function {\tt vlistCopy} copies all entries from vlistID1 to vlistID2.
+The function {\texttt{vlistCopy}} copies all entries from vlistID1 to vlistID2.
 
 \subsubsection*{Usage}
 
@@ -61,21 +61,21 @@ The function {\tt vlistCopy} copies all entries from vlistID1 to vlistID2.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID2\ }
-\item[{\tt vlistID2}]
+\begin{deflist}{\texttt{vlistID2}\ }
+\item[\texttt{vlistID2}]
 Target variable list ID.
-\item[{\tt vlistID1}]
+\item[\texttt{vlistID1}]
 Source variable list ID.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Duplicate a variable list: {\tt vlistDuplicate}}
+\subsection{Duplicate a variable list: \texttt{vlistDuplicate}}
 \index{vlistDuplicate}
 \label{vlistDuplicate}
 
-The function {\tt vlistDuplicate} duplicates the variable list from vlistID1.
+The function {\texttt{vlistDuplicate}} duplicates the variable list from vlistID1.
 
 \subsubsection*{Usage}
 
@@ -84,20 +84,20 @@ The function {\tt vlistDuplicate} duplicates the variable list from vlistID1.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistDuplicate} returns an identifier to the duplicated variable list.
+{\texttt{vlistDuplicate}} returns an identifier to the duplicated variable list.
 
 
 
-\subsection{Concatenate two variable lists: {\tt vlistCat}}
+\subsection{Concatenate two variable lists: \texttt{vlistCat}}
 \index{vlistCat}
 \label{vlistCat}
 
@@ -110,21 +110,21 @@ Concatenate the variable list vlistID1 at the end of vlistID2.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID2\ }
-\item[{\tt vlistID2}]
+\begin{deflist}{\texttt{vlistID2}\ }
+\item[\texttt{vlistID2}]
 Target variable list ID.
-\item[{\tt vlistID1}]
+\item[\texttt{vlistID1}]
 Source variable list ID.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Copy some entries of a variable list: {\tt vlistCopyFlag}}
+\subsection{Copy some entries of a variable list: \texttt{vlistCopyFlag}}
 \index{vlistCopyFlag}
 \label{vlistCopyFlag}
 
-The function {\tt vlistCopyFlag} copies all entries with a flag from vlistID1 to vlistID2.
+The function {\texttt{vlistCopyFlag}} copies all entries with a flag from vlistID1 to vlistID2.
 
 \subsubsection*{Usage}
 
@@ -133,21 +133,21 @@ The function {\tt vlistCopyFlag} copies all entries with a flag from vlistID1 to
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID2\ }
-\item[{\tt vlistID2}]
+\begin{deflist}{\texttt{vlistID2}\ }
+\item[\texttt{vlistID2}]
 Target variable list ID.
-\item[{\tt vlistID1}]
+\item[\texttt{vlistID1}]
 Source variable list ID.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Number of variables in a variable list: {\tt vlistNvars}}
+\subsection{Number of variables in a variable list: \texttt{vlistNvars}}
 \index{vlistNvars}
 \label{vlistNvars}
 
-The function {\tt vlistNvars} returns the number of variables in the variable list vlistID.
+The function {\texttt{vlistNvars}} returns the number of variables in the variable list vlistID.
 
 \subsubsection*{Usage}
 
@@ -156,24 +156,24 @@ The function {\tt vlistNvars} returns the number of variables in the variable li
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistNvars} returns the number of variables in a variable list.
+{\texttt{vlistNvars}} returns the number of variables in a variable list.
 
 
 
-\subsection{Number of grids in a variable list: {\tt vlistNgrids}}
+\subsection{Number of grids in a variable list: \texttt{vlistNgrids}}
 \index{vlistNgrids}
 \label{vlistNgrids}
 
-The function {\tt vlistNgrids} returns the number of grids in the variable list vlistID.
+The function {\texttt{vlistNgrids}} returns the number of grids in the variable list vlistID.
 
 \subsubsection*{Usage}
 
@@ -182,24 +182,24 @@ The function {\tt vlistNgrids} returns the number of grids in the variable list
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistNgrids} returns the number of grids in a variable list.
+{\texttt{vlistNgrids}} returns the number of grids in a variable list.
 
 
 
-\subsection{Number of zaxis in a variable list: {\tt vlistNzaxis}}
+\subsection{Number of zaxis in a variable list: \texttt{vlistNzaxis}}
 \index{vlistNzaxis}
 \label{vlistNzaxis}
 
-The function {\tt vlistNzaxis} returns the number of zaxis in the variable list vlistID.
+The function {\texttt{vlistNzaxis}} returns the number of zaxis in the variable list vlistID.
 
 \subsubsection*{Usage}
 
@@ -208,24 +208,24 @@ The function {\tt vlistNzaxis} returns the number of zaxis in the variable list
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistNzaxis} returns the number of zaxis in a variable list.
+{\texttt{vlistNzaxis}} returns the number of zaxis in a variable list.
 
 
 
-\subsection{Define the time axis: {\tt vlistDefTaxis}}
+\subsection{Define the time axis: \texttt{vlistDefTaxis}}
 \index{vlistDefTaxis}
 \label{vlistDefTaxis}
 
-The function {\tt vlistDefTaxis} defines the time axis of a variable list.
+The function {\texttt{vlistDefTaxis}} defines the time axis of a variable list.
 
 \subsubsection*{Usage}
 
@@ -234,21 +234,21 @@ The function {\tt vlistDefTaxis} defines the time axis of a variable list.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt taxisID}]
-Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}}.
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{taxisID}]
+Time axis ID, from a previous call to {\htmlref{\texttt{taxisCreate}}{taxisCreate}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the time axis: {\tt vlistInqTaxis}}
+\subsection{Get the time axis: \texttt{vlistInqTaxis}}
 \index{vlistInqTaxis}
 \label{vlistInqTaxis}
 
-The function {\tt vlistInqTaxis} returns the time axis of a variable list.
+The function {\texttt{vlistInqTaxis}} returns the time axis of a variable list.
 
 \subsubsection*{Usage}
 
@@ -257,14 +257,14 @@ The function {\tt vlistInqTaxis} returns the time axis of a variable list.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistInqTaxis} returns an identifier to the time axis.
+{\texttt{vlistInqTaxis}} returns an identifier to the time axis.
 
diff --git a/doc/tex/f_vlist_var.tex b/doc/tex/f_vlist_var.tex
index 73895e9081301888a4b3f6cfc9ac9e0c65a3d498..92fd0d0d3aa4f687a0f33ee9310febf8f75d05af 100644
--- a/doc/tex/f_vlist_var.tex
+++ b/doc/tex/f_vlist_var.tex
@@ -1,10 +1,10 @@
 
 
-\subsection{Define a Variable: {\tt vlistDefVar}}
+\subsection{Define a Variable: \texttt{vlistDefVar}}
 \index{vlistDefVar}
 \label{vlistDefVar}
 
-The function {\tt vlistDefVar} adds a new variable to vlistID.
+The function {\texttt{vlistDefVar}} adds a new variable to vlistID.
 
 \subsubsection*{Usage}
 
@@ -14,30 +14,30 @@ The function {\tt vlistDefVar} adds a new variable to vlistID.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt tsteptype\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt gridID}]
-Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}.
-\item[{\tt zaxisID}]
-Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}}.
-\item[{\tt tsteptype}]
+\begin{deflist}{\texttt{tsteptype}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{gridID}]
+Grid ID, from a previous call to {\htmlref{\texttt{gridCreate}}{gridCreate}}.
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
+\item[\texttt{tsteptype}]
 One of the set of predefined {\CDI} timestep types.
-                     The valid {\CDI} timestep types are {\tt TSTEP\_CONSTANT}, {\tt TSTEP\_INSTANT},
-                     {\tt TSTEP\_ACCUM}, {\tt TSTEP\_AVG}, {\tt TSTEP\_MAX}, {\tt TSTEP\_MIN} and {\tt TSTEP\_SD}.
+                     The valid {\CDI} timestep types are {\texttt{TSTEP\_CONSTANT}}, {\texttt{TSTEP\_INSTANT}},
+                     {\texttt{TSTEP\_ACCUM}}, {\texttt{TSTEP\_AVG}}, {\texttt{TSTEP\_MAX}}, {\texttt{TSTEP\_MIN}} and {\texttt{TSTEP\_SD}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistDefVar} returns an identifier to the new variable.
+{\texttt{vlistDefVar}} returns an identifier to the new variable.
 
 
 \subsubsection*{Example}
 
-Here is an example using {\tt vlistCreate} to create a variable list
-and add a variable with {\tt vlistDefVar}.
+Here is an example using {\texttt{vlistCreate}} to create a variable list
+and add a variable with {\texttt{vlistDefVar}}.
 
 \begin{lstlisting}[language=Fortran, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
 
@@ -55,11 +55,11 @@ and add a variable with {\tt vlistDefVar}.
 \end{lstlisting}
 
 
-\subsection{Get the Grid ID of a Variable: {\tt vlistInqVarGrid}}
+\subsection{Get the Grid ID of a Variable: \texttt{vlistInqVarGrid}}
 \index{vlistInqVarGrid}
 \label{vlistInqVarGrid}
 
-The function {\tt vlistInqVarGrid} returns the grid ID of a Variable.
+The function {\texttt{vlistInqVarGrid}} returns the grid ID of a Variable.
 
 \subsubsection*{Usage}
 
@@ -68,10 +68,10 @@ The function {\tt vlistInqVarGrid} returns the grid ID of a Variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
 
 \end{deflist}
@@ -79,15 +79,15 @@ Variable identifier.
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarGrid} returns the grid ID of the Variable.
+{\texttt{vlistInqVarGrid}} returns the grid ID of the Variable.
 
 
 
-\subsection{Get the Zaxis ID of a Variable: {\tt vlistInqVarZaxis}}
+\subsection{Get the Zaxis ID of a Variable: \texttt{vlistInqVarZaxis}}
 \index{vlistInqVarZaxis}
 \label{vlistInqVarZaxis}
 
-The function {\tt vlistInqVarZaxis} returns the zaxis ID of a variable.
+The function {\texttt{vlistInqVarZaxis}} returns the zaxis ID of a variable.
 
 \subsubsection*{Usage}
 
@@ -96,10 +96,10 @@ The function {\tt vlistInqVarZaxis} returns the zaxis ID of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
 
 \end{deflist}
@@ -107,15 +107,15 @@ Variable identifier.
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarZaxis} returns the zaxis ID of the variable.
+{\texttt{vlistInqVarZaxis}} returns the zaxis ID of the variable.
 
 
 
-\subsection{Get the timestep type of a Variable: {\tt vlistInqVarTsteptype}}
+\subsection{Get the timestep type of a Variable: \texttt{vlistInqVarTsteptype}}
 \index{vlistInqVarTsteptype}
 \label{vlistInqVarTsteptype}
 
-The function {\tt vlistInqVarTsteptype} returns the timestep type of a Variable.
+The function {\texttt{vlistInqVarTsteptype}} returns the timestep type of a Variable.
 
 \subsubsection*{Usage}
 
@@ -124,10 +124,10 @@ The function {\tt vlistInqVarTsteptype} returns the timestep type of a Variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
 
 \end{deflist}
@@ -135,18 +135,18 @@ Variable identifier.
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarTsteptype} returns the timestep type of the Variable,
+{\texttt{vlistInqVarTsteptype}} returns the timestep type of the Variable,
 one of the set of predefined {\CDI} timestep types.
-The valid {\CDI} timestep types are {\tt TSTEP\_CONSTANT}, {\tt TSTEP\_INSTANT},
-{\tt TSTEP\_ACCUM}, {\tt TSTEP\_AVG}, {\tt TSTEP\_MAX}, {\tt TSTEP\_MIN} and {\tt TSTEP\_SD}.
+The valid {\CDI} timestep types are {\texttt{TSTEP\_CONSTANT}}, {\texttt{TSTEP\_INSTANT}},
+{\texttt{TSTEP\_ACCUM}}, {\texttt{TSTEP\_AVG}}, {\texttt{TSTEP\_MAX}}, {\texttt{TSTEP\_MIN}} and {\texttt{TSTEP\_SD}}.
 
 
 
-\subsection{Define the code number of a Variable: {\tt vlistDefVarCode}}
+\subsection{Define the code number of a Variable: \texttt{vlistDefVarCode}}
 \index{vlistDefVarCode}
 \label{vlistDefVarCode}
 
-The function {\tt vlistDefVarCode} defines the code number of a variable.
+The function {\texttt{vlistDefVarCode}} defines the code number of a variable.
 
 \subsubsection*{Usage}
 
@@ -155,23 +155,23 @@ The function {\tt vlistDefVarCode} defines the code number of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt code}]
+\item[\texttt{code}]
 Code number.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the Code number of a Variable: {\tt vlistInqVarCode}}
+\subsection{Get the Code number of a Variable: \texttt{vlistInqVarCode}}
 \index{vlistInqVarCode}
 \label{vlistInqVarCode}
 
-The function {\tt vlistInqVarCode} returns the code number of a variable.
+The function {\texttt{vlistInqVarCode}} returns the code number of a variable.
 
 \subsubsection*{Usage}
 
@@ -180,10 +180,10 @@ The function {\tt vlistInqVarCode} returns the code number of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
 
 \end{deflist}
@@ -191,15 +191,15 @@ Variable identifier.
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarCode} returns the code number of the variable.
+{\texttt{vlistInqVarCode}} returns the code number of the variable.
 
 
 
-\subsection{Define the name of a Variable: {\tt vlistDefVarName}}
+\subsection{Define the name of a Variable: \texttt{vlistDefVarName}}
 \index{vlistDefVarName}
 \label{vlistDefVarName}
 
-The function {\tt vlistDefVarName} defines the name of a variable.
+The function {\texttt{vlistDefVarName}} defines the name of a variable.
 
 \subsubsection*{Usage}
 
@@ -208,23 +208,23 @@ The function {\tt vlistDefVarName} defines the name of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt name}]
+\item[\texttt{name}]
 Name of the variable.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the name of a Variable: {\tt vlistInqVarName}}
+\subsection{Get the name of a Variable: \texttt{vlistInqVarName}}
 \index{vlistInqVarName}
 \label{vlistInqVarName}
 
-The function {\tt vlistInqVarName} returns the name of a variable.
+The function {\texttt{vlistInqVarName}} returns the name of a variable.
 
 \subsubsection*{Usage}
 
@@ -233,31 +233,31 @@ The function {\tt vlistInqVarName} returns the name of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt name}]
+\item[\texttt{name}]
 Returned variable name. 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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarName} returns the name of the variable to the parameter name if available,
+{\texttt{vlistInqVarName}} returns the name of the variable to the parameter name if available,
 otherwise the result is an empty string.
 
 
 
-\subsection{Define the long name of a Variable: {\tt vlistDefVarLongname}}
+\subsection{Define the long name of a Variable: \texttt{vlistDefVarLongname}}
 \index{vlistDefVarLongname}
 \label{vlistDefVarLongname}
 
-The function {\tt vlistDefVarLongname} defines the long name of a variable.
+The function {\texttt{vlistDefVarLongname}} defines the long name of a variable.
 
 \subsubsection*{Usage}
 
@@ -267,23 +267,23 @@ The function {\tt vlistDefVarLongname} defines the long name of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt longname\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt longname}]
+\item[\texttt{longname}]
 Long name of the variable.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the longname of a Variable: {\tt vlistInqVarLongname}}
+\subsection{Get the longname of a Variable: \texttt{vlistInqVarLongname}}
 \index{vlistInqVarLongname}
 \label{vlistInqVarLongname}
 
-The function {\tt vlistInqVarLongname} returns the longname of a variable if available,
+The function {\texttt{vlistInqVarLongname}} returns the longname of a variable if available,
 otherwise the result is an empty string.
 
 \subsubsection*{Usage}
@@ -294,30 +294,30 @@ otherwise the result is an empty string.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt longname\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt longname}]
+\item[\texttt{longname}]
 Long name of the variable. 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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistInqVaeLongname} returns the longname of the variable to the parameter longname.
+{\texttt{vlistInqVaeLongname}} returns the longname of the variable to the parameter longname.
 
 
 
-\subsection{Define the standard name of a Variable: {\tt vlistDefVarStdname}}
+\subsection{Define the standard name of a Variable: \texttt{vlistDefVarStdname}}
 \index{vlistDefVarStdname}
 \label{vlistDefVarStdname}
 
-The function {\tt vlistDefVarStdname} defines the standard name of a variable.
+The function {\texttt{vlistDefVarStdname}} defines the standard name of a variable.
 
 \subsubsection*{Usage}
 
@@ -327,23 +327,23 @@ The function {\tt vlistDefVarStdname} defines the standard name of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt stdname}]
+\item[\texttt{stdname}]
 Standard name of the variable.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the standard name of a Variable: {\tt vlistInqVarStdname}}
+\subsection{Get the standard name of a Variable: \texttt{vlistInqVarStdname}}
 \index{vlistInqVarStdname}
 \label{vlistInqVarStdname}
 
-The function {\tt vlistInqVarStdname} returns the standard name of a variable if available,
+The function {\texttt{vlistInqVarStdname}} returns the standard name of a variable if available,
 otherwise the result is an empty string.
 
 \subsubsection*{Usage}
@@ -354,30 +354,30 @@ otherwise the result is an empty string.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt stdname}]
+\item[\texttt{stdname}]
 Standard name of the variable. 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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarStdname} returns the standard name of the variable to the parameter stdname.
+{\texttt{vlistInqVarStdname}} returns the standard name of the variable to the parameter stdname.
 
 
 
-\subsection{Define the units of a Variable: {\tt vlistDefVarUnits}}
+\subsection{Define the units of a Variable: \texttt{vlistDefVarUnits}}
 \index{vlistDefVarUnits}
 \label{vlistDefVarUnits}
 
-The function {\tt vlistDefVarUnits} defines the units of a variable.
+The function {\texttt{vlistDefVarUnits}} defines the units of a variable.
 
 \subsubsection*{Usage}
 
@@ -386,23 +386,23 @@ The function {\tt vlistDefVarUnits} defines the units of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt units}]
+\item[\texttt{units}]
 Units of the variable.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the units of a Variable: {\tt vlistInqVarUnits}}
+\subsection{Get the units of a Variable: \texttt{vlistInqVarUnits}}
 \index{vlistInqVarUnits}
 \label{vlistInqVarUnits}
 
-The function {\tt vlistInqVarUnits} returns the units of a variable if available,
+The function {\texttt{vlistInqVarUnits}} returns the units of a variable if available,
 otherwise the result is an empty string.
 
 \subsubsection*{Usage}
@@ -412,30 +412,30 @@ otherwise the result is an empty string.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt units}]
+\item[\texttt{units}]
 Units of the variable. 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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarUnits} returns the units of the variable to the parameter units.
+{\texttt{vlistInqVarUnits}} returns the units of the variable to the parameter units.
 
 
 
-\subsection{Define the data type of a Variable: {\tt vlistDefVarDatatype}}
+\subsection{Define the data type of a Variable: \texttt{vlistDefVarDatatype}}
 \index{vlistDefVarDatatype}
 \label{vlistDefVarDatatype}
 
-The function {\tt vlistDefVarDatatype} defines the data type of a variable.
+The function {\texttt{vlistDefVarDatatype}} defines the data type of a variable.
 
 \subsubsection*{Usage}
 
@@ -444,26 +444,26 @@ The function {\tt vlistDefVarDatatype} defines the data type of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt datatype\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{datatype}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt datatype}]
+\item[\texttt{datatype}]
 The data type identifier.
-                    The valid {\CDI} data types are {\tt CDI\_DATATYPE\_PACK8}, {\tt CDI\_DATATYPE\_PACK16},
-                    {\tt CDI\_DATATYPE\_PACK24}, {\tt CDI\_DATATYPE\_FLT32}, {\tt CDI\_DATATYPE\_FLT64},
-                    {\tt CDI\_DATATYPE\_INT8}, {\tt CDI\_DATATYPE\_INT16} and {\tt CDI\_DATATYPE\_INT32}.
+                    The valid {\CDI} data types are {\texttt{CDI\_DATATYPE\_PACK8}}, {\texttt{CDI\_DATATYPE\_PACK16}},
+                    {\texttt{CDI\_DATATYPE\_PACK24}}, {\texttt{CDI\_DATATYPE\_FLT32}}, {\texttt{CDI\_DATATYPE\_FLT64}},
+                    {\texttt{CDI\_DATATYPE\_INT8}}, {\texttt{CDI\_DATATYPE\_INT16}} and {\texttt{CDI\_DATATYPE\_INT32}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the data type of a Variable: {\tt vlistInqVarDatatype}}
+\subsection{Get the data type of a Variable: \texttt{vlistInqVarDatatype}}
 \index{vlistInqVarDatatype}
 \label{vlistInqVarDatatype}
 
-The function {\tt vlistInqVarDatatype} returns the data type of a variable.
+The function {\texttt{vlistInqVarDatatype}} returns the data type of a variable.
 
 \subsubsection*{Usage}
 
@@ -472,10 +472,10 @@ The function {\tt vlistInqVarDatatype} returns the data type of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
 
 \end{deflist}
@@ -483,18 +483,18 @@ Variable identifier.
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarDatatype} returns an identifier to the data type of the variable.
-The valid {\CDI} data types are {\tt CDI\_DATATYPE\_PACK8}, {\tt CDI\_DATATYPE\_PACK16}, {\tt CDI\_DATATYPE\_PACK24},
-{\tt CDI\_DATATYPE\_FLT32}, {\tt CDI\_DATATYPE\_FLT64}, {\tt CDI\_DATATYPE\_INT8}, {\tt CDI\_DATATYPE\_INT16} and 
-{\tt CDI\_DATATYPE\_INT32}.
+{\texttt{vlistInqVarDatatype}} returns an identifier to the data type of the variable.
+The valid {\CDI} data types are {\texttt{CDI\_DATATYPE\_PACK8}}, {\texttt{CDI\_DATATYPE\_PACK16}}, {\texttt{CDI\_DATATYPE\_PACK24}},
+{\texttt{CDI\_DATATYPE\_FLT32}}, {\texttt{CDI\_DATATYPE\_FLT64}}, {\texttt{CDI\_DATATYPE\_INT8}}, {\texttt{CDI\_DATATYPE\_INT16}} and 
+{\texttt{CDI\_DATATYPE\_INT32}}.
 
 
 
-\subsection{Define the missing value of a Variable: {\tt vlistDefVarMissval}}
+\subsection{Define the missing value of a Variable: \texttt{vlistDefVarMissval}}
 \index{vlistDefVarMissval}
 \label{vlistDefVarMissval}
 
-The function {\tt vlistDefVarMissval} defines the missing value of a variable.
+The function {\texttt{vlistDefVarMissval}} defines the missing value of a variable.
 
 \subsubsection*{Usage}
 
@@ -503,23 +503,23 @@ The function {\tt vlistDefVarMissval} defines the missing value of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}.
+\item[\texttt{varID}]
 Variable identifier.
-\item[{\tt missval}]
+\item[\texttt{missval}]
 Missing value.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the missing value of a Variable: {\tt vlistInqVarMissval}}
+\subsection{Get the missing value of a Variable: \texttt{vlistInqVarMissval}}
 \index{vlistInqVarMissval}
 \label{vlistInqVarMissval}
 
-The function {\tt vlistInqVarMissval} returns the missing value of a variable.
+The function {\texttt{vlistInqVarMissval}} returns the missing value of a variable.
 
 \subsubsection*{Usage}
 
@@ -528,10 +528,10 @@ The function {\tt vlistInqVarMissval} returns the missing value of a variable.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt vlistID\ }
-\item[{\tt vlistID}]
-Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate}} or {\htmlref{\tt streamInqVlist}{streamInqVlist}}.
-\item[{\tt varID}]
+\begin{deflist}{\texttt{vlistID}\ }
+\item[\texttt{vlistID}]
+Variable list ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
+\item[\texttt{varID}]
 Variable identifier.
 
 \end{deflist}
@@ -539,5 +539,5 @@ Variable identifier.
 
 \subsubsection*{Result}
 
-{\tt vlistInqVarMissval} returns the missing value of the variable.
+{\texttt{vlistInqVarMissval}} returns the missing value of the variable.
 
diff --git a/doc/tex/f_zaxis.tex b/doc/tex/f_zaxis.tex
index 9986f45ad13d4158ba1533b7b37b018c74e94d11..d07d541e0ad2505839e45ec786b31f02869ce6c8 100644
--- a/doc/tex/f_zaxis.tex
+++ b/doc/tex/f_zaxis.tex
@@ -1,10 +1,10 @@
 
 
-\subsection{Create a vertical Z-axis: {\tt zaxisCreate}}
+\subsection{Create a vertical Z-axis: \texttt{zaxisCreate}}
 \index{zaxisCreate}
 \label{zaxisCreate}
 
-The function {\tt zaxisCreate} creates a vertical Z-axis.
+The function {\texttt{zaxisCreate}} creates a vertical Z-axis.
 
 \subsubsection*{Usage}
 
@@ -13,18 +13,18 @@ The function {\tt zaxisCreate} creates a vertical Z-axis.
 \end{verbatim}
 
 \hspace*{4mm}\begin{minipage}[]{15cm}
-\begin{deflist}{\tt zaxistype\ }
-\item[{\tt zaxistype}]
+\begin{deflist}{\texttt{zaxistype}\ }
+\item[\texttt{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\_SNOW},
-                      {\tt ZAXIS\_LAKE\_BOTTOM}, {\tt ZAXIS\_SEDIMENT\_BOTTOM}, {\tt ZAXIS\_SEDIMENT\_BOTTOM\_TA},
-                      {\tt ZAXIS\_SEDIMENT\_BOTTOM\_TW}, {\tt ZAXIS\_MIX\_LAYER},
-                      {\tt ZAXIS\_DEPTH\_BELOW\_SEA} and {\tt ZAXIS\_DEPTH\_BELOW\_LAND}.
-\item[{\tt size}]
+                      The valid {\CDI} Z-axis types are {\texttt{ZAXIS\_GENERIC}}, {\texttt{ZAXIS\_SURFACE}},
+                      {\texttt{ZAXIS\_HYBRID}}, {\texttt{ZAXIS\_SIGMA}}, {\texttt{ZAXIS\_PRESSURE}}, {\texttt{ZAXIS\_HEIGHT}},
+                      {\texttt{ZAXIS\_ISENTROPIC}}, {\texttt{ZAXIS\_ALTITUDE}}, {\texttt{ZAXIS\_MEANSEA}}, {\texttt{ZAXIS\_TOA}},
+                      {\texttt{ZAXIS\_SEA\_BOTTOM}}, {\texttt{ZAXIS\_ATMOSPHERE}}, {\texttt{ZAXIS\_CLOUD\_BASE}},
+                      {\texttt{ZAXIS\_CLOUD\_TOP}}, {\texttt{ZAXIS\_ISOTHERM\_ZERO}}, {\texttt{ZAXIS\_SNOW}},
+                      {\texttt{ZAXIS\_LAKE\_BOTTOM}}, {\texttt{ZAXIS\_SEDIMENT\_BOTTOM}}, {\texttt{ZAXIS\_SEDIMENT\_BOTTOM\_TA}},
+                      {\texttt{ZAXIS\_SEDIMENT\_BOTTOM\_TW}}, {\texttt{ZAXIS\_MIX\_LAYER}},
+                      {\texttt{ZAXIS\_DEPTH\_BELOW\_SEA}} and {\texttt{ZAXIS\_DEPTH\_BELOW\_LAND}}.
+\item[\texttt{size}]
 Number of levels.
 
 \end{deflist}
@@ -32,12 +32,12 @@ Number of levels.
 
 \subsubsection*{Result}
 
-{\tt zaxisCreate} returns an identifier to the Z-axis.
+{\texttt{zaxisCreate}} returns an identifier to the Z-axis.
 
 
 \subsubsection*{Example}
 
-Here is an example using {\tt zaxisCreate} to create a pressure level Z-axis:
+Here is an example using {\texttt{zaxisCreate}} to create a pressure level Z-axis:
 
 \begin{lstlisting}[language=Fortran, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
 
@@ -54,7 +54,7 @@ Here is an example using {\tt zaxisCreate} to create a pressure level Z-axis:
 \end{lstlisting}
 
 
-\subsection{Destroy a vertical Z-axis: {\tt zaxisDestroy}}
+\subsection{Destroy a vertical Z-axis: \texttt{zaxisDestroy}}
 \index{zaxisDestroy}
 \label{zaxisDestroy}
 \subsubsection*{Usage}
@@ -64,19 +64,19 @@ Here is an example using {\tt zaxisCreate} to create a pressure level Z-axis:
 \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}}.
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the type of a Z-axis: {\tt zaxisInqType}}
+\subsection{Get the type of a Z-axis: \texttt{zaxisInqType}}
 \index{zaxisInqType}
 \label{zaxisInqType}
 
-The function {\tt zaxisInqType} returns the type of a Z-axis.
+The function {\texttt{zaxisInqType}} returns the type of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -85,33 +85,33 @@ The function {\tt zaxisInqType} returns the type of a Z-axis.
 \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}} or {\htmlref{\tt vlistInqVarZaxis}{vlistInqVarZaxis}}.
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}} or {\htmlref{\texttt{vlistInqVarZaxis}}{vlistInqVarZaxis}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt zaxisInqType} returns the type of the Z-axis,
+{\texttt{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\_SNOW},
-{\tt ZAXIS\_LAKE\_BOTTOM}, {\tt ZAXIS\_SEDIMENT\_BOTTOM}, {\tt ZAXIS\_SEDIMENT\_BOTTOM\_TA},
-{\tt ZAXIS\_SEDIMENT\_BOTTOM\_TW}, {\tt ZAXIS\_MIX\_LAYER},
-{\tt ZAXIS\_DEPTH\_BELOW\_SEA} and {\tt ZAXIS\_DEPTH\_BELOW\_LAND}.
+The valid {\CDI} Z-axis types are {\texttt{ZAXIS\_GENERIC}}, {\texttt{ZAXIS\_SURFACE}},
+{\texttt{ZAXIS\_HYBRID}}, {\texttt{ZAXIS\_SIGMA}}, {\texttt{ZAXIS\_PRESSURE}}, {\texttt{ZAXIS\_HEIGHT}},
+{\texttt{ZAXIS\_ISENTROPIC}}, {\texttt{ZAXIS\_ALTITUDE}}, {\texttt{ZAXIS\_MEANSEA}}, {\texttt{ZAXIS\_TOA}},
+{\texttt{ZAXIS\_SEA\_BOTTOM}}, {\texttt{ZAXIS\_ATMOSPHERE}}, {\texttt{ZAXIS\_CLOUD\_BASE}},
+{\texttt{ZAXIS\_CLOUD\_TOP}}, {\texttt{ZAXIS\_ISOTHERM\_ZERO}}, {\texttt{ZAXIS\_SNOW}},
+{\texttt{ZAXIS\_LAKE\_BOTTOM}}, {\texttt{ZAXIS\_SEDIMENT\_BOTTOM}}, {\texttt{ZAXIS\_SEDIMENT\_BOTTOM\_TA}},
+{\texttt{ZAXIS\_SEDIMENT\_BOTTOM\_TW}}, {\texttt{ZAXIS\_MIX\_LAYER}},
+{\texttt{ZAXIS\_DEPTH\_BELOW\_SEA}} and {\texttt{ZAXIS\_DEPTH\_BELOW\_LAND}}.
 
 
 
-\subsection{Get the size of a Z-axis: {\tt zaxisInqSize}}
+\subsection{Get the size of a Z-axis: \texttt{zaxisInqSize}}
 \index{zaxisInqSize}
 \label{zaxisInqSize}
 
-The function {\tt zaxisInqSize} returns the size of a Z-axis.
+The function {\texttt{zaxisInqSize}} returns the size of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -120,24 +120,24 @@ The function {\tt zaxisInqSize} returns the size of a Z-axis.
 \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}} or {\htmlref{\tt vlistInqVarZaxis}{vlistInqVarZaxis}}.
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}} or {\htmlref{\texttt{vlistInqVarZaxis}}{vlistInqVarZaxis}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt zaxisInqSize} returns the number of levels of a Z-axis.
+{\texttt{zaxisInqSize}} returns the number of levels of a Z-axis.
 
 
 
-\subsection{Define the levels of a Z-axis: {\tt zaxisDefLevels}}
+\subsection{Define the levels of a Z-axis: \texttt{zaxisDefLevels}}
 \index{zaxisDefLevels}
 \label{zaxisDefLevels}
 
-The function {\tt zaxisDefLevels} defines the levels of a Z-axis.
+The function {\texttt{zaxisDefLevels}} defines the levels of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -146,21 +146,21 @@ The function {\tt zaxisDefLevels} defines the levels of a Z-axis.
 \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}]
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
+\item[\texttt{levels}]
 All levels of the Z-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get all levels of a Z-axis: {\tt zaxisInqLevels}}
+\subsection{Get all levels of a Z-axis: \texttt{zaxisInqLevels}}
 \index{zaxisInqLevels}
 \label{zaxisInqLevels}
 
-The function {\tt zaxisInqLevels} returns all levels of a Z-axis.
+The function {\texttt{zaxisInqLevels}} returns all levels of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -169,10 +169,10 @@ The function {\tt zaxisInqLevels} returns all levels of a Z-axis.
 \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}} or {\htmlref{\tt vlistInqVarZaxis}{vlistInqVarZaxis}}.
-\item[{\tt levels}]
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}} or {\htmlref{\texttt{vlistInqVarZaxis}}{vlistInqVarZaxis}}.
+\item[\texttt{levels}]
 Pointer to the location into which the levels are read.
                     The caller must allocate space for the returned values.
 
@@ -181,14 +181,14 @@ Pointer to the location into which the levels are read.
 
 \subsubsection*{Result}
 
-{\tt zaxisInqLevels} saves all levels to the parameter {\tt levels}.
+{\texttt{zaxisInqLevels}} saves all levels to the parameter {\texttt{levels}}.
 
 
-\subsection{Get one level of a Z-axis: {\tt zaxisInqLevel}}
+\subsection{Get one level of a Z-axis: \texttt{zaxisInqLevel}}
 \index{zaxisInqLevel}
 \label{zaxisInqLevel}
 
-The function {\tt zaxisInqLevel} returns one level of a Z-axis.
+The function {\texttt{zaxisInqLevel}} returns one level of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -197,10 +197,10 @@ The function {\tt zaxisInqLevel} returns one level of a Z-axis.
 \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}} or {\htmlref{\tt vlistInqVarZaxis}{vlistInqVarZaxis}}.
-\item[{\tt levelID}]
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}} or {\htmlref{\texttt{vlistInqVarZaxis}}{vlistInqVarZaxis}}.
+\item[\texttt{levelID}]
 Level index (range: 0 to nlevel-1).
 
 \end{deflist}
@@ -208,14 +208,14 @@ Level index (range: 0 to nlevel-1).
 
 \subsubsection*{Result}
 
-{\tt zaxisInqLevel} returns the level of a Z-axis.
+{\texttt{zaxisInqLevel}} returns the level of a Z-axis.
 
 
-\subsection{Define the name of a Z-axis: {\tt zaxisDefName}}
+\subsection{Define the name of a Z-axis: \texttt{zaxisDefName}}
 \index{zaxisDefName}
 \label{zaxisDefName}
 
-The function {\tt zaxisDefName} defines the name of a Z-axis.
+The function {\texttt{zaxisDefName}} defines the name of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -224,21 +224,21 @@ The function {\tt zaxisDefName} defines the name of a Z-axis.
 \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}]
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
+\item[\texttt{name}]
 Name of the Z-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the name of a Z-axis: {\tt zaxisInqName}}
+\subsection{Get the name of a Z-axis: \texttt{zaxisInqName}}
 \index{zaxisInqName}
 \label{zaxisInqName}
 
-The function {\tt zaxisInqName} returns the name of a Z-axis.
+The function {\texttt{zaxisInqName}} returns the name of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -247,28 +247,28 @@ The function {\tt zaxisInqName} returns the name of a Z-axis.
 \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}} or {\htmlref{\tt vlistInqVarZaxis}{vlistInqVarZaxis}}.
-\item[{\tt name}]
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}} or {\htmlref{\texttt{vlistInqVarZaxis}}{vlistInqVarZaxis}}.
+\item[\texttt{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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt zaxisInqName} returns the name of the Z-axis to the parameter name.
+{\texttt{zaxisInqName}} returns the name of the Z-axis to the parameter name.
 
 
 
-\subsection{Define the longname of a Z-axis: {\tt zaxisDefLongname}}
+\subsection{Define the longname of a Z-axis: \texttt{zaxisDefLongname}}
 \index{zaxisDefLongname}
 \label{zaxisDefLongname}
 
-The function {\tt zaxisDefLongname} defines the longname of a Z-axis.
+The function {\texttt{zaxisDefLongname}} defines the longname of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -277,21 +277,21 @@ The function {\tt zaxisDefLongname} defines the longname of a Z-axis.
 \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}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
+\item[\texttt{longname}]
 Longname of the Z-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the longname of a Z-axis: {\tt zaxisInqLongname}}
+\subsection{Get the longname of a Z-axis: \texttt{zaxisInqLongname}}
 \index{zaxisInqLongname}
 \label{zaxisInqLongname}
 
-The function {\tt zaxisInqLongname} returns the longname of a Z-axis.
+The function {\texttt{zaxisInqLongname}} returns the longname of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -300,28 +300,28 @@ The function {\tt zaxisInqLongname} returns the longname of a Z-axis.
 \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}} or {\htmlref{\tt vlistInqVarZaxis}{vlistInqVarZaxis}}.
-\item[{\tt longname}]
+\begin{deflist}{\texttt{longname}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}} or {\htmlref{\texttt{vlistInqVarZaxis}}{vlistInqVarZaxis}}.
+\item[\texttt{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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt zaxisInqLongname} returns the longname of the Z-axis to the parameter longname.
+{\texttt{zaxisInqLongname}} returns the longname of the Z-axis to the parameter longname.
 
 
 
-\subsection{Define the units of a Z-axis: {\tt zaxisDefUnits}}
+\subsection{Define the units of a Z-axis: \texttt{zaxisDefUnits}}
 \index{zaxisDefUnits}
 \label{zaxisDefUnits}
 
-The function {\tt zaxisDefUnits} defines the units of a Z-axis.
+The function {\texttt{zaxisDefUnits}} defines the units of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -330,21 +330,21 @@ The function {\tt zaxisDefUnits} defines the units of a Z-axis.
 \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}]
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
+\item[\texttt{units}]
 Units of the Z-axis.
 
 \end{deflist}
 \end{minipage}
 
 
-\subsection{Get the units of a Z-axis: {\tt zaxisInqUnits}}
+\subsection{Get the units of a Z-axis: \texttt{zaxisInqUnits}}
 \index{zaxisInqUnits}
 \label{zaxisInqUnits}
 
-The function {\tt zaxisInqUnits} returns the units of a Z-axis.
+The function {\texttt{zaxisInqUnits}} returns the units of a Z-axis.
 
 \subsubsection*{Usage}
 
@@ -353,18 +353,18 @@ The function {\tt zaxisInqUnits} returns the units of a Z-axis.
 \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}} or {\htmlref{\tt vlistInqVarZaxis}{vlistInqVarZaxis}}.
-\item[{\tt units}]
+\begin{deflist}{\texttt{zaxisID}\ }
+\item[\texttt{zaxisID}]
+Z-axis ID, from a previous call to {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}} or {\htmlref{\texttt{vlistInqVarZaxis}}{vlistInqVarZaxis}}.
+\item[\texttt{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}.
+                    the string is given by the predefined constant {\texttt{CDI\_MAX\_NAME}}.
 
 \end{deflist}
 \end{minipage}
 
 \subsubsection*{Result}
 
-{\tt zaxisInqUnits} returns the units of the Z-axis to the parameter units.
+{\texttt{zaxisInqUnits}} returns the units of the Z-axis to the parameter units.
 
diff --git a/doc/tex/formats.tex b/doc/tex/formats.tex
index 4a3b371a10c7c4b811ad9714cf34356cc6388751..854f1159254c7912ffd831add972008588ea03d3 100644
--- a/doc/tex/formats.tex
+++ b/doc/tex/formats.tex
@@ -84,14 +84,14 @@ GRIB1  & GRIB2 & & \\
 GRIB1 is implemented in {\CDI} as an internal library and enabled per default.
 The internal GRIB1 library is called CGRIBEX. This is lightweight
 version of the ECMWF GRIBEX library. CGRIBEX is written in ANSI C with a portable Fortran interface. 
-The configure option {\tt --disable-cgribex} will disable the encoding/decoding of GRIB1 records with CGRIBEX.
+The configure option \texttt{--disable-cgribex} will disable the encoding/decoding of GRIB1 records with CGRIBEX.
 
 \subsection{GRIB edition 2}
 
 GRIB2 is available in {\CDI} via the ECMWF GRIB\_API \cite{GRIBAPI}.
 GRIB\_API is an external library and not part of {\CDI}. To use GRIB2 with
 {\CDI} the GRIB\_API library must be installed before the configuration
-of the {\CDI} library. Use the configure option {\tt --with-grib\_api} to
+of the {\CDI} library. Use the configure option \texttt{--with-grib\_api} to
 enable GRIB2 support. 
 
 The GRIB\_API library is also used to encode/decode GRIB1 records if the support for the CGRIBEX library is disabled.
@@ -113,7 +113,7 @@ The NetCDF attributes should follow the
 
 NetCDF is an external library and not part of {\CDI}. To use NetCDF with
 {\CDI} the NetCDF library must be installed before the configuration
-of the {\CDI} library. Use the configure option {\tt --with-netcdf} to
+of the {\CDI} library. Use the configure option \texttt{--with-netcdf} to
 enable NetCDF support (see \htmlref{Build}{build}).
 
 %\subsection{ncdap}
@@ -136,26 +136,26 @@ The following Fortran code example can be used to read a SERVICE record with an
    READ(unit) ((field(ilon,ilat), ilon=1,nlon), ilat=1,nlat)
 \end{lstlisting}
 
-The constants {\tt mlon} and {\tt mlat} must be greater or equal than {\tt nlon} and {\tt nlat}.
+The constants \texttt{mlon} and \texttt{mlat} must be greater or equal than \texttt{nlon} and \texttt{nlat}.
 The meaning of the variables are:
 
 \vspace*{3mm}
 \hspace*{8mm}\begin{minipage}{10cm}
-\begin{deflist}{{\tt idispo2 \ \ }}
-\item[{\tt icode}]    The code number
-\item[{\tt ilevel}]   The level
-\item[{\tt idate}]    The date as YYYYMMDD
-\item[{\tt itime}]    The time as hhmmss
-\item[{\tt nlon}]     The number of longitudes
-\item[{\tt nlat}]     The number of latitides
-\item[{\tt idispo1}]  For the users disposal (Not used in {\CDI})
-\item[{\tt idispo2}]  For the users disposal (Not used in {\CDI})
+\begin{deflist}{\texttt{idispo2 \ \ }}
+\item[\texttt{icode}]    The code number
+\item[\texttt{ilevel}]   The level
+\item[\texttt{idate}]    The date as YYYYMMDD
+\item[\texttt{itime}]    The time as hhmmss
+\item[\texttt{nlon}]     The number of longitudes
+\item[\texttt{nlat}]     The number of latitides
+\item[\texttt{idispo1}]  For the users disposal (Not used in {\CDI})
+\item[\texttt{idispo2}]  For the users disposal (Not used in {\CDI})
 \end{deflist}
 \end{minipage}
 \vspace*{3mm}
 
 SERVICE is implemented in {\CDI} as an internal library and enabled per default.
-The configure option {\tt --disable-service} will disable the support for the SERVICE format.
+The configure option \texttt{--disable-service} will disable the support for the SERVICE format.
 
 \section{EXTRA}
 
@@ -174,22 +174,22 @@ The following Fortran code example can be used to read an EXTRA record with an a
    READ(unit) (field(isize),isize=1,nsize)
 \end{lstlisting}
 
-The constant {\tt msize} must be greater or equal than {\tt nsize}.
+The constant \texttt{msize} must be greater or equal than \texttt{nsize}.
 The meaning of the variables are:
 
 \vspace*{3mm}
 \hspace*{8mm}\begin{minipage}{10cm}
-\begin{deflist}{{\tt idispo2 \ \ }}
-\item[{\tt idate}]    The date as YYYYMMDD
-\item[{\tt icode}]    The code number
-\item[{\tt ilevel}]   The level
-\item[{\tt nsize}]    The size of the field
+\begin{deflist}{\texttt{idispo2 \ \ }}
+\item[\texttt{idate}]    The date as YYYYMMDD
+\item[\texttt{icode}]    The code number
+\item[\texttt{ilevel}]   The level
+\item[\texttt{nsize}]    The size of the field
 \end{deflist}
 \end{minipage}
 \vspace*{3mm}
 
 EXTRA is implemented in {\CDI} as an internal library and enabled per default.
-The configure option {\tt --disable-extra} will disable the support for the EXTRA format.
+The configure option \texttt{--disable-extra} will disable the support for the EXTRA format.
 
 
 \section{IEG}
@@ -205,4 +205,4 @@ than 50 model levels with this format.
 {\CDI} supports only data on Gaussian and LonLat grids for the IEG format.
 
 IEG is implemented in {\CDI} as an internal library and enabled per default.
-The configure option {\tt --disable-ieg} will disable the support for the IEG format.
+The configure option \texttt{--disable-ieg} will disable the support for the IEG format.
diff --git a/doc/tex/grid.tex b/doc/tex/grid.tex
index 395d62ce1bc42ab105e2d45ac45b760b75ee1a19..ba188759f4187f64605f53e5946dc74002ad8651 100644
--- a/doc/tex/grid.tex
+++ b/doc/tex/grid.tex
@@ -5,14 +5,14 @@ The following different Grid types are available:
 
 \vspace*{3mm}
 \hspace*{8mm}\begin{minipage}{15cm}
-\begin{deflist}{{\large\tt GRID\_UNSTRUCTURED \ \ }}
-\item[{\large\tt GRID\_GENERIC     }]  Generic user defined grid      
-\item[{\large\tt GRID\_LONLAT      }]  Regular longitude/latitude grid
-\item[{\large\tt GRID\_GAUSSIAN    }]  Regular Gaussian lon/lat grid
-\item[{\large\tt GRID\_SPECTRAL    }]  Spherical harmonic coefficients
-\item[{\large\tt GRID\_GME         }]  Icosahedral-hexagonal GME grid    
-\item[{\large\tt GRID\_LCC         }]  Lambert conformal conic grid
-\item[{\large\tt GRID\_CURVILINEAR }]  Curvilinear grid
-\item[{\large\tt GRID\_UNSTRUCTURED}]  Unstructured grid
+\begin{deflist}{\large\texttt{GRID\_UNSTRUCTURED \ \ }}
+\item[\large\texttt{GRID\_GENERIC     }]  Generic user defined grid      
+\item[\large\texttt{GRID\_LONLAT      }]  Regular longitude/latitude grid
+\item[\large\texttt{GRID\_GAUSSIAN    }]  Regular Gaussian lon/lat grid
+\item[\large\texttt{GRID\_SPECTRAL    }]  Spherical harmonic coefficients
+\item[\large\texttt{GRID\_GME         }]  Icosahedral-hexagonal GME grid    
+\item[\large\texttt{GRID\_LCC         }]  Lambert conformal conic grid
+\item[\large\texttt{GRID\_CURVILINEAR }]  Curvilinear grid
+\item[\large\texttt{GRID\_UNSTRUCTURED}]  Unstructured grid
 \end{deflist}
 \end{minipage}
diff --git a/doc/tex/install.tex b/doc/tex/install.tex
index 9076ab1050ad70f81078756c0471cd6a60854c43..0420aa6a084e3bc9c0c0a77fcd7196d06181dbca 100644
--- a/doc/tex/install.tex
+++ b/doc/tex/install.tex
@@ -4,19 +4,19 @@ This section describes how to build the {\CDI} library from the sources on a UNI
 {\CDI} is using the GNU configure and build system to compile the source code.
 The only requirement is a working ANSI C99 compiler.
 
-First go to the \href{http://code.zmaw.de/projects/cdi/files}{\tt download} page
-({\tt http://code.zmaw.de/projects/cdi/files}) to get the latest distribution,
+First go to the \href{http://code.zmaw.de/projects/cdi/files}{\texttt{download}} page
+(\texttt{http://code.zmaw.de/projects/cdi/files}) to get the latest distribution,
 if you do not already have it.
 
 To take full advantage of {\CDI}'s features the following additional libraries should be installed:
 
 \begin{itemize}
 \item Unidata \href{http://www.unidata.ucar.edu/packages/netcdf}{NetCDF} library
-      ({\tt http://www.unidata.ucar.edu/packages/netcdf})
+      (\texttt{http://www.unidata.ucar.edu/packages/netcdf})
       version 3 or higher.
       This is needed to read/write NetCDF files with {\CDI}. 
 \item The ECMWF \href{http://www.ecmwf.int/products/data/software/grib_api.html}{GRIB\_API}
-      ({\tt http://www.ecmwf.int/products/data/software/grib\_api.html})
+      (\texttt{http://www.ecmwf.int/products/data/software/grib\_api.html})
       version 1.9.5 or higher.
       This library is needed to encode/decode GRIB2 records with {\CDI}. 
 \end{itemize}
@@ -61,23 +61,23 @@ For an overview of other configuration options use
 
 \end{enumerate}
 
-The software should compile without problems and the {\CDI} library ({\tt libcdi.a}) 
-should be available in the {\tt src} directory of the distribution.
+The software should compile without problems and the {\CDI} library (\texttt{libcdi.a}) 
+should be available in the \texttt{src} directory of the distribution.
 
 
 \subsection{Installation}
 
-After the compilation of the source code do a {\tt make install},
+After the compilation of the source code do a \texttt{make install},
 possibly as root if the destination permissions require that.
 
 \begin{verbatim}
     make install
 \end{verbatim} 
 
-The library is installed into the directory {\tt $<$prefix$>$/lib}.
-The C and Fortran include files are installed into the directory {\tt $<$prefix$>$/include}.
-{\tt $<$prefix$>$} defaults to {\tt /usr/local} but can be changed with 
-the {\tt --prefix} option of the configure script. 
+The library is installed into the directory \texttt{$<$prefix$>$/lib}.
+The C and Fortran include files are installed into the directory \texttt{$<$prefix$>$/include}.
+\texttt{$<$prefix$>$} defaults to \texttt{/usr/local} but can be changed with 
+the \texttt{--prefix} option of the configure script. 
 
 %Alternatively, you can also copy the library from the {\tt src} directory
 %manually to some {\tt lib} directory in your search path.
diff --git a/doc/tex/makedoc b/doc/tex/makedoc
index 26046d65c8fb26d10d8f2d358cfaddb0f3c0d66f..e4e42cb39d1281960e8d6d4e65b55ceafd54ab28 100755
--- a/doc/tex/makedoc
+++ b/doc/tex/makedoc
@@ -142,7 +142,7 @@ while (<MOFILE>) {
     $hrefproto{$funcname} = $cproto;
     $hreftitle{$funcname} = $title;
 
-    printcfdoc ("\n\n\\subsection{$title: {\\tt $funcname}}\n");
+    printcfdoc ("\n\n\\subsection{$title: \\texttt{$funcname}}\n");
     printcfdoc ("\\index{$funcname}\n");
     printcfdoc ("\\label{$funcname}\n");
 
@@ -274,13 +274,13 @@ foreach $key (@sorted_func)  {
   $cproto = $hrefproto{$key};
   $title  = $hreftitle{$key};
 
-  printcfdoc ("\n\n\\section*{\\tt ");
+  printcfdoc ("\n\n\\section*{\\texttt{ ");
   printcfdoc ("\\ifpdf\n");
   printcfdoc ("\\hyperref[$key]{$key}\n");
   printcfdoc ("\\else\n");
   printcfdoc ("$key\n");
   printcfdoc ("\\fi\n");
-  printcfdoc ("}\n");
+  printcfdoc ("}}\n");
   printcfdoc ("\\begin{verbatim}\n");
   printproto ($cproto);
   printcfdoc ("\\end{verbatim}\n");
@@ -418,8 +418,8 @@ sub printcfdoc {
       chomp $tag;
       $tag =~ s/ CDI / {\\CDI} /og;
       $tag =~ s/_/\\_/og;
-      $tag =~ s/\@fref\{([^}]*)\}/{\\htmlref{\\tt \1}{\1}}/og;
-      $tag =~ s/\@func\{([^}]*)\}/{\\tt \1}/og;
+      $tag =~ s/\@fref\{([^}]*)\}/{\\htmlref{\\texttt{\1}}{\1}}/og;
+      $tag =~ s/\@func\{([^}]*)\}/{\\texttt{\1}}/og;
       print CDOCFILE "$tag\n";
       print FDOCFILE "$tag\n";
     }
@@ -448,12 +448,12 @@ sub printlist {
       }
     }
     printcfdoc "\n\\hspace*{4mm}\\begin{minipage}[]{15cm}\n";
-    printcfdoc "\\begin{deflist}{\\tt $mitem\\ }\n";
+    printcfdoc "\\begin{deflist}{\\texttt{$mitem}\\ }\n";
     foreach $tag (@list) {
       ($kword,$item,$line) = split(" ", $tag, 3);
       $kword = uc($kword);
       if ( "$kword" eq "\@ITEM" ) {
-	printcfdoc "\\item[{\\tt ${item}}]\n";
+	printcfdoc "\\item[\\texttt{${item}}]\n";
 	printcfdoc "$line\n";
       } else {
 	printcfdoc "$tag\n";
diff --git a/doc/tex/makepdf_c b/doc/tex/makepdf_c
index 832834f1093e92eb7cdebc808d1235d72f49bcc9..6288c9f50fdc7c1d281620e3375ed6579e0a00d8 100755
--- a/doc/tex/makepdf_c
+++ b/doc/tex/makepdf_c
@@ -5,7 +5,7 @@ pdflatex ${FILE}
 cat > ${FILE}.ist << 'EOF'
 delim_0        "{\\idxdotfill} "
 headings_flag  1
-heading_prefix "{\\centerline {\\Large \\bf "
+heading_prefix "{\\centerline {\\Large \\bfseries "
 %heading_prefix "{\\centerline {\\bfseries "
 heading_suffix "}}"
 EOF
diff --git a/doc/tex/makepdf_f b/doc/tex/makepdf_f
index 75b73422e8455294f933e1b917436879edbfacf6..dc34246f3aa967cb52f7c3c9211baf68630aba6e 100755
--- a/doc/tex/makepdf_f
+++ b/doc/tex/makepdf_f
@@ -5,7 +5,7 @@ pdflatex ${FILE}
 cat > ${FILE}.ist << 'EOF'
 delim_0        "{\\idxdotfill} "
 headings_flag  1
-heading_prefix "{\\centerline {\\Large \\bf "
+heading_prefix "{\\centerline {\\Large \\bfseries "
 %heading_prefix "{\\centerline {\\bfseries "
 heading_suffix "}}"
 EOF
diff --git a/doc/tex/taxis.tex b/doc/tex/taxis.tex
index 6e5f7a96617ea324933f0d4410cee515e0b72201..17bb85c21a69ae5457e8133698dbd1d6901490ec 100644
--- a/doc/tex/taxis.tex
+++ b/doc/tex/taxis.tex
@@ -1,14 +1,14 @@
 This section contains functions to define a new Time axis
 and to get information from an existing T-axis.
 A T-axis  object is necessary to define the time axis of a dataset
-and must be assiged to a variable list using \htmlref{\tt vlistDefTaxis}{vlistDefTaxis}.
+and must be assiged to a variable list using \htmlref{\texttt{vlistDefTaxis}}{vlistDefTaxis}.
 The following different Time axis types are available:
 
 \vspace*{3mm}
 \hspace*{8mm}\begin{minipage}{15cm}
-\begin{deflist}{{\large\tt TAXIS\_RELATIVE \ \ }}
-\item[{\large\tt TAXIS\_ABSOLUTE}]  Absolute time axis    
-\item[{\large\tt TAXIS\_RELATIVE}]  Relative time axis
+\begin{deflist}{\large\texttt{TAXIS\_RELATIVE \ \ }}
+\item[\large\texttt{TAXIS\_ABSOLUTE}]  Absolute time axis    
+\item[\large\texttt{TAXIS\_RELATIVE}]  Relative time axis
 \end{deflist}
 \end{minipage}
 \vspace*{3mm}
@@ -23,11 +23,11 @@ CDI supports the following calendar types:
 
 \vspace*{3mm}
 \hspace*{8mm}\begin{minipage}{15cm}
-\begin{deflist}{{\large\tt CALENDAR\_PROLEPTIC \ \ }}
-\item[{\large\tt CALENDAR\_STANDARD}]  Mixed Gregorian/Julian calendar.
-\item[{\large\tt CALENDAR\_PROLEPTIC}]  Proleptic Gregorian calendar. This is the default.
-\item[{\large\tt CALENDAR\_360DAYS }]  All years are 360 days divided into 30 day months.
-\item[{\large\tt CALENDAR\_365DAYS }]  Gregorian calendar without leap years, i.e., all years are 365 days long.
-\item[{\large\tt CALENDAR\_366DAYS }]  Gregorian calendar with every year being a leap year, i.e., all years are 366 days long.
+\begin{deflist}{\large\texttt{CALENDAR\_PROLEPTIC \ \ }}
+\item[\large\texttt{CALENDAR\_STANDARD}]  Mixed Gregorian/Julian calendar.
+\item[\large\texttt{CALENDAR\_PROLEPTIC}]  Proleptic Gregorian calendar. This is the default.
+\item[\large\texttt{CALENDAR\_360DAYS }]  All years are 360 days divided into 30 day months.
+\item[\large\texttt{CALENDAR\_365DAYS }]  Gregorian calendar without leap years, i.e., all years are 365 days long.
+\item[\large\texttt{CALENDAR\_366DAYS }]  Gregorian calendar with every year being a leap year, i.e., all years are 366 days long.
 \end{deflist}
 \end{minipage}
diff --git a/doc/tex/variable.tex b/doc/tex/variable.tex
index c8d18a2b41f1caf90548bc339efe38858b5ac24c..8fc72d96e3bb8045a4a346fc5998b3883358947f 100644
--- a/doc/tex/variable.tex
+++ b/doc/tex/variable.tex
@@ -5,14 +5,14 @@ one of the following timestep types must be specified:
 
 \vspace*{3mm}
 \hspace*{8mm}\begin{minipage}{15cm}
-\begin{deflist}{{\large\tt TSTEP\_CONSTANT \ \ }}
-\item[{\large\tt TSTEP\_CONSTANT }]  The data values have no time dimension.
-\item[{\large\tt TSTEP\_INSTANT }]  The data values are representative of points in space or time (instantaneous).
-\item[{\large\tt TSTEP\_ACCUM }]  The data values are representative of a sum or accumulation over the cell.
-\item[{\large\tt TSTEP\_AVG }]  Mean (average value)  
-\item[{\large\tt TSTEP\_MAX }]  Maximum  
-\item[{\large\tt TSTEP\_MIN }]  Minimum
-\item[{\large\tt TSTEP\_SD }]  Standard deviation
+\begin{deflist}{\large\texttt{TSTEP\_CONSTANT \ \ }}
+\item[{\large\texttt{TSTEP\_CONSTANT }}]  The data values have no time dimension.
+\item[{\large\texttt{TSTEP\_INSTANT }}]  The data values are representative of points in space or time (instantaneous).
+\item[{\large\texttt{TSTEP\_ACCUM }}]  The data values are representative of a sum or accumulation over the cell.
+\item[{\large\texttt{TSTEP\_AVG }}]  Mean (average value)  
+\item[{\large\texttt{TSTEP\_MAX }}]  Maximum  
+\item[{\large\texttt{TSTEP\_MIN }}]  Minimum
+\item[{\large\texttt{TSTEP\_SD }}]  Standard deviation
 \end{deflist}
 \end{minipage}
 \vspace*{3mm}
@@ -23,15 +23,15 @@ predefined constants:
 
 \vspace*{3mm}
 \hspace*{8mm}\begin{minipage}{15cm}
-\begin{deflist}{{\large\tt CDI\_DATATYPE\_PACK1 \ \ }}
-\item[{\large\tt CDI\_DATATYPE\_PACK8}]    8 packed bit (only for GRIB)
-\item[{\large\tt CDI\_DATATYPE\_PACK16}]  16 packed bit (only for GRIB)
-\item[{\large\tt CDI\_DATATYPE\_PACK24}]  24 packed bit (only for GRIB)
-\item[{\large\tt CDI\_DATATYPE\_FLT32}]   32 bit floating point
-\item[{\large\tt CDI\_DATATYPE\_FLT64}]   64 bit floating point
-\item[{\large\tt CDI\_DATATYPE\_INT8}]     8 bit integer
-\item[{\large\tt CDI\_DATATYPE\_INT16}]   16 bit integer
-\item[{\large\tt CDI\_DATATYPE\_INT32}]   32 bit integer
+\begin{deflist}{\large\texttt{CDI\_DATATYPE\_PACK1 \ \ }}
+\item[{\large\texttt{CDI\_DATATYPE\_PACK8}}]    8 packed bit (only for GRIB)
+\item[{\large\texttt{CDI\_DATATYPE\_PACK16}}]  16 packed bit (only for GRIB)
+\item[{\large\texttt{CDI\_DATATYPE\_PACK24}}]  24 packed bit (only for GRIB)
+\item[{\large\texttt{CDI\_DATATYPE\_FLT32}}]   32 bit floating point
+\item[{\large\texttt{CDI\_DATATYPE\_FLT64}}]   64 bit floating point
+\item[{\large\texttt{CDI\_DATATYPE\_INT8}}]     8 bit integer
+\item[{\large\texttt{CDI\_DATATYPE\_INT16}}]   16 bit integer
+\item[{\large\texttt{CDI\_DATATYPE\_INT32}}]   32 bit integer
 \end{deflist}
 \end{minipage}
 %\vspace*{3mm}
diff --git a/doc/tex/zaxis.tex b/doc/tex/zaxis.tex
index 9ad4b821e5275acde1501a77a2fbbc4d32c674ac..3a783d90352857f11b76b67bd992504a94b01490 100644
--- a/doc/tex/zaxis.tex
+++ b/doc/tex/zaxis.tex
@@ -5,29 +5,29 @@ The following different Z-axis types are available:
 
 \vspace*{3mm}
 \hspace*{8mm}\begin{minipage}{15cm}
-\begin{deflist}{{\large\tt ZAXIS\_SEDIMENT\_BOTTOM\_TW \ \ }}
-\item[{\large\tt ZAXIS\_GENERIC           }]  Generic user defined level
-\item[{\large\tt ZAXIS\_SURFACE           }]  Surface level
-\item[{\large\tt ZAXIS\_MEANSEA          }]  Mean sea level
-\item[{\large\tt ZAXIS\_TOA                  }]  Norminal top of atmosphere
-\item[{\large\tt ZAXIS\_ATMOSPHERE   }]  Entire atmosphere
-\item[{\large\tt ZAXIS\_SEA\_BOTTOM  }]  Sea bottom
-\item[{\large\tt ZAXIS\_ISENTROPIC      }]  Isentropic (theta) level
-\item[{\large\tt ZAXIS\_HYBRID            }]  Hybrid level
-\item[{\large\tt ZAXIS\_SIGMA              }]  Sigma level
-\item[{\large\tt ZAXIS\_PRESSURE          }]  Isobaric pressure level in Pascal
-\item[{\large\tt ZAXIS\_HEIGHT            }]  Height above ground in meters
-\item[{\large\tt ZAXIS\_ALTITUDE          }]  Altitude above mean sea level in meters
-\item[{\large\tt ZAXIS\_CLOUD\_BASE        }]  Cloud base level
-\item[{\large\tt ZAXIS\_CLOUD\_TOP         }]  Level of cloud tops
-\item[{\large\tt ZAXIS\_ISOTHERM\_ZERO    }]  Level of 0$^{\circ}$ C isotherm
-\item[{\large\tt ZAXIS\_SNOW                   }]  Snow level
-\item[{\large\tt ZAXIS\_LAKE\_BOTTOM               }]  Lake or River Bottom
-\item[{\large\tt ZAXIS\_SEDIMENT\_BOTTOM        }]  Bottom Of Sediment Layer
-\item[{\large\tt ZAXIS\_SEDIMENT\_BOTTOM\_TA}]  Bottom Of Thermally Active Sediment Layer
-\item[{\large\tt ZAXIS\_SEDIMENT\_BOTTOM\_TW}]  Bottom Of Sediment Layer Penetrated By Thermal Wave
-\item[{\large\tt ZAXIS\_ZAXIS\_MIX\_LAYER          }]  Mixing Layer
-\item[{\large\tt ZAXIS\_DEPTH\_BELOW\_SEA }]  Depth below sea level in meters
-\item[{\large\tt ZAXIS\_DEPTH\_BELOW\_LAND}]  Depth below land surface in centimeters
+\begin{deflist}{\large\texttt{ZAXIS\_SEDIMENT\_BOTTOM\_TW \ \ }}
+\item[\large\texttt{ZAXIS\_GENERIC           }]  Generic user defined level
+\item[\large\texttt{ZAXIS\_SURFACE           }]  Surface level
+\item[\large\texttt{ZAXIS\_MEANSEA          }]  Mean sea level
+\item[\large\texttt{ZAXIS\_TOA                  }]  Norminal top of atmosphere
+\item[\large\texttt{ZAXIS\_ATMOSPHERE   }]  Entire atmosphere
+\item[\large\texttt{ZAXIS\_SEA\_BOTTOM  }]  Sea bottom
+\item[\large\texttt{ZAXIS\_ISENTROPIC      }]  Isentropic (theta) level
+\item[\large\texttt{ZAXIS\_HYBRID            }]  Hybrid level
+\item[\large\texttt{ZAXIS\_SIGMA              }]  Sigma level
+\item[\large\texttt{ZAXIS\_PRESSURE          }]  Isobaric pressure level in Pascal
+\item[\large\texttt{ZAXIS\_HEIGHT            }]  Height above ground in meters
+\item[\large\texttt{ZAXIS\_ALTITUDE          }]  Altitude above mean sea level in meters
+\item[\large\texttt{ZAXIS\_CLOUD\_BASE        }]  Cloud base level
+\item[\large\texttt{ZAXIS\_CLOUD\_TOP         }]  Level of cloud tops
+\item[\large\texttt{ZAXIS\_ISOTHERM\_ZERO    }]  Level of 0$^{\circ}$ C isotherm
+\item[\large\texttt{ZAXIS\_SNOW                   }]  Snow level
+\item[\large\texttt{ZAXIS\_LAKE\_BOTTOM               }]  Lake or River Bottom
+\item[\large\texttt{ZAXIS\_SEDIMENT\_BOTTOM        }]  Bottom Of Sediment Layer
+\item[\large\texttt{ZAXIS\_SEDIMENT\_BOTTOM\_TA}]  Bottom Of Thermally Active Sediment Layer
+\item[\large\texttt{ZAXIS\_SEDIMENT\_BOTTOM\_TW}]  Bottom Of Sediment Layer Penetrated By Thermal Wave
+\item[\large\texttt{ZAXIS\_ZAXIS\_MIX\_LAYER          }]  Mixing Layer
+\item[\large\texttt{ZAXIS\_DEPTH\_BELOW\_SEA }]  Depth below sea level in meters
+\item[\large\texttt{ZAXIS\_DEPTH\_BELOW\_LAND}]  Depth below land surface in centimeters
 \end{deflist}
 \end{minipage}
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 906edcab0bf34d1fd73a267b897047155ffe2e73..68520694f0cfb7e63bed499546c4a2b3c9e61b53 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -101,6 +101,7 @@ am__aclocal_m4_deps =  \
 	$(top_srcdir)/m4/acx_lt_problems.m4 \
 	$(top_srcdir)/m4/acx_option_search_libs.m4 \
 	$(top_srcdir)/m4/acx_options.m4 \
+	$(top_srcdir)/m4/acx_prog_cc_posix.m4 \
 	$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
 	$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
 	$(top_srcdir)/m4/asx_tr_arg.m4 $(top_srcdir)/m4/asx_unset.m4 \
diff --git a/examples/pio/Makefile.in b/examples/pio/Makefile.in
index 5f27b589a10f670eec89094c1ad771d9a3278b13..cb52b1185ced6ffe3ab55706c56aceaa06ce8c66 100644
--- a/examples/pio/Makefile.in
+++ b/examples/pio/Makefile.in
@@ -102,6 +102,7 @@ am__aclocal_m4_deps =  \
 	$(top_srcdir)/m4/acx_lt_problems.m4 \
 	$(top_srcdir)/m4/acx_option_search_libs.m4 \
 	$(top_srcdir)/m4/acx_options.m4 \
+	$(top_srcdir)/m4/acx_prog_cc_posix.m4 \
 	$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
 	$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
 	$(top_srcdir)/m4/asx_tr_arg.m4 $(top_srcdir)/m4/asx_unset.m4 \
diff --git a/examples/pio/compareResourcesArray.c b/examples/pio/compareResourcesArray.c
index 6d359f02af661b7ca297326fab82750fba112c1a..297d808eeb2bfbc5b8327599d551a0684bd087c0 100644
--- a/examples/pio/compareResourcesArray.c
+++ b/examples/pio/compareResourcesArray.c
@@ -58,14 +58,7 @@ static int defineGrid()
   gridDefYlongname ( gridID, "myYlongname" );
   gridDefYunits ( gridID, "myYunits" );
   gridDefPrec ( gridID, DOUBLE_PRECISION );
-  gridDefXpole ( gridID, 90.0 );
-  gridDefYpole ( gridID, 180.0 );
-  gridDefAngle ( gridID, 360.0 );
   gridDefTrunc ( gridID, 1 );
-  gridDefGMEnd ( gridID, 2 );
-  gridDefGMEni ( gridID, 3 );
-  gridDefGMEni2 ( gridID, 4 );
-  gridDefGMEni3 ( gridID, 5 );
   gridDefNumber ( gridID, 6 );
   gridDefPosition ( gridID, 7 );
   gridDefReference ( gridID, "myReference" );
@@ -146,11 +139,11 @@ static int defineVlist ( int gridID, int zaxisID, int taxisID )
   vlistDefVarName(vlistID, varID1, "varname1");
   {
     int globfac[] = { 23, 42 };
-    vlistDefAttInt(vlistID, varID1, "seer's globule factors", CDI_DATATYPE_INT16,
+    cdiDefAttInt(vlistID, varID1, "seer's globule factors", CDI_DATATYPE_INT16,
                    2, globfac);
   }
   vlistDefVarName(vlistID, varID2, "varname2");
-  vlistDefAttTxt(vlistID, varID2, "txt demo", 6, "banana");
+  cdiDefAttTxt(vlistID, varID2, "txt demo", 6, "banana");
   vlistDefTaxis(vlistID, taxisID);
   return vlistID;
 }
diff --git a/interfaces/Makefile.in b/interfaces/Makefile.in
index 49bc17892e09fdd44e4e509b88fd988c54a02bd0..f52e8ec08018d34b4311f6d94410d55eded8810a 100644
--- a/interfaces/Makefile.in
+++ b/interfaces/Makefile.in
@@ -108,6 +108,7 @@ am__aclocal_m4_deps =  \
 	$(top_srcdir)/m4/acx_lt_problems.m4 \
 	$(top_srcdir)/m4/acx_option_search_libs.m4 \
 	$(top_srcdir)/m4/acx_options.m4 \
+	$(top_srcdir)/m4/acx_prog_cc_posix.m4 \
 	$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
 	$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
 	$(top_srcdir)/m4/asx_tr_arg.m4 $(top_srcdir)/m4/asx_unset.m4 \
diff --git a/m4/acx_options.m4 b/m4/acx_options.m4
index 58ca0f42b6ba492c8dfb42f22b51007403e78eb1..44fe876f0b700fd820fe5072a5f29e6fdba02400 100644
--- a/m4/acx_options.m4
+++ b/m4/acx_options.m4
@@ -266,6 +266,19 @@ AC_ARG_ENABLE([all-static],
               [enable_all_static=no])
 AC_MSG_RESULT([$enable_all_static])
 AM_CONDITIONAL([ENABLE_ALL_STATIC],[test x$enable_all_static = 'xyes'])
+#  ----------------------------------------------------------------------
+#  Build CDO with HIRLAM extensions
+AC_MSG_CHECKING([for HIRLAM extensions])
+AC_ARG_ENABLE([hirlam-extensions],
+              [AS_HELP_STRING([--enable-hirlam-extensions],[HIRLAM extensions [default=no]])],
+              [AS_IF([test "x$enable_hirlam_extensions" != "xno"],
+                    [AC_DEFINE(HIRLAM_EXTENSIONS,[1],[Define to 1 for HIRLAM extensions])
+                     enable_hirlam_extensions=yes],
+                    [enable_hirlam_extensions=no])],
+              [enable_hirlam_extensions=no])
+AC_MSG_RESULT([$enable_hirlam_extensions])
+AM_CONDITIONAL([ENABLE_HIRLAM_EXTENSIONS],[test x$enable_hirlam_extensions = 'xyes'])
+#
 ])
 dnl
 dnl Local Variables:
diff --git a/m4/acx_prog_cc_posix.m4 b/m4/acx_prog_cc_posix.m4
new file mode 100644
index 0000000000000000000000000000000000000000..fc3a37f6f1d4ea7ee925d03961354a14af7891ab
--- /dev/null
+++ b/m4/acx_prog_cc_posix.m4
@@ -0,0 +1,71 @@
+dnl acx_prog_cc_posix.m4 --- test whether _POSIX_VERSION is defined
+dnl
+dnl Copyright  (C)  2017  Thomas Jahns <jahns@dkrz.de>
+dnl
+dnl Version: 1.0
+dnl Keywords:
+dnl Author: Thomas Jahns <jahns@dkrz.de>
+dnl Maintainer: Thomas Jahns <jahns@dkrz.de>
+dnl URL: https://www.dkrz.de/redmine/projects/show/scales-ppm
+dnl
+dnl Redistribution and use in source and binary forms, with or without
+dnl modification, are  permitted provided that the following conditions are
+dnl met:
+dnl
+dnl Redistributions of source code must retain the above copyright notice,
+dnl this list of conditions and the following disclaimer.
+dnl
+dnl Redistributions in binary form must reproduce the above copyright
+dnl notice, this list of conditions and the following disclaimer in the
+dnl documentation and/or other materials provided with the distribution.
+dnl
+dnl Neither the name of the DKRZ GmbH nor the names of its contributors
+dnl may be used to endorse or promote products derived from this software
+dnl without specific prior written permission.
+dnl
+dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+dnl IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+dnl TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+dnl PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+dnl OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+dnl EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+dnl PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+dnl PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+dnl LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+dnl NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+dnl SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+dnl
+dnl ACX_PROG_CC_POSIX([VERSION])
+dnl Test if compiler is defining _POSIX_VERSION correctly to at least
+dnl the numeral corresponding to VERSION. Supported values for
+dnl version:
+dnl     1988, 1990, 1996, 2001, 2008
+dnl
+AC_DEFUN([ACX_PROG_CC_POSIX],
+  [m4_case([$1],
+     [1988],[acx_prog_cc_posix_version_value=198808
+             acx_prog_cc_posix_version_print="POSIX.1-1988"],
+     [1990],[acx_prog_cc_posix_version_value=199009
+             acx_prog_cc_posix_version_print="POSIX.1-1990"],
+     [1996],[acx_prog_cc_posix_version_value=199506L
+             acx_prog_cc_posix_version_print="POSIX.1-1996"],
+     [2001],[acx_prog_cc_posix_version_value=200112
+             acx_prog_cc_posix_version_print="POSIX.1-2001"],
+     [2008],[acx_prog_cc_posix_version_value=200809
+             acx_prog_cc_posix_version_print="POSIX.1-2008"],
+     [m4_fatal([Unexpected POSIX version argument])])
+   AC_LANG_PUSH([C])
+   AS_VAR_PUSHDEF([acx_cv_cc_posix_support],[acx_cv_cc_posix_support]$1)
+   AC_CACHE_CHECK([For conformance to ${acx_prog_cc_posix_version_print}.],
+     [acx_cv_cc_posix_support],
+     [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([@%:@include <unistd.h>],
+        [  int n@<:@(_POSIX_VERSION >= ${acx_prog_cc_posix_version_value}L) * 2 - 1@:>@;])],
+        [AS_VAR_SET([acx_cv_cc_posix_support],[yes])],
+        [AS_VAR_SET([acx_cv_cc_posix_support],[no])])])
+   AS_VAR_IF([acx_cv_cc_posix_support],[no],
+     [AC_MSG_NOTICE(
+[It seems your system does not define _POSIX_VERSION to a value
+greater-or-equal ${acx_prog_cc_posix_version_value}. This is typically the case when the
+compiler is instructed to make ISO C features available only,
+e.g. when using gcc -std=c99])
+      AC_MSG_FAILURE([${acx_prog_cc_posix_version_print} profile required])])])
diff --git a/src/Makefile.in b/src/Makefile.in
index be115a80ebafb926b136c7920686d5963e4ee8e5..8d724bdd6beaa406f78234f941d4262a2068d14d 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -117,6 +117,7 @@ am__aclocal_m4_deps =  \
 	$(top_srcdir)/m4/acx_lt_problems.m4 \
 	$(top_srcdir)/m4/acx_option_search_libs.m4 \
 	$(top_srcdir)/m4/acx_options.m4 \
+	$(top_srcdir)/m4/acx_prog_cc_posix.m4 \
 	$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
 	$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
 	$(top_srcdir)/m4/asx_tr_arg.m4 $(top_srcdir)/m4/asx_unset.m4 \
diff --git a/src/binary.h b/src/binary.h
index 26a0a6da37b69afe108205636263250579754494..f76f721d1227125e9343e984fdf2f139271f1a4c 100644
--- a/src/binary.h
+++ b/src/binary.h
@@ -1,5 +1,5 @@
-#ifndef _BINARY_H
-#define _BINARY_H
+#ifndef BINARY_H
+#define BINARY_H
 
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
@@ -41,7 +41,7 @@ int binReadFlt64(int fileID, int byteswap, size_t size, FLT64 *ptr);
 int binWriteFlt32(int fileID, int byteswap, size_t size, FLT32 *ptr);
 int binWriteFlt64(int fileID, int byteswap, size_t size, FLT64 *ptr);
 
-#endif  /* _BINARY_H */
+#endif  /* BINARY_H */
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/src/calendar.c b/src/calendar.c
index a40a65c43e1d8219814a20582e0e7e73651d8615..8ade92acd443c7d9e53fd0a9c22db084b6f65dcf 100644
--- a/src/calendar.c
+++ b/src/calendar.c
@@ -7,9 +7,9 @@
 #include "timebase.h"
 
 
-static int month_360[12] = {30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30};
-static int month_365[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
-static int month_366[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
+static const int month_360[12] = {30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30};
+static const int month_365[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
+static const int month_366[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
 
 
 int calendar_dpy(int calendar)
@@ -26,9 +26,9 @@ int calendar_dpy(int calendar)
 
 int days_per_month(int calendar, int year, int month)
 {
-  int *dpm = NULL;
   int daysperyear = calendar_dpy(calendar);
 
+  const int *dpm;
   if      ( daysperyear == 360 ) dpm = month_360;
   else if ( daysperyear == 365 ) dpm = month_365;
   else                           dpm = month_366;
@@ -73,11 +73,11 @@ int days_per_year(int calendar, int year)
 static void decode_day(int dpy, int days, int *year, int *month, int *day)
 {
   int i = 0;
-  int *dpm = NULL;
 
   *year = (days-1) / dpy;
   days -= (*year*dpy);
 
+  const int *dpm = NULL;
   if      ( dpy == 360 ) dpm = month_360;
   else if ( dpy == 365 ) dpm = month_365;
   else if ( dpy == 366 ) dpm = month_366;
@@ -96,9 +96,9 @@ static void decode_day(int dpy, int days, int *year, int *month, int *day)
 
 static int encode_day(int dpy, int year, int month, int day)
 {
-  int *dpm = NULL;
   long rval = (long)dpy * year + day;
 
+  const int *dpm = NULL;
   if      ( dpy == 360 ) dpm = month_360;
   else if ( dpy == 365 ) dpm = month_365;
   else if ( dpy == 366 ) dpm = month_366;
diff --git a/src/cdf_int.c b/src/cdf_int.c
index 65f83e865d847802a783d5542c132f78f23438b5..cfc3574a1816b045ae5f140a5fc98e276e1c9f52 100644
--- a/src/cdf_int.c
+++ b/src/cdf_int.c
@@ -771,6 +771,15 @@ void cdf_inq_attid(int ncid, int varid, const char *name, int *attnump)
   if ( status != NC_NOERR ) Error("%s", nc_strerror(status));
 }
 
+
+#if  defined  (HAVE_NETCDF4)
+void cdf_def_var_chunking(int ncid, int varid, int storage, const size_t *chunksizesp)
+{
+  int status = nc_def_var_chunking(ncid, varid, storage, chunksizesp);
+  if ( status != NC_NOERR ) Error("%s", nc_strerror(status));
+}
+#endif
+
 #endif
 /*
  * Local Variables:
diff --git a/src/cdf_int.h b/src/cdf_int.h
index 91de788839a602f394a646214c11729857d63304..d4dfd0fcbc47a96edd3425860e567280ae739e71 100644
--- a/src/cdf_int.h
+++ b/src/cdf_int.h
@@ -85,6 +85,8 @@ void cdf_inq_attlen (int ncid, int varid, const char *name, size_t *lenp);
 void cdf_inq_attname(int ncid, int varid, int attnum, char *name);
 void cdf_inq_attid  (int ncid, int varid, const char *name, int *attnump);
 
+void cdf_def_var_chunking(int ncid, int varid, int storage, const size_t *chunksizesp);
+
 typedef int (*cdi_nc__create_funcp)(const char *path, int cmode,
                                     size_t initialsz, size_t *chunksizehintp,
                                     int *ncidp);
diff --git a/src/cdf_lazy_grid.c b/src/cdf_lazy_grid.c
index 37bdabd67fbbc5a689a97e4f8dd64882769bb668..d287df27271dc418672807ed20e462045187772e 100644
--- a/src/cdf_lazy_grid.c
+++ b/src/cdf_lazy_grid.c
@@ -2,6 +2,7 @@
 #include "config.h"
 #endif
 
+#ifdef HAVE_LIBNETCDF
 #include "stream_cdf.h"
 #include "cdf_lazy_grid.h"
 
@@ -28,7 +29,6 @@ static bool cdfLazyInitialized;
 #endif
 
 
-#ifdef HAVE_LIBNETCDF
 
 void cdfLazyGridDestroy(struct cdfLazyGrid *lazyGrid)
 {
diff --git a/src/cdf_util.c b/src/cdf_util.c
index 5ed8afa7e4c156bdf2ea498765a0131faea1610a..c0a93e7804366f4855159b86b9b3411989bdb94e 100644
--- a/src/cdf_util.c
+++ b/src/cdf_util.c
@@ -94,14 +94,11 @@ bool is_timeaxis_units(const char *timeunits)
 
 bool is_height_units(const char *units)
 {
-  bool status = false;
   int u0 = units[0];
 
-  if ( (u0=='m' && (!units[1] || strncmp(units, "meter", 5) == 0)) ||
-       (!units[2] && units[1]=='m' && (u0=='c' || u0=='d' || u0=='k')) )
-    {
-      status = true;
-    }
+  bool status
+    = (u0=='m' && (!units[1] || strncmp(units, "meter", 5) == 0))
+    || (!units[2] && units[1]=='m' && (u0=='c' || u0=='d' || u0=='k'));
 
   return status;
 }
@@ -192,9 +189,9 @@ bool is_lon_axis(const char *units, const char *stdname)
     {
       status = true;
     }
-
-  if ( status == false && str_is_equal(lc_units, "degree") &&
-       !str_is_equal(stdname, "grid_latitude") && !str_is_equal(stdname, "latitude") )
+  else if ( str_is_equal(lc_units, "degree")
+            && !str_is_equal(stdname, "grid_latitude")
+            && !str_is_equal(stdname, "latitude") )
     {
       int ioff = 6;
       if ( lc_units[ioff] == 's' ) ioff++;
@@ -220,9 +217,9 @@ bool is_lat_axis(const char *units, const char *stdname)
     {
       status = true;
     }
-
-  if ( status == false && str_is_equal(lc_units, "degree") &&
-       !str_is_equal(stdname, "grid_longitude") && !str_is_equal(stdname, "longitude") )
+  else if ( str_is_equal(lc_units, "degree")
+            && !str_is_equal(stdname, "grid_longitude")
+            && !str_is_equal(stdname, "longitude") )
     {
       int ioff = 6;
       if ( lc_units[ioff] == 's' ) ioff++;
diff --git a/src/cdf_write.c b/src/cdf_write.c
index 8d94bffbe36d49cdbfc0e23f455d09358176c85a..7ee19b624711dcbd1589295c41903d8acb046792 100644
--- a/src/cdf_write.c
+++ b/src/cdf_write.c
@@ -327,7 +327,6 @@ int cdfDefVar(stream_t *streamptr, int varID)
   size_t iax = 0;
   char axis[5];
   int ensID, ensCount, forecast_type;
-  int retval;
 
   int fileID  = streamptr->fileID;
 
@@ -350,8 +349,8 @@ int cdfDefVar(stream_t *streamptr, int varID)
 
   vlistInqVarDimorder(vlistID, varID, &dimorder);
 
-  int gridsize  = gridInqSize(gridID);
-  bool lchunk = (gridsize > 1);
+  size_t gridsize  = (size_t)(gridInqSize(gridID));
+  bool lchunk = (gridsize >= 16);
   int gridtype  = gridInqType(gridID);
   int gridindex = nc_grid_index(streamptr, gridID);
   if ( gridtype != GRID_TRAJECTORY )
@@ -395,6 +394,7 @@ int cdfDefVar(stream_t *streamptr, int varID)
   if ( xid != CDI_UNDEFID ) chunks[ndims] = xsize;
   if ( xid != CDI_UNDEFID ) dims[ndims++] = xid;
   */
+  size_t chunk_size_max = 65536;
   for ( int id = 0; id < 3; ++id )
     {
       if ( dimorder[id] == 3 && zid != CDI_UNDEFID )
@@ -406,16 +406,19 @@ int cdfDefVar(stream_t *streamptr, int varID)
         }
       else if ( dimorder[id] == 2 && yid != CDI_UNDEFID )
         {
-          if ( chunktype == CDI_CHUNK_LINES )
-            chunks[ndims] = 1;
+          if ( chunktype == CDI_CHUNK_AUTO )
+            chunks[ndims] = (chunk_size_max > gridsize) ? ysize : chunk_size_max/xsize;
           else
-            chunks[ndims] = ysize;
+            chunks[ndims] = (chunktype == CDI_CHUNK_LINES) ? 1 : ysize;
           dims[ndims] = yid;
           ndims++;
         }
       else if ( dimorder[id] == 1 && xid != CDI_UNDEFID )
         {
-          chunks[ndims] = xsize;
+          if ( chunktype == CDI_CHUNK_AUTO && yid == CDI_UNDEFID )
+            chunks[ndims] = (chunk_size_max > xsize) ? xsize : chunk_size_max;
+          else
+            chunks[ndims] = xsize;
           dims[ndims] = xid;
           ndims++;
         }
@@ -504,14 +507,7 @@ int cdfDefVar(stream_t *streamptr, int varID)
 
 #if  defined  (HAVE_NETCDF4)
   if ( lchunk && (streamptr->filetype == CDI_FILETYPE_NC4 || streamptr->filetype == CDI_FILETYPE_NC4C) )
-    {
-      if ( chunktype == CDI_CHUNK_AUTO )
-        retval = nc_def_var_chunking(fileID, ncvarid, NC_CHUNKED, NULL);
-      else
-        retval = nc_def_var_chunking(fileID, ncvarid, NC_CHUNKED, chunks);
-
-      if ( retval ) Error("nc_def_var_chunking failed, status = %d", retval);
-    }
+    cdf_def_var_chunking(fileID, ncvarid, NC_CHUNKED, chunks);
 #endif
 
   if ( streamptr->comptype == CDI_COMPRESS_ZIP )
@@ -656,14 +652,12 @@ int cdfDefVar(stream_t *streamptr, int varID)
 
   /*  if ( xtype == NC_BYTE || xtype == NC_SHORT || xtype == NC_INT ) */
     {
-      int laddoffset, lscalefactor;
-      double addoffset, scalefactor;
       int astype = NC_DOUBLE;
 
-      addoffset    = vlistInqVarAddoffset(vlistID, varID);
-      scalefactor  = vlistInqVarScalefactor(vlistID, varID);
-      laddoffset   = IS_NOT_EQUAL(addoffset, 0);
-      lscalefactor = IS_NOT_EQUAL(scalefactor, 1);
+      double addoffset   = vlistInqVarAddoffset(vlistID, varID);
+      double scalefactor = vlistInqVarScalefactor(vlistID, varID);
+      bool laddoffset   = IS_NOT_EQUAL(addoffset, 0);
+      bool lscalefactor = IS_NOT_EQUAL(scalefactor, 1);
 
       if ( laddoffset || lscalefactor )
         {
@@ -960,8 +954,7 @@ void cdf_write_var(stream_t *streamptr, int varID, int memtype, const void *data
   size_t start[5];
   size_t count[5];
   bool swapxy = false;
-  int ndims = 0;
-  int idim;
+  size_t ndims = 0;
 
   if ( CDI_Debug ) Message("streamID = %d  varID = %d", streamptr->self, varID);
 
@@ -1027,7 +1020,7 @@ void cdf_write_var(stream_t *streamptr, int varID, int memtype, const void *data
     }
 
   if ( CDI_Debug )
-    for (idim = 0; idim < ndims; idim++)
+    for (size_t idim = 0; idim < ndims; idim++)
       Message("dim = %d  start = %d  count = %d", idim, start[idim], count[idim]);
 
   if ( streamptr->ncmode == 1 )
@@ -1056,8 +1049,7 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
   size_t start[5];
   size_t count[5];
   bool swapxy = false;
-  int ndims = 0;
-  int idim;
+  size_t ndims = 0;
   int streamID = streamptr->self;
 
   if ( CDI_Debug )
@@ -1129,7 +1121,7 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
     }
 
   if ( CDI_Debug )
-    for (idim = 0; idim < ndims; idim++)
+    for (size_t idim = 0; idim < ndims; idim++)
       Message("dim = %d  start = %d  count = %d", idim, start[idim], count[idim]);
 
   if ( streamptr->ncmode == 1 )
diff --git a/src/cdi.h b/src/cdi.h
index c9cc8cb70ccc5acaea58151664ad622ab0be5494..67a378c35ba71edb926d1dbfc1540bab425bb3fe 100644
--- a/src/cdi.h
+++ b/src/cdi.h
@@ -932,8 +932,8 @@ void    gridDefParamGME(int gridID, int nd, int ni, int ni2, int ni3);
 void    gridInqParamGME(int gridID, int *nd, int *ni, int *ni2, int *ni3);
 
   /* Lambert Conformal Conic grid (GRIB version) */
-void    gridDefParamLCC(int gridID, double originLon, double originLat, double lonParY, double lat1, double lat2, double xinc, double yinc, int projflag, int scanflag);
-void    gridInqParamLCC(int gridID, double *originLon, double *originLat, double *lonParY, double *lat1, double *lat2, double *xinc, double *yinc, int *projflag, int *scanflag);
+void gridDefParamLCC(int gridID, double missval, double lon_0, double lat_0, double lat_1, double lat_2, double a, double rf, double xval_0, double yval_0, double x_0, double y_0);
+int gridInqParamLCC(int gridID, double missval, double *lon_0, double *lat_0, double *lat_1, double *lat_2, double *a, double *rf, double *xval_0, double *yval_0, double *x_0, double *y_0);
 
 void    gridDefArea(int gridID, const double area[]);
 void    gridInqArea(int gridID, double area[]);
@@ -964,6 +964,12 @@ void    gridChangeType(int gridID, int gridtype);
 void    gridDefComplexPacking(int gridID, int lpack);
 int     gridInqComplexPacking(int gridID);
 
+void    gridDefUvRelativeToGrid(int gridID, int uvRelativeToGrid);
+int     gridInqUvRelativeToGrid(int gridID);
+
+void    gridDefScanningMode(int gridID, int mode);
+int     gridInqScanningMode(int gridID);
+
 /* ZAXIS routines */
 
 void    zaxisName(int zaxistype, char *zaxisname);
diff --git a/src/cdi.inc b/src/cdi.inc
index 103b388686ecff859c1918cc9977cec917057c31..8be02f8d6909863013733aebd4e5b31068d6f6cf 100644
--- a/src/cdi.inc
+++ b/src/cdi.inc
@@ -1,341 +1,341 @@
 ! This file was automatically generated, don't edit!
 !
-! Fortran interface for CDI library version 1.8.0
+! Fortran interface for CDI library version 1.8.1
 !
 ! Author:
 ! -------
-! Uwe Schulzweida, MPI-MET, Hamburg,   February 2017
+! Uwe Schulzweida, MPI-MET, Hamburg,   April 2017
 !
 
-      INTEGER    CDI_MAX_NAME          
+      INTEGER    CDI_MAX_NAME
       PARAMETER (CDI_MAX_NAME           = 256)
-      INTEGER    CDI_UNDEFID           
+      INTEGER    CDI_UNDEFID
       PARAMETER (CDI_UNDEFID            = -1)
-      INTEGER    CDI_GLOBAL            
+      INTEGER    CDI_GLOBAL
       PARAMETER (CDI_GLOBAL             = -1)
 !
 !  Byte order
 !
-      INTEGER    CDI_BIGENDIAN         
+      INTEGER    CDI_BIGENDIAN
       PARAMETER (CDI_BIGENDIAN          =  0)
-      INTEGER    CDI_LITTLEENDIAN      
+      INTEGER    CDI_LITTLEENDIAN
       PARAMETER (CDI_LITTLEENDIAN       =  1)
-      INTEGER    CDI_PDPENDIAN         
+      INTEGER    CDI_PDPENDIAN
       PARAMETER (CDI_PDPENDIAN          =  2)
-      INTEGER    CDI_REAL              
+      INTEGER    CDI_REAL
       PARAMETER (CDI_REAL               =  1)
-      INTEGER    CDI_COMP              
+      INTEGER    CDI_COMP
       PARAMETER (CDI_COMP               =  2)
-      INTEGER    CDI_BOTH              
+      INTEGER    CDI_BOTH
       PARAMETER (CDI_BOTH               =  3)
 !
 !  Error identifier
 !
-      INTEGER    CDI_NOERR             
+      INTEGER    CDI_NOERR
       PARAMETER (CDI_NOERR              =  0)
-      INTEGER    CDI_EEOF              
+      INTEGER    CDI_EEOF
       PARAMETER (CDI_EEOF               = -1)
-      INTEGER    CDI_ESYSTEM           
+      INTEGER    CDI_ESYSTEM
       PARAMETER (CDI_ESYSTEM            = -10)
-      INTEGER    CDI_EINVAL            
+      INTEGER    CDI_EINVAL
       PARAMETER (CDI_EINVAL             = -20)
-      INTEGER    CDI_EUFTYPE           
+      INTEGER    CDI_EUFTYPE
       PARAMETER (CDI_EUFTYPE            = -21)
-      INTEGER    CDI_ELIBNAVAIL        
+      INTEGER    CDI_ELIBNAVAIL
       PARAMETER (CDI_ELIBNAVAIL         = -22)
-      INTEGER    CDI_EUFSTRUCT         
+      INTEGER    CDI_EUFSTRUCT
       PARAMETER (CDI_EUFSTRUCT          = -23)
-      INTEGER    CDI_EUNC4             
+      INTEGER    CDI_EUNC4
       PARAMETER (CDI_EUNC4              = -24)
-      INTEGER    CDI_ELIMIT            
+      INTEGER    CDI_ELIMIT
       PARAMETER (CDI_ELIMIT             = -99)
 !
 !  File types
 !
-      INTEGER    CDI_FILETYPE_GRB      
+      INTEGER    CDI_FILETYPE_GRB
       PARAMETER (CDI_FILETYPE_GRB       =  1)
-      INTEGER    CDI_FILETYPE_GRB2     
+      INTEGER    CDI_FILETYPE_GRB2
       PARAMETER (CDI_FILETYPE_GRB2      =  2)
-      INTEGER    CDI_FILETYPE_NC       
+      INTEGER    CDI_FILETYPE_NC
       PARAMETER (CDI_FILETYPE_NC        =  3)
-      INTEGER    CDI_FILETYPE_NC2      
+      INTEGER    CDI_FILETYPE_NC2
       PARAMETER (CDI_FILETYPE_NC2       =  4)
-      INTEGER    CDI_FILETYPE_NC4      
+      INTEGER    CDI_FILETYPE_NC4
       PARAMETER (CDI_FILETYPE_NC4       =  5)
-      INTEGER    CDI_FILETYPE_NC4C     
+      INTEGER    CDI_FILETYPE_NC4C
       PARAMETER (CDI_FILETYPE_NC4C      =  6)
-      INTEGER    CDI_FILETYPE_SRV      
+      INTEGER    CDI_FILETYPE_SRV
       PARAMETER (CDI_FILETYPE_SRV       =  7)
-      INTEGER    CDI_FILETYPE_EXT      
+      INTEGER    CDI_FILETYPE_EXT
       PARAMETER (CDI_FILETYPE_EXT       =  8)
-      INTEGER    CDI_FILETYPE_IEG      
+      INTEGER    CDI_FILETYPE_IEG
       PARAMETER (CDI_FILETYPE_IEG       =  9)
-      INTEGER    FILETYPE_GRB          
+      INTEGER    FILETYPE_GRB
       PARAMETER (FILETYPE_GRB           =  1)
-      INTEGER    FILETYPE_GRB2         
+      INTEGER    FILETYPE_GRB2
       PARAMETER (FILETYPE_GRB2          =  2)
-      INTEGER    FILETYPE_NC           
+      INTEGER    FILETYPE_NC
       PARAMETER (FILETYPE_NC            =  3)
-      INTEGER    FILETYPE_NC2          
+      INTEGER    FILETYPE_NC2
       PARAMETER (FILETYPE_NC2           =  4)
-      INTEGER    FILETYPE_NC4          
+      INTEGER    FILETYPE_NC4
       PARAMETER (FILETYPE_NC4           =  5)
-      INTEGER    FILETYPE_NC4C         
+      INTEGER    FILETYPE_NC4C
       PARAMETER (FILETYPE_NC4C          =  6)
-      INTEGER    FILETYPE_SRV          
+      INTEGER    FILETYPE_SRV
       PARAMETER (FILETYPE_SRV           =  7)
-      INTEGER    FILETYPE_EXT          
+      INTEGER    FILETYPE_EXT
       PARAMETER (FILETYPE_EXT           =  8)
-      INTEGER    FILETYPE_IEG          
+      INTEGER    FILETYPE_IEG
       PARAMETER (FILETYPE_IEG           =  9)
 !
 !  Compress types
 !
-      INTEGER    CDI_COMPRESS_NONE     
+      INTEGER    CDI_COMPRESS_NONE
       PARAMETER (CDI_COMPRESS_NONE      =  0)
-      INTEGER    CDI_COMPRESS_SZIP     
+      INTEGER    CDI_COMPRESS_SZIP
       PARAMETER (CDI_COMPRESS_SZIP      =  1)
-      INTEGER    CDI_COMPRESS_GZIP     
+      INTEGER    CDI_COMPRESS_GZIP
       PARAMETER (CDI_COMPRESS_GZIP      =  2)
-      INTEGER    CDI_COMPRESS_BZIP2    
+      INTEGER    CDI_COMPRESS_BZIP2
       PARAMETER (CDI_COMPRESS_BZIP2     =  3)
-      INTEGER    CDI_COMPRESS_ZIP      
+      INTEGER    CDI_COMPRESS_ZIP
       PARAMETER (CDI_COMPRESS_ZIP       =  4)
-      INTEGER    CDI_COMPRESS_JPEG     
+      INTEGER    CDI_COMPRESS_JPEG
       PARAMETER (CDI_COMPRESS_JPEG      =  5)
 !
 !  external data types
 !
-      INTEGER    CDI_DATATYPE_PACK     
+      INTEGER    CDI_DATATYPE_PACK
       PARAMETER (CDI_DATATYPE_PACK      =  0)
-      INTEGER    CDI_DATATYPE_PACK1    
+      INTEGER    CDI_DATATYPE_PACK1
       PARAMETER (CDI_DATATYPE_PACK1     =  1)
-      INTEGER    CDI_DATATYPE_PACK2    
+      INTEGER    CDI_DATATYPE_PACK2
       PARAMETER (CDI_DATATYPE_PACK2     =  2)
-      INTEGER    CDI_DATATYPE_PACK3    
+      INTEGER    CDI_DATATYPE_PACK3
       PARAMETER (CDI_DATATYPE_PACK3     =  3)
-      INTEGER    CDI_DATATYPE_PACK4    
+      INTEGER    CDI_DATATYPE_PACK4
       PARAMETER (CDI_DATATYPE_PACK4     =  4)
-      INTEGER    CDI_DATATYPE_PACK5    
+      INTEGER    CDI_DATATYPE_PACK5
       PARAMETER (CDI_DATATYPE_PACK5     =  5)
-      INTEGER    CDI_DATATYPE_PACK6    
+      INTEGER    CDI_DATATYPE_PACK6
       PARAMETER (CDI_DATATYPE_PACK6     =  6)
-      INTEGER    CDI_DATATYPE_PACK7    
+      INTEGER    CDI_DATATYPE_PACK7
       PARAMETER (CDI_DATATYPE_PACK7     =  7)
-      INTEGER    CDI_DATATYPE_PACK8    
+      INTEGER    CDI_DATATYPE_PACK8
       PARAMETER (CDI_DATATYPE_PACK8     =  8)
-      INTEGER    CDI_DATATYPE_PACK9    
+      INTEGER    CDI_DATATYPE_PACK9
       PARAMETER (CDI_DATATYPE_PACK9     =  9)
-      INTEGER    CDI_DATATYPE_PACK10   
+      INTEGER    CDI_DATATYPE_PACK10
       PARAMETER (CDI_DATATYPE_PACK10    = 10)
-      INTEGER    CDI_DATATYPE_PACK11   
+      INTEGER    CDI_DATATYPE_PACK11
       PARAMETER (CDI_DATATYPE_PACK11    = 11)
-      INTEGER    CDI_DATATYPE_PACK12   
+      INTEGER    CDI_DATATYPE_PACK12
       PARAMETER (CDI_DATATYPE_PACK12    = 12)
-      INTEGER    CDI_DATATYPE_PACK13   
+      INTEGER    CDI_DATATYPE_PACK13
       PARAMETER (CDI_DATATYPE_PACK13    = 13)
-      INTEGER    CDI_DATATYPE_PACK14   
+      INTEGER    CDI_DATATYPE_PACK14
       PARAMETER (CDI_DATATYPE_PACK14    = 14)
-      INTEGER    CDI_DATATYPE_PACK15   
+      INTEGER    CDI_DATATYPE_PACK15
       PARAMETER (CDI_DATATYPE_PACK15    = 15)
-      INTEGER    CDI_DATATYPE_PACK16   
+      INTEGER    CDI_DATATYPE_PACK16
       PARAMETER (CDI_DATATYPE_PACK16    = 16)
-      INTEGER    CDI_DATATYPE_PACK17   
+      INTEGER    CDI_DATATYPE_PACK17
       PARAMETER (CDI_DATATYPE_PACK17    = 17)
-      INTEGER    CDI_DATATYPE_PACK18   
+      INTEGER    CDI_DATATYPE_PACK18
       PARAMETER (CDI_DATATYPE_PACK18    = 18)
-      INTEGER    CDI_DATATYPE_PACK19   
+      INTEGER    CDI_DATATYPE_PACK19
       PARAMETER (CDI_DATATYPE_PACK19    = 19)
-      INTEGER    CDI_DATATYPE_PACK20   
+      INTEGER    CDI_DATATYPE_PACK20
       PARAMETER (CDI_DATATYPE_PACK20    = 20)
-      INTEGER    CDI_DATATYPE_PACK21   
+      INTEGER    CDI_DATATYPE_PACK21
       PARAMETER (CDI_DATATYPE_PACK21    = 21)
-      INTEGER    CDI_DATATYPE_PACK22   
+      INTEGER    CDI_DATATYPE_PACK22
       PARAMETER (CDI_DATATYPE_PACK22    = 22)
-      INTEGER    CDI_DATATYPE_PACK23   
+      INTEGER    CDI_DATATYPE_PACK23
       PARAMETER (CDI_DATATYPE_PACK23    = 23)
-      INTEGER    CDI_DATATYPE_PACK24   
+      INTEGER    CDI_DATATYPE_PACK24
       PARAMETER (CDI_DATATYPE_PACK24    = 24)
-      INTEGER    CDI_DATATYPE_PACK25   
+      INTEGER    CDI_DATATYPE_PACK25
       PARAMETER (CDI_DATATYPE_PACK25    = 25)
-      INTEGER    CDI_DATATYPE_PACK26   
+      INTEGER    CDI_DATATYPE_PACK26
       PARAMETER (CDI_DATATYPE_PACK26    = 26)
-      INTEGER    CDI_DATATYPE_PACK27   
+      INTEGER    CDI_DATATYPE_PACK27
       PARAMETER (CDI_DATATYPE_PACK27    = 27)
-      INTEGER    CDI_DATATYPE_PACK28   
+      INTEGER    CDI_DATATYPE_PACK28
       PARAMETER (CDI_DATATYPE_PACK28    = 28)
-      INTEGER    CDI_DATATYPE_PACK29   
+      INTEGER    CDI_DATATYPE_PACK29
       PARAMETER (CDI_DATATYPE_PACK29    = 29)
-      INTEGER    CDI_DATATYPE_PACK30   
+      INTEGER    CDI_DATATYPE_PACK30
       PARAMETER (CDI_DATATYPE_PACK30    = 30)
-      INTEGER    CDI_DATATYPE_PACK31   
+      INTEGER    CDI_DATATYPE_PACK31
       PARAMETER (CDI_DATATYPE_PACK31    = 31)
-      INTEGER    CDI_DATATYPE_PACK32   
+      INTEGER    CDI_DATATYPE_PACK32
       PARAMETER (CDI_DATATYPE_PACK32    = 32)
-      INTEGER    CDI_DATATYPE_CPX32    
+      INTEGER    CDI_DATATYPE_CPX32
       PARAMETER (CDI_DATATYPE_CPX32     = 64)
-      INTEGER    CDI_DATATYPE_CPX64    
+      INTEGER    CDI_DATATYPE_CPX64
       PARAMETER (CDI_DATATYPE_CPX64     = 128)
-      INTEGER    CDI_DATATYPE_FLT32    
+      INTEGER    CDI_DATATYPE_FLT32
       PARAMETER (CDI_DATATYPE_FLT32     = 132)
-      INTEGER    CDI_DATATYPE_FLT64    
+      INTEGER    CDI_DATATYPE_FLT64
       PARAMETER (CDI_DATATYPE_FLT64     = 164)
-      INTEGER    CDI_DATATYPE_INT8     
+      INTEGER    CDI_DATATYPE_INT8
       PARAMETER (CDI_DATATYPE_INT8      = 208)
-      INTEGER    CDI_DATATYPE_INT16    
+      INTEGER    CDI_DATATYPE_INT16
       PARAMETER (CDI_DATATYPE_INT16     = 216)
-      INTEGER    CDI_DATATYPE_INT32    
+      INTEGER    CDI_DATATYPE_INT32
       PARAMETER (CDI_DATATYPE_INT32     = 232)
-      INTEGER    CDI_DATATYPE_UINT8    
+      INTEGER    CDI_DATATYPE_UINT8
       PARAMETER (CDI_DATATYPE_UINT8     = 308)
-      INTEGER    CDI_DATATYPE_UINT16   
+      INTEGER    CDI_DATATYPE_UINT16
       PARAMETER (CDI_DATATYPE_UINT16    = 316)
-      INTEGER    CDI_DATATYPE_UINT32   
+      INTEGER    CDI_DATATYPE_UINT32
       PARAMETER (CDI_DATATYPE_UINT32    = 332)
-      INTEGER    DATATYPE_PACK         
+      INTEGER    DATATYPE_PACK
       PARAMETER (DATATYPE_PACK          =  0)
-      INTEGER    DATATYPE_PACK8        
+      INTEGER    DATATYPE_PACK8
       PARAMETER (DATATYPE_PACK8         =  8)
-      INTEGER    DATATYPE_PACK16       
+      INTEGER    DATATYPE_PACK16
       PARAMETER (DATATYPE_PACK16        = 16)
-      INTEGER    DATATYPE_PACK24       
+      INTEGER    DATATYPE_PACK24
       PARAMETER (DATATYPE_PACK24        = 24)
-      INTEGER    DATATYPE_FLT32        
+      INTEGER    DATATYPE_FLT32
       PARAMETER (DATATYPE_FLT32         = 132)
-      INTEGER    DATATYPE_FLT64        
+      INTEGER    DATATYPE_FLT64
       PARAMETER (DATATYPE_FLT64         = 164)
-      INTEGER    DATATYPE_INT32        
+      INTEGER    DATATYPE_INT32
       PARAMETER (DATATYPE_INT32         = 232)
 !
 !  internal data types
 !
-      INTEGER    CDI_DATATYPE_INT      
+      INTEGER    CDI_DATATYPE_INT
       PARAMETER (CDI_DATATYPE_INT       = 251)
-      INTEGER    CDI_DATATYPE_FLT      
+      INTEGER    CDI_DATATYPE_FLT
       PARAMETER (CDI_DATATYPE_FLT       = 252)
-      INTEGER    CDI_DATATYPE_TXT      
+      INTEGER    CDI_DATATYPE_TXT
       PARAMETER (CDI_DATATYPE_TXT       = 253)
-      INTEGER    CDI_DATATYPE_CPX      
+      INTEGER    CDI_DATATYPE_CPX
       PARAMETER (CDI_DATATYPE_CPX       = 254)
-      INTEGER    CDI_DATATYPE_UCHAR    
+      INTEGER    CDI_DATATYPE_UCHAR
       PARAMETER (CDI_DATATYPE_UCHAR     = 255)
-      INTEGER    CDI_DATATYPE_LONG     
+      INTEGER    CDI_DATATYPE_LONG
       PARAMETER (CDI_DATATYPE_LONG      = 256)
-      INTEGER    DATATYPE_INT          
+      INTEGER    DATATYPE_INT
       PARAMETER (DATATYPE_INT           = 251)
-      INTEGER    DATATYPE_FLT          
+      INTEGER    DATATYPE_FLT
       PARAMETER (DATATYPE_FLT           = 252)
-      INTEGER    DATATYPE_TXT          
+      INTEGER    DATATYPE_TXT
       PARAMETER (DATATYPE_TXT           = 253)
-      INTEGER    DATATYPE_CPX          
+      INTEGER    DATATYPE_CPX
       PARAMETER (DATATYPE_CPX           = 254)
-      INTEGER    DATATYPE_UCHAR        
+      INTEGER    DATATYPE_UCHAR
       PARAMETER (DATATYPE_UCHAR         = 255)
-      INTEGER    DATATYPE_LONG         
+      INTEGER    DATATYPE_LONG
       PARAMETER (DATATYPE_LONG          = 256)
 !
 !  Chunks
 !
-      INTEGER    CDI_CHUNK_AUTO        
+      INTEGER    CDI_CHUNK_AUTO
       PARAMETER (CDI_CHUNK_AUTO         =  1)
-      INTEGER    CDI_CHUNK_GRID        
+      INTEGER    CDI_CHUNK_GRID
       PARAMETER (CDI_CHUNK_GRID         =  2)
-      INTEGER    CDI_CHUNK_LINES       
+      INTEGER    CDI_CHUNK_LINES
       PARAMETER (CDI_CHUNK_LINES        =  3)
 !
 !  GRID types
 !
-      INTEGER    GRID_GENERIC          
+      INTEGER    GRID_GENERIC
       PARAMETER (GRID_GENERIC           =  1)
-      INTEGER    GRID_GAUSSIAN         
+      INTEGER    GRID_GAUSSIAN
       PARAMETER (GRID_GAUSSIAN          =  2)
-      INTEGER    GRID_GAUSSIAN_REDUCED 
+      INTEGER    GRID_GAUSSIAN_REDUCED
       PARAMETER (GRID_GAUSSIAN_REDUCED  =  3)
-      INTEGER    GRID_LONLAT           
+      INTEGER    GRID_LONLAT
       PARAMETER (GRID_LONLAT            =  4)
-      INTEGER    GRID_SPECTRAL         
+      INTEGER    GRID_SPECTRAL
       PARAMETER (GRID_SPECTRAL          =  5)
-      INTEGER    GRID_FOURIER          
+      INTEGER    GRID_FOURIER
       PARAMETER (GRID_FOURIER           =  6)
-      INTEGER    GRID_GME              
+      INTEGER    GRID_GME
       PARAMETER (GRID_GME               =  7)
-      INTEGER    GRID_TRAJECTORY       
+      INTEGER    GRID_TRAJECTORY
       PARAMETER (GRID_TRAJECTORY        =  8)
-      INTEGER    GRID_UNSTRUCTURED     
+      INTEGER    GRID_UNSTRUCTURED
       PARAMETER (GRID_UNSTRUCTURED      =  9)
-      INTEGER    GRID_CURVILINEAR      
+      INTEGER    GRID_CURVILINEAR
       PARAMETER (GRID_CURVILINEAR       = 10)
-      INTEGER    GRID_LCC              
+      INTEGER    GRID_LCC
       PARAMETER (GRID_LCC               = 11)
-      INTEGER    GRID_PROJECTION       
+      INTEGER    GRID_PROJECTION
       PARAMETER (GRID_PROJECTION        = 12)
-      INTEGER    CDI_PROJ_RLL          
+      INTEGER    CDI_PROJ_RLL
       PARAMETER (CDI_PROJ_RLL           = 21)
-      INTEGER    CDI_PROJ_LCC          
+      INTEGER    CDI_PROJ_LCC
       PARAMETER (CDI_PROJ_LCC           = 22)
-      INTEGER    CDI_PROJ_LAEA         
+      INTEGER    CDI_PROJ_LAEA
       PARAMETER (CDI_PROJ_LAEA          = 23)
-      INTEGER    CDI_PROJ_SINU         
+      INTEGER    CDI_PROJ_SINU
       PARAMETER (CDI_PROJ_SINU          = 24)
 !
 !  ZAXIS types
 !
-      INTEGER    ZAXIS_SURFACE         
+      INTEGER    ZAXIS_SURFACE
       PARAMETER (ZAXIS_SURFACE          =  0)
-      INTEGER    ZAXIS_GENERIC         
+      INTEGER    ZAXIS_GENERIC
       PARAMETER (ZAXIS_GENERIC          =  1)
-      INTEGER    ZAXIS_HYBRID          
+      INTEGER    ZAXIS_HYBRID
       PARAMETER (ZAXIS_HYBRID           =  2)
-      INTEGER    ZAXIS_HYBRID_HALF     
+      INTEGER    ZAXIS_HYBRID_HALF
       PARAMETER (ZAXIS_HYBRID_HALF      =  3)
-      INTEGER    ZAXIS_PRESSURE        
+      INTEGER    ZAXIS_PRESSURE
       PARAMETER (ZAXIS_PRESSURE         =  4)
-      INTEGER    ZAXIS_HEIGHT          
+      INTEGER    ZAXIS_HEIGHT
       PARAMETER (ZAXIS_HEIGHT           =  5)
-      INTEGER    ZAXIS_DEPTH_BELOW_SEA 
+      INTEGER    ZAXIS_DEPTH_BELOW_SEA
       PARAMETER (ZAXIS_DEPTH_BELOW_SEA  =  6)
       INTEGER    ZAXIS_DEPTH_BELOW_LAND
       PARAMETER (ZAXIS_DEPTH_BELOW_LAND =  7)
-      INTEGER    ZAXIS_ISENTROPIC      
+      INTEGER    ZAXIS_ISENTROPIC
       PARAMETER (ZAXIS_ISENTROPIC       =  8)
-      INTEGER    ZAXIS_TRAJECTORY      
+      INTEGER    ZAXIS_TRAJECTORY
       PARAMETER (ZAXIS_TRAJECTORY       =  9)
-      INTEGER    ZAXIS_ALTITUDE        
+      INTEGER    ZAXIS_ALTITUDE
       PARAMETER (ZAXIS_ALTITUDE         = 10)
-      INTEGER    ZAXIS_SIGMA           
+      INTEGER    ZAXIS_SIGMA
       PARAMETER (ZAXIS_SIGMA            = 11)
-      INTEGER    ZAXIS_MEANSEA         
+      INTEGER    ZAXIS_MEANSEA
       PARAMETER (ZAXIS_MEANSEA          = 12)
-      INTEGER    ZAXIS_TOA             
+      INTEGER    ZAXIS_TOA
       PARAMETER (ZAXIS_TOA              = 13)
-      INTEGER    ZAXIS_SEA_BOTTOM      
+      INTEGER    ZAXIS_SEA_BOTTOM
       PARAMETER (ZAXIS_SEA_BOTTOM       = 14)
-      INTEGER    ZAXIS_ATMOSPHERE      
+      INTEGER    ZAXIS_ATMOSPHERE
       PARAMETER (ZAXIS_ATMOSPHERE       = 15)
-      INTEGER    ZAXIS_CLOUD_BASE      
+      INTEGER    ZAXIS_CLOUD_BASE
       PARAMETER (ZAXIS_CLOUD_BASE       = 16)
-      INTEGER    ZAXIS_CLOUD_TOP       
+      INTEGER    ZAXIS_CLOUD_TOP
       PARAMETER (ZAXIS_CLOUD_TOP        = 17)
-      INTEGER    ZAXIS_ISOTHERM_ZERO   
+      INTEGER    ZAXIS_ISOTHERM_ZERO
       PARAMETER (ZAXIS_ISOTHERM_ZERO    = 18)
-      INTEGER    ZAXIS_SNOW            
+      INTEGER    ZAXIS_SNOW
       PARAMETER (ZAXIS_SNOW             = 19)
-      INTEGER    ZAXIS_LAKE_BOTTOM     
+      INTEGER    ZAXIS_LAKE_BOTTOM
       PARAMETER (ZAXIS_LAKE_BOTTOM      = 20)
-      INTEGER    ZAXIS_SEDIMENT_BOTTOM 
+      INTEGER    ZAXIS_SEDIMENT_BOTTOM
       PARAMETER (ZAXIS_SEDIMENT_BOTTOM  = 21)
       INTEGER    ZAXIS_SEDIMENT_BOTTOM_TA
       PARAMETER (ZAXIS_SEDIMENT_BOTTOM_TA = 22)
       INTEGER    ZAXIS_SEDIMENT_BOTTOM_TW
       PARAMETER (ZAXIS_SEDIMENT_BOTTOM_TW = 23)
-      INTEGER    ZAXIS_MIX_LAYER       
+      INTEGER    ZAXIS_MIX_LAYER
       PARAMETER (ZAXIS_MIX_LAYER        = 24)
-      INTEGER    ZAXIS_REFERENCE       
+      INTEGER    ZAXIS_REFERENCE
       PARAMETER (ZAXIS_REFERENCE        = 25)
 !
 !  SUBTYPE types
 !
-      INTEGER    MAX_KV_PAIRS_MATCH    
+      INTEGER    MAX_KV_PAIRS_MATCH
       PARAMETER (MAX_KV_PAIRS_MATCH     = 10)
 !
 !  Data structure defining a key-value search, possibly with multiple
@@ -346,94 +346,94 @@
 !
 !  TIME types
 !
-      INTEGER    TIME_CONSTANT         
+      INTEGER    TIME_CONSTANT
       PARAMETER (TIME_CONSTANT          =  0)
-      INTEGER    TIME_VARIABLE         
+      INTEGER    TIME_VARIABLE
       PARAMETER (TIME_VARIABLE          =  1)
 !
 !  TSTEP types
 !
-      INTEGER    TSTEP_CONSTANT        
+      INTEGER    TSTEP_CONSTANT
       PARAMETER (TSTEP_CONSTANT         =  0)
-      INTEGER    TSTEP_INSTANT         
+      INTEGER    TSTEP_INSTANT
       PARAMETER (TSTEP_INSTANT          =  1)
-      INTEGER    TSTEP_AVG             
+      INTEGER    TSTEP_AVG
       PARAMETER (TSTEP_AVG              =  2)
-      INTEGER    TSTEP_ACCUM           
+      INTEGER    TSTEP_ACCUM
       PARAMETER (TSTEP_ACCUM            =  3)
-      INTEGER    TSTEP_MAX             
+      INTEGER    TSTEP_MAX
       PARAMETER (TSTEP_MAX              =  4)
-      INTEGER    TSTEP_MIN             
+      INTEGER    TSTEP_MIN
       PARAMETER (TSTEP_MIN              =  5)
-      INTEGER    TSTEP_DIFF            
+      INTEGER    TSTEP_DIFF
       PARAMETER (TSTEP_DIFF             =  6)
-      INTEGER    TSTEP_RMS             
+      INTEGER    TSTEP_RMS
       PARAMETER (TSTEP_RMS              =  7)
-      INTEGER    TSTEP_SD              
+      INTEGER    TSTEP_SD
       PARAMETER (TSTEP_SD               =  8)
-      INTEGER    TSTEP_COV             
+      INTEGER    TSTEP_COV
       PARAMETER (TSTEP_COV              =  9)
-      INTEGER    TSTEP_RATIO           
+      INTEGER    TSTEP_RATIO
       PARAMETER (TSTEP_RATIO            = 10)
-      INTEGER    TSTEP_RANGE           
+      INTEGER    TSTEP_RANGE
       PARAMETER (TSTEP_RANGE            = 11)
-      INTEGER    TSTEP_INSTANT2        
+      INTEGER    TSTEP_INSTANT2
       PARAMETER (TSTEP_INSTANT2         = 12)
-      INTEGER    TSTEP_INSTANT3        
+      INTEGER    TSTEP_INSTANT3
       PARAMETER (TSTEP_INSTANT3         = 13)
 !
 !  TAXIS types
 !
-      INTEGER    TAXIS_ABSOLUTE        
+      INTEGER    TAXIS_ABSOLUTE
       PARAMETER (TAXIS_ABSOLUTE         =  1)
-      INTEGER    TAXIS_RELATIVE        
+      INTEGER    TAXIS_RELATIVE
       PARAMETER (TAXIS_RELATIVE         =  2)
-      INTEGER    TAXIS_FORECAST        
+      INTEGER    TAXIS_FORECAST
       PARAMETER (TAXIS_FORECAST         =  3)
 !
 !  TUNIT types
 !
-      INTEGER    TUNIT_SECOND          
+      INTEGER    TUNIT_SECOND
       PARAMETER (TUNIT_SECOND           =  1)
-      INTEGER    TUNIT_MINUTE          
+      INTEGER    TUNIT_MINUTE
       PARAMETER (TUNIT_MINUTE           =  2)
-      INTEGER    TUNIT_QUARTER         
+      INTEGER    TUNIT_QUARTER
       PARAMETER (TUNIT_QUARTER          =  3)
-      INTEGER    TUNIT_30MINUTES       
+      INTEGER    TUNIT_30MINUTES
       PARAMETER (TUNIT_30MINUTES        =  4)
-      INTEGER    TUNIT_HOUR            
+      INTEGER    TUNIT_HOUR
       PARAMETER (TUNIT_HOUR             =  5)
-      INTEGER    TUNIT_3HOURS          
+      INTEGER    TUNIT_3HOURS
       PARAMETER (TUNIT_3HOURS           =  6)
-      INTEGER    TUNIT_6HOURS          
+      INTEGER    TUNIT_6HOURS
       PARAMETER (TUNIT_6HOURS           =  7)
-      INTEGER    TUNIT_12HOURS         
+      INTEGER    TUNIT_12HOURS
       PARAMETER (TUNIT_12HOURS          =  8)
-      INTEGER    TUNIT_DAY             
+      INTEGER    TUNIT_DAY
       PARAMETER (TUNIT_DAY              =  9)
-      INTEGER    TUNIT_MONTH           
+      INTEGER    TUNIT_MONTH
       PARAMETER (TUNIT_MONTH            = 10)
-      INTEGER    TUNIT_YEAR            
+      INTEGER    TUNIT_YEAR
       PARAMETER (TUNIT_YEAR             = 11)
 !
 !  CALENDAR types
 !
-      INTEGER    CALENDAR_STANDARD     
+      INTEGER    CALENDAR_STANDARD
       PARAMETER (CALENDAR_STANDARD      =  0)
-      INTEGER    CALENDAR_PROLEPTIC    
+      INTEGER    CALENDAR_PROLEPTIC
       PARAMETER (CALENDAR_PROLEPTIC     =  1)
-      INTEGER    CALENDAR_360DAYS      
+      INTEGER    CALENDAR_360DAYS
       PARAMETER (CALENDAR_360DAYS       =  2)
-      INTEGER    CALENDAR_365DAYS      
+      INTEGER    CALENDAR_365DAYS
       PARAMETER (CALENDAR_365DAYS       =  3)
-      INTEGER    CALENDAR_366DAYS      
+      INTEGER    CALENDAR_366DAYS
       PARAMETER (CALENDAR_366DAYS       =  4)
-      INTEGER    CALENDAR_NONE         
+      INTEGER    CALENDAR_NONE
       PARAMETER (CALENDAR_NONE          =  5)
 !
 !  number of unsigned char needed to store UUID
 !
-      INTEGER    CDI_UUID_SIZE         
+      INTEGER    CDI_UUID_SIZE
       PARAMETER (CDI_UUID_SIZE          = 16)
 !
 !  Structs that are used to return data to the user
@@ -709,7 +709,7 @@
 !                     streamWriteVarChunk
 !                                    (INTEGER         streamID,
 !                                     INTEGER         varID,
-!                                     INTEGER         rect(*),
+!                                     INTEGER         rect(2,3),
 !                                     DOUBLEPRECISION data(*),
 !                                     INTEGER         nmiss)
       EXTERNAL        streamWriteVarChunk
@@ -1589,44 +1589,44 @@
 !
 !  CDI grid string key values
 !
-      INTEGER    CDI_KEY_XNAME         
+      INTEGER    CDI_KEY_XNAME
       PARAMETER (CDI_KEY_XNAME          = 901)
-      INTEGER    CDI_KEY_XDIMNAME      
+      INTEGER    CDI_KEY_XDIMNAME
       PARAMETER (CDI_KEY_XDIMNAME       = 902)
-      INTEGER    CDI_KEY_XLONGNAME     
+      INTEGER    CDI_KEY_XLONGNAME
       PARAMETER (CDI_KEY_XLONGNAME      = 903)
-      INTEGER    CDI_KEY_XUNITS        
+      INTEGER    CDI_KEY_XUNITS
       PARAMETER (CDI_KEY_XUNITS         = 904)
-      INTEGER    CDI_KEY_YNAME         
+      INTEGER    CDI_KEY_YNAME
       PARAMETER (CDI_KEY_YNAME          = 911)
-      INTEGER    CDI_KEY_YDIMNAME      
+      INTEGER    CDI_KEY_YDIMNAME
       PARAMETER (CDI_KEY_YDIMNAME       = 912)
-      INTEGER    CDI_KEY_YLONGNAME     
+      INTEGER    CDI_KEY_YLONGNAME
       PARAMETER (CDI_KEY_YLONGNAME      = 913)
-      INTEGER    CDI_KEY_YUNITS        
+      INTEGER    CDI_KEY_YUNITS
       PARAMETER (CDI_KEY_YUNITS         = 914)
-      INTEGER    CDI_KEY_VDIMNAME      
+      INTEGER    CDI_KEY_VDIMNAME
       PARAMETER (CDI_KEY_VDIMNAME       = 920)
-      INTEGER    CDI_KEY_MAPPING       
+      INTEGER    CDI_KEY_MAPPING
       PARAMETER (CDI_KEY_MAPPING        = 921)
-      INTEGER    CDI_KEY_MAPNAME       
+      INTEGER    CDI_KEY_MAPNAME
       PARAMETER (CDI_KEY_MAPNAME        = 922)
 !
 !  CDI zaxis string key values
 !
-      INTEGER    CDI_KEY_NAME          
+      INTEGER    CDI_KEY_NAME
       PARAMETER (CDI_KEY_NAME           = 941)
-      INTEGER    CDI_KEY_DIMNAME       
+      INTEGER    CDI_KEY_DIMNAME
       PARAMETER (CDI_KEY_DIMNAME        = 942)
-      INTEGER    CDI_KEY_LONGNAME      
+      INTEGER    CDI_KEY_LONGNAME
       PARAMETER (CDI_KEY_LONGNAME       = 943)
-      INTEGER    CDI_KEY_UNITS         
+      INTEGER    CDI_KEY_UNITS
       PARAMETER (CDI_KEY_UNITS          = 944)
-      INTEGER    CDI_KEY_PSNAME        
+      INTEGER    CDI_KEY_PSNAME
       PARAMETER (CDI_KEY_PSNAME         = 950)
-      INTEGER    CDI_KEY_P0NAME        
+      INTEGER    CDI_KEY_P0NAME
       PARAMETER (CDI_KEY_P0NAME         = 951)
-      INTEGER    CDI_KEY_P0VALUE       
+      INTEGER    CDI_KEY_P0VALUE
       PARAMETER (CDI_KEY_P0VALUE        = 952)
       INTEGER         cdiGridDefKeyStr
 !                                    (INTEGER         gridID,
@@ -1846,28 +1846,32 @@
 !
 !                     gridDefParamLCC
 !                                    (INTEGER         gridID,
-!                                     DOUBLEPRECISION originLon,
-!                                     DOUBLEPRECISION originLat,
-!                                     DOUBLEPRECISION lonParY,
-!                                     DOUBLEPRECISION lat1,
-!                                     DOUBLEPRECISION lat2,
-!                                     DOUBLEPRECISION xinc,
-!                                     DOUBLEPRECISION yinc,
-!                                     INTEGER         projflag,
-!                                     INTEGER         scanflag)
+!                                     DOUBLEPRECISION missval,
+!                                     DOUBLEPRECISION lon_0,
+!                                     DOUBLEPRECISION lat_0,
+!                                     DOUBLEPRECISION lat_1,
+!                                     DOUBLEPRECISION lat_2,
+!                                     DOUBLEPRECISION a,
+!                                     DOUBLEPRECISION rf,
+!                                     DOUBLEPRECISION xval_0,
+!                                     DOUBLEPRECISION yval_0,
+!                                     DOUBLEPRECISION x_0,
+!                                     DOUBLEPRECISION y_0)
       EXTERNAL        gridDefParamLCC
 
-!                     gridInqParamLCC
+      INTEGER         gridInqParamLCC
 !                                    (INTEGER         gridID,
-!                                     DOUBLEPRECISION originLon,
-!                                     DOUBLEPRECISION originLat,
-!                                     DOUBLEPRECISION lonParY,
-!                                     DOUBLEPRECISION lat1,
-!                                     DOUBLEPRECISION lat2,
-!                                     DOUBLEPRECISION xinc,
-!                                     DOUBLEPRECISION yinc,
-!                                     INTEGER         projflag,
-!                                     INTEGER         scanflag)
+!                                     DOUBLEPRECISION missval,
+!                                     DOUBLEPRECISION lon_0,
+!                                     DOUBLEPRECISION lat_0,
+!                                     DOUBLEPRECISION lat_1,
+!                                     DOUBLEPRECISION lat_2,
+!                                     DOUBLEPRECISION a,
+!                                     DOUBLEPRECISION rf,
+!                                     DOUBLEPRECISION xval_0,
+!                                     DOUBLEPRECISION yval_0,
+!                                     DOUBLEPRECISION x_0,
+!                                     DOUBLEPRECISION y_0)
       EXTERNAL        gridInqParamLCC
 
 !                     gridDefArea
@@ -1938,6 +1942,24 @@
 !                                    (INTEGER         gridID)
       EXTERNAL        gridInqComplexPacking
 
+!                     gridDefUvRelativeToGrid
+!                                    (INTEGER         gridID,
+!                                     INTEGER         uvRelativeToGrid)
+      EXTERNAL        gridDefUvRelativeToGrid
+
+      INTEGER         gridInqUvRelativeToGrid
+!                                    (INTEGER         gridID)
+      EXTERNAL        gridInqUvRelativeToGrid
+
+!                     gridDefScanningMode
+!                                    (INTEGER         gridID,
+!                                     INTEGER         mode)
+      EXTERNAL        gridDefScanningMode
+
+      INTEGER         gridInqScanningMode
+!                                    (INTEGER         gridID)
+      EXTERNAL        gridInqScanningMode
+
 !
 !  ZAXIS routines
 !
diff --git a/src/cdiFortran.c b/src/cdiFortran.c
index 2202400b709df42896e9401f7dcb4e0fecacf670..de7943ec468bd9e5e97f84a32b5692516ad14898 100644
--- a/src/cdiFortran.c
+++ b/src/cdiFortran.c
@@ -11,7 +11,19 @@
 #if defined (HAVE_CF_INTERFACE)
 
 #if ! defined (__CFORTRAN_LOADED)
+#  if defined __clang__
+#    pragma GCC diagnostic push
+#    pragma GCC diagnostic ignored "-Wreserved-id-macro"
+#  endif
 #  include "cfortran.h"
+#  if defined __clang__
+#    pragma GCC diagnostic pop
+#  endif
+#endif
+/* These functions are meant to be called from Fortran and don't
+ * need an interface declaration in a C header. */
+#if defined __clang__
+#  pragma GCC diagnostic ignored "-Wmissing-prototypes"
 #endif
 
 
@@ -385,8 +397,8 @@ FCALLSCSUB5 (gridInqParamGME, GRIDINQPARAMGME, gridinqparamgme, INT, PINT, PINT,
 
 /*  Lambert Conformal Conic grid (GRIB version)  */
 
-FCALLSCSUB10 (gridDefParamLCC, GRIDDEFPARAMLCC, griddefparamlcc, INT, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, INT, INT)
-FCALLSCSUB10 (gridInqParamLCC, GRIDINQPARAMLCC, gridinqparamlcc, INT, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PINT, PINT)
+FCALLSCSUB12 (gridDefParamLCC, GRIDDEFPARAMLCC, griddefparamlcc, INT, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE)
+FCALLSCFUN12 (INT, gridInqParamLCC, GRIDINQPARAMLCC, gridinqparamlcc, INT, DOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE)
 FCALLSCSUB2 (gridDefArea, GRIDDEFAREA, griddefarea, INT, DOUBLEV)
 FCALLSCSUB2 (gridInqArea, GRIDINQAREA, gridinqarea, INT, DOUBLEV)
 FCALLSCFUN1 (INT, gridHasArea, GRIDHASAREA, gridhasarea, INT)
@@ -401,6 +413,10 @@ FCALLSCSUB2 (gridInqRowlon, GRIDINQROWLON, gridinqrowlon, INT, INTV)
 FCALLSCSUB2 (gridChangeType, GRIDCHANGETYPE, gridchangetype, INT, INT)
 FCALLSCSUB2 (gridDefComplexPacking, GRIDDEFCOMPLEXPACKING, griddefcomplexpacking, INT, INT)
 FCALLSCFUN1 (INT, gridInqComplexPacking, GRIDINQCOMPLEXPACKING, gridinqcomplexpacking, INT)
+FCALLSCSUB2 (gridDefUvRelativeToGrid, GRIDDEFUVRELATIVETOGRID, griddefuvrelativetogrid, INT, INT)
+FCALLSCFUN1 (INT, gridInqUvRelativeToGrid, GRIDINQUVRELATIVETOGRID, gridinquvrelativetogrid, INT)
+FCALLSCSUB2 (gridDefScanningMode, GRIDDEFSCANNINGMODE, griddefscanningmode, INT, INT)
+FCALLSCFUN1 (INT, gridInqScanningMode, GRIDINQSCANNINGMODE, gridinqscanningmode, INT)
 
 /*  ZAXIS routines  */
 
@@ -564,4 +580,7 @@ FCALLSCFUN4 (INT, subtypeInqAttribute, SUBTYPEINQATTRIBUTE, subtypeinqattribute,
 FCALLSCFUN2 (INT, vlistInqVarSubtype, VLISTINQVARSUBTYPE, vlistinqvarsubtype, INT, INT)
 FCALLSCSUB3 (gribapiLibraryVersion, GRIBAPILIBRARYVERSION, gribapilibraryversion, PINT, PINT, PINT)
 
+#if defined __clang__
+#  pragma GCC diagnostic pop
+#endif
 #endif
diff --git a/src/cdi_int.c b/src/cdi_int.c
index 0894198fdcc33163e6d97f94edf54b2d0e4f0b37..db3b0922c0d712804f1c741f51d478a0644e2774 100644
--- a/src/cdi_int.c
+++ b/src/cdi_int.c
@@ -5,6 +5,7 @@
 #include <stdarg.h>
 #include <ctype.h>
 
+#include "binary.h"
 #include "cdf.h"
 #include "cdi.h"
 #include "cdi_int.h"
@@ -148,6 +149,48 @@ void cdiPrintVersion(void)
   fprintf(stderr, "    FILE library version : %s\n", fileLibraryVersion());
 }
 
+static void cdiPrintDatatypes(void)
+{
+#define XSTRING(x)	#x
+#define STRING(x)	XSTRING(x)
+  fprintf (stderr, "+-------------+-------+\n"
+           "| types       | bytes |\n"
+           "+-------------+-------+\n"
+           "| void *      |   %3d |\n"
+           "+-------------+-------+\n"
+           "| char        |   %3d |\n"
+           "+-------------+-------+\n"
+           "| bool        |   %3d |\n"
+           "| short       |   %3d |\n"
+           "| int         |   %3d |\n"
+           "| long        |   %3d |\n"
+           "| long long   |   %3d |\n"
+           "| size_t      |   %3d |\n"
+           "| off_t       |   %3d |\n"
+           "+-------------+-------+\n"
+           "| float       |   %3d |\n"
+           "| double      |   %3d |\n"
+           "| long double |   %3d |\n"
+           "+-------------+-------+\n\n"
+           "+-------------+-----------+\n"
+           "| INT32       | %-9s |\n"
+           "| INT64       | %-9s |\n"
+           "| FLT32       | %-9s |\n"
+           "| FLT64       | %-9s |\n"
+           "+-------------+-----------+\n"
+           "\n  byte ordering is %s\n\n",
+           (int) sizeof(void *), (int) sizeof(char), (int) sizeof(bool),
+           (int) sizeof(short), (int) sizeof(int), (int) sizeof(long), (int) sizeof(long long),
+           (int) sizeof(size_t), (int) sizeof(off_t),
+           (int) sizeof(float), (int) sizeof(double), (int) sizeof(long double),
+           STRING(INT32), STRING(INT64), STRING(FLT32), STRING(FLT64),
+           ((HOST_ENDIANNESS == CDI_BIGENDIAN) ? "BIGENDIAN"
+            : ((HOST_ENDIANNESS == CDI_LITTLEENDIAN) ? "LITTLEENDIAN"
+               : "Unhandled endianness!")));
+#undef STRING
+#undef XSTRING
+}
+
 void cdiDebug(int level)
 {
   if ( level == 1 || (level &  2) ) CDI_Debug = 1;
diff --git a/src/cdi_int.h b/src/cdi_int.h
index f01011e8efa9de78af0251e8f225e9326258db51..728487fe1fe1c5f2954ae727787c3baaa71ef7e9 100644
--- a/src/cdi_int.h
+++ b/src/cdi_int.h
@@ -41,7 +41,7 @@ char *strdup(const char *s);
 #endif
 
 
-#ifndef  _ERROR_H
+#ifndef  ERROR_H
 #  include "error.h"
 #endif
 #ifndef _BASETIME_H
@@ -152,6 +152,14 @@ typedef struct
   int       ilevel2;
   int       ltype;
   short     tsteptype;
+#ifdef HIRLAM_EXTENSIONS
+    // NOTE: tsteptype MUST be part of attributes used to compare variables!
+    // Modern NWP models (HARMONIE, HIRLAM) use timeRangeIndicator to specify
+    // if the field is instantanous or accumulated.
+    // Both types are typically in the same GRIB-file.
+    // (181; 105, 0, timeRangeIndicator=0) .. instantanous rain
+    // (181; 105, 0, timeRangeIndicator=4) .. accumulated rain  .. both can be in the same grib file
+#endif // HIRLAM_EXTENSIONS
   short     used;
   short     varID;
   short     levelID;
@@ -303,6 +311,7 @@ typedef enum {
 #define  CDI_FILETYPE_UNDEF          -1   /* Unknown/not yet defined file type */
 
 
+extern int cdiDebugExt;
 extern int CDI_Debug;      /* If set to 1, debuggig (default 0)            */
 extern int CDI_Recopt;
 extern int cdiGribApiDebug;
@@ -386,8 +395,6 @@ void    recordInitEntry(record_t *record);
 
 void    cdiCheckZaxis(int zaxisID);
 
-void    cdiPrintDatatypes(void);
-
 void    cdiDefAccesstype(int streamID, int type);
 int     cdiInqAccesstype(int streamID);
 
diff --git a/src/cdipio.inc b/src/cdipio.inc
index 9151a819ee6624abe95804c62e2b7f24196661ff..f44a62c3411cb1d47cd480cc65d934ff0466683b 100644
--- a/src/cdipio.inc
+++ b/src/cdipio.inc
@@ -1,40 +1,44 @@
 ! This file was automatically generated, don't edit!
 !
-! Fortran interface for CDI library version 1.7.2
+! Fortran interface for CDI library version 1.8.0
 !
 ! Author:
 ! -------
-! Uwe Schulzweida, MPI-MET, Hamburg,   April 2016
+! Uwe Schulzweida, MPI-MET, Hamburg,   March 2017
 !
 
 !
 !  parallel IO IOMode
 !
-      INTEGER    PIO_NONE              
+      INTEGER    PIO_NONE
       PARAMETER (PIO_NONE               =  0)
-      INTEGER    PIO_MPI               
+      INTEGER    PIO_MPI
       PARAMETER (PIO_MPI                =  1)
-      INTEGER    PIO_WRITER            
+      INTEGER    PIO_WRITER
       PARAMETER (PIO_WRITER             =  2)
-      INTEGER    PIO_ASYNCH            
+      INTEGER    PIO_ASYNCH
       PARAMETER (PIO_ASYNCH             =  3)
-      INTEGER    PIO_FPGUARD           
+      INTEGER    PIO_FPGUARD
       PARAMETER (PIO_FPGUARD            =  4)
-      INTEGER    PIO_MPI_FW_ORDERED    
+      INTEGER    PIO_MPI_FW_ORDERED
       PARAMETER (PIO_MPI_FW_ORDERED     =  5)
-      INTEGER    PIO_MPI_FW_AT_ALL     
+      INTEGER    PIO_MPI_FW_AT_ALL
       PARAMETER (PIO_MPI_FW_AT_ALL      =  6)
-      INTEGER    PIO_MPI_FW_AT_REBLOCK 
+      INTEGER    PIO_MPI_FW_AT_REBLOCK
       PARAMETER (PIO_MPI_FW_AT_REBLOCK  =  7)
-      INTEGER    PIO_ROLE_CLIENT       
+      INTEGER    PIO_MINIOMODE
+      PARAMETER (PIO_MINIOMODE          = PIO_NONE)
+      INTEGER    PIO_MAXIOMODE
+      PARAMETER (PIO_MAXIOMODE          = PIO_MPI_FW_AT_REBLOCK)
+      INTEGER    PIO_ROLE_CLIENT
       PARAMETER (PIO_ROLE_CLIENT        =  0)
-      INTEGER    PIO_ROLE_COLLECTOR    
+      INTEGER    PIO_ROLE_COLLECTOR
       PARAMETER (PIO_ROLE_COLLECTOR     =  1)
-      INTEGER    PIO_ROLE_WRITER       
+      INTEGER    PIO_ROLE_WRITER
       PARAMETER (PIO_ROLE_WRITER        =  2)
       INTEGER    PIO_ROLE_WRITER_COLLECTOR
       PARAMETER (PIO_ROLE_WRITER_COLLECTOR =  3)
-      INTEGER    PIO_ROLE_FPGUARD      
+      INTEGER    PIO_ROLE_FPGUARD
       PARAMETER (PIO_ROLE_FPGUARD       =  4)
 !
 !  parallel IO routines
diff --git a/src/cdipioFortran.c b/src/cdipioFortran.c
index 522faab36370af01d0269a6057d4613b86442aa5..b076ece2b3f5b454b6e89499841fe7b29913ccef 100644
--- a/src/cdipioFortran.c
+++ b/src/cdipioFortran.c
@@ -11,7 +11,19 @@
 #if defined (HAVE_CF_INTERFACE)
 
 #if ! defined (__CFORTRAN_LOADED)
+#  if defined __clang__
+#    pragma GCC diagnostic push
+#    pragma GCC diagnostic ignored "-Wreserved-id-macro"
+#  endif
 #  include "cfortran.h"
+#  if defined __clang__
+#    pragma GCC diagnostic pop
+#  endif
+#endif
+/* These functions are meant to be called from Fortran and don't
+ * need an interface declaration in a C header. */
+#if defined __clang__
+#  pragma GCC diagnostic ignored "-Wmissing-prototypes"
 #endif
 
 
@@ -48,7 +60,7 @@ static void streamWriteVarPart_fwrap(int streamID, int varID, const void *data,
   streamWriteVarPart(streamID, varID, data, nmiss, (*(Xt_idxlist *)partDesc));
 }
 FCALLSCSUB5 (streamWriteVarPart_fwrap, STREAMWRITEVARPART, streamwritevarpart, INT, INT, PVOID, INT, PVOID)
-static void streamWriteScatteredVarPart_fwrap(int streamID, int varID, const void *data, int numBlocks, int  blocklengths[], int  displacements[], int nmiss, void *partDesc)
+static void streamWriteScatteredVarPart_fwrap(int streamID, int varID, const void *data, int numBlocks, const int  blocklengths[], const int  displacements[], int nmiss, void *partDesc)
 {
   streamWriteScatteredVarPart(streamID, varID, data, numBlocks, blocklengths, displacements, nmiss, (*(Xt_idxlist *)partDesc));
 }
@@ -106,4 +118,7 @@ FCALLSCSUB2 (cdiPioConfSetStripeConversion, CDIPIOCONFSETSTRIPECONVERSION, cdipi
 
 FCALLSCFUN1 (INT, cdiPioConfGetStripeConversion, CDIPIOCONFGETSTRIPECONVERSION, cdipioconfgetstripeconversion, INT)
 
+#if defined __clang__
+#  pragma GCC diagnostic pop
+#endif
 #endif
diff --git a/src/cfortran.h b/src/cfortran.h
index 275b8cff8c9afd8fc2c96b0f7f6da177ee4f25d2..222faba6afe1b9bd1753ebd2e52994dac1ad3d2c 100644
--- a/src/cfortran.h
+++ b/src/cfortran.h
@@ -591,7 +591,7 @@ if (e>s) {                           /* Need this to handle NULL string.*/
 } return s; }
 
 #ifndef __CF__KnR
-static int num_elem(char *strv, unsigned elem_len, int term_char, int num_term);
+static int num_elem(const char *strv, unsigned elem_len, int term_char, int num_term);
 #endif
 /* kill_trailingn(s,t,e) will kill the trailing t's in string s. e normally 
 points to the terminating '\0' of s, but may actually point to anywhere in s.
@@ -608,8 +608,7 @@ else if (e>s) {                      /* Watch out for neg. length string.*/
   while (e>s && *--e==t){;}          /* Don't follow t's past beginning. */
   e[*e==t?0:1] = '\0';               /* Handle s[0]=t correctly.       */
 }
-if (0)  /* to prevent not used warnings in gcc (added by TJ) */
-  num_elem("", 0, '\0', 1);
+(void)num_elem;  /* to prevent not used warnings in gcc (added by TJ) */
 
  return s; }
 
@@ -659,7 +658,7 @@ typedef DSC$DESCRIPTOR_A(1) fstringvector;
 #define NUM_ELEM_ARG(B) *_2(A,B),_NUM_ELEM_ARG
 #define TERM_CHARS(A,B) A,B
 #ifndef __CF__KnR
-static int num_elem(char *strv, unsigned elem_len, int term_char, int num_term)
+static int num_elem(const char *strv, unsigned elem_len, int term_char, int num_term)
 #else
 static int num_elem(      strv,          elem_len,     term_char,     num_term)
                     char *strv; unsigned elem_len; int term_char; int num_term;
@@ -678,10 +677,10 @@ for (num=0; ; num++) {
   if (i==(unsigned)num_term) break;
   else strv += elem_len-i;
 }
-if (0) {  /* to prevent not used warnings in gcc (added by ROOT) */
-   c2fstrv(0, 0, 0, 0); f2cstrv(0, 0, 0, 0); kill_trailing(0, 0);
-   vkill_trailing(0, 0, 0, 0); num_elem(0, 0, 0, 0);
-}
+/* to prevent not used warnings in gcc (added by ROOT, changed by TJ
+ * because of unreachable warnings from clang) */
+(void)c2fstrv; (void)f2cstrv; (void)kill_trailing;
+(void)vkill_trailing; (void)num_elem;
 return (int)num;
 }
 /* #endif removed 2/10/98 (CFITSIO) */
diff --git a/src/cgribexlib.c b/src/cgribexlib.c
index d7a0ad3e428cd754d13d0916162f5c20ba6c000b..bd84f03597e83906ced96655ea30f17f73eb35cd 100644
--- a/src/cgribexlib.c
+++ b/src/cgribexlib.c
@@ -54,7 +54,7 @@
 #if ! defined   (_CGRIBEX_H)
 #  include "cgribex.h"
 #endif
-#if ! defined   (_ERROR_H)
+#if ! defined   (ERROR_H)
 #  include "error.h"
 #endif
 #if ! defined   (_DTYPES_H)
diff --git a/src/config.h.in b/src/config.h.in
index 8c9bcb778df2aa883ffd9efb1d2b7d810cb3e66f..3110e95096dbb9f50a375e72c17c7eaa5a11cdc8 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -205,6 +205,9 @@
 /* yaxt library is available */
 #undef HAVE_YAXT
 
+/* Define to 1 for HIRLAM extensions */
+#undef HIRLAM_EXTENSIONS
+
 /* Host name */
 #undef HOST_NAME
 
diff --git a/src/error.h b/src/error.h
index 58b7288dbee5c86949db1e85acc312bb741fd27e..28ccc6c51a64ab9dd083298d5ccef72f9c9734e7 100644
--- a/src/error.h
+++ b/src/error.h
@@ -1,5 +1,5 @@
-#ifndef _ERROR_H
-#define _ERROR_H
+#ifndef ERROR_H
+#define ERROR_H
 
 #include <stdarg.h>
 #include <stdlib.h>
@@ -70,7 +70,7 @@ cdiAbortC_serial(const char *caller, const char *filename,
 }
 #endif
 
-#endif  /* _ERROR_H */
+#endif  /* ERROR_H */
 /*
  * Local Variables:
  * c-file-style: "Java"
diff --git a/src/file.c b/src/file.c
index 4ea2e816134b0bb99d0cda2f3a5b701572ac734a..76cc0db3abdc0bfa1b290537307ccdb533af5719 100644
--- a/src/file.c
+++ b/src/file.c
@@ -6,9 +6,11 @@
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <stdint.h>
+#include <limits.h>
 #include <stdarg.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
 #include <string.h>
 #include <unistd.h>
 #include <sys/types.h>
@@ -47,14 +49,6 @@ char *strdup(const char *s);
 #endif
 
 
-#if ! defined   (FALSE)
-#  define  FALSE  0
-#endif
-
-#if ! defined   (TRUE)
-#  define  TRUE   1
-#endif
-
 /* #define  MAX_FILES  FOPEN_MAX */
 #define  MAX_FILES  4096
 
@@ -62,7 +56,7 @@ static int _file_max = MAX_FILES;
 
 static void file_initialize(void);
 
-static int _file_init = FALSE;
+static bool _file_init = false;
 
 #if  defined  (HAVE_LIBPTHREAD)
 #include <pthread.h>
@@ -73,14 +67,14 @@ static pthread_mutex_t _file_mutex;
 #  define FILE_LOCK()         pthread_mutex_lock(&_file_mutex)
 #  define FILE_UNLOCK()       pthread_mutex_unlock(&_file_mutex)
 #  define FILE_INIT()        \
-   if ( _file_init == FALSE ) pthread_once(&_file_init_thread, file_initialize)
+   if ( _file_init == false ) pthread_once(&_file_init_thread, file_initialize)
 
 #else
 
 #  define FILE_LOCK()
 #  define FILE_UNLOCK()
 #  define FILE_INIT()        \
-   if ( _file_init == FALSE ) file_initialize()
+   if ( _file_init == false ) file_initialize()
 
 #endif
 
@@ -125,7 +119,7 @@ enum F_I_L_E_Flags
   };
 
 
-static int FileInfo  = FALSE;
+static bool FileInfo = false;
 
 
 #if ! defined (MIN_BUF_SIZE)
@@ -150,7 +144,7 @@ static void file_table_print(void);
  * A version string.
  */
 #undef   LIBVERSION
-#define  LIBVERSION      1.8.2
+#define  LIBVERSION      1.8.3
 #define  XSTRING(x)	 #x
 #define  STRING(x) 	 XSTRING(x)
 static const char file_libvers[] = STRING(LIBVERSION) " of " __DATE__ " " __TIME__;
@@ -190,7 +184,7 @@ void file_list_new(void)
 {
   assert(_fileList == NULL);
 
-  _fileList = (filePtrToIdx *) Malloc((size_t)_file_max * sizeof (filePtrToIdx));
+  _fileList = (filePtrToIdx *) Malloc((size_t)_file_max*sizeof(filePtrToIdx));
 }
 
 static
@@ -206,9 +200,7 @@ void file_list_delete(void)
 static
 void file_init_pointer(void)
 {
-  int  i;
-
-  for ( i = 0; i < _file_max; i++ )
+  for ( int i = 0; i < _file_max; i++ )
     {
       _fileList[i].next = _fileList + i + 1;
       _fileList[i].idx  = i;
@@ -238,14 +230,14 @@ bfile_t *file_to_pointer(int idx)
   else
     Error("file index %d undefined!", idx);
 
-  return (fileptr);
+  return fileptr;
 }
 
 /* Create an index from a pointer */
 static
 int file_from_pointer(bfile_t *ptr)
 {
-  int      idx = -1;
+  int idx = -1;
   filePtrToIdx *newptr;
 
   if ( ptr )
@@ -271,7 +263,7 @@ int file_from_pointer(bfile_t *ptr)
   else
     Error("Internal problem (pointer %p undefined)", ptr);
 
-  return (idx);
+  return idx;
 }
 
 static
@@ -305,21 +297,16 @@ void file_init_entry(bfile_t *fileptr)
 static
 bfile_t *file_new_entry(void)
 {
-  bfile_t *fileptr;
-
-  fileptr = (bfile_t *) Malloc(sizeof(bfile_t));
-
+  bfile_t *fileptr = (bfile_t *) Malloc(sizeof(bfile_t));
   if ( fileptr ) file_init_entry(fileptr);
 
-  return (fileptr);
+  return fileptr;
 }
 
 static
 void file_delete_entry(bfile_t *fileptr)
 {
-  int idx;
-
-  idx = fileptr->self;
+  int idx = fileptr->self;
 
   FILE_LOCK();
 
@@ -338,49 +325,41 @@ void file_delete_entry(bfile_t *fileptr)
 
 const char *fileLibraryVersion(void)
 {
-  return (file_libvers);
+  return file_libvers;
 }
 
-
 static
 int pagesize(void)
 {
 #if defined(_SC_PAGESIZE)
-  return ((int) sysconf(_SC_PAGESIZE));
+  return (int) sysconf(_SC_PAGESIZE);
 #else
 #ifndef POSIXIO_DEFAULT_PAGESIZE
 #define POSIXIO_DEFAULT_PAGESIZE 4096
 #endif
-  return ((int) POSIXIO_DEFAULT_PAGESIZE);
+  return (int) POSIXIO_DEFAULT_PAGESIZE;
 #endif
 }
 
 static
 double file_time()
 {
-  double tseconds = 0.0;
   struct timeval mytime;
   gettimeofday(&mytime, NULL);
-  tseconds = (double) mytime.tv_sec + (double) mytime.tv_usec*1.0e-6;
-  return (tseconds);
+  double tseconds = (double) mytime.tv_sec + (double) mytime.tv_usec*1.0e-6;
+  return tseconds;
 }
 
 void fileDebug(int debug)
 {
   FILE_Debug = debug;
-
-  if ( FILE_Debug )
-    Message("Debug level %d", debug);
+  if ( FILE_Debug ) Message("Debug level %d", debug);
 }
 
 
 void *filePtr(int fileID)
 {
-  bfile_t *fileptr;
-
-  fileptr = file_to_pointer(fileID);
-
-  return (fileptr);
+  return (void*)file_to_pointer(fileID);
 }
 
 static
@@ -398,9 +377,7 @@ void file_pointer_info(const char *caller, int fileID)
 int fileSetBufferType(int fileID, int type)
 {
   int ret = 0;
-  bfile_t *fileptr;
-
-  fileptr = file_to_pointer(fileID);
+  bfile_t *fileptr = file_to_pointer(fileID);
 
   if ( fileptr )
     {
@@ -419,27 +396,22 @@ int fileSetBufferType(int fileID, int type)
   if ( type == FILE_BUFTYPE_MMAP ) ret = 1;
 #endif
 
-  return (ret);
+  return ret;
 }
 
 int fileFlush(int fileID)
 {
-  bfile_t *fileptr;
   int retval = 0;
-
-  fileptr = file_to_pointer(fileID);
-
+  bfile_t *fileptr = file_to_pointer(fileID);
   if ( fileptr ) retval = fflush(fileptr->fp);
 
-  return (retval);
+  return retval;
 }
 
 
 void fileClearerr(int fileID)
 {
-  bfile_t *fileptr;
-
-  fileptr = file_to_pointer(fileID);
+  bfile_t *fileptr = file_to_pointer(fileID);
 
   if ( fileptr )
     {
@@ -451,25 +423,21 @@ void fileClearerr(int fileID)
 
 int filePtrEOF(void *vfileptr)
 {
-  bfile_t *fileptr = (bfile_t *) vfileptr;
   int retval = 0;
-
+  bfile_t *fileptr = (bfile_t *) vfileptr;
   if ( fileptr ) retval = (fileptr->flag & FILE_EOF) != 0;
 
-  return (retval);
+  return retval;
 }
 
 
 int fileEOF(int fileID)
 {
-  bfile_t *fileptr;
   int retval = 0;
-
-  fileptr = file_to_pointer(fileID);
-
+  bfile_t *fileptr = file_to_pointer(fileID);
   if ( fileptr ) retval = (fileptr->flag & FILE_EOF) != 0;
 
-  return (retval);
+  return retval;
 }
 
 void fileRewind(int fileID)
@@ -482,9 +450,7 @@ void fileRewind(int fileID)
 off_t fileGetPos(int fileID)
 {
   off_t filepos = 0;
-  bfile_t *fileptr;
-
-  fileptr = file_to_pointer(fileID);
+  bfile_t *fileptr = file_to_pointer(fileID);
 
   if ( fileptr )
     {
@@ -496,23 +462,21 @@ off_t fileGetPos(int fileID)
 
   if ( FILE_Debug ) Message("Position %ld", filepos);
 
-  return (filepos);
+  return filepos;
 }
 
 
 int fileSetPos(int fileID, off_t offset, int whence)
 {
   int status = 0;
-  bfile_t *fileptr;
-
-  fileptr = file_to_pointer(fileID);
+  bfile_t *fileptr = file_to_pointer(fileID);
 
   if ( FILE_Debug ) Message("Offset %8ld  Whence %3d", (long) offset, whence);
 
   if ( fileptr == 0 )
     {
       file_pointer_info(__func__, fileID);
-      return (1);
+      return 1;
     }
 
   switch (whence)
@@ -593,19 +557,17 @@ int fileSetPos(int fileID, off_t offset, int whence)
     if ( (fileptr->flag & FILE_EOF) != 0 )
       fileptr->flag -= FILE_EOF;
 
-  return (status);
+  return status;
 }
 
 static
 void file_table_print(void)
 {
-  int fileID;
   int lprintHeader = 1;
-  bfile_t *fileptr;
 
-  for ( fileID = 0; fileID < _file_max; fileID++ )
+  for ( int fileID = 0; fileID < _file_max; fileID++ )
     {
-      fileptr = file_to_pointer(fileID);
+      bfile_t *fileptr = file_to_pointer(fileID);
 
       if ( fileptr )
 	{
@@ -652,43 +614,34 @@ void file_table_print(void)
 
 char *fileInqName(int fileID)
 {
-  bfile_t *fileptr;
   char *name = NULL;
-
-  fileptr = file_to_pointer(fileID);
-
+  bfile_t *fileptr = file_to_pointer(fileID);
   if ( fileptr ) name = fileptr->name;
 
-  return (name);
+  return name;
 }
 
 
 int fileInqMode(int fileID)
 {
-  bfile_t *fileptr;
   int mode = 0;
-
-  fileptr = file_to_pointer(fileID);
-
+  bfile_t *fileptr = file_to_pointer(fileID);
   if ( fileptr ) mode = fileptr->mode;
 
-  return (mode);
+  return mode;
 }
 
 static
 long file_getenv(const char *envName)
 {
-  char *envString;
   long envValue = -1;
   long fact = 1;
 
-  envString = getenv(envName);
+  char *envString = getenv(envName);
 
   if ( envString )
     {
-      int loop;
-
-      for ( loop = 0; loop < (int) strlen(envString); loop++ )
+      for ( int loop = 0; loop < (int) strlen(envString); loop++ )
 	{
 	  if ( ! isdigit((int) envString[loop]) )
 	    {
@@ -711,14 +664,13 @@ long file_getenv(const char *envName)
       if ( FILE_Debug ) Message("Set %s to %ld", envName, envValue);
     }
 
-  return (envValue);
+  return envValue;
 }
 
 static
 void file_initialize(void)
 {
   long value;
-  char *envString;
 
 #if  defined  (HAVE_LIBPTHREAD)
   /* initialize global API mutex lock */
@@ -734,7 +686,7 @@ void file_initialize(void)
   if ( FILE_Debug )
     Message("FILE_MAX = %d", _file_max);
 
-  FileInfo  = (int) file_getenv("FILE_INFO");
+  FileInfo = file_getenv("FILE_INFO") > 0;
 
   value  = file_getenv("FILE_BUFSIZE");
   if ( value >= 0 ) FileBufferSizeEnv = value;
@@ -775,7 +727,7 @@ void file_initialize(void)
 #if defined (O_NONBLOCK)
   FileFlagWrite = O_NONBLOCK;
 #endif
-  envString = getenv("FILE_FLAG_WRITE");
+  char *envString = getenv("FILE_FLAG_WRITE");
   if ( envString )
     {
 #if defined (O_NONBLOCK)
@@ -815,7 +767,7 @@ void file_initialize(void)
 
   if ( FILE_Debug ) atexit(file_table_print);
 
-  _file_init = TRUE;
+  _file_init = true;
 }
 
 static
@@ -891,20 +843,18 @@ static
 int file_fill_buffer(bfile_t *fileptr)
 {
   ssize_t nread;
-  int fd;
   long offset = 0;
-  off_t retseek;
 
   if ( FILE_Debug )
     Message("file ptr = %p  Cnt = %ld", fileptr, fileptr->bufferCnt);
 
-  if ( (fileptr->flag & FILE_EOF) != 0 ) return (EOF);
+  if ( (fileptr->flag & FILE_EOF) != 0 ) return EOF;
 
   if ( fileptr->buffer == NULL ) file_set_buffer(fileptr);
 
-  if ( fileptr->bufferSize == 0 ) return (EOF);
+  if ( fileptr->bufferSize == 0 ) return EOF;
 
-  fd = fileptr->fd;
+  int fd = fileptr->fd;
 
 #if defined (HAVE_MMAP)
   if ( fileptr->bufferType == FILE_BUFTYPE_MMAP )
@@ -915,15 +865,14 @@ int file_fill_buffer(bfile_t *fileptr)
 	}
       else
 	{
-          xassert(fileptr->bufferSize <= SIZE_MAX);
+          xassert(fileptr->bufferSize <= SSIZE_MAX);
 	  nread = (ssize_t)fileptr->bufferSize;
 	  if ( (nread + fileptr->bufferPos) > fileptr->size )
 	    nread = fileptr->size - fileptr->bufferPos;
 
 	  if ( fileptr->buffer )
 	    {
-              int ret;
-	      ret = munmap(fileptr->buffer, fileptr->mappedSize);
+              int ret = munmap(fileptr->buffer, fileptr->mappedSize);
 	      if ( ret == -1 ) SysError("munmap error for read %s", fileptr->name);
 	      fileptr->buffer = NULL;
 	    }
@@ -940,22 +889,19 @@ int file_fill_buffer(bfile_t *fileptr)
   else
 #endif
     {
-      retseek = lseek(fileptr->fd, fileptr->bufferPos, SEEK_SET);
+      off_t retseek = lseek(fileptr->fd, fileptr->bufferPos, SEEK_SET);
       if ( retseek == (off_t)-1 )
 	SysError("lseek error at pos %ld file %s", (long) fileptr->bufferPos, fileptr->name);
 
       nread = read(fd, fileptr->buffer, fileptr->bufferSize);
+      if ( nread > 0 ) offset = fileptr->position - fileptr->bufferPos;
     }
 
   if ( nread <= 0 )
     {
-      if ( nread == 0 )
-	fileptr->flag |= FILE_EOF;
-      else
-	fileptr->flag |= FILE_ERROR;
-
+      fileptr->flag |= (nread == 0) ? FILE_EOF : FILE_ERROR;
       fileptr->bufferCnt = 0;
-      return (EOF);
+      return EOF;
     }
 
   fileptr->bufferPtr = fileptr->buffer;
@@ -987,7 +933,7 @@ int file_fill_buffer(bfile_t *fileptr)
 
   fileptr->bufferNumFill++;
 
-  return ((unsigned char) *fileptr->bufferPtr);
+  return (unsigned char) *fileptr->bufferPtr;
 }
 
 static
@@ -1018,7 +964,7 @@ void file_copy_from_buffer(bfile_t *fileptr, void *ptr, size_t size)
 static
 size_t file_read_from_buffer(bfile_t *fileptr, void *ptr, size_t size)
 {
-  size_t nread, rsize;
+  size_t nread;
   size_t offset = 0;
 
   if ( FILE_Debug )
@@ -1027,7 +973,7 @@ size_t file_read_from_buffer(bfile_t *fileptr, void *ptr, size_t size)
   if ( ((long)fileptr->bufferCnt) < 0L )
     Error("Internal problem. bufferCnt = %ld", (long) fileptr->bufferCnt);
 
-  rsize = size;
+  size_t rsize = size;
 
   while ( fileptr->bufferCnt < rsize )
     {
@@ -1080,13 +1026,12 @@ int fileOpen_serial(const char *filename, const char *mode)
   FILE *fp = NULL;    /* file pointer    (used for write) */
   int fd = -1;        /* file descriptor (used for read)  */
   int fileID = FILE_UNDEFID;
-  int fmode = 0;
   struct stat filestat;
   bfile_t *fileptr = NULL;
 
   FILE_INIT();
 
-  fmode = tolower((int) mode[0]);
+  int fmode = tolower((int) mode[0]);
 
   switch ( fmode )
     {
@@ -1113,7 +1058,7 @@ int fileOpen_serial(const char *filename, const char *mode)
 
   if ( fp )
     {
-      if ( stat(filename, &filestat) != 0 ) return (fileID);
+      if ( stat(filename, &filestat) != 0 ) return fileID;
 
       fileptr = file_new_entry();
       if ( fileptr )
@@ -1124,7 +1069,7 @@ int fileOpen_serial(const char *filename, const char *mode)
     }
   else if ( fd >= 0 )
     {
-      if ( fstat(fd, &filestat) != 0 ) return (fileID);
+      if ( fstat(fd, &filestat) != 0 ) return fileID;
 
       fileptr = file_new_entry();
       if ( fileptr )
@@ -1160,7 +1105,7 @@ int fileOpen_serial(const char *filename, const char *mode)
 	Message("File %s opened with ID %d", filename, fileID);
     }
 
-  return (fileID);
+  return fileID;
 }
 
 /*
@@ -1175,7 +1120,6 @@ int fileClose(int fileID)
 
 int fileClose_serial(int fileID)
 {
-  char *name;
   int ret;
   const char *fbtname[] = {"unknown", "standard", "mmap"};
   const char *ftname[] = {"unknown", "open", "fopen"};
@@ -1185,15 +1129,15 @@ int fileClose_serial(int fileID)
   if ( fileptr == NULL )
     {
       file_pointer_info(__func__, fileID);
-      return (1);
+      return 1;
     }
 
-  name = fileptr->name;
+  char *name = fileptr->name;
 
   if ( FILE_Debug )
     Message("fileID = %d  filename = %s", fileID, name);
 
-  if ( FileInfo > 0 )
+  if ( FileInfo )
     {
       fprintf(stderr, "____________________________________________\n");
       fprintf(stderr, " file ID          : %d\n",  fileID);
@@ -1232,9 +1176,7 @@ int fileClose_serial(int fileID)
 	}
 
       if ( fileptr->time_in_sec > 0 )
-        {
-          rout = (double)fileptr->byteTrans / (1024.*1024.*fileptr->time_in_sec);
-        }
+        rout = (double)fileptr->byteTrans / (1024.*1024.*fileptr->time_in_sec);
 
       fprintf(stderr, " wall time [s]    : %.2f\n", fileptr->time_in_sec);
       fprintf(stderr, " data rate [MB/s] : %.1f\n", rout);
@@ -1277,22 +1219,20 @@ int fileClose_serial(int fileID)
 
   file_delete_entry(fileptr);
 
-  return (0);
+  return 0;
 }
 
 
 int filePtrGetc(void *vfileptr)
 {
   int ivalue = EOF;
-  int fillret = 0;
   bfile_t *fileptr = (bfile_t *) vfileptr;
 
   if ( fileptr )
     {
       if ( fileptr->mode == 'r' && fileptr->type == FILE_TYPE_OPEN )
 	{
-	  if ( fileptr->bufferCnt == 0 ) fillret = file_fill_buffer(fileptr);
-
+	  int fillret = (fileptr->bufferCnt == 0) ? file_fill_buffer(fileptr) : 0;
 	  if ( fillret >= 0 )
 	    {
 	      ivalue = (unsigned char) *fileptr->bufferPtr++;
@@ -1316,20 +1256,14 @@ int filePtrGetc(void *vfileptr)
 	}
     }
 
-  return (ivalue);
+  return ivalue;
 }
 
 
 int fileGetc(int fileID)
 {
-  int ivalue;
-  bfile_t *fileptr;
-
-  fileptr = file_to_pointer(fileID);
-
-  ivalue = filePtrGetc((void *)fileptr);
-
-  return (ivalue);
+  bfile_t *fileptr = file_to_pointer(fileID);
+  return filePtrGetc((void *)fileptr);
 }
 
 
@@ -1346,12 +1280,7 @@ size_t filePtrRead(void *vfileptr, void *restrict ptr, size_t size)
 	{
 	  nread = fread(ptr, 1, size, fileptr->fp);
 	  if ( nread != size )
-	    {
-	      if ( nread == 0 )
-		fileptr->flag |= FILE_EOF;
-	      else
-		fileptr->flag |= FILE_ERROR;
-	    }
+            fileptr->flag |= (nread == 0) ? FILE_EOF : FILE_ERROR;
 	}
 
       fileptr->position  += (off_t)nread;
@@ -1361,16 +1290,14 @@ size_t filePtrRead(void *vfileptr, void *restrict ptr, size_t size)
 
   if ( FILE_Debug ) Message("size %ld  nread %ld", size, nread);
 
-  return (nread);
+  return nread;
 }
 
 
 size_t fileRead(int fileID, void *restrict ptr, size_t size)
 {
   size_t nread = 0;
-  bfile_t *fileptr;
-
-  fileptr = file_to_pointer(fileID);
+  bfile_t *fileptr = file_to_pointer(fileID);
 
   if ( fileptr )
     {
@@ -1401,23 +1328,19 @@ size_t fileRead(int fileID, void *restrict ptr, size_t size)
 
   if ( FILE_Debug ) Message("size %ld  nread %ld", size, nread);
 
-  return (nread);
+  return nread;
 }
 
 
 size_t fileWrite(int fileID, const void *restrict ptr, size_t size)
 {
   size_t nwrite = 0;
-  bfile_t *fileptr;
-
-  fileptr = file_to_pointer(fileID);
+  bfile_t *fileptr = file_to_pointer(fileID);
 
   if ( fileptr )
     {
       double t_begin = 0.0;
 
-      /* if ( fileptr->buffer == NULL ) file_set_buffer(fileptr); */
-
       if ( FileInfo ) t_begin = file_time();
 
       if ( fileptr->type == FILE_TYPE_FOPEN )
@@ -1441,7 +1364,7 @@ size_t fileWrite(int fileID, const void *restrict ptr, size_t size)
       fileptr->access++;
     }
 
-  return (nwrite);
+  return nwrite;
 }
 /*
  * Local Variables:
diff --git a/src/getline.c b/src/getline.c
index a77178678d0260c141a8443059516966e1da646d..1630cd8220dda154b6dfbc7f42bb298382b0a968 100644
--- a/src/getline.c
+++ b/src/getline.c
@@ -30,7 +30,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <stdint.h>
+#include <limits.h>
 #include <unistd.h>
 #include <string.h>
 #include <limits.h>
@@ -83,7 +83,7 @@ getline(char **linebuf, size_t *linebuf_size, FILE *fp)
               && (len += strlen(buf + len)) > old_len
               && buf[len-1] != '\n');
     }
-    status = len > SIZE_MAX ? SIZE_MAX : (ssize_t)len;
+    status = len > SSIZE_MAX ? SSIZE_MAX : (ssize_t)len;
   }
   if (linebuf_size)
     *linebuf_size = buf_size;
diff --git a/src/grb_read.c b/src/grb_read.c
index 2c1bc98070949ba31215e6c062c29ab4ed5f23dd..787dd65d02c58832301db22e5de8c3ba374205db 100644
--- a/src/grb_read.c
+++ b/src/grb_read.c
@@ -12,7 +12,6 @@
 #include "stream_gribapi.h"
 #include "file.h"
 #include "cgribex.h"  /* gribZip gribGetZip gribGinfo */
-#include "gribapi.h"
 #include "namespace.h"
 
 
diff --git a/src/grb_write.c b/src/grb_write.c
index 647763558859d2471fa4ae1e10c2b86db8bcf432..c868ac6c61396074d4d6601dd60fda0ede3031a8 100644
--- a/src/grb_write.c
+++ b/src/grb_write.c
@@ -7,12 +7,12 @@
 #include "dmemory.h"
 #include "cdi.h"
 #include "cdi_int.h"
+#include "gribapi.h"
 #include "stream_cgribex.h"
 #include "stream_grb.h"
 #include "stream_gribapi.h"
 #include "file.h"
 #include "cgribex.h"  /* gribZip gribGetZip gribGinfo */
-#include "gribapi.h"
 #include "namespace.h"
 
 
@@ -116,6 +116,89 @@ void grbCopyRecord(stream_t * streamptr2, stream_t * streamptr1)
 
   size_t nbytes = recsize;
 
+  if ( filetype == CDI_FILETYPE_GRB )
+    {
+      if ( cdiGribChangeParameterID.active )
+        {
+          // Even if you are stream-copy records you might need to change a bit of grib-header !
+#if defined HAVE_LIBCGRIBEX
+          void *gh = cgribex_handle_new_from_meassage((void*) gribbuffer, recsize);
+          cgribexChangeParameterIdentification(gh, cdiGribChangeParameterID.code, cdiGribChangeParameterID.ltype, cdiGribChangeParameterID.lev);
+          cgribex_handle_delete(gh);
+#elif defined HAVE_LIBGRIB_API
+          void *gh = (void*)grib_handle_new_from_message(NULL, (void*) gribbuffer, recsize);
+          gribapiChangeParameterIdentification(gh, cdiGribChangeParameterID.code, cdiGribChangeParameterID.ltype, cdiGribChangeParameterID.lev);
+          grib_handle_delete(gh);
+#endif
+          cdiGribChangeParameterID.active = false; // after grib attributes have been changed turn it off again
+        }
+    }
+
+#ifdef HIRLAM_EXTENSIONS
+  // Even if you are stream-copy records you might need to change a bit of grib-header !
+
+  if ( cdiGribDataScanningMode.active )
+    // allowed modes: <0, 64, 96>; Default is 64
+    // This will overrule the old scanning mode of the given grid
+  {
+    grib_handle *gh = NULL;
+    gh = grib_handle_new_from_message(NULL, (void *) gribbuffer, recsize);
+
+    int scanModeIN = gribapiGetScanningMode(gh);
+
+    grib_handle_delete(gh);
+
+    if (cdiDebugExt>=20) Message("Change GribDataScanningMode => %d (scanModeIN = %d)", cdiGribDataScanningMode.value, scanModeIN);
+
+    if (scanModeIN != cdiGribDataScanningMode.value)
+    {
+        int gridID;
+        int varID, levelID;
+        int vlistID;
+        //int zip;
+        int gridsize, nmiss = 0;
+
+        vlistID = streamptr1->vlistID;
+        varID   = streamptr1->tsteps[tsID].records[recID].varID;
+        levelID   = streamptr1->tsteps[tsID].records[recID].levelID;
+        //gribbuffer = (unsigned char *) streamptr->record->buffer;
+        // allocate above ..
+        gridID   = vlistInqVarGrid(vlistID, varID);
+        gridsize = gridInqSize(gridID);
+
+        gridsize = vlistGridsizeMax(vlistID);
+        if ( vlistNumber(vlistID) != CDI_REAL ) gridsize *= 2;
+        double * data = (double *) malloc(gridsize*sizeof(double));
+        //int missval = vlistInqVarMissval(vlistID, varID);
+
+        //streamptr->numvals += gridsize;
+
+        // memtype: MEMTYPE_FLOAT or MEMTYPE_DOUBLE
+        //int statusDC = grbDecode(filetype, MEMTYPE_DOUBLE, gribbuffer, recsize, data, gridsize, streamptr1->unreduced, &nmiss, missval, vlistID, varID);
+        //int grbDecode(int filetype, int memtype, void *gribbuffer, int gribsize, void *data, size_t datasize,
+        //              int unreduced, int *nmiss, double missval, int vlistID, int varID);
+
+        //streamptr1->tsteps[tsID].records[recID].zip = zip;
+        //gribapiSetScanningMode(gh, cdoGribDataScanningMode);  // T.B.D. this will be done by grbDecode..
+
+        //varID   = streamptr1->record->varID;
+        //levelID = streamptr1->record->levelID;
+
+        if (cdiDebugExt>=20) Message(" processing varID %d; levelID %d",varID,levelID);
+
+        grb_write_var_slice(streamptr2, varID, levelID, MEMTYPE_DOUBLE, (const void *) data, nmiss);
+        //grb_write_var_slice(streamptr, varID, levelID, memtype, ((double*)data)+levelID*gridsize, nmiss);
+
+        //grb_write_var(streamptr2, varID, MEMTYPE_DOUBLE, data, nmiss);
+        //grb_write_var(stream_t *streamptr, int varID, int memtype, const void *data, int nmiss)
+        //grb_write_var_slice(streamptr2, varID, levelID, MEMTYPE_DOUBLE, (const void *) data, nmiss);
+
+        free(data);
+        free(gribbuffer);
+    }
+  }
+#endif // HIRLAM_EXTENSIONS
+
   if ( filetype == CDI_FILETYPE_GRB )
     {
       size_t unzipsize;
@@ -153,9 +236,7 @@ void grb_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtyp
   int tsID      = streamptr->curTsID;
   int date      = streamptr->tsteps[tsID].taxis.vdate;
   int time      = streamptr->tsteps[tsID].taxis.vtime;
-  int numavg    = 0;
-  if ( vlistInqVarTimave(vlistID, varID) )
-    numavg = streamptr->tsteps[tsID].taxis.numavg;
+  int numavg    = (tsteptype == TSTEP_AVG) ? streamptr->tsteps[tsID].taxis.numavg : 0;
 
   if ( CDI_Debug )
     Message("gridID = %d zaxisID = %d", gridID, zaxisID);
diff --git a/src/gribapi.h b/src/gribapi.h
index 0a1db9a49f47bffd59bcb5d0df1ad9233a925369..57d0780efc476373b95d2afd429d6449b7594af2 100644
--- a/src/gribapi.h
+++ b/src/gribapi.h
@@ -3,7 +3,7 @@
 
 #ifdef HAVE_LIBGRIB_API
 #include <grib_api.h>
-#ifndef  _ERROR_H
+#ifndef  ERROR_H
 #include "error.h"
 #endif
 #endif
diff --git a/src/gribapi_utilities.c b/src/gribapi_utilities.c
index fffb30aa796229af3385ce3123fb7194c58cf401..5619f4d4a0cc04be975aeb5964b3acbf4cf00319 100644
--- a/src/gribapi_utilities.c
+++ b/src/gribapi_utilities.c
@@ -28,28 +28,29 @@
 //A simple wrapper for grib_get_string() that returns a newly allocated string.
 char* gribCopyString(grib_handle* gribHandle, const char* key)
 {
-  char* result = NULL;
   size_t length;
 #ifdef HAVE_GRIB_GET_LENGTH
-  if(!grib_get_length(gribHandle, key, &length))
+  if (!grib_get_length(gribHandle, key, &length))
     {
-    char* result = (char *) Malloc(length);
-    if(!grib_get_string(gribHandle, key, result, &length))
-    result = (char *) Realloc(result, length);
-
-    else
-      {
+      char *result = (char *)Malloc(length);
+      if (!grib_get_string(gribHandle, key, result, &length))
+        result = (char *) Realloc(result, length);
+      else
+        {
           Free(result);
           result = NULL;
-      }
+        }
+      return result;
     }
+  else
+    return NULL;
 #else
   length = 1024;         /* there's an implementation limit
                           * that makes strings longer than
                           * this unlikely in grib_api versions
                           * not providing grib_get_length */
   int rc;
-  result = (char *) Malloc(length);
+  char *result = (char *) Malloc(length);
   while ((rc = grib_get_string(gribHandle, key, result, &length))
          == GRIB_BUFFER_TOO_SMALL || rc == GRIB_ARRAY_TOO_SMALL)
     {
@@ -68,8 +69,8 @@ char* gribCopyString(grib_handle* gribHandle, const char* key)
       Free(result);
       result = NULL;
     }
-#endif
   return result;
+#endif
 }
 
 //A simple wrapper for grib_get_string() for the usecase that the result is only compared to a given constant string.
@@ -122,8 +123,8 @@ long gribGetLong(grib_handle* gh, const char* key)
 long gribGetLongDefault(grib_handle* gribHandle, const char* key, long defaultValue)
 {
   long result;
-  if(grib_get_long(gribHandle, key, &result)) return defaultValue;
-  if(result == GRIB_MISSING_LONG) return defaultValue;
+  if ( grib_get_long(gribHandle, key, &result) || result == GRIB_MISSING_LONG )
+    result = defaultValue;
   return result;
 }
 
@@ -139,8 +140,9 @@ double gribGetDouble(grib_handle* gh, const char* key)
 double gribGetDoubleDefault(grib_handle* gribHandle, const char* key, double defaultValue)
 {
   double result;
-  if(grib_get_double(gribHandle, key, &result)) return defaultValue;
-  if(IS_EQUAL(result, GRIB_MISSING_DOUBLE)) return defaultValue;
+  if ( grib_get_double(gribHandle, key, &result)
+       || IS_EQUAL(result, GRIB_MISSING_DOUBLE) )
+    result = defaultValue;
   return result;
 }
 
@@ -380,6 +382,48 @@ int gribapiGetTsteptype(grib_handle *gh)
 
           // printf("stepType: %s %ld %d\n", stepType, len, tsteptype);
         }
+#ifdef HIRLAM_EXTENSIONS
+      {
+      // Normaly cdo looks in grib for attribute called "stepType", see above.
+      // BUT NWP models such as Hirlam and Harmonie 37h1.2, use "timeRangeIndicator" instead!
+      // Where for example:       0: for instanteneous fields; 4: for accumulated fields
+      //  0:   Forecast product valid at reference time + P1
+      //  2:   Product with a valid time ranging between reference time + P1 and reference time + P2
+      //  4:   Accumulation (reference time + P1 to reference time + P2)
+      //  5:   Difference(reference time + P2 minus reference time + P1) product considered valid at reference time + P2
+      // More details on WMO standards:
+      //               http://www.wmo.int/pages/prog/www/WDM/Guides/Guide-binary-2.html
+      //tsteptype = TSTEP_INSTANT;  // default value for any case
+      long timeRangeIND = 0; // typically 0: for instanteneous fields; 4: for accumulated fields
+      int rc = grib_get_long(gh, "timeRangeIndicator", &timeRangeIND);
+      if (rc != 0) {
+            //if ( lprint )
+            Warning("Could not get 'stepType' either 'timeRangeIndicator'. Using defualt!");
+            return (tsteptype);
+      }
+      extern int cdiGribUseTimeRangeIndicator;
+      cdiGribUseTimeRangeIndicator = 1;
+      switch ( timeRangeIND )
+          {
+              case 0:  tsteptype = TSTEP_INSTANT; break;
+              case 2:  tsteptype = TSTEP_INSTANT2;
+                       strcpy(stepType, "instant2");  // was incorrectly set before into accum
+                       break;
+              case 4:  tsteptype = TSTEP_ACCUM; break;
+              case 5:  tsteptype = TSTEP_DIFF; break;
+              default:
+                if ( lprint )
+                {
+                  if (CDI_Debug)
+                      Warning("timeRangeIND = %d;  stepType= %s; tsteptype=%d unsupported timeRangeIND at the moment, set to instant!", timeRangeIND, stepType, tsteptype);
+                  lprint = FALSE;
+                }
+                break;
+          }
+      if (CDI_Debug)
+          Warning("timeRangeIND = %d;  stepType= %s; tsteptype=%d", timeRangeIND, stepType, tsteptype);
+      }
+#endif // HIRLAM_EXTENSIONS
     }
 
   return tsteptype;
@@ -454,6 +498,11 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
   long editionNumber = gribEditionNumber(gh);
   int gridtype = gribapiGetGridType(gh);
   int projtype = (gridtype == GRID_PROJECTION && gribapiGetIsRotated(gh)) ? CDI_PROJ_RLL : CDI_UNDEFID;
+  if ( gridtype == GRID_LCC )
+    {
+      gridtype = GRID_PROJECTION;
+      projtype = CDI_PROJ_LCC;
+    }
   /*
   if ( streamptr->unreduced && gridtype == GRID_GAUSSIAN_REDUCED )
     {
@@ -487,7 +536,7 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
       if ( numberOfPoints != nlon*nlat )
         Error("numberOfPoints (%ld) and gridSize (%ld) differ!", numberOfPoints, nlon*nlat);
 
-      grid->size  = (int)numberOfPoints;
+      grid->size   = (int)numberOfPoints;
       grid->x.size = (int)nlon;
       grid->y.size = (int)nlat;
       grid->x.inc  = 0;
@@ -502,17 +551,19 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
       if ( gridtype == GRID_LONLAT && nlat > 1 )
         FAIL_ON_GRIB_ERROR(grib_get_double, gh, "jDirectionIncrementInDegrees", &grid->y.inc);
 
+      long iscan, jscan;
+      FAIL_ON_GRIB_ERROR(grib_get_long, gh, "iScansNegatively", &iscan);
+      FAIL_ON_GRIB_ERROR(grib_get_long, gh, "jScansPositively", &jscan);
+      if (  iscan ) grid->x.inc = - grid->x.inc;
+      if ( !jscan ) grid->y.inc = - grid->y.inc;
+
       if ( grid->x.inc < -999 || grid->x.inc > 999 ) grid->x.inc = 0;
       if ( grid->y.inc < -999 || grid->y.inc > 999 ) grid->y.inc = 0;
 
-      if ( grid->y.inc > 0 && grid->y.first > grid->y.last ) grid->y.inc = -grid->y.inc;
-
       /* if ( IS_NOT_EQUAL(grid->x.first, 0) || IS_NOT_EQUAL(grid->x.last, 0) ) */
       {
         if ( grid->x.size > 1 )
           {
-            if ( (grid->x.first >= grid->x.last) && (grid->x.first >= 180) ) grid->x.first -= 360;
-
             if ( editionNumber <= 1 )
               {
                 /* correct xinc if necessary */
@@ -605,13 +656,12 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
         grid->y.flag = 2;
       }
     }
-  else if ( gridtype == GRID_LCC )
+  else if ( projtype == CDI_PROJ_LCC )
     {
-      int nlon, nlat;
       FAIL_ON_GRIB_ERROR(grib_get_long, gh, "Nx", &lpar);
-      nlon = (int)lpar;
+      int nlon = (int)lpar;
       FAIL_ON_GRIB_ERROR(grib_get_long, gh, "Ny", &lpar);
-      nlat = (int)lpar;
+      int nlat = (int)lpar;
 
       if ( numberOfPoints != nlon*nlat )
         Error("numberOfPoints (%d) and gridSize (%d) differ!", (int)numberOfPoints, nlon*nlat);
@@ -620,24 +670,18 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
       grid->x.size = nlon;
       grid->y.size = nlat;
 
-      FAIL_ON_GRIB_ERROR(grib_get_double, gh, "DxInMetres", &grid->lcc.xinc);
-      FAIL_ON_GRIB_ERROR(grib_get_double, gh, "DyInMetres", &grid->lcc.yinc);
-      FAIL_ON_GRIB_ERROR(grib_get_double, gh, "longitudeOfFirstGridPointInDegrees", &grid->lcc.originLon);
-      FAIL_ON_GRIB_ERROR(grib_get_double, gh, "latitudeOfFirstGridPointInDegrees", &grid->lcc.originLat);
-      FAIL_ON_GRIB_ERROR(grib_get_double, gh, "LoVInDegrees", &grid->lcc.lonParY);
-      FAIL_ON_GRIB_ERROR(grib_get_double, gh, "Latin1InDegrees", &grid->lcc.lat1);
-      FAIL_ON_GRIB_ERROR(grib_get_double, gh, "Latin2InDegrees", &grid->lcc.lat2);
-
-      if ( editionNumber <= 1 )
-        {
-          FAIL_ON_GRIB_ERROR(grib_get_long, gh, "projectionCenterFlag", &lpar);
-          grid->lcc.projflag  = (int) lpar;
-          FAIL_ON_GRIB_ERROR(grib_get_long, gh, "scanningMode", &lpar);
-          grid->lcc.scanflag  = (int) lpar;
-        }
-
-      grid->x.flag = 0;
-      grid->y.flag = 0;
+      double xinc, yinc;
+      FAIL_ON_GRIB_ERROR(grib_get_double, gh, "DxInMetres", &xinc);
+      FAIL_ON_GRIB_ERROR(grib_get_double, gh, "DyInMetres", &yinc);
+
+      grid->x.first = 0;
+      grid->x.last  = 0;
+      grid->x.inc   = xinc;
+      grid->y.first = 0;
+      grid->y.last  = 0;
+      grid->y.inc   = yinc;
+      grid->x.flag  = 2;
+      grid->y.flag  = 2;
     }
   else if ( gridtype == GRID_SPECTRAL )
     {
@@ -713,6 +757,47 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
       Error("Unsupported grid type: %s", gridNamePtr(gridtype));
     }
 
+  if ( gridtype == GRID_GAUSSIAN || gridtype == GRID_LONLAT || gridtype == GRID_PROJECTION )
+    {
+      long temp;
+      GRIB_CHECK(grib_get_long(gh, "uvRelativeToGrid", &temp), 0);
+      assert(temp == 0 || temp == 1);
+      grid->uvRelativeToGrid = (bool)temp;
+    }
+
+  if ( gridtype == GRID_GAUSSIAN || gridtype == GRID_LONLAT || gridtype == GRID_PROJECTION )
+    {
+      long temp;
+      GRIB_CHECK(grib_get_long(gh, "iScansNegatively", &temp), 0);
+      grid->iScansNegatively = (bool)temp;
+      GRIB_CHECK(grib_get_long(gh, "jScansPositively", &temp), 0);
+      grid->jScansPositively = (bool)temp;
+      GRIB_CHECK(grib_get_long(gh, "jPointsAreConsecutive", &temp), 0);
+      grid->jPointsAreConsecutive = (bool)temp;
+      grid->scanningMode = 128*grid->iScansNegatively + 64*grid->jScansPositively + 32*grid->jPointsAreConsecutive;
+      /* scanningMode  = 128 * iScansNegatively + 64 * jScansPositively + 32 * jPointsAreConsecutive;
+                   64  = 128 * 0                + 64 *        1         + 32 * 0
+                   00  = 128 * 0                + 64 *        0         + 32 * 0
+                   96  = 128 * 0                + 64 *        1         + 32 * 1
+         Default / implicit scanning mode is 64:
+                            i and j scan positively, i points are consecutive (row-major)        */
+#ifdef HIRLAM_EXTENSIONS
+      if (cdiDebugExt>=30)
+      {
+        //  indicatorOfParameter=33,indicatorOfTypeOfLevel=105,level
+        long paramId, levelTypeId, levelId;
+        GRIB_CHECK(grib_get_long(gh, "indicatorOfParameter", &paramId), 0);
+        GRIB_CHECK(grib_get_long(gh, "indicatorOfTypeOfLevel", &levelTypeId), 0);
+        GRIB_CHECK(grib_get_long(gh, "level", &levelId), 0);
+        Message("(param,ltype,level) = (%3d,%3d,%4d); Scanning mode = %02d -> bits:(%1d.%1d.%1d)*32;  uvRelativeToGrid = %02d",\
+                (int)paramId, (int)levelTypeId, (int)levelId,
+                grid->scanningMode,grid->jPointsAreConsecutive,
+                grid->jScansPositively,grid->iScansNegatively,
+                grid->uvRelativeToGrid);
+      }
+#endif //HIRLAM_EXTENSIONS
+    }
+
   grid->type  = gridtype;
   grid->projtype  = projtype;
 }
diff --git a/src/gribapi_utilities.h b/src/gribapi_utilities.h
index b9f20840f15f4292d5a41500b41637e439a0f808..2495f8315f6480ca8ee6548e0bd30c47145013e6 100644
--- a/src/gribapi_utilities.h
+++ b/src/gribapi_utilities.h
@@ -33,6 +33,11 @@ int gribapiGetParam(grib_handle *gh);
 int gribapiGetGridType(grib_handle *gh);
 void gribapiGetGrid(grib_handle *gh, grid_t *grid);
 
+#ifdef HIRLAM_EXTENSIONS
+void gribapiSetDataTimeRangeIndicator(grib_handle *gh, int timeRangeIndicator);
+void gribapiGetDataTimeRangeIndicator(grib_handle *gh, int *timeRangeIndicator);
+#endif // #ifdef HIRLAM_EXTENSIONS
+
 #endif
 
 #endif
diff --git a/src/grid.c b/src/grid.c
index fb64c102000192f9f5d6dedc64095aa1997e7aec..c2b77ecf42570685f0b13c44f65c2c6301d5fc8d 100644
--- a/src/grid.c
+++ b/src/grid.c
@@ -20,6 +20,9 @@
 #include "serialize.h"
 #include "vlist.h"
 
+double grid_missval = -9999.;
+int (*proj_lonlat_to_lcc_func)() = NULL;
+int (*proj_lcc_to_lonlat_func)() = NULL;
 
 /* the value in the second pair of brackets must match the length of
  * the longest string (including terminating NUL) */
@@ -83,6 +86,29 @@ grid_t *grid_to_pointer(int gridID)
 
 #define gridMark4Update(gridID) reshSetStatus(gridID, &gridOps, RESH_DESYNC_IN_USE)
 
+static
+bool cdiInqAttConvertedToFloat(int gridID, int atttype, const char *attname, int attlen, double *attflt)
+{
+  bool status = true;
+
+  if ( atttype == CDI_DATATYPE_INT32 )
+    {
+      int attint[attlen];
+      cdiInqAttInt(gridID, CDI_GLOBAL, attname, attlen, attint);
+      for ( int i = 0; i < attlen; ++i ) attflt[i] = (double)attint[i];
+    }
+  else if ( atttype == CDI_DATATYPE_FLT32 || atttype == CDI_DATATYPE_FLT64 )
+    {
+      cdiInqAttFlt(gridID, CDI_GLOBAL, attname, attlen, attflt);
+    }
+  else
+    {
+      status = false;
+    }
+
+  return status;
+}
+
 
 void grid_init(grid_t *gridptr)
 {
@@ -107,17 +133,6 @@ void grid_init(grid_t *gridptr)
   gridptr->y.last        = 0.0;
   gridptr->y.inc         = 0.0;
 
-  gridptr->lcc.originLon = 0.0;
-  gridptr->lcc.originLat = 0.0;
-  gridptr->lcc.lonParY   = 0.0;
-  gridptr->lcc.lat1      = 0.0;
-  gridptr->lcc.lat2      = 0.0;
-  gridptr->lcc.xinc      = 0.0;
-  gridptr->lcc.yinc      = 0.0;
-  gridptr->lcc.projflag  = 0;
-  gridptr->lcc.scanflag  = 0;
-  gridptr->lcc.defined   = FALSE;
-
   gridptr->gme.nd        = 0;
   gridptr->gme.ni        = 0;
   gridptr->gme.ni2       = 0;
@@ -157,6 +172,17 @@ void grid_init(grid_t *gridptr)
   gridptr->vtable        = &cdiGridVtable;
   gridptr->atts.nalloc   = MAX_ATTRIBUTES;
   gridptr->atts.nelems   = 0;
+  gridptr->uvRelativeToGrid      = 0;   // Some models deliver wind U,V relative to the grid-cell
+  gridptr->iScansNegatively      = 0;
+  gridptr->jScansPositively      = 1;
+  gridptr->jPointsAreConsecutive = 0;
+  gridptr->scanningMode          = 128*gridptr->iScansNegatively + 64*gridptr->jScansPositively + 32*gridptr->jPointsAreConsecutive;
+  /* scanningMode  = 128 * iScansNegatively + 64 * jScansPositively + 32 * jPointsAreConsecutive;
+               64  = 128 * 0                + 64 *        1         + 32 * 0
+               00  = 128 * 0                + 64 *        0         + 32 * 0
+               96  = 128 * 0                + 64 *        1         + 32 * 1
+     Default / implicit scanning mode is 64:
+                        i and j scan positively, i points are consecutive (row-major)        */
 }
 
 
@@ -455,7 +481,7 @@ void gridGenYvals(int gridtype, int ysize, double yfirst, double ylast, double y
 @Parameter
     @Item  gridtype  The type of the grid, one of the set of predefined CDI grid types.
                      The valid CDI grid types are @func{GRID_GENERIC}, @func{GRID_GAUSSIAN},
-                     @func{GRID_LONLAT}, @func{GRID_LCC}, @func{GRID_SPECTRAL},
+                     @func{GRID_LONLAT}, @func{GRID_PROJECTION}, @func{GRID_SPECTRAL},
                      @func{GRID_GME}, @func{GRID_CURVILINEAR} and @func{GRID_UNSTRUCTURED}.
     @Item  size      Number of gridpoints.
 
@@ -998,6 +1024,13 @@ void gridVerifyProj(int gridID)
       gridSetName(gridptr->x.units, "degrees");
       gridSetName(gridptr->y.units, "degrees");
     }
+  else if ( projtype == CDI_PROJ_LCC )
+    {
+      gridptr->x.stdname = xystdname_tab[grid_xystdname_projection][0];
+      gridptr->y.stdname = xystdname_tab[grid_xystdname_projection][1];
+      gridSetName(gridptr->x.units, "m");
+      gridSetName(gridptr->y.units, "m");
+    }
 }
 
 /*
@@ -1015,7 +1048,7 @@ The function @func{gridInqType} returns the type of a Grid.
 @func{gridInqType} returns the type of the grid,
 one of the set of predefined CDI grid types.
 The valid CDI grid types are @func{GRID_GENERIC}, @func{GRID_GAUSSIAN},
-@func{GRID_LONLAT}, @func{GRID_LCC}, @func{GRID_SPECTRAL}, @func{GRID_GME},
+@func{GRID_LONLAT}, @func{GRID_PROJECTION}, @func{GRID_SPECTRAL}, @func{GRID_GME},
 @func{GRID_CURVILINEAR} and @func{GRID_UNSTRUCTURED}.
 
 @EndFunction
@@ -1794,13 +1827,11 @@ void gridInqParamRLL(int gridID, double *xpole, double *ypole, double *angle)
       for ( int iatt = 0; iatt < natts; ++iatt )
         {
           cdiInqAtt(gridID, CDI_GLOBAL, iatt, attname, &atttype, &attlen);
-
           if ( attlen != 1 ) continue;
 
-          if ( atttype == CDI_DATATYPE_FLT32 || atttype == CDI_DATATYPE_FLT64 )
+          double attflt;
+          if ( cdiInqAttConvertedToFloat(gridID, atttype, attname, attlen, &attflt) )
             {
-              double attflt;
-              cdiInqAttFlt(gridID, CDI_GLOBAL, attname, attlen, &attflt);
               if      ( strcmp(attname, "grid_north_pole_longitude") == 0 ) *xpole = attflt;
               else if ( strcmp(attname, "grid_north_pole_latitude")  == 0 ) *ypole = attflt;
               else if ( strcmp(attname, "north_pole_grid_longitude") == 0 ) *angle = attflt;
@@ -1827,7 +1858,7 @@ void gridDefParamRLL(int gridID, double xpole, double ypole, double angle)
 
   const char *mapping = "rotated_latitude_longitude";
   cdiGridDefKeyStr(gridID, CDI_KEY_MAPNAME, CDI_MAX_NAME, mapping);
-  cdiDefAttTxt(gridID, CDI_GLOBAL, "grid_mapping_name", strlen(mapping), mapping);
+  cdiDefAttTxt(gridID, CDI_GLOBAL, "grid_mapping_name", (int)(strlen(mapping)), mapping);
   cdiDefAttFlt(gridID, CDI_GLOBAL, "grid_north_pole_longitude", CDI_DATATYPE_FLT64, 1, &xpole);
   cdiDefAttFlt(gridID, CDI_GLOBAL, "grid_north_pole_latitude", CDI_DATATYPE_FLT64, 1, &ypole);
   if ( IS_NOT_EQUAL(angle, 0) ) cdiDefAttFlt(gridID, CDI_GLOBAL, "north_pole_grid_longitude", CDI_DATATYPE_FLT64, 1, &angle);
@@ -1909,11 +1940,12 @@ void gridChangeType(int gridID, int gridtype)
 static
 void grid_check_cyclic(grid_t *gridptr)
 {
-  gridptr->isCyclic = FALSE;
+  gridptr->isCyclic = 0;
   enum { numVertices = 4 };
   size_t xsize = gridptr->x.size >= 0 ? (size_t)gridptr->x.size : 0,
-    ysize = gridptr->y.size >= 0 ? (size_t)gridptr->y.size : 0;
+         ysize = gridptr->y.size >= 0 ? (size_t)gridptr->y.size : 0;
   const double *xvals = gridptr->vtable->inqXValsPtr(gridptr),
+               *yvals = gridptr->vtable->inqYValsPtr(gridptr),
     (*xbounds)[numVertices]
     = (const double (*)[numVertices])gridptr->vtable->inqXBoundsPtr(gridptr);
 
@@ -1928,23 +1960,31 @@ void grid_check_cyclic(grid_t *gridptr)
           double x0 = 2*xvals[xsize-1]-xvals[xsize-2]-360;
 
           if ( IS_NOT_EQUAL(xvals[0], xvals[xsize-1]) )
-            if ( fabs(x0 - xvals[0]) < 0.01*xinc ) gridptr->isCyclic = TRUE;
+            if ( fabs(x0 - xvals[0]) < 0.01*xinc ) gridptr->isCyclic = 1;
         }
     }
   else if ( gridptr->type == GRID_CURVILINEAR )
     {
-      if ( xvals && xsize > 1 )
+      bool lcheck = true;
+      if ( yvals && xvals )
+        {
+          if ( (fabs(yvals[0] - yvals[xsize-1]) > fabs(yvals[0] - yvals[xsize*ysize-xsize])) &&
+               (fabs(yvals[xsize*ysize-xsize] - yvals[xsize*ysize-1]) > fabs(yvals[xsize-1] - yvals[xsize*ysize-1])) )
+            lcheck = false;
+        }
+      else lcheck = false;
+
+      if ( lcheck && xvals && xsize > 1 )
         {
           size_t nc = 0;
           for ( size_t j = 0; j < ysize; ++j )
             {
               size_t i1 = j*xsize,
-                i2 = j*xsize+1,
-                in = j*xsize+(xsize-1);
+                     i2 = j*xsize+1,
+                     in = j*xsize+(xsize-1);
               double val1 = xvals[i1],
-                val2 = xvals[i2],
-                valn = xvals[in];
-
+                     val2 = xvals[i2],
+                     valn = xvals[in];
               double xinc = fabs(val2-val1);
 
 	      if ( val1 <    1 && valn > 300 ) val1 += 360;
@@ -1957,16 +1997,16 @@ void grid_check_cyclic(grid_t *gridptr)
 
               nc += fabs(x0-val1) < 0.5*xinc;
             }
-          gridptr->isCyclic = nc > ysize/2 ? TRUE : FALSE;
+          gridptr->isCyclic = nc > ysize/2;
         }
 
-      if ( xbounds && xsize > 1 )
+      if ( lcheck && xbounds && xsize > 1 )
 	{
           bool isCyclic = true;
 	  for ( size_t j = 0; j < ysize; ++j )
 	    {
 	      size_t i1 = j*xsize,
-                i2 = j*xsize+(xsize-1);
+                     i2 = j*xsize+(xsize-1);
 	      for (size_t k1 = 0; k1 < numVertices; ++k1 )
 		{
 		  double val1 = xbounds[i1][k1];
@@ -1990,7 +2030,7 @@ void grid_check_cyclic(grid_t *gridptr)
               foundCloseVertices:
               ;
 	    }
-          gridptr->isCyclic = (int) isCyclic;
+          gridptr->isCyclic = isCyclic;
 	}
     }
 }
@@ -2217,6 +2257,16 @@ bool gridCompare(int gridID, const grid_t *grid, bool coord_compare)
 	}
     }
 
+  if ( (grid->scanningMode != gridInqScanningMode(gridID)) || (grid->uvRelativeToGrid != gridInqUvRelativeToGrid(gridID)) )
+    {
+      // often grid definition may differ in UV-relativeToGrid
+      differ = 1;
+#ifdef HIRLAM_EXTENSIONS
+      if ( cdiDebugExt>=200 )
+        printf("gridCompare(gridID=%d): Differs: grid.scanningMode [%d] != gridInqScanningMode(gridID) [%d] or  grid.uvRelativeToGrid [%ld] != gridInqUvRelativeToGrid(gridID) [%d]\n",
+               gridID, grid->scanningMode, gridInqScanningMode(gridID), grid->uvRelativeToGrid, gridInqUvRelativeToGrid(gridID) );
+#endif // HIRLAM_EXTENSIONS
+    }
   return differ;
 }
 
@@ -2244,9 +2294,6 @@ int gridCompareP(void *gridptr1, void *gridptr2)
 
   if ( g1->type          != g2->type         ) return differ;
   if ( g1->prec          != g2->prec         ) return differ;
-  if ( g1->lcc.projflag  != g2->lcc.projflag ) return differ;
-  if ( g1->lcc.scanflag  != g2->lcc.scanflag ) return differ;
-  if ( g1->lcc.defined   != g2->lcc.defined  ) return differ;
   if ( g1->isCyclic      != g2->isCyclic     ) return differ;
   if ( g1->x.flag        != g2->x.flag       ) return differ;
   if ( g1->y.flag        != g2->y.flag       ) return differ;
@@ -2270,13 +2317,8 @@ int gridCompareP(void *gridptr1, void *gridptr2)
   if ( IS_NOT_EQUAL(g1->y.last        , g2->y.last)        ) return differ;
   if ( IS_NOT_EQUAL(g1->x.inc	      , g2->x.inc)         ) return differ;
   if ( IS_NOT_EQUAL(g1->y.inc	      , g2->y.inc)         ) return differ;
-  if ( IS_NOT_EQUAL(g1->lcc.originLon , g2->lcc.originLon) ) return differ;
-  if ( IS_NOT_EQUAL(g1->lcc.originLat , g2->lcc.originLat) ) return differ;
-  if ( IS_NOT_EQUAL(g1->lcc.lonParY   , g2->lcc.lonParY)   ) return differ;
-  if ( IS_NOT_EQUAL(g1->lcc.lat1      , g2->lcc.lat1)      ) return differ;
-  if ( IS_NOT_EQUAL(g1->lcc.lat2      , g2->lcc.lat2)      ) return differ;
-  if ( IS_NOT_EQUAL(g1->lcc.xinc      , g2->lcc.xinc)      ) return differ;
-  if ( IS_NOT_EQUAL(g1->lcc.yinc      , g2->lcc.yinc)      ) return differ;
+  if ( IS_NOT_EQUAL(g1->uvRelativeToGrid     , g2->uvRelativeToGrid)     ) return differ;
+  if ( IS_NOT_EQUAL(g1->scanningMode         , g2->scanningMode)         ) return differ;
 
   const double *restrict g1_xvals = g1->vtable->inqXValsPtr(g1),
                *restrict g2_xvals = g2->vtable->inqXValsPtr(g2);
@@ -2425,7 +2467,6 @@ void gridComplete(grid_t *grid)
     case GRID_UNSTRUCTURED:
     case GRID_CURVILINEAR:
     case GRID_GENERIC:
-    case GRID_LCC:
     case GRID_PROJECTION:
       {
 	if ( grid->x.size > 0 ) gridDefXsize(gridID, grid->x.size);
@@ -2442,9 +2483,7 @@ void gridComplete(grid_t *grid)
 	    double *xvals = (double *) Malloc((size_t)grid->x.size * sizeof (double));
 	    gridGenXvals(grid->x.size, grid->x.first, grid->x.last, grid->x.inc, xvals);
 	    grid->x.vals = xvals;
-	    /*
-	    gridDefXinc(gridID, grid->x.inc);
-	    */
+	    // gridDefXinc(gridID, grid->x.inc);
 	  }
 
 	if ( grid->y.flag == 2 )
@@ -2453,9 +2492,7 @@ void gridComplete(grid_t *grid)
 	    double *yvals = (double *) Malloc((size_t)grid->y.size * sizeof (double));
 	    gridGenYvals(gridtype, grid->y.size, grid->y.first, grid->y.last, grid->y.inc, yvals);
 	    grid->y.vals = yvals;
-	    /*
-	    gridDefYinc(gridID, grid->y.inc);
-	    */
+	    // gridDefYinc(gridID, grid->y.inc);
 	  }
 
 	if ( grid->projtype == CDI_PROJ_RLL )
@@ -2470,22 +2507,13 @@ void gridComplete(grid_t *grid)
 	    if ( grid->y.units[0] == 0 ) strcpy(grid->y.units, "degrees");
 	  }
 
-        switch (gridtype)
+        if ( gridtype == GRID_UNSTRUCTURED )
           {
-          case GRID_LCC:
-            gridDefParamLCC(gridID, grid->lcc.originLon, grid->lcc.originLat, grid->lcc.lonParY,
-                       grid->lcc.lat1, grid->lcc.lat2, grid->lcc.xinc, grid->lcc.yinc,
-                       grid->lcc.projflag, grid->lcc.scanflag);
-            break;
-          case GRID_UNSTRUCTURED:
-            {
-              int number = grid->number;
-              int position = grid->position >= 0 ? grid->position : 0;
-              if ( number > 0 ) gridDefNumber(gridID, number);
-              gridDefPosition(gridID, position);
-            }
-            break;
-	  }
+            int number = grid->number;
+            int position = grid->position >= 0 ? grid->position : 0;
+            if ( number > 0 ) gridDefNumber(gridID, number);
+            gridDefPosition(gridID, position);
+          }
 
 	break;
       }
@@ -2579,7 +2607,7 @@ int gridGenerate(const grid_t *grid)
   int valdef_group1 = 0;
   static const int valdef_group1_tab[] = {
     GRID_LONLAT, GRID_GAUSSIAN, GRID_UNSTRUCTURED, GRID_CURVILINEAR,
-    GRID_GENERIC, GRID_LCC, GRID_PROJECTION
+    GRID_GENERIC, GRID_PROJECTION
   };
   for ( size_t i = 0; i < sizeof (valdef_group1_tab) / sizeof (valdef_group1_tab[0]); ++i)
     valdef_group1 |= (gridtype == valdef_group1_tab[i]);
@@ -2604,17 +2632,13 @@ int gridGenerate(const grid_t *grid)
   gridptr->y.inc = grid->y.inc;
   if ( valdef_group1 && grid->area)
     gridDefArea(gridID, grid->area);
-  gridptr->lcc.originLon = grid->lcc.originLon;
-  gridptr->lcc.originLat = grid->lcc.originLat;
-  gridptr->lcc.lonParY = grid->lcc.lonParY;
-  gridptr->lcc.lat1 = grid->lcc.lat1;
-  gridptr->lcc.lat2 = grid->lcc.lat2;
-  gridptr->lcc.xinc = grid->lcc.xinc;
-  gridptr->lcc.yinc = grid->lcc.yinc;
-  gridptr->lcc.projflag = grid->lcc.projflag;
-  gridptr->lcc.scanflag = grid->lcc.scanflag;
   gridptr->number = grid->number;
   gridptr->position = grid->position;
+  gridptr->uvRelativeToGrid       = grid->uvRelativeToGrid;
+  gridptr->scanningMode           = grid->scanningMode;
+  gridptr->iScansNegatively       = grid->iScansNegatively;
+  gridptr->jScansPositively       = grid->jScansPositively;
+  gridptr->jPointsAreConsecutive  = grid->jPointsAreConsecutive;
   memcpy(gridptr->uuid, grid->uuid, CDI_UUID_SIZE);
   if ( gridtype == GRID_UNSTRUCTURED && grid->reference )
     gridDefReference(gridID, grid->reference);
@@ -3239,7 +3263,7 @@ void gridPrintAttributes(FILE *fp, int gridID)
 static
 void gridPrintKernel(int gridID, int opt, FILE *fp)
 {
-  int xdim, ydim;
+  size_t xdimLen, ydimLen;
   char attstr[CDI_MAX_NAME];
   char attstr2[CDI_MAX_NAME];
   unsigned char uuidOfHGrid[CDI_UUID_SIZE];
@@ -3313,18 +3337,18 @@ void gridPrintKernel(int gridID, int opt, FILE *fp)
 
 	if ( type == GRID_CURVILINEAR || type == GRID_UNSTRUCTURED )
 	  {
-	    xdim = gridsize;
-	    ydim = gridsize;
+	    xdimLen = (size_t)gridsize;
+	    ydimLen = (size_t)gridsize;
 	  }
         else if ( type == GRID_GAUSSIAN_REDUCED )
           {
-	    xdim = 2;
-	    ydim = ysize;
+	    xdimLen = 2;
+	    ydimLen = (size_t)ysize;
           }
 	else
 	  {
-	    xdim = xsize;
-	    ydim = ysize;
+	    xdimLen = (size_t)xsize;
+	    ydimLen = (size_t)ysize;
 	  }
 
 	if ( type == GRID_UNSTRUCTURED )
@@ -3383,7 +3407,7 @@ void gridPrintKernel(int gridID, int opt, FILE *fp)
             double *xbounds = (double*) Malloc(nxbounds*sizeof(double));
             gridInqXbounds(gridID, xbounds);
             static const char prefix[] = "xbounds   = ";
-            printBounds(fp, dig, prefix, sizeof(prefix)-1, xdim, nvertex, xbounds);
+            printBounds(fp, dig, prefix, sizeof(prefix)-1, xdimLen, (size_t)nvertex, xbounds);
             Free(xbounds);
 	  }
 
@@ -3418,16 +3442,16 @@ void gridPrintKernel(int gridID, int opt, FILE *fp)
             double *ybounds = (double*) Malloc(nybounds*sizeof(double));
             gridInqYbounds(gridID, ybounds);
             static const char prefix[] = "ybounds   = ";
-            printBounds(fp, dig, prefix, sizeof(prefix)-1, ydim, nvertex, ybounds);
+            printBounds(fp, dig, prefix, sizeof(prefix)-1, ydimLen, (size_t)nvertex, ybounds);
             Free(ybounds);
 	  }
 
 	if ( gridHasArea(gridID) )
 	  {
-            double *area = (double*) Malloc(gridsize*sizeof(double));
+            double *area = (double*) Malloc((size_t)gridsize*sizeof(double));
             gridInqArea(gridID, area);
             static const char prefix[] = "area      = ";
-            printDblsPrefixAutoBrk(fp, dig, prefix, sizeof(prefix)-1, gridsize, area);
+            printDblsPrefixAutoBrk(fp, dig, prefix, sizeof(prefix)-1, (size_t)gridsize, area);
             Free(area);
 	  }
 
@@ -3445,27 +3469,6 @@ void gridPrintKernel(int gridID, int opt, FILE *fp)
 
 	break;
       }
-    case GRID_LCC:
-      {
-	double originLon = 0, originLat = 0, lonParY = 0, lat1 = 0, lat2 = 0, xincm = 0, yincm = 0;
-	int projflag = 0, scanflag = 0;
-	gridInqParamLCC(gridID, &originLon, &originLat, &lonParY, &lat1, &lat2, &xincm, &yincm,
-                        &projflag, &scanflag);
-
-	fprintf(fp,
-                "originLon = %.*g\n"
-                "originLat = %.*g\n"
-                "lonParY   = %.*g\n"
-                "lat1      = %.*g\n"
-                "lat2      = %.*g\n"
-                "xinc      = %.*g\n"
-                "yinc      = %.*g\n"
-                "projection = %s\n",
-                dig, originLon, dig, originLat, dig, lonParY,
-                dig, lat1, dig, lat2, dig, xincm, dig, yincm,
-                (projflag & 128) == 0 ? "northpole" : "southpole");
-	break;
-      }
     case GRID_SPECTRAL:
       {
         fprintf(fp, "truncation = %d\n"
@@ -3589,97 +3592,156 @@ const double *gridInqYvalsPtr(int gridID)
 @Function  gridDefParamLCC
 @Title     Define the parameter of a Lambert Conformal Conic grid
 
-@Prototype void gridDefParamLCC(int gridID, double originLon, double originLat, double lonParY, double lat1, double lat2, double xinc, double yinc, int projflag, int scanflag)
+@Prototype void gridDefParamLCC(int gridID, double missval, double lon_0, double lat_0, double lat_1, double lat_2, double a, double rf, double xval_0, double yval_0, double x_0, double y_0)
 @Parameter
     @Item  gridID    Grid ID, from a previous call to @fref{gridCreate}.
-    @Item  originLon Longitude of the first grid point.
-    @Item  originLat Latitude of the first grid point.
-    @Item  lonParY   The East longitude of the meridian which is parallel to the Y-axis.
-    @Item  lat1      First latitude from the pole at which the secant cone cuts the sphere.
-    @Item  lat2      Second latitude at which the secant cone cuts the sphere.
-    @Item  xinc      X-direction grid lenght in meter.
-    @Item  yinc      Y-direction grid lenght in meter.
-    @Item  projflag  Projection centre flag.
-    @Item  scanflag  Scanning mode flag.
+    @Item  missval   Missing value
+    @Item  lon_0     The East longitude of the meridian which is parallel to the Y-axis.
+    @Item  lat_0     Latitude of the projection origin
+    @Item  lat_1     First latitude from the pole at which the secant cone cuts the sphere.
+    @Item  lat_2     Second latitude at which the secant cone cuts the sphere.
+    @Item  a         Earth radius in metres (optional).
+    @Item  rf        Inverse flattening (1/f) (optional).
+    @Item  xval_0    Longitude of the first grid point in degree (optional).
+    @Item  yval_0    Latitude of the first grid point in degree (optional).
+    @Item  x_0       False easting (optional).
+    @Item  y_0       False northing (optional).
 
 @Description
 The function @func{gridDefParamLCC} defines the parameter of a Lambert Conformal Conic grid.
 
 @EndFunction
 */
-void gridDefParamLCC(int gridID, double originLon, double originLat, double lonParY,
-                double lat1, double lat2, double xinc, double yinc,
-                int projflag, int scanflag)
-{
+void gridDefParamLCC(int gridID, double missval, double lon_0, double lat_0, double lat_1, double lat_2,
+                     double a, double rf, double xval_0, double yval_0, double x_0, double y_0)
+{
+  cdiGridDefKeyStr(gridID, CDI_KEY_MAPPING, CDI_MAX_NAME, "Lambert_Conformal");
+
+  const char *mapname = "lambert_conformal_conic";
+  cdiGridDefKeyStr(gridID, CDI_KEY_MAPNAME, CDI_MAX_NAME, mapname);
+  cdiDefAttTxt(gridID, CDI_GLOBAL, "grid_mapping_name", strlen(mapname), mapname);
+  int nlats = 0;
+  double lats[2];
+  lats[nlats++] = lat_1;
+  if ( IS_NOT_EQUAL(lat_1, lat_2) ) lats[nlats++] = lat_2;
+  cdiDefAttFlt(gridID, CDI_GLOBAL, "standard_parallel", CDI_DATATYPE_FLT64, nlats, lats);
+  cdiDefAttFlt(gridID, CDI_GLOBAL, "longitude_of_central_meridian", CDI_DATATYPE_FLT64, 1, &lon_0);
+  cdiDefAttFlt(gridID, CDI_GLOBAL, "latitude_of_projection_origin", CDI_DATATYPE_FLT64, 1, &lat_2);
+  if ( a > 0 ) cdiDefAttFlt(gridID, CDI_GLOBAL, "earth_radius", CDI_DATATYPE_FLT64, 1, &a);
+  if ( rf > 0 ) cdiDefAttFlt(gridID, CDI_GLOBAL, "inverse_flattening", CDI_DATATYPE_FLT64, 1, &rf);
+  if ( IS_NOT_EQUAL(x_0, missval) ) cdiDefAttFlt(gridID, CDI_GLOBAL, "false_easting", CDI_DATATYPE_FLT64, 1, &x_0);
+  if ( IS_NOT_EQUAL(y_0, missval) ) cdiDefAttFlt(gridID, CDI_GLOBAL, "false_northing", CDI_DATATYPE_FLT64, 1, &y_0);
+  if ( IS_NOT_EQUAL(xval_0, missval) ) cdiDefAttFlt(gridID, CDI_GLOBAL, "longitudeOfFirstGridPointInDegrees", CDI_DATATYPE_FLT64, 1, &xval_0);
+  if ( IS_NOT_EQUAL(yval_0, missval) ) cdiDefAttFlt(gridID, CDI_GLOBAL, "latitudeOfFirstGridPointInDegrees", CDI_DATATYPE_FLT64, 1, &yval_0);
+
   grid_t *gridptr = grid_to_pointer(gridID);
+  gridptr->projtype = CDI_PROJ_LCC;
 
-  if ( gridptr->type != GRID_LCC )
-    Warning("Definition of LCC grid for %s grid not allowed!",
-	    gridNamePtr(gridptr->type));
-  else
-    {
-      gridptr->lcc.originLon = originLon;
-      gridptr->lcc.originLat = originLat;
-      gridptr->lcc.lonParY   = lonParY;
-      gridptr->lcc.lat1      = lat1;
-      gridptr->lcc.lat2      = lat2;
-      gridptr->lcc.xinc      = xinc;
-      gridptr->lcc.yinc      = yinc;
-      gridptr->lcc.projflag  = projflag;
-      gridptr->lcc.scanflag  = scanflag;
-      gridptr->lcc.defined   = TRUE;
-      gridMark4Update(gridID);
-    }
+  gridVerifyProj(gridID);
 }
 
 /*
 @Function  gridInqParamLCC
 @Title     Get the parameter of a Lambert Conformal Conic grid
 
-@Prototype void gridInqParamLCC(int gridID, double *originLon, double *originLat, double *lonParY, double *lat1, double *lat2, double *xinc, double *yinc, int *projflag, int *scanflag)
+@Prototype void gridInqParamLCC(int gridID, double missval, double *lon_0, double *lat_0, double *lat_1, double *lat_2, double *a, double *rf, double *xval_0, double *yval_0, double *x_0, double *y_0)
 @Parameter
     @Item  gridID    Grid ID, from a previous call to @fref{gridCreate} or @fref{vlistInqVarGrid}.
-    @Item  originLon Longitude of the first grid point.
-    @Item  originLat Latitude of the first grid point.
-    @Item  lonParY   The East longitude of the meridian which is parallel to the Y-axis.
-    @Item  lat1      First latitude from the pole at which the secant cone cuts the sphere.
-    @Item  lat2      Second latitude at which the secant cone cuts the sphere.
-    @Item  xinc      X-direction grid lenght in meter.
-    @Item  yinc      Y-direction grid lenght in meter.
-    @Item  projflag  Projection centre flag.
-    @Item  scanflag  Scanning mode flag.
- 
+    @Item  missval   Missing value
+    @Item  lon_0     The East longitude of the meridian which is parallel to the Y-axis.
+    @Item  lat_0     Latitude of the projection origin
+    @Item  lat_1     First latitude from the pole at which the secant cone cuts the sphere.
+    @Item  lat_2     Second latitude at which the secant cone cuts the sphere.
+    @Item  a         Earth radius in metres (optional).
+    @Item  rf        Inverse flattening (1/f) (optional).
+    @Item  xval_0    Longitude of the first grid point in degree (optional).
+    @Item  yval_0    Latitude of the first grid point in degree (optional).
+    @Item  x_0       False easting (optional).
+    @Item  y_0       False northing (optional).
+
 @Description
 The function @func{gridInqParamLCC} returns the parameter of a Lambert Conformal Conic grid.
 
 @EndFunction
 */
-void gridInqParamLCC(int gridID, double *originLon, double *originLat, double *lonParY,
-                double *lat1, double *lat2, double *xinc, double *yinc,
-                int *projflag, int *scanflag)
+int gridInqParamLCC(int gridID, double missval, double *lon_0, double *lat_0, double *lat_1, double *lat_2,
+                    double *a, double *rf, double *xval_0, double *yval_0, double *x_0, double *y_0)
 {
-  grid_t *gridptr = grid_to_pointer(gridID);
+  *a = 0; *rf = 0;
+  *lon_0 = missval; *lat_0 = missval, *lat_1 = missval, *lat_2 = missval;
+  *xval_0 = missval; *yval_0 = missval; *x_0 = missval, *y_0 = missval;
 
-  if ( gridptr->type != GRID_LCC )
-    Warning("Inquire of LCC grid definition for %s grid not allowed!",
-	    gridNamePtr(gridptr->type));
-  else
+  int status = -1;
+  if ( gridInqType(gridID) != GRID_PROJECTION ) return status;
+
+  status = -2;
+  const char *projection = "lambert_conformal_conic";
+  char mapname[CDI_MAX_NAME]; mapname[0] = 0;
+  cdiGridInqKeyStr(gridID, CDI_KEY_MAPNAME, CDI_MAX_NAME, mapname);
+  if ( mapname[0] && strcmp(mapname, projection) == 0 )
+    {
+      int atttype, attlen;
+      char attname[CDI_MAX_NAME+1];
+
+      int natts;
+      cdiInqNatts(gridID, CDI_GLOBAL, &natts);
+
+      if ( natts ) status = 0;
+
+      for ( int iatt = 0; iatt < natts; ++iatt )
+        {
+          cdiInqAtt(gridID, CDI_GLOBAL, iatt, attname, &atttype, &attlen);
+          if ( attlen > 2 ) continue;
+
+          double attflt[2];
+          if ( cdiInqAttConvertedToFloat(gridID, atttype, attname, attlen, attflt) )
+            {
+              if      ( strcmp(attname, "earth_radius") == 0 )                       *a      = attflt[0];
+              else if ( strcmp(attname, "inverse_flattening") == 0 )                 *rf     = attflt[0];
+              else if ( strcmp(attname, "longitude_of_central_meridian") == 0 )      *lon_0  = attflt[0];
+              else if ( strcmp(attname, "latitude_of_projection_origin") == 0 )      *lat_0  = attflt[0];
+              else if ( strcmp(attname, "false_easting")  == 0 )                     *x_0    = attflt[0];
+              else if ( strcmp(attname, "false_northing") == 0 )                     *y_0    = attflt[0];
+              else if ( strcmp(attname, "longitudeOfFirstGridPointInDegrees") == 0 ) *xval_0 = attflt[0];
+              else if ( strcmp(attname, "latitudeOfFirstGridPointInDegrees")  == 0 ) *yval_0 = attflt[0];
+              else if ( strcmp(attname, "standard_parallel") == 0 )
+                {
+                  *lat_1 = attflt[0];
+                  *lat_2 = (attlen == 2) ? attflt[1] : attflt[0];
+                }
+            }
+        }
+    }
+
+  return status;
+}
+
+
+int gridVerifyGribParamLCC(int gridID, double missval, double *lon_0, double *lat_0, double *lat_1, double *lat_2,
+                           double *a, double *rf, double *xval_0, double *yval_0, double *x_0, double *y_0)
+{
+  static bool lwarn = true;
+
+  if ( lwarn )
     {
-      if ( gridptr->lcc.defined )
+      // lwarn = false;
+      const char *projection = "lambert_conformal_conic";
+      if ( IS_EQUAL(*lon_0, missval) ) { Warning("%s mapping parameter %s missing!", projection, "longitude_of_central_meridian"); }
+      if ( IS_EQUAL(*lat_0, missval) ) { Warning("%s mapping parameter %s missing!", projection, "latitude_of_central_meridian"); }
+      if ( IS_EQUAL(*lat_1, missval) ) { Warning("%s mapping parameter %s missing!", projection, "standard_parallel"); }
+      if ( IS_NOT_EQUAL(*x_0, missval) && IS_NOT_EQUAL(*y_0, grid_missval) && (IS_EQUAL(*xval_0, missval) || IS_EQUAL(*yval_0, missval)) )
         {
-          *originLon = gridptr->lcc.originLon;
-          *originLat = gridptr->lcc.originLat;
-          *lonParY   = gridptr->lcc.lonParY;
-          *lat1      = gridptr->lcc.lat1;
-          *lat2      = gridptr->lcc.lat2;
-          *xinc      = gridptr->lcc.xinc;
-          *yinc      = gridptr->lcc.yinc;
-          *projflag  = gridptr->lcc.projflag;
-          *scanflag  = gridptr->lcc.scanflag;
+          if ( proj_lcc_to_lonlat_func )
+            {
+              *xval_0 = -(*x_0); *yval_0 = -(*y_0);
+              proj_lcc_to_lonlat_func(missval, *lon_0, *lat_0, *lat_1, *lat_2, *a, *rf, 0.0, 0.0, (size_t)1, xval_0, yval_0);
+            }
+          if ( IS_EQUAL(*xval_0, missval) || IS_EQUAL(*yval_0, missval) )
+            Warning("%s mapping parameter %s missing!", projection, "longitudeOfFirstGridPointInDegrees and latitudeOfFirstGridPointInDegrees");
         }
-      else
-	Warning("Lambert Conformal grid undefined (gridID = %d)", gridID);
     }
+
+  return 0;
 }
 
 
@@ -3926,6 +3988,50 @@ void gridInqUUID(int gridID, unsigned char uuid[CDI_UUID_SIZE])
 }
 
 
+void gridDefUvRelativeToGrid(int gridID, int uvRelativeToGrid)
+{
+  grid_t *gridptr = grid_to_pointer(gridID);
+
+  if ( gridptr->uvRelativeToGrid != uvRelativeToGrid )
+    {
+      gridMark4Update(gridID);
+      gridptr->uvRelativeToGrid = (bool)uvRelativeToGrid;
+    }
+}
+
+
+int gridInqUvRelativeToGrid(int gridID)
+{
+  grid_t *gridptr = grid_to_pointer(gridID);
+  return gridptr->uvRelativeToGrid;
+}
+
+
+void gridDefScanningMode(int gridID, int mode)
+{
+  grid_t *gridptr = grid_to_pointer(gridID);
+
+  if ( gridptr->scanningMode != mode )
+    {
+      gridMark4Update(gridID);
+      gridptr->scanningMode = mode;
+    }
+}
+
+
+int gridInqScanningMode(int gridID)
+{
+  grid_t *gridptr = grid_to_pointer(gridID);
+
+  int scanningModeTMP  = 128 * gridptr->iScansNegatively + 64 * gridptr->jScansPositively + 32 * gridptr->jPointsAreConsecutive;
+  if ( scanningModeTMP != gridptr->scanningMode )
+    Message("WARNING: scanningMode (%d) ! = (%d) 128 * iScansNegatively(%d) + 64 * jScansPositively(%d) + 32 * jPointsAreConsecutive(%d) ",
+            gridptr->scanningMode, scanningModeTMP, gridptr->iScansNegatively,gridptr->jScansPositively,gridptr->jPointsAreConsecutive );
+
+  return gridptr->scanningMode;
+}
+
+
 void cdiGridGetIndexList(unsigned ngrids, int * gridIndexList)
 {
   reshGetResHListOfType(ngrids, gridIndexList, &gridOps);
@@ -3938,8 +4044,48 @@ gridTxCode ()
   return GRID;
 }
 
-enum { gridNint    = 28,
-       gridNdouble = 24,
+enum {
+  GRID_PACK_INT_IDX_SELF,
+  GRID_PACK_INT_IDX_TYPE,
+  GRID_PACK_INT_IDX_PREC,
+  GRID_PACK_INT_IDX_IS_CYCLIC,
+  GRID_PACK_INT_IDX_X_FLAG,
+  GRID_PACK_INT_IDX_Y_FLAG,
+  GRID_PACK_INT_IDX_GME_ND,
+  GRID_PACK_INT_IDX_GME_NI,
+  GRID_PACK_INT_IDX_GME_NI2,
+  GRID_PACK_INT_IDX_GME_NI3,
+  GRID_PACK_INT_IDX_NUMBER,
+  GRID_PACK_INT_IDX_POSITION,
+  GRID_PACK_INT_IDX_TRUNC,
+  GRID_PACK_INT_IDX_NVERTEX,
+  GRID_PACK_INT_IDX_NROWLON,
+  GRID_PACK_INT_IDX_SIZE,
+  GRID_PACK_INT_IDX_X_SIZE,
+  GRID_PACK_INT_IDX_Y_SIZE,
+  GRID_PACK_INT_IDX_LCOMPLEX,
+  GRID_PACK_INT_IDX_MEMBERMASK,
+  GRID_PACK_INT_IDX_XTSTDNNAME,
+  GRID_PACK_INT_IDX_YTSTDNNAME,
+  GRID_PACK_INT_IDX_UVRELATIVETOGRID,
+  GRID_PACK_INT_IDX_ISCANSNEGATIVELY,
+  GRID_PACK_INT_IDX_JSCANSPOSITIVELY,
+  GRID_PACK_INT_IDX_JPOINTSARECONSECUTIVE,
+  GRID_PACK_INT_IDX_SCANNINGMODE,
+  gridNint
+};
+
+enum {
+  GRID_PACK_DBL_IDX_X_FIRST,
+  GRID_PACK_DBL_IDX_Y_FIRST,
+  GRID_PACK_DBL_IDX_X_LAST,
+  GRID_PACK_DBL_IDX_Y_LAST,
+  GRID_PACK_DBL_IDX_X_INC,
+  GRID_PACK_DBL_IDX_Y_INC,
+  gridNdouble
+};
+
+enum {
        gridHasMaskFlag = 1 << 0,
        gridHasGMEMaskFlag = 1 << 1,
        gridHasXValsFlag = 1 << 2,
@@ -4106,30 +4252,34 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
 
     xassert(!force_id || targetID == gridP->self);
 
-    gridP->type          =   intBuffer[1];
-    gridP->prec          =   intBuffer[2];
-    gridP->lcc.projflag  =   intBuffer[3];
-    gridP->lcc.scanflag  =   intBuffer[4];
-    gridP->lcc.defined   =   (short)intBuffer[5];
-    gridP->isCyclic      =   (short)intBuffer[8];
-    gridP->x.flag        =   (short)intBuffer[10];
-    gridP->y.flag        =   (short)intBuffer[11];
-    gridP->gme.nd        =   intBuffer[12];
-    gridP->gme.ni        =   intBuffer[13];
-    gridP->gme.ni2       =   intBuffer[14];
-    gridP->gme.ni3       =   intBuffer[15];
-    gridP->number        =   intBuffer[16];
-    gridP->position      =   intBuffer[17];
-    gridP->trunc         =   intBuffer[18];
-    gridP->nvertex       =   intBuffer[19];
-    gridP->nrowlon       =   intBuffer[20];
-    gridP->size          =   intBuffer[21];
-    gridP->x.size        =   intBuffer[22];
-    gridP->y.size        =   intBuffer[23];
-    gridP->lcomplex      =   (bool)intBuffer[24];
-    memberMask           =   intBuffer[25];
-    gridP->x.stdname     =   xystdname_tab[intBuffer[26]][0];
-    gridP->y.stdname     =   xystdname_tab[intBuffer[27]][1];
+    gridP->type          =   intBuffer[GRID_PACK_INT_IDX_TYPE];
+    gridP->prec          =   intBuffer[GRID_PACK_INT_IDX_PREC];
+    gridP->isCyclic      =   (signed char)intBuffer[GRID_PACK_INT_IDX_IS_CYCLIC];
+    gridP->x.flag        =   (short)intBuffer[GRID_PACK_INT_IDX_X_FLAG];
+    gridP->y.flag        =   (short)intBuffer[GRID_PACK_INT_IDX_Y_FLAG];
+    gridP->gme.nd        =   intBuffer[GRID_PACK_INT_IDX_GME_ND];
+    gridP->gme.ni        =   intBuffer[GRID_PACK_INT_IDX_GME_NI];
+    gridP->gme.ni2       =   intBuffer[GRID_PACK_INT_IDX_GME_NI2];
+    gridP->gme.ni3       =   intBuffer[GRID_PACK_INT_IDX_GME_NI3];
+    gridP->number        =   intBuffer[GRID_PACK_INT_IDX_NUMBER];
+    gridP->position      =   intBuffer[GRID_PACK_INT_IDX_POSITION];
+    gridP->trunc         =   intBuffer[GRID_PACK_INT_IDX_TRUNC];
+    gridP->nvertex       =   intBuffer[GRID_PACK_INT_IDX_NVERTEX];
+    gridP->nrowlon       =   intBuffer[GRID_PACK_INT_IDX_NROWLON];
+    gridP->size          =   intBuffer[GRID_PACK_INT_IDX_SIZE];
+    gridP->x.size        =   intBuffer[GRID_PACK_INT_IDX_X_SIZE];
+    gridP->y.size        =   intBuffer[GRID_PACK_INT_IDX_Y_SIZE];
+    gridP->lcomplex      =   (bool)intBuffer[GRID_PACK_INT_IDX_LCOMPLEX];
+    memberMask           =   intBuffer[GRID_PACK_INT_IDX_MEMBERMASK];
+    gridP->x.stdname     =
+      xystdname_tab[intBuffer[GRID_PACK_INT_IDX_XTSTDNNAME]][0];
+    gridP->y.stdname     =
+      xystdname_tab[intBuffer[GRID_PACK_INT_IDX_YTSTDNNAME]][1];
+    gridP->uvRelativeToGrid         =   intBuffer[GRID_PACK_INT_IDX_UVRELATIVETOGRID];
+    gridP->iScansNegatively         =   (bool)intBuffer[GRID_PACK_INT_IDX_ISCANSNEGATIVELY];
+    gridP->jScansPositively         =   (bool)intBuffer[GRID_PACK_INT_IDX_JSCANSPOSITIVELY];
+    gridP->jPointsAreConsecutive    =   (bool)intBuffer[GRID_PACK_INT_IDX_JPOINTSARECONSECUTIVE];
+    gridP->scanningMode             =   intBuffer[GRID_PACK_INT_IDX_SCANNINGMODE];
   }
 
   if (memberMask & gridHasRowLonFlag)
@@ -4151,19 +4301,12 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
                     &d, 1, CDI_DATATYPE_UINT32, context);
     xassert(d == cdiCheckSum(CDI_DATATYPE_FLT, gridNdouble, doubleBuffer));
 
-    gridP->x.first = doubleBuffer[0];
-    gridP->y.first = doubleBuffer[1];
-    gridP->x.last = doubleBuffer[2];
-    gridP->y.last = doubleBuffer[3];
-    gridP->x.inc = doubleBuffer[4];
-    gridP->y.inc = doubleBuffer[5];
-    gridP->lcc.originLon = doubleBuffer[6];
-    gridP->lcc.originLat = doubleBuffer[7];
-    gridP->lcc.lonParY = doubleBuffer[8];
-    gridP->lcc.lat1 = doubleBuffer[9];
-    gridP->lcc.lat2 = doubleBuffer[10];
-    gridP->lcc.xinc = doubleBuffer[11];
-    gridP->lcc.yinc = doubleBuffer[12];
+    gridP->x.first = doubleBuffer[GRID_PACK_DBL_IDX_X_FIRST];
+    gridP->y.first = doubleBuffer[GRID_PACK_DBL_IDX_Y_FIRST];
+    gridP->x.last = doubleBuffer[GRID_PACK_DBL_IDX_X_LAST];
+    gridP->y.last = doubleBuffer[GRID_PACK_DBL_IDX_Y_LAST];
+    gridP->x.inc = doubleBuffer[GRID_PACK_DBL_IDX_X_INC];
+    gridP->y.inc = doubleBuffer[GRID_PACK_DBL_IDX_Y_INC];
   }
 
   int irregular = gridP->type == GRID_UNSTRUCTURED
@@ -4294,33 +4437,38 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
   {
     int intBuffer[gridNint];
 
-    intBuffer[0]  = gridP->self;
-    intBuffer[1]  = gridP->type;
-    intBuffer[2]  = gridP->prec;
-    intBuffer[3]  = gridP->lcc.projflag;
-    intBuffer[4]  = gridP->lcc.scanflag;
-    intBuffer[5]  = gridP->lcc.defined;
-    intBuffer[8]  = gridP->isCyclic;
-    intBuffer[10] = gridP->x.flag;
-    intBuffer[11] = gridP->y.flag;
-    intBuffer[12] = gridP->gme.nd;
-    intBuffer[13] = gridP->gme.ni;
-    intBuffer[14] = gridP->gme.ni2;
-    intBuffer[15] = gridP->gme.ni3;
-    intBuffer[16] = gridP->number;
-    intBuffer[17] = gridP->position;
-    intBuffer[18] = gridP->trunc;
-    intBuffer[19] = gridP->nvertex;
-    intBuffer[20] = gridP->nrowlon;
-    intBuffer[21] = gridP->size;
-    intBuffer[22] = gridP->x.size;
-    intBuffer[23] = gridP->y.size;
-    intBuffer[24] = gridP->lcomplex;
-    intBuffer[25] = memberMask = gridGetComponentFlags(gridP);
-    intBuffer[26] = (int)((const char (*)[2][24])gridP->x.stdname
-                          - xystdname_tab);
-    intBuffer[27] = (int)((const char (*)[2][24])gridP->y.stdname
-                          - (const char (*)[2][24])xystdname_tab[0][1]);
+    intBuffer[GRID_PACK_INT_IDX_SELF]         = gridP->self;
+    intBuffer[GRID_PACK_INT_IDX_TYPE]         = gridP->type;
+    intBuffer[GRID_PACK_INT_IDX_PREC]         = gridP->prec;
+    intBuffer[GRID_PACK_INT_IDX_IS_CYCLIC]    = gridP->isCyclic;
+    intBuffer[GRID_PACK_INT_IDX_X_FLAG]       = gridP->x.flag;
+    intBuffer[GRID_PACK_INT_IDX_Y_FLAG]       = gridP->y.flag;
+    intBuffer[GRID_PACK_INT_IDX_GME_ND]       = gridP->gme.nd;
+    intBuffer[GRID_PACK_INT_IDX_GME_NI]       = gridP->gme.ni;
+    intBuffer[GRID_PACK_INT_IDX_GME_NI2]      = gridP->gme.ni2;
+    intBuffer[GRID_PACK_INT_IDX_GME_NI3]      = gridP->gme.ni3;
+    intBuffer[GRID_PACK_INT_IDX_NUMBER]       = gridP->number;
+    intBuffer[GRID_PACK_INT_IDX_POSITION]     = gridP->position;
+    intBuffer[GRID_PACK_INT_IDX_TRUNC]        = gridP->trunc;
+    intBuffer[GRID_PACK_INT_IDX_NVERTEX]      = gridP->nvertex;
+    intBuffer[GRID_PACK_INT_IDX_NROWLON]      = gridP->nrowlon;
+    intBuffer[GRID_PACK_INT_IDX_SIZE]         = gridP->size;
+    intBuffer[GRID_PACK_INT_IDX_X_SIZE]       = gridP->x.size;
+    intBuffer[GRID_PACK_INT_IDX_Y_SIZE]       = gridP->y.size;
+    intBuffer[GRID_PACK_INT_IDX_LCOMPLEX]     = gridP->lcomplex;
+    intBuffer[GRID_PACK_INT_IDX_MEMBERMASK]   = memberMask
+                                              = gridGetComponentFlags(gridP);
+    intBuffer[GRID_PACK_INT_IDX_XTSTDNNAME]   =
+      (int)((const char (*)[2][24])gridP->x.stdname - xystdname_tab);
+    intBuffer[GRID_PACK_INT_IDX_YTSTDNNAME]   =
+      (int)((const char (*)[2][24])gridP->y.stdname
+            - (const char (*)[2][24])xystdname_tab[0][1]);
+
+    intBuffer[GRID_PACK_INT_IDX_UVRELATIVETOGRID] = gridP->uvRelativeToGrid;
+    intBuffer[GRID_PACK_INT_IDX_ISCANSNEGATIVELY] = gridP->iScansNegatively;
+    intBuffer[GRID_PACK_INT_IDX_JSCANSPOSITIVELY] = gridP->jScansPositively;
+    intBuffer[GRID_PACK_INT_IDX_JPOINTSARECONSECUTIVE] = gridP->jPointsAreConsecutive;
+    intBuffer[GRID_PACK_INT_IDX_SCANNINGMODE] = gridP->scanningMode;
 
     serializePack(intBuffer, gridNint, CDI_DATATYPE_INT,
                   packBuffer, packBufferSize, packBufferPos, context);
@@ -4343,19 +4491,12 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
   {
     double doubleBuffer[gridNdouble];
 
-    doubleBuffer[0]  = gridP->x.first;
-    doubleBuffer[1]  = gridP->y.first;
-    doubleBuffer[2]  = gridP->x.last;
-    doubleBuffer[3]  = gridP->y.last;
-    doubleBuffer[4]  = gridP->x.inc;
-    doubleBuffer[5]  = gridP->y.inc;
-    doubleBuffer[6]  = gridP->lcc.originLon;
-    doubleBuffer[7]  = gridP->lcc.originLat;
-    doubleBuffer[8]  = gridP->lcc.lonParY;
-    doubleBuffer[9]  = gridP->lcc.lat1;
-    doubleBuffer[10] = gridP->lcc.lat2;
-    doubleBuffer[11] = gridP->lcc.xinc;
-    doubleBuffer[12] = gridP->lcc.yinc;
+    doubleBuffer[GRID_PACK_DBL_IDX_X_FIRST]        = gridP->x.first;
+    doubleBuffer[GRID_PACK_DBL_IDX_Y_FIRST]        = gridP->y.first;
+    doubleBuffer[GRID_PACK_DBL_IDX_X_LAST]         = gridP->x.last;
+    doubleBuffer[GRID_PACK_DBL_IDX_Y_LAST]         = gridP->y.last;
+    doubleBuffer[GRID_PACK_DBL_IDX_X_INC]          = gridP->x.inc;
+    doubleBuffer[GRID_PACK_DBL_IDX_Y_INC]          = gridP->y.inc;
 
     serializePack(doubleBuffer, gridNdouble, CDI_DATATYPE_FLT64,
                   packBuffer, packBufferSize, packBufferPos, context);
@@ -4497,7 +4638,7 @@ gridCompareSearch(int id, void *res, void *data)
 {
   struct gridCompareSearchState *state = (struct gridCompareSearchState*)data;
   (void)res;
-  if ( gridCompare(id, state->queryKey, false) == false )
+  if ( gridCompare(id, state->queryKey, true) == false )
     {
       state->resIDValue = id;
       return CDI_APPLY_STOP;
diff --git a/src/grid.h b/src/grid.h
index 9c41140f1f8351052d86c7a03868e07d8df0af72..d301ab9254a70c9ce1f2da45bb8ebb7134bf3318 100644
--- a/src/grid.h
+++ b/src/grid.h
@@ -6,6 +6,10 @@
 
 #include "cdi_att.h"
 
+extern double grid_missval;
+extern int (*proj_lonlat_to_lcc_func)();
+extern int (*proj_lcc_to_lonlat_func)();
+
 typedef unsigned char mask_t;
 
 typedef struct grid_t grid_t;
@@ -58,20 +62,6 @@ struct gridaxis_t {
   double *bounds;
 };
 
-// Lambert Conformal Conic
-struct grid_lcc_t {
-  double  originLon;
-  double  originLat;
-  double  lonParY;
-  double  lat1;
-  double  lat2;
-  double  xinc;
-  double  yinc;
-  int     projflag;
-  int     scanflag;
-  short   defined;
-};
-
 // GME Grid
 struct grid_gme_t {
   int     nd, ni, ni2, ni3;       /* parameter for GRID_GME         */
@@ -83,6 +73,7 @@ struct grid_t {
   char    mapping[CDI_MAX_NAME];
   char   *name;
   int     self;
+  int     size;
   int     type;                   /* grid type                      */
   int     prec;                   /* grid precision                 */
   int     proj;                   /* grid projection                */
@@ -90,9 +81,7 @@ struct grid_t {
   mask_t *mask;
   mask_t *mask_gme;
   double *area;
-  struct grid_lcc_t  lcc;
   struct grid_gme_t  gme;
-  short   isCyclic;               /* TRUE for global cyclic grids   */
   int     number, position;       /* parameter for GRID_REFERENCE   */
   int     trunc;                  /* parameter for GRID_SPECTEAL    */
   int     nvertex;
@@ -100,14 +89,27 @@ struct grid_t {
   unsigned char uuid[CDI_UUID_SIZE]; /* uuid for grid reference        */
   int    *rowlon;
   int     nrowlon;
-  int     size;
   int     np;                     /* number of parallels between a pole and the equator */
+  signed char isCyclic;           /* three possible states:
+                                   * -1 if unknown,
+                                   * 0 if found not cyclic, or
+                                   * 1 for global cyclic grids
+                                   */
   bool    lcomplex;
   bool    hasdims;
+  bool uvRelativeToGrid;  /* Some models deliver wind U,V relative to the grid-cell */
   struct gridaxis_t x;
   struct gridaxis_t y;
   const struct gridVirtTable *vtable;
   cdi_atts_t atts;
+  int  scanningMode;
+  bool iScansNegatively, jScansPositively, jPointsAreConsecutive;
+  /* scanningMode  = 128 * iScansNegatively + 64 * jScansPositively + 32 * jPointsAreConsecutive;
+               64  = 128 * 0                + 64 *        1         + 32 * 0
+               00  = 128 * 0                + 64 *        0         + 32 * 0
+               96  = 128 * 0                + 64 *        1         + 32 * 1
+     Default / implicit scanning mode is 64:
+                        i and j scan positively, i points are consecutive (row-major)        */
 };
 
 
@@ -149,6 +151,9 @@ struct addIfNewRes
 
 struct addIfNewRes cdiVlistAddGridIfNew(int vlistID, grid_t *grid, int mode);
 
+int gridVerifyGribParamLCC(int gridID, double missval, double *lon_0, double *lat_0, double *lat_1, double *lat_2,
+                           double *a, double *rf, double *xval_0, double *yval_0, double *x_0, double *y_0);
+
 #endif
 /*
  * Local Variables:
diff --git a/src/iterator_fallback.c b/src/iterator_fallback.c
index 213f85d936b240034104eeb182cc45789ec05e17..34a431adc1920d4eefee835d67d612d29ef899a4 100644
--- a/src/iterator_fallback.c
+++ b/src/iterator_fallback.c
@@ -1,3 +1,7 @@
+#if defined (HAVE_CONFIG_H)
+#  include "config.h"
+#endif
+
 #include "iterator_fallback.h"
 
 #include "cdi.h"
diff --git a/src/iterator_fallback.h b/src/iterator_fallback.h
index 6c7170f7074ac463a6103f5e92289da985a173a4..1b8bda2e15a23114a2460677532df1d5ee3bdf12 100644
--- a/src/iterator_fallback.h
+++ b/src/iterator_fallback.h
@@ -8,6 +8,12 @@
 #ifndef INCLUDE_GUARD_CDI_ITERATOR_FALLBACK_H
 #define INCLUDE_GUARD_CDI_ITERATOR_FALLBACK_H
 
+#if defined (HAVE_CONFIG_H)
+#  include "config.h"
+#endif
+
+#include <stdlib.h>
+
 #include "cdi.h"
 #include "cdi_int.h"
 #include "iterator.h"
diff --git a/src/iterator_grib.c b/src/iterator_grib.c
index 496e1248f0e23083a93f4262b04951ab4b00d7e5..1492da2c7e293c754ecdfe87fc3792e1cdfc249b 100644
--- a/src/iterator_grib.c
+++ b/src/iterator_grib.c
@@ -1,3 +1,7 @@
+#if defined (HAVE_CONFIG_H)
+#  include "config.h"
+#endif
+
 #include "iterator_grib.h"
 
 #include "cdi.h"
@@ -25,11 +29,7 @@ struct CdiGribIterator {
   off_t fileOffset;
   unsigned char *gribBuffer;
   size_t bufferSize, curRecordSize;
-#ifdef HAVE_LIBGRIB_API
   grib_handle *gribHandle;
-#else
-  void *gribHandle;
-#endif
 };
 
 CdiIterator *cdiGribIterator_getSuper(CdiGribIterator *me)
@@ -85,7 +85,7 @@ CdiIterator *cdiGribIterator_new(const char *path, int filetype)
 
 CdiGribIterator *cdiGribIterator_makeClone(CdiIterator *super)
 {
-  CdiGribIterator *me = (CdiGribIterator*)super;
+  CdiGribIterator *me = (CdiGribIterator*)(void *)super;
 
   //Allocate memory and copy data. (operations that may fail)
   CdiGribIterator *result = (struct CdiGribIterator *) Malloc(sizeof(*result));
@@ -137,7 +137,7 @@ fail:
 
 char *cdiGribIterator_serialize(CdiIterator *super)
 {
-  CdiGribIterator *me = (CdiGribIterator*)super;
+  CdiGribIterator *me = (CdiGribIterator*)(void *)super;
 
   const char *path = cdiInputFile_getPath(me->file);
   char *escapedPath = cdiEscapeSpaces(path);
@@ -166,7 +166,9 @@ CdiGribIterator *cdiGribIterator_deserialize(const char *description)
 
   {
     const char *savedStart = description;
-    long long decodedOffset = strtoll(description, (char**)&description, 0);    //The cast is a workaround for the wrong signature of strtoll() (it should have been `long long strtoll(const char*, const char**, int)`, not `long long strtoll(const char*, char**, int)`.
+    char *description_ = (char *)description;
+    long long decodedOffset = strtoll(description, &description_, 0);
+    description = description_;
     me->fileOffset = (off_t)decodedOffset;
     if(savedStart == description) goto closeFile;
     if((unsigned long long)decodedOffset > (unsigned long long)me->fileOffset) goto closeFile;
@@ -348,7 +350,7 @@ fail:
 
 int cdiGribIterator_nextField(CdiIterator *super)
 {
-  CdiGribIterator *me = (CdiGribIterator*)super;
+  CdiGribIterator *me = (CdiGribIterator*)(void *)super;
 
   if(super->gridId != CDI_UNDEFID) gridDestroy(super->gridId), super->gridId = CDI_UNDEFID;
 
@@ -369,13 +371,13 @@ int cdiGribIterator_nextField(CdiIterator *super)
 
 char *cdiGribIterator_inqTime(CdiIterator *super, CdiTimeType timeType)
 {
-  CdiGribIterator *me = (CdiGribIterator*)super;
+  CdiGribIterator *me = (CdiGribIterator*)(void *)super;
   return gribMakeTimeString(me->gribHandle, timeType);
 }
 
 int cdiGribIterator_levelType(CdiIterator *super, int levelSelector, char **outName, char **outLongName, char **outStdName, char **outUnit)
 {
-  CdiGribIterator *me = (CdiGribIterator*)super;
+  CdiGribIterator *me = (CdiGribIterator*)(void *)super;
 
   //First determine the zaxis type corresponding to the given level.
   int zaxisType = ZAXIS_GENERIC;
@@ -462,7 +464,7 @@ static int readLevel2(grib_handle *gribHandle, const char *levelTypeKey, const c
 
 int cdiGribIterator_level(CdiIterator *super, int levelSelector, double *outValue1, double *outValue2)
 {
-  CdiGribIterator *me = (CdiGribIterator*)super;
+  CdiGribIterator *me = (CdiGribIterator*)(void *)super;
   double trash;
   if(!outValue1) outValue1 = &trash;
   if(!outValue2) outValue2 = &trash;
@@ -486,15 +488,15 @@ int cdiGribIterator_level(CdiIterator *super, int levelSelector, double *outValu
         {}
       else if(isGrib1DualLevel((int)levelType))
         {
-          *outValue1 = (double)gribGetLongDefault(me->gribHandle, (levelSelector ? "bottomLevel" : "topLevel"), 0);
+          *outValue1 = (double)(gribGetLongDefault(me->gribHandle, (levelSelector ? "bottomLevel" : "topLevel"), 0));
         }
       else if(levelType == 100)
         {
-          *outValue1 = 100 * (double)gribGetLongDefault(me->gribHandle, "level", 0);        //2 bytes
+          *outValue1 = 100 * (double)(gribGetLongDefault(me->gribHandle, "level", 0));        //2 bytes
         }
       else
         {
-          *outValue1 = (double)gribGetLongDefault(me->gribHandle, "level", 0);        //2 bytes
+          *outValue1 = (double)(gribGetLongDefault(me->gribHandle, "level", 0));        //2 bytes
         }
     }
   return CDI_NOERR;
@@ -502,7 +504,7 @@ int cdiGribIterator_level(CdiIterator *super, int levelSelector, double *outValu
 
 int cdiGribIterator_zaxisUuid(CdiIterator *super, int *outVgridNumber, int *outLevelCount, unsigned char outUuid[CDI_UUID_SIZE])
 {
-  CdiGribIterator *me = (CdiGribIterator*)super;
+  CdiGribIterator *me = (CdiGribIterator*)(void *)super;
 
   if(outVgridNumber)
     {
@@ -528,7 +530,7 @@ int cdiGribIterator_zaxisUuid(CdiIterator *super, int *outVgridNumber, int *outL
 
 int cdiGribIterator_inqTile(CdiIterator *super, int *outTileIndex, int *outTileAttribute)
 {
-  CdiGribIterator *me = (CdiGribIterator*)super;
+  CdiGribIterator *me = (CdiGribIterator*)(void *)super;
   int trash;
   if(!outTileIndex) outTileIndex = &trash;
   if(!outTileAttribute) outTileAttribute = &trash;
@@ -548,7 +550,7 @@ int cdiGribIterator_inqTile(CdiIterator *super, int *outTileIndex, int *outTileA
 
 int cdiGribIterator_inqTileCount(CdiIterator *super, int *outTileCount, int *outTileAttributeCount)
 {
-  CdiGribIterator *me = (CdiGribIterator*)super;
+  CdiGribIterator *me = (CdiGribIterator*)(void *)super;
   int trash;
   if(!outTileCount) outTileCount = &trash;
   if(!outTileAttributeCount) outTileAttributeCount = &trash;
@@ -568,13 +570,13 @@ int cdiGribIterator_inqTileCount(CdiIterator *super, int *outTileCount, int *out
 
 char *cdiGribIterator_copyVariableName(CdiIterator *super)
 {
-  CdiGribIterator *me = (CdiGribIterator*)super;
+  CdiGribIterator *me = (CdiGribIterator*)(void *)super;
   return gribCopyString(me->gribHandle, "shortName");
 }
 
 void cdiGribIterator_readField(CdiIterator *super, double *buffer, size_t *nmiss)
 {
-  CdiGribIterator *me = (CdiGribIterator*)super;
+  CdiGribIterator *me = (CdiGribIterator*)(void *)super;
 
   GRIB_CHECK(my_grib_set_double(me->gribHandle, "missingValue", cdiDefaultMissval), 0);
   gribGetDoubleArray(me->gribHandle, "values", buffer);
@@ -587,7 +589,7 @@ void cdiGribIterator_readField(CdiIterator *super, double *buffer, size_t *nmiss
 
 void cdiGribIterator_readFieldF(CdiIterator *super, float *buffer, size_t *nmiss)
 {
-  CdiGribIterator *me = (CdiGribIterator*)super;
+  CdiGribIterator *me = (CdiGribIterator*)(void *)super;
 
   size_t valueCount = gribGetArraySize(me->gribHandle, "values");
   double *temp = (double *) Malloc(valueCount*sizeof(*temp));
@@ -643,6 +645,7 @@ int cdiGribIterator_inqEdition(CdiGribIterator *me)
 #else
   (void)me;
   xabort("CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with");
+  return -4;
 #endif
 }
 
@@ -669,6 +672,7 @@ int cdiGribIterator_getLong(CdiGribIterator *me, const char *key, long *result)
   (void)key;
   (void)result;
   xabort("CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with");
+  return -4;
 #endif
 }
 
@@ -701,6 +705,7 @@ int cdiGribIterator_getLength(CdiGribIterator *me, const char *key, size_t *resu
   (void)key;
   (void)result;
   xabort("CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with");
+  return -4;
 #endif
 }
 
@@ -728,6 +733,7 @@ int cdiGribIterator_getString(CdiGribIterator *me, const char *key, char *result
   (void)result;
   (void)length;
   xabort("CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with");
+  return -4;
 #endif
 }
 
@@ -754,6 +760,7 @@ long cdiGribIterator_inqLongValue(CdiGribIterator *me, const char *key)
   (void)me;
   (void)key;
   xabort("CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with");
+  return -4;
 #endif
 }
 
@@ -782,6 +789,7 @@ long cdiGribIterator_inqLongDefaultValue(CdiGribIterator *me, const char *key, l
   (void)key;
   (void)defaultValue;
   xabort("CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with");
+  return -4;
 #endif
 }
 
@@ -809,6 +817,7 @@ char *cdiGribIterator_inqStringValue(CdiGribIterator *me, const char *key)
   (void)me;
   (void)key;
   xabort("CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with");
+  return NULL;
 #endif
 }
 
@@ -835,6 +844,7 @@ int cdiGribIterator_getDouble(CdiGribIterator *me, const char *key, double *resu
   (void)key;
   (void)result;
   xabort("CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with");
+  return -4;
 #endif
 }
 
@@ -861,6 +871,7 @@ int cdiGribIterator_getSize(CdiGribIterator *me, const char *key, size_t *result
   (void)key;
   (void)result;
   xabort("CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with");
+  return -4;
 #endif
 }
 
@@ -888,6 +899,7 @@ int cdiGribIterator_getLongArray(CdiGribIterator *me, const char *key, long *res
   (void)result;
   (void)size;
   xabort("CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with");
+  return -4;
 #endif
 }
 
@@ -915,6 +927,7 @@ int cdiGribIterator_getDoubleArray(CdiGribIterator *me, const char *key, double
   (void)result;
   (void)size;
   xabort("CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with");
+  return -4;
 #endif
 }
 
@@ -941,6 +954,7 @@ double cdiGribIterator_inqDoubleValue(CdiGribIterator *me, const char *key)
   (void)me;
   (void)key;
   xabort("CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with");
+  return -4;
 #endif
 }
 
@@ -969,6 +983,7 @@ double cdiGribIterator_inqDoubleDefaultValue(CdiGribIterator *me, const char *ke
   (void)key;
   (void)defaultValue;
   xabort("CDI was compiled without GribAPI support, so you can't possibly have a valid CdiGribIterator* to call this function with");
+  return -4;
 #endif
 }
 
diff --git a/src/iterator_grib.h b/src/iterator_grib.h
index 65b996269da25b0ba042d3a7d862f3bbfd39120b..30b3c05e9dbdf151d96a4d55d003c29da6d0f448 100644
--- a/src/iterator_grib.h
+++ b/src/iterator_grib.h
@@ -7,6 +7,10 @@
 #ifndef INCLUDE_GUARD_CDI_ITERATOR_GRIB_H
 #define INCLUDE_GUARD_CDI_ITERATOR_GRIB_H
 
+#if defined (HAVE_CONFIG_H)
+#  include "config.h"
+#endif
+
 #include "cdi.h"
 #include "cdi_int.h"
 #include "iterator.h"
diff --git a/src/make_fint.c b/src/make_fint.c
index 39761d436a7e6a5e4bf541f45c0a35f3afd490b4..a31677430da67265f259b624d0c7fb4e2613194b 100644
--- a/src/make_fint.c
+++ b/src/make_fint.c
@@ -15,7 +15,7 @@
 #endif
 
 //#include "config.h"
-#define VERSION "1.8.0"
+#define VERSION "1.8.1"
 typedef struct
 {
   size_t naline;
@@ -88,7 +88,7 @@ static void doctotxt(FILE *fp, Docu *doc, size_t ndoc)
 
 enum cftype {ISVOID, ISCONSTSTRING, ISINT, ISREAL, ISDOUBLE, ISMPI_COMM,
              ISXT_IDXLIST, ISCHOICE, ISINTP, ISFLOATV, ISFLOATVV,
-             ISDOUBLEV, ISDOUBLEVV, ISINTV, ISINTVV, ISREALP,
+             ISDOUBLEV, ISDOUBLEVV, ISINTV, ISINTVV, ISINTVVV, ISREALP,
              ISDOUBLEP, ISCBUF, ISUUID, ISUCHAR, ISSTRING, ISSTRINGP,
              VOIDFUNCVOID,
              NUM_KNOWN_ARG_TYPES};
@@ -125,84 +125,106 @@ struct symbol {
 
 /* C symbol names */
 #define SYMRE "([A-Za-z_][A-Za-z_0-9]*)"
+static inline int isSymStart(int c)
+{
+  return (isalpha(c) || c == '_');
+}
+
+static inline int isSym(int c)
+{
+  return (isalnum(c) || c == '_');
+}
+
 /* white-space */
 #define WS "[[:blank:]\n]"
 #define NWS "[^[:blank:]\n]"
+#define ARRAY_BOUND "\\[([^]]*)\\]"WS"*"
+
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5) || defined (__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
 /* Note: size of this table must match the cftype enum */
 static struct symbol funArgSym[]
-  = { { "",                "",        "void",
+  = { { "",                "",        "%svoid",
         "^"WS"*void"WS"*)", 0, 0, 0 },
-      { "CHARACTER(80)",    "STRING",  "char *%.*s",
+      { "CHARACTER(80)",    "STRING",  "%schar *%.*s",
         "^"WS"*const"WS"+char"WS"+\\*"SYMRE WS"*\\(", 1, 0, 0 },
-      { "INTEGER",         "INT",     "int %.*s",
+      { "INTEGER",         "INT",     "%sint %.*s",
         "^"WS"*(const"WS"+)?int("WS"+"SYMRE")?"WS"*[,\\)]", 3, 0, 0 },
-      { "REAL",            "FLOAT",   "float %.*s",
+      { "REAL",            "FLOAT",   "%sfloat %.*s",
         "^"WS"*(const"WS"+)?float"WS"+"SYMRE"?"WS"*[,\\)]", 2, 0, 0 },
-      { "DOUBLEPRECISION", "DOUBLE",  "double %.*s",
+      { "DOUBLEPRECISION", "DOUBLE",  "%sdouble %.*s",
         "^"WS"*(const"WS"+)?double"WS"+"SYMRE"?"WS"*[,\\)]", 2, 0, 0 },
-      { "INTEGER",         "INT", "MPI_Comm %.*s",
+      { "INTEGER",         "INT", "%sMPI_Comm %.*s",
         "^"WS"*MPI_Comm"WS"+"SYMRE"?"WS"*[,\\)]", 1, 1, 0,
-        cfMPICommConvert, "int %.*s" },
-      { "TYPE(XT_IDXLIST)", "PVOID", "Xt_idxlist %.*s",
+        cfMPICommConvert, "%sint %.*s" },
+      { "TYPE(XT_IDXLIST)", "PVOID", "%sXt_idxlist %.*s",
         "^"WS"*Xt_idxlist"WS"+"SYMRE"?"WS"*[,\\)]", 1, 1, 0,
-        cfXtIdxlistConvert, "void *%.*s" },
-      { "CHOICE", "PVOID", "const void *%.*s",
+        cfXtIdxlistConvert, "%svoid *%.*s" },
+      { "CHOICE", "PVOID", "%sconst void *%.*s",
         "^"WS"*const"WS"+void"WS"*\\*"WS"*"SYMRE"?"WS"*[,\\)]", 1, 0, 0 },
-      { "INTEGER",         "PINT",    "int *%.*s",
+      { "INTEGER",         "PINT",    "%sint *%.*s",
         "^"WS"*(const"WS"+)?int"WS"+\\*"SYMRE"?"WS"*[,\\)]", 2, 0, 0 },
-      { "REAL",            "FLOATV",  "float %.*s[]",
-        "^"WS"*(const"WS"+)?float("WS"+"SYMRE")?"WS"*\\[[^]]*\\]"
-        WS"*[,\\)]", 3, 0, 0 },
-      { "REAL",            "FLOATVV", "float %.*s[][]",
-        "^"WS"*(const"WS"+)?float("WS"+"SYMRE")?"WS"*\\[[^]]*\\]"
-        WS"*\\[[^]]*\\]"WS"*[,\\)]", 3, 0, 0 },
-      { "DOUBLEPRECISION", "DOUBLEV",  "double %.*s[]",
-        "^"WS"*(const"WS"+)?double("WS"+"SYMRE")?"WS"*\\[[^]]*\\]"
-        WS"*[,\\)]", 3, 0, 0 },
-      { "DOUBLEPRECISION", "DOUBLEVV", "double %.*s[][]",
-        "^"WS"*(const"WS"+)?double("WS"+"SYMRE")?"WS"*\\[[^]]*\\]"
-        WS"*\\[[^]]*\\]"WS"*[,\\)]", 3, 0, 0 },
-      { "INTEGER",         "INTV",    "int  %.*s[]",
-        "^"WS"*(const"WS"+)?int("WS"+"SYMRE")?"WS"*\\[[^]]*\\]"
-        WS"*[,\\)]", 3, 0, 0 },
-      { "INTEGER",         "INTVV",    "int %.*s[][]",
-        "^"WS"*(const"WS"+)?int("WS"+"SYMRE")?"WS"*\\[[^]]*\\]"
-        WS"*\\[[^]]*\\]"WS"*[,\\)]", 3, 0, 0 },
-      { "REAL",            "PFLOAT",  "float *%.*s",
+      { "REAL",            "FLOATV",  "%sfloat %.*s[]",
+        "^"WS"*(const"WS"+)?float("WS"+"SYMRE")?"WS"*"ARRAY_BOUND
+        "[,\\)]", 3, 0, 0 },
+      { "REAL",            "FLOATVV", "%sfloat %.*s%s",
+        "^"WS"*(const"WS"+)?float("WS"+"SYMRE")?"WS"*"ARRAY_BOUND
+        ARRAY_BOUND"[,\\)]", 3, 0, 0 },
+      { "DOUBLEPRECISION", "DOUBLEV",  "%sdouble %.*s[]",
+        "^"WS"*(const"WS"+)?double("WS"+"SYMRE")?"WS"*"ARRAY_BOUND
+        "[,\\)]", 3, 0, 0 },
+      { "DOUBLEPRECISION", "DOUBLEVV", "%sdouble %.*s%s",
+        "^"WS"*(const"WS"+)?double("WS"+"SYMRE")?"WS"*"ARRAY_BOUND
+        ARRAY_BOUND"[,\\)]", 3, 0, 0 },
+      { "INTEGER",         "INTV",    "%sint  %.*s[]",
+        "^"WS"*(const"WS"+)?int("WS"+"SYMRE")?"WS"*"ARRAY_BOUND
+        "[,\\)]", 3, 0, 0 },
+      { "INTEGER",         "INTVV",    "%sint %.*s%s",
+        "^"WS"*(const"WS"+)?int("WS"+"SYMRE")?"WS"*"ARRAY_BOUND
+        ARRAY_BOUND "[,\\)]", 3, 0, 0 },
+      { "INTEGER",         "INTVVV",    "%sint %.*s%s",
+        "^"WS"*(const"WS"+)?int("WS"+"SYMRE")?"WS"*"ARRAY_BOUND
+        ARRAY_BOUND ARRAY_BOUND"[,\\)]", 3, 0, 0 },
+      { "REAL",            "PFLOAT",  "%sfloat *%.*s",
         "^"WS"*(const"WS"+)?float"WS"+\\*"SYMRE"?"WS"*[,\\)]", 2, 0, 0 },
-      { "DOUBLEPRECISION", "PDOUBLE", "double *%.*s",
+      { "DOUBLEPRECISION", "PDOUBLE", "%sdouble *%.*s",
         "^"WS"*(const"WS"+)?double"WS"+\\*"SYMRE"?"WS"*[,\\)]", 2, 0, 0 },
-      { "CHARACTER*(*)",   "PPSTRING",    "char *%.*s",
+      { "CHARACTER*(*)",   "PPSTRING",    "%schar *%.*s",
         "^"WS"*(const"WS"+)?char"WS"+\\*""([A-Za-z_][A-Za-z_0-9]*_cbuf)"
         WS"*[,\\)]", 2, 0, 0 },
-      { "INTEGER*1(16)",   "PVOID",    "unsigned char %.*s[16]",
+      { "INTEGER*1(16)",   "PVOID",    "%sunsigned char %.*s[16]",
         "^"WS"*(const"WS"+)?unsigned"WS"+char"WS"+"SYMRE"?\\[(16|CDI_UUID_SIZE)\\]"WS"*[,\\)]", 2, 0, 0 },
-      { "INTEGER*1(*)",   "PVOID",    "unsigned char *%.*s",
+      { "INTEGER*1(*)",   "PVOID",    "%sunsigned char *%.*s",
         "^"WS"*(const"WS"+)?unsigned"WS"+char"WS"+\\*"SYMRE"?"WS"*[,\\)]", 2, 0, 0 },
-      { "CHARACTER*(*)",   "STRING",  "char *%.*s",
+      { "CHARACTER*(*)",   "STRING",  "%schar *%.*s",
         "^"WS"*const"WS"+char"WS"+\\*"WS"*"SYMRE"?"WS"*[,\\)]", 1, 0, 0 },
-      { "CHARACTER*(*)",   "PSTRING", "char *%.*s",
+      { "CHARACTER*(*)",   "PSTRING", "%schar *%.*s",
         "^"WS"*char"WS"+\\*"SYMRE"?"WS"*[,\\)]", 1, 0, 0 },
-      { "PROCEDURE", "ROUTINE", "void (*%.*s)(void)",
+      { "PROCEDURE", "ROUTINE", "%svoid (*%.*s)(void)",
         "^"WS"*void"WS"*\\("WS"*\\*"WS"*"SYMRE"?"WS"*\\)"
         WS"*\\("WS"*void"WS"*\\)"WS"*[,\\)]", 1, 0, 1,
         NULL, NULL, cfVoidFuncPrologue },
 };
 
 static struct symbol funRet[] = {
-  { "",                "",        "void %.*s",
+  { "",                "",        "%svoid %.*s",
     "void"WS"+"SYMRE WS"*\\(", 1, 0, 0 },
-  { "CHARACTER",       "STRING",  "char *%.*s",
+  { "CHARACTER",       "STRING",  "%schar *%.*s",
     "char"WS"+\\*"WS"*"SYMRE WS"*\\(", 1, 0, 0 },
-  { "INTEGER",         "INT",     "int %.*s",
+  { "INTEGER",         "INT",     "%sint %.*s",
     "(const"WS"+)?int"WS"+"SYMRE WS"*\\(", 2, 0, 0 },
-  { "REAL",            "FLOAT",   "float %.*s",
+  { "REAL",            "FLOAT",   "%sfloat %.*s",
     "(const"WS"+)?float"WS"+"SYMRE WS"*\\(", 2, 0, 0 },
-  { "DOUBLEPRECISION", "DOUBLE",  "double %.*s",
+  { "DOUBLEPRECISION", "DOUBLE",  "%sdouble %.*s",
     "(const"WS"+)?double"WS"+"SYMRE WS"*\\(", 2, 0, 0 },
-  { "INTEGER",         "INT",     "MPI_Comm %.*s",
-    "MPI_Comm"WS"+"SYMRE WS"*\\(", 1, 0, 0, cfMPICommConvert, "int %.*s" },
+  { "INTEGER",         "INT",     "%sMPI_Comm %.*s",
+    "MPI_Comm"WS"+"SYMRE WS"*\\(", 1, 0, 0, cfMPICommConvert, "%sint %.*s" },
 };
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5)
+#pragma GCC diagnostic pop
+#endif
 
 enum { NUM_RET_TYPES = sizeof (funRet) / sizeof (funRet[0]) };
 enum decl { UNKNOWN_DECL, FUNC_DECL, PARAM_DECL };
@@ -223,16 +245,28 @@ symRegexCompile(size_t numSyms, struct symbol symList[],
                 char **line, size_t *lineBufSize);
 
 static void
-build_header_name(const char *fname, char *cppMacro);
+build_header_name(size_t len, const char *fname, char *cppMacro);
 
 static int detectComment(char **line_, ssize_t *lineLen, size_t *lineBufSize,
                          size_t maxMatch, regmatch_t reMatch[],
-                         char *xname, size_t *xnameLen,
-                         char *xdes,
-                         FILE *fpin, FILE *fpinc, FILE *fpint);
+                         char *xname, size_t *xnameLen, char **xdes,
+                         int *lineno, FILE *fpin, FILE *fpinc, FILE *fpint);
 
 static regex_t commentStartRE, commentEndRE, commentRE, docCommentRE;
 
+static inline int
+arrayArgRank(int argType);
+
+static void
+sprintFortranArrayArgDims(size_t argDimsFSize, char argDimsF[argDimsFSize],
+                          int argType, const char *argSpecC,
+                          size_t maxMatch, regmatch_t reMatch[]);
+
+static void
+sprintCArrayArgDims(size_t argDimsCSize, char argDimsC[argDimsCSize],
+                    int argType, const char *argSpecC,
+                    const regmatch_t reMatch[]);
+
 static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
                               const char *doc_root)
 {
@@ -241,10 +275,10 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
   char *line = NULL, *pline;
   size_t lineBufSize = 0;
   char sname[128], *parname;
-  char xname[128], xdes[128];
+  char xname[128];
+  char *xdes = malloc(128);
   xname[0] = 0;
   size_t xnameLen = 0;
-  int parvalue;
   enum cftype functype;
   int lineno = 0;
 
@@ -258,6 +292,8 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
   struct tm *date_and_time;
   regmatch_t *reMatch = NULL;
   size_t maxMatch = 0;
+  char **definedParnames = NULL;
+  size_t numDefinedParnames = 0;
 
   date_and_time_in_sec = time(NULL);
   timestr[0] = 0;
@@ -280,7 +316,7 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
   /* complete symbol table data */
   {
     maxMatch = symRegexCompile(NUM_KNOWN_ARG_TYPES, funArgSym,
-                             &line, &lineBufSize);
+                               &line, &lineBufSize);
     size_t maxFunMatch = symRegexCompile(NUM_RET_TYPES, funRet,
                                          &line, &lineBufSize);
     if (maxFunMatch > maxMatch)
@@ -308,8 +344,8 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
   }
   /* compile documentation comment regular expression */
   {
-    static const char docCommentREString[] = "^"WS"*/\\*"WS"*"SYMRE":"
-      WS"*("NWS".*"NWS")"WS"*\\*/";
+    static const char docCommentREString[] = "^"WS"*/\\*"WS"*"SYMRE":("
+      WS"*).*"NWS"("WS"*)\\*/";
     if (reCompile(&docCommentRE, docCommentREString, &line, &lineBufSize))
       exit(EXIT_FAILURE);
   }
@@ -352,28 +388,47 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
   fprintf(fpint, "#  include \"config.h\"\n");
   fprintf(fpint, "#endif\n");
   fprintf(fpint, "\n");
+  char *cppHeaderSentinelMacro;
+  size_t cppHeaderSentinelMacroLen;
   {
-    char *cppMacro = (char*) malloc(strlen(fname) + 2);
-    build_header_name(fname, cppMacro);
+    char *lastSlash = strrchr(fname, '/');
+    char *fbasename = lastSlash ? (lastSlash+1) : fname;
+    size_t fbasenameLen = strlen(fbasename);
+    cppHeaderSentinelMacroLen = fbasenameLen + 1;
+    cppHeaderSentinelMacro = (char *)malloc(fbasenameLen + 2);
+    build_header_name(fbasenameLen, fbasename, cppHeaderSentinelMacro);
     fprintf(fpint, "#if ! defined (%s)\n"
             "#  include \"%s\"\n"
             "#endif\n"
-            "\n", cppMacro, fname);
+            "\n", cppHeaderSentinelMacro, fbasename);
   }
-  fprintf(fpint, "#if defined (HAVE_CF_INTERFACE)\n");
-  fprintf(fpint, "\n");
-  fprintf(fpint, "#if ! defined (__CFORTRAN_LOADED)\n");
-  fprintf(fpint, "#  include \"cfortran.h\"\n");
-  fprintf(fpint, "#endif\n");
-  fprintf(fpint, "\n");
+  fputs("#if defined (HAVE_CF_INTERFACE)\n"
+        "\n"
+        "#if ! defined (__CFORTRAN_LOADED)\n"
+        "#  if defined __clang__\n"
+        "#    pragma GCC diagnostic push\n"
+        "#    pragma GCC diagnostic ignored \"-Wreserved-id-macro\"\n"
+        "#  endif\n"
+        "#  include \"cfortran.h\"\n"
+        "#  if defined __clang__\n"
+        "#    pragma GCC diagnostic pop\n"
+        "#  endif\n"
+        "#endif\n"
+        "/* These functions are meant to be called from Fortran and don't\n"
+        " * need an interface declaration in a C header. */\n"
+        "#if defined __clang__\n"
+        "#  pragma GCC diagnostic ignored \"-Wmissing-prototypes\"\n"
+        "#endif\n"
+        "\n", fpint);
 
   ssize_t lineLen;
   while ((lineLen = getline(&line, &lineBufSize, fpin)) >= 0)
     {
       static const char cplusplus_macro[] = "__cplusplus";
       lineno++;
+      if (line[0] == '\n')
+        continue;
       functype = ISVOID;
-      size_t funcargc = 0;
       pline = line;
       int needsExtraWrapper = 0, needsPrologue = 0;
       size_t funcnameLen;
@@ -411,6 +466,7 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
 
       if (declType == FUNC_DECL)
         {
+          size_t funcargc = 0;
 	  funcargname[funcargc].rm_so = (regoff_t)(pline - line);
           {
             ssize_t i = 0;
@@ -459,10 +515,10 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
               memcpy(line + lineLen, lineExtension, (size_t)extLen + 1);
               lineLen += extLen;
               pline = line + plineOff;
+              ++lineno;
             } while (1);
           }
 
-	  /*  printf("funcargc = %d\n", funcargc);*/
             /* test if argument list is actually empty */
           if (funcargc == 1
               && !regexec(&emptyStringRE, line + funcargname[0].rm_so, 1,
@@ -530,10 +586,18 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
 		fprintf(fpinc, ",\n!%36s ", "");
               int argType = funcargtype[i];
               int isArray = isArrayArgType(argType);
+              enum { argDimsFSize = 128 };
+              char argDimsF[argDimsFSize];
+              if (!isArray)
+                argDimsF[0] = 0;
+              else
+                sprintFortranArrayArgDims(argDimsFSize, argDimsF, argType,
+                                          line + funcargfull[i].rm_so,
+                                          maxMatch, reMatch);
 	      fprintf(fpinc, "%-16s%.*s%s", funArgSym[argType].f77name,
                       (int)(funcargname[i].rm_eo - funcargname[i].rm_so),
                       line + funcargname[i].rm_so,
-                      isArray ? "(*)" : "");
+                      argDimsF);
 	    }
 	  if ( funcargc )
 	    fprintf(fpinc, ")\n");
@@ -564,23 +628,55 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
               fputs("static ", fpint);
               fprintf(fpint, (funRet[functype].convert
                               ?funRet[functype].convcfmt:funRet[functype].cfmt),
-                      (int)delegateNameLen, delegateName);
+                      "", (int)delegateNameLen, delegateName);
               fputs("(", fpint);
               for (size_t i = 0; i < funcargc; i++ )
                 {
                   if (i > 0)
                     fputs(", ", fpint);
-                  fprintf(fpint, (funArgSym[funcargtype[i]].convert
-                                  ?funArgSym[funcargtype[i]].convcfmt
-                                  :funArgSym[funcargtype[i]].cfmt),
+                  enum { arrayDimsCSize = 128 };
+                  char arrayDimsC[arrayDimsCSize];
+                  static const char constStr[] = "const ", nonConstStr[] = "";
+                  const char *constStrP;
+                  int argType = funcargtype[i];
+                  int isArray = isArrayArgType(argType);
+                  if (!isArray)
+                    {
+                      arrayDimsC[0] = 0;
+                      constStrP = nonConstStr;
+                    }
+                  else
+                    {
+                      if (regexec(&funArgSym[argType].preg,
+                                  line + funcargfull[i].rm_so,
+                                  maxMatch, reMatch, 0))
+                        {
+                          fprintf(stderr, "unexpected non-matching of array argument regexp!\n");
+                          exit(1);
+                        }
+                      if (reMatch[1].rm_eo - reMatch[1].rm_so > 5
+                          && !strncmp(line + funcargfull[i].rm_so
+                                      + reMatch[1].rm_so, constStr,
+                                      sizeof (constStr) - 2))
+                        constStrP = constStr;
+                      else
+                        constStrP = nonConstStr;
+                      sprintCArrayArgDims(arrayDimsCSize, arrayDimsC,
+                                          argType, line + funcargfull[i].rm_so,
+                                          reMatch);
+                    }
+                  fprintf(fpint, (funArgSym[argType].convert
+                                  ?funArgSym[argType].convcfmt
+                                  :funArgSym[argType].cfmt),
+                          constStrP,
                           (int)(funcargname[i].rm_eo - funcargname[i].rm_so),
-                          line + funcargname[i].rm_so);
+                          line + funcargname[i].rm_so, arrayDimsC);
                 }
               fputs(")\n{\n", fpint);
               if (functype != ISVOID)
                 {
                   fputs("  ", fpint);
-                  fprintf(fpint, funRet[functype].cfmt, 1, "v");
+                  fprintf(fpint, funRet[functype].cfmt, "", 1, "v");
                   fprintf(fpint, ";\n"
                           "  v = %s(", funcname);
                 }
@@ -653,7 +749,7 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
 	      cdoc[ncdoc].fname  = strdup(funcname);
 
 	      nch = sprintf(xline, funRet[functype].cfmt,
-                            (int)funcnameLen, funcname);
+                            "", (int)funcnameLen, funcname);
               xline[nch++] = ' ';
               xline[nch++] = '(';
               xline[nch] = '\0';
@@ -720,17 +816,24 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
                       xlineLen += 2U;
                     }
 
-                  char farg[128];
+                  enum { argDimsFSize = 128 };
+                  char farg[128], argDimsF[argDimsFSize];
                   /* FIXME: optional empty argument name unhandled */
                   int argType = funcargtype[i];
                   int isArray = isArrayArgType(argType);
+                  if (!isArray)
+                    argDimsF[0] = 0;
+                  else
+                    sprintFortranArrayArgDims(argDimsFSize, argDimsF, argType,
+                                              line + funcargfull[i].rm_so,
+                                              maxMatch, reMatch);
 		  int nchn
                     = snprintf(farg, sizeof (farg), "%s %.*s%s",
                                funArgSym[argType].f77name,
                                (int)(funcargname[i].rm_eo
                                      - funcargname[i].rm_so),
                                line + funcargname[i].rm_so,
-                               isArray ? "(*)" : "");
+                               argDimsF);
                   if (nchn < 0)
                     abort();
 		  if ( (xlineLen + (size_t)nchn) > 80 )
@@ -752,33 +855,60 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
 	}
       else if ( memcmp(line, "#define", 7) == 0 )
 	{
-	  pline = line;
-	  pline += 7;
+	  pline = line + 7;
 	  while ( isspace((int) *pline) ) pline++;
 	  parname = pline;
 	  size_t len = strlen(pline);
-          size_t i = 0;
-	  for (; i < len; i++ )
-	    {
-	      if ( isspace((int) pline[i]) ) break;
-	    }
-	  if ( i == len ) continue;
-	  pline += i+1;
+          size_t parnameLen = 0;
+	  while (parnameLen < len && !isspace((int)pline[parnameLen]))
+            ++parnameLen;
+	  if ( parnameLen == len ) continue;
+	  pline += parnameLen+1;
 	  while ( isspace((int) *pline) ) pline++;
-	  if ( isdigit((int) *pline) || *pline == '-' )
+	  if ( isdigit((int)*(pline + (*pline == '-'))) )
             {
-              parname[i] = 0;
-              parvalue = atoi(pline);
-
+              parname[parnameLen] = 0;
+              int parvalue = atoi(pline);
               /* fortran include */
-              fprintf(fpinc, "      INTEGER    %-22s\n"
+              fprintf(fpinc, "      INTEGER    %s\n"
                       "      PARAMETER (%-22s = %2d)\n", parname, parname, parvalue);
             }
+          else if (isSymStart((int)*pline)
+                   || (*pline == '-' && isSymStart(pline[1])))
+            {
+              parname[parnameLen] = 0;
+              size_t parValueLen = 1 + (*pline == '-');
+              while (isSym((int)pline[parValueLen]))
+                ++parValueLen;
+              char *parValue = pline;
+              for (size_t i = 0; i < numDefinedParnames; ++i)
+                if (!strcmp(definedParnames[i], parValue + (*pline == '-')))
+                  goto foundParname;
+              fprintf(stderr, "Found definition for %s to unknown value: %*s\n",
+                      parname, (int)parValueLen, parValue);
+              foundParname:
+              fprintf(fpinc, "      INTEGER    %s\n"
+                      "      PARAMETER (%-22s = %1.*s)\n",
+                      parname, parname, (int)parValueLen, parValue);
+            }
           else
             {
-              if ( strncmp(parname, "CDI_H_", 6) == 0 ) continue;
+              if ( strncmp(parname, cppHeaderSentinelMacro,
+                           cppHeaderSentinelMacroLen) == 0 ) continue;
               fprintf(fpinc, "%s", line);
+              continue;
             }
+          definedParnames = realloc(definedParnames,
+                                    sizeof (definedParnames[0])
+                                    * (numDefinedParnames+1));
+          if (!definedParnames)
+            abort();
+          char *remembered = definedParnames[numDefinedParnames]
+            = malloc(parnameLen+1);
+          if (!remembered)
+            abort();
+          memcpy(remembered, parname, parnameLen+1);
+          ++numDefinedParnames;
 	}
       else if (!regexec(&cppCondRE, line, maxMatch, reMatch, 0)
                && ((cppSwitchLen = reMatch[2].rm_eo - reMatch[2].rm_so) == 5)
@@ -803,7 +933,7 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
         }
       else if (detectComment(&line, &lineLen, &lineBufSize,
                              maxMatch, reMatch,
-                             xname, &xnameLen, xdes,
+                             xname, &xnameLen, &xdes, &lineno,
                              fpin, fpinc, fpint))
         ;
       else
@@ -815,6 +945,9 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
     }
 
   fputs("\n"
+        "#if defined __clang__\n"
+        "#  pragma GCC diagnostic pop\n"
+        "#endif\n"
         "#endif\n", fpint);
 
   fclose(fpin);
@@ -926,9 +1059,8 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
 }
 
 static void
-build_header_name(const char *fname, char *cppMacro)
+build_header_name(size_t len, const char *fname, char *cppMacro)
 {
-  size_t len = strlen(fname);
   for (size_t i = 0; i < len; ++i)
     switch (fname[i])
       {
@@ -1032,8 +1164,10 @@ symRegexCompile(size_t numSyms, struct symbol symList[],
       if (reCompile(&symList[sym].preg, symList[sym].parseRE,
                     line, lineBufSize))
         exit(EXIT_FAILURE);
-      if (symList[sym].nameMatch > maxMatch)
-        maxMatch = symList[sym].nameMatch;
+      size_t numMatches = symList[sym].nameMatch
+        + (size_t)arrayArgRank((int)sym);
+      if (numMatches > maxMatch)
+        maxMatch = numMatches;
     }
   return maxMatch;
 }
@@ -1112,9 +1246,8 @@ enum {
 
 static int detectComment(char **line_, ssize_t *lineLen, size_t *lineBufSize,
                          size_t maxMatch, regmatch_t reMatch[],
-                         char *xname, size_t *xnameLen,
-                         char *xdes,
-                         FILE *fpin, FILE *fpinc, FILE *fpint)
+                         char *xname, size_t *xnameLen, char **xdes_,
+                         int *lineno, FILE *fpin, FILE *fpinc, FILE *fpint)
 {
   char *restrict line = *line_;
   int matchType;
@@ -1123,11 +1256,13 @@ static int detectComment(char **line_, ssize_t *lineLen, size_t *lineBufSize,
       {
         /* found documentation comment */
         size_t nameMatchLen = (size_t)(reMatch[1].rm_eo - reMatch[1].rm_so),
-          docMatchLen = (size_t)(reMatch[2].rm_eo - reMatch[2].rm_so);
+          docMatchLen = (size_t)(reMatch[3].rm_so - reMatch[2].rm_eo);
         memcpy(xname, line + reMatch[1].rm_so, nameMatchLen);
         xname[nameMatchLen] = 0;
         *xnameLen = nameMatchLen;
-        memcpy(xdes, line + reMatch[2].rm_so, docMatchLen);
+        char *xdes = *xdes_ = realloc(*xdes_, docMatchLen + 1);
+        memcpy(xdes, line + reMatch[2].rm_eo, docMatchLen);
+        xdes[docMatchLen] = 0;
         {
           char *eol = xdes;
           while ((eol = strchr(eol, '\n')))
@@ -1136,11 +1271,12 @@ static int detectComment(char **line_, ssize_t *lineLen, size_t *lineBufSize,
               /* delete whitespace following newline */
               size_t squeezeLen = strspn(eol, " \t*");
               char *startoftext = eol + squeezeLen;
-              memmove(eol, startoftext, docMatchLen - (size_t)(eol - xdes));
+              memmove(eol, startoftext,
+                      docMatchLen - (size_t)(startoftext - xdes));
               docMatchLen -= squeezeLen;
+              xdes[docMatchLen] = 0;
             }
         }
-        xdes[docMatchLen] = 0;
         if (verbose || debug)
           printf("Found documentation for \"%s\": \"%s\"\n", xname,
                  xdes);
@@ -1189,13 +1325,17 @@ static int detectComment(char **line_, ssize_t *lineLen, size_t *lineBufSize,
               exit(EXIT_FAILURE);
           memcpy(line + *lineLen, lineExtension, (size_t)extLen + 1);
           *lineLen += extLen;
+          ++(*lineno);
           foundCommentEnd
             = !regexec(&commentEndRE, lineExtension, maxMatch, reMatch, 0);
         } while (!foundCommentEnd);
       }
     else
-      /* found no comment at all */
-      break;
+      {
+        /* found no comment at all */
+        matchType = 0;
+        break;
+      }
   } while (1);
   *line_ = line;
   return matchType;
@@ -1209,7 +1349,93 @@ isArrayArgType(int argType)
     || argType == ISDOUBLEV
     || argType == ISDOUBLEVV
     || argType == ISINTV
-    || argType == ISINTVV;
+    || argType == ISINTVV
+    || argType == ISINTVVV;
+}
+
+static inline int
+arrayArgRank(int argType)
+{
+  int rank = 0;
+  switch (argType) {
+  case ISFLOATV:
+  case ISDOUBLEV:
+  case ISINTV:
+    rank = 1;
+    break;
+  case ISINTVV:
+  case ISFLOATVV:
+  case ISDOUBLEVV:
+    rank = 2;
+    break;
+  case ISINTVVV:
+    rank = 3;
+    break;
+  }
+  return rank;
+}
+
+static void
+sprintCArrayArgDims(size_t argDimsCSize, char argDimsC[argDimsCSize],
+                    int argType, const char *argSpecC,
+                    const regmatch_t reMatch[])
+{
+  size_t argDimsCPos = 0;
+  int arank = arrayArgRank(argType);
+  for (int rank = 1; rank <= arank; ++rank)
+    {
+      size_t rankBoundMatch
+        = funArgSym[argType].nameMatch + (size_t)rank;
+      size_t boundStringLen
+        = (size_t)(reMatch[rankBoundMatch].rm_eo
+                   - reMatch[rankBoundMatch].rm_so);
+      argDimsC[argDimsCPos++] = '[';
+      if (boundStringLen)
+        {
+          memcpy(argDimsC + argDimsCPos,
+                 argSpecC + reMatch[rankBoundMatch].rm_so,
+                 boundStringLen);
+          argDimsCPos += boundStringLen;
+        }
+      argDimsC[argDimsCPos++] = ']';
+    }
+  argDimsC[argDimsCPos++] = 0;
+}
+
+
+static void
+sprintFortranArrayArgDims(size_t argDimsFSize, char argDimsF[argDimsFSize],
+                          int argType, const char *argSpecC,
+                          size_t maxMatch, regmatch_t reMatch[])
+{
+  if (regexec(&funArgSym[argType].preg, argSpecC, maxMatch,
+              reMatch, 0))
+    {
+      fprintf(stderr, "unexpected non-matching of array argument regexp!\n");
+      exit(1);
+    }
+  argDimsF[0] = '(';
+  size_t argDimsFPos = 1;
+  int arank = arrayArgRank(argType);
+  for (int rank = arank; rank > 0; --rank)
+    {
+      size_t rankBoundMatch
+        = funArgSym[argType].nameMatch + (size_t)rank;
+      size_t boundStringLen
+        = (size_t)(reMatch[rankBoundMatch].rm_eo
+                   - reMatch[rankBoundMatch].rm_so);
+      if (!boundStringLen)
+        argDimsF[argDimsFPos++] = '*';
+      else
+        {
+          memcpy(argDimsF + argDimsFPos,
+                 argSpecC + reMatch[rankBoundMatch].rm_so,
+                 boundStringLen);
+          argDimsFPos += boundStringLen;
+        }
+      argDimsF[argDimsFPos++] = rank > 1 ? ',' : ')';
+    }
+  argDimsF[argDimsFPos++] = 0;
 }
 
 
diff --git a/src/mo_cdi.f90 b/src/mo_cdi.f90
index 358fe875d5b2c1d4b1fa15103c36d09a48ea3db4..8e7757537a0d326acc85d7e6717e1a19dcccd89f 100644
--- a/src/mo_cdi.f90
+++ b/src/mo_cdi.f90
@@ -437,6 +437,7 @@ module mo_cdi
   public :: cdiInqNatts
   public :: cdiInqAtt
   public :: cdiDelAtt
+  public :: cdiCopyAtts
   public :: cdiDefAttInt
   public :: cdiDefAttFlt
   public :: cdiDefAttTxt
@@ -456,7 +457,6 @@ module mo_cdi
   public :: gridDuplicate
   public :: gridDefProj
   public :: gridInqProj
-  public :: gridDefProjType
   public :: gridInqProjType
   public :: gridInqType
   public :: gridInqSize
@@ -479,8 +479,8 @@ module mo_cdi
   integer(c_int), public, parameter :: CDI_KEY_YLONGNAME = 913
   integer(c_int), public, parameter :: CDI_KEY_YUNITS = 914
   integer(c_int), public, parameter :: CDI_KEY_VDIMNAME = 920
-  integer(c_int), public, parameter :: CDI_KEY_MAPNAME = 921
-  integer(c_int), public, parameter :: CDI_KEY_MAPPING = 922
+  integer(c_int), public, parameter :: CDI_KEY_MAPPING = 921
+  integer(c_int), public, parameter :: CDI_KEY_MAPNAME = 922
   integer(c_int), public, parameter :: CDI_KEY_NAME = 941
   integer(c_int), public, parameter :: CDI_KEY_DIMNAME = 942
   integer(c_int), public, parameter :: CDI_KEY_LONGNAME = 943
@@ -543,7 +543,12 @@ module mo_cdi
   public :: gridChangeType
   public :: gridDefComplexPacking
   public :: gridInqComplexPacking
+  public :: gridDefUvRelativeToGrid
+  public :: gridInqUvRelativeToGrid
+  public :: gridDefScanningMode
+  public :: gridInqScanningMode
   public :: zaxisName
+  public :: zaxisNamePtr
   public :: zaxisCreate
   public :: zaxisDestroy
   public :: zaxisInqType
@@ -1757,6 +1762,16 @@ module mo_cdi
       integer(c_int) :: f_result
     end function cdiInqNatts
 
+    function cdiCopyAtts(cdiID1_dummy, varID1_dummy, cdiID2_dummy,&
+    & varID2_dummy) bind(c, name = 'cdiCopyAtts') result(f_result)
+      import c_int
+      integer(c_int), value :: cdiID1_dummy
+      integer(c_int), value :: varID1_dummy
+      integer(c_int), value :: cdiID2_dummy
+      integer(c_int), value :: varID2_dummy
+      integer(c_int) :: f_result
+    end function cdiCopyAtts
+
     subroutine gridCompress(gridID_dummy) bind(c, name = 'gridCompress')
       import c_int
       integer(c_int), value :: gridID_dummy
@@ -1792,11 +1807,9 @@ module mo_cdi
       integer(c_int) :: f_result
     end function gridInqMask
 
-    subroutine gridPrint(gridID_dummy, index_dummy, opt_dummy) bind(c, name =&
-    & 'gridPrint')
+    subroutine gridPrint(gridID_dummy, opt_dummy) bind(c, name = 'gridPrint')
       import c_int
       integer(c_int), value :: gridID_dummy
-      integer(c_int), value :: index_dummy
       integer(c_int), value :: opt_dummy
     end subroutine gridPrint
 
@@ -1834,13 +1847,6 @@ module mo_cdi
       integer(c_int) :: f_result
     end function gridInqProj
 
-    subroutine gridDefProjType(gridID_dummy, projtype_dummy) bind(c, name =&
-    & 'gridDefProjType')
-      import c_int
-      integer(c_int), value :: gridID_dummy
-      integer(c_int), value :: projtype_dummy
-    end subroutine gridDefProjType
-
     function gridInqProjType(gridID_dummy) bind(c, name = 'gridInqProjType')&
     & result(f_result)
       import c_int
@@ -2229,6 +2235,34 @@ module mo_cdi
       integer(c_int) :: f_result
     end function gridInqComplexPacking
 
+    subroutine gridDefUvRelativeToGrid(gridID_dummy, uvRelativeToGrid_dummy)&
+    & bind(c, name = 'gridDefUvRelativeToGrid')
+      import c_int
+      integer(c_int), value :: gridID_dummy
+      integer(c_int), value :: uvRelativeToGrid_dummy
+    end subroutine gridDefUvRelativeToGrid
+
+    function gridInqUvRelativeToGrid(gridID_dummy) bind(c, name =&
+    & 'gridInqUvRelativeToGrid') result(f_result)
+      import c_int
+      integer(c_int), value :: gridID_dummy
+      integer(c_int) :: f_result
+    end function gridInqUvRelativeToGrid
+
+    subroutine gridDefScanningMode(gridID_dummy, mode_dummy) bind(c, name =&
+    & 'gridDefScanningMode')
+      import c_int
+      integer(c_int), value :: gridID_dummy
+      integer(c_int), value :: mode_dummy
+    end subroutine gridDefScanningMode
+
+    function gridInqScanningMode(gridID_dummy) bind(c, name =&
+    & 'gridInqScanningMode') result(f_result)
+      import c_int
+      integer(c_int), value :: gridID_dummy
+      integer(c_int) :: f_result
+    end function gridInqScanningMode
+
     function zaxisCreate(zaxistype_dummy, size_dummy) bind(c, name =&
     & 'zaxisCreate') result(f_result)
       import c_int
@@ -2263,11 +2297,9 @@ module mo_cdi
       integer(c_int) :: f_result
     end function zaxisDuplicate
 
-    subroutine zaxisPrint(zaxisID_dummy, index_dummy) bind(c, name =&
-    & 'zaxisPrint')
+    subroutine zaxisPrint(zaxisID_dummy) bind(c, name = 'zaxisPrint')
       import c_int
       integer(c_int), value :: zaxisID_dummy
-      integer(c_int), value :: index_dummy
     end subroutine zaxisPrint
 
     subroutine zaxisDefLevels(zaxisID_dummy, levels_dummy) bind(c, name =&
@@ -5377,6 +5409,27 @@ contains
     end do
   end subroutine zaxisName
 
+  function zaxisNamePtr(leveltype_dummy) result(f_result)
+    character(kind = c_char), dimension(:), pointer :: f_result
+    integer(c_int), value :: leveltype_dummy
+    type(c_ptr) :: ptr
+    integer :: rv_shape(1)
+    interface
+      function lib_zaxisNamePtr(leveltype_dummy) bind(c, name = 'zaxisNamePtr')&
+      & result(c_result)
+        import c_int, c_ptr
+        type(c_ptr) :: c_result
+        integer(c_int), value :: leveltype_dummy
+      end function lib_zaxisNamePtr
+    end interface
+    f_result => null()
+    ptr = lib_zaxisNamePtr(leveltype_dummy)
+    if(c_associated(ptr)) then
+      rv_shape(1) = int(lib_strlen(ptr))
+      call c_f_pointer(ptr, f_result, rv_shape)
+    end if
+  end function zaxisNamePtr
+
   function cdiZaxisDefKeyStr(zaxisID_dummy, key_dummy, size_dummy, mesg_dummy)&
   & result(f_result)
     integer(c_int) :: f_result
diff --git a/src/pio_interface.c b/src/pio_interface.c
index 37b2f033ae886ea919f708a2aa46b7bb0c9d38ef..da371c63ff0ad3f73a4983bf95146d73cf01e017 100644
--- a/src/pio_interface.c
+++ b/src/pio_interface.c
@@ -2,7 +2,7 @@
 #  include "config.h"
 #endif
 
-#include <stdint.h>
+#include <limits.h>
 #include <stdarg.h>
 #include <stdbool.h>
 #include <stdlib.h>
@@ -340,7 +340,7 @@ scatterGatherPackFunc(void *dataDesc, void *buf, int size, int *pos,
   unsigned char *dstBuf = (unsigned char *)buf + pos_,
     *bufEnd = (unsigned char *)buf + size;
   size_t elemSize = p->elemSize;
-  xassert(elemSize <= SIZE_MAX);
+  xassert(elemSize <= SSIZE_MAX);
   const unsigned char *data = p->data;
   unsigned copyCount = 0, numElems = p->numElems;
   for (unsigned j = 0; j < numBlocks && copyCount < numElems; ++j)
@@ -356,7 +356,7 @@ scatterGatherPackFunc(void *dataDesc, void *buf, int size, int *pos,
             }
           size_t bsize = (size_t)bl * elemSize;
           xassert(dstBuf + bsize <= bufEnd);
-          memcpy(dstBuf, data + (size_t)elemSize * (size_t)disps[j], bsize);
+          memcpy(dstBuf, data + (ssize_t)elemSize * (ssize_t)disps[j], bsize);
           dstBuf += bsize;
         }
     }
diff --git a/src/pio_mpi_fw_at_all.c b/src/pio_mpi_fw_at_all.c
index a470d17cc4329e3591ba171d6a6d17757cf9451a..22366c96c540a7de9a305548121fa2a53bc4a486 100644
--- a/src/pio_mpi_fw_at_all.c
+++ b/src/pio_mpi_fw_at_all.c
@@ -117,7 +117,7 @@ fwFileWriteAtAll(int fileID, const void *buffer, size_t len)
     rankPio = commInqRankPio();
   /* find position to write to */
   of->collWriteSize[rankPio] = (int)len;
-  xmpi(MPI_Allgather(MPI_IN_PLACE, 0, MPI_CDI_DATATYPE_NULL,
+  xmpi(MPI_Allgather(MPI_IN_PLACE, 0, MPI_DATATYPE_NULL,
                      of->collWriteSize, 1, MPI_INT, commPio));
   MPI_Offset myPos = of->pos, nextWritePos;
   for (size_t i = 0; i < (size_t)rankPio; ++i)
diff --git a/src/pio_mpi_fw_at_reblock.c b/src/pio_mpi_fw_at_reblock.c
index c60df0dadcc1a271cf4314a0f3f3389cd4d425c3..e945fda97ca7cf9e3484bd68bb80eb3417ad7ee7 100644
--- a/src/pio_mpi_fw_at_reblock.c
+++ b/src/pio_mpi_fw_at_reblock.c
@@ -355,7 +355,7 @@ fwFileWriteAtReblock(int fileID, const void *buffer, size_t len)
     rankPio = commInqRankPio();
   /* find position to write to */
   of->collWriteSize[rankPio] = (long)len;
-  xmpi(MPI_Allgather(MPI_IN_PLACE, 0, MPI_CDI_DATATYPE_NULL,
+  xmpi(MPI_Allgather(MPI_IN_PLACE, 0, MPI_DATATYPE_NULL,
                      of->collWriteSize, 1, MPI_LONG, commPio));
   /* figure out which block buffers intersect locally held data and
    * what remotely held data intersects buffers on task */
diff --git a/src/pio_roles.c b/src/pio_roles.c
index 1946e280b069ca17fa0d5d672ef12f85647c9ba4..20f315389d8912e0556e43e6903f53dfb1e4aedd 100644
--- a/src/pio_roles.c
+++ b/src/pio_roles.c
@@ -117,7 +117,7 @@ cdiPioCSRBalanced(MPI_Comm commSuper, int IOMode, int nProcsIO)
     if (commRank == commSize - 1)
       role = specialRole;
     else if (commRank <= clientsPerCollectorMax * (nProcsIO - 1 - rest))
-      role = (commRank + 1 % (clientsPerCollectorMax + 1)) != 0
+      role = ((commRank + 1) % (clientsPerCollectorMax + 1)) != 0
         ? PIO_ROLE_CLIENT : collType;
     else
       role = ((commRank - clientsPerCollectorMax * (nProcsIO - 1 - rest) + 1)
diff --git a/src/pio_util.c b/src/pio_util.c
index 529d2ed51a47a3008f824e0d2bf4851cc090cad7..e1ef723cf087844b8f3a0724ea89b4579986a36f 100644
--- a/src/pio_util.c
+++ b/src/pio_util.c
@@ -184,7 +184,7 @@ cdiPioQueryVarDims(int varShape[3], int vlistID, int varID)
       varShape[1] = gridInqSize(gridID) / 2;
       break;
     case GRID_GENERIC:
-    case GRID_LCC:
+    case GRID_PROJECTION:
     case GRID_GME:
     case GRID_CURVILINEAR:
     case GRID_UNSTRUCTURED:
diff --git a/src/pio_util.h b/src/pio_util.h
index 47ff0a800ba862efe5278843d5f257afd63adc45..0126f6842e20f8650ed0bfe22f827101f9ba0d28 100644
--- a/src/pio_util.h
+++ b/src/pio_util.h
@@ -8,7 +8,7 @@
 
 #include <mpi.h>
 
-#ifndef _ERROR_H
+#ifndef ERROR_H
 #include "error.h"
 #endif
 
diff --git a/src/pkgconfig/cdi.pc.in b/src/pkgconfig/cdi.pc.in
index 0cbd19e882854e6ac9f2d8e5d7513deb68dfc53a..5d76a923b8ebd5a4ecec420648f139adabb9773b 100644
--- a/src/pkgconfig/cdi.pc.in
+++ b/src/pkgconfig/cdi.pc.in
@@ -4,7 +4,7 @@ libdir=@libdir@
 includedir=@includedir@
 cflags=-I@includedir@
 fcflags=@FPP_INCOPT@@includedir@ @CDI_F90_INTERFACE_FCFLAGS@
-libs=-L@libdir@ -lcdi @GRIB_API_LIBS@ @JASPER_LIBS@ @NETCDF_LIBS@ @SZLIB_LIBS@ @THREADS_LIBS@
+libs=-L@libdir@ -lcdi @GRIB_API_LIBS@ @NETCDF_LIBS@ @SZLIB_LIBS@ @THREADS_LIBS@ @LIBS@
 threads_libs=@THREADS_LIBS@
 threads_cflags=@THREADS_INCLUDE@
 szlib_cflags=@SZLIB_INCLUDE@
@@ -12,7 +12,7 @@ szlib_libs=@SZLIB_LIBS@
 netcdf_root=@NETCDF_ROOT@
 netcdf_cflags=@NETCDF_INCLUDE@
 netcdf_libs=@NETCDF_LIBS@
-jasper_libs=@JASPER_LIBS@
+aux_libs=@LIBS@
 grib_api_cflags=@GRIB_API_INCLUDE@
 grib_api_libs=@GRIB_API_LIBS@
 cdi_build_cc=@CC@
diff --git a/src/pkgconfig/cdipio.pc.in b/src/pkgconfig/cdipio.pc.in
index b8020c8b6352175459d68467b72c50b4be335914..7b34f21fcd148bcc782421289f22e506bf432e94 100644
--- a/src/pkgconfig/cdipio.pc.in
+++ b/src/pkgconfig/cdipio.pc.in
@@ -4,7 +4,7 @@ libdir=@libdir@
 includedir=@includedir@
 cflags=-I@includedir@
 fcflags=@FPP_INCOPT@@includedir@ @CDI_F90_INTERFACE_FCFLAGS@
-libs=-L@libdir@ -lcdipio @PPM_CORE_LIBS@ @YAXT_LIBS@ -lcdi @GRIB_API_LIBS@ @JASPER_LIBS@ @NETCDF_LIBS@ @SZLIB_LIBS@ @THREADS_LIBS@
+libs=-L@libdir@ -lcdipio @PPM_CORE_LIBS@ @YAXT_LIBS@ -lcdi @GRIB_API_LIBS@ @NETCDF_LIBS@ @SZLIB_LIBS@ @THREADS_LIBS@ @LIBS@
 threads_libs=@THREADS_LIBS@
 threads_cflags=@THREADS_INCLUDE@
 szlib_cflags=@SZLIB_INCLUDE@
@@ -12,9 +12,9 @@ szlib_libs=@SZLIB_LIBS@
 netcdf_root=@NETCDF_ROOT@
 netcdf_cflags=@NETCDF_INCLUDE@
 netcdf_libs=@NETCDF_LIBS@
-jasper_libs=@JASPER_LIBS@
 grib_api_cflags=@GRIB_API_INCLUDE@
 grib_api_libs=@GRIB_API_LIBS@
+aux_libs=@LIBS@
 cdipio_build_cc=@CC@
 cdipio_build_cflags=@CFLAGS@
 cdipio_build_cppflags=@CPPFLAGS@
diff --git a/src/serialize.h b/src/serialize.h
index f60cab5b9a8f78bceeb6d84c8f55060c7189e99b..dc0e6b9cf4ba3e0cd2cee21ecb190ddd7de8fa95 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -11,7 +11,7 @@
 #ifndef  CDI_CKSUM_H_
 #include "cdi_cksum.h"
 #endif
-#ifndef  _ERROR_H
+#ifndef  ERROR_H
 #include "error.h"
 #endif
 
diff --git a/src/stream.c b/src/stream.c
index 844d706e2d2c35d9a2c0fcb7bd5859ef77b2a073..b4020ca719c9e075262bda0c38115dd04c05f276 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -637,6 +637,11 @@ int streamOpenA(const char *filename, const char *filemode, int filetype)
   if ( status < 0 ) return status;
   vlist_t *vlistptr = vlist_to_pointer(streamptr->vlistID);
   vlistptr->ntsteps = (int)cdiInqTimeSize(streamID);
+
+  // Needed for NetCDF4
+  for ( int varID = 0; varID < vlistptr->nvars; ++varID )
+    streamptr->vars[varID].defmiss = true;
+
   if ( !strcmp(filemode, "r") ) cdiVlistMakeImmutable(streamptr->vlistID);
 
   {
@@ -972,6 +977,11 @@ void cdiStreamCloseDefaultDelegate(stream_t *streamptr, int recordBufIsToBeDelet
       case CDI_FILETYPE_NC4C:
         {
           cdfClose(fileID);
+          if (streamptr->ntsteps == 0)
+            {
+              Free(streamptr->tsteps[0].records);
+              Free(streamptr->tsteps[0].recIDs);
+            }
           break;
         }
 #endif
@@ -1349,15 +1359,14 @@ void streamWriteContents(int streamID, char *cname)
 
   if ( cnp == NULL ) SysError(cname);
 
-  fprintf(cnp, "#CDI library version %s\n", cdiLibraryVersion());
-  fprintf(cnp, "#\n");
+  fprintf(cnp, "#CDI library version %s\n"
+          "#\n", cdiLibraryVersion());
 
-  fprintf(cnp, "filename: %s\n", streamptr->filename);
   int filetype = streamptr->filetype;
-  fprintf(cnp, "filetype: %s\n", strfiletype(filetype));
+  fprintf(cnp, "filename: %s\n"
+          "filetype: %s\n", streamptr->filename, strfiletype(filetype));
 
-  fprintf(cnp, "#\n");
-  fprintf(cnp, "#grids:\n");
+  fputs("#\n#grids:\n", cnp);
 
   int ngrids = vlistNgrids(vlistID);
   for ( int i = 0; i < ngrids; i++ )
@@ -1369,9 +1378,7 @@ void streamWriteContents(int streamID, char *cname)
       fprintf(cnp, "%4d:%4d:%4d:%4d\n", i+1, gridtype, xsize, ysize);
     }
 
-  fprintf(cnp, "#\n");
-
-  fprintf(cnp, "varID:code:gridID:zaxisID:tsteptype:datatype\n");
+  fputs("#\nvarID:code:gridID:zaxisID:tsteptype:datatype\n", cnp);
 
   int nvars = vlistNvars(vlistID);
   for ( int varID = 0; varID < nvars; varID++ )
@@ -1385,9 +1392,7 @@ void streamWriteContents(int streamID, char *cname)
 	      varID+1, code, gridID, zaxisID, tsteptype, datatype);
     }
 
-  fprintf(cnp, "#\n");
-
-  fprintf(cnp, "tsID:nrecs:date:time\n");
+  fputs("#\ntsID:nrecs:date:time\n", cnp);
 
   int tsID = 0;
   while (1)
@@ -1406,9 +1411,7 @@ void streamWriteContents(int streamID, char *cname)
 	break;
     }
 
-  fprintf(cnp, "#\n");
-
-  fprintf(cnp, "tsID:recID:varID:levID:size:pos\n");
+  fputs("#\ntsID:recID:varID:levID:size:pos\n", cnp);
 
   tsID = 0;
   while (1)
diff --git a/src/stream_cdf_i.c b/src/stream_cdf_i.c
index 8eb7510800bc453b41e8ac6e16cad6b28f0fb97d..1421164115ecc2fe5153d22d7a5e447c5f513bdb 100644
--- a/src/stream_cdf_i.c
+++ b/src/stream_cdf_i.c
@@ -203,50 +203,48 @@ int setBaseTime(const char *timeunits, taxis_t *taxis)
   int rdate = -1, rtime = -1;
 
   size_t len = strlen(timeunits);
-  char *tu = (char*) Malloc((len+1) * sizeof(char));
-  memcpy(tu, timeunits, (len+1) * sizeof(char));
-  char *ptu = tu;
+  char *restrict tu = (char *)Malloc((len+1) * sizeof(char));
 
-  for ( size_t i = 0; i < len; i++ ) ptu[i] = (char)tolower((int) ptu[i]);
+  for ( size_t i = 0; i < len; i++ ) tu[i] = (char)tolower((int)timeunits[i]);
+  tu[len] = 0;
 
-  int timeunit = get_timeunit(len, ptu);
+  int timeunit = get_timeunit(len, tu);
   if ( timeunit == -1 )
     {
       Message("Unsupported TIMEUNIT: %s!", timeunits);
       return 1;
     }
 
-  while ( ! isspace(*ptu) && *ptu != 0 ) ptu++;
-  if ( *ptu )
+  size_t pos = 0;
+  while ( ! isspace(tu[pos]) && tu[pos] != 0 ) ++pos;
+  if ( tu[pos] )
     {
-      while ( isspace(*ptu) ) ptu++;
+      while ( isspace(tu[pos]) ) ++pos;
 
-      if ( str_is_equal(ptu, "as") )
-        timetype = TAXIS_ABSOLUTE;
-      else if ( str_is_equal(ptu, "since") )
+      if ( str_is_equal(tu+pos, "since") )
         timetype = TAXIS_RELATIVE;
 
-      while ( ! isspace(*ptu) && *ptu != 0 ) ptu++;
-      if ( *ptu )
+      while ( ! isspace(tu[pos]) && tu[pos] != 0 ) ++pos;
+      if ( tu[pos] )
         {
-          while ( isspace(*ptu) ) ptu++;
+          while ( isspace(tu[pos]) ) ++pos;
 
           if ( timetype == TAXIS_ABSOLUTE )
             {
-              if ( !str_is_equal(ptu, "%y%m%d.%f") && timeunit == TUNIT_DAY )
+              if ( !str_is_equal(tu+pos, "%y%m%d.%f") && timeunit == TUNIT_DAY )
                 {
-                  Message("Unsupported format %s for TIMEUNIT day!", ptu);
+                  Message("Unsupported format %s for TIMEUNIT day!", tu+pos);
                   timeunit = -1;
                 }
-              else if ( !str_is_equal(ptu, "%y%m.%f") && timeunit == TUNIT_MONTH )
+              else if ( !str_is_equal(tu+pos, "%y%m.%f") && timeunit == TUNIT_MONTH )
                 {
-                  Message("Unsupported format %s for TIMEUNIT month!", ptu);
+                  Message("Unsupported format %s for TIMEUNIT month!", tu+pos);
                   timeunit = -1;
                 }
             }
           else if ( timetype == TAXIS_RELATIVE )
             {
-              scanTimeString(ptu, &rdate, &rtime);
+              scanTimeString(tu+pos, &rdate, &rtime);
 
               (*taxis).rdate = rdate;
               (*taxis).rtime = rtime;
@@ -395,15 +393,13 @@ void cdfGetAttText(int fileID, int ncvarid, const char *attname, size_t attlen,
 }
 
 static
-bool xtypeIsText(nc_type xtype)
+bool xtypeIsText(int xtype)
 {
-  bool isText = false;
-
-  if      ( xtype == NC_CHAR ) isText = true;
+  bool isText = ( xtype == NC_CHAR )
 #if  defined  (HAVE_NETCDF4)
-  else if ( xtype == NC_STRING ) isText = true;
+    || ( xtype == NC_STRING )
 #endif
-
+    ;
   return isText;
 }
 
@@ -462,13 +458,20 @@ void cdf_scale_add(size_t size, double *data, double addoffset, double scalefact
   bool laddoffset   = IS_NOT_EQUAL(addoffset, 0);
   bool lscalefactor = IS_NOT_EQUAL(scalefactor, 1);
 
-  if ( laddoffset || lscalefactor )
+  if ( laddoffset && lscalefactor )
     {
-      for ( size_t i = 0; i < size; ++i )
-        {
-          if ( lscalefactor ) data[i] *= scalefactor;
-          if ( laddoffset )   data[i] += addoffset;
-        }
+      for (size_t i = 0; i < size; ++i )
+        data[i] = data[i] * scalefactor + addoffset;
+    }
+  else if (lscalefactor)
+    {
+      for (size_t i = 0; i < size; ++i )
+        data[i] *= scalefactor;
+    }
+  else if (laddoffset)
+    {
+      for (size_t i = 0; i < size; ++i )
+        data[i] += addoffset;
     }
 }
 
@@ -1085,7 +1088,14 @@ void cdf_scan_var_attr(int nvars, ncvar_t *ncvars, ncdim_t *ncdims, int timedimi
           int storage_in;
           nc_inq_var_deflate(ncid, ncvarid, &shuffle, &deflate, &deflate_level);
           if ( deflate > 0 ) ncvars[ncvarid].deflate = 1;
-
+          /*
+          size_t cache_size, nelems;
+          float preemption;
+          nc_get_chunk_cache(&cache_size, &nelems, &preemption);
+          printf("cache_size %lu nelems %lu preemption %g\n", cache_size, nelems, preemption);
+          nc_get_var_chunk_cache(ncid, ncvarid, &cache_size, &nelems, &preemption);
+          printf("varid %d cache_size %lu nelems %lu preemption %g\n", ncvarid, cache_size, nelems, preemption);
+          */
           if ( nc_inq_var_chunking(ncid, ncvarid, &storage_in, chunks) == NC_NOERR )
             {
               if ( storage_in == NC_CHUNKED )
@@ -1588,10 +1598,9 @@ void cdf_set_dimtype(int nvars, ncvar_t *ncvars, ncdim_t *ncdims)
 	  for ( int i = 0; i < ndims; i++ )
 	    {
 	      int ncdimid = ncvars[ncvarid].dimids[i];
-	      if      ( ncdims[ncdimid].dimtype == X_AXIS ) cdf_set_dim(ncvars, ncvarid, i, X_AXIS);
-	      else if ( ncdims[ncdimid].dimtype == Y_AXIS ) cdf_set_dim(ncvars, ncvarid, i, Y_AXIS);
-	      else if ( ncdims[ncdimid].dimtype == Z_AXIS ) cdf_set_dim(ncvars, ncvarid, i, Z_AXIS);
-	      else if ( ncdims[ncdimid].dimtype == T_AXIS ) cdf_set_dim(ncvars, ncvarid, i, T_AXIS);
+              int dimtype = ncdims[ncdimid].dimtype;
+	      if ( dimtype >= X_AXIS && dimtype <= T_AXIS )
+                cdf_set_dim(ncvars, ncvarid, i, dimtype);
 	    }
 
 	  if ( CDI_Debug )
@@ -1612,9 +1621,10 @@ void cdf_set_dimtype(int nvars, ncvar_t *ncvars, ncdim_t *ncdims)
 	  int ndims = ncvars[ncvarid].ndims;
 	  for ( int i = 0; i < ndims; i++ )
 	    {
-	      if      ( ncvars[ncvarid].dimtype[i] == X_AXIS ) lxdim = true;
-	      else if ( ncvars[ncvarid].dimtype[i] == Y_AXIS ) lydim = true;
-	      else if ( ncvars[ncvarid].dimtype[i] == Z_AXIS ) lzdim = true;
+              int dimtype = ncvars[ncvarid].dimtype[i];
+              lxdim = lxdim | (dimtype == X_AXIS);
+	      lydim = lydim | (dimtype == Y_AXIS);
+	      lzdim = lzdim | (dimtype == Z_AXIS);
 	      /* else if ( ncvars[ncvarid].dimtype[i] == T_AXIS ) ltdim = true; */
 	    }
 
@@ -1926,10 +1936,8 @@ void grid_set_chunktype(grid_t *grid, ncvar_t *ncvar)
 
       if ( grid->type == GRID_UNSTRUCTURED )
         {
-          if ( ncvar->chunks[ndims-1] == grid->size )
-            ncvar->chunktype = CDI_CHUNK_GRID;
-          else
-            ncvar->chunktype = CDI_CHUNK_AUTO;
+          ncvar->chunktype = ncvar->chunks[ndims-1] == grid->size
+            ? CDI_CHUNK_GRID : CDI_CHUNK_AUTO;
         }
       else
         {
@@ -2319,7 +2327,7 @@ bool cdf_read_coordinates(struct cdfLazyGrid *restrict lazyGrid, ncvar_t *ncvar,
                   {
                     *vdimid = ncvars[bvarid].dimids[nbdims-1];
                     grid->nvertex = (int)ncdims[*vdimid].len;
-                    cdf_load_bounds(grid->size*grid->nvertex, &ncvars[xvarid], &grid->x.bounds, &lazyGrid->xBoundsGet);
+                    cdf_load_bounds(size*(size_t)grid->nvertex, &ncvars[xvarid], &grid->x.bounds, &lazyGrid->xBoundsGet);
                   }
               }
           }
@@ -2337,7 +2345,7 @@ bool cdf_read_coordinates(struct cdfLazyGrid *restrict lazyGrid, ncvar_t *ncvar,
                         *vdimid = ncvars[bvarid].dimids[nbdims-1];
                         grid->nvertex = (int)ncdims[*vdimid].len;
                       }
-                    cdf_load_bounds(grid->size*grid->nvertex, &ncvars[yvarid], &grid->y.bounds, &lazyGrid->yBoundsGet);
+                    cdf_load_bounds(size*(size_t)grid->nvertex, &ncvars[yvarid], &grid->y.bounds, &lazyGrid->yBoundsGet);
                   }
               }
           }
@@ -2772,10 +2780,10 @@ void cdf_define_all_zaxes(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int
 	      if ( ncvars[zvarid].bounds != CDI_UNDEFID )
 		{
 		  int nbdims = ncvars[ncvars[zvarid].bounds].ndims;
-		  if ( nbdims == 2 )
+		  if ( nbdims == 2 || is_scalar )
 		    {
-		      int nlevel  = (int)ncdims[ncvars[ncvars[zvarid].bounds].dimids[0]].len;
-		      int nvertex = (int)ncdims[ncvars[ncvars[zvarid].bounds].dimids[1]].len;
+		      int nlevel  = is_scalar ? 1 : (int)ncdims[ncvars[ncvars[zvarid].bounds].dimids[0]].len;
+		      int nvertex = (int)ncdims[ncvars[ncvars[zvarid].bounds].dimids[1-is_scalar]].len;
 		      if ( nlevel == zsize && nvertex == 2 )
 			{
 			  with_bounds = true;
@@ -2822,13 +2830,13 @@ void cdf_define_all_zaxes(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int
           if ( zaxisType == ZAXIS_HYBRID )
             {
               if ( psvarid != -1 )
-                cdiZaxisDefKeyStr(zaxisID, CDI_KEY_PSNAME, strlen(ncvars[psvarid].name)+1, ncvars[psvarid].name);
+                cdiZaxisDefKeyStr(zaxisID, CDI_KEY_PSNAME, (int)(strlen(ncvars[psvarid].name)+1), ncvars[psvarid].name);
               if ( p0varid != -1 )
                 {
                   double px = 1;
                   cdf_get_var_double(ncvars[p0varid].ncid, p0varid, &px);
                   cdiZaxisDefKeyFlt(zaxisID, CDI_KEY_P0VALUE, px);
-                  cdiZaxisDefKeyStr(zaxisID, CDI_KEY_P0NAME, strlen(ncvars[p0varid].name)+1, ncvars[p0varid].name);
+                  cdiZaxisDefKeyStr(zaxisID, CDI_KEY_P0NAME, (int)(strlen(ncvars[p0varid].name)+1), ncvars[p0varid].name);
                 }
             }
 
@@ -3007,11 +3015,11 @@ void cdf_define_all_vars(stream_t *streamptr, int vlistID, int instID, int model
       int ndims = ncvars[ncvarid].ndims;
       int iodim = 0;
       int ixyz = 0;
-      int ipow10[4] = {1, 10, 100, 1000};
+      static const int ipow10[4] = {1, 10, 100, 1000};
 
       if ( ncvars[ncvarid].tsteptype != TSTEP_CONSTANT ) iodim++;
 
-      int *dimids = ncvars[ncvarid].dimids;
+      const int *dimids = ncvars[ncvarid].dimids;
 
       if ( gridInqType(gridID) == GRID_UNSTRUCTURED && ndims-iodim <= 2 && ydimid == xdimid )
         {
@@ -3451,7 +3459,7 @@ void cdf_set_ucla_dimtype(int ndims, ncdim_t *ncdims, ncvar_t *ncvars)
 }
 
 static
-int cdf_check_vars(int nvars, ncvar_t *ncvars, int ntsteps, int timedimid)
+int cdf_check_vars(int nvars, ncvar_t *ncvars, size_t ntsteps, int timedimid)
 {
   for ( int ncvarid = 0; ncvarid < nvars; ncvarid++ )
     {
@@ -3627,7 +3635,7 @@ int cdfInqContents(stream_t *streamptr)
   size_t ntsteps = 0;
   if ( timedimid != CDI_UNDEFID ) cdf_inq_dimlen(fileID, timedimid, &ntsteps);
 
-  if ( CDI_Debug ) Message("Number of timesteps = %d", ntsteps);
+  if ( CDI_Debug ) Message("Number of timesteps = %zu", ntsteps);
   if ( CDI_Debug ) Message("Time dimid = %d", streamptr->basetime.ncdimid);
 
   /* read ncdims */
@@ -3726,8 +3734,8 @@ int cdfInqContents(stream_t *streamptr)
       ncvar_t *ncvar = &ncvars[ncvarid];
       if ( ncvar->isvar == TRUE && ncvar->ncoordvars )
 	{
-	  int ndims = ncvar->ncoordvars;
-	  for ( int i = 0; i < ndims; i++ )
+	  int ncoordvars = ncvar->ncoordvars;
+	  for ( int i = 0; i < ncoordvars; i++ )
 	    {
 	      if      ( ncvars[ncvar->coordvarids[i]].islon ||
                         ncvars[ncvar->coordvarids[i]].isx )   ncvar->xvarid = ncvar->coordvarids[i];
@@ -3767,7 +3775,7 @@ int cdfInqContents(stream_t *streamptr)
   nvars_data = nvarids;
 
   if ( CDI_Debug ) Message("time varid = %d", streamptr->basetime.ncvarid);
-  if ( CDI_Debug ) Message("ntsteps = %d", ntsteps);
+  if ( CDI_Debug ) Message("ntsteps = %zu", ntsteps);
   if ( CDI_Debug ) Message("nvars_data = %d", nvars_data);
 
 
@@ -3829,6 +3837,9 @@ int cdfInqContents(stream_t *streamptr)
       if ( ncvars[nctimevarid].longname[0] )
         ptaxisDefLongname(taxis, ncvars[nctimevarid].longname);
 
+      if ( ncvars[nctimevarid].units[0] )
+        ptaxisDefUnits(taxis, ncvars[nctimevarid].units);
+
       int datatype = (ncvars[nctimevarid].xtype == NC_FLOAT) ? CDI_DATATYPE_FLT32 : CDI_DATATYPE_FLT64;
       ptaxisDefDatatype(taxis, datatype);
     }
diff --git a/src/stream_cdf_o.c b/src/stream_cdf_o.c
index c86a9a289f1591ec1cafabead15893ccdbfdef9f..91e612bac17010be8cecbfad09fd1c389938fc7e 100644
--- a/src/stream_cdf_o.c
+++ b/src/stream_cdf_o.c
@@ -65,12 +65,11 @@ void cdfDefTimeValue(stream_t *streamptr, int tsID)
       streamptr->ncmode = 2;
     }
 
-  size_t index = (size_t)tsID;
-
   double timevalue = cdiEncodeTimeval(taxis->vdate, taxis->vtime, &streamptr->tsteps[0].taxis);
   if ( CDI_Debug ) Message("tsID = %d  timevalue = %f", tsID, timevalue);
 
   int ncvarid = streamptr->basetime.ncvarid;
+  size_t index = (size_t)tsID;
   cdf_put_var1_double(fileID, ncvarid, &index, &timevalue);
 
   if ( taxis->has_bounds )
@@ -94,10 +93,6 @@ void cdfDefTimeValue(stream_t *streamptr, int tsID)
       timevalue = taxis->fc_period;
       cdf_put_var1_double(fileID, ncvarid, &index, &timevalue);
     }
-
-  /*
-printf("fileID = %d %d %d %f\n", fileID, time_varid, index, timevalue);
-  */
 }
 
 static
@@ -119,7 +114,7 @@ int cdfDefTimeBounds(int fileID, int nctimevarid, int nctimedimid, const char *t
   if ( taxis->climatology )
     {
       static const char climatology_bndsName[] = "climatology_bnds",
-        climatology_bndsAttName[] = "climatology";
+                        climatology_bndsAttName[] = "climatology";
       bndsAttName = climatology_bndsAttName;
       bndsAttValLen = sizeof (climatology_bndsName) - 1;
       bndsAttVal = climatology_bndsName;
@@ -143,42 +138,46 @@ int cdfDefTimeBounds(int fileID, int nctimevarid, int nctimedimid, const char *t
 }
 
 static
-void cdfDefTimeUnits(char *unitstr, taxis_t* taxis0, taxis_t* taxis)
+void cdfDefTimeUnits(char *unitstr, taxis_t *taxis0, taxis_t *taxis)
 {
-  unitstr[0] = 0;
-
-  if ( taxis0->type == TAXIS_ABSOLUTE )
+  if ( taxis->units && taxis->units[0] )
     {
-      if ( taxis0->unit == TUNIT_YEAR )
-        sprintf(unitstr, "year as %s", "%Y.%f");
-      else if ( taxis0->unit == TUNIT_MONTH )
-        sprintf(unitstr, "month as %s", "%Y%m.%f");
-      else
-        sprintf(unitstr, "day as %s", "%Y%m%d.%f");
+      strcpy(unitstr, taxis->units);
     }
   else
     {
-      int timeunit = taxis->unit != -1 ? taxis->unit : TUNIT_HOUR;
-      int rdate    = taxis->rdate;
-      int rtime    = taxis->rtime;
-      if ( rdate == -1 )
+      unitstr[0] = 0;
+
+      if ( taxis0->type == TAXIS_ABSOLUTE )
         {
-          rdate  = taxis->vdate;
-          rtime  = taxis->vtime;
+          if      ( taxis0->unit == TUNIT_YEAR  ) sprintf(unitstr, "year as %s", "%Y.%f");
+          else if ( taxis0->unit == TUNIT_MONTH ) sprintf(unitstr, "month as %s", "%Y%m.%f");
+          else                                    sprintf(unitstr, "day as %s", "%Y%m%d.%f");
         }
+      else
+        {
+          int timeunit = taxis->unit != -1 ? taxis->unit : TUNIT_HOUR;
+          int rdate    = taxis->rdate;
+          int rtime    = taxis->rtime;
+          if ( rdate == -1 )
+            {
+              rdate  = taxis->vdate;
+              rtime  = taxis->vtime;
+            }
 
-      int year, month, day, hour, minute, second;
-      cdiDecodeDate(rdate, &year, &month, &day);
-      cdiDecodeTime(rtime, &hour, &minute, &second);
+          int year, month, day, hour, minute, second;
+          cdiDecodeDate(rdate, &year, &month, &day);
+          cdiDecodeTime(rtime, &hour, &minute, &second);
 
-      if ( timeunit == TUNIT_QUARTER   ) timeunit = TUNIT_MINUTE;
-      if ( timeunit == TUNIT_30MINUTES ) timeunit = TUNIT_MINUTE;
-      if ( timeunit == TUNIT_3HOURS  ||
-	   timeunit == TUNIT_6HOURS  ||
-	   timeunit == TUNIT_12HOURS ) timeunit = TUNIT_HOUR;
+          if ( timeunit == TUNIT_QUARTER   ) timeunit = TUNIT_MINUTE;
+          if ( timeunit == TUNIT_30MINUTES ) timeunit = TUNIT_MINUTE;
+          if ( timeunit == TUNIT_3HOURS  ||
+               timeunit == TUNIT_6HOURS  ||
+               timeunit == TUNIT_12HOURS ) timeunit = TUNIT_HOUR;
 
-      sprintf(unitstr, "%s since %d-%d-%d %02d:%02d:%02d",
-              tunitNamePtr(timeunit), year, month, day, hour, minute, second);
+          sprintf(unitstr, "%s since %d-%d-%d %02d:%02d:%02d",
+                  tunitNamePtr(timeunit), year, month, day, hour, minute, second);
+        }
     }
 }
 
@@ -249,6 +248,14 @@ void cdfDefTime(stream_t* streamptr)
 
   streamptr->basetime.ncvarid = time_varid;
 
+#if  defined  (HAVE_NETCDF4)
+  if ( streamptr->filetype == CDI_FILETYPE_NC4 || streamptr->filetype == CDI_FILETYPE_NC4C )
+    {
+      size_t chunk = 512;
+      cdf_def_var_chunking(fileID, time_varid, NC_CHUNKED, &chunk);
+    }
+#endif
+
   {
     static const char timeStr[] = "time";
     cdf_put_att_text(fileID, time_varid, "standard_name", sizeof(timeStr) - 1, timeStr);
@@ -289,9 +296,7 @@ void cdfDefTime(stream_t* streamptr)
   if ( taxis->type == TAXIS_FORECAST )
     {
       int leadtimeid;
-
       cdf_def_var(fileID, "leadtime", xtype, 1, &time_dimid, &leadtimeid);
-
       streamptr->basetime.leadtimeid = leadtimeid;
 
       {
@@ -817,7 +822,7 @@ void cdfGridCompress(int fileID, int ncvarid, int gridsize, int filetype, int co
 #if  defined  (HAVE_NETCDF4)
   if ( gridsize > 1 && comptype == CDI_COMPRESS_ZIP && (filetype == CDI_FILETYPE_NC4 || filetype == CDI_FILETYPE_NC4C) )
     {
-      nc_def_var_chunking(fileID, ncvarid, NC_CHUNKED, NULL);
+      cdf_def_var_chunking(fileID, ncvarid, NC_CHUNKED, NULL);
       cdfDefVarDeflate(fileID, ncvarid, 1);
     }
 #endif
@@ -829,7 +834,6 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID, int gridindex)
   int xdimID = CDI_UNDEFID;
   int ydimID = CDI_UNDEFID;
   int ncxvarid = CDI_UNDEFID, ncyvarid = CDI_UNDEFID;
-  int ncbxvarid = CDI_UNDEFID, ncbyvarid = CDI_UNDEFID, ncavarid = CDI_UNDEFID;
   nc_type xtype = (nc_type)cdfDefDatatype(gridInqPrec(gridID), streamptr->filetype);
   ncgrid_t *ncgrid = streamptr->ncgrid;
 
@@ -864,6 +868,7 @@ void cdfDefCurvilinear(stream_t *streamptr, int gridID, int gridindex)
         }
     }
 
+  int ncbxvarid = CDI_UNDEFID, ncbyvarid = CDI_UNDEFID, ncavarid = CDI_UNDEFID;
   if ( xdimID == CDI_UNDEFID || ydimID == CDI_UNDEFID )
     {
       if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
@@ -1231,7 +1236,9 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID, int gridindex)
 
       cdfDefGridUUID(streamptr, gridID);
 
-      if ( gridInqXvalsPtr(gridID) )
+      const double *xvalsPtr = gridInqXvalsPtr(gridID),
+        *xboundsPtr = NULL;
+      if ( xvalsPtr )
         {
           char xaxisname[CDI_MAX_NAME]; xaxisname[0] = 0;
           cdiGridInqKeyStr(gridID, CDI_KEY_XNAME, CDI_MAX_NAME, xaxisname);
@@ -1241,7 +1248,7 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID, int gridindex)
 
           cdfPutGridStdAtts(fileID, ncxvarid, gridID, 'X', &gridInqsX);
 
-          if ( gridInqXboundsPtr(gridID) && nvdimID != CDI_UNDEFID )
+          if ( (xboundsPtr = gridInqXboundsPtr(gridID)) && nvdimID != CDI_UNDEFID )
             {
               int dimIDs[2] = { dimID, nvdimID };
               size_t xaxisnameLen = strlen(xaxisname);
@@ -1254,7 +1261,9 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID, int gridindex)
             }
         }
 
-      if ( gridInqYvalsPtr(gridID) )
+      const double *yvalsPtr = gridInqYvalsPtr(gridID),
+        *yboundsPtr = NULL;
+      if ( yvalsPtr )
         {
           char yaxisname[CDI_MAX_NAME];
           gridInqYname(gridID, yaxisname);
@@ -1264,7 +1273,8 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID, int gridindex)
 
           cdfPutGridStdAtts(fileID, ncyvarid, gridID, 'Y', &gridInqsY);
 
-          if ( gridInqYboundsPtr(gridID) && nvdimID != CDI_UNDEFID )
+          if ( (yboundsPtr = gridInqYboundsPtr(gridID))
+               && nvdimID != CDI_UNDEFID )
             {
               int dimIDs[2] = { dimID, nvdimID };
               size_t yaxisnameLen = strlen(yaxisname);
@@ -1277,7 +1287,8 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID, int gridindex)
             }
         }
 
-      if ( gridInqAreaPtr(gridID) )
+      const double *areaPtr = gridInqAreaPtr(gridID);
+      if ( areaPtr )
         {
           static const char yaxisname_[] = "cell_area";
           static const char units[] = "m2";
@@ -1294,11 +1305,11 @@ void cdfDefUnstructured(stream_t *streamptr, int gridID, int gridindex)
       cdf_enddef(fileID);
       streamptr->ncmode = 2;
 
-      if ( ncxvarid  != CDI_UNDEFID ) cdf_put_var_double(fileID, ncxvarid,  gridInqXvalsPtr(gridID));
-      if ( ncbxvarid != CDI_UNDEFID ) cdf_put_var_double(fileID, ncbxvarid, gridInqXboundsPtr(gridID));
-      if ( ncyvarid  != CDI_UNDEFID ) cdf_put_var_double(fileID, ncyvarid,  gridInqYvalsPtr(gridID));
-      if ( ncbyvarid != CDI_UNDEFID ) cdf_put_var_double(fileID, ncbyvarid, gridInqYboundsPtr(gridID));
-      if ( ncavarid  != CDI_UNDEFID ) cdf_put_var_double(fileID, ncavarid,  gridInqAreaPtr(gridID));
+      if ( ncxvarid  != CDI_UNDEFID ) cdf_put_var_double(fileID, ncxvarid,  xvalsPtr);
+      if ( ncbxvarid != CDI_UNDEFID ) cdf_put_var_double(fileID, ncbxvarid, xboundsPtr);
+      if ( ncyvarid  != CDI_UNDEFID ) cdf_put_var_double(fileID, ncyvarid,  yvalsPtr);
+      if ( ncbyvarid != CDI_UNDEFID ) cdf_put_var_double(fileID, ncbyvarid, yboundsPtr);
+      if ( ncavarid  != CDI_UNDEFID ) cdf_put_var_double(fileID, ncavarid,  areaPtr);
     }
 
   ncgrid[gridindex].gridID = gridID;
@@ -1337,7 +1348,7 @@ void cdf_def_vct_echam(stream_t *streamptr, int zaxisID)
 
       if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
 
-      int ncdimid, ncdimid2 = -1;
+      int ncdimid = -1, ncdimid2 = -1;
       int hyaiid, hybiid, hyamid = -1, hybmid = -1;
 
       cdf_def_dim(fileID, "nhyi", (size_t)ilev, &ncdimid2);
@@ -2042,12 +2053,6 @@ void cdfDefGrid(stream_t *streamptr, int gridID, int gridindex)
       cdfDefTrajLon(streamptr, gridID, gridindex);
       cdfDefTrajLat(streamptr, gridID, gridindex);
     }
-  /*
-  else if ( gridtype == GRID_LCC )
-    {
-      cdfDefLcc(streamptr, gridID);
-    }
-  */
   else
     {
       Error("Unsupported grid type: %s", gridNamePtr(gridtype));
@@ -2064,14 +2069,13 @@ void cdfDefHistory(stream_t *streamptr, int size, const char *history)
 
 void cdfDefVars(stream_t *streamptr)
 {
-  int index = 0;
   int vlistID = streamptr->vlistID;
   if ( vlistID == CDI_UNDEFID )
     Error("Internal problem! vlist undefined for streamptr %p", streamptr);
 
   int ngrids = vlistNgrids(vlistID);
-  if ( 2*ngrids > MAX_GRIDS_PS ) Error("Internaal problem! Too many grids per stream (max=%d)\n", MAX_GRIDS_PS);
-  for ( index = 0; index < 2*ngrids; ++index )
+  if ( 2*ngrids > MAX_GRIDS_PS ) Error("Internal problem! Too many grids per stream (max=%d)\n", MAX_GRIDS_PS);
+  for ( int index = 0; index < 2*ngrids; ++index )
     {
       streamptr->ncgrid[index].gridID = CDI_UNDEFID;
       streamptr->ncgrid[index].xdimID = CDI_UNDEFID;
@@ -2081,19 +2085,20 @@ void cdfDefVars(stream_t *streamptr)
       streamptr->ncgrid[index].avarID = CDI_UNDEFID;
     }
 
-  for ( index = 0; index < ngrids; ++index )
+  for ( int index = 0; index < ngrids; ++index )
     {
       int gridID = vlistGrid(vlistID, index);
       cdfDefGrid(streamptr, gridID, index);
     }
-  index = ngrids-1;
-  for ( int i = 0; i < ngrids; ++i )
-    {
-      int gridID = vlistGrid(vlistID, i);
-      int projID = gridInqProj(gridID);
-      if ( projID != CDI_UNDEFID ) cdfDefGrid(streamptr, projID, ++index);
-    }
-
+  {
+    int index = ngrids-1;
+    for ( int i = 0; i < ngrids; ++i )
+      {
+        int gridID = vlistGrid(vlistID, i);
+        int projID = gridInqProj(gridID);
+        if ( projID != CDI_UNDEFID ) cdfDefGrid(streamptr, projID, ++index);
+      }
+  }
   int nzaxis = vlistNzaxis(vlistID);
   for ( int index = 0; index < nzaxis; ++index )
     {
diff --git a/src/stream_cgribex.c b/src/stream_cgribex.c
index 5173931cffeb78aa824ba9f9abdf5dd88601b4f5..d963571939a5b9ffc15d23c1bcc6328b5b6618ae 100644
--- a/src/stream_cgribex.c
+++ b/src/stream_cgribex.c
@@ -39,12 +39,7 @@ int cgribexGetGridType(int *isec2)
     case  GRIB1_GTYPE_LATLON:     { gridtype = GRID_LONLAT;     break; }
     case  GRIB1_GTYPE_LATLON_ROT: { gridtype = GRID_PROJECTION; break; }
     case  GRIB1_GTYPE_LCC:        { gridtype = GRID_LCC;        break; }
-    case  GRIB1_GTYPE_GAUSSIAN:   { if ( ISEC2_Reduced )
-	                              gridtype = GRID_GAUSSIAN_REDUCED;
-                         	    else
-				      gridtype = GRID_GAUSSIAN;
-          	                    break;
-                                  }
+    case  GRIB1_GTYPE_GAUSSIAN:   { gridtype = ISEC2_Reduced ? GRID_GAUSSIAN_REDUCED : GRID_GAUSSIAN; break; }
     case  GRIB1_GTYPE_SPECTRAL:   { gridtype = GRID_SPECTRAL;   break; }
     case  GRIB1_GTYPE_GME:        { gridtype = GRID_GME;        break; }
     }
@@ -116,9 +111,9 @@ bool cgribexTimeIsFC(int *isec1)
 static
 int cgribexGetTsteptype(int timerange)
 {
-  int tsteptype = TSTEP_INSTANT;
   static bool lprint = true;
 
+  int tsteptype = TSTEP_INSTANT;
   switch ( timerange )
     {
     case  0:  tsteptype = TSTEP_INSTANT;  break;
@@ -146,11 +141,16 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
   bool compyinc = true;
   int gridtype = cgribexGetGridType(isec2);
   int projtype = (gridtype == GRID_PROJECTION && cgribexGetIsRotated(isec2)) ? CDI_PROJ_RLL : CDI_UNDEFID;
+  if ( gridtype == GRID_LCC )
+    {
+      gridtype = GRID_PROJECTION;
+      projtype = CDI_PROJ_LCC;
+    }
 
   if ( streamptr->unreduced && gridtype == GRID_GAUSSIAN_REDUCED && iret != -801 )
     {
-      int ilat, nlon = 0;
-      for ( ilat = 0; ilat < ISEC2_NumLat; ++ilat )
+      int nlon = 0;
+      for ( int ilat = 0; ilat < ISEC2_NumLat; ++ilat )
         if ( ISEC2_RowLon(ilat) > nlon ) nlon = ISEC2_RowLon(ilat);
       gridtype = GRID_GAUSSIAN;
       ISEC2_NumLon = nlon;
@@ -163,9 +163,14 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
 
   if ( gridtype == GRID_LONLAT || gridtype == GRID_GAUSSIAN || projtype == CDI_PROJ_RLL )
     {
+      bool ijDirectionIncrementGiven = gribbyte_get_bit(ISEC2_ResFlag, 1);
+      bool uvRelativeToGrid = gribbyte_get_bit(ISEC2_ResFlag, 5);
+
+      if ( uvRelativeToGrid ) grid->uvRelativeToGrid = 1;
       if ( ISEC4_NumValues != ISEC2_NumLon*ISEC2_NumLat )
         Error("numberOfPoints (%d) and gridSize (%d) differ!", ISEC4_NumValues, ISEC2_NumLon*ISEC2_NumLat);
-      grid->size  = ISEC4_NumValues;
+
+      grid->size   = ISEC4_NumValues;
       grid->x.size = ISEC2_NumLon;
       grid->y.size = ISEC2_NumLat;
       if ( gridtype == GRID_GAUSSIAN ) grid->np = ISEC2_NumPar;
@@ -180,7 +185,7 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
 
             if ( ISEC2_LastLon < ISEC2_FirstLon && ISEC2_LastLon < 0 ) ISEC2_LastLon += 360000;
 
-            if ( ISEC2_ResFlag && ISEC2_LonIncr > 0 )
+            if ( ijDirectionIncrementGiven && ISEC2_LonIncr > 0 )
               {
                 if ( abs(ISEC2_LastLon - (ISEC2_FirstLon+ISEC2_LonIncr*(grid->x.size-1))) <= 2 )
                   {
@@ -213,7 +218,7 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
         if ( grid->y.size > 1 && compyinc )
           {
             bool recompinc = true;
-            if ( ISEC2_ResFlag && ISEC2_LatIncr > 0 )
+            if ( ijDirectionIncrementGiven && ISEC2_LatIncr > 0 )
               {
                 if ( abs(ISEC2_LastLat - (ISEC2_FirstLat+ISEC2_LatIncr*(grid->y.size-1))) <= 2 )
                   {
@@ -232,6 +237,9 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
     }
   else if ( gridtype == GRID_GAUSSIAN_REDUCED )
     {
+      bool ijDirectionIncrementGiven = gribbyte_get_bit(ISEC2_ResFlag, 1);
+      bool uvRelativeToGrid = gribbyte_get_bit(ISEC2_ResFlag, 5);
+      if ( uvRelativeToGrid ) grid->uvRelativeToGrid = 1;
       grid->np      = ISEC2_NumPar;
       grid->size    = ISEC4_NumValues;
       grid->rowlon  = ISEC2_RowLonPtr;
@@ -246,7 +254,7 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
           {
             if ( ISEC2_LastLon < ISEC2_FirstLon && ISEC2_LastLon < 0 ) ISEC2_LastLon += 360000;
 
-            if ( ISEC2_ResFlag && ISEC2_LonIncr > 0 )
+            if ( ijDirectionIncrementGiven && ISEC2_LonIncr > 0 )
               grid->x.inc = ISEC2_LonIncr * 0.001;
             else
               grid->x.inc = (ISEC2_LastLon - ISEC2_FirstLon) * 0.001 / (grid->x.size - 1);
@@ -260,7 +268,7 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
       {
         if ( grid->y.size > 1 )
           {
-            if ( ISEC2_ResFlag && ISEC2_LatIncr > 0 )
+            if ( ijDirectionIncrementGiven && ISEC2_LatIncr > 0 )
               grid->y.inc = ISEC2_LatIncr * 0.001;
             else
               grid->y.inc = (ISEC2_LastLat - ISEC2_FirstLat) * 0.001 / (grid->y.size - 1);
@@ -270,28 +278,26 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
         grid->y.flag  = 2;
       }
     }
-  else if ( gridtype == GRID_LCC )
+  else if ( projtype == CDI_PROJ_LCC )
     {
+      bool uvRelativeToGrid = gribbyte_get_bit(ISEC2_ResFlag, 5);
+      if ( uvRelativeToGrid ) grid->uvRelativeToGrid = 1;
+
       if ( ISEC4_NumValues != ISEC2_NumLon*ISEC2_NumLat )
-        Error("numberOfPoints (%d) and gridSize (%d) differ!",
-              ISEC4_NumValues, ISEC2_NumLon*ISEC2_NumLat);
+        Error("numberOfPoints (%d) and gridSize (%d) differ!", ISEC4_NumValues, ISEC2_NumLon*ISEC2_NumLat);
 
-      grid->size  = ISEC4_NumValues;
+      grid->size   = ISEC4_NumValues;
       grid->x.size = ISEC2_NumLon;
       grid->y.size = ISEC2_NumLat;
 
-      grid->lcc.xinc      = ISEC2_Lambert_dx;
-      grid->lcc.yinc      = ISEC2_Lambert_dy;
-      grid->lcc.originLon = ISEC2_FirstLon * 0.001;
-      grid->lcc.originLat = ISEC2_FirstLat * 0.001;
-      grid->lcc.lonParY   = ISEC2_Lambert_Lov * 0.001;
-      grid->lcc.lat1      = ISEC2_Lambert_LatS1 * 0.001;
-      grid->lcc.lat2      = ISEC2_Lambert_LatS2 * 0.001;
-      grid->lcc.projflag  = ISEC2_Lambert_ProjFlag;
-      grid->lcc.scanflag  = ISEC2_ScanFlag;
-
-      grid->x.flag = 0;
-      grid->y.flag = 0;
+      grid->x.first = 0;
+      grid->x.last  = 0;
+      grid->x.inc   = ISEC2_Lambert_dx;
+      grid->y.first = 0;
+      grid->y.last  = 0;
+      grid->y.inc   = ISEC2_Lambert_dy;
+      grid->x.flag  = 2;
+      grid->y.flag  = 2;
     }
   else if ( gridtype == GRID_SPECTRAL )
     {
@@ -384,6 +390,32 @@ void cgribexAddRecord(stream_t * streamptr, int param, int *isec1, int *isec2, d
           double angle = - FSEC2_RotAngle;
           gridDefParamRLL(gridID, xpole, ypole, angle);
         }
+      else if ( gridptr->projtype == CDI_PROJ_LCC )
+        {
+          double a = 6367470., rf = 0;
+          bool earthIsOblate = gribbyte_get_bit(ISEC2_ResFlag, 2);
+          if ( earthIsOblate ) { a = 6378160.; rf = 297.0; }
+          double xval_0 = ISEC2_FirstLon * 0.001;
+          double yval_0 = ISEC2_FirstLat * 0.001;
+          double lon_0  = ISEC2_Lambert_Lov * 0.001;
+          double lat_1  = ISEC2_Lambert_LatS1 * 0.001;
+          double lat_2  = ISEC2_Lambert_LatS2 * 0.001;
+          bool lsouth = gribbyte_get_bit(ISEC2_Lambert_ProjFlag, 1);
+          if ( lsouth ) { lat_1 = -lat_1; lat_2 = -lat_2; }
+
+          double lat_0 = lat_2;
+          double x_0 = grid_missval;
+          double y_0 = grid_missval;
+
+          if ( proj_lonlat_to_lcc_func )
+            {
+              x_0 = xval_0; y_0 = yval_0;
+              proj_lonlat_to_lcc_func(grid_missval, lon_0, lat_0, lat_1, lat_2, a, rf, (size_t)1, &x_0, &y_0);
+              if ( IS_NOT_EQUAL(x_0, grid_missval) && IS_NOT_EQUAL(y_0, grid_missval) )
+                { x_0 = -x_0; y_0 = -y_0; }
+            }
+          gridDefParamLCC(gridID, grid_missval, lon_0, lat_0, lat_1, lat_2, a, rf, xval_0, yval_0, x_0, y_0);
+        }
     }
   else
     Free(gridptr);
@@ -494,7 +526,6 @@ void cgribexDecodeHeader(int *isec0, int *isec1, int *isec2, double *fsec2,
   if ( ISEC1_CenterID == 215 && (isec1[34] != 0 && isec1[34] != 255) )
     {
       double undef_pds, undef_eps;
-
       MCH_get_undef(isec1, &undef_pds, &undef_eps);
       FSEC3_MissVal = undef_pds;
       *lmv = 1;
@@ -504,9 +535,9 @@ void cgribexDecodeHeader(int *isec0, int *isec1, int *isec2, double *fsec2,
 static
 compvar_t cgribexVarSet(int param, int level1, int level2, int leveltype, int trange)
 {
-  compvar_t compVar;
   int tsteptype = cgribexGetTsteptype(trange);
 
+  compvar_t compVar;
   compVar.param     = param;
   compVar.level1    = level1;
   compVar.level2    = level2;
@@ -667,10 +698,7 @@ int cgribexScanTimestep1(stream_t *streamptr)
 
       gribDateTime(isec1, &vdate, &vtime);
 
-      if ( ISEC4_NumBits > 0 && ISEC4_NumBits <= 32 )
-	datatype = ISEC4_NumBits;
-      else
-        datatype = CDI_DATATYPE_PACK;
+      datatype = (ISEC4_NumBits > 0 && ISEC4_NumBits <= 32) ? ISEC4_NumBits : CDI_DATATYPE_PACK;
 
       if ( nrecs == 0 )
 	{
@@ -1353,33 +1381,18 @@ int cgribexDecode(int memtype, void *gribbuffer, int gribsize, void *data, long
 static
 void cgribexDefInstitut(int *isec1, int vlistID, int varID)
 {
-  int instID;
-
-  if ( vlistInqInstitut(vlistID) != CDI_UNDEFID )
-    instID = vlistInqInstitut(vlistID);
-  else
-    instID = vlistInqVarInstitut(vlistID, varID);
-
+  int instID = (vlistInqInstitut(vlistID) != CDI_UNDEFID) ? vlistInqInstitut(vlistID) : vlistInqVarInstitut(vlistID, varID);
   if ( instID != CDI_UNDEFID )
     {
-      int center, subcenter;
-      center    = institutInqCenter(instID);
-      subcenter = institutInqSubcenter(instID);
-      ISEC1_CenterID    = center;
-      ISEC1_SubCenterID = subcenter;
+      ISEC1_CenterID    = institutInqCenter(instID);
+      ISEC1_SubCenterID = institutInqSubcenter(instID);
     }
 }
 
 static
 void cgribexDefModel(int *isec1, int vlistID, int varID)
 {
-  int modelID;
-
-  if ( vlistInqModel(vlistID) != CDI_UNDEFID )
-    modelID = vlistInqModel(vlistID);
-  else
-    modelID = vlistInqVarModel(vlistID, varID);
-
+  int modelID = (vlistInqModel(vlistID) != CDI_UNDEFID) ? vlistInqModel(vlistID) : vlistInqVarModel(vlistID, varID);
   if ( modelID != CDI_UNDEFID )
     ISEC1_ModelID = modelInqGribID(modelID);
 }
@@ -1388,9 +1401,7 @@ static
 void cgribexDefParam(int *isec1, int param)
 {
   int pdis, pcat, pnum;
-
   cdiDecodeParam(param, &pnum, &pcat, &pdis);
-
   if ( pnum < 0 ) pnum = -pnum;
 
   static bool lwarn_pdis = true;
@@ -1418,10 +1429,8 @@ static
 int cgribexDefTimerange(int tsteptype, int factor, int calendar,
 			int rdate, int rtime, int vdate, int vtime, int *pip1, int *pip2)
 {
-  int timerange = -1;
   int year, month, day, hour, minute, second;
   int julday1, secofday1, julday2, secofday2, days, secs;
-  int ip1 = 0, ip2 = 0;
 
   cdiDecodeDate(rdate, &year, &month, &day);
   cdiDecodeTime(rtime, &hour, &minute, &second);
@@ -1433,6 +1442,8 @@ int cgribexDefTimerange(int tsteptype, int factor, int calendar,
 
   (void) julday_sub(julday1, secofday1, julday2, secofday2, &days, &secs);
 
+  int timerange = -1;
+  int ip1 = 0, ip2 = 0;
   if ( !(int)(fmod(days*86400.0 + secs, factor)) )
     {
       int ip = (int) ((days*86400.0 + secs)/factor);
@@ -1462,13 +1473,10 @@ static
 int cgribexDefDateTime(int *isec1, int timeunit, int date, int time)
 {
   int year, month, day, hour, minute, second;
-  int century = 0;
-  int factor = 1;
-
   cdiDecodeDate(date, &year, &month, &day);
   cdiDecodeTime(time, &hour, &minute, &second);
 
-  century =  year / 100;
+  int century =  year / 100;
 
   ISEC1_Year = year - century*100;
 
@@ -1494,6 +1502,7 @@ int cgribexDefDateTime(int *isec1, int timeunit, int date, int time)
 
   ISEC1_Century = century;
 
+  int factor = 1;
   switch (timeunit)
     {
     case TUNIT_MINUTE:    factor =    60; ISEC1_TimeUnit = ISEC1_TABLE4_MINUTE;    break;
@@ -1650,10 +1659,17 @@ void cgribexDefGrid(int *isec1, int *isec2, double *fsec2, int *isec4, int gridI
         }
     }
 
-  if ( gridtype == GRID_PROJECTION && gridInqProjType(gridID) == CDI_PROJ_RLL )
+  if ( gridtype == GRID_PROJECTION )
     {
-      gridtype = GRID_LONLAT;
-      lrotated = true;
+      if ( gridInqProjType(gridID) == CDI_PROJ_RLL )
+        {
+          gridtype = GRID_LONLAT;
+          lrotated = true;
+        }
+      else if ( gridInqProjType(gridID) == CDI_PROJ_LCC )
+        {
+          gridtype = GRID_LCC;
+        }
     }
 
   ISEC2_Reduced  = FALSE;
@@ -1692,7 +1708,7 @@ void cgribexDefGrid(int *isec1, int *isec2, double *fsec2, int *isec4, int gridI
 	      {
 		xfirst = gridInqXval(gridID, 0);
                 xlast  = gridInqXval(gridID, (lcurvi ? nlon*nlat : nlon) - 1);
-		xinc   = gridInqXinc(gridID);
+		xinc   = fabs(gridInqXinc(gridID));
 	      }
 	  }
 
@@ -1730,7 +1746,6 @@ void cgribexDefGrid(int *isec1, int *isec2, double *fsec2, int *isec4, int gridI
 	else
 	  {
 	    ISEC2_LatIncr = (int)lround(yinc*1000);
-	    if ( ISEC2_LatIncr < 0 ) ISEC2_LatIncr = -ISEC2_LatIncr;
 	  }
 
 	if ( ISEC2_NumLon > 1 && ISEC2_NumLat == 1 )
@@ -1739,7 +1754,9 @@ void cgribexDefGrid(int *isec1, int *isec2, double *fsec2, int *isec4, int gridI
 	if ( ISEC2_NumLon == 1 && ISEC2_NumLat > 1 )
 	  if ( ISEC2_LonIncr == 0 && ISEC2_LatIncr != 0 ) ISEC2_LonIncr = ISEC2_LatIncr;
 
-        ISEC2_ResFlag = ( ISEC2_LatIncr == 0 || ISEC2_LonIncr == 0 ) ? 0 : 128;
+        ISEC2_ResFlag = 0;
+        if ( ISEC2_LatIncr && ISEC2_LonIncr )   gribbyte_set_bit(&ISEC2_ResFlag, 1);
+        if ( gridInqUvRelativeToGrid(gridID) )  gribbyte_set_bit(&ISEC2_ResFlag, 5);
 
 	if ( lrotated )
           {
@@ -1752,40 +1769,49 @@ void cgribexDefGrid(int *isec1, int *isec2, double *fsec2, int *isec4, int gridI
             FSEC2_RotAngle = angle;
           }
 
-	/* East -> West */
-	if ( ISEC2_LastLon < ISEC2_FirstLon ) ISEC2_ScanFlag += 128;
-
-	/* South -> North */
-	if ( ISEC2_LastLat > ISEC2_FirstLat ) ISEC2_ScanFlag += 64;
+        ISEC2_ScanFlag = 0;
+	if ( ISEC2_LastLon < ISEC2_FirstLon ) gribbyte_set_bit(&ISEC2_ScanFlag, 1); // East -> West
+	if ( ISEC2_LastLat > ISEC2_FirstLat ) gribbyte_set_bit(&ISEC2_ScanFlag, 2); // South -> North
 
 	break;
       }
     case GRID_LCC:
       {
-	double originLon = 0.0, originLat = 0.0, lonParY = 0.0,
-          lat1 = 0.0, lat2 = 0.0, xincm = 0.0, yincm = 0.0;
-	int projflag = 0, scanflag = 0;
+	int xsize = gridInqXsize(gridID);
+        int ysize = gridInqYsize(gridID);
 
-	int xsize = gridInqXsize(gridID),
-          ysize = gridInqYsize(gridID);
+        double lon_0, lat_0, lat_1, lat_2, a, rf, xval_0, yval_0, x_0, y_0;
+	gridInqParamLCC(gridID, grid_missval, &lon_0, &lat_0, &lat_1, &lat_2, &a, &rf, &xval_0, &yval_0, &x_0, &y_0);
+	gridVerifyGribParamLCC(gridID, grid_missval, &lon_0, &lat_0, &lat_1, &lat_2, &a, &rf, &xval_0, &yval_0, &x_0, &y_0);
+        bool lsouth = (lat_1 < 0);
+        if ( lsouth ) { lat_1 = -lat_2; lat_2 = -lat_2; }
 
-	gridInqParamLCC(gridID, &originLon, &originLat, &lonParY, &lat1, &lat2, &xincm, &yincm,
-		   &projflag, &scanflag);
+        double xinc = gridInqXinc(gridID);
+        double yinc = gridInqYinc(gridID);
 
 	ISEC2_GridType = GRIB1_GTYPE_LCC;
 	ISEC2_NumLon   = xsize;
 	ISEC2_NumLat   = ysize;
-	ISEC2_FirstLon = (int)lround(originLon * 1000);
-	ISEC2_FirstLat = (int)lround(originLat * 1000);
-	ISEC2_Lambert_Lov    = (int)lround(lonParY * 1000);
-	ISEC2_Lambert_LatS1  = (int)lround(lat1 * 1000);
-	ISEC2_Lambert_LatS2  = (int)lround(lat2 * 1000);
-	ISEC2_Lambert_dx     = (int)lround(xincm);
-	ISEC2_Lambert_dy     = (int)lround(yincm);
+	ISEC2_FirstLon       = (int)lround(xval_0 * 1000);
+	ISEC2_FirstLat       = (int)lround(yval_0 * 1000);
+	ISEC2_Lambert_Lov    = (int)lround(lon_0 * 1000);
+	ISEC2_Lambert_LatS1  = (int)lround(lat_1 * 1000);
+	ISEC2_Lambert_LatS2  = (int)lround(lat_2 * 1000);
+	ISEC2_Lambert_dx     = (int)lround(xinc);
+	ISEC2_Lambert_dy     = (int)lround(yinc);
 	ISEC2_Lambert_LatSP  = 0;
 	ISEC2_Lambert_LonSP  = 0;
-	ISEC2_Lambert_ProjFlag = projflag;
-	ISEC2_ScanFlag = scanflag;
+	ISEC2_Lambert_ProjFlag = 0;
+        if ( lsouth ) gribbyte_set_bit(&ISEC2_Lambert_ProjFlag, 1);
+
+        bool earthIsOblate = (IS_EQUAL(a, 6378160.) && IS_EQUAL(rf, 297.));
+        ISEC2_ResFlag = 0;
+        if ( ISEC2_Lambert_dx && ISEC2_Lambert_dy ) gribbyte_set_bit(&ISEC2_ResFlag, 1);
+        if ( earthIsOblate )                        gribbyte_set_bit(&ISEC2_ResFlag, 2);
+        if ( gridInqUvRelativeToGrid(gridID) )      gribbyte_set_bit(&ISEC2_ResFlag, 5);
+
+	ISEC2_ScanFlag = 0;
+        gribbyte_set_bit(&ISEC2_ScanFlag, 2); // South -> North
 
 	break;
       }
@@ -1836,6 +1862,18 @@ void cgribexDefGrid(int *isec1, int *isec2, double *fsec2, int *isec4, int gridI
 	break;
       }
     }
+
+
+  if ( cdiGribChangeModeUvRelativeToGrid.active )
+    {
+      // this will overrule/change the UvRelativeToGrid flag;
+      // typically when the wind is rotated with respect to north pole
+      bool uvRelativeToGrid = gribbyte_get_bit(ISEC2_ResFlag, 5);
+      if      ( uvRelativeToGrid && !cdiGribChangeModeUvRelativeToGrid.mode )
+        gribbyte_clear_bit(&ISEC2_ResFlag, 5);
+      else if ( !uvRelativeToGrid && cdiGribChangeModeUvRelativeToGrid.mode )
+        gribbyte_set_bit(&ISEC2_ResFlag, 5);
+    }
 }
 
 static
@@ -1851,7 +1889,6 @@ void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int lev
 {
   char units[CDI_MAX_NAME];
   static bool lwarning_vct = true;
-  double level;
 
   int zaxistype = zaxisInqType(zaxisID);
   int ltype = zaxisInqLtype(zaxisID);
@@ -1877,7 +1914,7 @@ void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int lev
     case ZAXIS_DEPTH_BELOW_SEA:
     case ZAXIS_ISENTROPIC:
       {
-        isec1DefLevel(isec1, grib_ltype, (int) zaxisInqLevel(zaxisID, levelID), 0);
+        isec1DefLevel(isec1, grib_ltype, (int)(zaxisInqLevel(zaxisID, levelID)), 0);
 	break;
       }
     case ZAXIS_CLOUD_BASE:
@@ -1894,10 +1931,10 @@ void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int lev
     case ZAXIS_HYBRID_HALF:
       {
 	if ( zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL) )
-          isec1DefLevel(isec1, GRIB1_LTYPE_HYBRID_LAYER, (int)zaxisInqLbound(zaxisID, levelID),
-                        (int)zaxisInqUbound(zaxisID, levelID));
+          isec1DefLevel(isec1, GRIB1_LTYPE_HYBRID_LAYER, (int)(zaxisInqLbound(zaxisID, levelID)),
+                        (int)(zaxisInqUbound(zaxisID, levelID)));
 	else
-          isec1DefLevel(isec1, GRIB1_LTYPE_HYBRID, (int) zaxisInqLevel(zaxisID, levelID), 0);
+          isec1DefLevel(isec1, GRIB1_LTYPE_HYBRID, (int)(zaxisInqLevel(zaxisID, levelID)), 0);
 
 	int vctsize = zaxisInqVctSize(zaxisID);
 	if ( vctsize > 255 )
@@ -1918,7 +1955,7 @@ void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int lev
       }
     case ZAXIS_PRESSURE:
       {
-	level = zaxisInqLevel(zaxisID, levelID);
+	double level = zaxisInqLevel(zaxisID, levelID);
 	if ( level < 0 ) Warning("Pressure level of %f Pa is below zero!", level);
 
 	zaxisInqUnits(zaxisID, units);
@@ -1935,7 +1972,7 @@ void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int lev
       }
     case ZAXIS_HEIGHT:
       {
-	level = zaxisInqLevel(zaxisID, levelID);
+	double level = zaxisInqLevel(zaxisID, levelID);
 
 	zaxisInqUnits(zaxisID, units);
         if ( units[1] == 'm' && !units[2] )
@@ -1951,10 +1988,10 @@ void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int lev
     case ZAXIS_SIGMA:
       {
 	if ( zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL) )
-          isec1DefLevel(isec1, GRIB1_LTYPE_SIGMA_LAYER, (int) zaxisInqLbound(zaxisID, levelID),
-                        (int) zaxisInqUbound(zaxisID, levelID));
+          isec1DefLevel(isec1, GRIB1_LTYPE_SIGMA_LAYER, (int)(zaxisInqLbound(zaxisID, levelID)),
+                        (int)(zaxisInqUbound(zaxisID, levelID)));
 	else
-          isec1DefLevel(isec1, GRIB1_LTYPE_SIGMA, (int) zaxisInqLevel(zaxisID, levelID), 0);
+          isec1DefLevel(isec1, GRIB1_LTYPE_SIGMA, (int)(zaxisInqLevel(zaxisID, levelID)), 0);
 
 	break;
       }
@@ -1962,11 +1999,10 @@ void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int lev
       {
 	zaxisInqUnits(zaxisID, units);
 
-	double factor;
+	double factor = 100; // default: meter
         if      ( units[0] == 'm' && units[1] == 'm' ) factor =   0.1;
         else if ( units[0] == 'c' && units[1] == 'm' ) factor =   1;
         else if ( units[0] == 'd' && units[1] == 'm' ) factor =  10;
-        else                                           factor = 100; // meter
 
 	if ( zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL) )
           isec1DefLevel(isec1, GRIB1_LTYPE_LANDDEPTH_LAYER, (int) (factor*zaxisInqLbound(zaxisID, levelID)),
@@ -1978,7 +2014,7 @@ void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int lev
       }
     case ZAXIS_GENERIC:
       {
-        isec1DefLevel(isec1, ltype, (int) zaxisInqLevel(zaxisID, levelID), 0);
+        isec1DefLevel(isec1, ltype, (int)(zaxisInqLevel(zaxisID, levelID)), 0);
 	break;
       }
     default:
@@ -2044,21 +2080,17 @@ size_t cgribexEncode(int memtype, int varID, int levelID, int vlistID, int gridI
 		     int vdate, int vtime, int tsteptype, int numavg,
 		     long datasize, const void *data, int nmiss, void *gribbuffer, size_t gribbuffersize)
 {
-  size_t nbytes = 0;
-  int gribsize;
   int iret = 0, iword = 0;
   int isec0[2], isec1[4096], isec2[4096], isec3[2], isec4[512];
   float fsec2f[512], fsec3f[2];
   double fsec2[512], fsec3[2];
-  int datatype;
-  int param;
 
   memset(isec1, 0, 256*sizeof(int));
   fsec2[0] = 0; fsec2[1] = 0;
   fsec2f[0] = 0; fsec2f[1] = 0;
 
-  gribsize = (int)(gribbuffersize / sizeof(int));
-  param    = vlistInqVarParam(vlistID, varID);
+  int gribsize = (int)(gribbuffersize / sizeof(int));
+  int param    = vlistInqVarParam(vlistID, varID);
 
   cgribexDefaultSec0(isec0);
   cgribexDefaultSec1(isec1);
@@ -2067,7 +2099,7 @@ size_t cgribexEncode(int memtype, int varID, int levelID, int vlistID, int gridI
   cgribexDefInstitut(isec1, vlistID, varID);
   cgribexDefModel(isec1, vlistID, varID);
 
-  datatype = vlistInqVarDatatype(vlistID, varID);
+  int datatype = vlistInqVarDatatype(vlistID, varID);
 
   cgribexDefParam(isec1, param);
   cgribexDefTime(isec1, vdate, vtime, tsteptype, numavg, vlistInqTaxis(vlistID));
@@ -2112,9 +2144,70 @@ size_t cgribexEncode(int memtype, int varID, int levelID, int vlistID, int gridI
 
   if ( iret ) Error("Problem during GRIB encode (errno = %d)!", iret);
 
-  nbytes = (size_t)iword * sizeof (int);
+  size_t nbytes = (size_t)iword * sizeof(int);
   return nbytes;
 }
+
+
+typedef struct
+{
+  void *gribbuffer;
+  size_t gribbuffersize;
+  unsigned char *pds;
+  unsigned char *gds;
+  unsigned char *bms;
+  unsigned char *bds;
+} cgribex_handle;
+
+
+int grib1Sections(unsigned char *gribbuffer, long gribbufsize, unsigned char **pdsp,
+		  unsigned char **gdsp, unsigned char **bmsp, unsigned char **bdsp, long *gribrecsize);
+
+void *cgribex_handle_new_from_meassage(void *gribbuffer, size_t gribbuffersize)
+{
+  cgribex_handle *gh = (cgribex_handle*) Malloc(sizeof(cgribex_handle));
+  gh->gribbuffer = NULL;
+  gh->gribbuffersize = 0;
+  gh->pds = NULL;
+
+  if ( gribbuffersize && gribbuffer )
+    {
+      unsigned char *pds = NULL, *gds = NULL, *bms = NULL, *bds = NULL;
+      long gribrecsize;
+      int status = grib1Sections((unsigned char *)gribbuffer, (long)gribbuffersize, &pds, &gds, &bms, &bds, &gribrecsize);
+      if ( status >= 0 )
+        {
+          gh->gribbuffer = gribbuffer;
+          gh->gribbuffersize = gribbuffersize;
+          gh->pds = pds;
+          gh->gds = gds;
+          gh->bms = bms;
+          gh->bds = bds;
+        }
+    }
+
+  return (void*)gh;
+}
+
+
+void cgribex_handle_delete(void *gh)
+{
+  if ( gh ) Free(gh);
+}
+
+
+void cgribexChangeParameterIdentification(void *gh, int code, int ltype, int lev)
+{
+  if ( !gh ) return;
+
+  unsigned char *pds = ((cgribex_handle*)gh)->pds;
+  if ( !pds ) return;
+
+  pds[8]  = (unsigned char) code;
+  pds[9]  = (unsigned char) ltype;
+  pds[10] = (unsigned char) lev;
+}
+
 #endif
 /*
  * Local Variables:
diff --git a/src/stream_cgribex.h b/src/stream_cgribex.h
index 43f352529fa86546e12289b1368ee2e867346ba6..34f8f331f7bf5c08bceb0964f6d2ad1cb7dc4f2a 100644
--- a/src/stream_cgribex.h
+++ b/src/stream_cgribex.h
@@ -12,6 +12,11 @@ size_t cgribexEncode(int memtype, int varID, int levelID, int vlistID, int gridI
 		     int vdate, int vtime, int tsteptype, int numavg,
 		     long datasize, const void *data, int nmiss, void *gribbuffer, size_t gribbuffersize);
 
+void *cgribex_handle_new_from_meassage(void *gribbuffer, size_t recsize);
+void cgribex_handle_delete(void *gh);
+
+void cgribexChangeParameterIdentification(void *gh, int code, int ltype, int lev);
+
 #endif  /* _STREAM_CGRIBEX_H */
 /*
  * Local Variables:
diff --git a/src/stream_ext.c b/src/stream_ext.c
index 8035949258edcb87975778193e2f4b2ac9b11a46..ca94ac668c27f67e4c9cd36c25b2efcf74c31a4e 100644
--- a/src/stream_ext.c
+++ b/src/stream_ext.c
@@ -715,7 +715,7 @@ void extWriteVarSliceDP(stream_t *streamptr, int varID, int levID, const double
   int header[4];
   header[0] = streamptr->tsteps[tsID].taxis.vdate;
   header[1] = pnum;
-  header[2] = (int) zaxisInqLevel(vlistInqVarZaxis(vlistID, varID), levID);
+  header[2] = (int)(zaxisInqLevel(vlistInqVarZaxis(vlistID, varID), levID));
   header[3] = gridInqSize(vlistInqVarGrid(vlistID, varID));
 
   extrec_t *extp = (extrec_t*) streamptr->record->exsep;
@@ -736,7 +736,7 @@ void extWriteVarDP(stream_t *streamptr, int varID, const double *data)
   size_t nlevs    = (size_t) zaxisInqSize(vlistInqVarZaxis(vlistID, varID));
 
   for ( size_t levID = 0;  levID < nlevs; levID++ )
-    extWriteVarSliceDP(streamptr, varID, levID, &data[levID*gridsize]);
+    extWriteVarSliceDP(streamptr, varID, (int)levID, &data[levID*gridsize]);
 }
 
 #endif /* HAVE_LIBEXTRA */
diff --git a/src/stream_grb.c b/src/stream_grb.c
index 5d1593412d42d1073d3eaf54db7fc8d40a46969a..c4c5c3b4f60c30afbeb9a74dc4b333990acd2e1d 100644
--- a/src/stream_grb.c
+++ b/src/stream_grb.c
@@ -7,9 +7,58 @@
 #include "stream_cgribex.h"
 #include "stream_grb.h"
 #include "stream_gribapi.h"
+#include "gribapi.h"
 #include "file.h"
 #include "cgribex.h"  /* gribZip gribGetZip gribGinfo */
-#include "gribapi.h"
+
+int cdiDebugExt                        =  0;      //  Debug level for the KNMI extensions
+#ifdef HIRLAM_EXTENSIONS
+// *** RELATED to GRIB only ***
+int cdiGribUseTimeRangeIndicator        = 0;       // normaly cdo looks in grib for attribute called "stepType"
+                                                   // but NWP models such as Harmonie 37h1.2, use "timeRangeIndicator"
+                                                   // where:  0: for instanteneous fields; 4: for accumulated fields
+#endif // HIRLAM_EXTENSIONS
+
+
+// Regarding operation to change parameter identification:
+// change if cdiGribChangeParameterID.active
+struct cdiGribParamChange cdiGribChangeParameterID;
+
+// Used only for CDO module Selmulti
+void streamGrbChangeParameterIdentification(int code, int ltype, int lev)
+{
+  // NOTE this is a "PROXY" function for gribapiChangeParameterIdentification();
+  // This just sets the globals. There are probably better solutions to this.
+  // The parameter change is done by function  gribapiChangeParameterIdentification() in stream_gribapi.c
+  // Setting this control variable to true will cause calling fnc. gribapiChangeParameterIdentification later.
+  // After grib attributes have been changed this variable goes to false.
+  cdiGribChangeParameterID.active = true;
+  cdiGribChangeParameterID.code = code;
+  cdiGribChangeParameterID.ltype = ltype;
+  cdiGribChangeParameterID.lev = lev;
+}
+
+struct cdiGribModeChange cdiGribChangeModeUvRelativeToGrid;
+
+// Used only for CDO module WindTrans
+void streamGrbChangeModeUvRelativeToGrid(int mode)
+{
+  cdiGribChangeModeUvRelativeToGrid.active = true;
+  cdiGribChangeModeUvRelativeToGrid.mode = (mode > 0);
+}
+
+struct cdiGribScanModeChange cdiGribDataScanningMode;
+
+void streamGrbDefDataScanningMode(int scanmode)
+{
+  cdiGribDataScanningMode.active = true;
+  cdiGribDataScanningMode.value = scanmode;
+}
+
+int  streamGrbInqDataScanningMode(void)
+{
+  return cdiGribDataScanningMode.value;
+}
 
 
 int grib1ltypeToZaxisType(int grib_ltype)
@@ -248,15 +297,11 @@ static
 int grbScanTimestep(stream_t * streamptr)
 {
   int status = CDI_EUFTYPE;
-  int filetype;
-
-  filetype  = streamptr->filetype;
+  int filetype  = streamptr->filetype;
 
 #if  defined  (HAVE_LIBCGRIBEX)
   if ( filetype == CDI_FILETYPE_GRB )
-    {
-      status = cgribexScanTimestep(streamptr);
-    }
+    status = cgribexScanTimestep(streamptr);
   else
 #endif
 #ifdef HAVE_LIBGRIB_API
@@ -272,17 +317,12 @@ int grbScanTimestep(stream_t * streamptr)
 #if  defined  (HAVE_LIBGRIB)
 int grbInqContents(stream_t * streamptr)
 {
-  int fileID;
-  int status = 0;
-
-  fileID = streamptr->fileID;
-
   streamptr->curTsID = 0;
 
-  status = grbScanTimestep1(streamptr);
-
+  int status = grbScanTimestep1(streamptr);
   if ( status == 0 && streamptr->ntsteps == -1 ) status = grbScanTimestep2(streamptr);
 
+  int fileID = streamptr->fileID;
   fileSetPos(fileID, 0, SEEK_SET);
 
   return status;
@@ -291,15 +331,13 @@ int grbInqContents(stream_t * streamptr)
 
 int grbInqTimestep(stream_t * streamptr, int tsID)
 {
-  int ntsteps, nrecs;
-
   if ( tsID == 0 && streamptr->rtsteps == 0 )
     Error("Call to cdiInqContents missing!");
 
   if ( CDI_Debug )
     Message("tsid = %d rtsteps = %d", tsID, streamptr->rtsteps);
 
-  ntsteps = CDI_UNDEFID;
+  int ntsteps = CDI_UNDEFID;
   while ( (tsID + 1) > streamptr->rtsteps && ntsteps == CDI_UNDEFID )
     {
       ntsteps = grbScanTimestep(streamptr);
@@ -310,6 +348,8 @@ int grbInqTimestep(stream_t * streamptr, int tsID)
 	}
     }
 
+  int nrecs;
+
   if ( tsID >= streamptr->ntsteps && streamptr->ntsteps != CDI_UNDEFID )
     {
       nrecs = 0;
diff --git a/src/stream_grb.h b/src/stream_grb.h
index a2f334f82d03e604cc23ad65500e6046372213ff..78eb8c5b998cfd22c300282a6f24da61e9d40e2f 100644
--- a/src/stream_grb.h
+++ b/src/stream_grb.h
@@ -1,6 +1,10 @@
 #ifndef _STREAM_GRB_H
 #define _STREAM_GRB_H
 
+static inline bool gribbyte_get_bit(int number, int bit) { return (bool)((number >> (8-bit)) & 1); }
+static inline void gribbyte_set_bit(int *number, int bit) { *number |= 1 << (8-bit); }
+static inline void gribbyte_clear_bit(int *number, int bit) { *number &= ~(1 << (8-bit)); }
+
 int   grbBitsPerValue(int datatype);
 
 int   grbInqContents(stream_t *streamptr);
@@ -24,6 +28,34 @@ int   grib2ltypeToZaxisType(int grib_ltype);
 int   zaxisTypeToGrib1ltype(int zaxistype);
 int   zaxisTypeToGrib2ltype(int zaxistype);
 
+struct cdiGribParamChange
+{
+  int code, ltype, lev;
+  bool active;
+};
+
+struct cdiGribModeChange
+{
+  bool mode;
+  bool active;
+};
+
+struct cdiGribScanModeChange
+{
+  int value;
+  bool active;
+};
+
+extern struct cdiGribParamChange cdiGribChangeParameterID;
+extern struct cdiGribModeChange cdiGribChangeModeUvRelativeToGrid;
+extern struct cdiGribScanModeChange cdiGribDataScanningMode;
+
+// Used in CDO
+void streamGrbChangeParameterIdentification(int code, int ltype, int lev);
+void streamGrbChangeModeUvRelativeToGrid(int mode);
+void streamGrbDefDataScanningMode(int scanmode);
+int  streamGrbInqDataScanningMode(void);
+
 #endif  /* _STREAM_GRB_H */
 /*
  * Local Variables:
diff --git a/src/stream_gribapi.c b/src/stream_gribapi.c
index 79ed40b25cef35e94bd835372c9fbbaa75249c87..e5de73385f63852cfa5273e8325ee6d5a995a0ac 100644
--- a/src/stream_gribapi.c
+++ b/src/stream_gribapi.c
@@ -2,7 +2,7 @@
 #  include "config.h"
 #endif
 
-#if  defined  (HAVE_LIBGRIB_API)
+#ifdef HAVE_LIBGRIB_API
 #include <limits.h>
 #include <stdio.h>
 
@@ -12,6 +12,7 @@
 #include "file.h"
 #include "gribapi_utilities.h"
 #include "stream_grb.h"
+#include "stream_gribapi.h"
 #include "varscan.h"
 #include "datetime.h"
 #include "vlist.h"
@@ -35,6 +36,14 @@ typedef struct {
   int level2;
   int ltype;
   int tsteptype;
+#ifdef HIRLAM_EXTENSIONS
+    // NOTE: tsteptype MUST be part of attributes used to compare variables!
+    // Modern NWP models (HARMONIE, HIRLAM) use timeRangeIndicator to specify
+    // if the field is instantanous or accumulated.
+    // Both types are typically in the same GRIB-file.
+    // (181; 105, 0, timeRangeIndicator=0) .. instantanous rain
+    // (181; 105, 0, timeRangeIndicator=4) .. accumulated rain  .. both can be in the same grib file
+#endif // HIRLAM_EXTENSIONS
   char name[32];
 
   var_tile_t tiles;
@@ -471,12 +480,42 @@ void gribapiAddRecord(stream_t * streamptr, int param, grib_handle *gh,
       grib_get_double(gh, "latitudeOfSouthernPoleInDegrees",  &ypole);
       grib_get_double(gh, "longitudeOfSouthernPoleInDegrees", &xpole);
       grib_get_double(gh, "angleOfRotation", &angle);
-      xpole =  xpole - 180;
+      xpole -= 180;
       if ( fabs(ypole) > 0 ) ypole = -ypole; // change from south to north pole
       if ( fabs(angle) > 0 ) angle = -angle;
 
       gridDefParamRLL(gridID, xpole, ypole, angle);
     }
+  else if ( grid->projtype == CDI_PROJ_LCC )
+    {
+      double a = 6367470., rf = 0;
+      long earthIsOblate;
+      grib_get_long(gh, "earthIsOblate", &earthIsOblate);
+      if ( earthIsOblate ) { a = 6378160.; rf = 297.0; }
+      double lon_0, lat_1, lat_2, xval_0, yval_0;
+      long projflag = 0;
+      grib_get_double(gh, "longitudeOfFirstGridPointInDegrees", &xval_0);
+      grib_get_double(gh, "latitudeOfFirstGridPointInDegrees", &yval_0);
+      grib_get_double(gh, "LoVInDegrees", &lon_0);
+      grib_get_double(gh, "Latin1InDegrees", &lat_1);
+      grib_get_double(gh, "Latin2InDegrees", &lat_2);
+      grib_get_long(gh, "projectionCentreFlag", &projflag);
+      bool lsouth = gribbyte_get_bit(projflag, 1);
+      if ( lsouth ) { lat_1 = -lat_1; lat_2 = -lat_2; }
+
+      double lat_0 = lat_2;
+      double x_0 = grid_missval;
+      double y_0 = grid_missval;
+
+      if ( proj_lonlat_to_lcc_func )
+        {
+          x_0 = xval_0; y_0 = yval_0;
+          proj_lonlat_to_lcc_func(grid_missval, lon_0, lat_0, lat_1, lat_2, a, rf, (size_t)1, &x_0, &y_0);
+          if ( IS_NOT_EQUAL(x_0, grid_missval) && IS_NOT_EQUAL(y_0, grid_missval) )
+            { x_0 = -x_0; y_0 = -y_0; }
+        }
+      gridDefParamLCC(gridID, grid_missval, lon_0, lat_0, lat_1, lat_2, a, rf, xval_0, yval_0, x_0, y_0);
+    }
 
   int zaxistype = gribapiGetZaxisType(gribEditionNumber(gh), leveltype1);
 
@@ -1669,6 +1708,8 @@ void gribapiDefStepUnits(int editionNumber, grib_handle *gh, int timeunit, int p
         }
       else
         {
+	  // NOTE KNMI:  HIRLAM model files LAMH_D11 are in grib1 and do NOT have key indicatorOfUnitForTimeRange
+	  // Watch out for compatibility issues.
           GRIB_CHECK(my_grib_set_long(gh, "indicatorOfUnitOfTimeRange", unitsOfTime), 0);
         }
     }
@@ -1760,7 +1801,7 @@ int gribapiDefDateTimeRel(int editionNumber, grib_handle *gh, int rdate, int rti
 
   int factor = getTimeunitFactor(timeunit);
 
-  if ( !(int) fmod(days*86400.0 + secs, factor) )
+  if ( !(int)(fmod(days*86400.0 + secs, factor)))
     {
       int proDefTempNum = gribapiDefSteptype(editionNumber, gh, productDefinitionTemplate, typeOfGeneratingProcess, tsteptype, gcinit);
 
@@ -1927,10 +1968,17 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype
         }
     }
 
-  if ( gridtype == GRID_PROJECTION && gridInqProjType(gridID) == CDI_PROJ_RLL )
+  if ( gridtype == GRID_PROJECTION )
     {
-      gridtype = GRID_LONLAT;
-      lrotated = true;
+      if ( gridInqProjType(gridID) == CDI_PROJ_RLL )
+        {
+          gridtype = GRID_LONLAT;
+          lrotated = true;
+        }
+      else if ( gridInqProjType(gridID) == CDI_PROJ_LCC )
+        {
+          gridtype = GRID_LCC;
+        }
     }
 
   if ( gridtype == GRID_LONLAT || gridtype == GRID_GAUSSIAN )
@@ -1957,7 +2005,6 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype
       {
 	double xfirst = 0, xlast = 0, xinc = 0;
 	double yfirst = 0, ylast = 0, yinc = 0;
-	double latIncr;
 
         const char *mesg;
         size_t len;
@@ -1987,8 +2034,8 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype
           }
         GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
 
-	long nlon = gridInqXsize(gridID);
-	long nlat = gridInqYsize(gridID);
+	int nlon = gridInqXsize(gridID);
+	int nlat = gridInqYsize(gridID);
 
 	if ( gridtype == GRID_GAUSSIAN_REDUCED )
 	  {
@@ -1999,14 +2046,14 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype
 	    gridInqRowlon(gridID, rowlon);
 	    for ( int i = 0; i < nlat; ++i ) pl[i] = rowlon[i];
 
-            GRIB_CHECK(grib_set_long_array(gh, "pl", pl, nlat), 0);
+            GRIB_CHECK(grib_set_long_array(gh, "pl", pl, (size_t)nlat), 0);
 
 	    Free(pl);
 	    Free(rowlon);
 
 	    xfirst = 0;
-	    xlast  = 360.-360./(nlat*2);
-	    xinc   = 360./(nlat*2);
+	    xinc   =        360. * 0.5 / (double)nlat;
+	    xlast  = 360. - 360. * 0.5 / (double)nlat;
 	  }
 	else
 	  {
@@ -2015,7 +2062,7 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype
 	      {
 		xfirst = gridInqXval(gridID, 0);
                 xlast  = gridInqXval(gridID, (lcurvi ? nlon*nlat : nlon) - 1);
-		xinc   = gridInqXinc(gridID);
+		xinc   = fabs(gridInqXinc(gridID));
 	      }
 	  }
 
@@ -2024,7 +2071,7 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype
 	  {
 	    yfirst = gridInqYval(gridID, 0);
             ylast  = gridInqYval(gridID, (lcurvi ? nlon*nlat : nlat) - 1);
-	    yinc   = gridInqYinc(gridID);
+	    yinc   = fabs(gridInqYinc(gridID));
 	  }
 
 	if ( gridtype != GRID_GAUSSIAN_REDUCED ) GRIB_CHECK(my_grib_set_long(gh, "Ni", nlon), 0);
@@ -2037,8 +2084,11 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype
 	GRIB_CHECK(my_grib_set_double(gh, "latitudeOfLastGridPointInDegrees",   ylast), 0);
 
         {
-          long jscan = 0;
-          if ( yfirst < ylast ) jscan = 1;
+          long iscan = xfirst > xlast;
+          GRIB_CHECK(my_grib_set_long(gh, "iScansNegatively", iscan), 0);
+        }
+        {
+          long jscan = yfirst < ylast;
           GRIB_CHECK(my_grib_set_long(gh, "jScansPositively", jscan), 0);
         }
 
@@ -2050,9 +2100,7 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype
           }
 	else
 	  {
-	    latIncr = yinc;
-	    if ( latIncr < 0 ) latIncr = -latIncr;
-	    GRIB_CHECK(my_grib_set_double(gh, "jDirectionIncrementInDegrees", latIncr), 0);
+	    GRIB_CHECK(my_grib_set_double(gh, "jDirectionIncrementInDegrees", yinc), 0);
 	  }
 
 	if ( lrotated )
@@ -2060,7 +2108,7 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype
             double xpole = 0, ypole = 0, angle = 0;
             gridInqParamRLL(gridID, &xpole, &ypole, &angle);
 
-            xpole =  xpole + 180;
+            xpole += 180;
             if ( fabs(ypole) > 0 ) ypole = -ypole; // change from north to south pole
             if ( fabs(angle) > 0 ) angle = -angle;
             GRIB_CHECK(my_grib_set_double(gh, "latitudeOfSouthernPoleInDegrees",  ypole), 0);
@@ -2086,55 +2134,69 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype
         if ( lieee )
           GRIB_CHECK(my_grib_set_long(gh, "precision", datatype == CDI_DATATYPE_FLT64 ? 2 : 1), 0);
 
+        long uvRelativeToGrid = gridInqUvRelativeToGrid(gridID);
+        if ( uvRelativeToGrid ) GRIB_CHECK(my_grib_set_long(gh, "uvRelativeToGrid", uvRelativeToGrid), 0);
+
 	break;
       }
     case GRID_LCC:
       {
-	double originLon, originLat, lonParY, lat1, lat2, xincm, yincm;
-	int projflag, scanflag;
-
 	int xsize = gridInqXsize(gridID);
 	int ysize = gridInqYsize(gridID);
 
-	gridInqParamLCC(gridID, &originLon, &originLat, &lonParY, &lat1, &lat2, &xincm, &yincm,
-                        &projflag, &scanflag);
+        double lon_0, lat_0, lat_1, lat_2, a, rf, xval_0, yval_0, x_0, y_0;
+	gridInqParamLCC(gridID, grid_missval, &lon_0, &lat_0, &lat_1, &lat_2, &a, &rf, &xval_0, &yval_0, &x_0, &y_0);
+	gridVerifyGribParamLCC(gridID, grid_missval, &lon_0, &lat_0, &lat_1, &lat_2, &a, &rf, &xval_0, &yval_0, &x_0, &y_0);
+        if ( xval_0 < 0 ) xval_0 += 360;
+        bool lsouth = (lat_1 < 0);
+        if ( lsouth ) { lat_1 = -lat_2; lat_2 = -lat_2; }
+        int projflag = 0;
+        if ( lsouth ) gribbyte_set_bit(&projflag, 1);
+
+        double xinc = gridInqXinc(gridID);
+        double yinc = gridInqYinc(gridID);
 
         static const char mesg[] = "lambert";
-        size_t len = sizeof (mesg) -1;
+        size_t len = sizeof(mesg) -1;
         GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
 
 	GRIB_CHECK(my_grib_set_long(gh, "Nx", xsize), 0);
 	GRIB_CHECK(my_grib_set_long(gh, "Ny", ysize), 0);
-
-        /* FIXME: lround should probably be round here */
-	GRIB_CHECK(my_grib_set_double(gh, "DxInMetres", (double)lround(xincm)), 0);
-        /* FIXME: lround should probably be round here */
-	GRIB_CHECK(my_grib_set_double(gh, "DyInMetres", (double)lround(yincm)), 0);
-	GRIB_CHECK(my_grib_set_double(gh, "longitudeOfFirstGridPointInDegrees", originLon), 0);
-	GRIB_CHECK(my_grib_set_double(gh, "latitudeOfFirstGridPointInDegrees", originLat), 0);
-	GRIB_CHECK(my_grib_set_double(gh, "LoVInDegrees", lonParY), 0);
-	GRIB_CHECK(my_grib_set_double(gh, "Latin1InDegrees", lat1), 0);
-	GRIB_CHECK(my_grib_set_double(gh, "Latin2InDegrees", lat2), 0);
-
+	GRIB_CHECK(my_grib_set_long(gh, "DxInMetres", lround(xinc)), 0);
+	GRIB_CHECK(my_grib_set_long(gh, "DyInMetres", lround(yinc)), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "longitudeOfFirstGridPointInDegrees", xval_0), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "latitudeOfFirstGridPointInDegrees", yval_0), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "LoVInDegrees", lon_0), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "Latin1InDegrees", lat_1), 0);
+	GRIB_CHECK(my_grib_set_double(gh, "Latin2InDegrees", lat_2), 0);
+        GRIB_CHECK(my_grib_set_long(gh, "projectionCentreFlag", projflag), 0);
+
+        long uvRelativeToGrid = gridInqUvRelativeToGrid(gridID);
+        if ( uvRelativeToGrid ) GRIB_CHECK(my_grib_set_long(gh, "uvRelativeToGrid", uvRelativeToGrid), 0);
+        long earthIsOblate = (IS_EQUAL(a, 6378160.) && IS_EQUAL(rf, 297.));
+        if ( earthIsOblate ) GRIB_CHECK(my_grib_set_long(gh, "earthIsOblate", earthIsOblate), 0);
+
+        int scanflag = 0;
+        gribbyte_set_bit(&scanflag, 2);
         if ( editionNumber <= 1 )
-          {
-            GRIB_CHECK(my_grib_set_long(gh, "projectionCenterFlag", projflag), 0);
-            GRIB_CHECK(my_grib_set_long(gh, "scanningMode", scanflag), 0);
-          }
+          GRIB_CHECK(my_grib_set_long(gh, "scanningMode", (long)scanflag), 0);
 
 	break;
       }
     case GRID_SPECTRAL:
       {
-        static const char mesg[] = "sh";
-        size_t len = sizeof (mesg) -1;
-	GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
-
-	int trunc = gridInqTrunc(gridID);
-	GRIB_CHECK(my_grib_set_long(gh, "J", trunc), 0);
-	GRIB_CHECK(my_grib_set_long(gh, "K", trunc), 0);
-	GRIB_CHECK(my_grib_set_long(gh, "M", trunc), 0);
-
+        {
+          static const char mesg[] = "sh";
+          size_t len = sizeof (mesg) -1;
+          GRIB_CHECK(my_grib_set_string(gh, "gridType", mesg, &len), 0);
+        }
+	{
+          int trunc = gridInqTrunc(gridID);
+          enum { numTruncAtt = 3 };
+          static const char truncAttNames[numTruncAtt][2] = { "J", "K", "M" };
+          for (size_t i = 0; i < numTruncAtt; ++i)
+            GRIB_CHECK(my_grib_set_long(gh, truncAttNames[i], trunc), 0);
+        }
 	// GRIB_CHECK(my_grib_set_long(gh, "numberOfDataPoints", gridsize), 0);
         /*
         if ( lieee )
@@ -2151,10 +2213,11 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype
             static const char mesg[] = "spectral_complex";
             size_t len = sizeof (mesg) -1;
 	    GRIB_CHECK(my_grib_set_string(gh, "packingType", mesg, &len), 0);
-
-	    GRIB_CHECK(my_grib_set_long(gh, "JS", 20), 0);
-	    GRIB_CHECK(my_grib_set_long(gh, "KS", 20), 0);
-	    GRIB_CHECK(my_grib_set_long(gh, "MS", 20), 0);
+            enum { numTruncAtt = 3 };
+            static const char truncAttNames[numTruncAtt][3]
+              = { "JS", "KS", "MS" };
+            for (size_t i = 0; i < numTruncAtt; ++i)
+              GRIB_CHECK(my_grib_set_long(gh, truncAttNames[i], 20), 0);
 	  }
 	else
 	  {
@@ -2238,16 +2301,14 @@ static
 void getLevelFactor(double level, long *factor, long *out_scaled_value)
 {
   double scaled_value  = level;
-  /* FIXME: lround might be better here */
-  long   iscaled_value = (long) round(scaled_value);
+  long   iscaled_value = lround(scaled_value);
   long   i;
 
   const double eps = 1.e-8;
   for ( i=0; (fabs(scaled_value - (double) iscaled_value) >= eps) && i < 7; i++ )
     {
       scaled_value *= 10.;
-      /* FIXME: lround might be better here */
-      iscaled_value = (long)round(scaled_value);
+      iscaled_value = lround(scaled_value);
     }
 
   (*factor)           = i;
@@ -2552,6 +2613,427 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int zaxisID, int levelI
     }
 }
 
+
+int gribapiGetScanningMode(grib_handle *gh)
+{
+  long iScansNegatively;
+  long jScansPositively;
+  long jPointsAreConsecutive;
+
+  GRIB_CHECK(grib_get_long(gh, "iScansNegatively", &iScansNegatively), 0);
+  GRIB_CHECK(grib_get_long(gh, "jScansPositively", &jScansPositively), 0);
+  GRIB_CHECK(grib_get_long(gh, "jPointsAreConsecutive", &jPointsAreConsecutive), 0);
+  int scanningMode
+    = 128*(bool)iScansNegatively
+    + 64 *(bool)jScansPositively
+    + 32 *(bool)jPointsAreConsecutive;
+  if (cdiDebugExt>=30)
+    printf("gribapiGetScanningMode(): Scanning mode = %02d (%1d%1d%1d)*32; \n",\
+            scanningMode,(int)jPointsAreConsecutive,(int)jScansPositively,(int)iScansNegatively);
+
+ return scanningMode;
+}
+
+
+void gribapiSetScanningMode(grib_handle *gh, int scanningMode)
+{
+   // 127: reserved for testing; generated test data will be in 64 scanning mode
+  //if (scanningMode== 127)  scanningMode = 64;
+
+  long iScansNegatively      = (scanningMode & 128)/128;
+  long jScansPositively      = (scanningMode & 64)/64;
+  long jPointsAreConsecutive = (scanningMode & 32)/32;
+
+  if (cdiDebugExt>=30)
+  {
+    long paramId, levelTypeId, levelId, uvRelativeToGrid;
+    GRIB_CHECK(grib_get_long(gh, "uvRelativeToGrid", &uvRelativeToGrid), 0);
+    GRIB_CHECK(grib_get_long(gh, "indicatorOfParameter", &paramId), 0);
+    GRIB_CHECK(grib_get_long(gh, "indicatorOfTypeOfLevel", &levelTypeId), 0);
+    GRIB_CHECK(grib_get_long(gh, "level", &levelId), 0);
+    printf("gribapiSetScanningMode(): (param,ltype,level) = (%3d,%3d,%4d); Scanning mode = %02d (%1d%1d%1d)*32;  uvRelativeToGrid = %02d\n",\
+            (int)paramId, (int)levelTypeId, (int)levelId,
+            scanningMode,(int)jPointsAreConsecutive,(int)jScansPositively,(int)iScansNegatively,
+            (int)uvRelativeToGrid);
+  }
+
+  GRIB_CHECK(my_grib_set_long(gh, "iScansNegatively", iScansNegatively), 0);
+  GRIB_CHECK(my_grib_set_long(gh, "jScansPositively", jScansPositively), 0);
+  GRIB_CHECK(my_grib_set_long(gh, "jPointsAreConsecutive", jPointsAreConsecutive), 0);
+}
+
+
+static void gribapiSetUvRelativeToGrid(grib_handle *gh, int mode)
+{
+  long uvRelativeToGridMode = mode;
+  long uvRelativeToGridModeOld;
+
+  GRIB_CHECK(grib_get_long(gh, "uvRelativeToGrid", &uvRelativeToGridModeOld), 0);
+
+  if (cdiDebugExt>=30)
+    printf("gribapiSetUvRelativeToGrid():  uvRelativeToGrid: %02d (old) => %02d (new); \n",(int)uvRelativeToGridModeOld,(int)uvRelativeToGridMode);
+
+  GRIB_CHECK(my_grib_set_long(gh, "uvRelativeToGrid", uvRelativeToGridMode), 0);
+}
+
+
+  /*
+    TABLE 8. SCANNING MODE FLAG
+
+    (GDS Octet 28)
+    BIT     VALUE     MEANING
+    1       0       Points scan in +i direction
+            1       Points scan in -i direction
+    2       0       Points scan in -j direction
+            1       Points scan in +j direction
+    3       0       Adjacent points in i direction are consecutive
+                      (FORTRAN: (I,J))
+            1       Adjacent points in j direction are consecutive
+                    (FORTRAN: (J,I))
+
+    => Scanning Mode     0 0 0 0 0 0 0 0  (00 dec)  +i, -j; i direction consecutive (row-major    order West->East   & North->South)
+    => Scanning Mode     0 1 0 0 0 0 0 0  (64 dec)  +i, +j; i direction consecutive (row-major    order West->East   & South->North )
+    => Scanning Mode     1 1 0 0 0 0 0 0  (96 dec)  +i, +j; j direction consecutive (column-major order South->North & West->East )
+
+    NOTE:  South->North  - As if you would plot the data as image on the screen
+                           where [0,0] of the data is the top-left pixel.
+
+                           grib2ppm LAMH_D11_201302150000_00000_oro | display ppm:-
+                           ImageMagick (display): [0,0] of an image belongs to the top-left pixel
+    [DEFAULT] : 64 dec
+
+    iScansNegatively = 0;
+    jScansPositively = 1;
+    jPointsAreConsecutive = 0;    => Scanning Mode 64
+
+    cdo selindexbox,1,726,100,550 LAMH_D11_201302150000_00000_oro LAMH_D11_201302150000_00000_oro_cropped
+    grib2ppm LAMH_D11_201302150000_00000_oro_cropped | /usr/bin/display ppm:- &
+    # ^^^ this image will be missing the souther parts of data
+
+    grib2ppm LAMH_D11_201302150000_00000_oro | /usr/bin/display ppm:- &
+    # ^ full domain data
+  */
+
+#ifdef HIRLAM_EXTENSIONS
+static void
+verticallyFlipGridDefinitionWhenScanningModeChanged(grib_handle *gh, double yfirst, double ylast, double yinc )
+{
+  /*
+  Nj = 550;
+  latitudeOfFirstGridPointInDegrees = -30.8;
+  latitudeOfLastGridPointInDegrees = 24.1;
+  iScansNegatively = 0;
+  jScansPositively = 0;
+  jPointsAreConsecutive = 0;
+  jDirectionIncrementInDegrees = 0.1;
+
+  When switching from scanning mode 0 <=> 64
+  yfirst = -30.8 + (550-1)*0.1
+
+  yfirst = yfirst + (ysize-1) * yinc
+  yinc   = -1.0*yinc
+
+  */
+
+
+  //long jDim=0;
+  //GRIB_CHECK(grib_get_long(gh, "Nj", &jDim), 0);
+
+  double latitudeOfFirstGridPointInDegrees;
+  double latitudeOfLastGridPointInDegrees;
+  double jDirectionIncrementInDegrees;
+
+  //GRIB_CHECK(grib_get_double(gh, "latitudeOfFirstGridPointInDegrees", &latitudeOfFirstGridPointInDegrees), 0);  // yfirst
+  //GRIB_CHECK(grib_get_double(gh, "latitudeOfLastGridPointInDegrees", &latitudeOfLastGridPointInDegrees), 0);    // ylast
+  //GRIB_CHECK(grib_get_double(gh, "jDirectionIncrementInDegrees", &jDirectionIncrementInDegrees), 0);  // yinc
+
+  if (cdiDebugExt>=10)
+  {
+      Message(" BEFORE: yfirst = %f; ylast = %f; yinc = %f; ", yfirst,ylast, yinc);
+  }
+
+  GRIB_CHECK(my_grib_set_double(gh, "latitudeOfFirstGridPointInDegrees", ylast), 0);
+  GRIB_CHECK(my_grib_set_double(gh, "latitudeOfLastGridPointInDegrees", yfirst), 0);
+  //yinc *= -1.0; // don't set yinc here ...
+  //GRIB_CHECK(my_grib_set_double(gh, "jDirectionIncrementInDegrees", yinc), 0);
+
+  if (cdiDebugExt>=10)
+  {
+    GRIB_CHECK(grib_get_double(gh, "latitudeOfFirstGridPointInDegrees", &latitudeOfFirstGridPointInDegrees), 0);  // yfirst
+    GRIB_CHECK(grib_get_double(gh, "latitudeOfLastGridPointInDegrees", &latitudeOfLastGridPointInDegrees), 0);    // ylast
+    GRIB_CHECK(grib_get_double(gh, "jDirectionIncrementInDegrees", &jDirectionIncrementInDegrees), 0);  // yinc
+    Message("CHANGED INTO:  yfirst = %f, ylast = %f, yinc = %f",latitudeOfFirstGridPointInDegrees,latitudeOfLastGridPointInDegrees, jDirectionIncrementInDegrees);
+  }
+}
+
+static void
+convertDataScanningMode(int scanModeIN, int scanModeOUT, double *data,
+                        int gridsize, int iDim, int jDim)
+{
+  int i,j;
+  int idxIN, idxOUT;
+
+   // 127: reserved for testing; it will generate test data in 64 scanning mode
+  if (scanModeOUT== 127)  // fill with testdata ...
+  {
+      scanModeOUT = 64;
+      if (cdiDebugExt>=30) printf("convertDataScanningMode(): Generating test data in 64 scanning mode..\n");
+      for (j=0; j<jDim; j++)
+      {
+        int jXiDim = j*iDim;
+        for (i=0; i<iDim; i++)
+        {
+          idxIN = i + jXiDim;
+          data[idxIN] = (double) (100.0*j +i);
+        }
+      }
+  }
+
+  if ( (iDim*jDim)!= gridsize)
+  {
+    if (cdiDebugExt>=30) printf("convertDataScanningMode(): ERROR: (iDim*jDim)!= gridsize;  (%d * %d) != %d\n", iDim,jDim, gridsize);
+    return;
+  }
+  if (cdiDebugExt>=30) printf("convertDataScanningMode(): scanModeIN=%02d => scanModeOUT=%02d ; where: (iDim * jDim == gridsize)  (%d*%d == %d)\n",scanModeIN, scanModeOUT, iDim,jDim, gridsize);
+
+  if (cdiDebugExt>=100)
+  {
+      printf("convertDataScanningMode(): data IN:\n");
+      for (j=0; j<jDim; j++)
+      {
+        int jXiDim = j*iDim;
+        for (i=0; i<iDim; i++)
+        {
+          idxIN = i + jXiDim;
+          printf("%03.0f, ",data[idxIN]);
+        }
+        printf("\n");
+      }
+  }
+
+  if (scanModeIN==scanModeOUT)
+  {
+    if (cdiDebugExt>=30) printf("convertDataScanningMode(): INFO: Nothing to do;  scanModeIN==scanModeOUT..\n");
+    return;
+  }
+
+  if (0)
+  {
+      return;
+      if (scanModeOUT==00)
+      {
+          if (cdiDebugExt>0) printf("convertDataScanningMode(): Leave data unchaged BUT set scanModeOUT=00.\n");
+          // CHECK:  Looks like that GRIB-API provide (no matter what) data in the scannning mode 00, even it is store in the gribfile as 64 !!
+          return;
+      }
+  }
+  double *dataCopy = NULL;
+  dataCopy = (double *) malloc(gridsize*sizeof(double));
+
+  memcpy((void*)dataCopy,(void*) data, gridsize*sizeof(double));
+
+  if (scanModeIN==64)           // Scanning Mode (00 dec)  +i, -j; i direction consecutive (row-major    order West->East   & South->North )
+  {                             // Scanning Mode (64 dec)  +i, +j; i direction consecutive (row-major    order West->East   & North->South )
+                                // Scanning Mode (96 dec)  +i, +j; j direction consecutive (column-major order North->South & West->East )
+      if (scanModeOUT==00)
+      // CHECK:  Looks like that GRIB-API provide (no matter what) data in the scannning mode 00, even it is store in the gribfile as 64 !!
+#define VERTICAL_FLIP
+#ifdef VERTICAL_FLIP
+      { // flip the data vertically ..
+        idxIN= 0; idxOUT= (jDim-1)*iDim;
+        if (cdiDebugExt>=30) printf("convertDataScanningMode():  copying rows nr. (%04d : %04d)\n",0,jDim-1);
+        for (j=0; j<jDim; j++)
+        {
+          memcpy((void*)&data[idxOUT], (void*)&dataCopy[idxIN], iDim*sizeof(double));
+          idxIN  += iDim; idxOUT -= iDim;
+        }
+      } // end if (scanModeOUT==00)*/
+#endif
+#ifdef HORIZONTAL_FLIP
+      { // flip data horizontally ...
+        if (1)
+        {
+            if (cdiDebugExt>=30) printf("convertDataScanningMode():  copying columns nr. (%04d : %04d);\n", 0, iDim-1);
+            for (i=0; i<iDim; i++)
+            {
+              for (j=0; j<jDim; j++)
+              {
+                int jXiDim = j*iDim;
+                idxIN  = i           + jXiDim;
+                //data[idxIN] = (double) (100.0*j +i);  // just some testdata ..
+                idxOUT = iDim - i -1 + jXiDim;
+                //printf("[%03d=>%03d] = %f;",idxIN,idxOUT,dataCopy[idxIN]);
+                data[idxOUT] =  dataCopy[idxIN];
+              }
+            }
+        }
+      } // end if (scanModeOUT==00)
+#endif
+
+      if (scanModeOUT==96)
+      { // transpose the data
+        if (cdiDebugExt>=30) printf("convertDataScanningMode():  transpose data rows=>columns nr. (%04d : %04d) => (%04d : %04d);\n", 0, iDim-1, 0, jDim-1);
+        for (j=0; j<jDim; j++)
+        {
+          int jXiDim = j*iDim;
+          for (i=0; i<iDim; i++)
+          {
+            idxIN  = i + jXiDim;
+            idxOUT = j + i*jDim;
+            //printf("[%03d=>%03d] = %f;",idxIN,idxOUT,dataCopy[idxIN]);
+            data[idxOUT] =  dataCopy[idxIN];
+          }
+          //printf(".\n");
+        }
+      } // end if (scanModeOUT==96)
+  } // end if (scanModeIN==64)
+
+  if (scanModeIN==00)           // Scanning Mode (00 dec)  +i, -j; i direction consecutive (row-major    order West->East   & South->North )
+  {                             // Scanning Mode (64 dec)  +i, +j; i direction consecutive (row-major    order West->East   & North->South )
+                               // Scanning Mode (96 dec)  +i, +j; j direction consecutive (column-major order North->South & West->East )
+    if (scanModeOUT==64)
+      { // flip the data vertically ..
+        idxIN= 0; idxOUT= (jDim-1)*iDim;
+        for (j=0; j<jDim; j++)
+        {
+          if (cdiDebugExt>=25) printf("convertDataScanningMode():  copying row nr. %04d; [idxIN=%08d] => [idxOUT=%08d]\n",j, idxIN, idxOUT);
+          memcpy((void*)&data[idxOUT], (void*)&dataCopy[idxIN], iDim*sizeof(double));
+          idxIN  += iDim; idxOUT -= iDim;
+        }
+      } // end if (scanModeOUT==64)
+
+      if (scanModeOUT==96)
+      { // transpose the data
+        int jInv;
+        for (j=0; j<jDim; j++)
+        {
+          if (cdiDebugExt>=30) printf("convertDataScanningMode():  processing row nr. %04d;\n", j);
+          jInv = (jDim-1) -j;
+          for (i=0; i<iDim; i++)
+            data[j + i*jDim] =  dataCopy[i + jInv*iDim];  // source data has -j
+        }
+      } // end if (scanModeOUT==96)
+  } // end if (scanModeIN==00)
+
+  if (scanModeIN==96)           // Scanning Mode (00 dec)  +i, -j; i direction consecutive (row-major    order West->East   & South->North )
+  {                             // Scanning Mode (64 dec)  +i, +j; i direction consecutive (row-major    order West->East   & North->South )
+                                // Scanning Mode (96 dec)  +i, +j; j direction consecutive (column-major order North->South & West->East )
+    if (scanModeOUT==64)
+      { // transpose the data
+        for (j=0; j<jDim; j++)
+        {
+          if (cdiDebugExt>=30) printf("convertDataScanningMode():  processing row nr. %04d;\n", j);
+          int jXiDim = j*iDim;
+          for (i=0; i<iDim; i++)
+            //data[j + i*jDim] =  dataCopy[i + j*iDim];
+            data[i + jXiDim] =  dataCopy[j + i*jDim];
+        }
+      } // end if (scanModeOUT==64)
+
+      if (scanModeOUT==00)
+      { // transpose the data
+        idxIN= 0; idxOUT= 0;
+        int jInv;
+        for (j=0; j<jDim; j++)
+        {
+          if (cdiDebugExt>=30) printf("convertDataScanningMode():  processing row nr. %04d;\n", j);
+          jInv = (jDim-1) -j;
+          int jXiDim = j*iDim;
+          for (i=0; i<iDim; i++)
+            //data[jInv + iXjDim] =  dataCopy[i + jXiDim];  // target data has -j
+            data[i + jXiDim] =  dataCopy[jInv + i*jDim];  // target data has -j
+        }
+      } // end if (scanModeOUT==00)
+  } // end if (scanModeIN==96)
+
+  if (cdiDebugExt>=100)
+  {
+      printf("convertDataScanningMode(): data OUT (new scanning mode):\n");
+      for (j=0; j<jDim; j++)
+      {
+        int jXiDim = j*iDim;
+        for (i=0; i<iDim; i++)
+        {
+          idxIN = i + jXiDim;
+          printf("%03.0f, ",data[idxIN]);
+        }
+        printf("\n");
+      }
+  }
+
+  free(dataCopy); return;
+}
+#endif //HIRLAM_EXTENSIONS
+
+static
+void gribapiSetExtMode(grib_handle *gh, int gridID, long datasize, const double *data)
+{
+  /*
+  Nj = 550;
+  latitudeOfFirstGridPointInDegrees = -30.8;
+  latitudeOfLastGridPointInDegrees = 24.1;
+  iScansNegatively = 0;
+  jScansPositively = 0;
+  jPointsAreConsecutive = 0;
+  jDirectionIncrementInDegrees = 0.1; */
+#ifndef HIRLAM_EXTENSIONS
+  (void)data;
+  (void)datasize;
+#endif
+  int gridtype = gridInqType(gridID);
+  if ( gridtype == GRID_GENERIC || gridtype == GRID_LONLAT || gridtype == GRID_GAUSSIAN ||
+       gridtype == GRID_GAUSSIAN_REDUCED || gridtype == GRID_PROJECTION )
+    {
+#ifdef HIRLAM_EXTENSIONS
+      int scanModeIN = gridInqScanningMode(gridID);
+
+      if (cdiDebugExt>=100)
+        {
+          int gridsize = gridInqSize(gridID);
+          Message("(scanModeIN=%d; gridsize=%d", scanModeIN, gridsize);
+        }
+
+      if ( cdiGribDataScanningMode.active )   // allowed modes: <0, 64, 96>; Default is 64
+        {
+          int iDim = gridInqXsize(gridID);
+          int jDim = gridInqYsize(gridID);
+
+          double yfirst = gridInqYval(gridID,      0);
+          double ylast  = gridInqYval(gridID, jDim-1);
+          double yinc   = gridInqYinc(gridID);
+
+          int scanModeOUT = cdiGribDataScanningMode.value;
+          convertDataScanningMode(scanModeIN, scanModeOUT, (double*)data, datasize, iDim, jDim);
+          // This will overrule the old scanning mode of the given grid
+          if (cdiDebugExt>=10) Message("Set GribDataScanningMode (%d) => (%d)", scanModeIN, cdiGribDataScanningMode.value);
+          gribapiSetScanningMode(gh, cdiGribDataScanningMode.value);
+
+          if (((scanModeIN==00) && (cdiGribDataScanningMode.value==64)) ||
+              ((scanModeIN==64) && (cdiGribDataScanningMode.value==00)) )
+            verticallyFlipGridDefinitionWhenScanningModeChanged(gh, yfirst, ylast, yinc);
+        }
+      else
+        {
+          if (cdiDebugExt>=100) Message("Set GribDataScanningMode => (%d) based on used grid", scanModeIN);
+          gribapiSetScanningMode(gh, scanModeIN);
+        }
+#endif
+
+      if ( cdiGribChangeModeUvRelativeToGrid.active )
+        {
+          // this will overrule/change the UvRelativeToGrid flag;
+          // typically when the wind is rotated with respect to north pole
+          if (cdiDebugExt>=100) Message("Set ModeUvRelativeToGrid =>%d ( note grid has: %d)", cdiGribChangeModeUvRelativeToGrid.mode, gridInqUvRelativeToGrid(gridID));
+          GRIB_CHECK(my_grib_set_long(gh, "uvRelativeToGrid", (long) cdiGribChangeModeUvRelativeToGrid.mode), 0);
+        }
+      else
+        {
+          if (cdiDebugExt>=100) Message("Set ModeUvRelativeToGrid =>%d based on used grid", gridInqUvRelativeToGrid(gridID));
+          gribapiSetUvRelativeToGrid(gh, gridInqUvRelativeToGrid(gridID));
+        }
+    }
+}
+
 /* #define GRIBAPIENCODETEST 1 */
 
 size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisID,
@@ -2605,7 +3087,8 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
     }
   */
 
-  gribapiDefTime((int)editionNumber, productDefinitionTemplate, typeOfGeneratingProcess, gh, vdate, vtime, tsteptype, numavg, vlistInqTaxis(vlistID), gc->init);
+  gribapiDefTime((int)editionNumber, productDefinitionTemplate, typeOfGeneratingProcess,
+                 gh, vdate, vtime, tsteptype, numavg, vlistInqTaxis(vlistID), gc->init);
 
   if ( ! gc->init ) gribapiDefInstitut(gh, vlistID, varID);
   if ( ! gc->init ) gribapiDefModel(gh, vlistID, varID);
@@ -2671,6 +3154,8 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
       GRIB_CHECK(my_grib_set_double(gh, "missingValue", vlistInqVarMissval(vlistID, varID)), 0);
     }
 
+  gribapiSetExtMode(gh, gridID, datasize, data);
+
   GRIB_CHECK(grib_set_double_array(gh, "values", data, (size_t)datasize), 0);
 
   /* get the size of coded message  */
@@ -2690,6 +3175,20 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
 
   return recsize;
 }
+
+
+void gribapiChangeParameterIdentification(grib_handle *gh, int code, int ltype, int lev)
+{
+  long  indicatorOfParameter,  indicatorOfTypeOfLevel,  level; //  timeRangeIndicator: could be included later
+  indicatorOfParameter = code;
+  indicatorOfTypeOfLevel = ltype;
+  level = lev;
+
+  if (indicatorOfParameter!=-1) GRIB_CHECK(my_grib_set_long(gh, "indicatorOfParameter", indicatorOfParameter), 0);
+  if (indicatorOfTypeOfLevel!=-1) GRIB_CHECK(my_grib_set_long(gh, "indicatorOfTypeOfLevel", indicatorOfTypeOfLevel), 0);
+  if (level!=-1) GRIB_CHECK(my_grib_set_long(gh, "level", level), 0);
+}
+
 #endif
 
 /*
diff --git a/src/stream_gribapi.h b/src/stream_gribapi.h
index ac4755b92fee4c6cc5bff68dbd117fc797d7d0f9..9b4e9807169da0a94fa5ab2719eb943590ec39e9 100644
--- a/src/stream_gribapi.h
+++ b/src/stream_gribapi.h
@@ -1,6 +1,10 @@
 #ifndef _STREAM_GRIBAPI_H
 #define _STREAM_GRIBAPI_H
 
+#ifdef HAVE_LIBGRIB_API
+
+#include "gribapi.h"
+
 int gribapiScanTimestep1(stream_t * streamptr);
 int gribapiScanTimestep2(stream_t * streamptr);
 int gribapiScanTimestep(stream_t * streamptr);
@@ -13,6 +17,13 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
 		     long datasize, const double *data, int nmiss, void **gribbuffer, size_t *gribbuffersize,
 		     int ljpeg, void *gribContainer);
 
+int gribapiGetScanningMode(grib_handle *gh);
+void gribapiSetScanningMode(grib_handle *gh, int scanningMode);
+
+void gribapiChangeParameterIdentification(grib_handle *gh, int code, int ltype, int lev);
+
+#endif
+
 #endif  /* _STREAM_GRIBAPI_H */
 /*
  * Local Variables:
diff --git a/src/stream_history.c b/src/stream_history.c
index ff2ef1bcb062918b8fd59e81c381d5258299339b..0ac5400daca484df4778b1356d81190d094bb075 100644
--- a/src/stream_history.c
+++ b/src/stream_history.c
@@ -7,16 +7,22 @@
 #include "cdi_int.h"
 #include "stream_cdf.h"
 
+static inline bool
+filetypeIsNetCDF(int filetype)
+{
+  return filetype == CDI_FILETYPE_NC
+    ||   filetype == CDI_FILETYPE_NC2
+    ||   filetype == CDI_FILETYPE_NC4
+    ||   filetype == CDI_FILETYPE_NC4C;
+}
+
 
 void streamDefHistory(int streamID, int length, const char *history)
 {
 #ifdef HAVE_LIBNETCDF
   stream_t *streamptr = stream_to_pointer(streamID);
 
-  if ( streamptr->filetype == CDI_FILETYPE_NC  ||
-       streamptr->filetype == CDI_FILETYPE_NC2 ||
-       streamptr->filetype == CDI_FILETYPE_NC4 ||
-       streamptr->filetype == CDI_FILETYPE_NC4C )
+  if ( filetypeIsNetCDF(streamptr->filetype) )
     {
       char *histstring;
       size_t len;
@@ -45,10 +51,7 @@ int streamInqHistorySize(int streamID)
 #ifdef HAVE_LIBNETCDF
   stream_t *streamptr = stream_to_pointer(streamID);
 
-  if ( streamptr->filetype == CDI_FILETYPE_NC  ||
-       streamptr->filetype == CDI_FILETYPE_NC2 ||
-       streamptr->filetype == CDI_FILETYPE_NC4 ||
-       streamptr->filetype == CDI_FILETYPE_NC4C )
+  if ( filetypeIsNetCDF(streamptr->filetype) )
     {
       size = cdfInqHistorySize(streamptr);
     }
@@ -64,10 +67,7 @@ void streamInqHistoryString(int streamID, char *history)
 #ifdef HAVE_LIBNETCDF
   stream_t *streamptr = stream_to_pointer(streamID);
 
-  if ( streamptr->filetype == CDI_FILETYPE_NC  ||
-       streamptr->filetype == CDI_FILETYPE_NC2 ||
-       streamptr->filetype == CDI_FILETYPE_NC4 ||
-       streamptr->filetype == CDI_FILETYPE_NC4C )
+  if ( filetypeIsNetCDF(streamptr->filetype) )
     {
       cdfInqHistoryString(streamptr, history);
     }
diff --git a/src/stream_ieg.c b/src/stream_ieg.c
index ea209bed0e2a90b36aaff0ac7620fa94fe5473eb..13a53affad4152aa73fb05306bf7362d2ef78725 100644
--- a/src/stream_ieg.c
+++ b/src/stream_ieg.c
@@ -395,16 +395,16 @@ void iegDefLevel(int *pdb, int *gdb, double *vct, int zaxisID, int levelID)
     {
     case ZAXIS_SURFACE:
       {
-        pdbDefLevel(pdb, IEG_LTYPE_SURFACE, 0, (int)zaxisInqLevel(zaxisID, levelID));
+        pdbDefLevel(pdb, IEG_LTYPE_SURFACE, 0, (int)(zaxisInqLevel(zaxisID, levelID)));
 	break;
       }
     case ZAXIS_HYBRID:
       {
 	if ( zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL) )
-          pdbDefLevel(pdb, IEG_LTYPE_HYBRID_LAYER, (int)zaxisInqLbound(zaxisID, levelID),
-                      (int)zaxisInqUbound(zaxisID, levelID));
+          pdbDefLevel(pdb, IEG_LTYPE_HYBRID_LAYER, (int)(zaxisInqLbound(zaxisID, levelID)),
+                      (int)(zaxisInqUbound(zaxisID, levelID)));
 	else
-          pdbDefLevel(pdb, IEG_LTYPE_HYBRID, 0, (int)zaxisInqLevel(zaxisID, levelID));
+          pdbDefLevel(pdb, IEG_LTYPE_HYBRID, 0, (int)(zaxisInqLevel(zaxisID, levelID)));
 
 	int vctsize = zaxisInqVctSize(zaxisID);
 	if ( vctsize > 100 )
@@ -460,9 +460,9 @@ void iegDefLevel(int *pdb, int *gdb, double *vct, int zaxisID, int levelID)
     case ZAXIS_DEPTH_BELOW_LAND:
       {
 	if ( zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL) )
-          pdbDefLevel(pdb, IEG_LTYPE_LANDDEPTH_LAYER, (int)zaxisInqLbound(zaxisID, levelID), (int)zaxisInqUbound(zaxisID, levelID));
+          pdbDefLevel(pdb, IEG_LTYPE_LANDDEPTH_LAYER, (int)(zaxisInqLbound(zaxisID, levelID)), (int)(zaxisInqUbound(zaxisID, levelID)));
 	else
-          pdbDefLevel(pdb, IEG_LTYPE_LANDDEPTH, 0, (int)zaxisInqLevel(zaxisID, levelID));
+          pdbDefLevel(pdb, IEG_LTYPE_LANDDEPTH, 0, (int)(zaxisInqLevel(zaxisID, levelID)));
 
 	break;
       }
diff --git a/src/stream_srv.c b/src/stream_srv.c
index 3aa74f006c4dccb8a7e891162a9e1abf7377dbe1..3bce61f7c2dc45974a20e78eac3317a362cabcfe 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -699,7 +699,7 @@ void srvWriteVarSliceDP(stream_t *streamptr, int varID, int levID, const double
 
   int header[8];
   header[0] = pnum;
-  header[1] = (int) zaxisInqLevel(vlistInqVarZaxis(vlistID, varID), levID);
+  header[1] = (int)(zaxisInqLevel(vlistInqVarZaxis(vlistID, varID), levID));
   header[2] = streamptr->tsteps[tsID].taxis.vdate;
   header[3] = streamptr->tsteps[tsID].taxis.vtime;
 
diff --git a/src/stream_write.c b/src/stream_write.c
index 21014e0f746f55a26a9823c87819afce7c260239..36f62cc3447165c6f88026f19e9fb5bd5219baae 100644
--- a/src/stream_write.c
+++ b/src/stream_write.c
@@ -133,13 +133,15 @@ void streamWriteVarF(int streamID, int varID, const float *data, int nmiss)
   int (*myCdiStreamWriteVar_)(int streamID, int varID, int memtype, const void *data, int nmiss)
     = (int (*)(int, int, int, const void *, int))
     namespaceSwitchGet(NSSWITCH_STREAM_WRITE_VAR_).func;
-  
+
   if ( myCdiStreamWriteVar_(streamID, varID, MEMTYPE_FLOAT, (const void *) data, nmiss) )
     {
       // In case the file format does not support single precision writing,
-      // we fall back to double precision writing, converting the data on the fly.
-      size_t elementCount = (size_t) gridInqSize(vlistInqVarGrid(streamInqVlist(streamID), varID));
-      elementCount *= (size_t) zaxisInqSize(vlistInqVarZaxis(streamInqVlist(streamID), varID));
+      // we fall back to double precision writing, converting the data
+      // on the fly.
+      int vlistID = streamInqVlist(streamID);
+      size_t elementCount = (size_t) gridInqSize(vlistInqVarGrid(vlistID, varID));
+      elementCount *= (size_t) zaxisInqSize(vlistInqVarZaxis(vlistID, varID));
       double *conversionBuffer = (double *) Malloc(elementCount*sizeof(*conversionBuffer));
       for ( size_t i = elementCount; i--; ) conversionBuffer[i] = (double) data[i];
       myCdiStreamWriteVar_(streamID, varID, MEMTYPE_DOUBLE, (const void *) conversionBuffer, nmiss);
diff --git a/src/table.c b/src/table.c
index 387afc7288350f84448b4ff4607fa47f830398de..05c62e3aa49eda9a725e8f756e1716ae3f259e68 100644
--- a/src/table.c
+++ b/src/table.c
@@ -377,71 +377,50 @@ int tableRead(const char *tablefile)
 
 static int tableFromEnv(int modelID, int tablenum)
 {
-  int tableID = CDI_UNDEFID;
   char tablename[256] = {'\0'};
-  int tablenamefound = 0;
+  size_t tablenameLen = 0;
+  int instID;
 
-  const char *modelName;
-  if ( (modelName = modelInqNamePtr(modelID)) )
-    {
-      strcpy(tablename, modelName);
-      if ( tablenum )
-	{
-	  size_t len = strlen(tablename);
-	  sprintf(tablename+len, "_%03d", tablenum);
-	}
-      tablenamefound = 1;
+  const char *name2Use;
+  {
+    const char *modelName, *instName;
+    if ( (modelName = modelInqNamePtr(modelID)) )
+      name2Use = modelName;
+    else if ( (instID = modelInqInstitut(modelID)) != CDI_UNDEFID
+              && (instName = institutInqNamePtr(instID)) )
+      name2Use = instName;
+    else
+      return CDI_UNDEFID;
+  }
+  tablenameLen = strlen(name2Use);
+  memcpy(tablename, name2Use, tablenameLen);
+  if ( tablenum )
+    tablenameLen
+      += (size_t)(sprintf(tablename+tablenameLen, "_%03d", tablenum));
+  size_t lenp = 0, lenf = tablenameLen;
+  if ( tablePath )
+    lenp = strlen(tablePath);
+  /* if (tablePath) printf("tablePath = %s\n", tablePath); */
+  /* if (tablename) printf("tableName = %s\n", tablename); */
+  char *tablefile = (char *) Malloc(lenp+lenf+3);
+  if ( tablePath )
+    {
+      strcpy(tablefile, tablePath);
+      strcat(tablefile, "/");
     }
   else
-    {
-      int instID = modelInqInstitut(modelID);
-      if ( instID != CDI_UNDEFID )
-	{
-          const char *instName;
-	  if ( (instName = institutInqNamePtr(instID)) )
-	    {
-	      strcpy(tablename, instName);
-	      if ( tablenum )
-		{
-		  size_t len = strlen(tablename);
-		  sprintf(tablename+len, "_%03d", tablenum);
-		}
-	      tablenamefound = 1;
-	    }
-	}
-    }
+    tablefile[0] = '\0';
+  strcat(tablefile, tablename);
+  /* if (tablefile) printf("tableFile = %s\n", tablefile); */
 
-  if ( tablenamefound )
+  int tableID = tableRead(tablefile);
+  if ( tableID != CDI_UNDEFID )
     {
-      size_t lenp = 0, lenf;
-      char *tablefile = NULL;
-      if ( tablePath )
-	lenp = strlen(tablePath);
-      lenf = strlen(tablename);
-      /* if (tablePath) printf("tablePath = %s\n", tablePath); */
-      /* if (tablename) printf("tableName = %s\n", tablename); */
-      tablefile = (char *) Malloc(lenp+lenf+3);
-      if ( tablePath )
-	{
-	  strcpy(tablefile, tablePath);
-	  strcat(tablefile, "/");
-	}
-      else
-	tablefile[0] = '\0';
-      strcat(tablefile, tablename);
-      /* if (tablefile) printf("tableFile = %s\n", tablefile); */
-
-      tableID = tableRead(tablefile);
-      if ( tableID != CDI_UNDEFID )
-	{
-	  tableDefModelID(tableID, modelID);
-	  tableDefNum(tableID, tablenum);
-	}
-      /* printf("tableID = %d %s\n", tableID, tablefile); */
-
-      Free(tablefile);
+      tableDefModelID(tableID, modelID);
+      tableDefNum(tableID, tablenum);
     }
-
+  /* printf("tableID = %d %s\n", tableID, tablefile); */
+  Free(tablefile);
   return (tableID);
 }
 
diff --git a/src/taxis.c b/src/taxis.c
index 2223932745b41e65f552f27676bd52c9d0cf8392..b54e4f4297f7b64adc62912dc16e591c1c57bffe 100644
--- a/src/taxis.c
+++ b/src/taxis.c
@@ -3,7 +3,6 @@
 #endif
 
 #include <stddef.h>
-#include <string.h>
 
 #include "cdi.h"
 #include "calendar.h"
@@ -17,6 +16,7 @@
 #include "resource_handle.h"
 #include "resource_unpack.h"
 
+
 static int DefaultTimeType = TAXIS_ABSOLUTE;
 static int DefaultTimeUnit = TUNIT_HOUR;
 
@@ -104,24 +104,15 @@ static int  TAXIS_Debug = 0;   /* If set to 1, debugging */
 
 const char *tunitNamePtr(int unitID)
 {
-  const char *name;
   int size = sizeof(Timeunits)/sizeof(*Timeunits);
-
-  if ( unitID > 0 && unitID < size )
-    name = Timeunits[unitID];
-  else
-    name = Timeunits[0];
-
-  return name;
+  return (unitID > 0 && unitID < size) ? Timeunits[unitID] : Timeunits[0];
 }
 
 #if 0
 static
 void taxis_defaults(void)
 {
-  char *timeunit;
-
-  timeunit = getenv("TIMEUNIT");
+  char *timeunit = getenv("TIMEUNIT");
   if ( timeunit )
     {
       if ( strcmp(timeunit, "minutes") == 0 )
@@ -172,6 +163,7 @@ void taxisDefaultValue(taxis_t* taxisptr)
   taxisptr->fc_period   = 0;
   taxisptr->name        = NULL;
   taxisptr->longname    = NULL;
+  taxisptr->units       = NULL;
 }
 
 static taxis_t *
@@ -192,7 +184,7 @@ taxisNewEntry(cdiResH resH)
 }
 
 static
-void taxisInit (void)
+void taxisInit(void)
 {
   static bool taxisInitialized = false;
 
@@ -204,16 +196,6 @@ void taxisInit (void)
   if ( env ) TAXIS_Debug = atoi(env);
 }
 
-#if 0
-static
-void taxis_copy(taxis_t *taxisptr2, taxis_t *taxisptr1)
-{
-  int taxisID2 = taxisptr2->self;
-  memcpy(taxisptr2, taxisptr1, sizeof(taxis_t));
-  taxisptr2->self = taxisID2;
-}
-#endif
-
 /*
 @Function  taxisCreate
 @Title     Create a Time axis
@@ -266,6 +248,7 @@ void taxisDestroyKernel(taxis_t *taxisptr)
 {
   delete_refcount_string(taxisptr->name);
   delete_refcount_string(taxisptr->longname);
+  delete_refcount_string(taxisptr->units);
 }
 
 /*
@@ -311,11 +294,12 @@ int taxisDuplicate(int taxisID1)
 
 void taxisDefType(int taxisID, int type)
 {
-  taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
+  taxis_t *taxisptr = (taxis_t *) reshGetVal(taxisID, &taxisOps);
 
-  if (taxisptr->type != type)
+  if ( taxisptr->type != type )
     {
       taxisptr->type = type;
+      if ( taxisptr->units ) delete_refcount_string(taxisptr->units);
       reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE);
     }
 }
@@ -391,6 +375,7 @@ void taxisDefRdate(int taxisID, int rdate)
   if (taxisptr->rdate != rdate)
     {
       taxisptr->rdate = rdate;
+      if ( taxisptr->units ) delete_refcount_string(taxisptr->units);
       reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE);
     }
 }
@@ -416,6 +401,7 @@ void taxisDefRtime(int taxisID, int rtime)
   if (taxisptr->rtime != rtime)
     {
       taxisptr->rtime = rtime;
+      if ( taxisptr->units ) delete_refcount_string(taxisptr->units);
       reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE);
     }
 }
@@ -505,6 +491,7 @@ void taxisDefTunit(int taxisID, int unit)
   if (taxisptr->unit != unit)
     {
       taxisptr->unit = unit;
+      if ( taxisptr->units ) delete_refcount_string(taxisptr->units);
       reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE);
     }
 }
@@ -909,6 +896,18 @@ void ptaxisDefLongname(taxis_t *taxisptr, const char *longname)
 }
 
 
+void ptaxisDefUnits(taxis_t *taxisptr, const char *units)
+{
+  if ( units )
+    {
+      size_t len = strlen(units);
+      delete_refcount_string(taxisptr->units);
+      char *taxisunits = taxisptr->units = new_refcount_string(len);
+      strcpy(taxisunits, units);
+    }
+}
+
+
 static void
 cdiDecodeTimevalue(int timeunit, double timevalue, int *days, int *secs)
 {
@@ -1318,21 +1317,15 @@ double cdiEncodeTimeval(int date, int time, taxis_t *taxis)
 	{
 	  int year, month, day;
 	  cdiDecodeDate(date, &year, &month, &day);
-          timevalue = date/100;
-	  if ( day != 0 )
-            {
-              if ( date < 0 ) timevalue -= 0.5;
-              else            timevalue += 0.5;
-            }
+          timevalue = date/100
+            + copysign((double)(day != 0) * 0.5, (double)date);
         }
       else
 	{
 	  int hour, minute, second;
 	  cdiDecodeTime(time, &hour, &minute, &second);
-	  if ( date < 0 )
-	    timevalue = -(-date + (hour*3600 + minute*60 + second)/86400.);
-	  else
-	    timevalue =    date + (hour*3600 + minute*60 + second)/86400.;
+          timevalue = copysign(1.0, (double)date)
+            * (fabs((double)date) + (hour*3600 + minute*60 + second)/86400.);
 	}
     }
   else
@@ -1377,8 +1370,10 @@ void ptaxisCopy(taxis_t *dest, taxis_t *source)
   dest->climatology = source->climatology;
   delete_refcount_string(dest->name);
   delete_refcount_string(dest->longname);
+  delete_refcount_string(dest->units);
   dest->name = dup_refcount_string(source->name);
   dest->longname = dup_refcount_string(source->longname);
+  dest->units = dup_refcount_string(source->units);
   if (dest->self != CDI_UNDEFID)
     reshSetStatus(dest->self, &taxisOps, RESH_DESYNC_IN_USE);
   reshUnlock ();
@@ -1465,7 +1460,7 @@ taxisTxCode ( void )
   return TAXIS;
 }
 
-enum { taxisNint = 21 };
+enum { taxisNint = 22 };
 
 static int
 taxisGetPackSize(void *p, void *context)
@@ -1477,8 +1472,9 @@ taxisGetPackSize(void *p, void *context)
     + (taxisptr->name ?
        serializeGetSize((int)strlen(taxisptr->name), CDI_DATATYPE_TXT, context) : 0)
     + (taxisptr->longname ?
-       serializeGetSize((int)strlen(taxisptr->longname), CDI_DATATYPE_TXT,
-                        context) : 0);
+       serializeGetSize((int)strlen(taxisptr->longname), CDI_DATATYPE_TXT, context) : 0)
+    + (taxisptr->units ?
+       serializeGetSize((int)strlen(taxisptr->units), CDI_DATATYPE_TXT, context) : 0);
   return packBufferSize;
 }
 
@@ -1543,6 +1539,15 @@ taxisUnpack(char * unpackBuffer, int unpackBufferSize, int * unpackBufferPos,
       longname[len] = '\0';
       taxisP->longname = longname;
     }
+  if (intBuffer[idx])
+    {
+      int len = intBuffer[idx];
+      char *units = new_refcount_string((size_t)len);
+      serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
+                      units, len, CDI_DATATYPE_TXT, context);
+      units[len] = '\0';
+      taxisP->units = units;
+    }
 
   reshSetStatus(taxisP->self, &taxisOps,
                 reshGetStatus(taxisP->self, &taxisOps) & ~RESH_SYNC_BIT);
@@ -1581,6 +1586,7 @@ taxisPack(void * voidP, void * packBuffer, int packBufferSize, int * packBufferP
   intBuffer[idx++] = taxisP->vtime_ub;
   intBuffer[idx++] = taxisP->name ? (int)strlen(taxisP->name) : 0;
   intBuffer[idx++] = taxisP->longname ? (int)strlen(taxisP->longname) : 0;
+  intBuffer[idx++] = taxisP->units ? (int)strlen(taxisP->units) : 0;
 
   serializePack(intBuffer, taxisNint, CDI_DATATYPE_INT,
                 packBuffer, packBufferSize, packBufferPos, context);
@@ -1593,6 +1599,9 @@ taxisPack(void * voidP, void * packBuffer, int packBufferSize, int * packBufferP
   if (taxisP->longname)
     serializePack(taxisP->longname, intBuffer[16], CDI_DATATYPE_TXT,
                   packBuffer, packBufferSize, packBufferPos, context);
+  if (taxisP->units)
+    serializePack(taxisP->units, intBuffer[16], CDI_DATATYPE_TXT,
+                  packBuffer, packBufferSize, packBufferPos, context);
 
 }
 
diff --git a/src/taxis.h b/src/taxis.h
index 7f1f3edbf2a315d937e8e58ffc89d9ee7bc5dc6f..c2ac50ce70cbe61d96c658dea112f17318592af1 100644
--- a/src/taxis.h
+++ b/src/taxis.h
@@ -33,6 +33,7 @@ typedef struct {
   double  fc_period;      // forecast time period
   char   *name;
   char   *longname;
+  char   *units;
 }
 taxis_t;
 
@@ -47,7 +48,8 @@ double   vtime2timeval(int vdate, int vtime, taxis_t *taxis);
 
 void    ptaxisDefDatatype(taxis_t *taxisptr, int datatype);
 void    ptaxisDefName(taxis_t *taxisptr, const char *name);
-void    ptaxisDefLongname(taxis_t *taxisptr, const char *name);
+void    ptaxisDefLongname(taxis_t *taxisptr, const char *longname);
+void    ptaxisDefUnits(taxis_t *taxisptr, const char *units);
 void    taxisDestroyKernel(taxis_t *taxisptr);
 #if !defined (SX)
 extern const resOps taxisOps;
diff --git a/src/util.c b/src/util.c
index 8125f8e024eb4b48357c21dccb1d462ba6c7325a..52fb248cfd20a7d47627117ac4db35428809541b 100644
--- a/src/util.c
+++ b/src/util.c
@@ -19,48 +19,6 @@
 #include "binary.h"
 
 
-void cdiPrintDatatypes(void)
-{
-#define XSTRING(x)	#x
-#define STRING(x)	XSTRING(x)
-  fprintf (stderr, "+-------------+-------+\n"
-           "| types       | bytes |\n"
-           "+-------------+-------+\n"
-           "| void *      |   %3d |\n"
-           "+-------------+-------+\n"
-           "| char        |   %3d |\n"
-           "+-------------+-------+\n"
-           "| bool        |   %3d |\n"
-           "| short       |   %3d |\n"
-           "| int         |   %3d |\n"
-           "| long        |   %3d |\n"
-           "| long long   |   %3d |\n"
-           "| size_t      |   %3d |\n"
-           "| off_t       |   %3d |\n"
-           "+-------------+-------+\n"
-           "| float       |   %3d |\n"
-           "| double      |   %3d |\n"
-           "| long double |   %3d |\n"
-           "+-------------+-------+\n\n"
-           "+-------------+-----------+\n"
-           "| INT32       | %-9s |\n"
-           "| INT64       | %-9s |\n"
-           "| FLT32       | %-9s |\n"
-           "| FLT64       | %-9s |\n"
-           "+-------------+-----------+\n"
-           "\n  byte ordering is %s\n\n",
-           (int) sizeof(void *), (int) sizeof(char), (int) sizeof(bool),
-           (int) sizeof(short), (int) sizeof(int), (int) sizeof(long), (int) sizeof(long long),
-           (int) sizeof(size_t), (int) sizeof(off_t),
-           (int) sizeof(float), (int) sizeof(double), (int) sizeof(long double),
-           STRING(INT32), STRING(INT64), STRING(FLT32), STRING(FLT64),
-           ((HOST_ENDIANNESS == CDI_BIGENDIAN) ? "BIGENDIAN"
-            : ((HOST_ENDIANNESS == CDI_LITTLEENDIAN) ? "LITTLEENDIAN"
-               : "Unhandled endianness!")));
-#undef STRING
-#undef XSTRING
-}
-
 static const char uuidFmt[] = "%02hhx%02hhx%02hhx%02hhx-"
   "%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-"
   "%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx";
@@ -198,8 +156,8 @@ void cdiCreateUUID(unsigned char *uuid)
 void cdiCreateUUID(unsigned char *uuid)
 {
   static int uuid_seeded = 0;
-  static char uuid_rand_state[31 * sizeof (long)];
 #ifndef _SX
+  static char uuid_rand_state[31 * sizeof (long)];
   char *caller_rand_state;
   if (uuid_seeded)
     caller_rand_state = setstate(uuid_rand_state);
@@ -220,6 +178,27 @@ void cdiCreateUUID(unsigned char *uuid)
   for (size_t i = 0; i < CDI_UUID_SIZE; ++i)
     uuid[i] = (unsigned char)random();
 #else
+  unsigned short caller_rand_state[3];
+  {
+    static unsigned short our_rand_state[3];
+    if (!uuid_seeded)
+      {
+        struct timeval tv;
+        int status = gettimeofday(&tv, NULL);
+        if (status != 0)
+          {
+            perror("failed seed generation!");
+            exit(1);
+          }
+        unsigned seed = tv.tv_sec ^ tv.tv_usec;
+        our_rand_state[0] = 0x330E;
+        our_rand_state[1] = (unsigned short)(seed & 0xFFFFU);
+        our_rand_state[2] = (unsigned short)((seed >> 16) & 0xFFFFU);
+      }
+    unsigned short *p = seed48(our_rand_state);
+    uuid_seeded = 1;
+    memcpy(caller_rand_state, p, sizeof (caller_rand_state));
+  }
   for (size_t i = 0; i < CDI_UUID_SIZE; ++i)
     uuid[i] = (unsigned char)lrand48();
 #endif
@@ -229,6 +208,8 @@ void cdiCreateUUID(unsigned char *uuid)
   uuid[7] = (unsigned char)((uuid[7] & 0x0f) | (4 << 4));
 #ifndef _SX
   setstate(caller_rand_state);
+#else
+  seed48(caller_rand_state);
 #endif
 }
 #endif
diff --git a/src/varscan.c b/src/varscan.c
index 810bc3d2be0b0903a1aec343c42cc2d006bbc939..e1749679991f72977734a0f55c9d141bd2a6036d 100644
--- a/src/varscan.c
+++ b/src/varscan.c
@@ -91,12 +91,12 @@ vartable_t;
 
 static vartable_t *vartable;
 static unsigned varTablesize = 0;
-static unsigned nvars = 0;
+static unsigned varTableUsed = 0;
 
 static
 void paramInitEntry(unsigned varID, int param)
 {
-  vartable[varID].varID          = varID;
+  vartable[varID].varID          = (int)varID;
   vartable[varID].param          = param;
   vartable[varID].prec           = 0;
   vartable[varID].tsteptype      = TSTEP_INSTANT;
@@ -171,7 +171,7 @@ void varFree(void)
 {
   if ( CDI_Debug ) Message("call to varFree");
 
-  for ( unsigned varID = 0; varID < nvars; varID++ )
+  for ( size_t varID = 0; varID < varTableUsed; varID++ )
     {
       if ( vartable[varID].recordTable )
         {
@@ -205,7 +205,7 @@ void varFree(void)
 
   vartable = NULL;
   varTablesize = 0;
-  nvars = 0;
+  varTableUsed = 0;
 
   if ( Vct )
     Free(Vct);
@@ -369,7 +369,7 @@ paramNewEntry(int param)
     {
       vartable = (vartable_t *) Realloc(vartable, (size_t)(varTablesize *= 2)
                                         * sizeof (vartable_t));
-      for ( unsigned i = varID; i < varTablesize; i++ )
+      for ( size_t i = varID; i < varTablesize; i++ )
         {
           vartable[i].param = UNDEF_PARAM;
           vartable[i].opt_grib_kvpair      = NULL;
@@ -433,7 +433,7 @@ void varAddRecord(int recID, int param, int gridID, int zaxistype, int lbounds,
 
   if ( varID == (unsigned) CDI_UNDEFID )
     {
-      nvars++;
+      varTableUsed++;
       varID = paramNewEntry(param);
       vartable[varID].gridID     = gridID;
       vartable[varID].zaxistype  = zaxistype;
@@ -581,21 +581,21 @@ void cdi_generate_vars(stream_t *streamptr)
   char name[CDI_MAX_NAME], longname[CDI_MAX_NAME], units[CDI_MAX_NAME];
   int vlistID = streamptr->vlistID;
 
-  int *varids = (int *) Malloc(nvars*sizeof(int));
-  for ( unsigned varID = 0; varID < nvars; varID++ ) varids[varID] = (int)varID;
+  int *varids = (int *) Malloc(varTableUsed*sizeof(int));
+  for ( size_t varID = 0; varID < varTableUsed; varID++ ) varids[varID] = (int)varID;
   /*
   if ( streamptr->sortparam )
     {
-      struct paraminfo *varInfo = (struct paraminfo *) Malloc((size_t)nvars * sizeof(struct paraminfo));
+      struct paraminfo *varInfo = (struct paraminfo *) Malloc((size_t)varTableUsed * sizeof(struct paraminfo));
 
-      for ( unsigned varID = 0; varID < nvars; varID++ )
+      for ( unsigned varID = 0; varID < varTableUsed; varID++ )
 	{
 	  varInfo[varID].varid = varids[varID];
 	  varInfo[varID].param = vartable[varID].param;
 	  varInfo[varID].ltype = vartable[varID].ltype1;
 	}
-      qsort(varInfo, (size_t)nvars, sizeof(struct paraminfo), cmp_param);
-      for ( unsigned varID = 0; varID < nvars; varID++ )
+      qsort(varInfo, (size_t)varTableUsed, sizeof(struct paraminfo), cmp_param);
+      for ( unsigned varID = 0; varID < varTableUsed; varID++ )
 	{
 	  varids[varID] = varInfo[varID].varid;
 	}
@@ -604,10 +604,10 @@ void cdi_generate_vars(stream_t *streamptr)
 
   if ( streamptr->sortname )
     {
-      qsort(vartable, (size_t)nvars, sizeof(vartable_t), cmp_varname);
+      qsort(vartable, (size_t)varTableUsed, sizeof(vartable_t), cmp_varname);
     }
   */
-  for ( unsigned index = 0; index < nvars; index++ )
+  for ( size_t index = 0; index < varTableUsed; index++ )
     {
       int varid      = varids[index];
 
@@ -830,7 +830,7 @@ void cdi_generate_vars(stream_t *streamptr)
       if ( tableID != CDI_UNDEFID ) vlistDefVarTable(vlistID, varID, tableID);
     }
 
-  for ( unsigned index = 0; index < nvars; index++ )
+  for ( size_t index = 0; index < varTableUsed; index++ )
     {
       int varid = varids[index];
       unsigned nlevels = vartable[varid].recordTable[0].nlevels;
diff --git a/src/vlist.h b/src/vlist.h
index 0b633a7b1b8baac84da13544d9232bc4f229fcec..bcba36065c4ef918deab00832b9c794612752a7c 100644
--- a/src/vlist.h
+++ b/src/vlist.h
@@ -5,7 +5,7 @@
 #include "config.h"
 #endif
 
-#ifndef  _ERROR_H
+#ifndef  ERROR_H
 #include "error.h"
 #endif
 
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 1e41e342b627643057655f43938bced46eb9958e..fdc9c1d559cfc94c35dad37a48a90e29434954bb 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -127,6 +127,7 @@ am__aclocal_m4_deps =  \
 	$(top_srcdir)/m4/acx_lt_problems.m4 \
 	$(top_srcdir)/m4/acx_option_search_libs.m4 \
 	$(top_srcdir)/m4/acx_options.m4 \
+	$(top_srcdir)/m4/acx_prog_cc_posix.m4 \
 	$(top_srcdir)/m4/acx_sl_fc_mod_path_flag.m4 \
 	$(top_srcdir)/m4/acx_sl_mod_suffix.m4 \
 	$(top_srcdir)/m4/asx_tr_arg.m4 $(top_srcdir)/m4/asx_unset.m4 \
diff --git a/tests/pio_write.c b/tests/pio_write.c
index 9d5af8f3271ee3dc7c4558b46fb81d2f37fb0e4e..3f194f0f4e84598f8b3032b64ec2b5be966a00d3 100644
--- a/tests/pio_write.c
+++ b/tests/pio_write.c
@@ -100,6 +100,10 @@ parse_long_option(struct model_config *restrict setup,
                   int pioConfHandle, pioRoleFunc *pioRoleAssign,
                   const char *str)
 {
+#ifndef USE_MPI
+  (void)pioConfHandle;
+  (void)pioRoleAssign;
+#endif
   static const char cacheRedistStr[] = "cache-redists",
     pioRoleSchemeOptionStr[] = "pio-role-scheme",
     uuidCreateOptionStr[] = "no-create-uuid";
diff --git a/tests/simple_model.c b/tests/simple_model.c
index 3f6bed378c40ace07b3b9e20fe86f0104d3c2f61..4753858b634491d1388c652a397ad8152fc5f159 100644
--- a/tests/simple_model.c
+++ b/tests/simple_model.c
@@ -281,7 +281,7 @@ modelRun(struct model_config setup, MPI_Comm comm)
                       for (size_t i = 1; i < (size_t)comm_size; ++i)
                         displs[i] = displs[i - 1] + chunks[i - 1];
                     }
-                  xmpi(MPI_Gatherv(varslice, (size_t)chunkSize, MPI_DOUBLE,
+                  xmpi(MPI_Gatherv(varslice, chunk, MPI_DOUBLE,
                                    var, chunks, displs, MPI_DOUBLE, 0, comm));
 #else
                   var = varslice;
@@ -321,14 +321,13 @@ modelRun(struct model_config setup, MPI_Comm comm)
               }
             for (size_t i = 0; i < (size_t)nVars; ++i)
               {
-                uint32_t cksum;
-                int code;
-                cksum = memcrc_finish(&varDesc[i].checksum_state,
-                                      (off_t)((varDesc[i].size
-                                               * sizeof (var[0])
-                                               + sizeof (int) * 2)
-                                              * (size_t)setup.nts));
-                code = vlistInqVarCode(vlistID, varDesc[i].id);
+                uint32_t cksum
+                  = memcrc_finish(&varDesc[i].checksum_state,
+                                  (off_t)((varDesc[i].size
+                                           * sizeof (var[0])
+                                           + sizeof (int) * 2)
+                                          * (size_t)setup.nts));
+                int code = vlistInqVarCode(vlistID, varDesc[i].id);
                 if (fprintf(tablefp, "%08lx %d\n", (unsigned long)cksum,
                             code) < 0)
                   {
diff --git a/tests/stream_cksum.c b/tests/stream_cksum.c
index 93baaa43aef6f9d01053cb5a05daf91f9c6fb50f..4f8e458e208034713c367b7fbc1535469da5ac83 100644
--- a/tests/stream_cksum.c
+++ b/tests/stream_cksum.c
@@ -2,6 +2,7 @@
 #  include "config.h"
 #endif
 
+#include <stdbool.h>
 #include <stdio.h>
 
 #include "cdi.h"
@@ -9,25 +10,30 @@
 #include "stream_cksum.h"
 #include "dmemory.h"
 
+const char *zaxisNamePtr(int zaxistype);
+
 struct cksum_table *
 cksum_stream(const char *fname, size_t *table_len)
 {
-  int taxisID, vlistID, streamID;
-  int nvars, ngrids, nzaxis;
-  int i;
+  int nvars;
   uint32_t *checksum_state = NULL;
-  struct var_size_t
+  enum directionZ {
+    DIRECTION_DOWN=1, DIRECTION_NONE, DIRECTION_UP
+  };
+  struct var_desc_t
   {
     int x, y, z;
+    enum directionZ zDirection;
+    int code;
     size_t chars;
-  } *varSize = NULL;
+  } *varDesc = NULL;
   size_t var_size_max_chars = 0;
   double *buf = NULL;
   struct cksum_table *file_vars = NULL;
 
   do {
     // Open the dataset
-    streamID = streamOpenRead(fname);
+    int streamID = streamOpenRead(fname);
     if ( streamID < 0 )
       {
         fprintf(stderr, "Cannot open data input file %s: %s\n",
@@ -37,11 +43,13 @@ cksum_stream(const char *fname, size_t *table_len)
       }
 
     // Get the variable list of the dataset
-    vlistID = streamInqVlist(streamID);
-
+    int vlistID = streamInqVlist(streamID);
+    int fileType = streamInqFiletype(streamID);
+    bool isLegacyFile = fileType == CDI_FILETYPE_SRV
+      || fileType == CDI_FILETYPE_EXT;
     nvars = vlistNvars(vlistID);
-    ngrids = vlistNgrids(vlistID);
-    nzaxis = vlistNzaxis(vlistID);
+    int ngrids = vlistNgrids(vlistID);
+    int nzaxis = vlistNzaxis(vlistID);
     if (nzaxis < 0 || ngrids < 0)
       {
         fprintf(stderr, "Error in grid/zaxis count query %d:%d\n",
@@ -50,58 +58,97 @@ cksum_stream(const char *fname, size_t *table_len)
         break;
       }
     checksum_state = (uint32_t *) Calloc((size_t)nvars, sizeof (checksum_state[0]));
-    varSize = (struct var_size_t *)malloc((size_t)nvars * sizeof (varSize[0]));
+    varDesc = (struct var_desc_t *)malloc((size_t)nvars * sizeof (varDesc[0]));
 
-    for (i = 0; i < nvars; ++i)
+    for (int varIdx = 0; varIdx < nvars; ++varIdx)
       {
-        int grid = vlistInqVarGrid(vlistID, i), gridType;
-        int zaxis = vlistInqVarZaxis(vlistID, i);
-        if (grid == CDI_UNDEFID || zaxis == CDI_UNDEFID)
+        int grid = vlistInqVarGrid(vlistID, varIdx), gridType,
+          varCode = vlistInqVarCode(vlistID, varIdx);
+        varDesc[varIdx].code = varCode;
+        int zaxisID = vlistInqVarZaxis(vlistID, varIdx);
+        if (grid == CDI_UNDEFID || zaxisID == CDI_UNDEFID)
           {
             fputs("error in axis/grid inquiry\n", stderr);
             nvars = -1;
             break;
           }
-      if ((varSize[i].z = zaxisInqSize(zaxis)) <= 0)
-        {
-          fputs("invalid Z-axis found\n", stderr);
-          nvars = -1;
-          break;
-        }
-      if ((gridType = gridInqType(grid)) != GRID_LONLAT
-          && gridType != GRID_GENERIC)
-        {
-          fprintf(stderr, "unexpected non-lonlat grid found: %d\n",
-                  gridType);
-          nvars = -1;
-          break;
-        }
-      if ((varSize[i].x = gridInqXsize(grid)) < 0)
-        {
-          fprintf(stderr, "invalid X-size found: %d\n", varSize[i].x);
-          nvars = -1;
-          break;
-        }
-      if (varSize[i].x == 0) varSize[i].x = 1;
-      if ((varSize[i].y = gridInqYsize(grid)) < 0)
-        {
-          fprintf(stderr, "invalid Y-size found: %d\n", varSize[i].y);
-          nvars = -1;
+        int zSize;
+        if ((zSize = varDesc[varIdx].z = zaxisInqSize(zaxisID)) <= 0)
+          {
+            fputs("invalid Z-axis found\n", stderr);
+            nvars = -1;
+            break;
+          }
+        if (isLegacyFile)
+          varDesc[varIdx].zDirection = DIRECTION_NONE;
+        else if (zSize > 1)
+          {
+            double lev[2];
+            for (int levIdx = 0; levIdx < 2; ++levIdx)
+              lev[levIdx] = zaxisInqLevel(zaxisID, levIdx);
+            int zaxistype = zaxisInqType(zaxisID);
+            switch (zaxistype)
+              {
+              case ZAXIS_PRESSURE:
+                if (lev[0] < lev[1])
+                  varDesc[varIdx].zDirection = DIRECTION_DOWN;
+                else if (lev[1] < lev[0])
+                  varDesc[varIdx].zDirection = DIRECTION_UP;
+                else
+                  {
+                    fprintf(stderr,
+                            "unexpected level ordering on z-Axis for variable"
+                            " code %d found: lev[0]=%g, lev[1]=%g\n",
+                            varCode, lev[0], lev[1]);
+                    nvars = -1;
+                  }
+                break;
+              default:
+                fprintf(stderr, "unexpected type of z-Axis for variable"
+                        " code %d found: %s\n",
+                        varCode, zaxisNamePtr(zaxistype));
+                nvars = -1;
+              }
+          }
+        else
+          varDesc[varIdx].zDirection = DIRECTION_NONE;
+        if (nvars == -1)
           break;
-        }
-      if (varSize[i].y == 0) varSize[i].y = 1;
-      varSize[i].chars = (size_t)varSize[i].x * (size_t)varSize[i].y
-        * (size_t)varSize[i].z * sizeof (buf[0]);
-      if (var_size_max_chars < varSize[i].chars)
-        var_size_max_chars = varSize[i].chars;
-    }
+        if ((gridType = gridInqType(grid)) != GRID_LONLAT
+            && gridType != GRID_GENERIC)
+          {
+            fprintf(stderr, "unexpected non-lonlat grid found: %d\n",
+                    gridType);
+            nvars = -1;
+            break;
+          }
+        if ((varDesc[varIdx].x = gridInqXsize(grid)) < 0)
+          {
+            fprintf(stderr, "invalid X-size found: %d\n", varDesc[varIdx].x);
+            nvars = -1;
+            break;
+          }
+        if (varDesc[varIdx].x == 0) varDesc[varIdx].x = 1;
+        if ((varDesc[varIdx].y = gridInqYsize(grid)) < 0)
+          {
+            fprintf(stderr, "invalid Y-size found: %d\n", varDesc[varIdx].y);
+            nvars = -1;
+            break;
+          }
+        if (varDesc[varIdx].y == 0) varDesc[varIdx].y = 1;
+        varDesc[varIdx].chars
+        = (size_t)varDesc[varIdx].x * (size_t)varDesc[varIdx].y
+        * (size_t)varDesc[varIdx].z * sizeof (buf[0]);
+        if (var_size_max_chars < varDesc[varIdx].chars)
+          var_size_max_chars = varDesc[varIdx].chars;
+      }
     buf = (double*)malloc(var_size_max_chars);
 
     if (nvars == -1)
       break;
 
     // Get the Time axis from the variable list
-    taxisID = vlistInqTaxis(vlistID);
+    int taxisID = vlistInqTaxis(vlistID);
 
     int tsID = 0;
     // Inquire the time step
@@ -110,24 +157,39 @@ cksum_stream(const char *fname, size_t *table_len)
         // Get the verification date and time
         int vdatetime[2] = { taxisInqVtime(taxisID), taxisInqVdate(taxisID) };
         // Read var1 and var2
-        for (i = 0; i < nvars; ++i)
+        for (int varIdx = 0; varIdx < nvars; ++varIdx)
           {
             int nmiss;
-            streamReadVar(streamID, i, buf, &nmiss);
-            memcrc_r(checksum_state + i, (const unsigned char *)vdatetime, sizeof (vdatetime));
-            memcrc_r(checksum_state + i, (const unsigned char *)buf,
-                     varSize[i].chars);
+            streamReadVar(streamID, varIdx, buf, &nmiss);
+            memcrc_r(checksum_state + varIdx, (const unsigned char *)vdatetime,
+                     sizeof (vdatetime));
+            if (varDesc[varIdx].zDirection == DIRECTION_UP
+                || varDesc[varIdx].zDirection == DIRECTION_NONE)
+              memcrc_r(checksum_state + varIdx, (const unsigned char *)buf,
+                       varDesc[varIdx].chars);
+            else
+              {
+                size_t nlev = (size_t)varDesc[varIdx].z,
+                  charsPerLev = (size_t)varDesc[varIdx].x
+                  * (size_t)varDesc[varIdx].y * sizeof (buf[0]);
+                for (size_t lev = 0; lev < nlev; ++lev)
+                  memcrc_r(checksum_state + varIdx,
+                           (const unsigned char *)buf + (nlev - lev - 1)
+                           * charsPerLev, charsPerLev);
+              }
           }
         ++tsID;
       }
 
-    file_vars = (struct cksum_table *)malloc((size_t)nvars * sizeof (file_vars[0]));
-    for (i = 0; i < nvars; ++i)
+    file_vars = (struct cksum_table *)malloc((size_t)nvars
+                                             * sizeof (file_vars[0]));
+    for (int varIdx = 0; varIdx < nvars; ++varIdx)
       {
-        file_vars[i].code = vlistInqVarCode(vlistID, i);
-        file_vars[i].cksum
-          = memcrc_finish(checksum_state + i,
-                          (off_t)((varSize[i].chars + sizeof (int) * 2) * (size_t)tsID));
+        file_vars[varIdx].code = varDesc[varIdx].code;
+        file_vars[varIdx].cksum
+          = memcrc_finish(checksum_state + varIdx,
+                          (off_t)((varDesc[varIdx].chars + sizeof (int) * 2)
+                                  * (size_t)tsID));
       }
     // Close the input stream
     streamClose(streamID);
@@ -136,10 +198,19 @@ cksum_stream(const char *fname, size_t *table_len)
 
   // free resources
   free(checksum_state);
-  free(varSize);
+  free(varDesc);
   free(buf);
   *table_len = (size_t)nvars;
 
   return file_vars;
 }
 
+/*
+ * Local Variables:
+ * c-file-style: "Java"
+ * c-basic-offset: 2
+ * indent-tabs-mode: nil
+ * show-trailing-whitespace: t
+ * require-trailing-newline: t
+ * End:
+ */