Please look at the "Reading ASCII data" page for several examples:
https://www.ncl.ucar.edu/Applications/read_ascii.shtml
The "asc6.txt" example is probably the one closest to your data.
Then, to write to a NetCDF file, see the "output netcdf" page:
https://www.ncl.ucar.edu/Applications/o-netcdf.shtml
Since your dataset is pretty simple, you can get away with using the
simple, but inefficient method (method 1).
--Mary
On Nov 15, 2011, at 8:54 AM, nlcheng wrote:
> I have a file called nlcheng.txt .below is the contents :
> time col row SO2 CO
> 2011041106 128 95 2 3
> 2011041105 127 95 4 8
> 2011041104 126 96 6 12
> I want to make the varible like this:
>
> SO2(time,col,row)
> CO(time,col,row)
>
> SO2 has three dimensions and put the SO2 and CO in a new netcdf file .
>
> how can i convert the ascii file and out put the netcdf.hope for your help.
>
> which function could i use.
>
>
>
>
> <截图1.png>_______________________________________________
> 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
Received on Tue Nov 15 09:08:50 2011
This archive was generated by hypermail 2.1.8 : Thu Nov 17 2011 - 11:50:12 MST