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.
Takaya, > To: address@hidden > From: "takaya namba" <address@hidden> > Subject: scale_factor and add_offset > Organization: waumail.com > Keywords: 200005050755.e457tJG28481 In the above message, you wrote: > When scale_factor and add_offsets are defined in the netcdf file, > is it possible to unpack the variable without the formular in fortran? > > x=(x_packed-1)*scale_factor + add_offset. > > Which mean whether we can obtain x value automatically without the above > calculation or not? > > For example,if the factor.cdf define the scale_factor and add_offset inside, > ncdump factor.cdf >factor > ncgen -f factor >factor.f > > only this process bring the unpacked value or now? The netCDF library returns packed values. The software that uses the netCDF library must perform the unpacking computation in order to obtain the actual values -- the netCDF library does not do this automatically. Regards, Steve Emmerson <http://www.unidata.ucar.edu>