/[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.7 - (show annotations) (download)
Tue Dec 5 05:30:38 2006 UTC (17 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62c, checkpoint59, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint58y_post, checkpoint58t_post, checkpoint60, checkpoint61, checkpoint62, checkpoint58w_post, mitgcm_mapl_00, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint62b, checkpoint58v_post, checkpoint61f, checkpoint58x_post, checkpoint61n, checkpoint59j, checkpoint61q, checkpoint61e, checkpoint58u_post, checkpoint58s_post, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.6: +11 -8 lines
start to implement deep-atmosphere and/or anelastic formulation

1 C $Header: /u/gcmpack/MITgcm/pkg/mom_fluxform/mom_u_del2u.F,v 1.6 2006/04/05 15:43:15 mlosch 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,
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
26 C !INPUT PARAMETERS: ===================================================
27 C bi,bj :: tile indices
28 C k :: vertical level
29 C uFld :: zonal flow
30 C hFacZ :: fractional thickness at vorticity points
31 C myThid :: thread number
32 INTEGER bi,bj,k
33 _RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
34 _RS hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
35 INTEGER myThid
36
37 C !OUTPUT PARAMETERS: ==================================================
38 C del2u :: Laplacian
39 _RL del2u(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
40
41 C !LOCAL VARIABLES: ====================================================
42 C i,j :: loop indices
43 INTEGER I,J
44 _RL fZon(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
45 _RL fMer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
46 _RS hFacZClosedS,hFacZClosedN
47 CEOP
48
49 C Zonal flux d/dx U
50 DO j=1-Oly+1,sNy+Oly-1
51 DO i=1-Olx,sNx+Olx-1
52 fZon(i,j) = drF(k)*_hFacC(i,j,k,bi,bj)
53 & *_dyF(i,j,bi,bj)
54 & *_recip_dxF(i,j,bi,bj)
55 & *(uFld(i+1,j)-uFld(i,j))
56 #ifdef COSINEMETH_III
57 & *sqCosFacU(J,bi,bj)
58 #endif
59 c & *deepFacC(k) ! dyF scaling factor
60 c & *recip_deepFacC(k) ! recip_dxF scaling factor
61 ENDDO
62 ENDDO
63
64 C Meridional flux d/dy U
65 DO j=1-Oly+1,sNy+Oly
66 DO i=1-Olx+1,sNx+Olx-1
67 fMer(i,j) = drF(k)*hFacZ(i,j)
68 & *_dxV(i,j,bi,bj)
69 & *_recip_dyU(i,j,bi,bj)
70 & *(uFld(i,j)-uFld(i,j-1))
71 #if (defined (ISOTROPIC_COS_SCALING) && defined (COSINEMETH_III))
72 & *sqCosFacV(J,bi,bj)
73 #endif
74 c & *deepFacC(k) ! dxV scaling factor
75 c & *recip_deepFacC(k) ! recip_dyU scaling factor
76 ENDDO
77 ENDDO
78
79 C del^2 U
80 DO j=1-Oly+1,sNy+Oly-1
81 DO i=1-Olx+1,sNx+Olx-1
82 del2u(i,j) =
83 & recip_drF(k)*_recip_hFacW(i,j,k,bi,bj)
84 & *recip_rAw(i,j,bi,bj)*recip_deepFac2C(k)
85 & *( fZon(i,j ) - fZon(i-1,j)
86 & +fMer(i,j+1) - fMer(i ,j)
87 & )*_maskW(i,j,k,bi,bj)
88 ENDDO
89 ENDDO
90
91 IF (no_slip_sides) THEN
92 C-- No-slip BCs impose a drag at walls...
93 DO j=1-Oly+1,sNy+Oly-1
94 DO i=1-Olx+1,sNx+Olx-1
95 hFacZClosedS = _hFacW(i,j,k,bi,bj) - hFacZ(i,j)
96 hFacZClosedN = _hFacW(i,j,k,bi,bj) - hFacZ(i,j+1)
97 del2u(i,j) = del2u(i,j)
98 & -_recip_hFacW(i,j,k,bi,bj)*recip_drF(k)
99 & *recip_rAw(i,j,bi,bj)*recip_deepFac2C(k)
100 & *( hFacZClosedS*dxV(i, j ,bi,bj)
101 & *_recip_dyU(i, j ,bi,bj)
102 & +hFacZClosedN*dxV(i,j+1,bi,bj)
103 & *_recip_dyU(i,j+1,bi,bj)
104 & )*drF(k)*2.*uFld(i,j)
105 & *_maskW(i,j,k,bi,bj)
106 ENDDO
107 ENDDO
108 ENDIF
109
110 RETURN
111 END

  ViewVC Help
Powered by ViewVC 1.1.22