Index: /palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/bin/kpp4palm.ksh
===================================================================
--- /palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/bin/kpp4palm.ksh	(revision 2698)
+++ /palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/bin/kpp4palm.ksh	(revision 2699)
@@ -1,13 +1,24 @@
 #!/usr/bin/ksh
 
-###########################################################################
-# 
-#     create_kpp_module 
-#
-#     create scalar code from .f90 sources created by KPP to be used in MECCA
-#
-#     COPYRIGHT Klaus Ketelsen and MPI-CH   April 2007
-# 
-###########################################################################
+# kpp4palm - script for creating gasphase module
+
+#------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 2017-2017  Klaus Ketelsen and MPI-CH (April 2007)
+# Copyright 2017-2017  Karlsruhe Institute of Technology
+# Copyright 2017-2017  Leibniz Universitaet Hannover
+#------------------------------------------------------------------------------#
 #
 # Current revisions:
@@ -17,7 +28,12 @@
 # Former revisions:
 # -----------------
-# $Id$
-#
-# 
+# $Id$ 
+# Initial revision
+# 
+# 
+#
+#
+# Other notes:
+# ------------# 
 # Re-introduced relative path for KPP_HOME
 # Subroutine list adapted to lowercase subroutine names
@@ -26,6 +42,4 @@
 # Renamed this fikle from kp4/ksh to kpp4kpp.ksh
 # changed location of def_mechanism directories to GASPHASE_PREPROC/mechanisms
-# 
-# 
 #
 # Nov. 2016: Initial Version of KPP chemistry convertor by Klaus Ketelsen
@@ -49,5 +63,5 @@
 # Default
 
-OUTDIR=`pwd`/../SOURCE
+OUTDIR=`pwd`/../../../SOURCE
 OUTFILE=chem_gasphase_mod
 DEFDIR=`pwd`/mechanisms/def_smog
Index: /palm/trunk/UTIL/chemistry/gasphase_preproc/run_kpp4palm.ksh
===================================================================
--- /palm/trunk/UTIL/chemistry/gasphase_preproc/run_kpp4palm.ksh	(revision 2698)
+++ /palm/trunk/UTIL/chemistry/gasphase_preproc/run_kpp4palm.ksh	(revision 2699)
@@ -1,5 +1,24 @@
 #!/bin/ksh
 #
-#--------------------------------------------------------------------------------#
+# run_kpp4palm - script for running gasphase preprocessor
+
+#------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 2017-2017  Klaus Ketelsen and MPI-CH (April 2007)
+# Copyright 2017-2017  Karlsruhe Institute of Technology
+# Copyright 2017-2017  Leibniz Universitaet Hannover
+#------------------------------------------------------------------------------#
 #
 # Current revisions:
@@ -9,13 +28,15 @@
 # Former revisions:
 # -----------------
-# $Id: run_kpp4palm.ksh 2603 2017-11-03 17:44:45Z forkel $ 
+# $Id$ 
+# Initial revision
+# 
+# 
 #
-# 
+#
+# Other notes:
+# ------------
 # Small adaptations (added MECH as argument, re-introduced relative path,
 #                    adaption to changing kp4 to kpp4palm)
 # filename changed from run_kp4.ksh to run_kpp4palm.ksh
-# 
-# 
-# 
 #
 # Nov. 2016: Initial Version of KPP chemistry by Klaus Ketelsen
@@ -55,5 +76,5 @@
 #    -i   DE_INDEX="YES";;          # if set, deindexing
 #    -f   DE_INDEX_FAST="YES";;     # if set, fast deindexing
-#    -k   KEEP="YES";;              # keep Working directory
+#    -k   KEEP="NO";;               # keep Working directory
 #    -o   OUTDIR=$OPTARG;;          # Output directory of Geneated Code
 #    -p   PREFIX=$OPTARG;;          # Name Prefix
@@ -65,10 +86,12 @@
 MECH=smog
 
-while  getopts m:  opt   # get options
+while  getopts m:k  opt   # get options
 do case $opt in
       m)   MECH=$OPTARG;;          # mechanism name as part of mechanisms/def_[mechanism_name]
 
+      k)   KEEP="-k";;             # keep Working directory
+
       \?)  print ${0##*/} "unknown option:" $OPTARG
-           print "USAGE: ${0##*/} [ -m mechanism_name ] "
+           print "USAGE: ${0##*/} [ -m mechanism_name] [ -k] "
            exit 1;;
    esac
@@ -76,3 +99,3 @@
 echo $MECH
 
-kpp4palm.ksh -d `pwd`/mechanisms/def_$MECH -k
+kpp4palm.ksh -d `pwd`/mechanisms/def_$MECH $KEEP
