forrest@0: ;********************************** forrest@0: ; taylor_3.ncl forrest@0: ;********************************** forrest@0: load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" forrest@0: load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" forrest@0: load "./taylor_diagram.ncl" forrest@0: ;********************************** forrest@0: begin forrest@0: ;********************************** forrest@0: ; Assume the following have already been computed: forrest@0: ; _ratio are the ratio: Case_Variance/Reference_Variance forrest@0: ; _cc are the cross correlation coef of Case to Reference forrest@0: ;********************************** forrest@0: forrest@0: ; Cases [Model] forrest@0: case = (/ "Case A", "Case B" /) forrest@0: nCase = dimsizes(case ) ; # of Cases [Cases] forrest@0: forrest@0: ; variables compared forrest@0: var = (/ "SLP","Tsfc","Prc","Prc 30S-30N","LW","SW", "U300", "Guess" /) forrest@0: nVar = dimsizes(var) ; # of Variables forrest@0: forrest@0: ; "Case A" forrest@0: CA_ratio = (/1.230, 0.988, 1.092, 1.172, 1.064, 0.966, 1.079, 0.781/) forrest@0: CA_cc = (/0.958, 0.973, 0.740, 0.743, 0.922, 0.982, 0.952, 0.433/) forrest@0: forrest@0: ; "Case B" forrest@0: CB_ratio = (/1.129, 0.996, 1.016, 1.134, 1.023, 0.962, 1.048, 0.852 /) forrest@0: CB_cc = (/0.963, 0.975, 0.801, 0.814, 0.946, 0.984, 0.968, 0.647 /) forrest@0: forrest@0: ; arrays to be passed to taylor plot forrest@0: ratio = new ((/nCase, nVar/),typeof(CA_cc) ) forrest@0: cc = new ((/nCase, nVar/),typeof(CA_cc) ) forrest@0: forrest@0: ratio(0,:) = CA_ratio forrest@0: ratio(1,:) = CB_ratio forrest@0: forrest@0: cc(0,:) = CA_cc forrest@0: cc(1,:) = CB_cc forrest@0: forrest@0: ;********************************** forrest@0: ; create plot forrest@0: ;********************************** forrest@0: forrest@0: res = True ; default taylor diagram forrest@0: forrest@0: res@Markers = (/16, 16/) ; make all solid fill forrest@0: res@Colors = (/"red", "blue" /) forrest@0: res@varLabels = var forrest@0: res@caseLabels = case forrest@0: forrest@0: wks = gsn_open_wks("ps","taylor") forrest@0: plot = taylor_diagram(wks,ratio,cc,res) forrest@0: forrest@0: frame(wks) forrest@0: forrest@0: end