forrest@0
|
1 |
;**********************************
|
forrest@0
|
2 |
; taylor_3.ncl
|
forrest@0
|
3 |
;**********************************
|
forrest@0
|
4 |
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
|
forrest@0
|
5 |
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
|
forrest@0
|
6 |
load "./taylor_diagram.ncl"
|
forrest@0
|
7 |
;**********************************
|
forrest@0
|
8 |
begin
|
forrest@0
|
9 |
;**********************************
|
forrest@0
|
10 |
; Assume the following have already been computed:
|
forrest@0
|
11 |
; _ratio are the ratio: Case_Variance/Reference_Variance
|
forrest@0
|
12 |
; _cc are the cross correlation coef of Case to Reference
|
forrest@0
|
13 |
;**********************************
|
forrest@0
|
14 |
|
forrest@0
|
15 |
; Cases [Model]
|
forrest@0
|
16 |
case = (/ "Case A", "Case B" /)
|
forrest@0
|
17 |
nCase = dimsizes(case ) ; # of Cases [Cases]
|
forrest@0
|
18 |
|
forrest@0
|
19 |
; variables compared
|
forrest@0
|
20 |
var = (/ "SLP","Tsfc","Prc","Prc 30S-30N","LW","SW", "U300", "Guess" /)
|
forrest@0
|
21 |
nVar = dimsizes(var) ; # of Variables
|
forrest@0
|
22 |
|
forrest@0
|
23 |
; "Case A"
|
forrest@0
|
24 |
CA_ratio = (/1.230, 0.988, 1.092, 1.172, 1.064, 0.966, 1.079, 0.781/)
|
forrest@0
|
25 |
CA_cc = (/0.958, 0.973, 0.740, 0.743, 0.922, 0.982, 0.952, 0.433/)
|
forrest@0
|
26 |
|
forrest@0
|
27 |
; "Case B"
|
forrest@0
|
28 |
CB_ratio = (/1.129, 0.996, 1.016, 1.134, 1.023, 0.962, 1.048, 0.852 /)
|
forrest@0
|
29 |
CB_cc = (/0.963, 0.975, 0.801, 0.814, 0.946, 0.984, 0.968, 0.647 /)
|
forrest@0
|
30 |
|
forrest@0
|
31 |
; arrays to be passed to taylor plot
|
forrest@0
|
32 |
ratio = new ((/nCase, nVar/),typeof(CA_cc) )
|
forrest@0
|
33 |
cc = new ((/nCase, nVar/),typeof(CA_cc) )
|
forrest@0
|
34 |
|
forrest@0
|
35 |
ratio(0,:) = CA_ratio
|
forrest@0
|
36 |
ratio(1,:) = CB_ratio
|
forrest@0
|
37 |
|
forrest@0
|
38 |
cc(0,:) = CA_cc
|
forrest@0
|
39 |
cc(1,:) = CB_cc
|
forrest@0
|
40 |
|
forrest@0
|
41 |
;**********************************
|
forrest@0
|
42 |
; create plot
|
forrest@0
|
43 |
;**********************************
|
forrest@0
|
44 |
|
forrest@0
|
45 |
res = True ; default taylor diagram
|
forrest@0
|
46 |
|
forrest@0
|
47 |
res@Markers = (/16, 16/) ; make all solid fill
|
forrest@0
|
48 |
res@Colors = (/"red", "blue" /)
|
forrest@0
|
49 |
res@varLabels = var
|
forrest@0
|
50 |
res@caseLabels = case
|
forrest@0
|
51 |
|
forrest@0
|
52 |
wks = gsn_open_wks("ps","taylor")
|
forrest@0
|
53 |
plot = taylor_diagram(wks,ratio,cc,res)
|
forrest@0
|
54 |
|
forrest@0
|
55 |
frame(wks)
|
forrest@0
|
56 |
|
forrest@0
|
57 |
end
|