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

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

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


Revision 1.3 - (show annotations) (download)
Wed Mar 7 16:17:17 2001 UTC (23 years, 1 month ago) by adcroft
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
FILE REMOVED
Re-arranged natl_box expt to fit into style of other expts.
 - this allows it to work with our automatic testing scripts.

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

  ViewVC Help
Powered by ViewVC 1.1.22