[Thread Prev][Thread Next][Index]

Re: [ferret_users] Keeping var attributes and type from data access via OPeNDAP



Hi Paulo,
You can ask Ferret to use the scale_factor and add_offset attributes when it writes variables to a NetCDF file.  The information you need is under the ferret Users Guide index entries under "attributes of variables", in particular the item "scale & offset, packing data":

http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/VARIABLES#_VPINDEXENTRY_290

In addition you can request that all attributes from the input dataset be written out, with
set attribute/output=all varname
and you can specify the output data type with SET VAR/OUTTYPE

Ansley


On 1/25/2012 4:32 AM, Paulo B. Oliveira wrote:
Hi, 

I'm rebuilding a database of a local subset of Pathfinder SST data. 

To save space NODC uses short integers to store the SST data and I'm
also willing to do that on my local subset. I used the attached script
to check if the variable attributes were being saved in my local file as
in the original. 
Apparently, ferret automatically offsets the data and does not store the
add_offset attribute in the local file. When I make a plot of the
difference between the local and the original variable I see that it is
less than the scale factor so it's not a problem but still it a bit
disturbing not being able to save a subset exactly as in the original.

I've already addressed this issue before and would like make sure I'm
not missing any new ferret commands to handle var attributes.

Any hints will be appreciated.

Cheers,

Paulo

P.S. I take this opportunity to point out that there is a typo error in
the manual, sec 3.1.8.7
------------------------------------ 
3.1.8.7 Packed data in NetCDF files
...
yes? SET ATT/OUTTYPE=input elev

Is should be SET VAR, not SET ATT, right ?

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement