Index: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/bin/kpp4palm.ksh
===================================================================
--- palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/bin/kpp4palm.ksh	(revision 3797)
+++ palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/bin/kpp4palm.ksh	(revision 3799)
@@ -40,4 +40,8 @@
 # -----------------
 # $Id$ 
+# Removed edit of phot(nphot) for version edit phot(nphot), now done in fortran_file.C (15.03.2019, forkel)
+# Editing with sed to add dummy statements toavoud unused variables
+# 
+# 3780 2019-03-05 11:19:45Z forkel
 # forkel   05. March 2019: cs_mech and set_cm
 # forkel   30. Oktober 2018: Integrating contents of kp4_compress into chem_gasphase_mod.f90
@@ -337,9 +341,44 @@
 $BASE/bin/kpp4palm.exe $PREFIX $MODE $VLEN $DE_INDEX $DE_INDEX_FAST
 
-#Prelimanary, substitution has to be moved into kpp4palm.exe
+# Add dummy statements in order to prevent warnings due to unused variables
+#
+sed -i -e '/cfactor =/a !  ' kk_kpp.f90
+sed -i -e '/cfactor =/a    IF ( lu_crow(1) == 1  .OR.  lu_icol(1) == 1  .OR.  lu_irow(1) == 1 )  CONTINUE ' kk_kpp.f90
+sed -i -e '/cfactor =/a ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
+sed -i -e '/cfactor =/a !  ' kk_kpp.f90
+
 if [[ $MODE = "vector" ]]
 then
-  sed -i -e 's/phot(nphot/phot(vl_dim,nphot/g' kk_kpp.f90
-fi
+sed -i -e '/! Computation of equation rates/i ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
+sed -i -e '/! Computation of equation rates/i IF ( f(vl,nfix) > 0.0_dp )  CONTINUE' kk_kpp.f90
+sed -i -e '/! Computation of equation rates/i !  ' kk_kpp.f90
+else
+sed -i -e '/! Computation of equation rates/i ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
+sed -i -e '/! Computation of equation rates/i IF ( f(nfix) > 0.0_dp )  CONTINUE' kk_kpp.f90
+sed -i -e '/! Computation of equation rates/i !  ' kk_kpp.f90
+fi
+
+if [[ $MODE = "vector" ]]
+then
+sed -i -e '/REAL(kind=dp) :: b/a   IF ( f(vl,nfix) > 0.0_dp )  CONTINUE' kk_kpp.f90
+sed -i -e '/REAL(kind=dp) :: b/a ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
+sed -i -e '/REAL(kind=dp):: b/a !' kk_kpp.f90
+else
+sed -i -e '/REAL(kind=dp):: b/a   IF ( f(nfix) > 0.0_dp )  CONTINUE' kk_kpp.f90
+sed -i -e '/REAL(kind=dp):: b/a ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
+sed -i -e '/REAL(kind=dp):: b/a !' kk_kpp.f90
+fi
+
+sed -i -e '/one=1.0_dp/a       IF ( incx == 0 )  CONTINUE' kk_kpp.f90
+sed -i -e '/one=1.0_dp/a ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
+sed -i -e '/one=1.0_dp/a !  ' kk_kpp.f90
+
+sed -i -e '/IF (alpha .eq. zero)RETURN/i !  ' kk_kpp.f90
+sed -i -e '/IF (alpha .eq. zero)RETURN/i ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
+sed -i -e '/IF (alpha .eq. zero)RETURN/i     IF ( incx == 0  .OR.  incy == 0 )  CONTINUE' kk_kpp.f90
+
+sed -i -e '/INTENT(INOUT):: b(n)/a       IF ( pivot(1) == 0 )  CONTINUE' kk_kpp.f90
+sed -i -e '/INTENT(INOUT):: b(n)/a ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
+sed -i -e '/INTENT(INOUT):: b(n)/a !  ' kk_kpp.f90
 
 if [[ -e $OUTDIR/${OUTFILE}.f90 ]] 
Index: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/create_kpp_module.C
===================================================================
--- palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/create_kpp_module.C	(revision 3797)
+++ palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/create_kpp_module.C	(revision 3799)
@@ -9,12 +9,10 @@
 //
 // ############################################################################
