Thank you<div>Best Regards</div><div>Ipshita<br><br>On Friday, December 5, 2014, Li Jiapeng <<a href="mailto:hjiapli@gmail.com">hjiapli@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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:<br>
<br>
xday = new((/47, 365/), "float")<br>
<br>
and assign the interpolated data to a slice each time:<br>
<br>
xday(i, :) = linint1_n(...)<br>
<br>
<br>
<br>
On December 6, 2014 7:49:11 AM GMT+08:00, Ipshita Majhi <<a href="javascript:;" onclick="_e(event, 'cvml', 'ipmajhi@alaska.edu')">ipmajhi@alaska.edu</a>> wrote:<br>
>Yes it does produce a dimension mismatch if I put an i in the xday. I<br>
>want<br>
>to store 47 years which are 365 days long for each year in one single<br>
>array.<br>
><br>
>I am not able to do it without either the dimension mismatch or getting<br>
>an<br>
>array which only has fill values.<br>
>Do you know how I can fix it.<br>
><br>
>Thank You<br>
>Best Regards<br>
>Ipshita<br>
><br>
>On Fri, Dec 5, 2014 at 5:42 PM, Li Jiapeng <<a href="javascript:;" onclick="_e(event, 'cvml', 'hjiapli@gmail.com')">hjiapli@gmail.com</a>> wrote:<br>
><br>
>> Hi, Ipshita<br>
>><br>
>> I don't quite understand your script, what you want to do is store<br>
>one<br>
>> year's data through each loop, is it necessary to update the whole<br>
>xday (47<br>
>> years) array. At my first sight, it would produce a<br>
>'dimension-mismatch'<br>
>> error.<br>
>><br>
>> On December 6, 2014 4:50:57 AM GMT+08:00, Ipshita Majhi <<br>
>> <a href="javascript:;" onclick="_e(event, 'cvml', 'ipmajhi@alaska.edu')">ipmajhi@alaska.edu</a>> wrote:<br>
>> >Dear NCL,<br>
>> ><br>
>> >I am trying to store my output in an iterative loop and I created<br>
>the<br>
>> >variable using new as well. But it gives fill values in the output.<br>
>I<br>
>> >was<br>
>> >wondering why that is. I am converting weekly data to daily data via<br>
>> >interpolation<br>
>> ><br>
>> >*************************************<br>
>> ><br>
>> >xday=new(47*365,"float");Variable created to store 47 years of daily<br>
>> >data<br>
>> ><br>
>> >do i=0,46<br>
>> ><br>
>> >matching= ind(year_52(i).eq.time_year) ;extracting indices for each<br>
>> >year<br>
>> ><br>
>> >sceweek=x(matching);52 /53 weeks snow cover data<br>
>> ><br>
>> >xday= linint1_n (fspan(0,364,dimsizes(sceweek)), sceweek, True,<br>
>> >fspan(0,364,365), 0, 0) ; Interpolating weekly to daily data for<br>
>each<br>
>> >year<br>
>> >end do<br>
>> >*******************************************************************<br>
>> ><br>
>> >Thank You<br>
>> >Best Regards<br>
>> >Ipshita<br>
>> ><br>
>> ><br>
>><br>
>>------------------------------------------------------------------------<br>
>> ><br>
>> >_______________________________________________<br>
>> >ncl-talk mailing list<br>
>> >List instructions, subscriber options, unsubscribe:<br>
>> ><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
>><br>
>> --<br>
>> Sent from my Android device with K-9 Mail. Please excuse my brevity.<br>
>> _______________________________________________<br>
>> ncl-talk mailing list<br>
>> List instructions, subscriber options, unsubscribe:<br>
>> <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
>><br>
<br>
--<br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.<br>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>