forked from altMITgcm/MITgcm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rbcs_init_varia.F
88 lines (77 loc) · 2.38 KB
/
rbcs_init_varia.F
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
C $Header: /u/gcmpack/MITgcm/pkg/rbcs/rbcs_init_varia.F,v 1.8 2011/05/14 19:52:12 jmc Exp $
C $Name: $
#include "RBCS_OPTIONS.h"
C !INTERFACE: ==========================================================
SUBROUTINE RBCS_INIT_VARIA( myThid )
C !DESCRIPTION:
C calls subroutines that initialized variables for relaxed
c boundary conditions
C !USES: ===============================================================
IMPLICIT NONE
#include "SIZE.h"
#include "EEPARAMS.h"
#include "PARAMS.h"
#ifdef ALLOW_PTRACERS
#include "PTRACERS_SIZE.h"
#endif
#include "RBCS_SIZE.h"
c#include "RBCS_PARAMS.h"
#include "RBCS_FIELDS.h"
C !INPUT PARAMETERS: ===================================================
C myThid :: thread number
INTEGER myThid
CEOP
#ifdef ALLOW_RBCS
C !LOCAL VARIABLES:
C i,j,k,bi,bj,iTracer :: loop indices
INTEGER i,j,k,bi,bj
#ifdef ALLOW_PTRACERS
INTEGER iTracer
#endif
DO bj = myByLo(myThid), myByHi(myThid)
DO bi = myBxLo(myThid), myBxHi(myThid)
rbcsLdRec(bi,bj) = 0
DO k=1,Nr
DO j=1-Oly,sNy+OLy
DO i=1-Olx,sNx+Olx
#ifndef DISABLE_RBCS_MOM
rbcu0(i,j,k,bi,bj) = 0. _d 0
rbcv0(i,j,k,bi,bj) = 0. _d 0
rbcu1(i,j,k,bi,bj) = 0. _d 0
rbcv1(i,j,k,bi,bj) = 0. _d 0
RBCuVel(i,j,k,bi,bj) = 0. _d 0
RBCvVel(i,j,k,bi,bj) = 0. _d 0
#endif
rbct0(i,j,k,bi,bj) = 0. _d 0
rbcs0(i,j,k,bi,bj) = 0. _d 0
rbct1(i,j,k,bi,bj) = 0. _d 0
rbcs1(i,j,k,bi,bj) = 0. _d 0
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
DO bj = myByLo(myThid), myByHi(myThid)
DO bi = myBxLo(myThid), myBxHi(myThid)
DO k=1,Nr
DO j=1-Oly,sNy+OLy
DO i=1-Olx,sNx+Olx
rbcptr0(i,j,k,bi,bj,iTracer) = 0. _d 0
rbcptr1(i,j,k,bi,bj,iTracer) = 0. _d 0
RBC_ptracers(i,j,k,bi,bj,iTracer) = 0. _d 0
ENDDO
ENDDO
ENDDO
ENDDO
ENDDO
C end of Tracer loop
ENDDO
#endif /* ALLOW_PTRACERS */
#endif /* ALLOW_RBCS */
RETURN
END