/[MITgcm]/MITgcm/pkg/mom_common/mom_u_rviscflux.F
ViewVC logotype

Contents of /MITgcm/pkg/mom_common/mom_u_rviscflux.F

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


Revision 1.3 - (show annotations) (download)
Sat Jul 30 22:02:14 2005 UTC (20 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint58e_post, checkpoint57s_post, checkpoint58r_post, checkpoint57y_post, checkpoint58n_post, checkpoint58h_post, checkpoint57y_pre, checkpoint58q_post, checkpoint57v_post, checkpoint58j_post, checkpoint57r_post, checkpoint58, checkpoint58f_post, checkpoint57x_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint58k_post, checkpoint58p_post, checkpoint58b_post, checkpoint58m_post
Changes since 1.2: +23 -17 lines
change argument "k": compute vertical flux @ interface k (instead of k+1)

1 C $Header: /u/gcmpack/MITgcm/pkg/mom_common/mom_u_rviscflux.F,v 1.2 2005/06/22 00:29:02 jmc Exp $
2 C $Name: $
3
4 #include "MOM_COMMON_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: MOM_U_RVISCFLUX
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE MOM_U_RVISCFLUX(
11 I bi,bj,k,
12 I uFld, KappaRU,
13 O rViscFluxU,
14 I myThid)
15
16 C !DESCRIPTION:
17 C Calculates the area integrated vertical viscous fluxes of U
18 C at vertical interface k (between level k & k-1):
19 C \begin{equation*}
20 C F^r = - \frac{ {\cal A}_w }{\Delta r_c} A_r \delta_k 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 KappaRU :: vertical viscosity
35 C myThid :: thread number
36 INTEGER bi,bj,k
37 _RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
38 _RL KappaRU(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
39 INTEGER myThid
40
41 C !OUTPUT PARAMETERS: ==================================================
42 C rViscFluxU :: viscous fluxes
43 _RL rViscFluxU(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
44
45 C !LOCAL VARIABLES: ====================================================
46 C i,j :: loop indices
47 INTEGER i,j
48 CEOP
49
50 C - Vertical viscous flux
51 IF ( k.LE.1 .OR. k.GT.Nr ) THEN
52 DO j=1-Oly,sNy+Oly
53 DO i=1-Olx,sNx+Olx
54 rViscFluxU(i,j) = 0. _d 0
55 ENDDO
56 ENDDO
57 ELSE
58 DO j=1-Oly,sNy+Oly-1
59 DO i=1-Olx,sNx+Olx-1
60 rViscFluxU(i,j) =
61 & -KappaRU(i,j,k)
62 & *rAw(i,j,bi,bj)
63 & *( uFld(i,j,k,bi,bj)-uFld(i,j,k-1,bi,bj)
64 & )*rkSign*recip_drC(k)
65 & *_maskW(i,j,k,bi,bj)
66 & *_maskW(i,j,k-1,bi,bj)
67 ENDDO
68 ENDDO
69 ENDIF
70
71 RETURN
72 END

  ViewVC Help
Powered by ViewVC 1.1.22