[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



> 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 meg.
> Is there a way of recovering them ? I have looked up the netcdf web page
> but couldn't find anything obvious.
> Thanks,
> Karishma

You can use an editor which allows you to change binary files, such as emacs,
to correct the 'number of records' in the file. This is a bigendian 4 byte
integer which begins at the 4th byte in the file.

This is what the first eight bytes would look like in emacs if you had zero
records:
CDF^A^@^@^@^@
and this is what it would like if you had 6 records (^F is ascii 6)
CDF^A^@^@^@^F

See Appendix B of the netcdf user's guide for more info.

-glenn