subroutine read_amsr_day(filename,amsr_data,iexist) c This routine reads version-5 RSS AMSR-E or AMSR-J daily files c INPUT c filename with path in form satname_yyyymmdd_v5.gz c where satname = name of satellite (amsre or amsr) c yyyy = year c mm = month c dd = day of month c c OUTPUT c amsr_data (a 1440x720x6x2 array of data) c the 6 elements of amsr_data correspond to: c 1:time time of measurement in fractional hours GMT c 2:sst sea surface temperature in deg Celcius c 3:wind 10m surface wind in meters/second c 4:vapor columnar water vapor in millimeters c 5:cloud cloud liquid water in millimeters c 6:rain rain rate in millimeters/hour c c Longitude is 0.25*xdim-0.125 degrees east c Latitude is 0.25*ydim-90.125 CHARACTER(1) abuf(1440,720,6) real, dimension(1440,720,6,2) ::amsr_data character*100 filename real xscale(6), xoffset(6) logical lexist DATA XSCALE/0.1,0.15,0.2,0.3,0.01,0.1/ DATA XOFFSET/0.,-3.,0.,0.,0.,0./ c c set data arrays to missing amsr_data=254. INQUIRE(FILE=filename,EXIST=LEXIST) if(.not.lexist) then iexist=-1 return endif iexist=0 write(*,*) 'reading amsr file: ', filename OPEN(3,FILE=FILENAME,STATUS='OLD',RECL=6220800, 1 ACCESS='DIRECT',FORM='UNFORMATTED') do ia=1,2 READ(3,rec=ia) abuf do iv=1,6 amsr_data(:,:,iv,ia)=real(ICHAR(abuf(:,:,iv))) where(amsr_data(:,:,iv,ia)<=250) amsr_data(:,:,iv,ia)=amsr_data(:,:,iv,ia)*xscale(iv)+xoffset(iv) endwhere enddo enddo close(3) return end cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc subroutine read_amsr_averaged(filename,amsr_data,iexist) c This routine reads version-5 AMSR-E or AMSR-J time-averaged files including: c 3-day (average of 3 days ending on file date) c weekly (average of 7 days ending on Saturday of file date) c monthly (average of all days in month) c INPUT c filename c format of file names are: c 3-day satname_yyyymmddv5_d3d.gz c weekly satname_yyyymmddv5.gz c monthly satname_yyyymmv5.gz c c where satname =name of satellite (amsre or amsr) c yyyy =year c mm =month c dd =day of month c c OUTPUT c amsr_data (a 1440x720x5 array of data) c the 5 elements of amsr_data correspond to time averages of: c 1:sst sea surface temperature in deg Celcius c 2:wind 10m surface wind in meters/second c 3:vapor columnar water vapor in millimeters c 4:cloud cloud liquid water in millimeters c 5:rain rain rate in millimeters/hour c c Longitude is 0.25*xdim-0.125 degrees East c Latitude is 0.25*ydim-90.125 CHARACTER(1) abuf(1440,720) real, dimension(1440,720,5) ::amsr_data character*100 filename real xscale(5), xoffset(5) logical lexist DATA XSCALE/0.15,0.2,0.3,0.01,0.1/ DATA XOFFSET/-3.,0.,0.,0.,0./ amsr_data=254. INQUIRE(FILE=filename,EXIST=LEXIST) if(.not.lexist) then iexist=-1 return endif iexist=0 write(*,*) 'reading amsr file: ', filename OPEN(3,FILE=FILENAME,STATUS='OLD',RECL=1036800, 1 ACCESS='DIRECT',FORM='UNFORMATTED') do iv=1,5 READ(3,rec=iv) abuf amsr_data(:,:,iv)=ICHAR(abuf) where(amsr_data(:,:,iv)<=250) amsr_data(:,:,iv)=amsr_data(:,:,iv)*xscale(iv)+xoffset(iv) endwhere enddo close(3) return end