[ncl-talk] Error in storing the output (gives fill value)

Ipshita Majhi ipmajhi at alaska.edu
Fri Dec 5 17:30:22 MST 2014


Thank you
Best Regards
Ipshita

On Friday, December 5, 2014, Li Jiapeng <hjiapli at gmail.com> wrote:

> I think the missing values are caused by 'dimension mismatch', linint1_n
> would return an array of size 365, but the the size of xday is 47*365, you
> can define xday as a 2D array:
>
> xday = new((/47, 365/), "float")
>
> and assign the interpolated data to a slice each time:
>
> xday(i, :) = linint1_n(...)
>
>
>
> On December 6, 2014 7:49:11 AM GMT+08:00, Ipshita Majhi <
> ipmajhi at alaska.edu <javascript:;>> wrote:
> >Yes it does produce a dimension mismatch if I put an i in the xday. I
> >want
> >to store 47 years which are 365 days long for each year in one single
> >array.
> >
> >I am not able to do it without either the dimension mismatch or getting
> >an
> >array which only has fill values.
> >Do you know how I can fix it.
> >
> >Thank You
> >Best Regards
> >Ipshita
> >
> >On Fri, Dec 5, 2014 at 5:42 PM, Li Jiapeng <hjiapli at gmail.com
> <javascript:;>> wrote:
> >
> >> Hi, Ipshita
> >>
> >> I don't quite understand your script, what you want to do is store
> >one
> >> year's data through each loop, is it necessary to update the whole
> >xday (47
> >> years) array. At my first sight, it would produce a
> >'dimension-mismatch'
> >> error.
> >>
> >> On December 6, 2014 4:50:57 AM GMT+08:00, Ipshita Majhi <
> >> ipmajhi at alaska.edu <javascript:;>> wrote:
> >> >Dear NCL,
> >> >
> >> >I am trying to store my output in an iterative loop and I created
> >the
> >> >variable using new as well. But it gives fill values in the output.
> >I
> >> >was
> >> >wondering why that is. I am converting weekly data to daily data via
> >> >interpolation
> >> >
> >> >*************************************
> >> >
> >> >xday=new(47*365,"float");Variable created to store 47 years of daily
> >> >data
> >> >
> >> >do i=0,46
> >> >
> >> >matching= ind(year_52(i).eq.time_year) ;extracting indices for each
> >> >year
> >> >
> >> >sceweek=x(matching);52 /53 weeks snow cover data
> >> >
> >> >xday= linint1_n (fspan(0,364,dimsizes(sceweek)), sceweek, True,
> >> >fspan(0,364,365), 0, 0) ; Interpolating weekly to daily data for
> >each
> >> >year
> >> >end do
> >> >*******************************************************************
> >> >
> >> >Thank You
> >> >Best Regards
> >> >Ipshita
> >> >
> >> >
> >>
> >>------------------------------------------------------------------------
> >> >
> >> >_______________________________________________
> >> >ncl-talk mailing list
> >> >List instructions, subscriber options, unsubscribe:
> >> >http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >>
> >> --
> >> Sent from my Android device with K-9 Mail. Please excuse my brevity.
> >> _______________________________________________
> >> ncl-talk mailing list
> >> List instructions, subscriber options, unsubscribe:
> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >>
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141205/6e9c6a23/attachment.html 


More information about the ncl-talk mailing list