[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 20010611: netCDF CDL design question (cont.)



>From: Mark Takala <address@hidden>
>Organization: University of Wisconsin/SSEC
>Keywords: 200012071945.eB7JjOo04438 netCDF lidar

Mark,

> I have downloaded the netcdf package.  I have an example cdl file
> in my directory.  When i do
> ncgen now.cld >now.c
> which is supposed to create (c code that writes netcdf) to now.c,
> the now.c file is empty after doing it.

If you invoke ncgen with no options, as in 

  ncgen now.cdl

it just checks the syntax of the CDL file and emits error messages for
any syntax errors.  In order to generate C code, you need to use the
"-c" option:

  ncgen -c now.cdl > now.c

The ncgen options are documented in the netCDF users guides or in the
ncgen man documentation included in the src/ncgen/ncgen.1 file in the
source distribution, or online at

 http://www.unidata.ucar.edu/cgi-bin/man-cgi?ncgen

> i am just trying to get started with a simple conversion
> using one of the cdl files on the site you referred me to.
> now that i have a cdl and the netcdf package with ncgen, for
> example, i'd like to generate a c routine that writes netcdf
> files of the format specified in the cdl file.
> ideally after we are able to do this with a simple example,
> we'd then create our own cdl based on our lidar data. then we
> would run our data through and convert.

It sounds like you're on the right track ...

--Russ