1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/taylor/01.ncl Mon Jan 26 22:08:20 2009 -0500
1.3 @@ -0,0 +1,57 @@
1.4 +;**********************************
1.5 +; taylor_3.ncl
1.6 +;**********************************
1.7 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
1.8 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
1.9 +load "./taylor_diagram.ncl"
1.10 +;**********************************
1.11 +begin
1.12 +;**********************************
1.13 +; Assume the following have already been computed:
1.14 +; _ratio are the ratio: Case_Variance/Reference_Variance
1.15 +; _cc are the cross correlation coef of Case to Reference
1.16 +;**********************************
1.17 +
1.18 +; Cases [Model]
1.19 + case = (/ "Case A", "Case B" /)
1.20 + nCase = dimsizes(case ) ; # of Cases [Cases]
1.21 +
1.22 +; variables compared
1.23 + var = (/ "SLP","Tsfc","Prc","Prc 30S-30N","LW","SW", "U300", "Guess" /)
1.24 + nVar = dimsizes(var) ; # of Variables
1.25 +
1.26 +; "Case A"
1.27 + CA_ratio = (/1.230, 0.988, 1.092, 1.172, 1.064, 0.966, 1.079, 0.781/)
1.28 + CA_cc = (/0.958, 0.973, 0.740, 0.743, 0.922, 0.982, 0.952, 0.433/)
1.29 +
1.30 +; "Case B"
1.31 + CB_ratio = (/1.129, 0.996, 1.016, 1.134, 1.023, 0.962, 1.048, 0.852 /)
1.32 + CB_cc = (/0.963, 0.975, 0.801, 0.814, 0.946, 0.984, 0.968, 0.647 /)
1.33 +
1.34 +; arrays to be passed to taylor plot
1.35 + ratio = new ((/nCase, nVar/),typeof(CA_cc) )
1.36 + cc = new ((/nCase, nVar/),typeof(CA_cc) )
1.37 +
1.38 + ratio(0,:) = CA_ratio
1.39 + ratio(1,:) = CB_ratio
1.40 +
1.41 + cc(0,:) = CA_cc
1.42 + cc(1,:) = CB_cc
1.43 +
1.44 +;**********************************
1.45 +; create plot
1.46 +;**********************************
1.47 +
1.48 + res = True ; default taylor diagram
1.49 +
1.50 + res@Markers = (/16, 16/) ; make all solid fill
1.51 + res@Colors = (/"red", "blue" /)
1.52 + res@varLabels = var
1.53 + res@caseLabels = case
1.54 +
1.55 + wks = gsn_open_wks("ps","taylor")
1.56 + plot = taylor_diagram(wks,ratio,cc,res)
1.57 +
1.58 + frame(wks)
1.59 +
1.60 +end