Can I recover data from a netCDF file that was not closed properly?
I have some netcdf files which have data in them and were apparently not properly closed. When I examine them using ncdump they report zero data points, although the size is a few megabytes. Is there a way of recovering them? If the files are in classic format or 64-bit offset format (if they were created by netCDF version 3.6.3 or earlier, for example), then you can use an editor that allows you to change binary files, such as emacs, to correct the four-byte number of records field in the file. This is a bigendian 4 byte integer that begins at the 4th byte in the file. This is what the first eight bytes would look like for classic format if you had zero records, where printable characters are specified as US-ASCII characters within single-quotes and non-printable bytes are denoted using a hexadecimal number with the notation ‘\xDD’, where each D is a hexadecimal digit: ‘C’ ‘D’ ‘F’ \x01 \x00 \x00 \x00 \x00 or ‘C’ ‘D’ ‘F’ \x02 \x00 \x00 \x00 \x00 for 64-bit-offset format. And this is wh