c This example shows how to read a data field in HDF-EOS5 grid data. program read_datafield_grid_OMI_Aura_L3_OMAEROe implicit none integer gridfile1 integer grid1 integer status integer datafield1rank(32) integer*4 datafield1dimsize(32) integer datafield1type(1) character*512 datafield1dimname character*512 datafield1maxdimname integer*2 datafield1data(1440,720) integer*4 datafield1start(2) integer*4 datafield1stride(2) integer*4 datafield1edge(2) integer*4 i, j integer he5_gdfldinfo, he5_gdrdfld, he5_gddetach, he5_gdopen, $ he5_gdclose, he5_gdattach external he5_gdfldinfo, he5_gdrdfld, he5_gddetach, he5_gdopen, $ he5_gdclose, he5_gdattach integer HE5F_ACC_RDONLY parameter (HE5F_ACC_RDONLY=101) c Open 'OMI-Aura_L3-OMAEROe_2004m1001_v003-2009m0114t094640.he5' using c grid API gridfile1 = he5_gdopen $ ('OMI-Aura_L3-OMAEROe_2004m1001_v003-2009m0114t094640.he5', $ HE5F_ACC_RDONLY) c Open a grid named 'ColumnAmountAerosol' grid1 = he5_gdattach(gridfile1, 'ColumnAmountAerosol') c Retrieve information about 'TerrainReflectivity' datafield status = he5_gdfldinfo(grid1, 'TerrainReflectivity', $ datafield1rank, datafield1dimsize, datafield1type, $ datafield1dimname, datafield1maxdimname) c Select necessary range of elements datafield1start(1) = 0 datafield1stride(1) = 1 datafield1edge(1) = 1440 datafield1start(2) = 0 datafield1stride(2) = 1 datafield1edge(2) = 720 c Read data from 'TerrainReflectivity' status = he5_gdrdfld(grid1, 'TerrainReflectivity', $ datafield1start, datafield1stride, datafield1edge, $ datafield1data) c Dump data from 'TerrainReflectivity' do i = 1, 7 do j = 1, 14 write(*,*), datafield1data(j,i) enddo write(*,*) enddo c Close the grid named 'ColumnAmountAerosol' status = he5_gddetach(grid1) c Close 'OMI-Aura_L3-OMAEROe_2004m1001_v003-2009m0114t094640.he5' status = he5_gdclose(gridfile1) end