| 1 |
C $Header: /u/gcmpack/MITgcm/pkg/rbcs/rbcs_init_varia.F,v 1.8 2011/05/14 19:52:12 jmc Exp $ |
| 2 |
C $Name: $ |
| 3 |
|
| 4 |
#include "RBCS_OPTIONS.h" |
| 5 |
|
| 6 |
C !INTERFACE: ========================================================== |
| 7 |
SUBROUTINE RBCS_INIT_VARIA( myThid ) |
| 8 |
|
| 9 |
C !DESCRIPTION: |
| 10 |
C calls subroutines that initialized 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 |
#ifdef ALLOW_PTRACERS |
| 19 |
#include "PTRACERS_SIZE.h" |
| 20 |
#endif |
| 21 |
#include "RBCS_SIZE.h" |
| 22 |
c#include "RBCS_PARAMS.h" |
| 23 |
#include "RBCS_FIELDS.h" |
| 24 |
|
| 25 |
C !INPUT PARAMETERS: =================================================== |
| 26 |
C myThid :: thread number |
| 27 |
INTEGER myThid |
| 28 |
CEOP |
| 29 |
|
| 30 |
#ifdef ALLOW_RBCS |
| 31 |
|
| 32 |
C !LOCAL VARIABLES: |
| 33 |
C i,j,k,bi,bj,iTracer :: loop indices |
| 34 |
INTEGER i,j,k,bi,bj |
| 35 |
INTEGER ium,ivm,iwm |
| 36 |
#ifdef ALLOW_PTRACERS |
| 37 |
INTEGER iTracer |
| 38 |
#endif |
| 39 |
|
| 40 |
DO bj = myByLo(myThid), myByHi(myThid) |
| 41 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
| 42 |
rbcsLdRec(bi,bj) = 0 |
| 43 |
DO k=1,Nr |
| 44 |
DO j=1-Oly,sNy+OLy |
| 45 |
DO i=1-Olx,sNx+Olx |
| 46 |
rbct0(i,j,k,bi,bj) = 0. _d 0 |
| 47 |
rbcs0(i,j,k,bi,bj) = 0. _d 0 |
| 48 |
rbct1(i,j,k,bi,bj) = 0. _d 0 |
| 49 |
rbcs1(i,j,k,bi,bj) = 0. _d 0 |
| 50 |
RBCtemp(i,j,k,bi,bj) = 0. _d 0 |
| 51 |
RBCsalt(i,j,k,bi,bj) = 0. _d 0 |
| 52 |
ENDDO |
| 53 |
ENDDO |
| 54 |
ENDDO |
| 55 |
ENDDO |
| 56 |
ENDDO |
| 57 |
|
| 58 |
#ifndef DISABLE_RBCS_MOM |
| 59 |
DO ium= 1,UmLEN |
| 60 |
DO bj = myByLo(myThid), myByHi(myThid) |
| 61 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
| 62 |
DO k=1,Nr |
| 63 |
DO j=1-Oly,sNy+OLy |
| 64 |
DO i=1-Olx,sNx+Olx |
| 65 |
rbcu0(i,j,k,bi,bj,ium) = 0. _d 0 |
| 66 |
rbcu1(i,j,k,bi,bj,ium) = 0. _d 0 |
| 67 |
RBCuVel(i,j,k,bi,bj,ium) = 0. _d 0 |
| 68 |
ENDDO |
| 69 |
ENDDO |
| 70 |
ENDDO |
| 71 |
ENDDO |
| 72 |
ENDDO |
| 73 |
ENDDO |
| 74 |
DO ivm= 1,VmLEN |
| 75 |
DO bj = myByLo(myThid), myByHi(myThid) |
| 76 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
| 77 |
DO k=1,Nr |
| 78 |
DO j=1-Oly,sNy+OLy |
| 79 |
DO i=1-Olx,sNx+Olx |
| 80 |
rbcv0(i,j,k,bi,bj,ivm) = 0. _d 0 |
| 81 |
rbcv1(i,j,k,bi,bj,ivm) = 0. _d 0 |
| 82 |
RBCvVel(i,j,k,bi,bj,ivm) = 0. _d 0 |
| 83 |
ENDDO |
| 84 |
ENDDO |
| 85 |
ENDDO |
| 86 |
ENDDO |
| 87 |
ENDDO |
| 88 |
ENDDO |
| 89 |
#ifdef ALLOW_NONHYDROSTATIC |
| 90 |
DO iwm= 1,WmLEN |
| 91 |
DO bj = myByLo(myThid), myByHi(myThid) |
| 92 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
| 93 |
DO k=1,Nr |
| 94 |
DO j=1-Oly,sNy+OLy |
| 95 |
DO i=1-Olx,sNx+Olx |
| 96 |
rbcw0(i,j,k,bi,bj,iwm) = 0. _d 0 |
| 97 |
rbcw1(i,j,k,bi,bj,iwm) = 0. _d 0 |
| 98 |
RBCwVel(i,j,k,bi,bj,iwm) = 0. _d 0 |
| 99 |
ENDDO |
| 100 |
ENDDO |
| 101 |
ENDDO |
| 102 |
ENDDO |
| 103 |
ENDDO |
| 104 |
ENDDO |
| 105 |
#endif |
| 106 |
#endif |
| 107 |
#ifdef ALLOW_PTRACERS |
| 108 |
C Loop over tracers |
| 109 |
DO iTracer = 1, PTRACERS_num |
| 110 |
DO bj = myByLo(myThid), myByHi(myThid) |
| 111 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
| 112 |
DO k=1,Nr |
| 113 |
DO j=1-Oly,sNy+OLy |
| 114 |
DO i=1-Olx,sNx+Olx |
| 115 |
rbcptr0(i,j,k,bi,bj,iTracer) = 0. _d 0 |
| 116 |
rbcptr1(i,j,k,bi,bj,iTracer) = 0. _d 0 |
| 117 |
RBC_ptracers(i,j,k,bi,bj,iTracer) = 0. _d 0 |
| 118 |
ENDDO |
| 119 |
ENDDO |
| 120 |
ENDDO |
| 121 |
ENDDO |
| 122 |
ENDDO |
| 123 |
C end of Tracer loop |
| 124 |
ENDDO |
| 125 |
#endif /* ALLOW_PTRACERS */ |
| 126 |
|
| 127 |
#endif /* ALLOW_RBCS */ |
| 128 |
|
| 129 |
RETURN |
| 130 |
END |