<div dir="ltr">[1]<br>If you have 6.1.1 or newer use the reassignment operatore: := <br><div><br> uk := f1-><br><br></div><div>[2] else<br><br><p class="MsoNormal">do k = 0, 2</p>
<p class="MsoNormal"> f1 = addfile("CDL_2010_"+county(k)+".nc","r")</p>
<p class="MsoNormal"> u1 = f1->Band1(:,:)</p><p class="MsoNormal"> :</p><p class="MsoNormal"> :</p><p class="MsoNormal"> delete(u1)<br></p>
end do<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 20, 2015 at 9:21 AM, Wang, Jiali <span dir="ltr"><<a href="mailto:jialiwang@anl.gov" target="_blank">jialiwang@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal">Dear NCL users,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am trying to read in files which have different dimension sizes, and get fatal error: Dimension sizes of left hand side and right hand side of assignment do not match.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Here is my ncl script:<u></u><u></u></p>
<p class="MsoNormal">==============<u></u><u></u></p>
<p class="MsoNormal">county = (/"Delaware","Sioux","Lincoln"/)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">do k = 0, 2<u></u><u></u></p>
<p class="MsoNormal"> f1 = addfile("CDL_2010_"+county(k)+".nc","r")<u></u><u></u></p>
<p class="MsoNormal"> u1 = f1->Band1(:,:)<u></u><u></u></p>
<p class="MsoNormal">end do<u></u><u></u></p>
<p class="MsoNormal">===============<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Since the dimension sizes of the three data sets are totally different, the script works only for k=0,0 or k=1,1 or k=2,2. Is there a way to address this problem? Something like, make it forgets the dimension of last loop (say, k=0) and
starts the next loop (say, k=1)? I have much more than three data sets needed to be read in.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks!<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Jiali <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">Jiali Wang, Ph. D<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">Environmental Science Division<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">Argonne National Laboratory<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">Tel: <a href="tel:630-252-2848" value="+16302522848" target="_blank">630-252-2848</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><a href="http://www.evs.anl.gov/about-evs/staff/detail/index.cfm?/Wang/Jiali" target="_blank">http://www.evs.anl.gov/about-evs/staff/detail/index.cfm?/Wang/Jiali</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<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></blockquote></div><br></div>