1 |
C $Header: /u/gcmpack/MITgcm/pkg/mom_fluxform/mom_u_metric_nh.F,v 1.5 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_U_METRIC_NH |
8 |
|
9 |
C !INTERFACE: ========================================================== |
10 |
SUBROUTINE MOM_U_METRIC_NH( |
11 |
I bi,bj,k, |
12 |
I uFld, wFld, |
13 |
O uMetricTerms, |
14 |
I myThid) |
15 |
|
16 |
C !DESCRIPTION: |
17 |
C Calculates the zonal metric term due to non-hydrostaticity on the sphere: |
18 |
C \begin{equation} |
19 |
C \frac{u}{a} \overline{w}^{ik} |
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 uFld :: zonal flow |
33 |
C wFld :: vertical flow |
34 |
C myThid :: thread number |
35 |
INTEGER bi,bj,k |
36 |
_RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
37 |
_RL wFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
38 |
INTEGER myThid |
39 |
|
40 |
C !OUTPUT PARAMETERS: ================================================== |
41 |
C uMetricTerms :: metric term |
42 |
_RL uMetricTerms(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
43 |
|
44 |
C !LOCAL VARIABLES: ==================================================== |
45 |
C i,j :: loop indices |
46 |
INTEGER i,j,Kp1 |
47 |
_RL wVelBottomOverride |
48 |
CEOP |
49 |
|
50 |
Kp1=min(k+1,Nr) |
51 |
wVelBottomOverride=1. |
52 |
IF (k.EQ.Nr) wVelBottomOverride=0. |
53 |
|
54 |
DO j=1-Olx,sNy+Oly |
55 |
DO i=1-Olx+1,sNx+Olx |
56 |
uMetricTerms(i,j) = uFld(i,j)*recip_RSphere |
57 |
& *0.25*(wVelBottomOverride* |
58 |
& (wFld(i-1,j,kp1,bi,bj)+wFld(i,j,kp1,bi,bj)) |
59 |
& +wFld(i-1,j, k ,bi,bj)+wFld(i,j, k ,bi,bj) |
60 |
& )*rkFac*recip_horiVertRatio*gravitySign |
61 |
ENDDO |
62 |
ENDDO |
63 |
|
64 |
RETURN |
65 |
END |