[ncl-talk] Assigning a variable as apart of the dimensions of a new variable

Anne anne.seidenglanz at unive.it
Mon Aug 12 04:45:11 MDT 2019


Hello NCL users,

from a file, I am reading in u and v. As they are when I read them in, they
have dimensions:

 u :   [time | 1374] x [lat | 180] x [lon | 360]
 v:    [time | 1374] x [lat | 180] x [lon | 360]

Now I'd like to create a new variable "var" that ideally contains as a 1st
dimension both u and v like:

 var = new((/2,1374,180,360/), float)
 var(0, : , : , : ) = u
 var(1, : , : , : ) = v

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?

Thanks,
Anne

-- 
Nota automatica aggiunta dal sistema di posta.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190812/f0a714a9/attachment.html>


More information about the ncl-talk mailing list