program read_ssmi c c Sample program showing read statements used to read in SSMI data. c c The SSMI data is on a 1080 X 540 element grid with the origin at c 90N latitude and 0 degrees longitude. There are 12 monthly data c files for 1992. c c integer*2 spd(1080,540) ! SSMI data in cm/sec. ! -9999 indicates land ! 9999 indicates no data integer*2 iyr,imon ! year and month of data set real*4 xmin,xmax ! minimum and maximum speeds in data in m/sec real j_to_lat, i_to_lon ! conversion functions integer lat_to_j, lon_to_i open(8,file='spd9201.dat',form='unformatted') read(8) iyr,imon write(*,*) iyr,imon ! should be 92 and 1 for first SSMI file read(8) xmin,xmax write(*,*) xmin,xmax ! in this case should be 0.19 and 17.35 read(8) spd close(8) stop end c c c The following four functions can be used convert grid <----> lat/lon. c c integer function lat_to_j(lat) c c Function takes a latitude and returns the index of the grid row that c latitude falls in. NOTE: assumes 540 grid cells over 180 degrees and c that latitude varies from -90 to 90. c real lat lat_to_j=int((90.-lat)*3.0)+1 return end integer function lon_to_i(lon) c c Function takes a longitude and returns the index of the grid column c that the longitude falls in. NOTE: assumes 1080 grid cells over 360 c degrees and that longitude varies from 0 to 360. c real lon lon_to_i=int(lon*3.0)+1 return end real function j_to_lat(j) c c Function takes the index of a grid row and returns the latitude of the c center of the grid cells in that row. NOTE: assumes 540 grid cells c over 180 degrees and that latitude varies from -90 to 90. c integer j j_to_lat=90.-((float(j)-.5)/3.0) return end real function i_to_lon(i) c c Function takes the index of a grid column and returns the longitude of c the center of the grid cells in that column. NOTE: assumes 1080 grid c cells over 360 degrees and that longitude varies from 0 to 360. c integer i i_to_lon=(float(i)-.5)/3.0 return end