<br><font size=2 face="sans-serif">Thanks Arlindo...sounds promising! I'll
try your suggestion and will let you know how it turned out.</font><br><font size=2 face="sans-serif">Stephen Mc</font><br><br><br><table width=100%><tr valign=top><td width=40%><font size=1 face="sans-serif"><b>Arlindo da Silva &lt;dasilva@ALUM.MIT.EDU&gt;</b></font><br><font size=1 face="sans-serif">Sent by: GRADSUSR@LIST.CINECA.IT</font><p><font size=1 face="sans-serif">04/28/2008 11:14 PM</font><table border><tr valign=top><td bgcolor=white><div align=center><font size=1 face="sans-serif">Please respond to<br>GRADSUSR@LIST.CINECA.IT</font></div></table><br><td width=59%><table width=100%><tr valign=top><td><div align=right><font size=1 face="sans-serif">To</font></div><td><font size=1 face="sans-serif">GRADSUSR@LIST.CINECA.IT</font><tr valign=top><td><div align=right><font size=1 face="sans-serif">cc</font></div><td><tr valign=top><td><div align=right><font size=1 face="sans-serif">Subject</font></div><td><font size=1 face="sans-serif">Re: Calculating Percentiles in GrADS</font></table><br><table><tr valign=top><td><td></table><br></table><br><br><font size=3>Stephen,</font><br><br><font size=3>&nbsp;&nbsp; This is the kind of problem that can be easily
solved in PyGrADS. For example, the module Pylab implements several Matlab
compatible functions, in particular prctile() which computes percentiles.
The overall approach is:</font><br><br><font size=3>1. Open the file</font><br><font size=3>2. Export the GrADS variables, say the 3D time/lat/lon
&nbsp;array, to Python</font><br><font size=3>3. Transpose the array and use prctile() to compute the
percentiles in each gridpoint, transposing the array back in the end</font><br><font size=3>4. At this point you can chose to plot the results in
Python (with Matplotlib) or in GrADS; see sample plots attached.</font><br><br><font size=3>I am including a self contained script which does the
above calculation on the sample &quot;</font><a href=http://slp_djf.nc><font size=3 color=blue><u>slp_djf.nc</u></font></a><font size=3>&quot;
file that is included as test data (either in PyGrADS tarball or in the
Win32 superpack). Your particular application will involve a bit more programming
for selecting the timeseries for each day of the year, but I hope this
script gives you the general idea.</font><br><br><font size=3>You can download PyGrADS (including the Win32 Superpck
version) from </font><a href=http://sf.net><font size=3 color=blue><u>sf.net</u></font></a><font size=3>:</font><br><br><font size=3>&nbsp;&nbsp; &nbsp; &nbsp; </font><a href="http://sourceforge.net/project/showfiles.php?group_id=161773&amp;package_id=256758"><font size=3 color=blue><u>http://sourceforge.net/project/showfiles.php?group_id=161773&amp;package_id=256758</u></font></a><br><br><font size=3>You can find some documentation on the Wiki:</font><br><br><font size=3>&nbsp;&nbsp; &nbsp; &nbsp; </font><a href="http://opengrads.org/wiki/index.php?title=Python_Interface_to_GrADS"><font size=3 color=blue><u>http://opengrads.org/wiki/index.php?title=Python_Interface_to_GrADS</u></font></a><br><br><font size=3>&nbsp;&nbsp;Let me know if you have questions,</font><br><br><font size=3>&nbsp;&nbsp;Good Luck,</font><br><br><font size=3>&nbsp;&nbsp; &nbsp; &nbsp; Arlindo</font><br><br><br><font size=3>On Mon, Apr 28, 2008 at 2:34 PM, Stephen R McMillan &lt;</font><a href=mailto:smcmillan@planalytics.com><font size=3 color=blue><u>smcmillan@planalytics.com</u></font></a><font size=3>&gt;
wrote:</font><br><br><font size=2 face="sans-serif">I found nothing in the user archives
to address this question: Is there a relatively simple way to calculate
various percentiles in GrADS? For example:</font><br><br><font size=2 face="sans-serif">1. &nbsp;Assume I have a 30-year dataset
of daily mean temperature values for an x-y domain, contained in a single
3D (x,y,t) gridded file</font><br><font size=2 face="sans-serif">2. &nbsp;Desired output: a single 3D
gridded file containing 11 variables for each gridpoint, per day of year
(excluding Feb 29th): 0th pcntile, 10th pcntile, 20th pcntile...100th pcntile.
In other words, there would be 30 data values to analyze per grid location
(each Jan 1st, each Jan 2nd...each Dec 31st).</font><br><br><font size=2 face="sans-serif">My alternative would be to evaluate
text output in Excel then re-convert to gridded, but I'd prefer to keep
in GrADS.</font><br><br><font size=2 face="sans-serif">I'm using GrADS v1.9.0-rc1 (win32) on
Win XP Pro. </font><br><br><font size=2 face="sans-serif">Stephen Mc</font><br><br><font size=3>***************************************************</font><br><font size=3>The information contained in this e-mail message is intended
only for the use of the recipient(s) named above and may contain information
that is privileged, confidential, and/or proprietary. &nbsp;If you are
not the intended recipient, you may not review, copy or distribute this
message. &nbsp;If you have received this communication in error, please
notify the sender immediately by e-mail, and delete the original message.</font><br><font size=3>***************************************************</font><br><br><br><br><font size=3>-- </font><br><font size=3>Arlindo da Silva</font><br><a href=mailto:dasilva@alum.mit.edu><font size=3 color=blue><u>dasilva@alum.mit.edu</u></font></a><font size=3>[attachment &quot;py_prctiles_50.png&quot; deleted by Stephen R. McMillan/Planalytics]
</font><font size=2 face="sans-serif">[attachment &quot;ga_prctiles_50.png&quot;
deleted by Stephen R. McMillan/Planalytics] [attachment &quot;percentile.py&quot;
deleted by Stephen R. McMillan/Planalytics] </font><br><BR>
<BR>
***************************************************<BR>
The information contained in this e-mail message is intended only for the use of the recipient(s) named above and may contain information that is privileged, confidential, and/or proprietary.  If you are not the intended recipient, you may not review, copy or distribute this message.  If you have received this communication in error, please notify the sender immediately by e-mail, and delete the original message.<BR>
***************************************************<BR>