File indexing completed on 2018-03-02 18:45:43 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
cdf4d1244c Patr*0001
0002
0003
0004
0005
0006 program comp_orig
0007
0008 implicit none
0009
0010 integer nx, ny, nrec
0011 parameter (nx=20, ny=16, nrec=4)
0012
0013 integer lbuffer1, lbuffer2, i, j, k, irec
0014 character fni*80, fno*80
0015 real*4 fld1(nx,ny), fld2(nx,ny), maxdiff
0016
0017 fni='KPPhbl.001.001.data'
0018 fno='KPPhbl_orig'
0019 lBuffer1=nx*ny*4
0020 lBuffer2=nx*ny*4
0021 open(1,file=fni,access='direct',recl=lBuffer1)
0022 open(2,file=fno,access='direct',recl=lBuffer2)
0023
0024 irec=0
0025 maxdiff=0.
0026 do k=1,nrec
0027 irec=irec+1
0028 read(1,rec=irec) ((fld1(i,j),i=1,nx),j=1,ny)
0029 read(2,rec=irec) ((fld2(i,j),i=1,nx),j=1,ny)
0030 do i=1,nx
0031 do j=1,ny
0032 maxdiff=max(maxdiff,abs(fld1(i,j)-fld2(i,j)))
0033 enddo
0034 enddo
0035 enddo
0036 close(1)
0037 close(2)
0038
0039 if(maxdiff.lt.5e-4) then
0040 print*,'North Atlantic test passed. KPPhbl file is unchanged.'
0041 else
0042 print*,'WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!'
0043 print*,'North Atlantic test failed. KPPhbl file has changed.'
0044 endif
0045 print*,'Maximum difference is',maxdiff,' m.'
0046
0047 stop
0048 end