This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Entcho, It looks like the header of the file you sent is corrupted, because that error occurs in the netCDF library when it's trying to open the file and read in its header information. It reads the number of records OK (0) and the dimension array OK, but then it tries to read in the global attributes and the first global attribute seems to have a type flag of 2372, which doesn't correspond to any of the six types supported in netCDF-3, and it returns the unhelpful error code corresponding to "invalid argument". If you get an octal dump of the file header, I think you can follow along with the File Format Specification at http://www.unidata.ucar.edu/software/netcdf/docs/netcdf.html#File-Format-Specification to verify the problem. I was just using the dbx debugger to see why the file couldn't be read. Check to see if the file was transported or accessed in some way that might have changed some of the bits, for example FTPing it in some mode other than binary or passing it through some process that tried to convert carriage-return characters to new-lines. NetCDF files are binary and must be interhanged in a way that doesn't change any bits ... --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: YCK-274847 Department: Support netCDF Priority: Normal Status: Closed