program read_ssmi c c This sample program provides code statements to read SSMI data. c c The SSMI data are on a 1080 X 540 element grid with the origin at c 89.833 degrees North latitude and 0.167 degrees East longitude c (i.e., a 1/3 degree by 1/3 degree resolution grid ranging from c 89.833 degrees North to 89.833 degrees South in latitude and c 0.167 degrees East to 359.833 degrees East in longitude). There are c 12 monthly data files for 1994. c c Parameter Declarations: c integer*2 spd(1080,540) ! SSMI data in cm/sec. ! 9999 indicates no data byte num(1080,540) ! num of SSMI data counts to compute avg integer*2 inum(1080,540) ! num of SSMI data counts to compute avg real*4 xmin,xmax ! minimum and maximum speeds in data in m/sec C Open & read a data file. open(8,file='spd9401.dat',form='unformatted') read(8) xmin,xmax read(8) spd read(8) num close(8) C Print xmin and xmax to console window: write(*,*) ' xmin, xmax ',xmin,xmax c Convert the SSMI speed to meters per second & print the values: do 100 i = 1, 5 if ( spd(i,270).ne.9999 ) then write(*,*) ' spd(',i,', 270 ) = ',spd(i,270)/100.0 endif 100 continue c Print sample count num (as byte values) : do 200 i = 1, 5 if ( num(i,270).ne.9999 ) then write(*,*) ' num(',i,', 270 ) = ',num(i,270) ! counts. endif 200 continue c c Sample Output from file: spd9401.dat c c xmin, xmax 1.04000 19.04000 c c spd( 1, 270 ) = 5.22000 c spd( 2, 270 ) = 5.35000 c spd( 3, 270 ) = 5.25000 c spd( 4, 270 ) = 5.08000 c spd( 5, 270 ) = 5.43000 c c num( 1, 270 ) = 50 c num( 2, 270 ) = 55 c num( 3, 270 ) = 54 c num( 4, 270 ) = 50 c num( 5, 270 ) = 59 c c c Note that array NUM is a byte array. If you wish to utilize NUM values c in your computations, declare a new integer*2 array, INUM (as above), c and read in the byte array NUM into the new integer array INUM c as follows: do 400 j = 1, 540 do 300 i = 1, 1080 if ( inum(i,j) .GE. 0 ) then inum(i,j) = num(i,j) else inum(i,j) = 9999 ! only to guard against ! spurious neg. values, ! if any. endif 300 continue 400 continue c Print inum(i,j) [integer*2] as printed for num(i,j) [byte]: do 500 i = 1, 5 write(*,*) ' inum(',i,', 270 ) = ',inum(i,270) ! counts. 500 continue c c Sample inum OUTPUT c c inum( 1, 270 ) = 50 c inum( 2, 270 ) = 55 c inum( 3, 270 ) = 54 c inum( 4, 270 ) = 50 c inum( 5, 270 ) = 59 c stop end