IDL Help with Reading EOS-HDF Files [message #56175] |
Fri, 05 October 2007 01:46 |
r083r7
Messages: 6 Registered: March 2007
|
Junior Member |
|
|
Hi all
I'm attempting to read in some satellite spectral data and we've made
quite a bit of progress but we've now hit a problem we can't find the
solution to and I was hoping that one of you may be able to help.
Sorry that this is so long but I thought if I explained as much as
possible someone might be able to help.
The data are .h5 EOS-HDF files and we've been following the example
here: http://idlastro.gsfc.nasa.gov/idl_html_help/Example_Reading_ an_Image.html
to read in the data. We've got this working fine now but the problem
is while we can read in the lat/lons, etc, the actual spectral data
array is huge and when we try to read the whole thing by this method,
sometimes it works and takes 5 minutes to read in, other times it
gives us an error that there is not enough memory to create an array
this big.
The spectral data is approx 8700 spectral points * 60 scans across the
swath by 1500 scans along the orbit path. Obviously the ideal solution
here would be to be able to select just a subset of this data and
following the example here: http://idlastro.gsfc.nasa.gov/idl_html_help/Example_Reading_ Partial_Datasets.html
we thought we had the solution. The problem is that the function that
we need (result = H5D_READ(d, dt)) only allows one variable to be
passed to it in the version of IDL we're using.
> From the IDL 6.1 manual:
Result = H5D_READ(Dataset_id [, FILE_SPACE=id] [, MEMORY_SPACE=id] )
Arguments
Dataset_id
An integer representing the dataset's identifier to be read.
> From the new versions of IDL:
Result = H5D_READ(Dataset_id [, Datatype_id] [, FILE_SPACE=id] [,
MEMORY_SPACE=id] )
Arguments
Dataset_id
A long integer containing the identifier of the dataset to read.
Datatype_id
A long integer containing the identifier of the memory datatype to
read. This argument is used only when reading part of a compound
dataset. If Datatype_id is not supplied, the entire dataset is read.
As we're unable to change the version of IDL we're using this has left
us a bit stumped. Obviously there must be a way to read in partial
datasets from H5 files in older versions of IDL so I was hoping that
someone could advise us, or if we're doing it completely wrong to
suggest a better way.
Regards
Rob
|
|
|