; ; This example code illustrates how to access and visualize GPM L3 file ; in IDL. ; ; If you have any questions, suggestions, comments on this example, please ; use the HDF-EOS Forum (http://hdfeos.org/forums). ; ; If you would like to see an example of any other NASA HDF/HDF-EOS data ; product that is not listed in the HDF-EOS Comprehensive Examples page ; (http://hdfeos.org/zoo), feel free to contact us at eoshelp@hdfgroup.org ; or post it at the HDF-EOS Forum (http://hdfeos.org/forums). ; ; Usage: ; ; $idl 3B-MO.GPM.DPRGMI.3HCSHv6-0.20201101-S000000-E235959.11.V06A.HDF5.idl ; ; Tested under: IDL 8.7.2 ; Last updated: 2021-06-01 ; Open file. file_name='3B-MO.GPM.DPRGMI.3HCSHv6-0.20201101-S000000-E235959.11.V06A.HDF5' file_id=H5F_OPEN(file_name) ; Retrieve data. datafield_name='/Grid/surfacePrecipRate' data_id=H5D_OPEN(file_id, datafield_name) data=H5D_READ(data_id) dataf=TRANSPOSE(data(*,*)) ; Get '_FillValue' attribute. fv_id=H5A_OPEN_NAME(data_id, '_FillValue') fv=H5A_READ(fv_id) H5A_CLOSE, fv_id ; Get 'units' attribute. units_id=H5A_OPEN_NAME(data_id, 'units') units=H5A_READ(units_id) H5A_CLOSE, units_id ; Close dataset. H5D_CLOSE, data_id ; Close file. H5F_CLOSE, file_id ; Calculate lat/lon using data product summary [1]. lat=FINDGEN(536)*0.25+(-67+0.125) lon=FINDGEN(1440)*0.25+(-180+0.125) ; Process missing value, convert dataf that are equal to missingvaluef to NaN idx = where(dataf eq fv(0), cnt) if cnt gt 0 then dataf[idx] = !Values.F_NAN ; Generate the plot. m = MAP('Geographic', TITLE=file_name, FONT_SIZE=9, /BUFFER) ct = COLORTABLE(72, /reverse) t1 = TEXT(0.35, 0.01, FONT_SIZE=8, datafield_name) c1 = CONTOUR(dataf, lon, lat, /FILL, OVERPLOT=m,$ RGB_TABLE=ct, $ GRID_UNITS='degrees', POSITION=[0.1, 0.1, 0.83, 0.9]) mc = MAPCONTINENTS() cb = COLORBAR(TARGET=c1, /BORDER, ORIENTATION=1, TEXTPOS=1, $ POSITION=[0.85,0.2,0.87,0.8], TITLE=units) png = file_name + '.idl.png' c1.save, png, HEIGHT=600, WIDTH=800 EXIT ; Reference ; [1] https://disc.gsfc.nasa.gov/datasets/GPM_3HCSH_06/summary