/[MITgcm]/MITgcm/pkg/mom_fluxform/mom_u_del2u.F
ViewVC logotype

Contents of /MITgcm/pkg/mom_fluxform/mom_u_del2u.F

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


Revision 1.10 - (show annotations) (download)
Sun Feb 9 18:51:46 2014 UTC (10 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65o, checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64u, checkpoint64w, checkpoint64v, HEAD
Changes since 1.9: +23 -25 lines
fix sideDrag option for thin-walls with Non-Lin Free-Surf
using 2nd hFacZ that is computed from initial (fix domain) hFac

1 C $Header: /u/gcmpack/MITgcm/pkg/mom_fluxform/mom_u_del2u.F,v 1.9 2011/05/03 19:49:38 jmc Exp $
2 C $Name: $
3
4 #include "MOM_FLUXFORM_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: MOM_U_DEL2U
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE MOM_U_DEL2U(
11 I bi, bj, k,
12 I uFld, hFacZ, h0FacZ,
13 O del2u,
14 I myThid )
15
16 C !DESCRIPTION:
17 C Calculates the Laplacian of zonal flow
18
19 C !USES: ===============================================================
20 IMPLICIT NONE
21 #include "SIZE.h"
22 #include "EEPARAMS.h"
23 #include "PARAMS.h"
24 #include "GRID.h"
25 #include "SURFACE.h"
26
27 C !INPUT PARAMETERS: ===================================================
28 C bi,bj :: tile indices
29 C k :: vertical level
30 C uFld :: zonal flow
31 C hFacZ :: fractional thickness at vorticity points
32 C h0FacZ :: fixed fractional thickness at vorticity points
33 C myThid :: my Thread Id number
34 INTEGER bi, bj, k
35 _RL uFld (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
36 _RS hFacZ (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
37 _RS h0FacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
38 INTEGER myThid
39
40 C !OUTPUT PARAMETERS: ==================================================
41 C del2u :: Laplacian
42 _RL del2u(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43
44 C !LOCAL VARIABLES: ====================================================
45 C i,j :: loop indices
46 INTEGER I,J
47 _RL fZon(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
48 _RL fMer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
49 _RS hFacZClosedS, hFacZClosedN
50 CEOP
51
52 C Zonal flux d/dx U
53 DO j=1-OLy+1,sNy+OLy-1
54 DO i=1-OLx,sNx+OLx-1
55 fZon(i,j) = drF(k)*_hFacC(i,j,k,bi,bj)
56 & *_dyF(i,j,bi,bj)
57 & *_recip_dxF(i,j,bi,bj)
58 & *(uFld(i+1,j)-uFld(i,j))
59 #ifdef COSINEMETH_III
60 & *sqCosFacU(J,bi,bj)
61 #endif
62 #ifdef ALLOW_OBCS
63 & *maskInC(i,j,bi,bj)
64 #endif
65 c & *deepFacC(k) ! dyF scaling factor
66 c & *recip_deepFacC(k) ! recip_dxF scaling factor
67 ENDDO
68 ENDDO
69
70 C Meridional flux d/dy U
71 DO j=1-OLy+1,sNy+OLy
72 DO i=1-OLx+1,sNx+OLx-1
73 fMer(i,j) = drF(k)*hFacZ(i,j)
74 & *_dxV(i,j,bi,bj)
75 & *_recip_dyU(i,j,bi,bj)
76 & *(uFld(i,j)-uFld(i,j-1))
77 #if (defined (ISOTROPIC_COS_SCALING) && defined (COSINEMETH_III))
78 & *sqCosFacV(J,bi,bj)
79 #endif
80 c & *deepFacC(k) ! dxV scaling factor
81 c & *recip_deepFacC(k) ! recip_dyU scaling factor
82 ENDDO
83 ENDDO
84
85 C del^2 U
86 DO j=1-OLy+1,sNy+OLy-1
87 DO i=1-OLx+1,sNx+OLx-1
88 del2u(i,j) =
89 & recip_drF(k)*_recip_hFacW(i,j,k,bi,bj)
90 & *recip_rAw(i,j,bi,bj)*recip_deepFac2C(k)
91 & *( fZon(i,j ) - fZon(i-1,j)
92 & +fMer(i,j+1) - fMer(i ,j)
93 & )*_maskW(i,j,k,bi,bj)
94 #ifdef ALLOW_OBCS
95 & *maskInW(i,j,bi,bj)
96 #endif
97 ENDDO
98 ENDDO
99
100 IF (no_slip_sides) THEN
101 C-- No-slip BCs impose a drag at walls...
102 DO j=1-OLy+1,sNy+OLy-1
103 DO i=1-OLx+1,sNx+OLx-1
104 #ifdef NONLIN_FRSURF
105 hFacZClosedS = h0FacW(i,j,k,bi,bj) - h0FacZ(i,j)
106 hFacZClosedN = h0FacW(i,j,k,bi,bj) - h0FacZ(i,j+1)
107 #else
108 hFacZClosedS = _hFacW(i,j,k,bi,bj) - h0FacZ(i,j)
109 hFacZClosedN = _hFacW(i,j,k,bi,bj) - h0FacZ(i,j+1)
110 #endif
111 del2u(i,j) = del2u(i,j)
112 & -_recip_hFacW(i,j,k,bi,bj)
113 & *recip_rAw(i,j,bi,bj)*recip_deepFac2C(k)
114 & *( hFacZClosedS*dxV(i, j ,bi,bj)
115 & *_recip_dyU(i, j ,bi,bj)
116 & +hFacZClosedN*dxV(i,j+1,bi,bj)
117 & *_recip_dyU(i,j+1,bi,bj)
118 & )*uFld(i,j)*sideDragFactor
119 & *_maskW(i,j,k,bi,bj)
120 ENDDO
121 ENDDO
122 ENDIF
123
124 RETURN
125 END

  ViewVC Help
Powered by ViewVC 1.1.22