#!/bin/csh # $1 is the input file (pin elevation data file) # $2 is the plot subtitle description ("After Chiselling", etc.) # $3 determines whether the "linearized" data is plotted (0 = NO, 1 = YES) # tmp files used are: shelter.tmp, cum_freq.actual.tmp, cum_freq.model.tmp, weibull.parms.tmp # gr_parm.tmp, linear.actual.tmp, linear.model.tmp # C and k parameters are appended to weibull.parms.out onintr quit # set PROG = /usr/local/src/xvgr/xvgr-1.07alpha/xvgr set PROG = xvgr # generate a list of shelter angles shelter -s < $1 >! shelter.tmp # obtain the cumulative frequency distribution for the sorted shelter angles wbull_regress < shelter.tmp >! cum_freq.actual.tmp # obtain the weibull parameters for the sorted shelter angles wbull_regress -s -W < shelter.tmp >! weibull.parms.tmp # generate a a cumulative frequency distribution data set from the original shelter angles set CKPARMS = `awk '{print " -C " $1 " -k " $2}' < weibull.parms.tmp` weibull ${CKPARMS} < shelter.tmp >! cum_freq.model.tmp # make a temporay multi-data set file for ${PROG} # modify the gr.shelter.parm file for this plot set CK = `awk '{print "Model (C=" $1 ",k=" $2 ")"}' < weibull.parms.tmp` sed -e "s,dataset1,$1," < gr.shelter.parm | sed -e "s/dataset2/${CK}/" | \ sed -e "s,subtitle file,subtitle $2," >! gr_parm.tmp ${PROG} -p gr_parm.tmp cum_freq.actual.tmp cum_freq.model.tmp # plot linearized data if specified if ($3 == 1) then wbull_regress -l < shelter.tmp >! linear.actual.tmp wbull_cum_freq ${CKPARMS} | dm s1 | wbull_regress -l >! linear.model.tmp sed -e "s,dataset1,$1," < gr.linear.parm | sed -e "s/dataset2/${CK}/" | \ sed -e "s,subtitle file,subtitle $2," >! gr_parm.tmp ${PROG} -p gr_parm.tmp linear.actual.tmp linear.model.tmp endif cat weibull.parms.tmp >>! weibull.parms.tst goto done quit: echo "" echo "Aborting this run" echo "" done: # rm *.tmp