/[MITgcm]/MITgcm_contrib/natl_12/code/mom_u_xviscflux.F
ViewVC logotype

Contents of /MITgcm_contrib/natl_12/code/mom_u_xviscflux.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Thu Aug 7 13:03:31 2003 UTC (21 years, 11 months ago) by cnh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +3 -1 lines
Mods to allow laplacian as well as biharmonic viscosity with varying resolution

1 C $Header: /u/u0/gcmpack/MITgcm/pkg/mom_fluxform/mom_u_xviscflux.F,v 1.3 2001/09/26 19:05:21 adcroft Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: MOM_U_XVISCFLUX
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE MOM_U_XVISCFLUX(
11 I bi,bj,k,
12 I uFld, del2u,
13 O xViscFluxU,
14 I myThid)
15
16 C !DESCRIPTION:
17 C Calculates the area integrated zonal viscous fluxes of U:
18 C \begin{equation*}
19 C F^x = - \frac{ \Delta y_f \Delta r_f h_c }{\Delta x_f}
20 C ( A_h \delta_i u - A_4 \delta_i \nabla^2 u )
21 C \end{equation*}
22
23 C !USES: ===============================================================
24 IMPLICIT NONE
25 #include "SIZE.h"
26 #include "EEPARAMS.h"
27 #include "PARAMS.h"
28 #include "GRID.h"
29
30 C !INPUT PARAMETERS: ===================================================
31 C bi,bj :: tile indices
32 C k :: vertical level
33 C uFld :: zonal flow
34 C del2u :: Laplacian of zonal flow
35 C myThid :: thread number
36 INTEGER bi,bj,k
37 _RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
38 _RL del2u(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
39 INTEGER myThid
40
41 C !OUTPUT PARAMETERS: ==================================================
42 C xViscFluxU :: viscous fluxes
43 _RL xViscFluxU(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
44
45 C !LOCAL VARIABLES: ====================================================
46 C i,j :: loop indices
47 INTEGER I,J
48 _RS gridScalingA4
49 _RS gridScalingAh
50 CEOP
51
52 C - Laplacian and bi-harmonic terms
53 DO j=1-Oly,sNy+Oly-1
54 DO i=1-Olx,sNx+Olx-1
55 gridScalingA4 = (_dxF(i,j,bi,bj)**4)/(5000.**4)
56 gridScalingAh = (_dxF(i,j,bi,bj)**2)/(5000.**2)
57 xViscFluxU(i,j) =
58 & _dyF(i,j,bi,bj)*drF(k)*_hFacC(i,j,k,bi,bj)
59 & *(
60 & -viscAh*(uFld(i+1,j)-uFld(i,j))*gridScalingAh
61 & *cosFacU(J,bi,bj)
62 & +viscA4*(del2u(i+1,j) -del2u(i,j) )
63 & *gridScalingA4
64 #ifdef COSINEMETH_III
65 & *sqcosFacU(J,bi,bj)
66 #else
67 & *cosFacU(J,bi,bj)
68 #endif
69 & )*_recip_dxF(i,j,bi,bj)
70 ENDDO
71 ENDDO
72
73 RETURN
74 END

  ViewVC Help
Powered by ViewVC 1.1.22