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

Re: Some sort of NULL value in IDL ?



deckard_007@my-deja.com wrote:
> Is there something like a NULL value available in IDL ? I have some data
> which I have to export as a HDF file.  But not all of my data is good,
> so I want to export the bad points as NULL values like in a database.
> Maybe this has more to do with the HDF format than with IDL itself, but
> maybe someone has encountered this problem before.

This issue is handled in HDF Scientific Datasets by attaching standard
attributes to an SDS variable. The following attributes have been
established by the HDF and netCDF communities:

long_name
A text string which describes a variable in detail (e.g. 'Northwards
velocity component').

units
A text string which describes the units of a variable (e.g.
'meters/second').

valid_range
A two element array containing the valid minimum and maximum values for
a variable (e.g. [0.0, 50.0]). The type of this attribute should be the
same as the variable type.

scale_factor
A multiplier to be applied to a variable data after it is read (allows
float values to be stored as short or byte). The type of this attribute
should be the same as the desired unscaled variable type (e.g. float).

add_offset
An offset to be added to a variable after it is read, and after
scale_factor (if present) is applied. The type of this attribute should
be the same as the desired unscaled variable type (e.g. float).

_FillValue
A value indicating that data was not written. The type of this attribute
should be the same as the variable type.

In your case, the _FillValue attribute could be used to indicate missing
data.

Cheers,
Liam.
http://cimss.ssec.wisc.edu/~gumley