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

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

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


Revision 1.8 - (show annotations) (download)
Tue Oct 19 02:43:06 2004 UTC (19 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint57g_pre, checkpoint57s_post, checkpoint57b_post, checkpoint57g_post, checkpoint56b_post, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint57, checkpoint56, checkpoint57n_post, checkpoint55i_post, checkpoint57l_post, checkpoint57t_post, checkpoint57v_post, checkpoint57f_post, checkpoint57a_post, checkpoint57h_pre, checkpoint57h_post, checkpoint57c_post, checkpoint57c_pre, checkpoint55j_post, checkpoint55h_post, checkpoint57e_post, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, eckpoint57e_pre, checkpoint56a_post, checkpoint57h_done, checkpoint57j_post, checkpoint57f_pre, checkpoint56c_post, checkpoint57a_pre, checkpoint57o_post, checkpoint57k_post, checkpoint57w_post
Changes since 1.7: +2 -3 lines
use flags: fluidIsAir/Water, usingP/ZCoords instead of buoyancyRelation

1 C $Header: /u/gcmpack/MITgcm/pkg/mom_fluxform/mom_v_adv_wv.F,v 1.7 2003/10/09 04:19:20 edhill Exp $
2 C $Name: $
3
4 #include "MOM_FLUXFORM_OPTIONS.h"
5 #undef OLD_MOM_ADV_W
6
7 CBOP
8 C !ROUTINE: MOM_V_ADV_WV
9
10 C !INTERFACE: ==========================================================
11 SUBROUTINE MOM_V_ADV_WV(
12 I bi,bj,k,
13 I vFld,wFld,rTrans,
14 O advectiveFluxWV,
15 I myThid)
16
17 C !DESCRIPTION:
18 C Calculates the vertical advective flux of meridional momentum:
19 C \begin{equation*}
20 C F^r = \overline{W}^j \overline{v}^{k}
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 vFld :: meridional velocity
34 C wFld :: vertical velocity
35 C rTrans :: vertical transport (above V point)
36 C myThid :: thread number
37 INTEGER bi,bj,k
38 _RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
39 _RL wFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
40 _RL rTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
41 INTEGER myThid
42
43 C !OUTPUT PARAMETERS: ==================================================
44 C advectiveFluxWV :: advective flux
45 _RL advectiveFluxWV(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
46
47 C !LOCAL VARIABLES: ====================================================
48 C i,j :: loop indices
49 INTEGER I,J
50 CEOP
51 _RL tmpFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
52
53 IF ( k.EQ.Nr+1 .AND.
54 & useRealFreshWaterFlux .AND. usingPCoords ) THEN
55 DO j=1-Oly+1,sNy+Oly
56 DO i=1-Olx+1,sNx+Olx
57 advectiveFluxWV(i,j) = rTrans(i,j)*vFld(i,j,k-1,bi,bj)
58 ENDDO
59 ENDDO
60
61 ELSEIF ( k.GT.Nr .OR. (k.EQ.1.AND.rigidLid) ) THEN
62 C Advective flux = 0 at k=Nr+1 ; = 0 at k=1 if rigid-lid
63
64 DO j=1-Oly,sNy+Oly
65 DO i=1-Olx,sNx+Olx
66 advectiveFluxWV(i,j) = 0.
67 ENDDO
68 ENDDO
69
70 ELSEIF (k.EQ.1) THEN
71 C (linear) Free-surface correction at k=1
72
73 DO j=1-Oly+1,sNy+Oly
74 DO i=1-Olx+1,sNx+Olx
75 advectiveFluxWV(i,j) = rTrans(i,j)*vFld(i,j,k,bi,bj)
76 ENDDO
77 ENDDO
78
79 ELSE
80
81 C Vertical advection - interior ; assume vFld & wFld are masked
82 DO j=1-Oly+1,sNy+Oly
83 DO i=1-Olx+1,sNx+Olx
84 advectiveFluxWV(i,j) = rTrans(i,j)*
85 & 0.5 _d 0*( vFld(i,j,k,bi,bj)+vFld(i,j,k-1,bi,bj) )
86 ENDDO
87 ENDDO
88
89 IF ( select_rStar.EQ.0 .AND. .NOT.rigidLid ) THEN
90 C (linear) Free-surface correction at k>1
91 DO j=1-Oly+1,sNy+Oly
92 DO i=1-Olx+1,sNx+Olx
93 advectiveFluxWV(i,j) = advectiveFluxWV(i,j)
94 & +0.25*(
95 & wFld(i, j ,k,bi,bj)*rA(i, j ,bi,bj)*
96 & (maskC(i,j,k,bi,bj) - maskC(i,j,k-1,bi,bj))
97 & +wFld(i,j-1,k,bi,bj)*rA(i,j-1,bi,bj)*
98 & (maskC(i,j-1,k,bi,bj)-maskC(i,j-1,k-1,bi,bj))
99 & )*vFld(i,j,k,bi,bj)
100 ENDDO
101 ENDDO
102 C- endif NOT rigidLid
103 ENDIF
104
105 ENDIF
106
107 RETURN
108 END

  ViewVC Help
Powered by ViewVC 1.1.22