1 |
jmc |
1.4 |
C $Header: /u/gcmpack/MITgcm/pkg/mom_fluxform/mom_u_metric_cylinder.F,v 1.3 2005/07/12 00:38:31 jmc Exp $ |
2 |
afe |
1.1 |
C $Name: $ |
3 |
|
|
|
4 |
jmc |
1.4 |
#include "MOM_FLUXFORM_OPTIONS.h" |
5 |
afe |
1.1 |
|
6 |
|
|
CBOP |
7 |
jmc |
1.4 |
C !ROUTINE: MOM_U_METRIC_CYLINDER |
8 |
afe |
1.1 |
|
9 |
|
|
C !INTERFACE: ========================================================== |
10 |
|
|
SUBROUTINE MOM_U_METRIC_CYLINDER( |
11 |
|
|
I bi,bj,k, |
12 |
|
|
I uFld, vFld, |
13 |
|
|
O uMetricTerms, |
14 |
jmc |
1.4 |
I myThid ) |
15 |
afe |
1.1 |
|
16 |
|
|
C !DESCRIPTION: |
17 |
jmc |
1.4 |
C Calculates the zonal metric term due to cylinder curvature: |
18 |
afe |
1.1 |
C \begin{equation} |
19 |
jmc |
1.4 |
C +\frac{u v}{r} |
20 |
afe |
1.1 |
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 vFld :: meridional flow |
34 |
|
|
C myThid :: thread number |
35 |
|
|
INTEGER bi,bj,k |
36 |
|
|
_RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
37 |
|
|
_RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
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 |
47 |
jmc |
1.3 |
_RL radius |
48 |
afe |
1.1 |
CEOP |
49 |
|
|
|
50 |
jmc |
1.4 |
DO j=1-OLy,sNy+OLy-1 |
51 |
|
|
DO i=1-OLx+1,sNx+OLx |
52 |
jmc |
1.3 |
radius = (yG(i,j,bi,bj)+yG(i,j+1,bi,bj))*0.5 _d 0 |
53 |
|
|
C- to get the same results as before: |
54 |
|
|
c radius = yC(i,j,bi,bj) |
55 |
|
|
IF ( radius.GT.0. ) THEN |
56 |
jmc |
1.4 |
uMetricTerms(i,j) = |
57 |
afe |
1.1 |
& uFld(i,j) |
58 |
jmc |
1.3 |
& *0.25*(vFld(i,j) + vFld(i-1,j) + |
59 |
|
|
& vFld(i,j+1)+vFld(i-1,j+1))/radius |
60 |
|
|
ELSE |
61 |
afe |
1.1 |
uMetricTerms(i,j) = 0. |
62 |
jmc |
1.3 |
ENDIF |
63 |
afe |
1.1 |
|
64 |
|
|
ENDDO |
65 |
|
|
ENDDO |
66 |
|
|
|
67 |
|
|
RETURN |
68 |
|
|
END |