Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
That was badly worded. I should have said, "This is a big-endian integer with the current dimension size, i.e. number of RECORDS, ON the unlimited dimension." --Dave On Thu, Jan 19, 2017 at 4:39 PM, Dave Allured - NOAA Affiliate < dave.allured@xxxxxxxx> wrote: > Kevin, > > The information from appendix B is correct but incomplete. In netcdf-3 > classic format, bytes 4-7 are "numrecs". This is a big-endian integer with > the current dimension size, i.e. number of elements, of the unlimited > dimension. For netcdf-3 files with no unlimited dimension, in other words > all fixed dimensions, numrecs is present, but the value is undefined. For > streaming files, numrecs is defined as all four bytes = FF hex. > > The unlimited dimension means the same thing as the record dimension. > > I recommend that you use only bytes 0-3 to identify netcdf-3 files. > > You might also take a look at how format identification is done in a > recent version of the "file" utility in Linux distributions. My recent > version of "file" identifies netcdf-3 files as "NetCDF Data", and netcdf-4 > files as HDF5. My guess is that they look at only bytes 0-3 for netcdf-3, > but I am not sure. > > --Dave > > > On Thu, Jan 19, 2017 at 2:20 PM, HAVENER, KEVIN F GS-12 USAF ACC 14 > WS/WXED <kevin.havener@xxxxxxxxx> wrote: > >> I have what I am sure is a very basic question but I couldn't figure out >> how to search the archives for it, and the documentation left me befuddled. >> >> I am trying to pass a netCDF3v1 file through a virus detector-like >> software (more like a firewall-like thing) that checks for a few things to >> ascertain the file is really a netCDF3 file. The file is global lon x lat >> x time (1 time step) with 4 variables. >> >> So I've done an octal dump on the file and I'm curious about the value >> that is supposed to be in bytes 4-7, where bytes 0-3 are "C-D-F-1". >> Appendix B in the user's guide says these bytes are the numrecs=length of >> the record dimension. What is that? The unlimited dimension? My example >> file has "1" at byte 7, the example in the user's guide has 0. My >> intuition tells me that for my file, time is considered the record >> dimension, but it would also be OK to have 0 record dimensions in this file >> if I don't intend to append to it. >> >> Is my understanding correct? >> >> Kevin Havener, DAFC, 14WS/WXED >> >> >> _______________________________________________ >> NOTE: All exchanges posted to Unidata maintained email lists are >> recorded in the Unidata inquiry tracking system and made publicly >> available through the web. Users who post to any of the lists we >> maintain are reminded to remove any personal information that they >> do not want to be made public. >> >> >> netcdfgroup mailing list >> netcdfgroup@xxxxxxxxxxxxxxxx >> For list information or to unsubscribe, visit: >> http://www.unidata.ucar.edu/mailing_lists/ >> > >
netcdfgroup
archives: