1 |
C $Header: /u/gcmpack/MITgcm/pkg/mom_fluxform/mom_u_yviscflux.F,v 1.6 2005/09/26 15:27:11 baylor Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "MOM_FLUXFORM_OPTIONS.h" |
5 |
|
6 |
CBOP |
7 |
C !ROUTINE: MOM_U_YVISCFLUX |
8 |
|
9 |
C !INTERFACE: ========================================================== |
10 |
SUBROUTINE MOM_U_YVISCFLUX( |
11 |
I bi,bj,k, |
12 |
I uFld, del2u, hFacZ, |
13 |
O yViscFluxU, |
14 |
I viscAh_Z,viscA4_Z, |
15 |
I myThid ) |
16 |
|
17 |
C !DESCRIPTION: |
18 |
C Calculates the area integrated meridional viscous fluxes of U: |
19 |
C \begin{equation*} |
20 |
C F^y = - \frac{ \Delta y_v \Delta r_f h_z }{\Delta y_u} |
21 |
C ( A_h \delta_j u - A_4 \delta_j \nabla^2 u ) |
22 |
C \end{equation*} |
23 |
|
24 |
C !USES: =============================================================== |
25 |
IMPLICIT NONE |
26 |
#include "SIZE.h" |
27 |
#include "EEPARAMS.h" |
28 |
#include "PARAMS.h" |
29 |
#include "GRID.h" |
30 |
|
31 |
C !INPUT PARAMETERS: =================================================== |
32 |
C bi,bj :: tile indices |
33 |
C k :: vertical level |
34 |
C uFld :: zonal flow |
35 |
C del2u :: Laplacian of zonal flow |
36 |
C myThid :: thread number |
37 |
INTEGER bi,bj,k |
38 |
_RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
39 |
_RL del2u(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
40 |
_RS hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
41 |
_RL viscAh_Z(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
42 |
_RL viscA4_Z(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
43 |
INTEGER myThid |
44 |
|
45 |
C !OUTPUT PARAMETERS: ================================================== |
46 |
C yViscFluxU :: viscous fluxes |
47 |
_RL yViscFluxU(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
48 |
|
49 |
C !LOCAL VARIABLES: ==================================================== |
50 |
C i,j :: loop indices |
51 |
INTEGER I,J |
52 |
CEOP |
53 |
|
54 |
C - Laplacian and bi-harmonic terms |
55 |
DO j=1-Oly+1,sNy+Oly |
56 |
DO i=1-Olx,sNx+Olx |
57 |
yViscFluxU(i,j) = |
58 |
& _dxV(i,j,bi,bj)*drF(k)*hFacZ(i,j) |
59 |
& *( |
60 |
& -viscAh_Z(i,j)*( uFld(i,j)-uFld(i,j-1) ) |
61 |
#ifdef ISOTROPIC_COS_SCALING |
62 |
& *cosFacV(J,bi,bj) |
63 |
#endif |
64 |
& +viscA4_Z(i,j)*(del2u(i,j)-del2u(i,j-1)) |
65 |
#ifdef ISOTROPIC_COS_SCALING |
66 |
#ifdef COSINEMETH_III |
67 |
& *sqCosFacV(J,bi,bj) |
68 |
#else |
69 |
& *cosFacV(J,bi,bj) |
70 |
#endif |
71 |
#endif |
72 |
& )*_recip_dyU(i,j,bi,bj) |
73 |
c & *deepFacC(k) ! dxV scaling factor |
74 |
c & *recip_deepFacC(k) ! recip_dyU scaling factor |
75 |
ENDDO |
76 |
ENDDO |
77 |
|
78 |
RETURN |
79 |
END |