-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot_t_grd
47 lines (35 loc) · 1.08 KB
/
plot_t_grd
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
42
43
44
45
46
47
#!/bin/sh
# plot_grd
# sh plot_t_grd txt_file with longitude, latitude and shift time
#
# Yong ZHOU
# 2017-09-16
txt=$1
grd=${txt}.grd
surface -Rg -I0.2/0.2 -G${grd} $txt
#of=`echo $grd | gawk -F. '{print $1$2}'`
of=$grd
echo $grd $of
title=`echo $grd | gawk -F. '{print $1}'`
R=g
#min=`grdinfo $grd | grep z_min | gawk '{print $3}'`
#max=`grdinfo $grd | grep z_min | gawk '{print $5}'`
#min=-2.46 # add by yzhou 2020-05-02
#max=7.89
min=-2.74
max=8.15
#max=7
psbasemap -R$R -JN180/5i -Bg30/g30:."$title": -K -P > ${of}.ps
#grd2cpt $grd -Cjet -Z > tmp.cpt
#makecpt -Cjet -T${min}/${max}/0.1 -Z >tmp.cpt
#makecpt -Cpolar -T-3.3/3.3/0.1 -Z >tmp.cpt
grdimage $grd -R -J -Bg30/g30 -Ctmp.cpt -K -O -fg >> ${of}.ps
#pscoast -R -J -Df -Wblack -K -O >> ${of}.ps
pscoast -R -J -Di -Wblack -A40000 -K -O >> ${of}.ps
psscale -D5.2i/1.2i/2.2i/0.1i -Ctmp.cpt -Ba1f0.2/:"Time Shift (s)": -K -O >> ${of}.ps
#psscale -D5.2i/1.2i/2.2i/0.1i -Ctmp.cpt -Ba2f0.5/:"TD anomaly (s)": -K -O >> ${of}.ps
psxy -R -J -T -O >> ${of}.ps
ps2raster -Tg -A ${of}.ps
ps2raster -Tf -A ${of}.ps
evince ${of}.pdf