<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 5 4 2 2 2 3 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hmm thanks, but therein lies the problem, the start and end or increment is variable from year to year (and the year values are in a separate text file than
 the wind values which are in a text file) So start end for year one may be 1 4 but for year 2 it may be 5 5 and year 3 6-12, etc.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> jbuzan [mailto:jbuzan@purdue.edu]
<br>
<b>Sent:</b> Friday, September 12, 2014 1:04 PM<br>
<b>To:</b> Marcella, Marc<br>
<b>Cc:</b> ncl-talk@ucar.edu<br>
<b>Subject:</b> Re: [ncl-talk] calculating annual max values with varying amount of yearly values<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">ah. &nbsp;<o:p></o:p></p>
<div>
<p class="MsoNormal">Well, a quick way to deal with this is to parse the data into years using nco commands. &nbsp;(ncks -d time start,end,increment data_in.nc data_out.nc). &nbsp;Then run stat_dispersion.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">-Jonathan<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<p class="MsoNormal">On Sep 12, 2014, at 1:01 PM, Marcella, Marc &lt;<a href="mailto:MMarcella@AIR-WORLDWIDE.COM">MMarcella@AIR-WORLDWIDE.COM</a>&gt; wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">This is 1D data. It&#8217;s an array for the wind value for each event for a given year at a specific lat/lon location</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
</div>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<div>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">&nbsp;</span></span><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">jbuzan
 [<a href="mailto:jbuzan@purdue.edu"><span style="color:purple">mailto:jbuzan@purdue.edu</span></a>]<span class="apple-converted-space">&nbsp;</span><br>
<b>Sent:</b><span class="apple-converted-space">&nbsp;</span>Friday, September 12, 2014 1:01 PM<br>
<b>To:</b><span class="apple-converted-space">&nbsp;</span>Marcella, Marc<br>
<b>Cc:</b><span class="apple-converted-space">&nbsp;</span><a href="mailto:ncl-talk@ucar.edu"><span style="color:purple">ncl-talk@ucar.edu</span></a><br>
<b>Subject:</b><span class="apple-converted-space">&nbsp;</span>Re: [ncl-talk] calculating annual max values with varying amount of yearly values</span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">stat_dispersion only works on 1D data. &nbsp;So you have to loop through each grid cell. &nbsp;However, it will provide you with the local statistics of each grid cell.<o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">-Jonathan<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">On Sep 12, 2014, at 12:55 PM, Marcella, Marc &lt;<a href="mailto:MMarcella@AIR-WORLDWIDE.COM"><span style="color:purple">MMarcella@AIR-WORLDWIDE.COM</span></a>&gt; wrote:<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><br>
<br>
<br>
<o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Yes, I know of stat dispersion, but wont this look at the statistics/distribution of the entire dataset? I was looking to figure out only for each year. I believe
 I could use the max command provided I can get the beginning and final index value for each year easily enough.</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
</div>
</div>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<div>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">&nbsp;</span></span><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">jbuzan
 [<a href="mailto:jbuzan@purdue.edu"><span style="color:purple">mailto:jbuzan@purdue.edu</span></a>]<span class="apple-converted-space">&nbsp;</span><br>
<b>Sent:</b><span class="apple-converted-space">&nbsp;</span>Friday, September 12, 2014 12:54 PM<br>
<b>To:</b><span class="apple-converted-space">&nbsp;</span>Marcella, Marc<br>
<b>Cc:</b><span class="apple-converted-space">&nbsp;</span><a href="mailto:ncl-talk@ucar.edu"><span style="color:purple">ncl-talk@ucar.edu</span></a><br>
<b>Subject:</b><span class="apple-converted-space">&nbsp;</span>Re: [ncl-talk] calculating annual max values with varying amount of yearly values</span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">I recommend using stat_dispersion:<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/stat_dispersion.shtml"><span style="color:purple">http://www.ncl.ucar.edu/Document/Functions/Contributed/stat_dispersion.shtml</span></a><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">-Jonathan<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">On Sep 12, 2014, at 12:49 PM, Marcella, Marc &lt;<a href="mailto:MMarcella@AIR-WORLDWIDE.COM"><span style="color:purple">MMarcella@AIR-WORLDWIDE.COM</span></a>&gt; wrote:<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><br>
<br>
<br>
<br>
<o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">Hi all,</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;"><br>
Im having a bit of a problem trying to elegantly script calculating annual max values when I have varying amount of values for each year. For example, I have one text file with the year stamp for each event, and in another I have the corresponding wind value
 for that event.&nbsp; Some years there are four measurements, some years one, other years ten. Im trying to use a do loop that goes through each year in the text file to find the beginning and end index (i.e. what index refers to the beginning of that year&#8217;s values
 in the wind file and the index that refers to the last value of that year).&nbsp; I was then going to use that specific year&#8217;s indices with the max command on the wind value file.&nbsp; But I&#8217;m having not having too much luck and it&#8217;s getting messy with all the do and
 if statements.&nbsp; Any ideas?&nbsp; Are there simpler functions that Im not aware of built into NCL that can help with this?&nbsp; Any help would be greatly appreciated.</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">&nbsp;</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">Thanks,<br>
Marc</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;">_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk"><span style="color:purple">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</span></a></span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</body>
</html>