Last change
on this file since 2697 was
2696,
checked in by kanani, 7 years ago
|
Merge of branch palm4u into trunk
|
-
Property svn:executable set to
*
|
File size:
1.7 KB
|
Rev | Line | |
---|
[2696] | 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 | |
---|
| 24 | echo "\$1 = " $1 |
---|
| 25 | |
---|
| 26 | if [[ $1 == "clean" ]] |
---|
| 27 | then |
---|
| 28 | cd kpp |
---|
| 29 | make distclean |
---|
| 30 | cd .. |
---|
| 31 | |
---|
| 32 | cd kpp4palm |
---|
| 33 | make distclean |
---|
| 34 | cd .. |
---|
| 35 | exit |
---|
| 36 | fi |
---|
| 37 | |
---|
| 38 | export PATH=$PATH:`pwd`/kpp4palm/bin |
---|
| 39 | |
---|
| 40 | # build kpp |
---|
| 41 | |
---|
| 42 | cp mechanisms/UserRateLaws.f90 kpp/util |
---|
| 43 | cd kpp |
---|
| 44 | make |
---|
| 45 | cd .. |
---|
| 46 | |
---|
| 47 | # build kpp4palm.exe |
---|
| 48 | |
---|
| 49 | cd kpp4palm |
---|
| 50 | make install |
---|
| 51 | cd .. |
---|
| 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 | |
---|
| 63 | echo $PATH |
---|
| 64 | # use smog mechnism as default |
---|
| 65 | MECH=smog |
---|
| 66 | |
---|
| 67 | while getopts m: opt # get options |
---|
| 68 | do 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 |
---|
| 75 | done |
---|
| 76 | echo $MECH |
---|
| 77 | |
---|
| 78 | kpp4palm.ksh -d `pwd`/mechanisms/def_$MECH -k |
---|
Note: See
TracBrowser
for help on using the repository browser.