[ncl-talk] query ( CONVERSION ASCII TO NetCDF)

Karin Meier-Fleischer meier-fleischer at dkrz.de
Mon Sep 22 06:02:02 MDT 2014


Hi Kunal,

Please, take a look at the 'output netcdf' examples page, method_1

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

Try this:


lat = data(:,0)
lat = data(:,1)
values= data(:,2)
system("/bin/rm -f simple.nc") ; remove any pre-existing file 
ncdf = addfile("simple.nc" ,"c") ; output netCDF file
filedimdef(ncdf,"time",-1,True) ; recommended
values!0 = "lat"
values!1 = "lon"
values&lat = lat
values&lon = lon 
ncdf->values = values

Bye, Karin


> Am 22.09.2014 um 11:40 schrieb Kunal Bali <kunal.bali9 at gmail.com>:
> 
> Dear NCL users
> 
> I want to convert ASCII to .nc file format. Could any one please provides me the link for this query or give any detail about this ??
> 
> I have data in 3 column ( Latitude Longitude Values)
> More Detail
> 
> Variable: data
> Type: float
> Total Size: 777600 bytes
>             194400 values
> Number of Dimensions: 2
> Dimensions and sizes:    [64800] x [3]
> Coordinates: 
> Number Of Attributes: 1
>   _FillValue :    9.96921e+36
> 
> 
> So is there any ways to convert ASCII to netcdf format ???
> 
> Thank You
> 
> Kunal Bali
> Research Scholar 
> Radio & Atmospheric Science Division 
> CSIR - National Physical Laboratory
> New Delhi - 110012
> 
> 
> 
> 
> 
> _______________________________________________
> 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/20140922/ba3df612/attachment.html 


More information about the ncl-talk mailing list