diff --git a/ChangeLog b/ChangeLog
index 9d6d897ed942e4f2a574458102ed036e78d91b2c..51506e8dfb7f141baa6aef5e804cc913727f85ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
 
 2019-04-15  Uwe Schulzweida
 
+	* Removed funtion gridPrint()
 	* Removed funtion zaxisPrint()
 
 2019-04-01  Uwe Schulzweida
diff --git a/doc/tex/c_quick_ref.tex b/doc/tex/c_quick_ref.tex
index e467cb0b48a809741c6fd1049a8ad37d85ef708c..dbcc180016788612ae6b97f41534dfd8456a8f3a 100644
--- a/doc/tex/c_quick_ref.tex
+++ b/doc/tex/c_quick_ref.tex
@@ -1,8 +1,7 @@
 \chapter*{Quick Reference}
 \addcontentsline{toc}{chapter}{Quick Reference}
 
-This appendix provide a brief listing of the C language bindings of the
-CDI library routines:
+This appendix provide a brief listing of the C language bindings of the CDI library routines:
 
 \section*{\tt \htmlref{cdiClearAdditionalKeys}{cdiClearAdditionalKeys}}
 
@@ -10,7 +9,7 @@ CDI library routines:
     void cdiClearAdditionalKeys ();
 \end{verbatim}
 
-Clear the list of additional GRIB keys..
+Clear the list of additional GRIB keys.
 
 
 \section*{\tt \htmlref{cdiDefAdditionalKey}{cdiDefAdditionalKey}}
@@ -19,7 +18,7 @@ Clear the list of additional GRIB keys..
     void cdiDefAdditionalKey (const char *string);
 \end{verbatim}
 
-Register an additional GRIB key which is read when file is opened..
+Register an additional GRIB key which is read when file is opened.
 
 
 \section*{\tt \htmlref{cdiDefAttFlt}{cdiDefAttFlt}}
@@ -52,6 +51,42 @@ Define an integer attribute.
 Define a text attribute.
 
 
+\section*{\tt \htmlref{cdiDefKeyInt}{cdiDefKeyInt}}
+
+\begin{verbatim}
+    int cdiDefKeyInt (int cdiID, int varID, int key, int value);
+\end{verbatim}
+
+Define an integer value from a key of a CDI variable.
+
+
+\section*{\tt \htmlref{cdiDefKeyString}{cdiDefKeyString}}
+
+\begin{verbatim}
+    int cdiDefKeyString (int cdiID, int varID, int key, const char *string);
+\end{verbatim}
+
+Define a string value from a key of a CDI variable.
+
+
+\section*{\tt \htmlref{cdiGridDefKeyStr}{cdiGridDefKeyStr}}
+
+\begin{verbatim}
+    int cdiGridDefKeyStr (int gridID, int key, int size, const char *mesg);
+\end{verbatim}
+
+Define a CDI grid string value from a key.
+
+
+\section*{\tt \htmlref{cdiGridInqKeyStr}{cdiGridInqKeyStr}}
+
+\begin{verbatim}
+    int cdiGridInqKeyStr (int gridID, int key, int size, char *mesg);
+\end{verbatim}
+
+Get a CDI grid string value from a key.
+
+
 \section*{\tt \htmlref{cdiInqAtt}{cdiInqAtt}}
 
 \begin{verbatim}
@@ -90,6 +125,33 @@ Get the value(s) of an integer attribute.
 Get the value(s) of a text attribute.
 
 
+\section*{\tt \htmlref{cdiInqKeyInt}{cdiInqKeyInt}}
+
+\begin{verbatim}
+    int cdiInqKeyInt (int cdiID, int varID, int key, int *value);
+\end{verbatim}
+
+Get an integer value from a key of a CDI variable.
+
+
+\section*{\tt \htmlref{cdiInqKeyLen}{cdiInqKeyLen}}
+
+\begin{verbatim}
+    int cdiInqKeyLen (int cdiID, int varID, int key, int *length);
+\end{verbatim}
+
+Get the length of the string representation of the key.
+
+
+\section*{\tt \htmlref{cdiInqKeyString}{cdiInqKeyString}}
+
+\begin{verbatim}
+    int cdiInqKeyString (int cdiID, int varID, int key, char *string, int *length);
+\end{verbatim}
+
+Get a string value from a key of a CDI variable.
+
+
 \section*{\tt \htmlref{cdiInqNatts}{cdiInqNatts}}
 
 \begin{verbatim}
@@ -99,6 +161,42 @@ Get the value(s) of a text attribute.
 Get number of attributes assigned to this variable.
 
 
