/[MITgcm]/MITgcm/verification/natl_box_forward/output/comp_orig.F
ViewVC logotype

Diff of /MITgcm/verification/natl_box_forward/output/comp_orig.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by heimbach, Tue Feb 5 20:34:51 2002 UTC revision 1.1.2.1 by heimbach, Tue Feb 5 20:34:51 2002 UTC
# Line 0  Line 1 
1    C     Compare KPPhbl_01_01.00000_00720_240 to KPPhbl_orig.
2    C     for North Atlantic test domain.
3    C     Maximum difference between two files is reported.
4    C     On SGI compile using "f77 -bytereclen comp_jpl.f"
5    
6          program comp_orig
7    
8          implicit none
9    
10          integer nx, ny, nrec
11          parameter (nx=20, ny=16, nrec=4)
12    
13          integer lbuffer1, lbuffer2, i, j, k, irec
14          character fni*80, fno*80
15          real*4 fld1(nx,ny), fld2(nx,ny), maxdiff
16    
17          fni='KPPhbl.001.001.data'
18          fno='KPPhbl_orig'
19          lBuffer1=nx*ny*4
20          lBuffer2=nx*ny*4
21          open(1,file=fni,access='direct',recl=lBuffer1)
22          open(2,file=fno,access='direct',recl=lBuffer2)
23    
24          irec=0
25          maxdiff=0.
26          do k=1,nrec
27             irec=irec+1
28             read(1,rec=irec) ((fld1(i,j),i=1,nx),j=1,ny)
29             read(2,rec=irec) ((fld2(i,j),i=1,nx),j=1,ny)
30             do i=1,nx
31                do j=1,ny
32                   maxdiff=max(maxdiff,abs(fld1(i,j)-fld2(i,j)))
33                enddo
34             enddo
35          enddo
36          close(1)
37          close(2)
38    
39          if(maxdiff.lt.5e-4) then
40             print*,'North Atlantic test passed.  KPPhbl file is unchanged.'
41          else
42             print*,'WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!'
43             print*,'North Atlantic test failed.  KPPhbl file has changed.'
44          endif
45          print*,'Maximum difference is',maxdiff,' m.'
46    
47          stop
48          end

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.22