<div dir="ltr"><div><div><div><div><div><div><div>ikeep = ind(.not.(isleapyear(TIME(:,0)) .and. TIME(:,1).eq.3 .and. TIME(:,2).eq.31) )<br><br>===<br></div>re: &quot;..Yes because i just need to analyze JFM (90 days) for 40 years.&quot;<br><br></div>I would suggest another approach:<br><br></div>ii   = ind(TIME(:,1).eq.1 .and. TIME(:,2).eq.1)    ; Jan 1 each year<br><br></div>nii = dimsizes(ii)<br><br></div>do n=0,n_istart-1<br></div>     x = f-&gt;X(ii(n):ii(n)+89, :,:)<br><br><br></div>end do<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 17, 2015 at 6:58 AM, Alan Brammer <span dir="ltr">&lt;<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default"><font face="verdana, sans-serif">Depending on how long your dataset is, this may be more reliable than mod 4.  </font><br><font face="verdana, sans-serif"><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/isleapyear.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/isleapyear.shtml</a></font><br></div><div class="gmail_default"><font face="verdana, sans-serif">e.g. 1900 was not a leap year. </font></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 17 April 2015 at 08:30, Marcus Morgan <span dir="ltr">&lt;<a href="mailto:mmorgan2009@my.fit.edu" target="_blank">mmorgan2009@my.fit.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Here you would use the modulus function.  Every four years a leap year occurs, so:<div><br></div><div><br></div><div>leap=ind(mod(Time(:,0), 4) .eq. 0 .and. <span style="font-size:12.8000001907349px">TIME(:,1).eq.3 .and. TIME(:,2).eq.31)        ; Chooses March 31st From those Leap Years</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">keep=ind(.not.Time(leap,0))</span></div><div><div><div style="font-size:12.8000001907349px">FOO = foo(keep,:,:)<br></div><span style="font-size:12.8000001907349px">delete(foo)</span><br></div></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Haven&#39;t tested it, but it should work.</span></div><div><span style="font-size:12.8000001907349px">Good Luck</span></div></div><div class="gmail_extra"><br clear="all"><div><div><p><span style="font-family:Arial,sans-serif"><font color="#3333ff"><b>Marcus N. Morgan<u><br></u></b></font></span><span style="color:rgb(51,51,255);font-family:Arial,sans-serif">Graduate of Meteorology<br></span><i style="font-family:Arial,sans-serif"><font color="#3333ff">Department of Marine and Environmental Systems<br></font></i><span style="color:rgb(51,51,255);font-family:Arial,sans-serif">   Florida Institute of Technology<br></span><span style="color:rgb(51,51,255);font-family:Arial,sans-serif">   150 W. University Blvd.<br></span><span style="color:rgb(51,51,255);font-family:Arial,sans-serif">   Melbourne, FL 32901</span></p></div></div><div><div>
<br><div class="gmail_quote">On Fri, Apr 17, 2015 at 1:52 AM, Xi Chang <span dir="ltr">&lt;<a href="mailto:xi.chang01@gmail.com" target="_blank">xi.chang01@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Dennis,<div><br></div><div>Yes because i just need to analyze JFM (90 days) for 40 years. I know the above trick but i just want delete 31 march only for LEAP YEAR not for whole years. Do you know how to do that?</div><div><br></div><div>thanks<div><div><br><br>On Friday, April 17, 2015, Dennis Shea &lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>[1] Yes ... there is a way<br></div>[2] But ... why would ypu want to do that? It introduces a &#39;spectral gap&#39; in the time series.<br><br>===<br></div>  foo(time,lat,lon)<br><br></div>  time has units understood by cd_calendar<br>  <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/cd_calendar.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/cd_calendar.shtml</a><br><br></div><div>  TIME = cd_calendar(time, 0)<br></div><div><br></div>  ikeep = ind(.not.(TIME(:,1).eq.3 .and. TIME(:,2).eq.31) )<br></div>  FOO = foo(ikeep,:,:)<br></div>  delete(foo)<br><div><div><div><br>  <br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 16, 2015 at 4:16 PM, Xi Chang <span dir="ltr">&lt;<a>xi.chang01@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi NCL, <div>I have 40 years daily data, i need to delete 31 march only for the leap year, is there any quick way to do that?</div><div><br></div><div>Regards</div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div></div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>