[ncl-talk] error: fatal:The result of the conditional expression yields a missing value. NCL can not determine branch, see ismissing function
Xi Chang
xi.chang01 at gmail.com
Fri Aug 22 15:21:06 MDT 2014
I checked,, they are ok,, Im just afradi that the problem is here
...
* delete(indices)*
* delete(first)*
end do
I delete them, so the the return value can not be loaded when i=1->173, as
they are deleted when i=0.
do you have any suggestion,, i just want to save every first date which has
negative value from my 2D data (station, time).
Thank you
On Sat, Aug 23, 2014 at 6:12 AM, Michael Notaro <mnotaro at wisc.edu> wrote:
> 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.
>
>
> On 08/22/14, Xi Chang wrote:
> > Thanks NCL and Michael,
> >
> > 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
> >
> >
> > do j=0,173
> > indices=ind(data1(j,:).lt.0.)
> > first=indices(0)
> > if(first.gt.121) then
> > date(j)=(first-121)+365
> > else
> > date(j)=first+244
> > end if
> > delete(indices)
> > delete(first)
> > end do
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Aug 22, 2014 at 5:40 AM, Michael Notaro <mnotaro at wisc.edu(javascript:main.compose()>
> wrote:
> >
> > > I think this should work.
> > >
> > >
> > > Say, the daily time series is x(0:364).
> > >
> > > indices=ind(x.lt.0.)
> > > first=indices(0)
> > >
> > >
> > >
> > >
> > > On 08/21/14, Xi Chang wrote:
> > > > Hallo NCL people,
> > > >
> > >
> > > > I have a question, i have a daily data 1D (point),, i'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'll have 20 indices which are
> associated with first negative value each year.
> > > >
> > > >
> > > > Thank you.
> > >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140823/ba7974ae/attachment.html
More information about the ncl-talk
mailing list