program read_QuikScat c c Peter M. Woiceshyn August 23, 2002 c 818-354-1450 c Peter.M.Woiceshyn@jpl.nasa.gov c c Sample program provides read statements to read in QuikScat SeaWinds C scatterometer data of wind speed (meters/second) and wind direction c using the oceanographic convention for direction (for example, C wind towards the north is 0 degrees, towards the east it is 90, C degrees, towards the south it is 180 degrees, and towards the C west it is 270 degrees. c c The wind speed data are on a 1440 X 720 element grid with the origin c at -89.875 South latitude and 0.125 degrees East longitude (i.e., C a 0.25 by 0.25 degree lat/lon grid resolution ranging from -89.875 C (S) to 89.875 (N) in latitude & from 0.125 to 359.875 in East C longitude). A NUMspd array accompanies the spd array ... a value C of 1 indicates good data and a value of 0 indicates no data for C the grid point in the spd array c c The wind direction data are on a 72 X 36 element grid with the origin c at -88.75 South latitude and 1.25 degrees East longitude (i.e., C a five by five degree lat/lon grid resolution ranging from C -88.75 (S) to 86.25 (N) in latitude & from 1.25 to 356.25 in C East longitude). The wind direction data, however, have been c computed on the basis of a 2.5 by 2.5 lat/lon degree average at c each grid point for each month. A NUMdir array accompanies the c dir array ... a value of 1 indicates good data and a value of 0 c indicates no data for the grid point in the direction array c c There are 12 months of data for the year 2000. c c Note that the data for each month corresponds c to a calender month. c c Declarations: REAL del1, del2 REAL spd(1440,720), NUMspd(1440,720) REAL dir(72,36), NUMdir(72,36) REAL lon2(1440), lat2(720) REAL lon1(72) , lat1(36) C INTEGER*2 nlon1, nlat1, nlon2, nlat2 c CHARACTER*3 c_mon(12) CHARACTER*2 yc, mc(12) CHARACTER*20 f_in CHARACTER*5 f_label CHARACTER*4 suff, f_ycmc C----------------------------------------------------------------------C DATA c_mon/'Jan','Feb','Mar','Apr','May','Jun', & 'Jul','Aug','Sep','Oct','Nov','Dec'/ DATA mc/'01','02','03','04','05','06', & '07','08','09','10','11','12'/ C----------------------------------------------------------------------C yc = '00' suff = '.dat' f_label = c_mon(1)//yc ! Jan00 f_ycmc = yc//mc(1) f_in = 'QuikScat'//f_ycmc//suff PRINT *,' ' PRINT *,' '//f_in//' '//f_label C----------------------------------------------------------------------C nlon1 = 72 nlat1 = 36 nlon2 = 1440 nlat2 = 720 del1 = 5.0 del2 = 0.25 PRINT *,' ' PRINT *,' longitude array dimension for spd = ',nlon2 PRINT *,' latitude array dimension for spd = ',nlat2 PRINT *,' delta lat/lon deg for spd = ',del2 PRINT *,' ' PRINT *,' longitude array dimension for dir = ',nlon1 PRINT *,' latitude array dimension for dir = ',nlat1 PRINT *,' delta lat/lon deg for dir = ',del1 PRINT *,' ' C----------------------------------------------------------------------C C Construct lat & lon arrays for speed DO jj = 0, nlat2 - 1 lat2(jj+1) = jj*del2 - 90.0 + del2/2.0 ccc IF (jj .LT. 6) PRINT *, ' lat2 = ',lat2(jj+1) END do DO ii = 0, nlon2 - 1 lon2(ii+1) = ii*del2 + del2/2.0 END do C Construct lat & lon arrays for direction DO jj = 0, nlat1 - 1 lat1(jj+1) = jj*del1 - 90.0 + 1.25 ccc IF (jj .LT. 6) PRINT *, ' lat1 = ',lat1(jj+1) END do DO ii = 0, nlon1 - 1 lon1(ii+1) = ii*del1 + 1.25 END do C----------------------------------------------------------------------C c FOR SPEED c c Lat range: -89.875(S) to 89.875(N) degrees c c Lon range: 0.125E) to 359.875(E) degrees c c c FOR DIRECTION c c Lat range: -88.75(S) to 88.75(N) degrees c c Lon range: 1.25(E) to 358.75(E) degrees c c PRINT *,' ' PRINT *,' Reading file: ',f_in PRINT *,' ' OPEN(22,file=f_in,form='unformatted') read(22) spd read(22) NUMspd read(22) dir read(22) NUMdir CLOSE(22) PRINT *,' ' PRINT *,' Sample Wind Speed Data:' PRINT *,' ' DO j = 270, 271 DO i = 1, 5 WRITE (6,'(A5,I1,2x,A5,I3,2x,A6,F6.2,2X,A6,F4.2,2X,A6, & F4.2,2x,A6,F3.1)') & ' i = ', i,' j = ', j, & 'lat = ', lat2(j),'lon = ', lon2(i), & 'spd = ',spd(i,j),'Num = ', & NUMspd(i,j) END DO WRITE (6,'(A2)') ' ' END DO WRITE (6,'(A2)') ' ' PRINT *,' Sample Wind Direction Data:' PRINT *,' ' DO j = 18, 19 DO i = 1, 5 WRITE (6,'(A5,I1,2x,A5,I3,2x,A6,F5.2,2X,A6,F5.2, & 2X,A6,F6.2,2x,A6,F3.1)') & 'i = ', i,'j = ', j, & 'lat = ', lat1(j),'lon = ', lon1(i), & 'dir = ', dir(i,j), & 'Num = ', NUMdir(i,j) END DO WRITE (6,'(A2)') ' ' END DO WRITE (6,'(A2)') ' ' C----------------------------------------------------------------------C STOP END C----------------------------------------------------------------------C C C Output from executing this program: C c host{pw}432> read_QkScat.x c c QuikScat0001.dat Jan00 c c longitude array dimension for spd = 1440 c latitude array dimension for spd = 720 c delta lat/lon deg for spd = 0.250000 c c longitude array dimension for dir = 72 c latitude array dimension for dir = 36 c delta lat/lon deg for dir = 5.00000 c c c Reading file: QuikScat0001.dat c c c Sample Wind Speed Data: c c i = 1 j = 270 lat = -22.62 lon = 0.12 spd = 6.34 Num = 1.0 c i = 2 j = 270 lat = -22.62 lon = 0.38 spd = 6.24 Num = 1.0 c i = 3 j = 270 lat = -22.62 lon = 0.62 spd = 6.43 Num = 1.0 c i = 4 j = 270 lat = -22.62 lon = 0.88 spd = 6.62 Num = 1.0 c i = 5 j = 270 lat = -22.62 lon = 1.12 spd = 6.79 Num = 1.0 c c i = 1 j = 271 lat = -22.38 lon = 0.12 spd = 6.27 Num = 1.0 c i = 2 j = 271 lat = -22.38 lon = 0.38 spd = 6.28 Num = 1.0 c i = 3 j = 271 lat = -22.38 lon = 0.62 spd = 6.46 Num = 1.0 c i = 4 j = 271 lat = -22.38 lon = 0.88 spd = 6.53 Num = 1.0 c i = 5 j = 271 lat = -22.38 lon = 1.12 spd = 6.76 Num = 1.0 c c c Sample Wind Direction Data: c c i = 1 j = 18 lat = -3.75 lon = 1.25 dir = 352.17 Num = 1.0 c i = 2 j = 18 lat = -3.75 lon = 6.25 dir = 7.32 Num = 1.0 c i = 3 j = 18 lat = -3.75 lon = 11.25 dir = 2.66 Num = 1.0 c i = 4 j = 18 lat = -3.75 lon = 16.25 dir = 0.00 Num = 0.0 c i = 5 j = 18 lat = -3.75 lon = 21.25 dir = 0.00 Num = 0.0 c c i = 1 j = 19 lat = 1.25 lon = 1.25 dir = 19.28 Num = 1.0 c i = 2 j = 19 lat = 1.25 lon = 6.25 dir = 34.10 Num = 1.0 c i = 3 j = 19 lat = 1.25 lon = 11.25 dir = 0.00 Num = 0.0 c i = 4 j = 19 lat = 1.25 lon = 16.25 dir = 0.00 Num = 0.0 c i = 5 j = 19 lat = 1.25 lon = 21.25 dir = 0.00 Num = 0.0 c c C host{wd21pw}433> C C----------------------------------------------------------------------C