93 |
DO bi=myBxLo(myThid), myBxHi(myThid) |
DO bi=myBxLo(myThid), myBxHi(myThid) |
94 |
do j = jmin,jmax |
do j = jmin,jmax |
95 |
do i = imin,imax |
do i = imin,imax |
|
#ifndef ALLOW_OPENAD |
|
96 |
if ( iarr .eq. 1 ) then |
if ( iarr .eq. 1 ) then |
|
# ifdef ALLOW_BOTTOMDRAG_CONTROL |
|
|
bottomdragfld(i,j,bi,bj) = bottomdragfld(i,j,bi,bj) |
|
|
& + tmpfld2d(i,j,bi,bj) |
|
|
# endif |
|
|
elseif ( iarr .eq. 2 ) then |
|
97 |
theta(i,j,1,bi,bj) = theta(i,j,1,bi,bj) |
theta(i,j,1,bi,bj) = theta(i,j,1,bi,bj) |
98 |
& + tmpfld2d(i,j,bi,bj) |
& + tmpfld2d(i,j,bi,bj) |
|
elseif ( iarr .eq. 3 ) then |
|
|
salt(i,j,1,bi,bj) = salt(i,j,1,bi,bj) |
|
|
& + tmpfld2d(i,j,bi,bj) |
|
|
endif |
|
|
#else |
|
|
if ( iarr .eq. 1 ) then |
|
|
# ifdef ALLOW_BOTTOMDRAG_CONTROL |
|
|
bottomdragfld(i,j,bi,bj) = bottomdragfld(i,j,bi,bj) |
|
|
& + xx_genarr2d(i,j,bi,bj,iarr) |
|
|
& + tmpfld2d(i,j,bi,bj) |
|
|
# endif |
|
99 |
elseif ( iarr .eq. 2 ) then |
elseif ( iarr .eq. 2 ) then |
|
theta(i,j,1,bi,bj) = theta(i,j,1,bi,bj) |
|
|
& + xx_genarr2d(i,j,bi,bj,iarr) |
|
|
& + tmpfld2d(i,j,bi,bj) |
|
|
elseif ( iarr .eq. 3 ) then |
|
100 |
salt(i,j,1,bi,bj) = salt(i,j,1,bi,bj) |
salt(i,j,1,bi,bj) = salt(i,j,1,bi,bj) |
101 |
& + xx_genarr2d(i,j,bi,bj,iarr) |
& + tmpfld2d(i,j,bi,bj) |
|
& + tmpfld2d(i,j,bi,bj) |
|
102 |
endif |
endif |
|
#endif /* ALLOW_OPENAD */ |
|
103 |
enddo |
enddo |
104 |
enddo |
enddo |
105 |
ENDDO |
ENDDO |
106 |
ENDDO |
ENDDO |
107 |
C-- end iarr loop |
C-- end iarr loop |
108 |
ENDDO |
ENDDO |
109 |
#ifdef ALLOW_BOTTOMDRAG_CONTROL |
|
|
_EXCH_XY_RL( bottomdragfld, myThid ) |
|
|
#endif |
|
110 |
_EXCH_XYZ_RL( theta, myThid ) |
_EXCH_XYZ_RL( theta, myThid ) |
111 |
_EXCH_XYZ_RL( salt, myThid ) |
_EXCH_XYZ_RL( salt, myThid ) |
112 |
|
|
134 |
do k = 1,Nr |
do k = 1,Nr |
135 |
do j = jmin,jmax |
do j = jmin,jmax |
136 |
do i = imin,imax |
do i = imin,imax |
137 |
#ifndef ALLOW_OPENAD |
cc if ( iarr .eq. 1 ) then |
138 |
if ( iarr .eq. 1 ) then |
cc theta(i,j,k,bi,bj) = theta(i,j,k,bi,bj) |
139 |
theta(i,j,k,bi,bj) = theta(i,j,k,bi,bj) |
cc & + fac*tmpfld3d(i,j,k,bi,bj) |
140 |
& + fac*tmpfld3d(i,j,k,bi,bj) |
cc elseif ( iarr .eq. 2 ) then |
141 |
elseif ( iarr .eq. 2 ) then |
cc salt(i,j,k,bi,bj) = salt(i,j,k,bi,bj) |
142 |
salt(i,j,k,bi,bj) = salt(i,j,k,bi,bj) |
cc & + fac*tmpfld3d(i,j,k,bi,bj) |
143 |
& + fac*tmpfld3d(i,j,k,bi,bj) |
cc endif |
|
endif |
|
|
#else |
|
|
if ( iarr .eq. 1 ) then |
|
|
theta(i,j,k,bi,bj) = theta(i,j,k,bi,bj) |
|
|
& + fac*xx_genarr3d(i,j,k,bi,bj,iarr) |
|
|
& + fac*tmpfld3d(i,j,k,bi,bj) |
|
|
elseif ( iarr .eq. 2 ) then |
|
|
salt(i,j,k,bi,bj) = salt(i,j,k,bi,bj) |
|
|
& + fac*xx_genarr3d(i,j,k,bi,bj,iarr) |
|
|
& + fac*tmpfld3d(i,j,k,bi,bj) |
|
|
endif |
|
|
#endif /* ALLOW_OPENAD */ |
|
144 |
enddo |
enddo |
145 |
enddo |
enddo |
146 |
enddo |
enddo |
148 |
ENDDO |
ENDDO |
149 |
C-- end iarr loop |
C-- end iarr loop |
150 |
ENDDO |
ENDDO |
151 |
_EXCH_XYZ_RL( theta, myThid ) |
|
152 |
_EXCH_XYZ_RL( salt, myThid ) |
cc _EXCH_XYZ_RL( theta, myThid ) |
153 |
|
cc _EXCH_XYZ_RL( salt, myThid ) |
154 |
|
|
155 |
#endif /* ALLOW_GENARR3D_CONTROL */ |
#endif /* ALLOW_GENARR3D_CONTROL */ |
156 |
|
|