cedadev / cis

Home of the Community Intercomparison Suite.
www.cistools.net
GNU Lesser General Public License v3.0
46 stars 18 forks source link

Problem in reading hdf file in cis.read_data() #42

Open Jayayadav33 opened 1 year ago

Jayayadav33 commented 1 year ago

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

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

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'] HadGEMCONVSH: ['[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

adamcpovey commented 1 year ago

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).