get19w.pro


pro get19h,data,sds_id

dataset=3 ; CHANGE THIS VALUE TO SELECT FREQUENCY: 2=19V 3=19H 4=22V 5=37V 6=37H

filename='f10_Tb_96035_04A.hdf' ; CHANGE THIS VALUE TO SELECT HDF SSM/I BRIGHTNESS TEMP FILE

;--------------------------------------------------------------------
;PURPOSE: extract a brightness temperature array from a MSFC SSM/I Tb HDF file.
;author: Drew Pilant April 4, 1996
;HOW TO USE:
; 1. Select the Tb array of interest by changing the value of 'dataset' above
; 2. Select the HDF file (i.e., SSM/I pass) of interest by changing 'filename' above
;at the idl command line prompt, type
;IDL> .run getssmi
;IDL> getssmi,data,sds_id
;The Tb grid will be returned in the array 'data'. The sds_id is there in case
;you want to make any additional queries (e.g., check the header, dimensions, etc).

;NOTE-1.0 Please supply the dataset number (integer). This is the SD dataset you
;wish to extract from the hdf file. Here are the options:
;Since this is the lo-resolution version of the program, choose some # from 2 to 6.
;0=julian day
;1=seconds of day
;2=19V
;3=19H
;4=22V
;5=37V
;6=37H
;7=85V
;8=85H
;9-12 = ephemeris and other stuff

;NOTE-2.1 *YOU* gotta supply the filename
;NOTE-2.2: absolute path DID NOT work for me. Therefore start IDL
; from the directory containing filename.hdf (This is bogus, I know... operator
; error, I suspect... :) )

sd_id=hdf_sd_start(filename,/read) ;start the hdf interface, get the scientific data id (sd_id)

sds_id=hdf_sd_select(sd_id,dataset) ;get the Scientific Data Set ID # (sds_id)
;(this is how the individual arrays in the HDF file are referenced)
hdf_sd_getdata,sds_id,h19 ;get the actual data from the sds

h19=h19(*,575:624) ;subset the great lakes
h19=h19/100.0 ;rescale the Tb data to degrees Kelvin
h19=rebin(h19,8*64,8*50) ;enlarge the array by 4x for display

window,6,xs=8*64,ys=8*50 ;make a display window

tvscl,h19

openw,1,'19h.bin' & writeu,1,h19 & close,1

hdf_sd_endaccess,sds_id ;terminate access to scientific data set
hdf_sd_end,sd_id ;terminate interface with hdf file
end ;return to IDL prompt

Notes on Using IDL to Display and Manipulate SSM/I Data in HDF Format