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: [netcdfgroup] ncdump, then ncgen

  • To: "HAVENER, KEVIN F GS-12 USAF ACC 14 WS/WXED" <kevin.havener@xxxxxxxxx>
  • Subject: Re: [netcdfgroup] ncdump, then ncgen
  • From: Dave Allured - NOAA Affiliate <dave.allured@xxxxxxxx>
  • Date: Mon, 23 Jan 2017 12:27:31 -0700
Ncdump followed by ncgen generally works fine for me.  Try using plain
ncgen, rather than ncgen3.  Also try explicitly specifying the ncgen option
to select netcdf-3 file format.  I recall that the default output format
changed occasionally with different versions of ncgen, so that might be
your problem.

Also remember to use -p9,17 with ncdump, if you want to preserve full
precision from the original numeric values.  Also use the -s option with
ncdump, to get the correct special metadata for all advanced netcdf formats
(64-bit, netcdf-4, and netcdf4-classic).

--Dave


On Mon, Jan 23, 2017 at 6:56 AM, HAVENER, KEVIN F GS-12 USAF ACC 14 WS/WXED
<kevin.havener@xxxxxxxxx> wrote:

> If I understand correctly, I should be able to ncdump a netcdf to text
> (CDL) then ncgen it back to a valid netcdf file.  I tried this on a
> seemingly valid netcdf3 file and ncgen3'd it, but the new file was not in
> any way like the old one.  In fact, it didn't even seem to be a valid
> netcdf3 any longer--the file magic was incorrect.  Did I completely
> misunderstand the capabilities of the two programs?  Or did I just not
> understand how to do the process correctly?
>
> Kevin Havener, DAFC, 14WS/WXED
>
  • 2017 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: