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.

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

  • References:
    • ncgen
      • From: "Hans-Jürgen Rieger"
  • 2004 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: