[ncl-talk] looking for a function

Dennis Shea shea at ucar.edu
Wed Sep 10 13:10:53 MDT 2014


also, a 'trick'

myArray = fspan(0.2, 0.2, N)

On Wed, Sep 10, 2014 at 1:08 PM, Rick Brownrigg <brownrig at ucar.edu> wrote:

> Hi,
>
> In as far as I understand your question, isn't it as simple as:
>
>   myArray = new((/ N /), float)
>   myArray = 0.2
>
> Rick
>
> On Wed, Sep 10, 2014 at 12:57 PM, Xin Xi <xxi at gatech.edu> wrote:
>
>> Hi, I am looking for a function in NCL that can do this job: given a
>> number (int or float) x, I want to create an array with a dimension and all
>> elements as x.
>> Specifically, I want to make a array of (/.2, .2, .2, .2, .2.../) (with
>> dimension of Nx1). How do I do it? I tried conform and conform_dims which
>> seem not working.
>> Thanks.
>> Xin
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140910/476a2f6c/attachment.html 


More information about the ncl-talk mailing list