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

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

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


Revision 1.3 - (show annotations) (download)
Wed Sep 26 19:05:21 2001 UTC (22 years, 8 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint44e_post, checkpoint46l_post, checkpoint46g_pre, release1_p13_pre, checkpoint46f_post, checkpoint44f_post, checkpoint46b_post, checkpoint43a-release1mods, release1_p13, checkpoint46l_pre, chkpt44d_post, release1_p8, release1_p9, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, checkpoint44e_pre, release1_b1, checkpoint43, release1_chkpt44d_post, checkpoint47a_post, release1_p11, icebear5, icebear4, icebear3, icebear2, checkpoint46d_pre, release1-branch_tutorials, checkpoint45d_post, checkpoint46j_pre, chkpt44a_post, checkpoint44h_pre, checkpoint46a_post, checkpoint46j_post, checkpoint46k_post, chkpt44c_pre, checkpoint45a_post, ecco_c44_e19, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, release1_p12, release1_p10, release1_p16, release1_p17, release1_p14, release1_p15, checkpoint44g_post, checkpoint46e_pre, checkpoint45b_post, checkpoint46b_pre, release1-branch-end, release1_final_v1, checkpoint46c_pre, checkpoint46, checkpoint47b_post, checkpoint44b_post, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint45c_post, ecco_ice2, ecco_ice1, checkpoint44h_post, checkpoint46g_post, release1_p12_pre, ecco_c44_e22, ecco_c44_e25, chkpt44a_pre, checkpoint46i_post, ecco_c44_e23, ecco_c44_e20, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, checkpoint46c_post, ecco-branch-mod1, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5, checkpoint46e_post, release1_beta1, checkpoint44b_pre, checkpoint42, checkpoint41, checkpoint47, checkpoint44, checkpoint45, checkpoint46h_post, chkpt44c_post, checkpoint44f_pre, checkpoint46d_post, release1-branch_branchpoint
Branch point for: c24_e25_ice, release1_final, release1-branch, release1, ecco-branch, release1_50yr, icebear, release1_coupled
Changes since 1.2: +28 -11 lines
Added comments in form compatible with "protex".

1 C $Header: /u/gcmpack/models/MITgcmUV/pkg/mom_fluxform/mom_u_adv_wu.F,v 1.2 2001/05/29 14:01:38 adcroft Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: MOM_U_ADV_WU
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE MOM_U_ADV_WU(
11 I bi,bj,k,
12 I uFld,wFld,
13 O advectiveFluxWU,
14 I myThid)
15
16 C !DESCRIPTION:
17 C Calculates the vertical advective flux of zonal momentum:
18 C \begin{equation*}
19 C F^r = \overline{W}^i \overline{u}^{k}
20 C \end{equation*}
21
22 C !USES: ===============================================================
23 IMPLICIT NONE
24 #include "SIZE.h"
25 #include "EEPARAMS.h"
26 #include "PARAMS.h"
27 #include "GRID.h"
28
29 C !INPUT PARAMETERS: ===================================================
30 C bi,bj :: tile indices
31 C k :: vertical level
32 C rTrans :: vertical transport
33 C uFld :: zonal flow
34 C myThid :: thread number
35 INTEGER bi,bj,k
36 _RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
37 _RL wFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
38 INTEGER myThid
39
40 C !OUTPUT PARAMETERS: ==================================================
41 C advectiveFluxWU :: advective flux
42 _RL advectiveFluxWU(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43
44 C !LOCAL VARIABLES: ====================================================
45 C i,j :: loop indices
46 INTEGER I,J
47 CEOP
48
49 IF ( k.GT.Nr .OR.
50 & (k.EQ.1.AND.rigidLid) ) THEN
51 C Advective flux = 0 at k=Nr+1 ; = 0 at k=1 if rigid-lid
52
53 DO j=1-Oly,sNy+Oly
54 DO i=1-Olx,sNx+Olx
55 advectiveFluxWU(i,j) = 0.
56 ENDDO
57 ENDDO
58
59 ELSEIF (k.EQ.1) THEN
60 C (linear) Free-surface correction at k=1
61
62 DO j=1-Oly,sNy+Oly
63 DO i=1-Olx+1,sNx+Olx
64 advectiveFluxWU(i,j) =
65 & 0.5*(
66 & wFld( i ,j,k,bi,bj)*rA( i ,j,bi,bj)
67 & +wFld(i-1,j,k,bi,bj)*rA(i-1,j,bi,bj)
68 & )*uFld(i,j,k,bi,bj)
69 ENDDO
70 ENDDO
71
72 ELSE
73
74 C Vertical advection - interior ; assume uFld & wFld are masked
75 DO j=1-Oly,sNy+Oly
76 DO i=1-Olx+1,sNx+Olx
77 advectiveFluxWU(i,j) =
78 & 0.25*(
79 & wFld( i ,j,k,bi,bj)*rA( i ,j,bi,bj)
80 & +wFld(i-1,j,k,bi,bj)*rA(i-1,j,bi,bj)
81 & )*( uFld(i,j,k,bi,bj)+uFld(i,j,k-1,bi,bj) )
82 ENDDO
83 ENDDO
84
85 IF (.NOT. rigidLid) THEN
86 C (linear) Free-surface correction at k>1
87 DO j=1-Oly,sNy+Oly
88 DO i=1-Olx+1,sNx+Olx
89 advectiveFluxWU(i,j) = advectiveFluxWU(i,j)
90 & +0.25*(
91 & wFld(i, j ,k,bi,bj)*rA(i, j ,bi,bj)*
92 & (maskC(i,j,k,bi,bj) - maskC(i,j,k-1,bi,bj))
93 & +wFld(i-1,j,k,bi,bj)*rA(i-1,j,bi,bj)*
94 & (maskC(i-1,j,k,bi,bj)-maskC(i-1,j,k-1,bi,bj))
95 & )*uFld(i,j,k,bi,bj)
96 ENDDO
97 ENDDO
98 C- endif NOT rigidLid
99 ENDIF
100
101 ENDIF
102
103 RETURN
104 END

  ViewVC Help
Powered by ViewVC 1.1.22