Hi,
It turns out that this is a bug in Ferret. The dataset has
attribute to scale the variables, SST_cor.scale_factor and
SST_rms.scale_factor. Ferret is expecting to find add_offset
attributes as well. It should be fine in a dataset to have
scale_factor attributes but not add_offset attributes - having just
one of the scaling attributes is not a violation of the CF standard,
and the scale operation should just add zero in this case. If only
an offset were present that would be legal as well.
Ferret is expecting both attributes to be present for a scaled
variable and is doing an operation to retrieve the add_offset
attribute value from a data structure without first checking that
the attribute is defined. This will be fixed in the next Ferret
release.
A workaround would be use Ferret commands to add an add_offset
attribute in the Ferret script:
yes? use titi.nc
yes? define attribute sst_rms.add_offset = 0
yes? define attribute sst_cor.add_offset = 0
...
Ansley
On 10/19/2012 6:54 AM, Bruno
Levier wrote:
Hi
I would like to report a strange behaviour of Ferret 6.82 after
using "go land_detail" with a specific dataset (in attachment).
First try: no problem
yes? use titi.nc
yes? sha SST_cor
yes? stat SST_rms
adjusted sea surface temperature
LONGITUDE: 9.1W(-9.1) to 8.9W(-8.9)
LATITUDE: 37N to 37.2N
Z: N/A
T: N/A
E: N/A
F: N/A
DATA SET: ./titi.nc
Total # of data points: 121 (11*11*1*1*1*1)
# flagged as bad data: 30
Minimum value: 0.36
Maximum value: 0.78
Mean value: 0.50275 (unweighted average)
Standard deviation: 0.096656
Second try: I'm only adding a call to "go land_detail"
yes? use titi.nc
yes? sha SST_cor
yes? go land_detail
yes? stat SST_rms
adjusted sea surface temperature
LONGITUDE: 9.1W(-9.1) to 8.9W(-8.9)
LATITUDE: 37N to 37.2N
Z: N/A
T: N/A
E: N/A
F: N/A
DATA SET: ./titi.nc
Total # of data points: 121 (11*11*1*1*1*1)
# flagged as bad data: 121
All the data points are flagged as bad !
Bruno Levier
|