<p><span style="font-family:Arial;font-size:12pt;">Hi Dennis,</span></p><p> </p><p><span style="font-family:Arial;font-size:12pt;">Thank you for pointing out that detail. </span></p><p> </p><p><span style="font-family:Arial;font-size:12pt;">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.</span></p><p> </p><p><span style="font-family:Arial;font-size:12pt;">Any suggestions?</span></p><p> </p><p><span style="font-family:Arial;font-size:12pt;">Cheers,</span></p><p><span style="font-family:Arial;font-size:12pt;">Giorgio</span><br><br> </p><blockquote><p>------ Messaggio Originale ------<br>Da: shea@ucar.edu<br>A: g.graffino@tim.it Cc: ncl-talk@ucar.edu<br>Inviato: lunedì, settembre 9º 2024, 08:15 PM<br>Oggetto: Re: [ncl-talk] Query about probability density functions<br> </p><div dir="ltr"><div>From the <a target="_blank" rel="noopener noreferrer" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/pdfx.shtml"><strong>pdfx</strong></a> documentation:  "The PDF units are percent [%]."</div><div> </div><div>Divide by 100.<br> </div></div><p><br> </p><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Mon, Sep 9, 2024 at 10:26 AM Giorgio Graffino via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu"><span class="wt_Email">ncl-talk@mailman.ucar.edu</span></a>> wrote:<br> </div><blockquote class="gmail_quote" style="border-left:1.0px solid rgb(204,204,204);margin:0.0px 0.0px 0.0px 0.8ex;padding-left:1.0ex;"><p><span style="font-family:Arial;font-size:12.0pt;">Hello NCL experts,</span></p><p> </p><p><span style="font-family:Arial;font-size:12.0pt;">I'm using pdfx to compute probability density functions (</span><a target="_blank" rel="noopener noreferrer" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/pdfx.shtml"><span style="font-family:Arial;font-size:12.0pt;">https://www.ncl.ucar.edu/Document/Functions/Contributed/pdfx.shtml</span></a><span style="font-family:Arial;font-size:12.0pt;">). 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?</span><br><br> </p><p><span style="font-family:Arial;font-size:12.0pt;">Thanks for your help.</span></p><p> </p><p><span style="font-family:Arial;font-size:12.0pt;">Cheers,</span></p><p><span style="font-family:Arial;font-size:12.0pt;">Giorgio</span></p><p>_______________________________________________<br>ncl-talk mailing list<br><a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank"><span class="wt_Email">ncl-talk@mailman.ucar.edu</span></a><br>List instructions, subscriber options, unsubscribe:<br><a target="_blank" rel="noopener noreferrer" href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br> </p></blockquote></div></blockquote>