3

The dataset contains following groups with different attribute data. How can i extract and plot the attribute number 8 with latitude longitude using the packages 'rhdf5','rgdal' and 'raster'?

8  /HDFEOS/GRIDS/ColumnAmountNO2/Data Fields              ColumnAmountNO2Trop H5I_DATASET  FLOAT 1440 x 720

h5ls("D:/NO2/NO2 Data/2008/1Jan/OMI-Aura_L3-OMNO2d_2008m0101_v003-2018m0626t175046.he5")

                                       group                             name       otype dclass        dim
0                                          /                           HDFEOS   H5I_GROUP                  
1                                    /HDFEOS                       ADDITIONAL   H5I_GROUP                  
2                         /HDFEOS/ADDITIONAL                  FILE_ATTRIBUTES   H5I_GROUP                  
3                                    /HDFEOS                            GRIDS   H5I_GROUP                  
4                              /HDFEOS/GRIDS                  ColumnAmountNO2   H5I_GROUP                  
5              /HDFEOS/GRIDS/ColumnAmountNO2                      Data Fields   H5I_GROUP                  
6  /HDFEOS/GRIDS/ColumnAmountNO2/Data Fields                  ColumnAmountNO2 H5I_DATASET  FLOAT 1440 x 720
7  /HDFEOS/GRIDS/ColumnAmountNO2/Data Fields     ColumnAmountNO2CloudScreened H5I_DATASET  FLOAT 1440 x 720
8  /HDFEOS/GRIDS/ColumnAmountNO2/Data Fields              ColumnAmountNO2Trop H5I_DATASET  FLOAT 1440 x 720
9  /HDFEOS/GRIDS/ColumnAmountNO2/Data Fields ColumnAmountNO2TropCloudScreened H5I_DATASET  FLOAT 1440 x 720
10 /HDFEOS/GRIDS/ColumnAmountNO2/Data Fields                           Weight H5I_DATASET  FLOAT 1440 x 720
11                                         /               HDFEOS INFORMATION   H5I_GROUP                  
12                       /HDFEOS INFORMATION                 StructMetadata.0 H5I_DATASET STRING      ( 0 )

I used the following command to read the attribute within a group but it shows error

E = h5read("D:/NO2/NO2 Data/2008/1Jan/OMI-Aura_L3-OMNO2d_2008m0101_v003-2018m0626t175046.he5","HDFEOS/GRIDS/ColumnAmountNO2/Data Fields/ColumnAmountNO2Trop")
Warning message:
In h5checktypeOrOpenLoc(file, readonly = TRUE, native = native) :
  An open HDF5 file handle exists. If the file has changed on disk meanwhile, the function may not work properly. Run 'h5closeAll()' to close all open HDF5 object handles.

Any help would be appreciated. Thanks

Dipu
  • 123
  • 2
  • 14
  • 1
    Have you tried running h5closeAll() as the error message suggests? If yes, you may also want to try removing the group info from your command, i.e. E = h5read("D:/NO2/NO2 Data/2008/1Jan/OMI-Aura_L3-OMNO2d_2008m0101_v003-2018m0626t175046.he5","ColumnAmountNO2Trop") – BigFinger Jan 02 '20 at 18:11
  • h5closeAll() does it !! Thanks. There is another problem now to plot the attribute data with latitude and longitude. It does not have spatial reference. How do i do it? Dim(var) gives me 1440 720 – Dipu Jan 02 '20 at 18:41

0 Answers0