Does anyone know how to add a new dataset to hdf file? For example, for a present hdf file which has xsize=444, ysize=444, and zsize=5, I want to add a new dataset which has dimensions of 444x444 to the hdf file so that the zsize = 5+1=6. How can I do it in IDL commands? The IDL online help is some confused. Thanks.
Thanks, Mike. Another problem is that the created hdf files do not include the geolocation infomation (e.g. latitude, longitude, coastal line, etc.) same as the L2 products. So when I applied seadas to map the images of new hdf files, coastl line was not allowed to added in. Is it possible to add the geolocation info to new hdf files?
As noted in the Load HDF help page
, if you load an HDF file that contains lat/lon SD's named "latitude" and "longitude", then SeaDAS will detect and use the navigation info.. so what you need to do is add separate latitude and longitude SD's to your file.
I have another question about IDL. I used the following program to read the seawifs HDF products (for example, 'solz'). Seadas showed that the range of 'solz' was reasonable from 42.7111 through 49.7361 degrees. But when I used the following command:
It showed that 'solz' ranged from -17024.0 to -14495.0 as:
SeaWiFS file name: /home/xpan/data/seawifs/L2_map/S2000060172315_MLAC_map.hdf
2 722 722 2 521284
solz -14697 -17024 -14495
That is absolutely wrong.
The HDF read program is shown in the following:
FUNCTION read_hdf_prod, filename, prod
if prod eq 'Sea Surface Temperature' then begin ;apparently pathfinder sst in not eos hdf
; Open STANDARD-HDF file and get data
endif else begin ;read in eos-hdf
; Open EOS-HDF file and get data
sd_id = hdf_sd_start(filename)
index= hdf_sd_nametoindex(sd_id, prod)
sds_id= hdf_sd_select(sd_id, index)
hdf_sd_getdata, sds_id, arr
I suspect what is happening is that maybe you did not output the mapped data in float format. When you use the output function to create an HDF SD file, it gives you a number of options for the format of the data(BYTE,INT,LONG,FLOAT,DOUBLE). Did you specify FLOAT?