[ncl-talk] Assign values

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Thu Aug 15 10:34:59 MDT 2019


The function conform_dims will do this for you.


On Thu, Aug 15, 2019 at 10:23 AM Xueyan Zhang via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Hi all,
>
> I have a two-dimensional variable like a=(/100,100/), and I want create a
> new variable like b=(/12,100,100/). I want to assign values of a to b such
> as b(0,:,:) = a; b(1,:,:) = a…. So the values of b do not change in its
> first dimension. I don’t want to use do loop.
>
> Any ideas?
>
> Thanks!
>
> Xueyan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190815/8b650d7e/attachment.html>


More information about the ncl-talk mailing list