File indexing completed on 2018-03-02 18:41:15 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
0c49347dc7 Alis*0001 #include "GMREDI_OPTIONS.h"
0002
0003 SUBROUTINE GMREDI_CALC_DIFF(
cd3138caa3 Jean*0004 I bi,bj,iMin,iMax,jMin,jMax,kArg,kSize,
0005 U KappaRx,
8061933ad6 Davi*0006 I tracerIdentity,myThid)
0c49347dc7 Alis*0007
0008
0009
cd3138caa3 Jean*0010
0c49347dc7 Alis*0011
0012 IMPLICIT NONE
0013
0014
0015 #include "SIZE.h"
0016 #include "EEPARAMS.h"
0017 #include "PARAMS.h"
0018 #include "GRID.h"
4e66ab0b67 Oliv*0019 #include "GAD.h"
0020 #ifdef ALLOW_LONGSTEP
0021 #include "LONGSTEP.h"
0022 #endif
cd3138caa3 Jean*0023 #ifdef ALLOW_GMREDI
0024 #include "GMREDI.h"
0025 #endif
0c49347dc7 Alis*0026
0027
cd3138caa3 Jean*0028
0029
0030
0031
0032
0033
0034
0035
0c49347dc7 Alis*0036
cd3138caa3 Jean*0037 INTEGER bi,bj,iMin,iMax,jMin,jMax,kArg,kSize
0038 _RL KappaRx(1-Olx:sNx+Olx,1-Oly:sNy+Oly,kSize)
8061933ad6 Davi*0039 INTEGER tracerIdentity
0c49347dc7 Alis*0040 INTEGER myThid
0041
0042 #ifdef ALLOW_GMREDI
0043
0044
cd3138caa3 Jean*0045
0046 INTEGER i,j,k
0047
0048
0049 IF ( kArg .EQ. 0 ) THEN
0050
0051 DO k=1,MIN(Nr,kSize)
0052 DO j=jMin,jMax
0053 DO i=iMin,iMax
4e66ab0b67 Oliv*0054 IF (tracerIdentity .LT. GAD_TR1) THEN
0055 KappaRx(i,j,k) = KappaRx(i,j,k)+Kwz(i,j,k,bi,bj)
4d24da31b2 Mart*0056 & *maskInC(i,j,bi,bj)
4e66ab0b67 Oliv*0057 ELSE
0058 #ifdef ALLOW_LONGSTEP
0059 KappaRx(i,j,k) = KappaRx(i,j,k)+LS_Kwz(i,j,k,bi,bj)
0060 #else
cd3138caa3 Jean*0061 KappaRx(i,j,k) = KappaRx(i,j,k)+Kwz(i,j,k,bi,bj)
4e66ab0b67 Oliv*0062 #endif
4d24da31b2 Mart*0063 & *maskInC(i,j,bi,bj)
4e66ab0b67 Oliv*0064 ENDIF
cd3138caa3 Jean*0065 ENDDO
0066 ENDDO
0067 ENDDO
0068 ELSE
0069
0070 k = MIN(kArg,kSize)
0071 DO j=jMin,jMax
0072 DO i=iMin,iMax
4e66ab0b67 Oliv*0073 IF (tracerIdentity .LT. GAD_TR1) THEN
cd3138caa3 Jean*0074 KappaRx(i,j,k) = KappaRx(i,j,k)+Kwz(i,j,kArg,bi,bj)
4d24da31b2 Mart*0075 & *maskInC(i,j,bi,bj)
4e66ab0b67 Oliv*0076 ELSE
0077 #ifdef ALLOW_LONGSTEP
0078 KappaRx(i,j,k) = KappaRx(i,j,k)+LS_Kwz(i,j,kArg,bi,bj)
0079 #else
0080 KappaRx(i,j,k) = KappaRx(i,j,k)+Kwz(i,j,kArg,bi,bj)
0081 #endif
4d24da31b2 Mart*0082 & *maskInC(i,j,bi,bj)
4e66ab0b67 Oliv*0083 ENDIF
cd3138caa3 Jean*0084 ENDDO
0085 ENDDO
0086 ENDIF
0c49347dc7 Alis*0087
0088 #endif /* ALLOW_GMREDI */
0089
0090 RETURN
0091 END