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

Last change on this file since 2696 was 2696, checked in by kanani, 4 years ago

Merge of branch palm4u into trunk

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/ksh
2#
3#--------------------------------------------------------------------------------#
4#
5# Current revisions:
6# ------------------
7#
8#
9# Former revisions:
10# -----------------
11# $Id: run_kpp4palm.ksh 2603 2017-11-03 17:44:45Z forkel $
12#
13#
14# Small adaptations (added MECH as argument, re-introduced relative path,
15#                    adaption to changing kp4 to kpp4palm)
16# filename changed from run_kp4.ksh to run_kpp4palm.ksh
17#
18#
19#
20#
21# Nov. 2016: Initial Version of KPP chemistry by Klaus Ketelsen
22#
23
24echo "\$1 = " $1 
25
26if [[ $1 == "clean" ]]
27then
28  cd kpp
29  make distclean
30  cd ..
31
32  cd kpp4palm
33  make distclean                 
34  cd ..
35  exit
36fi
37
38export PATH=$PATH:`pwd`/kpp4palm/bin
39
40# build kpp
41
42cp mechanisms/UserRateLaws.f90 kpp/util
43cd kpp
44make
45cd ..
46
47# build kpp4palm.exe
48
49cd kpp4palm
50make install                   
51cd ..
52
53# run kpp4palm with default Setup
54#    -d   DEFDIR=$OPTARG;;          # directory of definition files
55#    -i   DE_INDEX="YES";;          # if set, deindexing
56#    -f   DE_INDEX_FAST="YES";;     # if set, fast deindexing
57#    -k   KEEP="YES";;              # keep Working directory
58#    -o   OUTDIR=$OPTARG;;          # Output directory of Geneated Code
59#    -p   PREFIX=$OPTARG;;          # Name Prefix
60#    -s   KPP_SOLVER=$OPTARG;;      # Name Prefix
61
62 
63echo $PATH
64# use smog mechnism as default
65MECH=smog
66
67while  getopts m:  opt   # get options
68do case $opt in
69      m)   MECH=$OPTARG;;          # mechanism name as part of mechanisms/def_[mechanism_name]
70
71      \?)  print ${0##*/} "unknown option:" $OPTARG
72           print "USAGE: ${0##*/} [ -m mechanism_name ] "
73           exit 1;;
74   esac
75done
76echo $MECH
77
78kpp4palm.ksh -d `pwd`/mechanisms/def_$MECH -k
Note: See TracBrowser for help on using the repository browser.