Hi everyone,
I have one question regarding calculating probability density functions for
observation and forecast. I chose Pacific North American index both for
observation and forecast. The data dimensions of my observation and
forecast are (120,88) and (120,88,27) where 120 are lead time, 88 are
number of predictions and 27 are ensemble members. I used this code to
calculate the pdfs
;***********************************************************
; pdf_1.ncl
;
; Concepts illustrated:
; - Generating univariate probability distributions
; - Generating PDFs of each sample distribution
; - Paneling two plots horizontally on a page
;***********************************************************
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"
begin
a = obs ;;;; dimensions are 120,88
b = forecast ;;;;;;; dimensions are 120,88,27
ap = pdfx(a, 0, False) ; default number of bins
bp = pdfx(b, 0, False)
;------------------------------------------------
; Plot each PDF
;------------------------------------------------
nVar = 2
plot = new ( nVar, "graphic")
wks = gsn_open_wks ("ps","pdf")
res = True
res@gsnDraw = False
res@gsnFrame = False
res@xyLineThicknessF = 2
res@tiYAxisString = "PDF (%)"
plot(0) = gsn_csm_xy (wks, ap@bin_center, ap, res)
plot(1) = gsn_csm_xy (wks, bp@bin_center, bp, res)
resP = True
resP@txString = "obs and forecast pdfs"
resP@gsnPanelRowSpec = True ; tell panel what order to
plt
gsn_panel(wks,plot,(/1,2/),resP)
end
My question is how the function pdfx works because in the pdf1.ncl it is
not mentioned what dimension of x should and if x has more than 1 dimension
how it works (i.e. which dimension or it combines all dimensions)?
For forecast, the pdf should be at least calculated atleast for each lead
time by combining the predictions and ensemble members.
Thank you in advance.
-- Best Regards Waqar Younas PhD Candidate Natural Resources and Environmental Studies (NRES) University of Northern British Columbia (UNBC) Canada
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun May 26 01:26:36 2013
This archive was generated by hypermail 2.1.8 : Tue Jun 11 2013 - 12:03:58 MDT