Hello,
Is there a simple way to increase the dimensionality of a variable?
For example, I have this function:
; Inserts a time dimension with size = 1 into a 2d variable.
;
function insert_time_dim2d(v)
local d, nv
begin
d = dimsizes(v)
nv = new((/ 1, d(0), d(1) /), typeof(v), "No_FillValue")
nv(0,:,:) = v
return nv
end
I'd like it to be independent from the dimensionality of the input
variable v. Is there some smart way to implement the nv(0,..) = v
assignment then or do would I have to use loops to copy each element
individually?
Best regards,
Jan Ploski
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Nov 29 2007 - 07:47:13 MST
This archive was generated by hypermail 2.2.0 : Fri Nov 30 2007 - 10:55:49 MST