[ncl-talk] error: fatal:The result of the conditional expression yields a missing value. NCL can not determine branch, see ismissing function
Michael Notaro
mnotaro at wisc.edu
Fri Aug 22 15:12:03 MDT 2014
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.
> >
More information about the ncl-talk
mailing list