- To: netcdfgroup@xxxxxxxxxxxxxxxx
- Subject: [netcdfgroup] convert Arc Ascii to cdl format for ultimate conversion to netCDF file
- From: June Yeung <jyeung@xxxxxxxxxxxxx>
- Date: Wed, 28 May 2008 20:29:03 -0400
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 -- June Yeung, PH.D. Candidate Department of Civil and Environmental Engineering Environmental Engineering and Water Resources Program Princeton University Office: Equad E-223 (609-258-4727)Lab: Equad C-329 (609-258-6383) Mobile: 609-423-5338
- Follow-Ups: