How to read CALIPSO level 3 HDF4 file
Posted: Fri May 28, 2021 7:36 am America/New_York
Hi,
I am used to read HDF5 file. But I need to read CALIPSO level 3 which is HDF4.
I tried a couple of ways with IDL or Python. It seems neither of them work. It looks like both with the problem to handle the hierarchy of data because the data array I am looking for is not at the first level.
With IDL, I tried:
filename='CAL_LID_L3_GEWEX_Cloud-Standard-V1-00.2015-07A.hdf'
hdfid=hdf_sd_start(filename)
index=hdf_sd_nametoindex(hdfid,'Cloud_Amount_Column/Water_Cloud_Amount_Mean_Column')
varid=hdf_sd_select(hdfid, index)
hdf_sd_getdata, varid, precipitation
hdf_sd_endaccess, varid
hdf_sd_end, hdfid
It ends with an error "HDF_SD_SELECT: Unable to select the HDF-SD dataset (HDFID)"
With Python, I tried:
from pyhdf.SD import SD, SDC
filename = 'CAL_LID_L3_GEWEX_Cloud-Standard-V1-00.2015-01A.hdf'
hdf = SD(filename,SDC.READ)
data = hdf.select('Cloud_Amount_Column/Water_Cloud_Amount_Mean_Column')
It ends with an error "HDF4Error: select: non-existent dataset"
Can anyone help me with this issue?
Thank you!
I am used to read HDF5 file. But I need to read CALIPSO level 3 which is HDF4.
I tried a couple of ways with IDL or Python. It seems neither of them work. It looks like both with the problem to handle the hierarchy of data because the data array I am looking for is not at the first level.
With IDL, I tried:
filename='CAL_LID_L3_GEWEX_Cloud-Standard-V1-00.2015-07A.hdf'
hdfid=hdf_sd_start(filename)
index=hdf_sd_nametoindex(hdfid,'Cloud_Amount_Column/Water_Cloud_Amount_Mean_Column')
varid=hdf_sd_select(hdfid, index)
hdf_sd_getdata, varid, precipitation
hdf_sd_endaccess, varid
hdf_sd_end, hdfid
It ends with an error "HDF_SD_SELECT: Unable to select the HDF-SD dataset (HDFID)"
With Python, I tried:
from pyhdf.SD import SD, SDC
filename = 'CAL_LID_L3_GEWEX_Cloud-Standard-V1-00.2015-01A.hdf'
hdf = SD(filename,SDC.READ)
data = hdf.select('Cloud_Amount_Column/Water_Cloud_Amount_Mean_Column')
It ends with an error "HDF4Error: select: non-existent dataset"
Can anyone help me with this issue?
Thank you!