-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsheba_plot_stackerr.gmt
More file actions
executable file
·41 lines (33 loc) · 1.58 KB
/
Copy pathsheba_plot_stackerr.gmt
File metadata and controls
executable file
·41 lines (33 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/csh
# script to contour the error surface for stacked results
# data is gridded at 0.25 in tlag, and 1 in fast direction
set GMT_PREFIX = X1X
$GMT_PREFIX gmtset PS_MEDIA A4 PROJ_LENGTH_UNIT inch
# get plotting information
set FAST = `tail -1 sheba_stack.sol | awk '{print $1}'`
set DFAST = `tail -1 sheba_stack.sol | awk '{print $2}'`
set TLAG = `tail -1 sheba_stack.sol | awk '{print $3}'`
set DTLAG = `tail -1 sheba_stack.sol | awk '{print $4}'`
set NSTACKED = `tail -1 sheba_stack.sol | awk '{print $5}'`
setenv TLAG_STEP `tail -1 sheba_stack.sol | awk '{print $6}'`
set TLAG_MAX = `head -1 sheba_stack.err | awk '{print (NF-1)*ENVIRON["TLAG_STEP"]}'`
cat sheba_stack.err |\
awk '{for (i = 0; i < NF; i++) printf("%f\n",$i) }' |\
$GMT_PREFIX xyz2grd -Gdata.grd -I"$TLAG_STEP"/1 -R0/"$TLAG_MAX"/-90/90 -ZBLa
$GMT_PREFIX grdcontour data.grd -C5 -L0.9/20 -JX6/6 -R0/"$TLAG_MAX"/-90/90 \
-B"0.1"a"0.2":"@~\144@~t (s)":/5a30:"Fast Direction (@~\260@~)"::".$1":WSne \
-A -K -P > sheba_stack_error.eps
$GMT_PREFIX grdcontour data.grd -L0.9/5.1 -C1 -JX -R -W1 -A -O -K >> sheba_stack_error.eps
$GMT_PREFIX grdcontour data.grd -L0.9/1.1 -C1 -JX -R -W10 -A -O -K >> sheba_stack_error.eps
$GMT_PREFIX psxy -JX -R -Sx0.5 -W5/0/0/255 -O -K <<END>> sheba_stack_error.eps
$TLAG $FAST
END
$GMT_PREFIX pstext -F+f14p,Helvetica,black+jLB -JX6/7 -R0/6/0/7 -X0 -Y0 -O <<END>> sheba_stack_error.eps
3.2 6.6 @~\144@~t = $TLAG +/- $DTLAG (s)
3.2 6.4 fast = $FAST +/- $DFAST (@~\260@~)
3.2 6.2 no. of results stacked = $NSTACKED
0.2 6.5 STACKED ERROR
0.2 6.25 SURFACES
END
rm -f data.grd
# done