[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,

Sorry it took so long to get back to you.  If you send your questions
to "address@hidden" instead, they'll be more likely to be
answered in case I'm away from my email.

> now that i have generated this c code using
> > >   ncgen -c now.cdl > now.c
> how do i run datasets through it to generate netCDF files?

The program ncgen generates takes no arguments.  When it is run, it
generates the netCDF file corresponding to the CDL file you gave
ncgen.  So you just need to compile and link the now.c program and run
it to create a "now.nc" netCDF file.  Assuming netCDF is installed in
/local/netcdf/ and your C compiler is named "cc" and you're on a Unix
system, you would use something like:

  $ cc -o now -I/local/netcdf/include now.c -L/local/netcdf/lib -lnetcdf
  $ ./now
  
and you can verify this worked with ncdump, which shows the CDL
version of the netCDF file:

  $ ncdump now.nc

--Russ