+\section*{\tt \htmlref{cdiZaxisDefKeyFlt}{cdiZaxisDefKeyFlt}}
+
+\begin{verbatim}
+    int cdiZaxisDefKeyFlt (int zaxisID, int key, double value);
+\end{verbatim}
+
+Define a CDI Z-axis floating point value from a key.
+
+
+\section*{\tt \htmlref{cdiZaxisDefKeyStr}{cdiZaxisDefKeyStr}}
+
+\begin{verbatim}
+    int cdiZaxisDefKeyStr (int zaxisID, int key, int size, const char *mesg);
+\end{verbatim}
+
+Define a CDI Z-axis string value from a key.
+
+
+\section*{\tt \htmlref{cdiZaxisInqKeyFlt}{cdiZaxisInqKeyFlt}}
+
+\begin{verbatim}
+    int cdiZaxisInqKeyFlt (int zaxisID, int key, double *value);
+\end{verbatim}
+
+Get a CDI Z-axis floating point value from a key.
+
+
+\section*{\tt \htmlref{cdiZaxisInqKeyStr}{cdiZaxisInqKeyStr}}
+
+\begin{verbatim}
+    int cdiZaxisInqKeyStr (int zaxisID, int key, int size, char *mesg);
+\end{verbatim}
+
+Get a CDI Z-axis string value from a key.
+
+
 \section*{\tt \htmlref{gridCreate}{gridCreate}}
 
 \begin{verbatim}
@@ -755,7 +853,7 @@ Create a variable subtype.
     void subtypeDefActiveIndex (int subtypeID, int index);
 \end{verbatim}
 
-Set the currently active index of a subtype (e.g. current tile index)..
+Set the currently active index of a subtype (e.g. current tile index).
 
 
 \section*{\tt \htmlref{subtypeInqActiveIndex}{subtypeInqActiveIndex}}
@@ -764,7 +862,7 @@ Set the currently active index of a subtype (e.g. current tile index)..
     int subtypeInqActiveIndex (int subtypeID);
 \end{verbatim}
 
-Get the currently active index of a subtype (e.g. current tile index)..
+Get the currently active index of a subtype (e.g. current tile index).
 
 
 \section*{\tt \htmlref{subtypeInqAttribute}{subtypeInqAttribute}}
@@ -783,7 +881,7 @@ Inquire the value of a subtype attribute. Returns CDI_EINVAL if the attribute do
     int subtypeInqSize (int subtypeID);
 \end{verbatim}
 
-Get the size of a subtype (e.g. no. of tiles)..
+Get the size of a subtype (e.g. no. of tiles).
 
 
 \section*{\tt \htmlref{subtypeInqTile}{subtypeInqTile}}
@@ -792,7 +890,7 @@ Get the size of a subtype (e.g. no. of tiles)..
     int subtypeInqTile (int subtypeID, int tileindex, int attribute);
 \end{verbatim}
 
-Specialized version of subtypeInqSubEntry looking for tile/attribute pair..
+Specialized version of subtypeInqSubEntry looking for tile/attribute pair.
 
 
 \section*{\tt \htmlref{tableRead}{tableRead}}
@@ -1153,7 +1251,7 @@ Duplicate a variable list.
     int vlistHasVarKey (int vlistID, int varID, const char *name);
 \end{verbatim}
 
-returns 1 if meta-data key was read, 0 otherwise..
+returns 1 if meta-data key was read, 0 otherwise.
 
 
 \section*{\tt \htmlref{vlistInqTaxis}{vlistInqTaxis}}
@@ -1261,7 +1359,7 @@ Get the standard name of a Variable.
     int vlistInqVarSubtype (int vlistID, int varID);
 \end{verbatim}
 
-Return subtype ID for a given variable..
+Return subtype ID for a given variable.
 
 
 \section*{\tt \htmlref{vlistInqVarTsteptype}{vlistInqVarTsteptype}}
diff --git a/doc/tex/f_quick_ref.tex b/doc/tex/f_quick_ref.tex
index 662eadf1143513d25dd37eb83fb376d755407601..7935653a2a986d6a3798abb4a2e2fe37b76fafe9 100644
--- a/doc/tex/f_quick_ref.tex
+++ b/doc/tex/f_quick_ref.tex
@@ -1,8 +1,7 @@
 \chapter*{Quick Reference}
 \addcontentsline{toc}{chapter}{Quick Reference}
 
-This appendix provide a brief listing of the Fortran language bindings of the
-CDI library routines:
+This appendix provide a brief listing of the Fortran language bindings of the CDI library routines:
 
 \section*{\tt \htmlref{cdiClearAdditionalKeys}{cdiClearAdditionalKeys}}
 
@@ -10,7 +9,7 @@ CDI library routines:
     SUBROUTINE cdiClearAdditionalKeys
 \end{verbatim}
 
-Clear the list of additional GRIB keys..
+Clear the list of additional GRIB keys.
 
 
 \section*{\tt \htmlref{cdiDefAdditionalKey}{cdiDefAdditionalKey}}
@@ -19,7 +18,7 @@ Clear the list of additional GRIB keys..
     SUBROUTINE cdiDefAdditionalKey (CHARACTER*(*) string)
 \end{verbatim}
 
-Register an additional GRIB key which is read when file is opened..
+Register an additional GRIB key which is read when file is opened.
 
 
 \section*{\tt \htmlref{cdiDefAttFlt}{cdiDefAttFlt}}
@@ -52,6 +51,46 @@ Define an integer attribute.
 Define a text attribute.
 
 
+\section*{\tt \htmlref{cdiDefKeyInt}{cdiDefKeyInt}}
+
+\begin{verbatim}
+    INTEGER FUNCTION cdiDefKeyInt (INTEGER cdiID, INTEGER varID, INTEGER key,
+                                   INTEGER value)
+\end{verbatim}
+
+Define an integer value from a key of a CDI variable.
+
+
+\section*{\tt \htmlref{cdiDefKeyString}{cdiDefKeyString}}
+
+\begin{verbatim}
+    INTEGER FUNCTION cdiDefKeyString (INTEGER cdiID, INTEGER varID, INTEGER key,
+                                      CHARACTER*(*) string)
+\end{verbatim}
+
+Define a string value from a key of a CDI variable.
+
+
+\section*{\tt \htmlref{cdiGridDefKeyStr}{cdiGridDefKeyStr}}
+
+\begin{verbatim}
+    INTEGER FUNCTION cdiGridDefKeyStr (INTEGER gridID, INTEGER key, INTEGER size,
+                                       CHARACTER*(*) mesg)
+\end{verbatim}
+
+Define a CDI grid string value from a key.
+
+
+\section*{\tt \htmlref{cdiGridInqKeyStr}{cdiGridInqKeyStr}}
+
+\begin{verbatim}
+    INTEGER FUNCTION cdiGridInqKeyStr (INTEGER gridID, INTEGER key, INTEGER size,
+                                       CHARACTER*(*) mesg)
+\end{verbatim}
+
+Get a CDI grid string value from a key.
+
+
 \section*{\tt \htmlref{cdiInqAtt}{cdiInqAtt}}
 
 \begin{verbatim}
@@ -92,6 +131,36 @@ Get the value(s) of an integer attribute.
 Get the value(s) of a text attribute.
 
 
+\section*{\tt \htmlref{cdiInqKeyInt}{cdiInqKeyInt}}
+
+\begin{verbatim}
+    INTEGER FUNCTION cdiInqKeyInt (INTEGER cdiID, INTEGER varID, INTEGER key,
+                                   INTEGER value)
+\end{verbatim}
+
+Get an integer value from a key of a CDI variable.
+
+
+\section*{\tt \htmlref{cdiInqKeyLen}{cdiInqKeyLen}}
+
+\begin{verbatim}
+    INTEGER FUNCTION cdiInqKeyLen (INTEGER cdiID, INTEGER varID, INTEGER key,
+                                   INTEGER length)
+\end{verbatim}
+
+Get the length of the string representation of the key.
+
+
+\section*{\tt \htmlref{cdiInqKeyString}{cdiInqKeyString}}
+
+\begin{verbatim}
+    INTEGER FUNCTION cdiInqKeyString (INTEGER cdiID, INTEGER varID, INTEGER key,
+                                      CHARACTER*(*) string, INTEGER length)
+\end{verbatim}
+
+Get a string value from a key of a CDI variable.
+
+
 \section*{\tt \htmlref{cdiInqNatts}{cdiInqNatts}}
 
 \begin{verbatim}
@@ -101,6 +170,46 @@ Get the value(s) of a text attribute.
 Get number of attributes assigned to this variable.
 
 
+\section*{\tt \htmlref{cdiZaxisDefKeyFlt}{cdiZaxisDefKeyFlt}}
+
+\begin{verbatim}
+    INTEGER FUNCTION cdiZaxisDefKeyFlt (INTEGER zaxisID, INTEGER key,
+                                        DOUBLEPRECISION value)
+\end{verbatim}
+
+Define a CDI Z-axis floating point value from a key.
+
+
+\section*{\tt \htmlref{cdiZaxisDefKeyStr}{cdiZaxisDefKeyStr}}
+
+\begin{verbatim}
+    INTEGER FUNCTION cdiZaxisDefKeyStr (INTEGER zaxisID, INTEGER key, INTEGER size,
+                                        CHARACTER*(*) mesg)
+\end{verbatim}
+
+Define a CDI Z-axis string value from a key.
+
+
+\section*{\tt \htmlref{cdiZaxisInqKeyFlt}{cdiZaxisInqKeyFlt}}
+
+\begin{verbatim}
+    INTEGER FUNCTION cdiZaxisInqKeyFlt (INTEGER zaxisID, INTEGER key,
+                                        DOUBLEPRECISION value)
+\end{verbatim}
+
+Get a CDI Z-axis floating point value from a key.
+
+
+\section*{\tt \htmlref{cdiZaxisInqKeyStr}{cdiZaxisInqKeyStr}}
+
+\begin{verbatim}
+    INTEGER FUNCTION cdiZaxisInqKeyStr (INTEGER zaxisID, INTEGER key, INTEGER size,
+                                        CHARACTER*(*) mesg)
+\end{verbatim}
+
+Get a CDI Z-axis string value from a key.
+
+
 \section*{\tt \htmlref{gridCreate}{gridCreate}}
 
 \begin{verbatim}
@@ -759,7 +868,7 @@ Create a variable subtype.
     SUBROUTINE subtypeDefActiveIndex (INTEGER subtypeID, INTEGER index)
 \end{verbatim}
 
-Set the currently active index of a subtype (e.g. current tile index)..
+Set the currently active index of a subtype (e.g. current tile index).
 
 
 \section*{\tt \htmlref{subtypeInqActiveIndex}{subtypeInqActiveIndex}}
@@ -768,7 +877,7 @@ Set the currently active index of a subtype (e.g. current tile index)..
     INTEGER FUNCTION subtypeInqActiveIndex (INTEGER subtypeID)
 \end{verbatim}
 
-Get the currently active index of a subtype (e.g. current tile index)..
+Get the currently active index of a subtype (e.g. current tile index).
 
 
 \section*{\tt \htmlref{subtypeInqAttribute}{subtypeInqAttribute}}
@@ -787,7 +896,7 @@ Inquire the value of a subtype attribute. Returns CDI_EINVAL if the attribute do
     INTEGER FUNCTION subtypeInqSize (INTEGER subtypeID)
 \end{verbatim}
 
-Get the size of a subtype (e.g. no. of tiles)..
+Get the size of a subtype (e.g. no. of tiles).
 
 
 \section*{\tt \htmlref{subtypeInqTile}{subtypeInqTile}}
@@ -797,7 +906,7 @@ Get the size of a subtype (e.g. no. of tiles)..
                                      INTEGER attribute)
 \end{verbatim}
 
-Specialized version of subtypeInqSubEntry looking for tile/attribute pair..
+Specialized version of subtypeInqSubEntry looking for tile/attribute pair.
 
 
 \section*{\tt \htmlref{tableRead}{tableRead}}
@@ -1166,7 +1275,7 @@ Duplicate a variable list.
                                      CHARACTER*(*) name)
 \end{verbatim}
 
-returns 1 if meta-data key was read, 0 otherwise..
+returns 1 if meta-data key was read, 0 otherwise.
 
 
 \section*{\tt \htmlref{vlistInqTaxis}{vlistInqTaxis}}
@@ -1278,7 +1387,7 @@ Get the standard name of a Variable.
     INTEGER FUNCTION vlistInqVarSubtype (INTEGER vlistID, INTEGER varID)
 \end{verbatim}
 
-Return subtype ID for a given variable..
+Return subtype ID for a given variable.
 
 
 \section*{\tt \htmlref{vlistInqVarTsteptype}{vlistInqVarTsteptype}}
diff --git a/src/cdi.h b/src/cdi.h
index 54a0115a37f5d988d7959a2a8802d6afbbb11d9b..9b51a234983a0b086d6bf648d0cc1389a5cc2b4f 100644
--- a/src/cdi.h
+++ b/src/cdi.h
@@ -655,9 +655,9 @@ int     vlistFindLevel(int vlistID, int fvarID, int flevelID);
 int     vlistMergedVar(int vlistID, int varID);
 int     vlistMergedLevel(int vlistID, int varID, int levelID);
 
-/* cdiClearAdditionalKeys: Clear the list of additional GRIB keys. */
+/* cdiClearAdditionalKeys: Clear the list of additional GRIB keys */
 void    cdiClearAdditionalKeys(void);
-/* cdiDefAdditionalKey: Register an additional GRIB key which is read when file is opened. */
+/* cdiDefAdditionalKey: Register an additional GRIB key which is read when file is opened */
 void    cdiDefAdditionalKey(const char *string);
 
 /* vlistDefVarIntKey: Set an arbitrary keyword/integer value pair for GRIB API */
@@ -665,39 +665,39 @@ void    vlistDefVarIntKey(int vlistID, int varID, const char *name, int value);
 /* vlistDefVarDblKey: Set an arbitrary keyword/double value pair for GRIB API */
 void    vlistDefVarDblKey(int vlistID, int varID, const char *name, double value);
 
-/* vlistHasVarKey: returns 1 if meta-data key was read, 0 otherwise. */
+/* vlistHasVarKey: returns 1 if meta-data key was read, 0 otherwise */
 int     vlistHasVarKey(int vlistID, int varID, const char *name);
 /* vlistInqVarDblKey: raw access to GRIB meta-data */
 double  vlistInqVarDblKey(int vlistID, int varID, const char *name);
 /* vlistInqVarIntKey: raw access to GRIB meta-data */
 int     vlistInqVarIntKey(int vlistID, int varID, const char *name);
 
-/* CDI attributes */
+// CDI attributes
 
-/*      cdiInqNatts: Get number of attributes assigned to this variable */
+//      cdiInqNatts: Get number of attributes assigned to this variable
 int     cdiInqNatts(int cdiID, int varID, int *nattsp);
-/*      cdiInqAtt: Get information about an attribute */
+//      cdiInqAtt: Get information about an attribute
 int     cdiInqAtt(int cdiID, int varID, int attrnum, char *name, int *typep, int *lenp);
 int     cdiDelAtt(int cdiID, int varID, const char *name);
 
 int     cdiCopyAtts(int cdiID1, int varID1, int cdiID2, int varID2);
 
-/*      cdiDefAttInt: Define an integer attribute */
+//      cdiDefAttInt: Define an integer attribute
 int     cdiDefAttInt(int cdiID, int varID, const char *name, int type, int len, const int ip[]);
-/*      cdiDefAttFlt: Define a floating point attribute */
+//      cdiDefAttFlt: Define a floating point attribute
 int     cdiDefAttFlt(int cdiID, int varID, const char *name, int type, int len, const double dp[]);
-/*      cdiDefAttTxt: Define a text attribute */
+//      cdiDefAttTxt: Define a text attribute
 int     cdiDefAttTxt(int cdiID, int varID, const char *name, int len, const char *tp_cbuf);
 
-/*      cdiInqAttInt: Get the value(s) of an integer attribute */
+//      cdiInqAttInt: Get the value(s) of an integer attribute
 int     cdiInqAttInt(int cdiID, int varID, const char *name, int mlen, int ip[]);
-/*      cdiInqAttFlt: Get the value(s) of a floating point attribute */
+//      cdiInqAttFlt: Get the value(s) of a floating point attribute
 int     cdiInqAttFlt(int cdiID, int varID, const char *name, int mlen, double dp[]);
-/*      cdiInqAttTxt: Get the value(s) of a text attribute */
+//      cdiInqAttTxt: Get the value(s) of a text attribute
 int     cdiInqAttTxt(int cdiID, int varID, const char *name, int mlen, char *tp_cbuf);
 
 
-/* GRID routines */
+// GRID routines
 
 void    gridName(int gridtype, char *gridname);
 const char *gridNamePtr(int gridtype);
@@ -710,8 +710,6 @@ int     gridInqMaskGME(int gridID, int mask[]);
 void    gridDefMask(int gridID, const int mask[]);
 int     gridInqMask(int gridID, int mask[]);
 
-void    gridPrint(int gridID, int opt);
-
 //      gridCreate: Create a horizontal Grid
 int     gridCreate(int gridtype, size_t size);
 
@@ -1250,34 +1248,34 @@ int     subtypeCreate(int subtype);
 /*      Gives a textual summary of the variable subtype */
 void    subtypePrint(int subtypeID);
 
-/* Compares two subtype data structures. */
+/* Compares two subtype data structures */
 int     subtypeCompare(int subtypeID1, int subtypeID2);
 
-/*      subtypeInqSize: Get the size of a subtype (e.g. no. of tiles). */
+/*      subtypeInqSize: Get the size of a subtype (e.g. no. of tiles) */
 int     subtypeInqSize(int subtypeID);
 
-/*      subtypeInqActiveIndex: Get the currently active index of a subtype (e.g. current tile index). */
+/*      subtypeInqActiveIndex: Get the currently active index of a subtype (e.g. current tile index) */
 int     subtypeInqActiveIndex(int subtypeID);
 
-/*      subtypeDefActiveIndex: Set the currently active index of a subtype (e.g. current tile index). */
+/*      subtypeDefActiveIndex: Set the currently active index of a subtype (e.g. current tile index) */
 void    subtypeDefActiveIndex(int subtypeID, int index);
 
-/*      Generate a "query object" out of a key-value pair. */
+/*      Generate a "query object" out of a key-value pair */
 subtype_query_t keyValuePair(const char *key, int value);
 
-/*       Generate an AND-combined "query object" out of two previous query objects. */
+/*       Generate an AND-combined "query object" out of two previous query objects */
 subtype_query_t matchAND(subtype_query_t q1, subtype_query_t q2);
 
-/*      subtypeInqSubEntry: Returns subtype entry ID for a given criterion. */
+/*      subtypeInqSubEntry: Returns subtype entry ID for a given criterion */
 int     subtypeInqSubEntry(int subtypeID, subtype_query_t criterion);
 
-/*      subtypeInqTile: Specialized version of subtypeInqSubEntry looking for tile/attribute pair. */
+/*      subtypeInqTile: Specialized version of subtypeInqSubEntry looking for tile/attribute pair */
 int     subtypeInqTile(int subtypeID, int tileindex, int attribute);
 
 /*      subtypeInqAttribute: Inquire the value of a subtype attribute. Returns CDI_EINVAL if the attribute does not exist.*/
 int     subtypeInqAttribute(int subtypeID, int index, const char *key, int *outValue);
 
-/*      vlistInqVarSubtype: Return subtype ID for a given variable. */
+/*      vlistInqVarSubtype: Return subtype ID for a given variable */
 int     vlistInqVarSubtype(int vlistID, int varID);
 
 void gribapiLibraryVersion(int *major_version, int *minor_version, int *revision_version);
diff --git a/src/cdi.inc b/src/cdi.inc
index 470bf3fe5e6f737c6d1da8ddb59c8b65c2dd2da3..722630dc7a493bb6dde8c1cfec64106f65201a7a 100644
--- a/src/cdi.inc
+++ b/src/cdi.inc
@@ -1,6 +1,6 @@
 ! This file was automatically generated, don't edit!
 !
