[Thread Prev][Thread Next][Index]

Re: [ferret_users] Bug with add_offset/scale_factor and descriptorfiles



Hi Ansley & Peter,
                     I faced a similar problem with the descriptor file and
scale factor earlier (only with Ferret version 5.8). The reason I identified
was that, Ferret_5.8 was not able to handle two different scale factors for
two different variables with a descriptor file. But the "return" command always
used to return the exact values like :

      yes? say `ZONAL_WIND_SPEED,r=nc_scale`
      0.01
      yes? say `ZONAL_WIND_STRESS,r=nc_scale`
      0.001

  All the variables with the first scale_factor (0.01) seems to be working fine
but variables with the second scale_factor (0.001) seems to be not scaled at
all. ( i tried with only one step file in the descriptor file, but the situation
was same). If we directly open the NetCDF file in Ferret, there is no problem
with this different scale_factors for Ferret_5.8.

  With versions 5,5.53 & 5.7 the same descriptor file worked just fine. So it
is sure that something went wrong for the descriptor files with version 5.8.

With Regards

Jaison

On Fri, 26 Aug 2005, Ansley Manke wrote:

Hi Peter,
Could you send ne the example descriptor file and one or two stepfiles that illustrate this? There weren't any changes in Ferret v5.81 that changed how it works with scale factors or descriptor files, but version 5.80 had a change that might relate to the problem. Previously the scale factor and offset found in the first stepfile were applied to all stepfiles in a multi-file set. With v5.80 we had Ferret read the scale factors from each stepfile and apply them to the data in that stepfile.

http://www.ferret.noaa.gov/Ferret/Documentation/Release_Notes/v58.html#vary_scale_mc

Ansley

Peter.J.Turner@csiro.au wrote:

Hello,
I have been using LAS to place SST data online. The system was
working OK until a couple of months ago when we upgraded Ferret and LAS.
The data we are serving is in netcdf files stored as 8 bit (xyt) with
add_offset and a scale_factor and the files are linked using a
descriptor file. It took a little while to notice, but after the upgrade
the data retrieved were no longer being scaled using the scale_factor
and add_offset. I then upgraded to Ferret 5.81 and the latest version
of LAS but the problem persisted.

I have now narrowed the problem down to Ferret. I created a new
descriptor file just pointing at one data file and was able to show that
if I opened the netcdf file directly (set data "sstnok.nc") selected a
region and did a shade plot the scale was correctly applied, but if I
used a descriptor file (set data tnok) (ntok.des) and did the set region
and shade plot the data was no longer scaled. On further investigation I have found that if I reduce the number of
variables and attributes in the netcdf file before the variable
(rewriting the netcdf file in a different order) I am trying to plot
then the data will scale correctly when initialized through the
descriptor file. I do not think I can quantify the symptoms much better, has anyone else
had this rather obscure problem? I am not a big Ferret user and could
be doing something stupid and would appreciate some assistance in
resolving the problem. I can provide some example code etc which should
show the problem if anyone is interested! Regards

Peter

(PS running under Linux 2.6.8-24-smp)

CSIRO Marine and Atmospheric Research
Australia




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement