[ncl-talk] save list to nc

Sitan Heyl heylsitan at gmail.com
Tue Apr 19 08:38:08 MDT 2016


Hi, Guido
    for example, I hope to save List type as other data type to netcdf file
as below.

x=(/1,2,3/)
x!0="lat"
y=(/6,7,8,9/)
y!0="lat"
s=(/"one","two","three"/)
my=NewList("fifo")
ListPush(my,x)
ListPush(my,y)
ListPush(my,s)
lcount=ListCount(my)
fout=addfile("test.nc","c")
fout->my=my

Yongli

2016-04-19 10:32 GMT-04:00 Guido Cioni <guidocioni at gmail.com>:

> Hey Sitan,
> you should specify the details of your request. What you mean by “a list”?
> If you just want to write a list of ordered variable that is not so long I
> would suggest you to use the write_table (
> https://www.ncl.ucar.edu/Applications/o-ascii.shtml) function, since
> creating a new netcdf file is not so straightforward.
>
> Cheers
>
> Guido Cioni
> http://guidocioni.altervista.org
>
> On 19 Apr 2016, at 16:26, Sitan Heyl <heylsitan at gmail.com> wrote:
>
> Hi, All
>    Does anyone know how to save List to a netcdf file? or how to save list
> to one file?
>
> Best,
> Yongli
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20160419/82a5efe0/attachment.html 


More information about the ncl-talk mailing list