trouble with writing to HDF-file [message #36162] |
Wed, 20 August 2003 04:48 |
Klemens Barfus
Messages: 45 Registered: December 2002
|
Member |
|
|
Hello together,
I am using IDL 5.2.1 and I often get trouble with writing new datasets
to HDF-files. I always do it in my codes in the same way like
filename= 'd:\LM-Outputs\20010923_12.hdf'
FileID = HDF_SD_START(filename, /RdWr)
index_specific_liquid_water_content =
HDF_SD_NAMETOINDEX(FileID,"specific liquid water content")
; Establishes connection to an SDS via its SDS identifier
thisSds_specific_liquid_water_content = HDF_SD_SELECT(FileID,
index_specific_liquid_water_content)
HDF_SD_GETDATA, thisSds_specific_liquid_water_content,
specific_liquid_water_content_gridscale
HDF_SD_ENDACCESS, thisSds_specific_liquid_water_content
...
newSDS_lwcg = HDF_SD_CREATE(FileID,'liquid water content
gridscale',[401,401,35],/FLOAT)
array_lwcg = lwcg
HDF_SD_AddData, newSDS_lwcg, lwcg
HDF_SD_AttrSet, newSDS_lwcg, 'liquid water content gridscale','[kg/m3]'
HDF_SD_ENDACCESS, newSDS_lwcg
HDF_SD_END, FileID
Sometimes code like this works well, but very often, there is no error
message, the data files to read are read, but the new data files are not
added to the HDF-file.
Does anybody of you has the same experiences ? Any tips ?
Thanks for your help in advance !
Klemens
|
|
|