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

[netCDFJava #NBT-844482]: problems with add_offset, scale

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: [netCDFJava #NBT-844482]: problems with add_offset, scale
  • Date: Tue, 02 Aug 2016 12:17:10 -0600

Heather,

Can you describe what value you're seeing? If I do:

-24 * 0.003333333 + 0.2016667

I get a value of 0.1216667, which is between 0 and 1, so I'm not quite sure 
where the problem lies.

Ryan

> I'm attempting to use the toolsUI-4.6.6.jar and ucar.nc2.FileWriter tools
> to convert binary level II data (from NCDC) to netcdf.  The conversion
> works fine and a netcdf file is created, but something is funny about the
> add_offset and scale_factor.  For example, with RhoHV, I have a value of
> -24 at the first grid point.  The scale_factor and add_offset are
> 0.003333333f and 0.2016667f, respectively.
> 
> If I apply this function: RhoHV_actual = RhoHV * scale + offset, I don't
> get a value that's between 0 and 1.  I get similarly strange behavior for
> the other dual pol moments.
> 
> What am I missing?  Any help is greatly appreciated...
> 
> -Heather
> 
> 


Ticket Details
===================
Ticket ID: NBT-844482
Department: Support netCDF Java
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.