NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi June, Just an "fyi" note that (if you are still looking for a solution): Theconversion from Arc ASCII to netCDF-CF can be done easily with a short script in the Ferret program (http://www.ferret.noaa.gov/Ferret/). The script can (optionally) set up your time axis as well.
- Steve =================================== June Yeung wrote:
Hi, I am trying to convert an Arc Ascii file to a netCDF file. From searching on forums and other online searches, I found that I can convert the ascii file to a cdl file and then use ncgen to convert the cdl file to a netCDF. However, I am stuck on the conversion from (arc) ascii to cdl. My file is as follows:ncols 603 nrows 603 xllcorner 2474118.750000 yllcorner -5139928.000000 cellsize 1190.6250000000 NODATA_value -99-99.00 -99.00 -99.00 -99.00 -99.00 -99.00 -99.00 -99.00 -99.00 -99.00 -99.00 -99.00 -99.00 ....... I know that a cdl file should look something like this: netcdf foo { // example netCDF specification in CDL dimensions: lat = 10, lon = 5, time = unlimited; variables: int lat(lat), lon(lon), time(time); float z(time,lat,lon), t(time,lat,lon); double p(time,lat,lon); int rh(time,lat,lon); lat:units = "degrees_north"; lon:units = "degrees_east"; time:units = "seconds"; z:units = "meters"; z:valid_range = 0., 5000.; p:_FillValue = -9999.; rh:_FillValue = -1; data: lat = 0, 10, 20, 30, 40, 50, 60, 70, 80, 90; lon = -140, -118, -96, -84, -52; }I know that in this case, time is not one of my variables. I just have a grid of rainfall data. Could anyone provide guidance on what should go under the "variables" section? Your help would be greatly appreciated.Thanks so much, June
-- Steve Hankin, NOAA/PMEL -- Steven.C.Hankin@xxxxxxxx 7600 Sand Point Way NE, Seattle, WA 98115-0070 ph. (206) 526-6080, FAX (206) 526-6744 "The only thing necessary for the triumph of evil is for good men to do nothing." -- Edmund Burke
netcdfgroup
archives: