[ncl-talk] Query about probability density functions

Giorgio Graffino g.graffino at tim.it
Wed Sep 11 08:01:19 MDT 2024


Hi Dennis,
 
Thank you for pointing out that detail. 
 
I've found the code of the pdfx function in here 
(https://github.com/NCAR/ncl/blob/develop/ni/src/examples/gsun/contributed.ncl) 
and the frequency is computed as pdf = 100d0*pdf/nMax. I tried to 
normalize the pdf by multiplying the frequency pdf by the number of data 
and divide by 100, but the results is very different depending on the 
number of data to compute the pdf. Also, the results are different from 
similar computations using Python, especially with large number of data. 
Without knowing what the Fortran routine does (and I can't find it), I 
don't know how to normalize NCL to match Python.
 
Any suggestions?
 
Cheers,
Giorgio
 
------ Messaggio Originale ------
Da: shea at ucar.edu
A: g.graffino at tim.it Cc: ncl-talk at ucar.edu
Inviato: lunedì, settembre 9º 2024, 08:15 PM
Oggetto: Re: [ncl-talk] Query about probability density functions
 
 From the pdfx 
<https://www.ncl.ucar.edu/Document/Functions/Contributed/pdfx.shtml> 
documentation:  "The PDF units are percent [%]."
 
Divide by 100.
 

 
On Mon, Sep 9, 2024 at 10:26 AM Giorgio Graffino via ncl-talk 
<ncl-talk at mailman.ucar.edu <mailto:ncl-talk at mailman.ucar.edu> > wrote:
 
Hello NCL experts,
 
I'm using pdfx to compute probability density functions 
(https://www.ncl.ucar.edu/Document/Functions/Contributed/pdfx.shtml 
<https://www.ncl.ucar.edu/Document/Functions/Contributed/pdfx.shtml> ). 
I noticed that the cumulative density functions sum up to 100 in NCL, 
instead of 1 as per definition. Why is that? How can I normalize them 
back to 1?
 
Thanks for your help.
 
Cheers,
Giorgio
_______________________________________________
ncl-talk mailing list
ncl-talk at mailman.ucar.edu <mailto:ncl-talk at mailman.ucar.edu>
List instructions, subscriber options, unsubscribe:
https://mailman.ucar.edu/mailman/listinfo/ncl-talk 
<https://mailman.ucar.edu/mailman/listinfo/ncl-talk>
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20240911/48ef458b/attachment.htm>


More information about the ncl-talk mailing list