This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Matthew, > From: "Matthew J. Bunkers" <address@hidden> > Organization: . > Keywords: 199910291801.MAA16406 In the above message, you wrote: > Hello. I work at the NWS in Rapid City, SD and was working with the > ncdump command on our AWIPS system. In particular, I was looking at > the contents of our netCDF satellite images. The values ranged from > the -100s to the +100s. However, when I took the same files down to > the School of Mines computer lab, the results from the ncdump command > were different. They were all positive and different by 256 (bits, > I assume). For example, a -112 pixel val ue at the NWS became a 144 > pixel value at the school. What is going on here? > > Thank you. > > Matt Bunkers, NWS Rapid City, SD The netCDF package makes no assumptions about the "signedness" of 8-bit "NC_BYTE" variables: the bits are copied without modification between NC_BYTE variables and the host system's "char" data type. On some systems a "char" is signed; on others it is unsigned. Thus, on some systems an NC_BYTE value will print as 144 while on other systems that same value will print as -112. It is up to the application program to assign meaning the the bit patterns because that is beyond the purview of the netCDF package. -------- Steve Emmerson <http://www.unidata.ucar.edu>