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

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

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


Revision 1.1.2.1.2.1 - (show annotations) (download)
Tue Feb 11 22:39:51 2003 UTC (21 years, 2 months ago) by dimitri
Branch: c24_e25_ice
Changes since 1.1.2.1: +0 -0 lines
FILE REMOVED
02/11/03 cvs tag ecco_ice1
  Updated verification/natl_box_forward and natl_box_adjoint

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

  ViewVC Help
Powered by ViewVC 1.1.22