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.
There were obviously some things I didn't grok about ncdump. I will revisit that with your suggestions. Original file is netcdf3 and I want to write it back out as netcdf3, so I will do some research on the proper use of ncdump. I also didn't try using plain ncgen, either. So likely some user error involved. Kevin Havener -----Original Message----- From: Dave Allured - NOAA Affiliate [mailto:dave.allured@xxxxxxxx] Sent: Monday, January 23, 2017 2:28 PM To: HAVENER, KEVIN F GS-12 USAF ACC 14 WS/WXED <kevin.havener@xxxxxxxxx> Cc: netcdfgroup@xxxxxxxxxxxxxxxx Subject: Re: [netcdfgroup] ncdump, then ncgen 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 <mailto: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
netcdfgroup
archives: