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

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

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


Revision 1.3 - (hide annotations) (download)
Mon May 14 21:36:45 2001 UTC (23 years ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint43a-release1mods, checkpoint40pre3, checkpoint40pre1, checkpoint40pre7, checkpoint40pre6, checkpoint40pre9, checkpoint40pre8, release1_b1, checkpoint43, checkpoint40pre2, release1-branch_tutorials, checkpoint40pre4, release1-branch-end, checkpoint39, checkpoint40pre5, release1_beta1, checkpoint42, checkpoint40, checkpoint41, checkpoint44, release1-branch_branchpoint
Branch point for: release1-branch, release1, ecco-branch, release1_coupled
Changes since 1.2: +9 -2 lines
Added runtime parameters.

1 heimbach 1.3 C $Header: /u/gcmpack/models/MITgcmUV/pkg/obcs/obcs_init_fixed.F,v 1.2 2001/02/02 21:36:30 adcroft Exp $
2     C $Name: $
3 adcroft 1.2
4     #include "OBCS_OPTIONS.h"
5    
6     SUBROUTINE OBCS_INIT_FIXED( myThid )
7     C /==========================================================\
8     C | SUBROUTINE OBCS_INIT_FIXED |
9     C | o Initialise OBCs fixed arrays |
10     C |==========================================================|
11     C | |
12     C \==========================================================/
13     IMPLICIT NONE
14    
15     C === Global variables ===
16     #include "SIZE.h"
17     #include "EEPARAMS.h"
18     #include "PARAMS.h"
19     #include "OBCS.h"
20    
21     C == Routine arguments ==
22     C myThid - Number of this instance of INI_DEPTHS
23     INTEGER myThid
24    
25     #ifdef ALLOW_OBCS
26    
27     C == Local variables ==
28     INTEGER iG, jG, iGm, jGm
29     INTEGER bi, bj
30     INTEGER I, J, K
31    
32     DO bj = myByLo(myThid), myByHi(myThid)
33     DO bi = myBxLo(myThid), myBxHi(myThid)
34    
35     DO I=1-Olx,sNx+Olx
36     OB_Jn(I,bi,bj)=0
37     OB_Js(I,bi,bj)=0
38     ENDDO
39    
40     DO J=1-Oly,sNy+Oly
41     OB_Ie(J,bi,bj)=0
42     OB_Iw(J,bi,bj)=0
43     ENDDO
44    
45     DO J=1-Oly,sNy+Oly
46 heimbach 1.3 C convert from local y index J to global y index jG
47 adcroft 1.2 jG = myYGlobalLo-1+(bj-1)*sNy+J
48 heimbach 1.3 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 adcroft 1.2 jGm = 1+mod( jG-1+Ny , Ny )
52 heimbach 1.3 C loop over local x index I
53 adcroft 1.2 DO I=1,sNx
54     iG = myXGlobalLo-1+(bi-1)*sNx+I
55     iGm = 1+mod( iG-1+Nx , Nx )
56 heimbach 1.3 C OB_Ieast(jGm) allows for the eastern boundary to be at variable x locations
57 adcroft 1.2 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
59     ENDDO
60     ENDDO
61     DO J=1,sNy
62     jG = myYGlobalLo-1+(bj-1)*sNy+J
63     jGm = 1+mod( jG-1+Ny , Ny )
64     DO I=1-Olx,sNx+Olx
65     iG = myXGlobalLo-1+(bi-1)*sNx+I
66     iGm = 1+mod( iG-1+Nx , Nx )
67 heimbach 1.3 C OB_Jnorth(iGm) allows for the northern boundary to be at variable y locations
68 adcroft 1.2 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
70     ENDDO
71     ENDDO
72    
73     ENDDO
74     ENDDO
75    
76     #endif /* ALLOW_OBCS */
77     RETURN
78     END

  ViewVC Help
Powered by ViewVC 1.1.22