c c NAME: read_hirs_as.f c c PURPOSE: Example program for reading HIRS all-sky data. c c COMPILATION SEQUENCE: c f77 read_hirs_as.f c c NOTES: c HIRS all-sky swath data record (54 bytes data record length) c xtime = time in seconds from start of day c xlon = longitude in degrees starting from GM (0-360) c xlat = latitude in degrees (-90 to 90) c iline = line number for individual orbit. Note that one c AS daily file contains about 14 orbits. c isp = scan position (1-56) c xszen = solar zenith angle in degrees (90 = night) c xalt = satellite altitude in km c tb(19)= 19 channels of HIRS brightness temperature in Kelvin c iref = HIRS channel 20 visible reflectance (0 to 100) c with 100 being most reflective c c tb missing data fields are filled with -99 values (before scaling) c c CREATION HISTORY: Darren Jackson ESRL/CIRES July 2006 c PROGRAM read_hirs_as c INTEGER satid,year4,jday,i,k c variables used for reading data INTEGER itime INTEGER*2 ilon,ilat,iline,iszen,ialt,itb(19) BYTE isp,iref c variables after offsets and scaling REAL xtime,xlon,xlat,xszen,xalt,tb(19) c c Open input file c OPEN(10,file='HIRS.N12.Y91.D180.AS',access='direct',recl=54) c c Read data, write ouput data c DO i=1,1000000 READ(10,rec=i,err=99) itime,ilon,ilat,iline,isp,iszen,ialt, & iref,itb xtime=itime/100. xlon=(ilon/100.)+180. xlat=ilat/100. xszen=iszen/100. xalt=ialt/10. DO k=0,18 tb(k)=(itb(k)/100.)+100. ENDDO WRITE(*,*) xtime,xlon,xlat,xszen,xalt,iline,isp DO n=0,18 WRITE(*,*) 'channel=',n+1,tb(n) ENDDO WRITE(*,*) 'channel= 20',iref WRITE(*,*) ' ' ENDDO CLOSE(10) 99 CONTINUE END