1 |
C $Header: /u/gcmpack/MITgcm/pkg/rbcs/rbcs_init_fixed.F,v 1.3 2007/10/09 00:09:25 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "CPP_OPTIONS.h" |
5 |
#include "PACKAGES_CONFIG.h" |
6 |
|
7 |
C !INTERFACE: ========================================================== |
8 |
SUBROUTINE RBCS_INIT_FIXED(myThid ) |
9 |
|
10 |
C !DESCRIPTION: |
11 |
C calls subroutines that initialized fixed variables for relaxed |
12 |
c boundary conditions |
13 |
|
14 |
C !USES: =============================================================== |
15 |
IMPLICIT NONE |
16 |
#include "SIZE.h" |
17 |
#include "GRID.h" |
18 |
#include "DYNVARS.h" |
19 |
#include "EEPARAMS.h" |
20 |
#include "PARAMS.h" |
21 |
#ifdef ALLOW_PTRACERS |
22 |
#include "PTRACERS_SIZE.h" |
23 |
#endif |
24 |
#include "RBCS.h" |
25 |
|
26 |
C !INPUT PARAMETERS: =================================================== |
27 |
C myThid :: thread number |
28 |
INTEGER myThid |
29 |
CEOP |
30 |
|
31 |
#ifdef ALLOW_RBCS |
32 |
|
33 |
|
34 |
C !LOCAL VARIABLES: |
35 |
C i,j,k,bi,bj,iTracer :: loop indices |
36 |
INTEGER i,j,k,bi,bj |
37 |
INTEGER irbc |
38 |
#ifdef ALLOW_PTRACERS |
39 |
INTEGER iTracer |
40 |
#endif |
41 |
|
42 |
C Loop over tiles |
43 |
DO bj = myByLo(myThid), myByHi(myThid) |
44 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
45 |
|
46 |
C Initialize arrays in common blocks : |
47 |
DO k=1,Nr |
48 |
DO j=1-Oly,sNy+OLy |
49 |
DO i=1-Olx,sNx+Olx |
50 |
DO irbc=1,maskLEN |
51 |
RBC_mask(i,j,k,bi,bj,irbc) = 0. _d 0 |
52 |
ENDDO |
53 |
RBCtemp(i,j,k,bi,bj) = 0. _d 0 |
54 |
RBCsalt(i,j,k,bi,bj) = 0. _d 0 |
55 |
ENDDO |
56 |
ENDDO |
57 |
ENDDO |
58 |
ENDDO |
59 |
ENDDO |
60 |
#ifdef ALLOW_PTRACERS |
61 |
C Loop over tracers |
62 |
DO iTracer = 1, PTRACERS_num |
63 |
|
64 |
C Loop over tiles |
65 |
DO bj = myByLo(myThid), myByHi(myThid) |
66 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
67 |
|
68 |
C Initialize arrays in common blocks : |
69 |
DO k=1,Nr |
70 |
DO j=1-Oly,sNy+OLy |
71 |
DO i=1-Olx,sNx+Olx |
72 |
RBC_ptracers(i,j,k,bi,bj,iTracer) = 0. _d 0 |
73 |
ENDDO |
74 |
ENDDO |
75 |
ENDDO |
76 |
C end bi,bj loops |
77 |
ENDDO |
78 |
ENDDO |
79 |
|
80 |
C end of Tracer loop |
81 |
ENDDO |
82 |
#endif |
83 |
|
84 |
C read in mask for relaxing |
85 |
do irbc=1,maskLEN |
86 |
IF ( relaxMaskFile(irbc).NE. ' ' ) THEN |
87 |
_BEGIN_MASTER( myThid ) |
88 |
CALL READ_FLD_XYZ_RS(relaxMaskFile(irbc),' ', |
89 |
& RBC_mask(1-Olx,1-Oly,1,1,1,irbc), 0, myThid) |
90 |
_END_MASTER(myThid) |
91 |
_EXCH_XYZ_RL(RBC_mask(1-Olx,1-Oly,1,1,1,irbc), myThid ) |
92 |
CALL PLOT_FIELD_XYRS( RBC_mask(1-Olx,1-Oly,1,1,1,irbc), |
93 |
& 'Boundary Relaxing' ,1, myThid ) |
94 |
ENDIF |
95 |
enddo |
96 |
C |
97 |
#endif /* ALLOW_RBCS */ |
98 |
|
99 |
RETURN |
100 |
END |