[cig-commits] commit: remove unnecessary scripts. update sh to bash. update calls to extra scripts in grdmap.sh.
Mercurial
hg at geodynamics.org
Mon Oct 8 06:58:41 PDT 2012
changeset: 142:138acc5ce8af
tag: tip
user: Sylvain Barbot <sbarbot at caltech.edu>
date: Mon Oct 08 06:58:36 2012 -0700
files: util/coulomb.sh util/erpatch.sh util/erpatch_slip.sh util/extrude.sh util/flt2obj.sh util/flt2vtk.sh util/grdadd.sh util/grddetrend.sh util/grdinsar.sh util/grdmap.sh util/grdrotate.sh util/grdsub.sh util/grdtrack.sh util/obsrelax.sh util/plot.sh util/slip2source.sh util/timeseries.sh util/wang2xyz.sh util/xyz2grd.sh util/xyz2vtk.sh
description:
remove unnecessary scripts. update sh to bash. update calls to extra scripts in grdmap.sh.
diff -r 51d43e0bbf74 -r 138acc5ce8af util/coulomb.sh
--- a/util/coulomb.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/coulomb.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
set -e
self=$(basename $0)
diff -r 51d43e0bbf74 -r 138acc5ce8af util/erpatch.sh
--- a/util/erpatch.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/erpatch.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,33 +1,64 @@
-#!/bin/sh
+#!/bin/bash
-# extra script for mapping tool map.sh plotting the contours
-# of fault patches projected in map view
+# extra script for mapping tool grdmap.sh
+# overlays the contours of fault patches projected in map view
#
-# map.sh -e rpatch.sh WDIR/file.grd
+# grdmap.sh -e erpatch.sh WDIR/file.grd
#
# assumes files WDIR/rfaults-???.dat contain slip model, as
# created by program relax and alike.
set -e
self=$(basename $0)
+selfdir=$(dirname $0)
+cmdline=$*
trap 'echo $self: Some errors occurred. Exiting.; exit' ERR
-if [ "$#" -lt "2" ]; then
- echo $self": extra script for map.sh."
- echo $self": expected $self file.ps xmin/xmax/ymin/ymax. exiting."
+while getopts "b:c:gp:v:H:" flag
+do
+ case "$flag" in
+ b) bset=1;bds=$OPTARG;;
+ c) cset=1;carg=$OPTARG;;
+ g) gset=1;;
+ p) pset=1;U3=$OPTARG;;
+ v) vset=1;SIZE=$OPTARG;VECTOR=$OPTARG"c";;
+ H) Hset=1;HEIGHT=$OPTARG;;
+ esac
+done
+for item in $bset $cset $pset $vset $Hset; do
+ shift;shift
+done
+for item in $gset; do
+ shift
+done
+
+if [ "$#" -lt "1" ]; then
+ echo ${self} overlays the contours of fault patches on a GMT map.
+ echo
+ echo usage: $self -b xmin/xmax/ymin/ymax file.ps
exit 1
fi
-echo $self: $*
+echo $self: $cmdline
PSFILE=$1
-bds=$2
-
WDIR=$(dirname $PSFILE)
-# plot a coseismic model
-psxy -O -K -JX -R$bds -L -M \
- -W1.0p/20/20/20 \
- <<EOF >> $PSFILE
-`awk '{if (">"==$1){print $1}else{print $1,$2}}' $WDIR/rfaults-???.xy $WDIR/rdykes-???.xy`
+# plot a coseismic model (do nothing in geographic coordinates)
+if [ "$gset" != "1" ]; then
+ if [ -e "$WDIR/rfaults-001.xy" ]; then
+ psxy -O -K -JX -R$bds -L -M \
+ -W1.0p/20/20/20 \
+ <<EOF >> $PSFILE
+`awk '{if (">"==$1){print $1}else{print $1,$2}}' $WDIR/rfaults-???.xy`
EOF
+ fi
+ if [ -e "$WDIR/rdykes-001.xy" ]; then
+ psxy -O -K -JX -R$bds -L -M \
+ -W1.0p/20/20/20 \
+ <<EOF >> $PSFILE
+`awk '{if (">"==$1){print $1}else{print $1,$2}}' $WDIR/rdykes-???.xy`
+EOF
+ fi
+fi
+
diff -r 51d43e0bbf74 -r 138acc5ce8af util/erpatch_slip.sh
--- a/util/erpatch_slip.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/erpatch_slip.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,31 +1,62 @@
-#!/bin/sh
+#!/bin/bash
-# extra script for mapping tool map.sh plotting the slip model
-# projected in map view
+# extra script for mapping tool grdmap.sh
+# overlays the slip model projected in map view
#
-# map.sh -e rpatch_slip.sh WDIR/file.grd
+# grdmap.sh -e erpatch_slip.sh WDIR/file.grd
#
# assumes files WDIR/rfaults-???.dat contain slip model, as
# created by program relax and alike.
set -e
self=$(basename $0)
+selfdir=$(dirname $0)
+cmdline=$*
trap 'echo $self: Some errors occurred. Exiting.; exit' ERR
-if [ "$#" -lt "2" ]; then
- echo $self": expected $self file.ps xmin/xmax/ymin/ymax. exiting."
+while getopts "b:c:gp:v:H:" flag
+do
+ case "$flag" in
+ b) bset=1;bds=$OPTARG;;
+ c) cset=1;carg=$OPTARG;;
+ g) gset=1;;
+ p) pset=1;U3=$OPTARG;;
+ v) vset=1;SIZE=$OPTARG;VECTOR=$OPTARG"c";;
+ H) Hset=1;HEIGHT=$OPTARG;;
+ esac
+done
+for item in $bset $cset $pset $vset $Hset; do
+ shift;shift
+done
+for item in $gset; do
+ shift
+done
+
+if [ "$#" -lt "1" ]; then
+ echo ${self} overlays the slip model on a GMT map.
+ echo
+ echo usage: $self -b xmin/xmax/ymin/ymax file.ps
exit 1
fi
-echo $self: $*
+echo $self: $cmdline
PSFILE=$1
-bds=$2
-
WDIR=$(dirname $PSFILE)
-psxy -O -K -JX -R$bds -C$WDIR/palette.cpt -W1p0/0/0 -L -M \
- -W0.5p/20/20/20 \
- <<EOF >> $PSFILE
-`awk '{if (">"==$1){print $0}else{print $1,$2}}' $WDIR/rfaults-???.xy`
+# plot a coseismic model (do nothing in geographic coordinates)
+if [ "$gset" != "1" ]; then
+ if [ -e "$WDIR/rfaults-001.xy" ]; then
+ psxy -O -K -JX -R$bds -C$WDIR/palette.cpt -W1p0/0/0 -L -M \
+ -W0.5p/20/20/20 \
+ <<EOF >> $PSFILE
+`awk '{if (">"==$1){print $0}else{print $2,$1}}' $WDIR/rfaults-???.xy`
EOF
+ fi
+ if [ -e "$WDIR/rdykes-001.xy" ]; then
+ psxy -O -K -JX -R$bds -C$WDIR/palette.cpt -W1p0/0/0 -L -M \
+ -W0.5p/20/20/20 \
+ <<EOF >> $PSFILE
+`awk '{if (">"==$1){print $0}else{print $2,$1}}' $WDIR/rdykes-???.xy`
+ fi
+fi
diff -r 51d43e0bbf74 -r 138acc5ce8af util/extrude.sh
--- a/util/extrude.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/extrude.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
set -e
self=$(basename $0)
diff -r 51d43e0bbf74 -r 138acc5ce8af util/flt2obj.sh
--- a/util/flt2obj.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/flt2obj.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# This is a cube with negative vertex reference numbers. Each element
diff -r 51d43e0bbf74 -r 138acc5ce8af util/flt2vtk.sh
--- a/util/flt2vtk.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/flt2vtk.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
set -e
self=$(basename $0)
diff -r 51d43e0bbf74 -r 138acc5ce8af util/grdadd.sh
--- a/util/grdadd.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/grdadd.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
set -e
self=$(basename $0)
diff -r 51d43e0bbf74 -r 138acc5ce8af util/grddetrend.sh
--- a/util/grddetrend.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/grddetrend.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
set -e
self=$(basename $0)
diff -r 51d43e0bbf74 -r 138acc5ce8af util/grdinsar.sh
--- a/util/grdinsar.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/grdinsar.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
set -e
self=$(basename $0)
diff -r 51d43e0bbf74 -r 138acc5ce8af util/grdmap.sh
--- a/util/grdmap.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/grdmap.sh Mon Oct 08 06:58:36 2012 -0700
@@ -60,16 +60,16 @@ my_gmt(){
fi
# running all required subprograms
- for subprog in $EXTRA;do
- if [ -e "$selfdir/$subprog" ]; then
- #echo $self: running $subprog $PSFILE $bds $VECTOR $U3 $HEIGHT
- eval "$subprog $PSFILE $bds $VECTOR $U3 $HEIGHT"
- else
- if [ -e "$subprog" ]; then
+ for subprog in $EXTRA; do
+ if [ -e "$selfdir/$subprog" ]; then
#echo $self: running $subprog $PSFILE $bds $VECTOR $U3 $HEIGHT
- eval "$subprog $PSFILE $bds $VECTOR $U3 $HEIGHT"
+ eval "$subprog $gset -b $bds -v $VECTOR -p $U3 -H $HEIGHT $PSFILE"
+ else
+ if [ -e "$subprog" ]; then
+ #echo $self: running $subprog $PSFILE $bds $VECTOR $U3 $HEIGHT
+ eval "$subprog $gset -b $bds -v $VECTOR -p $U3 -H $HEIGHT $PSFILE"
+ fi
fi
- fi
done
# plotting vectors
@@ -133,9 +133,9 @@ do
do
case "$flag" in
b) bset=1;bds=$OPTARG;;
- c) cset=1;carg=$OPTARG;;
+ c) cset="-c";carg=$OPTARG;;
e) eset=1;EXTRA="$EXTRA $OPTARG";;
- g) gset=1;;
+ g) gset="-g";;
h) hset=1;;
i) iset=1;illumination="-I$OPTARG";;
o) oset=1;ODIR=$OPTARG;;
@@ -176,7 +176,7 @@ fi
fi
# color scale
-if [ "$cset" != "1" ]; then
+if [ "$cset" != "-c" ]; then
#cptfile=hot
cptfile=$libdir/my_jet
#cptfile=$libdir/my_hot_inv
@@ -269,7 +269,7 @@ while [ "$#" != "0" -o "$Eset" == "1" ];
fi
fi
- if [ "$gset" != "1" ]; then
+ if [ "$gset" != "-g" ]; then
# Cartesian coordinates
HEIGHT=`echo $bds | awk -F "/" '{printf("%fi\n",($4-$3)/($2-$1)*4)}'`
if [ "$rset" != "1" ]; then
@@ -313,7 +313,7 @@ while [ "$#" != "0" -o "$Eset" == "1" ];
tickf=`echo $tick | awk '{print $1/2}'`
# Cartesian vs geographic coordinates
- if [ "$gset" != "1" ]; then
+ if [ "$gset" != "-g" ]; then
HEIGHT=`echo $bds | awk -F "/" '{printf("%fi\n",($4-$3)/($2-$1)*4)}'`
if [ "$rset" != "1" ]; then
PROJ="X4i/"$HEIGHT
diff -r 51d43e0bbf74 -r 138acc5ce8af util/grdrotate.sh
--- a/util/grdrotate.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/grdrotate.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# PURPOSE:
#
diff -r 51d43e0bbf74 -r 138acc5ce8af util/grdsub.sh
--- a/util/grdsub.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/grdsub.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
set -e
self=$(basename $0)
diff -r 51d43e0bbf74 -r 138acc5ce8af util/grdtrack.sh
--- a/util/grdtrack.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/grdtrack.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
set -e
diff -r 51d43e0bbf74 -r 138acc5ce8af util/obsrelax.sh
--- a/util/obsrelax.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/obsrelax.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
set -e
self=$(basename $0)
diff -r 51d43e0bbf74 -r 138acc5ce8af util/plot.sh
--- a/util/plot.sh Sun Sep 30 04:30:18 2012 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-#!/bin/sh
-
-set -e
-self=$(basename $0)
-
-my_list_last()
-{
- if [ $# -eq 0 ]; then
- echo "";exit 0
-fi
-
-while [ $# -ne 1 ]; do
- shift
-done
-echo $1
-return 0
-}
-
-my_list_first()
-{
-if [ $# -eq 0 ]; then
- echo "";exit 0
-fi
-
-echo $1
-return 0
-}
-
-my_list_remove_head()
-{
-shift
-echo $*
-return 0
-}
-
-my_gmt()
-{
-
-psxy $OVERLAY -K -JX5i/1.0i -X$SHIFTX -Y$SHIFTY -R$bds1 -N \
- -Ba$tick:"x":/a$tick1:"u1"::.:WSne \
- -W0.5p/0/0/0 \
- <<EOF >> $PSFILE
-`awk '{print $1,$2}' $U1`
-EOF
-
-psxy -O -K -JX -R$bds2 -N -Y1.5i \
- -Ba$tick::/a$tick2:"u2"::.:Wsne \
- -W0.5p/0/0/0 \
- <<EOF >> $PSFILE
-`awk '{print $1,$2}' $U2`
-EOF
-
-psxy -O $MORETHING -JX -R$bds3 -N -Y1.5i \
- -Ba$tick::/a$tick3:"-u3"::."$TITLE":Wsne \
- -W0.5p/0/0/0 \
- <<EOF >> $PSFILE
-`awk '{print $1,$2}' $U3`
-EOF
-
-}
-
-if (test $# -lt "1"); then
- echo usage: $self [-i tick] [-x -5/5] [-u -0.1/0.1] [...] wdir/index
- echo or
- echo usage: $self [-o plot.ps] [...] wdir/index1 ... wdir/indexN
- echo ""
- echo options:
- echo -i tick interval
- echo -o filename.ps stack all profiles in the same plot
- echo -x interval sets the range on the x-axis
- echo -u interval sets the range on the u1-axis
- echo -v interval sets the range on the u2-axis
- echo -w interval sets the range on the u3-axis
- echo ""
- echo "plots the profiles index1-up.xy index1-north.xy index1-east.xy"
-
- exit
-fi
-
-gmtset LABEL_FONT_SIZE 12p
-gmtset HEADER_FONT_SIZE 12p
-gmtset ANOT_FONT_SIZE 12p
-gmtset COLOR_BACKGROUND 0/0/255
-gmtset COLOR_FOREGROUND 255/0/0
-gmtset PAPER_MEDIA a5
-gmtset HEADER_OFFSET 0.c
-
-while getopts ":x:i:o:u:v:w:" flag
-do
- #echo "$flag" $OPTIND $OPTARG
- case "$flag" in
- i) iset=1;tick=$OPTARG;;
- o) oset=1;TITLE=$(basename $OPTARG);PSFILE=$(dirname $OPTARG)/$(basename $OPTARG .ps).ps;;
- x) xset=1;START=`echo $OPTARG | awk -F"/" '{print $1}'`;END=`echo $OPTARG | awk -F"/" '{print $2}'`;;
- u) uset=1;MIN1=`echo $OPTARG | awk -F"/" '{print $1}'`;MAX1=`echo $OPTARG | awk -F"/" '{print $2}'`;;
- v) vset=1;MIN2=`echo $OPTARG | awk -F"/" '{print $1}'`;MAX2=`echo $OPTARG | awk -F"/" '{print $2}'`;;
- w) wset=1;MIN3=`echo $OPTARG | awk -F"/" '{print $1}'`;MAX3=`echo $OPTARG | awk -F"/" '{print $2}'`;;
- esac
-done
-
-for foo in $xset $iset $oset $uset $vset $wset;do
- shift;shift;
-done
-
-if [ "$oset" == "1" ]; then
- PDFFILE=$(dirname $PSFILE)/$(basename $PSFILE .ps).pdf
- rm -f $PSFILE $PDFFILE
-fi
-
-# initial values
-MORETHING="-K"
-SHIFTX=2i
-SHIFTY=1i
-
-while [ "$#" != "0" ];do
-
-if [ "$oset" == "1" ]; then
- if [ "$#" == "1" ]; then
- MORETHING=""
- fi
-fi
-
-WDIR=`dirname $1`
-INDEX=`basename $1 .xy`
-U1=$WDIR/$INDEX-north.xy
-U2=$WDIR/$INDEX-east.xy
-U3=$WDIR/$INDEX-up.xy
-
-echo $self": in directory "$WDIR", ploting profile "$INDEX
-
-if [ ! -e $U3 ]; then
- echo $self": file "$U3" does not exist. exiting."
- exit
-fi
-if [ "$xset" != "1" ]; then
- START=`head -n 1 $U3 | awk '{print $1}'`
- END=`tail -n 1 $U3 | awk '{print $1}'`
-fi
-if [ "$iset" != "1" ]; then
- tick=`echo $START $END | awk '{printf "%.0e",($2-$1)/5}'`
-fi
-if [ "$uset" != "1" ]; then
- MAX1=`awk -v x=$END 'BEGIN{m=-1e20}{if($2>m && $1<=x){m=$2}}END{print m}' $U1`
- MIN1=`awk -v x=$END 'BEGIN{m=+1e20}{if($2<m && $1<=x){m=$2}}END{print m}' $U1`
-fi
-if [ "$vset" != "1" ]; then
- MAX2=`awk -v x=$END 'BEGIN{m=-1e20}{if($2>m && $1<=x){m=$2}}END{print m}' $U2`
- MIN2=`awk -v x=$END 'BEGIN{m=+1e20}{if($2<m && $1<=x){m=$2}}END{print m}' $U2`
-fi
-if [ "$wset" != "1" ]; then
- MAX3=`awk -v x=$END 'BEGIN{m=-1e20}{if($2>m && $1<=x){m=$2}}END{print m}' $U3`
- MIN3=`awk -v x=$END 'BEGIN{m=+1e20}{if($2<m && $1<=x){m=$2}}END{print m}' $U3`
-fi
-if [ "$oset" != "1" ]; then
- TITLE=$WDIR/$INDEX
- PSFILE=$WDIR/$INDEX-plot.ps
- PDFFILE=$WDIR/$INDEX-plot.pdf
- rm -f $PSFILE $PDFFILE
-fi
-
-bds1=$START/$END/$MIN1/$MAX1
-bds2=$START/$END/$MIN2/$MAX2
-bds3=$START/$END/$MIN3/$MAX3
-echo $self: using u1 range $MIN1/$MAX1, u2 range $MIN2/$MAX2, u3 range $MIN3/$MAX3
-tick1=`echo $MIN1 $MAX1 | awk '{printf "%.0e", ($2-$1)/5}'`
-tick2=`echo $MIN2 $MAX2 | awk '{printf "%.0e", ($2-$1)/5}'`
-tick3=`echo $MIN3 $MAX3 | awk '{printf "%.0e", ($2-$1)/5}'`
-
-echo $self": using x-axis interval ("$START","$END") with tick "$tick
-
-my_gmt
-
-if [ "$oset" == "1" ]; then
- OVERLAY=-O
- SHIFTX=0i
- SHIFTY=-3i
-else
- echo $self": Created map "$PSFILE
- #gv $PSFILE &
- ps2pdf -sPAPERSIZE="a4" $PSFILE $PDFFILE
- echo $self": Converted to pdf file "$PDFFILE
- xpdf -paper "A5" $PDFFILE -z -0 >& /dev/null &
-fi
-
-shift
-echo ""
-done
-
-if [ "$oset" == "1" ]; then
- echo $self": Created map "$PSFILE
- #gv $PSFILE &
- ps2pdf -sPAPERSIZE="a4" $PSFILE $PDFFILE
- echo $self": Converted to pdf file "$PDFFILE
- xpdf -paper "A5" $PDFFILE -z -0 >& /dev/null &
-fi
-
diff -r 51d43e0bbf74 -r 138acc5ce8af util/slip2source.sh
--- a/util/slip2source.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/slip2source.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
set -e
self=$(basename $0)
diff -r 51d43e0bbf74 -r 138acc5ce8af util/timeseries.sh
--- a/util/timeseries.sh Sun Sep 30 04:30:18 2012 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-#!/bin/sh
-
-set -e
-self=$(basename $0)
-trap 'echo $self: Some errors occurred. Exiting.; exit' ERR
-
-my_list_first()
-{
-if [ $# -eq 0 ]; then
- echo "";exit 0
-fi
-
-echo $1
-return 0
-}
-
-my_list_last()
-{
-if [ $# -eq 0 ]; then
- echo "";exit 0
-fi
-
-while [ $# -ne 1 ]; do
- shift
-done
-echo $1
-return 0
-}
-
-my_list_remove_head()
-{
-shift
-echo $*
-return 0
-}
-
-my_list_count()
-{
-count=0
-while [ $# -ne 0 ]; do
- shift
- count=`echo "$count + 1"|bc`
-done
-echo $count
-return 0
-}
-
-
-if (test $# -ne "3"); then
- echo "usage: "$self" WDIR/INDEX X Y"
- echo " creates time series WDIR/INDEX-X-Y.xytneu for coordinates (X,Y)"
- echo " from files ???-relax-{east,north,up}.grd in directory WDIR."
- echo " requires file WDIR/time.txt to add time information."
- exit 1
-fi
-
-
-WDIR=$(dirname $1)
-TSEFILE=$WDIR/$(basename $1 .xytneu)-$2-$3.xytneu
-COORD=$2" "$3
-
-echo $self": Using directory "$WDIR
-echo $self": Creating file "$TSEFILE
-echo $self": Sampling at coordinates "$COORD
-
-LIST=`ls $WDIR/???-relax-up.grd | awk -F "[/-]" '{print $(NF-2)}'`
-
-TMPFILE=$WDIR/temp
-rm -f $TSEFILE
-rm -f $TMPFILE"C"
-rm -f $TMPFILE"E"
-rm -f $TMPFILE"N"
-rm -f $TMPFILE"U"
-
-for ITEM in $LIST
-do
-
-GRDFILEE=$WDIR/$ITEM-relax-east.grd
-GRDFILEN=$WDIR/$ITEM-relax-north.grd
-GRDFILEU=$WDIR/$ITEM-relax-up.grd
-
-echo $self": Processing item "$ITEM" at coordinates "$COORD
-
-echo "$COORD" >> $TMPFILE"C"
-
-grdtrack -G$GRDFILEE -Z <<EOF >> $TMPFILE"E"
-$COORD
-EOF
-grdtrack -G$GRDFILEN -Z <<EOF >> $TMPFILE"N"
-$COORD
-EOF
-grdtrack -G$GRDFILEU -Z <<EOF >> $TMPFILE"U"
-$COORD
-EOF
-
-done
-TIMES=`cat $WDIR/time.txt`
-N1=`my_list_count $TIMES`
-N2=`my_list_count $LIST`
-
-echo $self": Done extracting from "$N2" files."
-
-if (test $N1 -eq $N2); then
- paste $TMPFILE"C" $WDIR/time.txt $TMPFILE"N" $TMPFILE"E" $TMPFILE"U" >$TSEFILE
- echo $self": File "$TSEFILE" successfully processed with time info"
-else
- paste $TMPFILE"C" $TMPFILE"N" $TMPFILE"E" $TMPFILE"U" >$TSEFILE
- echo $self": Time mismatch; file "$TSEFILE" has no time info"
-fi
-rm -f $TMPFILE"C" $TMPFILE"N" $TMPFILE"E" $TMPFILE"U"
-
diff -r 51d43e0bbf74 -r 138acc5ce8af util/wang2xyz.sh
--- a/util/wang2xyz.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/wang2xyz.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
set -e
self=$(basename $0)
diff -r 51d43e0bbf74 -r 138acc5ce8af util/xyz2grd.sh
--- a/util/xyz2grd.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/xyz2grd.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# author: sylvain barbot
#
diff -r 51d43e0bbf74 -r 138acc5ce8af util/xyz2vtk.sh
--- a/util/xyz2vtk.sh Sun Sep 30 04:30:18 2012 -0700
+++ b/util/xyz2vtk.sh Mon Oct 08 06:58:36 2012 -0700
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
set -e
self=$(basename $0)
More information about the CIG-COMMITS
mailing list