/[MITgcm]/MITgcm/pkg/obcs/obcs_init_fixed.F
ViewVC logotype

Diff of /MITgcm/pkg/obcs/obcs_init_fixed.F

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

revision 1.2 by adcroft, Fri Feb 2 21:36:30 2001 UTC revision 1.3 by heimbach, Mon May 14 21:36:45 2001 UTC
# Line 43  C     == Local variables == Line 43  C     == Local variables ==
43          ENDDO          ENDDO
44    
45          DO J=1-Oly,sNy+Oly          DO J=1-Oly,sNy+Oly
46    C convert from local y index J to global y index jG
47           jG = myYGlobalLo-1+(bj-1)*sNy+J           jG = myYGlobalLo-1+(bj-1)*sNy+J
48    C use periodicity to deal with out of range points caused by the overlaps.
49    C they will be excluded by the mask in any case, but this saves array
50    C out-of-bounds errors here.
51           jGm = 1+mod( jG-1+Ny , Ny )           jGm = 1+mod( jG-1+Ny , Ny )
52    C loop over local x index I
53           DO I=1,sNx           DO I=1,sNx
54            iG = myXGlobalLo-1+(bi-1)*sNx+I            iG = myXGlobalLo-1+(bi-1)*sNx+I
55            iGm = 1+mod( iG-1+Nx , Nx )            iGm = 1+mod( iG-1+Nx , Nx )
56    C OB_Ieast(jGm) allows for the eastern boundary to be at variable x locations
57            IF (iG.EQ.OB_Ieast(jGm))  OB_Ie(J,bi,bj)=I            IF (iG.EQ.OB_Ieast(jGm))  OB_Ie(J,bi,bj)=I
58            IF (iG.EQ.OB_Iwest(jGm))  OB_Iw(J,bi,bj)=I            IF (iG.EQ.OB_Iwest(jGm))  OB_Iw(J,bi,bj)=I
59           ENDDO           ENDDO
# Line 58  C     == Local variables == Line 64  C     == Local variables ==
64           DO I=1-Olx,sNx+Olx           DO I=1-Olx,sNx+Olx
65            iG = myXGlobalLo-1+(bi-1)*sNx+I            iG = myXGlobalLo-1+(bi-1)*sNx+I
66            iGm = 1+mod( iG-1+Nx , Nx )            iGm = 1+mod( iG-1+Nx , Nx )
67    C OB_Jnorth(iGm) allows for the northern boundary to be at variable y locations
68            IF (jG.EQ.OB_Jnorth(iGm)) OB_Jn(I,bi,bj)=J            IF (jG.EQ.OB_Jnorth(iGm)) OB_Jn(I,bi,bj)=J
69            IF (jG.EQ.OB_Jsouth(iGm)) OB_Js(I,bi,bj)=J            IF (jG.EQ.OB_Jsouth(iGm)) OB_Js(I,bi,bj)=J
70           ENDDO           ENDDO

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22