Re: Comment on Checks for Missing Data Values

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri Aug 26 2011 - 09:52:59 MDT

When importing a variable which has a "missing_value" and no
"_FillValue" attribute, NCL will attach a
"_FillValue" attribute to the variable automatically.

    x = f->X

Conceptually, under the hood, NCL does the following

   if (isatt(X,"missing_value") .and. .not.isatt(X,"_FillValue")) then
       X@_FillValue = x@missing_value
   end if

If you do a "printVarSummary" after reading a variable, you
will see an _FillValue attribute.

===

On 8/26/11 9:20 AM, Lunde, Bruce N CIV NAVOCEANO, NP1 wrote:
> Hello,
>
> Just a comment about how some of the NCL functions
> handle missing values.
>
> I work with data where the "missing_value" is usually
> set, but the "_FillValue" may not be.
>
> Some of the NCL functions check only for the existence
> of "_FillValue", such as the stat_dispersion() function
> (in file contributed.ncl).
>
> Maybe these routines could be improved by using the
> function getFillValue(), in logic such as this:
>
> OLD LOGIC:
> if( isatt(foo,"_FillValue") )then
>
> NEW LOGIC:
> if( getFillValue(foo) .ne. "No_FillValue" )then
>
> Bruce
> _______________________________________________
> 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 Fri Aug 26 09:53:05 2011

This archive was generated by hypermail 2.1.8 : Mon Aug 29 2011 - 21:44:22 MDT