<div dir="ltr"><div><font face="monospace">Hi Rick,</font></div><div><font face="monospace"><br></font></div><div><font face="monospace">thanks or your answer, in the end it did work. I had defined the variable further up in the script already which I had overlooked... so one should always check the script carefully!</font></div><div><font face="monospace"><br></font></div><div><font face="monospace">Thanks for your help,</font></div><div><font face="monospace">Anne</font></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 12, 2019 at 3:35 PM Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>At first glance, I would have thought those assignments should work, and indeed, if I try the simple test below, it does work.  Perhaps you might provide a printVarSummary() of the variables u, v, and var?<br></div><div><br></div><div>a = new((/2,3,4/),float)</div><div>b = (/ (/1,2,3,4/), (/2,3,4,5/), (/3,4,5,6/) /)</div><div>a(0,:,:) = b</div><div>print(a)<br><br><br>Variable: a<br>Type: float<br>Total Size: 96 bytes<br>            24 values<br>Number of Dimensions: 3<br>Dimensions and sizes:   [2] x [3] x [4]<br>Coordinates:<br>Number Of Attributes: 1<br>  _FillValue :  9.96921e+36<br>(0,0,0)  1<br>(0,0,1)  2<br>(0,0,2)  3<br>(0,0,3)  4<br>(0,1,0)  2<br>(0,1,1)  3<br>(0,1,2)  4<br>(0,1,3)  5<br>(0,2,0)  3<br>(0,2,1)  4<br>(0,2,2)  5<br>(0,2,3)  6<br>(1,0,0) 9.96921e+36<br>(1,0,1) 9.96921e+36<br>(1,0,2) 9.96921e+36<br>(1,0,3) 9.96921e+36<br>(1,1,0) 9.96921e+36<br>(1,1,1) 9.96921e+36<br>(1,1,2) 9.96921e+36<br>(1,1,3) 9.96921e+36<br>(1,2,0) 9.96921e+36<br>(1,2,1) 9.96921e+36<br>(1,2,2) 9.96921e+36<br>(1,2,3) 9.96921e+36</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 12, 2019 at 4:45 AM Anne via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello NCL users,<br><div><br></div><div>from a file, I am reading in u and v. As they are when I read them in, they have dimensions:</div><div><br></div><div> u :   [time | 1374] x [lat | 180] x [lon | 360]             </div><div> v:    [time | 1374] x [lat | 180] x [lon | 360]</div><div><br></div><div>Now I'd like to create a new variable "var" that ideally contains as a 1st dimension both u and v like:<br></div><div><br></div><div> var = new((/2,1374,180,360/), float)<br></div><div> var(0, : , : , : ) = u</div><div> var(1, : , : , : ) = v<br></div><div><br></div><div>but I get the error message that the dimensions of the left hand side and the right hand side do not match... I suppose the problem is that the time, lat, lon are coordinate variables while the 1st dimension is a physical variable. Is there another, better, way to define 'var' in order to allocate u and v in this way?</div><div><br></div><div>Thanks,</div><div>Anne</div></div>

<br>
<div><font style="font-family:Arial,Helvetica,sans-serif" size="2">Nota automatica aggiunta dal sistema di posta.</font></div><div><img src="https://www.unive.it/media/banner_5x1000_2019_v3.png"></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>
</blockquote></div>

<br>
<div><font style="font-family:Arial,Helvetica,sans-serif" size="2">Nota automatica aggiunta dal sistema di posta.</font></div><div><img src="https://www.unive.it/media/banner_5x1000_2019_v3.png"></div>