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

[netCDF #WVO-144063]: nco utility to multply array by scale_factor



Hi Jeff,

Sorry it's taken so long to respond to your question:

> Hello, I am running into some issues trying to multiply an array by the
> scale_factor. Any help in doing this would be most appreciated.
> 
> Here is my issue:
> 
> I have an array, uwnd, stored in a netcdf file foo.nc. The uwnd array
> has been packed using a scale factor and add_offset.
> 
> Is there a nco utility that I can use to modify uwnd (multiply by scale
> factor and add the offset) so that when I do a ncdump -v uwnd foo.nc,
> the output will the actual values and not the stored values?

The ncpdq utility can unpack all the packed variables in a file, or it
can just unpack individual variables:

  http://nco.sourceforge.net/nco.html#ncpdq-netCDF-Permute-Dimensions-Quickly

NCO also provides the ncap2 utility that can unpack variables using
the unpack() function:

  http://nco.sourceforge.net/nco.html#Methods-and-functions

We don't develop, maintain, or support NCO, so you'll generally get
faster (and probably more helpful!) answers to NCO questions from the
NCO help site:

  http://sourceforge.net/projects/nco/forums/forum/9830

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: WVO-144063
Department: Support netCDF
Priority: Critical
Status: Closed