<div dir="ltr"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear Sir Adam,</div><div><br></div><div>Thank you for the information.</div><div>I apologize for the unclear question.</div><div><br></div><div>Is there a way to plot a histogram this way:</div><div>x-axis: bin of gridpoints (say in my previous email, there are 300 gridpoints within rain_region. Then I have to bin this by 5)</div><div>y-axis: frequency of rainfall occurrence above 0 mm/day.</div><div><br></div><div>Thank you so much for the help.</div><div><br></div><div>Sincerely,</div></div></div></div></div></div></div></div></div></div></div>Lyndz</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 10, 2019 at 2:11 AM Adam Phillips <<a href="mailto:asphilli@ucar.edu">asphilli@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 Lyndz,<div>Perhaps I am not understanding what you are wanting to do, but I think gsn_histogram will do exactly what you need, regardless of whether you are counting up the number of grid points or values in a timeseries that fall in each bin. You would pass ndtooned(rain_region) into gsn_histogram, and it doesn't matter whether you pass every time step individually or all timesteps at once. </div><div>Adam</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 9, 2019 at 12:38 AM Lyndz via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@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 dir="ltr" class="gmail-m_1187603261618039321gmail-m_-2912153877904815092gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear NCL-experts,</div><div><br></div><div><b>[Details]</b></div><div><b><br></b></div><div>I am using the aphrodite rainfall data set, which I uploaded in my dropbox folder:</div><div><a href="https://www.dropbox.com/s/lbkjlqgq9era5c7/APHRO_AMJ_1979-2015.nc?dl=0" target="_blank">https://www.dropbox.com/s/lbkjlqgq9era5c7/APHRO_AMJ_1979-2015.nc?dl=0</a><br></div><div><br></div><div><br></div><div>I would like to count the number of grid points over a specified region with rainfall in the following intervals(mm/day): 0-2, 2-4,4-6,6-8,8-10,10-12,12-14,14-16,16-18,18-20,20-22,22-24,24-26,26-28,28-30. Then, create a histogram.</div><div><br></div><div> f1 = addfile("APHRO_AMJ_1979-2015.nc","r")<br><b> latS = 12.5<br> latN = 20.0<br> lonL = 120.0<br> lonR = 122.5</b><br> prec = f1->precip(:,:,:)<br> rain_region=prec(:,{latS:latN},{lonL:lonR}) ;select subregion<br></div><div><br></div><div>This is almost similar to this example <a href="https://www.ncl.ucar.edu/Applications/Scripts/Katrina_circle_hist.ncl" target="_blank">https://www.ncl.ucar.edu/Applications/Scripts/Katrina_circle_hist.ncl</a></div><div>But I am binning the number of grid points.</div><div><br></div><div>Any suggestions on how to do this in NCL?</div><div><br></div><div>I'll appreciate any guidance.</div><div><br></div><div>Sincerely,</div><div>Lyndz</div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_1187603261618039321gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>