<div dir="ltr">so that in the end, i would have only as <b>date(station) </b> contain the index pointed to first date having negative value..</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Aug 23, 2014 at 6:21 AM, Xi Chang <span dir="ltr"><<a href="mailto:xi.chang01@gmail.com" target="_blank">xi.chang01@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I checked,, they are ok,, Im just afradi that the problem is here<div><br></div><div>...</div><div><div style="font-family:arial,sans-serif;font-size:13px">
<b> delete(indices)</b></div><div style="font-family:arial,sans-serif;font-size:13px">
<b> delete(first)</b></div></div><div style="font-family:arial,sans-serif;font-size:13px">end do</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
I delete them, so the the return value can not be loaded when i=1->173, as they are deleted when i=0.</div><div style="font-family:arial,sans-serif;font-size:13px">do you have any suggestion,, i just want to save every first date which has negative value from my 2D data (station, time).</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Thank you</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Aug 23, 2014 at 6:12 AM, Michael Notaro <span dir="ltr"><<a href="mailto:mnotaro@wisc.edu" target="_blank">mnotaro@wisc.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Perhaps sometimes you never have a negative data value. Then indices would be empty.Try printing indices each time in the 0,173 loop to check.<br>
<div><br>
<br>
On 08/22/14, Xi Chang wrote:<br>
> Thanks NCL and Michael,<br>
><br>
> Do you know the source of this following error: fatal:The result of the conditional expression yields a missing value. NCL can not determine branch, see ismissing function<br>
><br>
><br>
> do j=0,173<br>
> indices=ind(data1(j,:).lt.0.)<br>
> first=indices(0)<br>
> if(first.gt.121) then<br>
> date(j)=(first-121)+365<br>
> else<br>
> date(j)=first+244<br>
> end if<br>
> delete(indices)<br>
> delete(first)<br>
> end do<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
</div><div><div>> On Fri, Aug 22, 2014 at 5:40 AM, Michael Notaro <<a href="mailto:mnotaro@wisc.edu" target="_blank">mnotaro@wisc.edu</a>(javascript:main.compose()> wrote:<br>
><br>
> > I think this should work.<br>
> ><br>
> ><br>
> > Say, the daily time series is x(0:364).<br>
> ><br>
> > indices=ind(x.lt.0.)<br>
> > first=indices(0)<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > On 08/21/14, Xi Chang wrote:<br>
> > > Hallo NCL people,<br>
> > ><br>
> ><br>
> > > I have a question, i have a daily data 1D (point),, i&#39;d like to get the index which has the first negative value and save the index per year. if i have 20 years, then i&#39;ll have 20 indices which are associated with first negative value each year.<br>
> > ><br>
> > ><br>
> > > Thank you.<br>
> ><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>