Ignore:
Timestamp:
Oct 2, 2018 12:21:11 PM (4 years ago)
Author:
kanani
Message:

Merge chemistry branch at r3297 to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/UTIL/chemistry/gasphase_preproc/run_kpp4palm.ksh

    r2718 r3298  
    2929# -----------------
    3030# $Id$
     31#  passed $MECH insted of $DEFDIR to kpp4palm.ksh                   forkel  25. Sept. 2018
     32#  re-activaded  choice of deindexing method and vector mode        forkel  June 2018
     33#
     34# 2718 2018-01-02 08:49:38Z maronga
    3135# Initial revision
    3236#
     
    7276cd ..
    7377
    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
     78# run kpp4palm/bin/kpp4palm.ksh with the following Setup
     79#    -d   DEFDIR=$OPTARG;;          # directory of definition files
     80#                                     (passed as `pwd`/mechanisms/def_$MECH)
     81#    -m   MECH="smog";;             # chemical mechanism
     82#                                     (smog, simple, simplep, cbm4, phstat, passive, passive1)
     83#    -i   DE_INDEX=2;;              # deindexing method (0,1,2,3; 0=no deindexing)
     84#    -v   MODE="-v";;               # vector mode on (not working completely yet)
     85#    -l   VLEN=$OPTARG;;            # Set vector length (not working completely yet)
     86#    -k   KEEP="NO";;               # if "yes" keep Working directory
     87#    -u   UPDT="NO";;               # if "yes" update the existing f90 code in the def_MECH directory
     88#                                   # Use "YES" with care as the existing sample file is overwritten
     89#
     90##   Further options (not passed as changing does not make sense to change these)
     91##    -f   DE_INDEX_FAST="YES";;     # if set, fast deindexing
     92##    -o   OUTDIR=$OPTARG;;          # Output directory of Generated Code
     93##                                     (`pwd`/../../../SOURCE)
     94##    -p   PREFIX=$OPTARG;;          # Name Prefix (chem_gasphase_mod)
     95##    -s   KPP_SOLVER=$OPTARG;;      # Name Prefix (rosenbrock)
    8296
    8397 
     
    8599# use smog mechnism as default
    86100MECH=smog
     101DEIN=2
    87102
    88 while  getopts m:k  opt   # get options
     103while  getopts m:i:kuvl:  opt   # get options
    89104do case $opt in
    90105      m)   MECH=$OPTARG;;          # mechanism name as part of mechanisms/def_[mechanism_name]
    91106
     107      i)   DEIN=$OPTARG;;          # deindexing method (0,1,2,3; 0=no deindexing)
     108
    92109      k)   KEEP="-k";;             # keep Working directory
    93110
     111      u)   UPDT="-u";;             # update sample output file
     112
     113      v)   MODE="-v";;             # vector mode on
     114
     115      c)   COPY="-c";;             # copy output to def_MECH
     116
     117      l)   VLEN=$OPTARG;;          # Set vector length
     118
    94119      \?)  print ${0##*/} "unknown option:" $OPTARG
    95            print "USAGE: ${0##*/} [ -m mechanism_name] [ -k] "
     120           print "USAGE: ${0##*/} [ -m mechanism_name] [ -i n (n=0,1,2,3)] [ -k] [ -u] [ -v] [ -l N (N=vector length)]"
    96121           exit 1;;
    97122   esac
    98123done
    99 echo $MECH
     124echo Now do kpp4palm for $MECH
    100125
    101 kpp4palm.ksh -d `pwd`/mechanisms/def_$MECH $KEEP
     126# kpp4palm.ksh -d `pwd`/mechanisms/def_$MECH -i $DEIN $KEEP $UPDT $MODE -l $VLEN
     127kpp4palm.ksh -m $MECH -i $DEIN $KEEP $UPDT $MODE -l $VLEN
Note: See TracChangeset for help on using the changeset viewer.