1 |
C $Header: /u/gcmpack/MITgcm/pkg/rbcs/rbcs_init_fixed.F,v 1.4 2009/04/28 18:18:30 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "RBCS_OPTIONS.h" |
5 |
|
6 |
C !INTERFACE: ========================================================== |
7 |
SUBROUTINE RBCS_INIT_FIXED( myThid ) |
8 |
|
9 |
C !DESCRIPTION: |
10 |
C calls subroutines that initialized fixed variables for relaxed |
11 |
c boundary conditions |
12 |
|
13 |
C !USES: =============================================================== |
14 |
IMPLICIT NONE |
15 |
#include "SIZE.h" |
16 |
#include "EEPARAMS.h" |
17 |
#include "PARAMS.h" |
18 |
c#include "GRID.h" |
19 |
#ifdef ALLOW_PTRACERS |
20 |
#include "PTRACERS_SIZE.h" |
21 |
#endif |
22 |
#include "RBCS.h" |
23 |
|
24 |
C !INPUT PARAMETERS: =================================================== |
25 |
C myThid :: my Thread Id number |
26 |
INTEGER myThid |
27 |
CEOP |
28 |
|
29 |
#ifdef ALLOW_RBCS |
30 |
C !LOCAL VARIABLES: |
31 |
C i,j,k,bi,bj,iTracer :: loop indices |
32 |
INTEGER i,j,k,bi,bj |
33 |
INTEGER irbc |
34 |
|
35 |
C Loop over mask index |
36 |
DO irbc=1,maskLEN |
37 |
|
38 |
C Loop over tiles |
39 |
DO bj = myByLo(myThid), myByHi(myThid) |
40 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
41 |
|
42 |
C Initialize arrays in common blocks : |
43 |
DO k=1,Nr |
44 |
DO j=1-Oly,sNy+OLy |
45 |
DO i=1-Olx,sNx+Olx |
46 |
RBC_mask(i,j,k,bi,bj,irbc) = 0. _d 0 |
47 |
ENDDO |
48 |
ENDDO |
49 |
ENDDO |
50 |
|
51 |
C end bi,bj loops |
52 |
ENDDO |
53 |
ENDDO |
54 |
C end of mask index loop |
55 |
ENDDO |
56 |
|
57 |
C read in mask for relaxing |
58 |
DO irbc=1,maskLEN |
59 |
IF ( relaxMaskFile(irbc).NE. ' ' ) THEN |
60 |
CALL READ_FLD_XYZ_RS(relaxMaskFile(irbc),' ', |
61 |
& RBC_mask(1-Olx,1-Oly,1,1,1,irbc), 0, myThid) |
62 |
CALL EXCH_XYZ_RS( RBC_mask(1-Olx,1-Oly,1,1,1,irbc), myThid ) |
63 |
c IF ( debugMode ) THEN |
64 |
IF ( debugLevel .GE. debLevB ) THEN |
65 |
_BEGIN_MASTER( myThid ) |
66 |
CALL PLOT_FIELD_XYRS( RBC_mask(1-Olx,1-Oly,1,1,1,irbc), |
67 |
& 'Boundary Relaxing' ,1, myThid ) |
68 |
_END_MASTER(myThid) |
69 |
ENDIF |
70 |
ENDIF |
71 |
ENDDO |
72 |
|
73 |
#endif /* ALLOW_RBCS */ |
74 |
|
75 |
RETURN |
76 |
END |