PROGRAM READ_SST_USA PARAMETER (NYEAR1 = 1950, NYEAR2 = 2000, MONTH=12) REAL X(NYEAR1:NYEAR2,MONTH,4) INTEGER NAM(NYEAR1:NYEAR2) REAL TMP CHARACTER * 70 FNAME(4), FOUT CHARACTER*7 THANG(12) DATA FNAME /'NINO12.DAT','NINO3.DAT','NINO34.DAT','NINO4.DAT'/ DATA THANG /' T1',' T2',' T3',' T4',' T5', & ' T6',' T7',' T8',' T9',' T10', & ' T11',' T12'/ OPEN (1,FILE= & 'C:\Master\DBKH_2002\ENSO_SST\enso\sstoi_indices.dat', & STATUS='OLD') READ (1,*) DO I=NYEAR1,NYEAR2 NAM(I) = I DO J=1,12 READ (1,*) TMP,TMP,TMP,X(I,J,1),TMP,X(I,J,2), & TMP,X(I,J,3),TMP,X(I,J,4) PRINT'(4F10.2)', (X(I,J,K),K=1,4) ENDDO ENDDO N1=1960 N2=2000 N=N2-N1+1 DO K=1,4 FOUT='C:\Master\DBKH_2002\ENSO_SST\'//FNAME(K) OPEN (3,FILE=FOUT, STATUS='UNKNOWN') FOUT=' SST ANOMALY - '//FNAME(K) WRITE (3,'(A70)') FOUT WRITE (3,'(3I6)') N, N1, N2 WRITE (3,'(" NAM",12A7)')(THANG(J),J=1,MONTH) DO I=N1,N2 WRITE (3,'(I7,12F7.2)') I,(X(I,J,K),J=1,MONTH) ENDDO CLOSE(3) ENDDO END ! YR MON NINO1+2 ANOM NINO3 ANOM NINO4 ANOM NINO3.4 ANOM ! 1950 1 23.49 -1.00 23.97 -1.64 27.41 -.73 25.01 -1.50