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

[netCDF #JKE-737310]: wrong link in netcdf FAQ



Hi Sebastian,

> the following link http://www.unidata.ucar.edu/support/help/
> MailArchives/netcdfgroup-list/msg00027.html given
> in http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#recover
> is not properly working. Where could I get the response to the FAQ?

Unfortunately, it appears that the archived support message has been lost, so
we'll have to try to recover it to fix that link.

However, I was Cc:ed on the original message, sent in August 1998, so I'll
just paste in the response to that question:

  > 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

The "Appendix B" referred to here is actually the appendix that described the
netCDF format in detail, which is now located here:

  http://www.unidata.ucar.edu/netcdf/docs/netcdf.html#NetCDF-Classic-Format

So, you can indeed recover all the data (or perhaps all but the last record's
worth) by using a binary editor like emacs to change the bytes that store
the number of records.

I hope this helps ...

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: JKE-737310
Department: Support netCDF
Priority: Normal
Status: Closed