-! Fortran interface for CDI library version 1.9.5
+! Fortran interface for CDI library version 1.9.7
 !
 ! Author:
 ! -------
@@ -1303,9 +1303,6 @@
 !                                     CHARACTER*(*)   name)
       EXTERNAL        vlistInqVarIntKey
 
-!
-!  CDI attributes
-!
       INTEGER         cdiInqNatts
 !                                    (INTEGER         cdiID,
 !                                     INTEGER         varID,
@@ -1384,9 +1381,6 @@
 !                                     CHARACTER*(*)   tp_cbuf)
       EXTERNAL        cdiInqAttTxt
 
-!
-!  GRID routines
-!
 !                     gridName
 !                                    (INTEGER         gridtype,
 !                                     CHARACTER*(*)   gridname)
@@ -1420,11 +1414,6 @@
 !                                     INTEGER         mask(*))
       EXTERNAL        gridInqMask
 
-!                     gridPrint
-!                                    (INTEGER         gridID,
-!                                     INTEGER         opt)
-      EXTERNAL        gridPrint
-
       INTEGER         gridCreate
 !                                    (INTEGER         gridtype,
 !                                     INTEGER         size)
@@ -2563,7 +2552,7 @@
       EXTERNAL        subtypePrint
 
 !
-!  Compares two subtype data structures.
+!  Compares two subtype data structures
 !
       INTEGER         subtypeCompare
 !                                    (INTEGER         subtypeID1,
@@ -2584,10 +2573,10 @@
       EXTERNAL        subtypeDefActiveIndex
 
 !
-!  Generate a "query object" out of a key-value pair.
+!  Generate a "query object" out of a key-value pair
 !
 !
-!  Generate an AND-combined "query object" out of two previous query objects.
+!  Generate an AND-combined "query object" out of two previous query objects
 !
       INTEGER         subtypeInqTile
 !                                    (INTEGER         subtypeID,
diff --git a/src/cdiFortran.c b/src/cdiFortran.c
index 04cbebc51246b27434ceb62732bd4ebe014650e5..598f4c4c2aa2b48849a8c5d955bff67b7b5f219d 100644
--- a/src/cdiFortran.c
+++ b/src/cdiFortran.c
@@ -400,9 +400,6 @@ FCALLSCSUB4 (vlistDefVarDblKey, VLISTDEFVARDBLKEY, vlistdefvardblkey, INT, INT,
 FCALLSCFUN3 (INT, vlistHasVarKey, VLISTHASVARKEY, vlisthasvarkey, INT, INT, STRING)
 FCALLSCFUN3 (DOUBLE, vlistInqVarDblKey, VLISTINQVARDBLKEY, vlistinqvardblkey, INT, INT, STRING)
 FCALLSCFUN3 (INT, vlistInqVarIntKey, VLISTINQVARINTKEY, vlistinqvarintkey, INT, INT, STRING)
-
-/*  CDI attributes  */
-
 FCALLSCFUN3 (INT, cdiInqNatts, CDIINQNATTS, cdiinqnatts, INT, INT, PINT)
 FCALLSCFUN6 (INT, cdiInqAtt, CDIINQATT, cdiinqatt, INT, INT, INT, PSTRING, PINT, PINT)
 FCALLSCFUN3 (INT, cdiDelAtt, CDIDELATT, cdidelatt, INT, INT, STRING)
@@ -413,9 +410,6 @@ FCALLSCFUN5 (INT, cdiDefAttTxt, CDIDEFATTTXT, cdidefatttxt, INT, INT, STRING, IN
 FCALLSCFUN5 (INT, cdiInqAttInt, CDIINQATTINT, cdiinqattint, INT, INT, STRING, INT, INTV)
 FCALLSCFUN5 (INT, cdiInqAttFlt, CDIINQATTFLT, cdiinqattflt, INT, INT, STRING, INT, DOUBLEV)
 FCALLSCFUN5 (INT, cdiInqAttTxt, CDIINQATTTXT, cdiinqatttxt, INT, INT, STRING, INT, PPSTRING)
-
-/*  GRID routines  */
-
 FCALLSCSUB2 (gridName, GRIDNAME, gridname, INT, PSTRING)
 FCALLSCFUN1 (STRING, gridNamePtr, GRIDNAMEPTR, gridnameptr, INT)
 FCALLSCSUB1 (gridCompress, GRIDCOMPRESS, gridcompress, INT)
@@ -423,7 +417,6 @@ FCALLSCSUB2 (gridDefMaskGME, GRIDDEFMASKGME, griddefmaskgme, INT, INTV)
 FCALLSCFUN2 (INT, gridInqMaskGME, GRIDINQMASKGME, gridinqmaskgme, INT, INTV)
 FCALLSCSUB2 (gridDefMask, GRIDDEFMASK, griddefmask, INT, INTV)
 FCALLSCFUN2 (INT, gridInqMask, GRIDINQMASK, gridinqmask, INT, INTV)
-FCALLSCSUB2 (gridPrint, GRIDPRINT, gridprint, INT, INT)
 static int gridCreate_fwrap(int gridtype, int size)
 {
   int v;
@@ -797,17 +790,17 @@ FCALLSCFUN1 (INT, subtypeCreate, SUBTYPECREATE, subtypecreate, INT)
 
 FCALLSCSUB1 (subtypePrint, SUBTYPEPRINT, subtypeprint, INT)
 
-/*  Compares two subtype data structures.  */
+/*  Compares two subtype data structures  */
 
 FCALLSCFUN2 (INT, subtypeCompare, SUBTYPECOMPARE, subtypecompare, INT, INT)
 FCALLSCFUN1 (INT, subtypeInqSize, SUBTYPEINQSIZE, subtypeinqsize, INT)
 FCALLSCFUN1 (INT, subtypeInqActiveIndex, SUBTYPEINQACTIVEINDEX, subtypeinqactiveindex, INT)
 FCALLSCSUB2 (subtypeDefActiveIndex, SUBTYPEDEFACTIVEINDEX, subtypedefactiveindex, INT, INT)
 
-/*  Generate a "query object" out of a key-value pair.  */
+/*  Generate a "query object" out of a key-value pair  */
 
 
-/*  Generate an AND-combined "query object" out of two previous query objects.  */
+/*  Generate an AND-combined "query object" out of two previous query objects  */
 
 FCALLSCFUN3 (INT, subtypeInqTile, SUBTYPEINQTILE, subtypeinqtile, INT, INT, INT)
 FCALLSCFUN4 (INT, subtypeInqAttribute, SUBTYPEINQATTRIBUTE, subtypeinqattribute, INT, INT, STRING, PINT)
diff --git a/src/grid.c b/src/grid.c
index 371a6826cdf51a0f3869d1b73324395be23daa03..67e4f3794eafc770ca299ac18fc81f169c43f68d 100644
--- a/src/grid.c
+++ b/src/grid.c
@@ -3733,12 +3733,6 @@ void gridPrintKernel(int gridID, int opt, FILE *fp)
 }
 
 
-void gridPrint(int gridID, int opt)
-{
-  gridPrintKernel(gridID, opt, stdout);
-}
-
-
 void gridPrintP(void *voidptr, FILE *fp)
 {
   grid_t *gridptr = (grid_t *) voidptr;
diff --git a/src/make_fint.c b/src/make_fint.c
index 887f31b6128b4049b29c62d39c1b68e88b622310..4cf8c07550038fc4c52a2e3254ded08168d51d99 100644
--- a/src/make_fint.c
+++ b/src/make_fint.c
@@ -15,7 +15,7 @@
 #endif
 
 //#include "config.h"
-#define VERSION "1.9.5"
+#define VERSION "1.9.7"
 typedef struct
 {
   size_t naline;
@@ -60,13 +60,11 @@ static int doccmp(const void *s1, const void *s2)
 
 static void doctotex(FILE *fp, Docu *doc, size_t ndoc)
 {
-  size_t i, k;
-
-  for ( i = 0; i < ndoc; i++ )
+  for ( size_t i = 0; i < ndoc; i++ )
     {
       fprintf(fp, "\\section*{\\tt \\htmlref{%s}{%s}}\n\n", doc[i].fname, doc[i].fname);
       fprintf(fp, "\\begin{verbatim}\n");
-      for ( k = 0; k < doc[i].naline; k++ )
+      for ( size_t k = 0; k < doc[i].naline; k++ )
 	fprintf(fp, "    %s\n", doc[i].aline[k]);
       fprintf(fp, "\\end{verbatim}\n");
       fprintf(fp, "\n%s.\n\n\n", doc[i].text);
@@ -280,7 +278,7 @@ static int detectComment(char **line_, ssize_t *lineLen, size_t *lineBufSize,
                          char *xname, size_t *xnameLen, char **xdes,
                          int *lineno, FILE *fpin, FILE *fpinc, FILE *fpint);
 
-static regex_t commentStartRE, commentEndRE, commentRE, docCommentRE;
+static regex_t commentStartRE, commentEndRE, commentRE, docCommentRE, docLineCommentRE;
 
 static inline int
 arrayArgRank(int argType);
@@ -372,10 +370,12 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
   }
   /* compile documentation comment regular expression */
   {
-    static const char docCommentREString[] = "^"WS"*/\\*"WS"*"SYMRE":("
-      WS"*).*"NWS"("WS"*)\\*/";
+    static const char docCommentREString[]     = "^"WS"*/\\*"WS"*"SYMRE":("WS"*).*"NWS"("WS"*)\\*/";
+    static const char docLineCommentREString[] = "^"WS"*//"WS"*"SYMRE":("WS"*).*"NWS"("WS"*)";
     if (reCompile(&docCommentRE, docCommentREString, &line, &lineBufSize))
       exit(EXIT_FAILURE);
+    if (reCompile(&docLineCommentRE, docLineCommentREString, &line, &lineBufSize))
+      exit(EXIT_FAILURE);
   }
   regex_t cppCondRE;
   {
@@ -818,8 +818,7 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
 	  fprintf(fpint, ")\n");
 
 
-	  if ( funcnameLen == xnameLen
-               && memcmp(funcname, xname, funcnameLen) == 0 )
+	  if ( funcnameLen == xnameLen && memcmp(funcname, xname, funcnameLen) == 0 )
 	    {
 	      char xline[128];
               size_t xlineLen = 0;
@@ -831,8 +830,7 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
 	      cdoc[ncdoc].text   = NULL;
 	      cdoc[ncdoc].fname  = strdup(funcname);
 
-	      nch = sprintf(xline, funRet[functype].cfmt,
-                            "", (int)funcnameLen, funcname);
+	      nch = sprintf(xline, funRet[functype].cfmt, "", (int)funcnameLen, funcname);
               xline[nch++] = ' ';
               xline[nch++] = '(';
               xline[nch] = '\0';
@@ -852,11 +850,9 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
                   char farg[128];
                   /* - 1 to omit closing paren ) or comma , */
                   int nchn = snprintf(farg, sizeof (farg), "%.*s",
-                                      (int)(funcargfull[i].rm_eo
-                                            - funcargfull[i].rm_so - 1),
+                                      (int)(funcargfull[i].rm_eo - funcargfull[i].rm_so - 1),
                                       line + funcargfull[i].rm_so);
-                  if (nchn < 0)
-                    abort();
+                  if (nchn < 0) abort();
                   /* compress white-space */
                   nchn = (int)compress_whitespace((size_t)nchn, farg);
 		  if ( (xlineLen + (size_t)nchn) > (size_t)80 )
@@ -917,8 +913,7 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
                                      - funcargname[i].rm_so),
                                line + funcargname[i].rm_so,
                                argDimsF);
-                  if (nchn < 0)
-                    abort();
+                  if (nchn < 0) abort();
 		  if ( (xlineLen + (size_t)nchn) > 80 )
 		    {
                       if (i) xline[--xlineLen] = 0;
@@ -1104,8 +1099,7 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
       fputs("\\chapter*{Quick Reference}\n"
             "\\addcontentsline{toc}{chapter}{Quick Reference}\n"
             "\n"
-            "This appendix provide a brief listing of the C language bindings of the\n"
-            "CDI library routines:\n"
+            "This appendix provide a brief listing of the C language bindings of the CDI library routines:\n"
             "\n", fp);
 
       doctotex(fp, cdoc, ncdoc);
@@ -1126,8 +1120,7 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
       fputs("\\chapter*{Quick Reference}\n"
             "\\addcontentsline{toc}{chapter}{Quick Reference}\n"
             "\n"
-            "This appendix provide a brief listing of the Fortran language bindings of the\n"
-            "CDI library routines:\n"
+            "This appendix provide a brief listing of the Fortran language bindings of the CDI library routines:\n"
             "\n", fp);
 
       doctotex(fp, fdoc, nfdoc);
@@ -1403,7 +1396,7 @@ static int detectComment(char **line_, ssize_t *lineLen, size_t *lineBufSize,
   char *restrict line = *line_;
   int matchType;
   do {
-    if (!regexec(&docCommentRE, line, maxMatch, reMatch, 0))
+    if (!regexec(&docCommentRE, line, maxMatch, reMatch, 0) || !regexec(&docLineCommentRE, line, maxMatch, reMatch, 0))
       {
         /* found documentation comment */
         size_t nameMatchLen = (size_t)(reMatch[1].rm_eo - reMatch[1].rm_so),
@@ -1422,15 +1415,13 @@ 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)(startoftext - xdes));
+              memmove(eol, startoftext, docMatchLen - (size_t)(startoftext - xdes));
               docMatchLen -= squeezeLen;
               xdes[docMatchLen] = 0;
             }
         }
         if (verbose || debug)
-          printf("Found documentation for \"%s\": \"%s\"\n", xname,
-                 xdes);
+          printf("Found documentation for \"%s\": \"%s\"\n", xname, xdes);
         matchType = FOUND_DOCCOMMENT;
         break;
       }
diff --git a/src/mo_cdi.f90 b/src/mo_cdi.f90
index d2f6ba59fe3a8fcb73ec3bb3ec8e5da97c7f7a78..562a9137dac9cac76083610198e5c1d8eeefee2d 100644
--- a/src/mo_cdi.f90
+++ b/src/mo_cdi.f90
@@ -431,7 +431,6 @@ module mo_cdi
   public :: gridInqMaskGME
   public :: gridDefMask
   public :: gridInqMask
-  public :: gridPrint
   public :: gridCreate
   public :: gridDestroy
   public :: gridDuplicate
@@ -1774,12 +1773,6 @@ module mo_cdi
       integer(c_int) :: f_result
     end function gridInqMask
 
-    subroutine gridPrint(gridID_dummy, opt_dummy) bind(c, name = 'gridPrint')
-      import c_int
-      integer(c_int), value :: gridID_dummy
-      integer(c_int), value :: opt_dummy
-    end subroutine gridPrint
-
     function gridCreate(gridtype_dummy, size_dummy) bind(c, name =&
     & 'gridCreate') result(f_result)
       import c_int, c_size_t