<div dir="ltr"><div>Hello Qudsia</div><div><br></div><div>re: "... if there is a function that transforms from cdfgam_p to
the standard normal distribution. As you have asked 'gmm_transform' is
supposed to acquire the necessary transformation to 'standard normal
distribution'. If you could have a look."</div><div><br></div><div>I could not find any function to transform from cdfgam_p to
the standard normal distribution. Sorry.<br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Apr 17, 2025 at 11:59 PM qudsia zafar <<a href="mailto:missquaddus@gmail.com">missquaddus@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Dennis,<div><br></div><div>As I couldn't find the direct function for spei calculation just like there is for spi in NCL therefore i was trying to do things manually. </div><div><br></div><div>Till now I have used the 'dim_gamfit_n' function output (shape and scale parameters) as an input in the <b><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/cdfgam_p.shtml" target="_blank">cdfgam_p</a> </b>function. Now the probabilities (gridded data) acquired have to be transformed into the 'standard normal distribution' resulting in the spei values with a mean of 0 and standard deviation of 1. </div><div><br></div><div>An spei of 0 indicates near normal conditions, positive values indicate wetter than average conditions and negative values are drier than average conditions.</div><div><br></div><div>I was wondering if there is a function that transforms from cdfgam_p to the standard normal distribution. As you have asked 'gmm_transform' is supposed to acquire the necessary transformation to 'standard normal distribution'. If you could have a look.</div><div><br></div><div>Thx.</div><div><br></div><div>qudsia</div><div><br></div><div><br></div><div><ul style="margin:10px 0px 20px;padding:0px 0px 0px 24px;font-size:16px;line-height:22px;color:rgb(0,29,53);font-family:"Google Sans",Arial,sans-serif"><li style="margin:0px 0px 8px;padding:0px 0px 0px 4px;list-style-position:inherit;list-style-type:none"><div style="padding-bottom:0px;padding-top:8px;border-bottom:medium"><div><div style="min-width:0px"><div style="line-height:22px;overflow:hidden;padding-bottom:4px"><br></div></div></div></div></li></ul></div><div><b> </b></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 18 Apr 2025 at 06:41, Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>NCL's <b><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/cdfgam_p.shtml" target="_blank">cdfgam_p</a> </b>documentation mentions 'gamma' functions from R, Matlab and Excel. <br></div><div><br></div><div><div>What is your 'gmm_transform' supposed to return?</div><div><br></div><div><br></div><div><br><br></div></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 17, 2025 at 2:32 AM qudsia zafar via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi i am using cru datasets (ts 4.08) for precipitation and potential evapotranspiration. I have done (precip_minus_pet = prc - pet) and then <div>I have used the function 'dim_gamfit_n' to estimate shape and scale parameters for the gamma distribution fitting. <div><br></div><div>However in the next step of spei calculation I need to do the following:</div><div><br></div><div><span style="background-color:rgba(245,248,255,0.5);color:rgb(0,29,53);font-family:monospace;font-size:14px;white-space:pre-wrap">spei = gmm_transform(precip_minus_pet, shape, scale)</span> </div><div><br></div><div>I have now all the three data (<span style="background-color:rgba(245,248,255,0.5);color:rgb(0,29,53);font-family:monospace;font-size:14px;white-space:pre-wrap">precip_minus_pet, shape, scale)</span> but i don't know if NCL has a gamma transformation function available? I have seen 'cdfgam_p' but I don't know if this corresponds to the gamma transform?. Kindly advise which function can be used in the final step of spei calculation. Many Thx..</div><div><br></div><div>qudsia</div><div><br></div><div><br></div><div><br></div><div> <br><h1 style="padding:5px;font-size:20pt;line-height:22pt;font-family:"lucida sans",verdana,arial,sans-serif;color:rgb(2,83,143);clear:both"><br></h1> </div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>