1 |
C $Header: /u/gcmpack/MITgcm/pkg/mom_fluxform/mom_u_del2u.F,v 1.6 2006/04/05 15:43:15 mlosch Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "MOM_FLUXFORM_OPTIONS.h" |
5 |
|
6 |
CBOP |
7 |
C !ROUTINE: MOM_U_DEL2U |
8 |
|
9 |
C !INTERFACE: ========================================================== |
10 |
SUBROUTINE MOM_U_DEL2U( |
11 |
I bi,bj,k, |
12 |
I uFld, hFacZ, |
13 |
O del2u, |
14 |
I myThid) |
15 |
|
16 |
C !DESCRIPTION: |
17 |
C Calculates the Laplacian of zonal flow |
18 |
|
19 |
C !USES: =============================================================== |
20 |
IMPLICIT NONE |
21 |
#include "SIZE.h" |
22 |
#include "EEPARAMS.h" |
23 |
#include "PARAMS.h" |
24 |
#include "GRID.h" |
25 |
|
26 |
C !INPUT PARAMETERS: =================================================== |
27 |
C bi,bj :: tile indices |
28 |
C k :: vertical level |
29 |
C uFld :: zonal flow |
30 |
C hFacZ :: fractional thickness at vorticity points |
31 |
C myThid :: thread number |
32 |
INTEGER bi,bj,k |
33 |
_RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
34 |
_RS hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
35 |
INTEGER myThid |
36 |
|
37 |
C !OUTPUT PARAMETERS: ================================================== |
38 |
C del2u :: Laplacian |
39 |
_RL del2u(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
40 |
|
41 |
C !LOCAL VARIABLES: ==================================================== |
42 |
C i,j :: loop indices |
43 |
INTEGER I,J |
44 |
_RL fZon(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
45 |
_RL fMer(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
46 |
_RS hFacZClosedS,hFacZClosedN |
47 |
CEOP |
48 |
|
49 |
C Zonal flux d/dx U |
50 |
DO j=1-Oly+1,sNy+Oly-1 |
51 |
DO i=1-Olx,sNx+Olx-1 |
52 |
fZon(i,j) = drF(k)*_hFacC(i,j,k,bi,bj) |
53 |
& *_dyF(i,j,bi,bj) |
54 |
& *_recip_dxF(i,j,bi,bj) |
55 |
& *(uFld(i+1,j)-uFld(i,j)) |
56 |
#ifdef COSINEMETH_III |
57 |
& *sqCosFacU(J,bi,bj) |
58 |
#endif |
59 |
c & *deepFacC(k) ! dyF scaling factor |
60 |
c & *recip_deepFacC(k) ! recip_dxF scaling factor |
61 |
ENDDO |
62 |
ENDDO |
63 |
|
64 |
C Meridional flux d/dy U |
65 |
DO j=1-Oly+1,sNy+Oly |
66 |
DO i=1-Olx+1,sNx+Olx-1 |
67 |
fMer(i,j) = drF(k)*hFacZ(i,j) |
68 |
& *_dxV(i,j,bi,bj) |
69 |
& *_recip_dyU(i,j,bi,bj) |
70 |
& *(uFld(i,j)-uFld(i,j-1)) |
71 |
#if (defined (ISOTROPIC_COS_SCALING) && defined (COSINEMETH_III)) |
72 |
& *sqCosFacV(J,bi,bj) |
73 |
#endif |
74 |
c & *deepFacC(k) ! dxV scaling factor |
75 |
c & *recip_deepFacC(k) ! recip_dyU scaling factor |
76 |
ENDDO |
77 |
ENDDO |
78 |
|
79 |
C del^2 U |
80 |
DO j=1-Oly+1,sNy+Oly-1 |
81 |
DO i=1-Olx+1,sNx+Olx-1 |
82 |
del2u(i,j) = |
83 |
& recip_drF(k)*_recip_hFacW(i,j,k,bi,bj) |
84 |
& *recip_rAw(i,j,bi,bj)*recip_deepFac2C(k) |
85 |
& *( fZon(i,j ) - fZon(i-1,j) |
86 |
& +fMer(i,j+1) - fMer(i ,j) |
87 |
& )*_maskW(i,j,k,bi,bj) |
88 |
ENDDO |
89 |
ENDDO |
90 |
|
91 |
IF (no_slip_sides) THEN |
92 |
C-- No-slip BCs impose a drag at walls... |
93 |
DO j=1-Oly+1,sNy+Oly-1 |
94 |
DO i=1-Olx+1,sNx+Olx-1 |
95 |
hFacZClosedS = _hFacW(i,j,k,bi,bj) - hFacZ(i,j) |
96 |
hFacZClosedN = _hFacW(i,j,k,bi,bj) - hFacZ(i,j+1) |
97 |
del2u(i,j) = del2u(i,j) |
98 |
& -_recip_hFacW(i,j,k,bi,bj)*recip_drF(k) |
99 |
& *recip_rAw(i,j,bi,bj)*recip_deepFac2C(k) |
100 |
& *( hFacZClosedS*dxV(i, j ,bi,bj) |
101 |
& *_recip_dyU(i, j ,bi,bj) |
102 |
& +hFacZClosedN*dxV(i,j+1,bi,bj) |
103 |
& *_recip_dyU(i,j+1,bi,bj) |
104 |
& )*drF(k)*2.*uFld(i,j) |
105 |
& *_maskW(i,j,k,bi,bj) |
106 |
ENDDO |
107 |
ENDDO |
108 |
ENDIF |
109 |
|
110 |
RETURN |
111 |
END |