[ncl-talk] Point to 3-D data

Rick Brownrigg brownrig at ucar.edu
Thu Nov 21 14:00:21 MST 2019


Since these are simple datasets, without headers/footers, etc., I would use
the bash command "cat" to make one big file out of all of the individual
files, and then process that. It's a simple matter to read ascii files with
NCL and extract individual columns into array variables:

    http://ncl.ucar.edu/Applications/read_ascii.shtml

>From there, you can find the total number of observations by calling
"dimsizes()" on one of the column variables, and then do something like:

len = dimsizes(rar)  ;;where var is the extracted column 1
my3DVar = new((/len, 3), float)
my3DVar(:,0) = Var
my3DVar(:,1) = lon
my3DVar(:,2) = lat

If you want to save that to a file, see the various examples at:

    http://ncl.ucar.edu/Applications/list_io.shtml

Rick


On Thu, Nov 21, 2019 at 1:37 PM Soma Roy via ncl-talk <ncl-talk at ucar.edu>
wrote:

> Hello,
> I have multiple datasets for individual lat lon positions. I want to make
> a 3-D dataset (lon,lat,Var1) from all the list of files. Var1=Col.1 dataset
>
> Please give me a hints for the above.
>
> Sample datasets is attached as zip file.
>
> Thanks and regards,
> Soma
> _______________________________________________
> 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/20191121/c01c1fa7/attachment.html>


More information about the ncl-talk mailing list