1 |
C $Header: /u/gcmpack/MITgcm/pkg/mom_common/mom_v_coriolis_nh.F,v 1.2 2007/03/12 23:54:26 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "MOM_COMMON_OPTIONS.h" |
5 |
|
6 |
CBOP |
7 |
C !ROUTINE: MOM_V_CORIOLIS_NH |
8 |
|
9 |
C !INTERFACE: ========================================================== |
10 |
SUBROUTINE MOM_V_CORIOLIS_NH( |
11 |
I bi,bj,k,wFld, |
12 |
O vCoriolisTerm, |
13 |
I myThid ) |
14 |
|
15 |
C !DESCRIPTION: |
16 |
C Calculates the 3.D Coriolis term in the meridional momentum equation: |
17 |
C \begin{equation*} |
18 |
C - \overline{ f_prime \overline{w}^{k} }^{i} |
19 |
C \end{equation*} |
20 |
C consistent with Non-Hydrostatic (or quasi-hydrostatic) formulation |
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 wFld :: vertical flow |
33 |
C myThid :: thread number |
34 |
INTEGER bi,bj,k |
35 |
_RL wFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
36 |
INTEGER myThid |
37 |
|
38 |
C !OUTPUT PARAMETERS: ================================================== |
39 |
C vCoriolisTerm :: Coriolis term |
40 |
_RL vCoriolisTerm(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
41 |
|
42 |
C !LOCAL VARIABLES: ==================================================== |
43 |
C i,j :: loop indices |
44 |
INTEGER i,j,kp1 |
45 |
_RL wMsk |
46 |
CEOP |
47 |
|
48 |
|
49 |
kp1=min(k+1,Nr) |
50 |
wMsk=1. |
51 |
IF (k.EQ.Nr) wMsk=0. |
52 |
|
53 |
C Energy conserving discretization of 2*Omega*cos(phi)*w |
54 |
DO j=2-Oly,sNy+Oly |
55 |
DO i=1-Olx,sNx+Olx |
56 |
vCoriolisTerm(i,j) = |
57 |
& -0.5*( fCoriCos( i ,j,bi,bj)*angleSinC(i, j ,bi,bj) |
58 |
& *0.5*( wFld( i ,j, k ,bi,bj)*rVel2wUnit( k ) |
59 |
& +wFld( i ,j,kp1,bi,bj)*rVel2wUnit(kp1)*wMsk ) |
60 |
& + fCoriCos(i,j-1,bi,bj)*angleSinC(i,j-1,bi,bj) |
61 |
& *0.5*( wFld(i,j-1, k ,bi,bj)*rVel2wUnit( k ) |
62 |
& +wFld(i,j-1,kp1,bi,bj)*rVel2wUnit(kp1)*wMsk ) |
63 |
& )*gravitySign |
64 |
ENDDO |
65 |
ENDDO |
66 |
|
67 |
RETURN |
68 |
END |