1 |
C $Header: /u/gcmpack/MITgcm/pkg/mom_fluxform/mom_v_adv_uv.F,v 1.4 2003/10/09 04:19:20 edhill Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "MOM_FLUXFORM_OPTIONS.h" |
5 |
|
6 |
CBOP |
7 |
C !ROUTINE: MOM_V_ADV_UV |
8 |
|
9 |
C !INTERFACE: ========================================================== |
10 |
SUBROUTINE MOM_V_ADV_UV( |
11 |
I bi,bj,k, |
12 |
I uTrans, vFld, |
13 |
O AdvectFluxUV, |
14 |
I myThid) |
15 |
|
16 |
C !DESCRIPTION: |
17 |
C Calculates the zonal advective flux of meridional momentum: |
18 |
C \begin{equation*} |
19 |
C F^x = \overline{U}^j \overline{v}^{i} |
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 uTrans :: zonal transport |
33 |
C vFld :: meridional flow |
34 |
C myThid :: thread number |
35 |
INTEGER bi,bj,k |
36 |
_RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
37 |
_RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
38 |
INTEGER myThid |
39 |
C !OUTPUT PARAMETERS: ================================================== |
40 |
C AdvectFluxUV :: advective flux |
41 |
_RL AdvectFluxUV(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
42 |
|
43 |
C !LOCAL VARIABLES: ==================================================== |
44 |
C i,j :: loop indices |
45 |
INTEGER i,j |
46 |
CEOP |
47 |
|
48 |
DO j=1-Oly+1,sNy+Oly |
49 |
DO i=1-Olx+1,sNx+Olx |
50 |
AdvectFluxUV(i,j) = |
51 |
& 0.25*( uTrans(i,j) + uTrans(i,j-1) ) |
52 |
#ifdef MOM_BOUNDARY_CONSERVE |
53 |
& *( vFld(i,j)*_maskS(i-1,j,k,bi,bj) |
54 |
& + vFld(i-1,j)*_maskS(i,j,k,bi,bj) ) |
55 |
#else |
56 |
& *( vFld(i,j) + vFld(i-1,j) ) |
57 |
#endif |
58 |
#ifdef OLD_ADV_BCS |
59 |
& *_maskS(i,j,k,bi,bj) |
60 |
& *_maskS(i-1,j,k,bi,bj) |
61 |
#endif /* OLD_ADV_BCS */ |
62 |
ENDDO |
63 |
ENDDO |
64 |
|
65 |
RETURN |
66 |
END |