Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: ncgen

>To: netcdfgroup@xxxxxxxxxxxxxxxx
>From: "Hans-Jürgen Rieger" <H.Rieger@xxxxxx>
>Subject: Re: 20041029: ncgen
>Organization: 
>Keywords: 200410291910.i9TJAEvV014702

Hi Hans-Jürgen,

> how is the tool "ncgen" to be used?

Here's some documentation:

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

> I tried to convert a text file with the CDL notation of a NetCDF dataset
> into a NetCDF file (the CDL textfile was obtained from a NetCDF file using
> ncdump).
> I typed in the command line:
> ncgen CDLTextfileName.txt

That just checks the syntax of the CDL and returns nothing if no
errors are detected.  To generate a binary netCDF file, you need to
supply either "-o filename.nc" to write the output in the specified
file or use "-b" to indicate that a binary netCDF file should be
written with the filename generated automatically from the CDL.  You
can also supply both the "-b" option and the "-o filename" option, which
has the same effect as if just the latter option is used.

> and thought that I would get a NetCDF file of the same name
> ("CDLTextfileName.cdf" or so).

Actually, the recommended file extension for netCDF files is ".nc"
rather then ".cdf", because the latter is used for CDF files.

> But nothing happens: No error message, no new file, nothing.

It's not an error to just check the syntax of a CDL file, so in this
case no messages is good: it means no errors were detected.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
russ@xxxxxxxxxxxxxxxx          http://www.unidata.ucar.edu/staff/russ

 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690