Re: nan in dataset

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Mon Oct 10 2011 - 17:54:14 MDT

Hi Gerry,
There is a long and confusing history of the use of _FillValue and missing_value in the NetCDF COARDS and later CF conventions. But while the NetCDF "_FillValue" attribute is built-in and supported in the NetCDF library, there is no convention that supports an attribute with the name "_MissingValue" (as far as I know anyway). Because some earlier files that use the COARDS convention use "missing_value" instead of "_FillValue", and NCL internally only understands "_FillValue", it tries to copy the "missing_value" attribute to a virtual _FillValue attribute. However, there is a requirement that the _FillValue type and the data type be the same. In order to plot this data, the best option is to figure out the actual type of the data, and then convert the "missing_value" attribute to that type, using 'tofloat' or 'tointeger' or whatever is appropriate.
 -dave

On Oct 10, 2011, at 4:57 PM, Gerald Creager wrote:

> Looks like a dataset I'm working with is malformed, with a
> 'missing_value' but no __MissingValue provided.. In fact, none of the
> variables have a "normal" __MissingValue and I get some ugly warmings
> such as:
> warning:NetOpenFile: MissingToFillValue option set True, but
> missing_value attribute and data variable
> (sea_floor_depth_below_sea_level) types differ: not adding virtual
> _FillValue attribute
>
> I'm considering adding model8Ssh@_MissingValue=-9999 to see if this
> resolves the problem but somehow, with this dataset, one never knows.
>
> Short form, I'm not getting any indication that the values are going to
> plot and I'm stuck again.
>
> Thanks, Gerry
> --
> Gerry Creager -- gerry.creager@tamu.edu
> Texas Mesonet -- AATLT, Texas A&M University
> Cell: 979.229.5301 Office: 979.458.4020 FAX: 979.862.3983
> Office: 7607 Eastmark Drive, Suite 112, College Station, TX 77840
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 10 17:54:23 2011

This archive was generated by hypermail 2.1.8 : Wed Oct 12 2011 - 15:59:45 MDT