-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot_sat_proj.pro
102 lines (86 loc) · 2.42 KB
/
plot_sat_proj.pro
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
pro plot_sat_proj, data, lon, lat, $
pngfile=pngfile, $
scp_send=scp_send1, $
scp_dest=scp_dest1, $
range=range, $
title=pic_title, $
cb_title=cb_title
if not keyword_Set(pic_title) then begin
pic_title = 'test'
endif
if not keyword_Set(cb_title) then begin
cb_title = pic_title
endif
if not keyword_Set(range) then begin
range = minmax(data)
endif
Slat = -5.
Nlat = 60.
Llon = 60.
Rlon = 170.
cgPS_Open, 'gems.ps'
cgDisplay, aspect=0.7
pos = [0.1,0.15,0.9,0.90]
charsize = (!D.Name EQ 'PS') ? cgDefCharsize()*0.7 : cgDefCharsize()*0.75
thick = (!D.Name EQ 'PS') ? 6 :3
londel = 10
latdel = 10
cgMap_set,20,120, Limit=[-60, 0, 60, 360],$
pos=pos,charsize=charsize,$
/satellite,/iso,$
/horizon, $
title=pic_title
;LoadCT, 22, Ncolors=254,bottom=1
dsloadct, 33
sz = size(data)
dim1 = sz[1]
dim2 = sz[2]
for j = 0L, dim2-3 do begin
for i = 0L, dim1-3 do begin
if (lat[i,j] ge Slat) and (lat[i,j] le Nlat) and $
(lon[i,j] ge Llon) and (lon[i,j] le Rlon) then begin
if data[i,j] gt 0 and data[i, j] le 500 then begin
xbox = [lon[i,j], lon[i+1,j], lon[i+1,j], lon[i,j]]
ybox = [lat[i,j], lat[i,j], lat[i,j+1], lat[i,j+1]]
xbox = xbox[where(finite(xbox) eq 1, /null)]
ybox = ybox[where(finite(ybox) eq 1, /null)]
polyfill, xbox, ybox, $
color=bytscl(data[i,j], $
min=range[0], $
max=range[1], $
top=253)
endif
endif
endfor
endfor
cgMap_Grid, Color='black', GLinestyle=1,londel=londel, latdel=latdel, charsize=1 $
,LONLAB=20 ,LATLAB=160, LABEL=1
cgMap_continents, color='black'
cgColorbar, format='(f6.1)', range=range, $
Position=[pos[0]+0.065, pos[1]-0.04, pos[2]-0.065, pos[1]-0.02], $
Color='black',$
OOB_High=253, $
OOB_low=0,$
divisions=5, $
bottom=0, $
ncolor=254, $
minor=1, $
charsize=1.5,$
XTicklen=1, $
XMinor=0, $
AnnotateColor='black', $
Title=cb_title
cgPS_Close
if not keyword_Set(pngfile) then begin
pngfile = 'test.png'
endif
cgPS2Raster,'gems.ps', pngfile, /png, density = 1000
if not keyword_Set(scp_dest1) then begin
scp_dest1 = '[email protected]:/home/soodal/works/plot'
endif
; send image to pc
if keyword_set(scp_send1) then begin
spawn, 'scp -P18742 -p ' + pngfile + $
' ' + scp_dest1
endif
end