load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" ;******************************************** begin a1 = addfile("./temp/Statout.nc","r") fmean = a1->series_cnt_FBAR omean = a1->series_cnt_OBAR printMinMax(fmean,0) printMinMax(omean,0) opt = True opt@bin_min = 0.0 opt@bin_max = 2.0 zpdf = pdfx(fmean, 11, opt) zpdf2 = pdfx(omean, 11, opt) printVarSummary(zpdf) nVar = 2 nBin = zpdf@nbins ; retrieve the number of bins xx = new ( (/nVar, nBin/), typeof(zpdf)) xx(0,:) = zpdf@bin_center ; assign appropriate "x" axis values xx(1,:) = zpdf2@bin_center yy = new ( (/nVar, nBin/), typeof(zpdf)) yy(0,:) = (/ zpdf /) yy(1,:) = (/ zpdf2 /) labes = (/"Fcst vs Obs Mean"/) wks_type = "png" wks_type@wkWidth = 2500 wks_type@wkHeight = 2500 wname = "Test_bin" wks = gsn_open_wks(wks_type,wname) gsn_define_colormap(wks,"gui_default") ;************************************************ ; create panel plots ;************************************************* plot_A = new (1, graphic) ; create graphical array res = True res@gsnDraw = False res@gsnFrame = False res@xyLineThicknesses = (/2.0,2.0,2.0/) res@xyLineColors = (/"blue","red","green"/) res@xyMonoDashPattern = True ; all solid res@tiYAxisString = "Counts" res@pmLegendDisplayMode = "Always" ; turn on legend res@pmLegendSide = "Top" ; Change location of res@pmLegendParallelPosF = .55 ; move units right res@pmLegendOrthogonalPosF = -0.4 ; move units down res@pmLegendWidthF = 0.125 ; Change width and res@pmLegendHeightF = 0.15 ; height of legend. res@lgPerimOn = True ; turn off/on box around res@lgLabelFontHeightF = .015 ; label font height res@xyExplicitLegendLabels = (/"F","O"/) ; create explicit labels res@gsnDraw = False res@gsnFrame = False res@gsnLeftString = "" res@gsnRightString = "" res@gsnCenterString = labes(0) plot = gsn_csm_xy (wks, xx, yy, res) draw(plot) frame(wks) delete(wks) system("convert -trim " + wname + ".png " + wname + "Satl.png") ;******************************************** end