source: palm/trunk/UTIL/chemistry/gasphase_preproc/run_kpp4palm.ksh @ 2699

Last change on this file since 2699 was 2699, checked in by kanani, 7 years ago

Adjustment of chemistry gasphase preprocessor

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1#!/bin/ksh
2#
3# run_kpp4palm - script for running gasphase preprocessor
4
5#------------------------------------------------------------------------------#
6# This file is part of the PALM model system.
7#
8# PALM is free software: you can redistribute it and/or modify it under the terms
9# of the GNU General Public License as published by the Free Software Foundation,
10# either version 3 of the License, or (at your option) any later version.
11#
12# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
13# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along with
17# PALM. If not, see <http://www.gnu.org/licenses/>.
18#
19# Copyright 2017-2017  Klaus Ketelsen and MPI-CH (April 2007)
20# Copyright 2017-2017  Karlsruhe Institute of Technology
21# Copyright 2017-2017  Leibniz Universitaet Hannover
22#------------------------------------------------------------------------------#
23#
24# Current revisions:
25# ------------------
26#
27#
28# Former revisions:
29# -----------------
30# $Id: run_kpp4palm.ksh 2699 2017-12-15 12:38:41Z kanani $
31# Initial revision
32#
33#
34#
35#
36# Other notes:
37# ------------
38# Small adaptations (added MECH as argument, re-introduced relative path,
39#                    adaption to changing kp4 to kpp4palm)
40# filename changed from run_kp4.ksh to run_kpp4palm.ksh
41#
42# Nov. 2016: Initial Version of KPP chemistry by Klaus Ketelsen
43#
44
45echo "\$1 = " $1 
46
47if [[ $1 == "clean" ]]
48then
49  cd kpp
50  make distclean
51  cd ..
52
53  cd kpp4palm
54  make distclean                 
55  cd ..
56  exit
57fi
58
59export PATH=$PATH:`pwd`/kpp4palm/bin
60
61# build kpp
62
63cp mechanisms/UserRateLaws.f90 kpp/util
64cd kpp
65make
66cd ..
67
68# build kpp4palm.exe
69
70cd kpp4palm
71make install                   
72cd ..
73
74# run kpp4palm with default Setup
75#    -d   DEFDIR=$OPTARG;;          # directory of definition files
76#    -i   DE_INDEX="YES";;          # if set, deindexing
77#    -f   DE_INDEX_FAST="YES";;     # if set, fast deindexing
78#    -k   KEEP="NO";;               # keep Working directory
79#    -o   OUTDIR=$OPTARG;;          # Output directory of Geneated Code
80#    -p   PREFIX=$OPTARG;;          # Name Prefix
81#    -s   KPP_SOLVER=$OPTARG;;      # Name Prefix
82
83 
84echo $PATH
85# use smog mechnism as default
86MECH=smog
87
88while  getopts m:k  opt   # get options
89do case $opt in
90      m)   MECH=$OPTARG;;          # mechanism name as part of mechanisms/def_[mechanism_name]
91
92      k)   KEEP="-k";;             # keep Working directory
93
94      \?)  print ${0##*/} "unknown option:" $OPTARG
95           print "USAGE: ${0##*/} [ -m mechanism_name] [ -k] "
96           exit 1;;
97   esac
98done
99echo $MECH
100
101kpp4palm.ksh -d `pwd`/mechanisms/def_$MECH $KEEP
Note: See TracBrowser for help on using the repository browser.