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

Annotation of /MITgcm_contrib/natl_12/code/mom_u_yviscflux.F

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


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

1 cnh 1.1 C $Header: /u/u0/gcmpack/MITgcm/pkg/mom_fluxform/mom_u_yviscflux.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_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 myThid)
15    
16     C !DESCRIPTION:
17     C Calculates the area integrated meridional viscous fluxes of U:
18     C \begin{equation*}
19     C F^y = - \frac{ \Delta y_v \Delta r_f h_z }{\Delta y_u}
20     C ( A_h \delta_j u - A_4 \delta_j \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     _RS hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
40     INTEGER myThid
41    
42     C !OUTPUT PARAMETERS: ==================================================
43     C yViscFluxU :: viscous fluxes
44     _RL yViscFluxU(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
45    
46     C !LOCAL VARIABLES: ====================================================
47     C i,j :: loop indices
48     INTEGER I,J
49     _RS gridScalingA4
50 cnh 1.2 _RS gridScalingAh
51 cnh 1.1 CEOP
52    
53     C - Laplacian and bi-harmonic terms
54     DO j=1-Oly+1,sNy+Oly
55     DO i=1-Olx,sNx+Olx
56     gridScalingA4 = (_dyU(i,j,bi,bj)**4)/(5000.**4)
57 cnh 1.2 gridScalingAh = (_dyU(i,j,bi,bj)**2)/(5000.**2)
58 cnh 1.1 yViscFluxU(i,j) =
59     & _dxV(i,j,bi,bj)*drF(k)*hFacZ(i,j)
60     & *(
61     & -viscAh*(uFld(i,j)-uFld(i,j-1))
62 cnh 1.2 & *gridScalingAh
63 cnh 1.1 #ifdef ISOTROPIC_COS_SCALING
64     & *cosFacV(J,bi,bj)
65     #endif
66     & +viscA4*(del2u(i,j) -del2u(i,j-1) )
67     & *gridScalingA4
68     #ifdef ISOTROPIC_COS_SCALING
69     #ifdef COSINEMETH_III
70     & *sqcosFacV(J,bi,bj)
71     #else
72     & *cosFacV(J,bi,bj)
73     #endif
74     #endif
75     & )*_recip_dyU(i,j,bi,bj)
76     ENDDO
77     ENDDO
78    
79     RETURN
80     END

  ViewVC Help
Powered by ViewVC 1.1.22