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

[netCDF #CZF-138501]: NetCDF FILL_CHAR and FILL_BYTE switched?

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.


  • Subject: [netCDF #CZF-138501]: NetCDF FILL_CHAR and FILL_BYTE switched?
  • Date: Fri, 26 May 2006 09:53:44 -0600

Howdy Joe!

This is a confusing topic for me, because there are some special rules for 
CHARs and BYTEs in netCDF.

As far as NC_BYTE goes, note this comment from the Users' Guide:

"It is possible to interpret byte data as either signed (-128 to 127) or 
unsigned (0 to 255). However, when reading byte data to be converted into other 
numeric types, it is interpreted as signed."

As for NC_CHAR, it is given a fill value of 0 because, when interpreted as a 
char in C, this will yeild a string of size zero.

Let me know if this didn't answer your questions!

Thanks,

Ed

Ticket Details
===================
Ticket ID: CZF-138501
Department: Support netCDF
Priority: Urgent
Status: Closed