program read_SeaWiFS c c Peter M. Woiceshyn June 30, 2000 c 818-354-1450 c wd21pw@pacific.jpl.nasa.gov c c Sample program provides read statements to read in SeaWiFS c Chlorophyll-a concentration data in mg/m**3. c c The SeaWiFS Chlorophyll-a concentration data are on a 720 X 360 c element grid with the origin at -89.75 South latitude and c 0.25 degrees East longitude (i.e., a 0.50 by 0.50 degree C lat/lon grid resolution ranging from -89.75 (S) to 89.75 (N) C in latitude & from 0.125 to 359.875in East longitude). c c Two arrays exist in the file. The first array, 'ChlorA', contains the c the Chlorophyll-a concentration values. The second array, 'num', c contains the value of 0 or 1. A 'num' value equal to 0 (zero) C indicates that there were NO data values for that grid C point (over the ocean -- and obviously not over land). C The 'num' array values of 1 (one) can therefore be used to C identify legitimate values of Chlorophyll-a concentration c for each grid point. c c There are 12 months of data for 1998. c c Declarations: REAL lon(720), lat(360) C REAL del_deg, ChlorA(720,360) C INTEGER*2 lon2, lat2, num(720,360) C CHARACTER*3 c_mon(12) CHARACTER*2 yc, mc(12) CHARACTER*16 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 = '98' suff = '.dat' f_label = c_mon(1)//yc ! Jan98 f_ycmc = yc//mc(1) f_in = 'SeaWiFS'//f_ycmc//suff PRINT *,' ' PRINT *,' '//f_in//' '//f_label C----------------------------------------------------------------------C lon2 = 720 lat2 = 360 del_deg = 0.50 PRINT *,' ' PRINT *,' longitude array dimension = ',lon2 PRINT *,' latitude array dimension = ',lat2 PRINT *,' delta lat/lon deg = ',del_deg PRINT *,' ' C Construct lat & lon arrays DO jj = 0, lat2 - 1 lat(jj+1) = jj*del_deg - 90.0 + del_deg/2.0 ENDdo DO ii = 0, lon2 - 1 lon(ii+1) = ii*del_deg + del_deg/2.0 ENDdo c c c Lat range: -89.75(S) to 89.75(N) degrees c c Lon range: 0.25(E) to 359.75(E) degrees c c PRINT *,' ' PRINT *,' Reading file: ',f_in PRINT *,' ' OPEN(22,file=f_in,form='unformatted') print *, ' Read array ChlorA' read(22) ChlorA print *, ' Read array num' print *, ' ' read(22) num CLOSE(22) DO j = 180, 181 DO i = 1, 5 WRITE (6,'(2x,A4,I3,2x,A4,I4,2x,A6,F7.2,2X,A6,F7.2,2X, & A10,F8.4,2x,A6,i3)') & 'i = ', i,'j = ', j, & ' lat = ', lat(j),' lon = ', lon(i), & ' ChlorA = ',ChlorA(i,j), ' num = ',num(i,j) ENDDO WRITE (6,'(A2)') ' ' ENDDO WRITE (6,'(A2)') ' ' C----------------------------------------------------------------------C STOP END C----------------------------------------------------------------------C C C Output from executing this FORTRAN 77 program: C C host{wd21pw}432> read_SeaWiFS.x C C SeaWiFS9801.dat Jan98 C C longitude array dimension = 720 C latitude array dimension = 360 C delta lat/lon deg = 0.500000 C C C Reading file: SeaWiFS9801.dat C C Read array ChlorA C Read array num C C i = 1 j = 180 lat = -0.25 lon = 0.25 ChlorA = 0.5071 num = 1 C i = 2 j = 180 lat = -0.25 lon = 0.75 ChlorA = 0.4418 num = 1 C i = 3 j = 180 lat = -0.25 lon = 1.25 ChlorA = 0.5629 num = 1 C i = 4 j = 180 lat = -0.25 lon = 1.75 ChlorA = 0.5495 num = 1 C i = 5 j = 180 lat = -0.25 lon = 2.25 ChlorA = 0.4269 num = 1 C C i = 1 j = 181 lat = 0.25 lon = 0.25 ChlorA = 0.2661 num = 1 C i = 2 j = 181 lat = 0.25 lon = 0.75 ChlorA = 0.3970 num = 1 C i = 3 j = 181 lat = 0.25 lon = 1.25 ChlorA = 0.4552 num = 1 C i = 4 j = 181 lat = 0.25 lon = 1.75 ChlorA = 0.4252 num = 1 C i = 5 j = 181 lat = 0.25 lon = 2.25 ChlorA = 0.4723 num = 1 C C C host{wd21pw}433> C C----------------------------------------------------------------------C