Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:38:52 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
6d54cf9ca1 Ed H*0001 #include "DEBUG_OPTIONS.h"
42c525bfb4 Alis*0002 
                0003       SUBROUTINE CHKSUM_TILED( str,fld,NN,bi,bj,myThid )
                0004       IMPLICIT NONE
                0005 C     Global/common
                0006 #include "SIZE.h"
                0007 #include "EEPARAMS.h"
                0008 C     Routines arguments
                0009       CHARACTER*(*) str
                0010       INTEGER NN,bi,bj,myThid
                0011       _RL fld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,NN,nSx,nSy)
                0012 C     Local
                0013       INTEGER I,J,K
                0014       INTEGER cnt
                0015       _RL Fmn,Fmin,Fmax,Frms
                0016 
                0017       Fmn=0.
                0018       Frms=0.
                0019       Fmin=fld(1,1,1,bi,bj)
                0020       Fmax=fld(1,1,1,bi,bj)
                0021       cnt=0
                0022       DO K=1,NN
                0023        DO J=1,sNy
                0024         DO I=1,sNx
                0025          Fmin=min(Fmin,fld(I,J,K,bi,bj))
                0026          Fmax=max(Fmax,fld(I,J,K,bi,bj))
                0027          Fmn=Fmn+fld(I,J,K,bi,bj)
                0028          cnt=cnt+1
                0029         ENDDO
                0030        ENDDO
                0031       ENDDO
                0032       Fmn=Fmn/float(cnt)
                0033       DO K=1,NN
                0034        DO J=1,sNy
                0035         DO I=1,sNx
                0036          Frms=Frms+(fld(I,J,K,bi,bj)-Fmn)**2
                0037         ENDDO
                0038        ENDDO
                0039       ENDDO
                0040       Frms=sqrt(Frms/float(cnt))
                0041 
2cfc9d59a2 Patr*0042       write(*,'(a,1p4e12.5,1x,a)')
42c525bfb4 Alis*0043      &      'CHKSUM_TILED: ',Fmin,Fmax,Fmn,Frms,str
                0044 
                0045       RETURN
                0046       END