[Thread Prev][Thread Next][Index]

Re: [ferret_users] sampelij generates wrong missing values

Hi Martin,
Thanks for the report about sampleij; we'll look into how it interacts with the missing-value flag. I've created an example of this and it does look like a bug. Until we can fix this, a workaround would be to explicitly give the correct missing-value when you define your variable that calls sampleij:

   yes? LET/BAD=`temp,RETURN=bad`  tempij = SAMPLEIJ( temp, ipts, jpts)

For your question about the valid_range attribute, Ferret doesn't automatically do anything with this attribute, but you can use it yourself in Ferret commands using the attribute-handling syntax in Ferret:

yes? let temp_range = temp.valid_range
yes? list temp_range            
             FILENAME : my_test_data.nc
             SUBSET   : 2 points (X)
 1   / 1:  -10.0
 2   / 2:  100.0

Martin Schmidt wrote:
I have a data file that has missing values defined like

                temp:missing_value = -1.e+20f ;

Ferret 6.1 deals with this definition almost corrrectly. One exception is sampleij.
Selecting data at some points with samplexy and writing them to a file gives correct missing values.
Using sampleij instead, missing and fill value is set to
               TEMP_IJ:missing_value = -1.e+34f ;
               TEMP_IJ:_FillValue = -1.e+34f ;

The original missing values are used as valid data now and additional measures are needed for a correct data treatment.
I think this is a bug?
The original data have also an attribute

               temp:valid_range = -10.f, 100.f ;

Does ferret read this?

Martin Schmidt

[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement