-
Notifications
You must be signed in to change notification settings - Fork 1
/
map_geonet-sensors.gmt
executable file
·68 lines (54 loc) · 2.06 KB
/
map_geonet-sensors.gmt
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#! /bin/bash
## -- parameters that need to be changed
out=fig_map-geonet.ps
appear=basic
### --- GMT settings
gmt gmtdefaults -Ds > .gmtdefaults4
#gmt gmtset PS_MEDIA A4
gmt gmtset FONT_LABEL 10
gmt gmtset MAP_FRAME_TYPE plain
## region of interest for main map
R=-R165/190/-52/-24
R=-R165/185/-48/-28
J=-JM18
B=-B1a5WSne
## symbol colors
sp="-Sc0.1 -Gdarkgreen"
sm="-Sc0.1 -Gdarkgreen"
gnss="-St0.2 -Gdarkturquoise"
en="-Sd0.2 -Gyellow"
cam="-Ss0.2 -Gred"
tg="-Si0.2 -Gblue"
dart="-Sc0.2 -Gblue"
# gnss
grep 9999-01 ~/git/delta/network/marks.csv | cut -d, -f 5,6 | sed -e 's/,/ /g' > gnss.$$
# seism and acoustic
grep 9999-01 ~/git/delta/network/stations.csv | grep -E -v ",SB,|,SM,|,SC,|,SX,|,EN,|,TD,|,TG," | cut -d, -f 4,5 | sed -e 's/,/ /g' > sp.$$
# strong motion (SB, SM, SC, SX)
grep 9999-01 ~/git/delta/network/stations.csv | grep -E ',SB,|,SM,|,SC,|,SX,' | cut -d, -f 4,5 | sed -e 's/,/ /g' > sm.$$
# environmental (EN)
grep 9999-01 ~/git/delta/network/stations.csv | grep ",EN," | cut -d, -f 4,5 | sed -e 's/,/ /g' > en.$$
# dart (TD)
grep 9999-01 ~/git/delta/network/stations.csv | grep ",TD," | cut -d, -f 4,5 | sed -e 's/,/ /g' > dart.$$
# tide gauge (TG)
grep 9999-01 ~/git/delta/network/stations.csv | grep ",TG," | cut -d, -f 4,5 | sed -e 's/,/ /g' > tg.$$
# cameras
grep 9999-01 ~/git/delta/network/mounts.csv | cut -d, -f 4,5 | sed -e 's/,/ /g' > cam.$$
gmt pscoast $J $R -Glightgray -W1/gray52 -Dh -P -K > $out
gmt psxy sm.$$ $J $R -: $sm -K -O >> $out
gmt psxy sp.$$ $J $R -: $sp -K -O >> $out
gmt psxy dart.$$ $J $R -: $dart -K -O >> $out
gmt psxy tg.$$ $J $R -: $tg -K -O >> $out
gmt psxy cam.$$ $J $R -: $cam -K -O >> $out
gmt psxy gnss.$$ $J $R -: $gnss -K -O >> $out
gmt psxy en.$$ $J $R -: $en -K -O >> $out
gmt pslegend -Dx0.3i/0.5i+w5i/3.3i+jBL+l1. -O << EOF >> $out
S 0.1 s 0.25 darkgreen 0.25p 0.3 seismic sensor
S 0.1 c 0.25 blue 0.25p 0.3 water pressure sensor
S 0.1 t 0.25 darkturquoise 0.25p 0.3 GNSS
S 0.1 d 0.25 yellow 0.25p 0.3 environmental sensor
S 0.1 s 0.25 red 0.25p 0.3 camera
EOF
rm *.$$
gmt psconvert -Tg $out
evince $out