[gradsusr] how to change/force scale_factor and offset

Jennifer M Adams jadams21 at gmu.edu
Wed Dec 7 07:49:56 EST 2016


If the scale_factor attribute is not defined properly in your data file, you can try to fix it using one of the stand-alone utilities in the HDF library. Setting the scale factor to a fixed number globally at the desriptor file level will likely cause problems for other variables in the file that may not share the same attribute value — that is why you give the name, and then the attribute is retrieved for each individual variable in the file. If you can’t repair the formatting of the data file, then you only option is to use the scale factor whenever you want to display the variable, e.g.
ga-> d var*0.1
—Jennifer



On Dec 7, 2016, at 6:08 AM, M.Mahakur <mmahakur at TROPMET.RES.IN<mailto:mmahakur at TROPMET.RES.IN>> wrote:

Still waiting for a helping hand on the following issue.

Hi,

I used unpack (to unpack byte data-variable) in my ctl to display hdf-eos files. But, some files giving errors:

Warning: HDF attribute named "scale_factor" has more than one value
Warning: Could not retrieve "scale_factor" -- setting to 1.0
Warning: HDF attribute named "add_offset" has more than one value
Warning: Could not retrieve "add_offset" -- setting to 0.0
Contouring: 0 to 60 interval 5

It does not reads the scale_factor and add_offset. It seems they are not defined properly in the data file:

varx:scale_factor = "0.1
varx:scale_factor_er = "0
varx:add_offset = "0

It should have been float.

As, by default Grads sets the scale factor to 1.0, how can I change/force the same to 0.1 (inside ctl)?

Regards and Thanks,
Mahakur

_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20161207/3e8ba761/attachment.html 


More information about the gradsusr mailing list