-//
-//Current revisions:
-//------------------
 //
 //
 //Former revisions:
 //-----------------
-//$Id: create_kpp_module.C 3453 2018-10-30 13:21:51Z forkel $
+// Deleted $Id since document_changes does not work for C and C++         (15.03.2019, forkel)
+//
 // OpenMP version    (15.03.2019, ketelsen)
 //
@@ -199,5 +197,5 @@
    generate_module_header();
 
-// create_set_cs
+// Create subroutine to communicate mechanism name to other modules
    create_set_cs();
 
Index: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/create_kpp_module.h
===================================================================
--- palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/create_kpp_module.h	(revision 3797)
+++ palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/create_kpp_module.h	(revision 3799)
@@ -18,7 +18,9 @@
 // Former revisions:
 // -----------------------
-// $Id$
-// forkel   22.02.2019: Added create_set_cs
-// ketelsen 18.09.2018: Removed create_fill_routine
+// Deleted $Id since document_changes does not work for C and C++         (15.03.2019, forkel)
+//
+// Added create_set_cs   (22.02.2019, forkel)
+//
+// Removed create_fill_routine   (18.09.2018, ketelsen)
 //
 // initial version                                  (Nov. 2016, ketelsen)
Index: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/expand_decomp.C
===================================================================
--- palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/expand_decomp.C	(revision 3797)
+++ palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/expand_decomp.C	(revision 3799)
@@ -9,11 +9,9 @@
 //
 // ############################################################################
-//Current revisions:
-//------------------
 //
 //
 // Former revisions:
 // -----------------------
-// $Id: expand_decomp.C 3327 2018-10-09 19:55:00Z forkel $
+// Deleted $Id since document_changes does not work for C and C++   (15.03.2019, forkel)
 //
 // Added switch for de-indexing == 2 (W is not needed then)       (08.03.2019, forkel)
Index: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/expand_decomp.h
===================================================================
--- palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/expand_decomp.h	(revision 3797)
+++ palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/expand_decomp.h	(revision 3799)
@@ -11,11 +11,9 @@
 //
 // ############################################################################
-//Current revisions:
-//------------------
 //
 //
 // Former revisions:
 // -----------------------
-// $Id: expand_decomp.h 3327 2018-10-09 19:55:00Z forkel $
+// Deleted $Id since document_changes does not work for C and C++   (15.03.2019, forkel)
 //
 // initial version                                  (Nov. 2016, ketelsen)
Index: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/fortran_file.C
===================================================================
--- palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/fortran_file.C	(revision 3797)
+++ palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/fortran_file.C	(revision 3799)
@@ -11,11 +11,10 @@
 //
 //
-//Current revisions:
-//------------------
-// 
-// 
 //Former revisions:
 //-----------------
-//$Id: 
+// Deleted $Id since document_changes does not work for C and C++   (15.03.2019, forkel)
+//
+// For vector version edit phot(nphot) - was before done in kpp4pal.ksh (15.03.2019, forkel)
+//
 // OpenMP version    (15.03.2019, ketelsen)
 //
@@ -676,4 +675,8 @@
 //  Replace Roundoff = WLAMCH('E') since WLAMCH does not work everywhere
        ip->global_substitute("Roundoff = WLAMCH('E')","roundoff = epsilon(one)");
+//  For vector version edit  phot(nphot) from INLINE in chem_gasphase_mod.kpp
+    if(kpp_switches.is_vector()) {
+        ip->global_substitute("phot(nphot)","phot(vl_dim,nphot)");
+    }
 
 // Now do some cosmetics to adapt the KPP generated output a bit o the looks of PALM, 
Index: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/fortran_file.h
===================================================================
--- palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/fortran_file.h	(revision 3797)
+++ palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/fortran_file.h	(revision 3799)
@@ -12,11 +12,8 @@
 // ############################################################################
 //
-//Current revisions:
-//------------------
-//
 //
 // Former revisions:
 // -----------------------
-// $Id: fortran_file.h 3327 2018-10-09 19:55:00Z forkel $
+// Deleted $Id since document_changes does not work for C and C++         (15.03.2019, forkel)
 //
 // added edit_Initialize                            (Sept.2018, forkel)
Index: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/main.C
===================================================================
--- palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/main.C	(revision 3797)
+++ palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/main.C	(revision 3799)
@@ -4,17 +4,14 @@
 //     create_mz_kpp_module 
 //
-//     create scalar code from .f90 sources created by KPP to be used in MESSy
+//     create scalar code from .f90 sources created by KPP to be used in PALM4U
 //
-//     COPYRIGHT Klaus Ketelsen and MPI-CH   April 2007
+//     COPYRIGHT Klaus Ketelsen and MPI-CH   April 2007, 
+//               Klaus Ketelsen, 2016
 //
 // ############################################################################
 //
-//Current revisions:
-//------------------
-//
-//
 // Former revisions:
 // -----------------------
-// $Id: main.C 3327 2018-10-09 19:55:00Z forkel $
+// Deleded $Id since document_changes does not work for C and C++         (15.03.2019, forkel)
 //
 // initial version       (Nov. 2016, ketelsen)
@@ -35,7 +32,9 @@
 
    cout << "####################################################" <<endl ;
-   cout << "###             KP4 = KPP POST PROCESSOR         ###" <<endl ;
-   cout << "###                   Version 1.0                ###" <<endl ;
+   cout << "###        KPP4PALM = KPP POST PROCESSOR         ###" <<endl ;
+   cout << "###               KP4 Version 1.0                ###" <<endl ;
    cout << "### (C) by Klaus Ketelsen and MPI-CH, April 2007 ###" <<endl ;
+   cout << "###               KPP4PALM                       ###" <<endl ;
+   cout << "### (C) by Klaus Ketelsen, November 2016         ###" <<endl ;
    cout << "####################################################" <<endl ;
 
@@ -71,5 +70,5 @@
 
    cout << "####################################################" <<endl ;
-   cout << "###                END OF KP4                    ###" <<endl ;
+   cout << "###                END OF KPP4PALM               ###" <<endl ;
    cout << "####################################################" <<endl ;
 
Index: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/program_line.C
===================================================================
--- palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/program_line.C	(revision 3797)
+++ palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/program_line.C	(revision 3799)
@@ -10,11 +10,8 @@
 // ############################################################################
 //
-//Current revisions:
-//------------------
-//
 //
 // Former revisions:
 // -----------------------
-// $Id: program_line.C 3327 2018-10-09 19:55:00Z forkel $
+// Deleted $Id since document_changes does not work for C and C++   (15.03.2019, forkel)
 //
 // global_subtolower     (June 2018, forkel)
Index: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/program_line.h
===================================================================
--- palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/program_line.h	(revision 3797)
+++ palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/program_line.h	(revision 3799)
@@ -12,11 +12,8 @@
 // ############################################################################
 //
-//Current revisions:
-//------------------
-//
 //
 // Former revisions:
 // -----------------------
-// $Id: program_line.h 3327 2018-10-09 19:55:00Z forkel $
+// Deleted $Id since document_changes does not work for C and C++   (15.03.2019, forkel)
 //
 // added    void   global_subtolower(string &line); (June 2018, forkel)
Index: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/utils.C
===================================================================
--- palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/utils.C	(revision 3797)
+++ palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/utils.C	(revision 3799)
@@ -10,11 +10,8 @@
 // ############################################################################
 //
-//Current revisions:
-//------------------
-//
 //
 // Former revisions:
 // -----------------------
-// $Id: utils.C 3327 2018-10-09 19:55:00Z forkel $
+// Deleted $Id since document_changes does not work for C and C++   (15.03.2019, forkel)
 //
 // initial version                                  (Nov. 2016, ketelsen)
Index: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/utils.h
===================================================================
--- palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/utils.h	(revision 3797)
+++ palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/utils.h	(revision 3799)
@@ -12,11 +12,8 @@
 // ############################################################################
 //
-//Current revisions:
-//------------------
-//
 //
 // Former revisions:
 // -----------------------
-// $Id: utils.h 3327 2018-10-09 19:55:00Z forkel $
+// Deleted $Id since document_changes does not work for C and C++   (15.03.2019, forkel)
 //
 // initial version                                  (Nov. 2016, ketelsen)
