[gradsusr] Undefined value -9.99e33 on sdfopen
Jennifer Adams
jma at cola.iges.org
Fri May 9 11:59:23 EDT 2014
Hi, Victor --
Every file that is opened by GrADS must have undef value assigned to it. This is the 'input undef value' and GrADS uses it for a test at the moment the I/O is done for that file -- if the data value is sufficiently close to the input undef value, then it is flagged as 'missing'. Missing data are ignored for all internal operations. When it comes time to export a data file, anything that is flagged as missing is assigned the 'output undef value' which is controlled with the 'set undef' command. The input and output undef values need not be the same; the output undef value is entirely unaffected by the input undef value, and its default value is -9.99e8.
When you open a file with 'sdfopen', GrADS will look for an attribute named "missing_value" or "_FillValue" and if it succeeds, it will use that attribute's value as the input undef value. If it fails to find any attributes that provide an undef value, it will use a default which is -9.99e33. If a netcdf file does not have a "missing_value" or "_FillValue" attribute, it probably doesn't have any missing data, and so the value GrADS picks is irrelevant. The output undef value is still -9.99e8 in this case. It may seem odd to have different values for default input and output undef values, but it helps to clarify to the user that these two values are wholly unconnected.
--Jennifer
On May 8, 2014, at 2:36 PM, Victor Salgado wrote:
> I've been using grads for opening netcdf files and I was a bit confused with its behavior in dealing with the undefined value.
>
> If I understood correctly back in 2009 with version 2.0.a6 the default output undefined value was changed from -9.99e33 to -9.99e8. But this doesn't seem to have affected sdfopen, the default undefined value there is still -9.99e33.
>
> Is this intentional? It kind of seems like an inconsistency to me.
>
>
> Thanks,
>
> --Victor Salgado
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
--
Jennifer M. Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
111 Research Hall, Mail Stop 2B3
George Mason University
4400 University Drive
Fairfax, VA 22030
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140509/9ac123a5/attachment.html
More information about the gradsusr
mailing list