Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I tell if a netCDF file uses the classic format or new 64-bit offset format?

0
Posted

How can I tell if a netCDF file uses the classic format or new 64-bit offset format?

0

The short answer is that under most circumstances, you should not care, if you use version 3.6.0 or later of the netCDF library. But the difference is indicated in the first four bytes of the file, which are ‘C’, ‘D’, ‘F’, ‘\001’ for the classic netCDF format and ‘C’, ‘D’, ‘F’, ‘\002’ for the new 64-bit offset format. On a Unix system, one way to display the first four bytes of a file, say foo.nc, is to run the following command: od -An -c -N4 foo.nc which will output C D F 001 or C D F 002 depending on whether foo.nc is a classic or 64-bit offset netCDF file, respectively.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123