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

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

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

revision 1.1.2.1 by adcroft, Wed Jan 24 17:08:17 2001 UTC revision 1.1.2.2 by adcroft, Wed Jan 24 21:48:13 2001 UTC
# Line 2  C $Header$ Line 2  C $Header$
2    
3  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
4    
5        SUBROUTINE CHKSUM_TILED( str,fld,bi,bj,myThid )        SUBROUTINE CHKSUM_TILED( str,fld,NN,bi,bj,myThid )
6        IMPLICIT NONE        IMPLICIT NONE
7  C     Global/common  C     Global/common
8  #include "SIZE.h"  #include "SIZE.h"
9  #include "EEPARAMS.h"  #include "EEPARAMS.h"
10  C     Routines arguments  C     Routines arguments
11        CHARACTER*(*) str        CHARACTER*(*) str
12        _RL fld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)        INTEGER NN,bi,bj,myThid
13        INTEGER bi,bj,myThid        _RL fld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,NN,nSx,nSy)
14  C     Local  C     Local
15        INTEGER I,J,K        INTEGER I,J,K
16        INTEGER cnt        INTEGER cnt
# Line 21  C     Local Line 21  C     Local
21        Fmin=fld(1,1,1,bi,bj)        Fmin=fld(1,1,1,bi,bj)
22        Fmax=fld(1,1,1,bi,bj)        Fmax=fld(1,1,1,bi,bj)
23        cnt=0        cnt=0
24        DO K=1,Nr        DO K=1,NN
25         DO J=1,sNy         DO J=1,sNy
26          DO I=1,sNx          DO I=1,sNx
27           Fmin=min(Fmin,fld(I,J,K,bi,bj))           Fmin=min(Fmin,fld(I,J,K,bi,bj))
28           Fmax=max(Fmax,fld(I,J,K,bi,bj))           Fmax=max(Fmax,fld(I,J,K,bi,bj))
29           Fmn=Fmn+fld(I,J,K,bi,bj)           Fmn=Fmn+fld(I,J,K,bi,bj)
          Frms=Frms+fld(I,J,K,bi,bj)**2  
30           cnt=cnt+1           cnt=cnt+1
31          ENDDO          ENDDO
32         ENDDO         ENDDO
33        ENDDO        ENDDO
34        Fmn=Fmn/float(cnt)        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))        Frms=sqrt(Frms/float(cnt))
43    
44        write(*,'(a,1p4e12.5,1x,a)')        write(0,'(a,1p4e12.5,1x,a)')
45       &      'CHKSUM_TILED: ',Fmin,Fmax,Fmn,Frms,str       &      'CHKSUM_TILED: ',Fmin,Fmax,Fmn,Frms,str
46    
47        RETURN        RETURN

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

  ViewVC Help
Powered by ViewVC 1.1.22