<div dir="ltr">I speculate possible rounding issues are the rationale for not having a supported &#39;testspan&#39;.<br><br>fortran-66 or fortran_-V used to allow a real/double &#39;stride&#39; in do loops. In some cases, the rounding errors resulted in premature loop termination or one extra iteration.  A real/double stride was no longer allowed starting with f77.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 13, 2015 at 2:01 PM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.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" style="font-size:small">There&#39;s an undocumented build-in function called &quot;testspan&quot; that may also do what you want. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">It&#39;s never been made public and it is *not* guaranteed to live forever, so use at your own risk.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">These three statements should give you the same set of values:</div><div class="gmail_default">







<p><font face="monospace, monospace">  ilat = ispan(-360, 360,   5)   * 0.25</font></p><p><font face="monospace, monospace">  flat = fspan( -90,  90, 145)</font></p><p><font face="monospace, monospace">  lat  = testspan(  -90,  90,   1.25)</font></p><p style="font-size:small">The next question is probably going to be: &quot;why isn&#39;t this public&quot;?</p><p style="font-size:small">The answer is, &quot;I don&#39;t remember&quot;.  I think it has something to do with precision accuracy that can potentially cause a problem. Here&#39;s an example of where you would get different values, with a slight change in precision:</p><p><font face="monospace, monospace"><span>f1 = testspan(1,9.999999,3)   </span>; 1,4,7                                                   </font><span style="font-family:monospace,monospace">f2 = testspan(1,9.9999999,3)  </span><span style="font-family:monospace,monospace">; 1,4,7,10 </span></p><p><span>If you add a &quot;d&quot; to make the second argument a double, then you get better results:</span></p><p><font face="monospace, monospace"><span>d1 = testspan(1,9.999999d,3)   ; 1,4,7 <br></span>d2 = testspan(1,9.9999999d,3)  ; 1,4,7</font></p><p><span>--Mary</span></p><span class="HOEnZb"><font color="#888888"><p><span><br></span></p><p style="font-size:small"><br></p><p style="font-size:small">--Mary</p><p style="font-size:small"><br></p></font></span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 13, 2015 at 6:54 AM, Carl Schreck <span dir="ltr">&lt;<a href="mailto:cjschrec@ncsu.edu" target="_blank">cjschrec@ncsu.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">This is a feature I&#39;d wanted too, so I wrote a simple little function to do it (attached). cspan (for Carl&#39;s span, because I couldn&#39;t think of anything more descriptive).<div><br></div><div>   Carl</div></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Fri, Oct 9, 2015 at 9:58 AM, Dennis Shea <span dir="ltr">&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Please see &#39;fspan&#39;<br>
<br>
xlow = 1e-7<br>
xhi   = 4e-05<br>
xinc = 1e-7<br>
nn   = toint((xhi-xlow)/xinc)+1<br>
<br>
x = fspan(xlow, xhi, nn)<br>
<br>
====<br>
*you* can create your own function<br>
<br>
function myspan(xlow, xhi, xinc)<br>
<br>
that will return  the values<br>
<span><br>
On Fri, Oct 9, 2015 at 6:55 AM, Ahmad Farsyud &lt;<a href="mailto:a.farsyud@gmail.com" target="_blank">a.farsyud@gmail.com</a>&gt; wrote:<br>
</span><div><div>&gt; Hallo,<br>
&gt;<br>
&gt; Is there any solution to execute the following command:<br>
&gt;<br>
&gt; ncl 0&gt; x= ispan (1e-7,4e-5,1e-7)<br>
&gt; fatal:ispan: arguments must be of an integral type, can&#39;t continue<br>
&gt; fatal:[&quot;Execute.c&quot;:8573]:Execute: Error occurred at or near line 0<br>
&gt;<br>
&gt; Thanks<br>
&gt; Ahmad<br>
&gt;<br>
</div></div><div><div>&gt; _______________________________________________<br>
&gt; ncl-talk mailing list<br>
&gt; <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
&gt; List instructions, subscriber options, unsubscribe:<br>
&gt; <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
&gt;<br>
_______________________________________________<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><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br><table style="max-width:100%;border-collapse:collapse;border-spacing:0px;color:rgb(51,51,51);font-size:14px;border:3px solid rgb(170,170,170);font-family:Times;line-height:12px;background-color:transparent" border="0" cellpadding="2" cellspacing="2"><tbody><tr><td height="71" align="center" width="71"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><a href="http://www.cicsnc.org/" style="color:rgb(38,58,143);text-decoration:none;font-weight:bold" target="_blank"><img src="http://www.cicsnc.org/assets/images/cicsnc-logo.png" height="93" width="96"></a>  <a href="http://www.researcherid.com/rid/B-8711-2011" target="_blank"><br></a></span></span><br><font size="4"><b style="text-align:start;color:rgb(38,58,143);font-family:arial,helvetica,sans-serif"> <a href="http://www.cyclonecenter.org/" style="color:rgb(38,58,143);text-decoration:none" target="_blank">Cyclone</a></b><a href="http://www.cyclonecenter.org/" style="text-align:start;color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;text-decoration:none" target="_blank">Center.org</a>  </font></td><td valign="top"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><b>Carl J. Schreck III, PhD</b><br><b>Research Associate</b><br></span></span><a href="http://www.cicsnc.org/" style="font-family:arial,helvetica,sans-serif;font-size:11px;color:rgb(38,58,143);text-decoration:none;font-weight:bold" target="_blank">Cooperative Institute for Climate and Satellites NC (CICS-NC)</a> /<br><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><a href="http://www.cicsnc.org/" style="color:rgb(38,58,143);text-decoration:none;font-weight:bold" target="_blank">North Carolina Institute for Climate Studies (NCICS)</a> <br><a href="http://ncsu.edu/" style="color:rgb(38,58,143);text-decoration:none;font-weight:bold" target="_blank">North Carolina State University</a><br><a href="http://ncei.noaa.gov/" style="color:rgb(38,58,143);text-decoration:none;font-weight:bold" target="_blank">NOAA National Centers for Environmental Information (NCEI)</a><br>151 Patton Ave, Asheville, NC 28801<br>e: </span></span><a href="mailto:cjschrec@ncsu.edu" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;text-decoration:none;font-weight:bold" target="_blank">cjschrec@ncsu.edu</a><br style="font-family:arial,helvetica,sans-serif;font-size:11px"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif">o: <a href="tel:%2B1%20828%20257%203140" value="+18282573140" target="_blank">+1 828 257 3140</a><br></span></span><a href="http://scholar.google.com/citations?hl=en&amp;user=th8ONEcAAAAJ&amp;view_op=list_works&amp;sortby=pubdate" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;text-decoration:none;font-weight:bold" target="_blank">Publications</a><br><a href="http://monitor.cicsnc.org/mjo/" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;text-decoration:none;font-weight:bold" target="_blank">monitor.cicsnc.org/mjo</a><br style="font-family:arial,helvetica,sans-serif;font-size:11px"></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div>
</div>
<br>_______________________________________________<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><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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><br>
<br></blockquote></div><br></div>