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

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

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


Revision 1.1 - (show annotations) (download)
Thu Jul 13 21:30:12 2006 UTC (17 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, mitgcm_mapl_00, checkpoint58u_post, checkpoint58w_post, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint58r_post, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint58q_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint59, checkpoint58o_post, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint58v_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y, checkpoint58m_post, HEAD
add S/R for vertical momentum side-drag (+ corresponding diagnostic)

1 C $Header: /u/gcmpack/MITgcm/pkg/mom_common/mom_v_sidedrag.F,v 1.12 2006/06/07 01:55:15 heimbach Exp $
2 C $Name: $
3
4 #include "MOM_COMMON_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: MOM_W_SIDEDRAG
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE MOM_W_SIDEDRAG(
11 I bi,bj,k,
12 I wFld, del2w,
13 I rThickC, recip_rThickC,
14 I viscAh_W, viscA4_W,
15 O gwSideDrag,
16 I myThid)
17
18 C !DESCRIPTION:
19 C Calculates the drag terms due to the no-slip condition on viscous stresses:
20 C \begin{equation*}
21 C G^w_{drag} = - \frac{2}{\Delta x_w} (A_h w - A_4 \nabla^2 w)
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 #include "SURFACE.h"
31
32 C !INPUT PARAMETERS: ===================================================
33 C bi,bj :: tile indices
34 C k :: vertical level
35 C wFld :: vertical velocity
36 C del2w :: Laplacian of vertical velocity
37 C rThickC :: thickness of W-cell
38 C recip_rThickC :: reciprol of W-cell thickness
39 C viscAh_W :: harmonic horizontal viscosity (at W-Cell center)
40 C viscA4_W :: biharmonic horizontal viscosity (at W-Cell center)
41 C myThid :: my Thread Id number
42 INTEGER bi,bj,k
43 _RL wFld (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
44 _RL del2w (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
45 _RL rThickC (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
46 _RL recip_rThickC(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
47 _RL viscAh_W(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
48 _RL viscA4_W(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
49 INTEGER myThid
50
51 C !OUTPUT PARAMETERS: ==================================================
52 C gwSideDrag :: side drag tendency
53 _RL gwSideDrag(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
54
55 #ifdef ALLOW_NONHYDROSTATIC
56 C !LOCAL VARIABLES: ====================================================
57 C i,j :: loop indices
58 C heightStepW :: height of topographic step to West
59 C heightStepE :: height of topographic step to East
60 C heightStepS :: height of topographic step to South
61 C heightStepN :: height of topographic step to North
62 INTEGER i,j
63 _RL heightStepW, heightStepE
64 _RL heightStepS, heightStepN
65 CEOP
66
67 C-- Laplacian and bi-harmonic terms: using variable-Viscosity coeff.
68 C from MOM_CALC_VISC, consistent with dissipation in the interior
69
70 DO j=2-Oly,sNy+Oly-1
71 DO i=2-Olx,sNx+Olx-1
72 C- this will not give any side-drag along thin wall.
73 C (but this might just be what we want ...)
74 heightStepW = MAX( 0. _d 0, rThickC(i,j) - rThickC(i-1,j) )
75 heightStepE = MAX( 0. _d 0, rThickC(i,j) - rThickC(i+1,j) )
76 heightStepS = MAX( 0. _d 0, rThickC(i,j) - rThickC(i,j-1) )
77 heightStepN = MAX( 0. _d 0, rThickC(i,j) - rThickC(i,j+1) )
78 C- jmc: take directly viscAh_W & viscA4_W (no bar_i, bar_j) since
79 C they are already at the center (and not above u,v point).
80 gwSideDrag(i,j) =
81 & -sideDragFactor
82 & *( heightStepW*_dyG( i ,j,bi,bj)*_recip_dxC( i ,j,bi,bj)
83 & *( viscAh_W(i,j,k,bi,bj)*wFld(i,j,k,bi,bj)
84 & *cosFacV(j,bi,bj)
85 & -viscA4_W(i,j,k,bi,bj)*del2w(i,j)
86 #ifdef COSINEMETH_III
87 & *sqCosFacU(j,bi,bj)
88 #else
89 & *cosFacU(j,bi,bj)
90 #endif
91 & )
92 & +heightStepE*_dyG(i+1,j,bi,bj)*_recip_dxC(i+1,j,bi,bj)
93 & *( viscAh_W(i,j,k,bi,bj)*wFld(i,j,k,bi,bj)
94 & *cosFacV(j,bi,bj)
95 & -viscA4_W(i,j,k,bi,bj)*del2w(i,j)
96 #ifdef COSINEMETH_III
97 & *sqCosFacU(j,bi,bj)
98 #else
99 & *cosFacU(j,bi,bj)
100 #endif
101 & )
102 & +heightStepS*_dxG(i,j,bi,bj)*_recip_dyC(i,j,bi,bj)
103 & *( viscAh_W(i,j,k,bi,bj)*wFld(i,j,k,bi,bj)
104 #ifdef ISOTROPIC_COS_SCALING
105 & *cosFacV(j,bi,bj)
106 #endif
107 & -viscA4_W(i,j,k,bi,bj)*del2w(i,j)
108 #ifdef ISOTROPIC_COS_SCALING
109 # ifdef COSINEMETH_III
110 & *sqCosFacV(j,bi,bj)
111 # else
112 & *cosFacV(j,bi,bj)
113 # endif
114 #endif
115 & )
116 & +heightStepN*_dxG(i,j+1,bi,bj)*_recip_dyC(i,j+1,bi,bj)
117 & *( viscAh_W(i,j,k,bi,bj)*wFld(i,j,k,bi,bj)
118 #ifdef ISOTROPIC_COS_SCALING
119 & *cosFacV(j+1,bi,bj)
120 #endif
121 & -viscA4_W(i,j,k,bi,bj)*del2w(i,j)
122 #ifdef ISOTROPIC_COS_SCALING
123 # ifdef COSINEMETH_III
124 & *sqCosFacV(j+1,bi,bj)
125 # else
126 & *cosFacV(j+1,bi,bj)
127 # endif
128 #endif
129 & )
130 & )*recip_rThickC(i,j)*recip_rA(i,j,bi,bj)
131 ENDDO
132 ENDDO
133
134 #ifdef ALLOW_DIAGNOSTICS
135 IF (useDiagnostics) THEN
136 CALL DIAGNOSTICS_FILL(gwSideDrag,'WSidDrag',k,1,2,bi,bj,myThid)
137 ENDIF
138 #endif /* ALLOW_DIAGNOSTICS */
139
140 #endif /* ALLOW_NONHYDROSTATIC */
141
142 RETURN
143 END

  ViewVC Help
Powered by ViewVC 1.1.22