-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathplot_panel.ncl
66 lines (55 loc) · 1.41 KB
/
plot_panel.ncl
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
lsymmetric = True
;lsymmetric = False
load "gill.ncl"
begin
x = lon()
y = lat()
p = new((/ny, nx/), "float")
p!0 = "y"
p&y = y
p!1 = "x"
p&x = x
u = p
v = p
w = p
if (lsymmetric) then
symmetric(p, u, v, w, x, y)
else
antisymmetric(p, u, v, w, x, y)
end if
wks = gsn_open_wks("x11", "gill_wp")
resp = True
resp@vpWidthF = 0.8
resp@vpHeightF = 0.4
resp@vpXF = 0.1
resp@vpYF = 0.7
resp@gsnDraw = False
resp@gsnFrame = False
resv = resp
resp@cnLineThicknessF = 3.0
resp@cnLevelSelectionMode = "ExplicitLevels"
resp@cnInfoLabelOn = False
resw = resp
; resw@gsnContourZeroLineThicknessF = 2
; resw@cnLevels = (/-0.6, 0.3, -0.1, 0.0, 0.1, 0.3, 0.6/)
resw@gsnContourNegLineDashPattern = 2
resw@cnLevels = (/-0.6, 0.3, -0.1, 0.1, 0.3, 0.6/)
plotw = gsn_csm_contour(wks, w, resw)
resp@gsnContourNegLineDashPattern = 0
resp@cnLevels = (/-1.5, -1.2, -0.9, -0.6, -0.3, 0.3, 0.6, 0.9, 1.2, 1.5/)
resp@cnFillOn = False
plotp = gsn_csm_contour(wks, p, resp)
resv@vcRefAnnoOrthogonalPosF = -1.15
resv@vcRefMagnitudeF = 1.0
resv@vcRefLengthF = 0.02
resv@vcMinDistanceF = 0.02
resv@vcRefAnnoString2On = False
; resv@vcMinMagnitudeF = 0.3
plot = new(2, "graphic")
plot(0) = gsn_csm_vector(wks, u, v, resv)
overlay(plot(0), plotw)
plot(1) = gsn_csm_vector(wks, u, v, resv)
overlay(plot(1), plotp)
pres = True
gsn_panel(wks, plot, (/2, 1/), pres)
end