;Ref: https://www.ncl.ucar.edu/Applications/Scripts/taylor_2.ncl ;********************************** ; taylor_2.ncl ;********************************** ; ; These files are loaded by default in NCL V6.2.0 and newer ; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" ; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ; ; This file still has to be loaded manually load "./taylor_diagram.ncl" ;********************************** begin ;********************************** ; create some dummy data. ; ; All ratio values must be between 0 and 1.65 ; All cross correlation values are 0.0 to 1.0 [inclusive] ; _ratio are the ratio: Case_Variance/Reference_Variance ; _cc are the cross correlation coef of Case to Reference ;********************************** ; Cases [Model] case = (/ "Threshold 0.0 mm/day", "Threshold 0.1 mm/day", "Threshold 5.0 mm/day" /) nCase = dimsizes(case ) ; # of Cases [Cases] ; variables compared var = (/ "IMERG-DE","IMERG-DL","IMERG-DF","ERA-Interim","ERA5","SM2RAIN" /) nVar = dimsizes(var) ; # of Variables ; "Threshold 0.0 mm" dataset ; ratio =(/ DE/Obs, DL/Obs, DF/Obs, ERAI/Obs, ERA5/Obs, SM2RAIN/Obs /) t0_ratio = (/0.98, 0.96, 0.82, 0.69, 0.79, 0.29/) t0_cc = (/0.45, 0.46, 0.53, 0.51, 0.6, 0.2/) ; "Threshold 0.1 mm" dataset t01_ratio = (/0.94, 0.93, 0.78, 0.6, 0.72, 0.22/) t01_cc = (/0.38, 0.39, 0.46, 0.41, 0.52, 0.19/) ; "Threshold 5.0 mm" dataset t5_ratio = (/0.99, 0.97, 0.81, 0.57, 0.7, 0.2/) t5_cc = (/0.3, 0.3, 0.36, 0.3, 0.4, 0.2/) ;********************************** ; Put the ratios and pattern correlations into ; arrays for plotting ;********************************** nDataSets = 3 ; number of datasets npts = dimsizes(t0_ratio) ratio = new ((/nDataSets, npts/),typeof(t0_ratio) ) cc = new ((/nDataSets, npts/),typeof(t0_cc ) ) ratio(0,:) = t0_ratio cc(0,:) = t0_cc ratio(1,:) = t01_ratio cc(1,:) = t01_cc ratio(2,:) = t5_ratio cc(2,:) = t5_cc ;********************************** ; create plot ;********************************** res = True ; diagram mods desired res@tiMainString = "Example" ; title res@Colors = (/"red","green","blue"/) ; marker colors res@Markers = (/14,5,9/) ; marker styles res@markerTxYOffset = 0.04 ; offset btwn marker & label res@gsMarkerSizeF = 0.01 ; marker size res@txFontHeightF = 0.015 ; text size res@stnRad = (/ 0.5, 1.5 /) ; additional standard radii res@ccRays = (/ 0.6, 0.9 /) ; correlation rays res@ccRays_color = "Gray" ; "LightGray" ; default is "black" res@centerDiffRMS = True ; RMS 'circles' res@centerDiffRMS_color = "Gray" ; "LightGray" ; default is "black" res@varLabels = var res@caseLabels = case wks = gsn_open_wks("png","taylor") ; send graphics to PNG file plot = taylor_diagram(wks, ratio, cc, res) end