PRO read_amsr_day_v5, file_name, time, sst, wind, vapor, cloud, rain ; this routine will read the AMSR-E or AMSR-J daily bytemap files (version-5). ; ; arguments are: ; file_name : name of file to read complete with path ; file_names have form satname_yyyymmdd_v5.gz ; where satname = name of satellite (amsre or amsr) ; yyyy = year ; mm = month ; dd = day of month ; ; The routine returns: ; time, sst, wind, vapor, cloud, rain real arrays sized (1440,720,2) ; time is the mean gmt time in fractional hours of the observations within that grid cell ; sst is the sea surface temperature in degree Celcius, valid range=[-3.0,34.5] ; wind is the 10 meter surface wind speed in m/s, valid range=[0.,50.] ; vapor is the columnar atmospheric water vapor in mm, valid range=[0.,75.] ; cloud is the liquid cloud water in mm, valid range = [0.,2.5] ; rain is the derived radiometer rain rate in mm/hr, valid range = [0.,24.95] ; ; Longitude is 0.25*(xdim+1)-0.125 !IDL is zero based East longitude ; Latitude is 0.25*(ydim+1)-90.125 ; ; ; Please read the data description on www.remss.com ; for infomation on the various fields ; To contact RSS support: ; http://www.remss.com/support ;binary data in file binarydata= bytarr(1440,720,6,2) ;output products (lon,lat,asc/dsc) time =fltarr(1440,720,2) sst =fltarr(1440,720,2) wind =fltarr(1440,720,2) vapor=fltarr(1440,720,2) cloud=fltarr(1440,720,2) rain =fltarr(1440,720,2) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;determine if file exists exist=findfile(file_name,COUNT=cnt) if (cnt ne 1) then begin print, 'FILE DOES NOT EXIST or MORE THAN ONE FILE EXISTS!!' endif else begin ;open file, read binary data, close file close,2 openr,2,file_name, error=err, /compress ;compress keyword allows reading of gzip file, remove if data already unzipped if (err gt 0) then begin print, 'ERROR OPENING FILE: ', file_name endif else begin readu,2,binarydata close,2 endelse ; multipliers to change binary data to real data xscale=[0.1,0.15,.2,.3,.01,.1] offset=[0.,-3.,0.,0.,0.,0.] ; loop through asc/dsc and all 6 variables for iasc=0,1 do begin for ivar=0,5 do begin ; extract 1 variable, scale and assign to real array dat=binarydata[*,*,ivar,iasc] ok=where(dat le 250) dat=float(dat) dat[ok]=dat[ok]*xscale[ivar]+offset[ivar] case ivar of 0: time [*,*,iasc] =dat 1: sst [*,*,iasc] =dat 2: wind [*,*,iasc] =dat 3: vapor[*,*,iasc] =dat 4: cloud[*,*,iasc] =dat 5: rain [*,*,iasc] =dat endcase endfor ;ivar endfor ;iasc endelse return END