/[MITgcm]/MITgcm/pkg/debug/chksum_tiled.F
ViewVC logotype

Contents of /MITgcm/pkg/debug/chksum_tiled.F

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


Revision 1.1.2.2 - (show annotations) (download)
Wed Jan 24 21:48:13 2001 UTC (23 years, 4 months ago) by adcroft
Branch: branch-atmos-merge
CVS Tags: branch-atmos-merge-freeze
Changes since 1.1.2.1: +13 -7 lines
Added arg to allow check summing of 2D arrays

1 C $Header: /u/gcmpack/models/MITgcmUV/pkg/debug/Attic/chksum_tiled.F,v 1.1.2.1 2001/01/24 17:08:17 adcroft Exp $
2
3 #include "CPP_OPTIONS.h"
4
5 SUBROUTINE CHKSUM_TILED( str,fld,NN,bi,bj,myThid )
6 IMPLICIT NONE
7 C Global/common
8 #include "SIZE.h"
9 #include "EEPARAMS.h"
10 C Routines arguments
11 CHARACTER*(*) str
12 INTEGER NN,bi,bj,myThid
13 _RL fld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,NN,nSx,nSy)
14 C Local
15 INTEGER I,J,K
16 INTEGER cnt
17 _RL Fmn,Fmin,Fmax,Frms
18
19 Fmn=0.
20 Frms=0.
21 Fmin=fld(1,1,1,bi,bj)
22 Fmax=fld(1,1,1,bi,bj)
23 cnt=0
24 DO K=1,NN
25 DO J=1,sNy
26 DO I=1,sNx
27 Fmin=min(Fmin,fld(I,J,K,bi,bj))
28 Fmax=max(Fmax,fld(I,J,K,bi,bj))
29 Fmn=Fmn+fld(I,J,K,bi,bj)
30 cnt=cnt+1
31 ENDDO
32 ENDDO
33 ENDDO
34 Fmn=Fmn/float(cnt)
35 DO K=1,NN
36 DO J=1,sNy
37 DO I=1,sNx
38 Frms=Frms+(fld(I,J,K,bi,bj)-Fmn)**2
39 ENDDO
40 ENDDO
41 ENDDO
42 Frms=sqrt(Frms/float(cnt))
43
44 write(0,'(a,1p4e12.5,1x,a)')
45 & 'CHKSUM_TILED: ',Fmin,Fmax,Fmn,Frms,str
46
47 RETURN
48 END

  ViewVC Help
Powered by ViewVC 1.1.22