[cig-commits] [commit] master: fix treatment of -J option in grdmap.sh; fix coordinates erpatch_slip.sh; fix NaN in ViBlGrWhYeOrRe.cpt (863c1c7)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Sat Jul 5 22:27:27 PDT 2014
Repository : https://github.com/geodynamics/relax
On branch : master
Link : https://github.com/geodynamics/relax/compare/85f235bc32a892310a95e9a9f885243c5c696f83...863c1c758bb4a00540d449eb8bc735f3067eb62c
>---------------------------------------------------------------
commit 863c1c758bb4a00540d449eb8bc735f3067eb62c
Author: Sylvain Barbot <sbarbot at ntu.edu.sg>
Date: Sat Jul 5 22:27:15 2014 -0700
fix treatment of -J option in grdmap.sh; fix coordinates erpatch_slip.sh; fix NaN in ViBlGrWhYeOrRe.cpt
>---------------------------------------------------------------
863c1c758bb4a00540d449eb8bc735f3067eb62c
share/ViBlGrWhYeOrRe.cpt | 2 +-
util/erpatch.sh | 5 +++--
util/erpatch_slip.sh | 9 +++++----
util/grdmap.sh | 18 +++++++++++-------
4 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/share/ViBlGrWhYeOrRe.cpt b/share/ViBlGrWhYeOrRe.cpt
index aab1f57..d997741 100644
--- a/share/ViBlGrWhYeOrRe.cpt
+++ b/share/ViBlGrWhYeOrRe.cpt
@@ -103,4 +103,4 @@
9.800000e+01 255 0 0 9.900000e+01 255 0 0
B 0 0 0
F 255 255 255
-N 255 0 0
+N 255 255 255
diff --git a/util/erpatch.sh b/util/erpatch.sh
index 103333b..96251b2 100755
--- a/util/erpatch.sh
+++ b/util/erpatch.sh
@@ -14,7 +14,7 @@ selfdir=$(dirname $0)
cmdline=$*
trap 'echo $self: Some errors occurred. Exiting.; exit' ERR
-while getopts "b:c:gp:v:H:" flag
+while getopts "b:c:gp:v:H:J" flag
do
case "$flag" in
b) bset=1;bds=$OPTARG;;
@@ -22,13 +22,14 @@ do
g) gset=1;;
p) pset=1;U3=$OPTARG;;
v) vset=1;SIZE=$OPTARG;VECTOR=$OPTARG"c";;
+ J) Jset="-J";;
H) Hset=1;HEIGHT=$OPTARG;;
esac
done
for item in $bset $cset $pset $vset $Hset; do
shift;shift
done
-for item in $gset; do
+for item in $gset $Jset; do
shift
done
diff --git a/util/erpatch_slip.sh b/util/erpatch_slip.sh
index 81d0589..3da3485 100755
--- a/util/erpatch_slip.sh
+++ b/util/erpatch_slip.sh
@@ -14,7 +14,7 @@ selfdir=$(dirname $0)
cmdline=$*
trap 'echo $self: Some errors occurred. Exiting.; exit' ERR
-while getopts "b:c:gp:v:H:" flag
+while getopts "b:c:gp:v:H:J" flag
do
case "$flag" in
b) bset=1;bds=$OPTARG;;
@@ -22,13 +22,14 @@ do
g) gset=1;;
p) pset=1;U3=$OPTARG;;
v) vset=1;SIZE=$OPTARG;VECTOR=$OPTARG"c";;
+ J) Jset="-J";;
H) Hset=1;HEIGHT=$OPTARG;;
esac
done
for item in $bset $cset $pset $vset $Hset; do
shift;shift
done
-for item in $gset; do
+for item in $gset $Jset; do
shift
done
@@ -49,14 +50,14 @@ if [ "$gset" != "1" ]; 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`
+`awk '{if (">"==$1){print $0}else{print $1,$2}}' $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`
+`awk '{if (">"==$1){print $0}else{print $1,$2}}' $WDIR/rdykes-???.xy`
EOF
fi
fi
diff --git a/util/grdmap.sh b/util/grdmap.sh
index f620f26..3bb9c3e 100755
--- a/util/grdmap.sh
+++ b/util/grdmap.sh
@@ -73,11 +73,11 @@ my_gmt(){
fi
if [ -e "$selfdir/$subprog" ]; then
#echo $self: running $subprog $PSFILE $bds $VECTOR $U3 $HEIGHT
- eval "$subprog $gset -b $bds -v $VECTOR $OPTIONP -H $HEIGHT $PSFILE"
+ eval "$subprog $gset -b $bds -v $VECTOR $OPTIONP -H $HEIGHT $Jset $PSFILE"
else
if [ -e "$subprog" ]; then
#echo $self: running $subprog $PSFILE $bds $VECTOR $U3 $HEIGHT
- eval "$subprog $gset -b $bds -v $VECTOR $OPTIONP -H $HEIGHT $PSFILE"
+ eval "$subprog $gset -b $bds -v $VECTOR $OPTIONP -H $HEIGHT $Jset $PSFILE"
fi
fi
done
@@ -160,7 +160,7 @@ do
x) xset=1;;
C) Cset="-C";contour=$OPTARG;;
O) Oset=1;PSFILE=$(dirname $OPTARG)/$(basename $OPTARG .ps).ps;;
- J) Jset=1;PROJ=$OPTARG;;
+ J) Jset="-J";PROJ=$OPTARG;;
Y) Yset=1;Yshift=$OPTARG;;
esac
done
@@ -328,11 +328,15 @@ while [ "$#" != "0" -o "$Oset" == "1" ];do
# Cartesian vs geographic coordinates
if [ "$gset" != "-g" ]; then
- HEIGHT=`echo $bds | awk -F "/" '{printf("%fi\n",($4-$3)/($2-$1)*7)}'`
- if [ "$rset" != "1" ]; then
- PROJ="X7i/"$HEIGHT
+ if [ "$Jset" == "" ]; then
+ HEIGHT=`echo $bds | awk -F "/" '{printf("%fi\n",($4-$3)/($2-$1)*7)}'`
+ if [ "$rset" != "1" ]; then
+ PROJ="X7i/"$HEIGHT
+ else
+ PROJ="X7i/"-$HEIGHT
+ fi
else
- PROJ="X7i/"-$HEIGHT
+ HEIGHT="-"
fi
AXIS=-Ba${tick}:"":/a${tick}:""::."$TITLE":WSne
else
More information about the CIG-COMMITS
mailing list