program read5d c c Read GOSTAplus 5x5 degree SST, NMAT, and LandSST files c read MOHSST6_ANM5DG, MOHMAT_ANM5DG, or LANDSST FILE c c NMAT ascii file name template A809aaXY.txt (X=century Y=decade) c SST ascii file name template A809saXY.txt (X=century Y=decade) c LANDSST ascii file name template LsstXY.txt (X=century Y=decade) c these files are the result from a HDF to ASCII conversion c ( hdf2asci A809saXY.hdf see CDROM) c c The anomalies are expressed in units of 0.01 Celsius. c The missing data indicator is -32768. c c The geographical mapping of the data array is: c c 90N c ------------------------------- c | | | c | | | c |<--------I=1,72|-------------->| c 180W| | |180E c | J=1,36 | c | | | c | | | c ------------------------------- c 90S c i.e. for I=1, the 5 degree areas are centred on 177.5W, c for I=2 on 172.5W & so on eastwards to I=72 on 177.5E, c for J=1 the areas are centred on 87.5N, for J=2 on 82.5N & so c on southwards to 87.5S. c c c INTEGER NMON,NYR,NDATA(72,36) real data(72,36) imiss = -32768 amiss = -99.0 afact = 100. c open an ascii file connected to unit 10 open(10,file='a_data/test.txt') 5 READ(10,1000,end=10)NMON,NYR READ(10,2000)NDATA 1000 FORMAT(2I6) 2000 FORMAT(72I6) c convert the data to real values, and set missing to amiss do j=1,36 do i=1,72 data(i,j)=ndata(i,j)/afact if(ndata(i,j).eq.imiss)data(i,j)=amiss enddo enddo c write some data to standard out print*,'year and month : ',nyr,nmon if(mod(nyr,10).eq.0.and.nmon.eq.1)then do j=1,36 write(*,'(10f8.2)')(data(i,j),i=1,72,8) enddo endif go to 5 10 close(10) print*,'end of file detected' stop end