[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: status of netCDF proposal ... also, BestPractices.html



>To: address@hidden
>From: Dennis Shea <address@hidden>
>Subject: Re: 20030224: netCDF and NaN
>Organization: 
>Keywords:

Hi Dennis,

> FYI ... I had a user ask me about the NaN issue.
> Below is my response.
>
> [snip]
> 
> Yes, I agree using NaN for missing values is non-portable.
> 
> >In the the "Missing Data Values" section  . ..
> >
> >  *  One standard way of indicating missing values for real type data,
> >     is to store an IEEE NaN floating point value. The advantage of this
> >     is that any computation using a NaN results in a NaN. 
> >     Client software must know to look for NaNs, however.
> >     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>      
>       This is a poor qualifier. It should read:
>       Using NaNs could compromise file portability, the main 
>       reason for using netCDF, since it is not guaranteed 
>       that a local system will support detection of IEEE NaNs. 

Even if a platform does not support propagation of NaNs in arithmetic
operations, I think a NaN value can be detected and compared for
equality with a variable value on every system I know of that is used
for scientific computing.  For example, a Cray may not support IEEE
arithmetic, but it still can detect whether a floating-point value is
equal to a specific NaN value stored as a missing data value
attribute, can't it?  So I think the above recommended rewrite is too
strong.  What compromises portability is not the use of NaNs as
missing values, but an assumption that they will be propagated in
arithmetic operations.

So I would recommend changing

> >     Client software must know to look for NaNs, however.

to

        Client software must know to look for NaNs, however, and there
        are some platforms that don't propagate NaN values in
        arithmetic operations.

> P.S. Any word on the status of your proposal 
>      regarding netCDF development?

       No, not yet.  The last time I asked, I was informed that the
       selection decision was being delayed "until mid February", but
       there has still been no announcement.

--Russ