Hi Russ,<br><br><br>Maybe I can distill the essence of this function since my goal is to use it before I call the netcdf open function.   <br><br><br>I think that 64-bit-offset is the pnetcdf format that I was referring to.  <br>
<br>Thanks for the hint about hdf5 files.  <br><br><br>- Jim<br><br><br><div class="gmail_quote">On Tue, Feb 2, 2010 at 9:58 AM, Russ Rew <span dir="ltr">&lt;<a href="mailto:russ@unidata.ucar.edu">russ@unidata.ucar.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Jim,<br>
<div><div></div><div class="h5"><br>
&gt; I am in need of a function that can identify a file as netcdf3, netcdf4, or<br>
&gt; pnetcdf 64-bit.<br>
&gt; Preferably I would like this function to work without having linked any of<br>
&gt; the mentioned netcdf libraries.<br>
&gt;<br>
&gt; Does anyone have or know of one?<br>
<br>
</div></div>Although it doesn&#39;t match your preference for independence from netCDF<br>
libraries, the nc_inq_format() function documented here:<br>
<br>
  <a href="http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c.html#nc_005finq-Family" target="_blank">http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c.html#nc_005finq-Family</a><br>
<br>
distinguishes among the 4 netCDF format variants:<br>
<br>
  <a href="http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#fv1" target="_blank">http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#fv1</a><br>
<br>
in the netCDF-4 library or between classic and 64-bit-offset formats in<br>
a netCDF-3 library.  It doesn&#39;t recognize the pnetcdf 64-bit variant.<br>
<br>
By the way, an HDF5 file can&#39;t necessarily be distinguished by its first<br>
4 bytes, because HDF5 files may begin with a &quot;user-block&quot; of size 512,<br>
1024, 2048, ... bytes, before the 4-byte file-type signature.<br>
<font color="#888888"><br>
--Russ<br>
</font></blockquote></div><br>