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