program rdhadsst c parameter( ix=360,iy=180) parameter(iland=-32768,iice=-1000,aland=99.0,aice=-1.80) dimension isst(ix,iy),sst(ix,iy) open(10,file='testdata/HadISST1_SST_1961-1990.txt') 10 read(10,'(3i6)',end=20)iday,mon,iyr read(10,'(360i6)',end=20)isst print*,'processing month, and year : ', mon, iyr do i = 1,ix do j = 1,iy sst(i,j)=isst(i,j)/100.0 if(isst(i,j).eq.iland)sst(i,j)=aland if(isst(i,j).eq.iice)sst(i,j)=aice enddo enddo if(mod(iyr,5).eq.0)then print*,' year and month : ',iyr, mon do j=1,iy,10 write(*,'(10f8.2)')(sst(i,j),i=1,ix,36) enddo endif go to 10 20 print*,'eof detected' stop end