cis icon indicating copy to clipboard operation
cis copied to clipboard

Problem in reading hdf file in cis.read_data()

Open Jayayadav33 opened this issue 2 years ago • 1 comments

I am using a .hdf file obtained from AERIS/ICARE and the filename is DARDAR-CLOUD_v2.1.1_2017002114852_56830.hdf

dardar = cis.read_data(filename, variable) In the above the variable is DARMASK_Simplified_Categorization

The above command gives the following exception: ClassNotFoundError: Product cannot be found for given file. Supported products and signatures are: cis: ['.\.nc'] NCAR_NetCDF_RAF: ['.\.nc$'] ASCII_Hyperpoints: ['.\.txt'] Aeronet: ['.\.lev20', '.\.ONEILL_lev20', '.\.ONEILL_20', '.\.lev15', '.\.ONEILL_lev15', '.*\.ONEILL_15', '.*All_Sites_Times.dat', '.\.all'] Aerosol_CCI_L2: ['.ESACCI-L2P_AEROSOL.'] Aerosol_CCI_L3: ['.*ESACCI-L3C_AEROSOL.*nc'] Caliop_L1: ['CAL_LID_L1.*hdf'] Caliop_L2: ['CAL_LID_L2_05kmAPro.*hdf'] Caliop_L2_NO_PRESSURE: ['CAL_LID_L2_05kmAPro.hdf'] CloudSat: ['.CS.GRANULE.\.hdf'] Cloud_CCI_L2: ['.ESACCI-L2_CLOUD.'] Cloud_CCI_L3: ['.*ESACCI-L3C_CLOUD.nc', '.ESACCI-L3U_CLOUD.nc'] HadGEM_CONVSH: ['[a-z]{6}[\._][pamd]{2}[0-9]{4,6}.\.nc'] HadGEM_PP: ['.\.pp'] MODIS_L2: ['.MYD06_L2.\.hdf', '.MOD06_L2.\.hdf', '.MYD04_L2.\.hdf', '.MOD04_L2.\.hdf'] MODIS_L3: ['.MYD08_D3.\.hdf', '.MOD08_D3.\.hdf', '.MYD08_M3.\.hdf', '.MOD08_M3.\.hdf', '.MOD08_E3.\.hdf'] NetCDF_Gridded: ['.\.nc']

Please help

Jayayadav33 avatar Jul 12 '23 12:07 Jayayadav33

CIS does not automatically know how to open every type of file; it needs a plugin to explain the format. DARDAR data is not covered by the basic release of CIS, and no one has submitted a plugin for it. The warning you provide lists the types of file that CIS currently knows how to open and the filename syntax for those files.

As such, you will need to write your own plugin. Instructions can be found at https://cis.readthedocs.io/en/stable/plugin_development.html. I can't remember the DARDAR format, but I suspect the Easy tutorial should give you most of what you need, using the Caliop_L2 plugin as an example as it will demonstrate how to open HDF files and should have a similar grid to DARDAR (both being lidar products).

adamcpovey avatar Jul 12 '23 12:07 adamcpovey