File indexing completed on 2018-03-02 18:38:22 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
c5ea996ba0 Jean*0001 #include "CHEAPAML_OPTIONS.h"
0002
0003
0004
0005
0006 SUBROUTINE CHEAPAML_COPY_EDGES(
0007 I xIsPeriodic, yIsPeriodic,
0008 I refFld,
0009 U trcFld,
0010 I bi, bj, myIter, myThid )
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 IMPLICIT NONE
0021
0022 #include "SIZE.h"
0023 #include "EEPARAMS.h"
0024 #include "PARAMS.h"
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 LOGICAL xIsPeriodic, yIsPeriodic
0036 _RL refFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0037 _RL trcFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0038 INTEGER bi, bj, myIter, myThid
0039
0040
0041
0042 INTEGER i, j, iG, jG
0043
0044
0045
0046
0047
0048
0049
0050 IF (.NOT.xIsPeriodic) THEN
0051 iG = 1 + myXGlobalLo-1+(bi-1)*sNx
0052 IF (iG.EQ.1) THEN
0053 DO j=1-OLy,sNy+OLy
0054 DO i=1-OLx,1
0055 trcFld(i,j) = refFld(i,j)
0056 ENDDO
0057 ENDDO
0058 ENDIF
0059 iG = sNx + myXGlobalLo-1+(bi-1)*sNx
0060 IF (iG.GE.Nx) THEN
0061 DO j=1-OLy,sNy+OLy
0062 DO i=sNx,sNx+OLx
0063 trcFld(i,j) = refFld(i,j)
0064 ENDDO
0065 ENDDO
0066 ENDIF
0067 ENDIF
0068
0069 IF (.NOT.yIsPeriodic) THEN
0070 jG = 1 + myYGlobalLo-1+(bj-1)*sNy
0071 IF (jG.EQ.1) THEN
0072 DO j=1-OLy,1
0073 DO i=1-OLx,sNx+OLx
0074 trcFld(i,j) = refFld(i,j)
0075 ENDDO
0076 ENDDO
0077 ENDIF
0078 jG = sNy + myYGlobalLo-1+(bj-1)*sNy
0079 IF (jG.GE.Ny) THEN
0080 DO j=sNy,sNy+OLy
0081 DO i=1-OLx,sNx+OLx
0082 trcFld(i,j) = refFld(i,j)
0083 ENDDO
0084 ENDDO
0085 ENDIF
0086 ENDIF
0087
0088
0089
0090
0091 RETURN
0092 END