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

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

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


Revision 1.2 - (show annotations) (download)
Wed Jul 7 18:34:07 2004 UTC (19 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint55c_post, checkpoint54e_post, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint57b_post, checkpoint57c_pre, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57e_post, checkpoint55h_post, checkpoint57g_pre, checkpoint54b_post, checkpoint55b_post, checkpoint54d_post, checkpoint56c_post, checkpoint55, checkpoint57f_pre, checkpoint57a_post, checkpoint54f_post, checkpoint55g_post, checkpoint55f_post, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, eckpoint57e_pre, checkpoint57h_done, checkpoint57f_post, checkpoint57c_post, checkpoint55e_post, checkpoint55a_post, checkpoint54c_post, checkpoint57j_post, checkpoint57h_pre, checkpoint57h_post, checkpoint56a_post, checkpoint55d_post
Changes since 1.1: +4 -3 lines
change loop range to avoid "outbound index" problem.

1 C $Header: /u/gcmpack/MITgcm/pkg/mom_fluxform/mom_v_metric_cylinder.F,v 1.1 2004/06/24 20:25:44 afe Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: MOM_U_METRIC_SPHERE
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE MOM_V_METRIC_CYLINDER(
11 I bi,bj,k,
12 I uFld, vFld,
13 O vMetricTerms,
14 I myThid)
15
16 C !DESCRIPTION:
17 C Calculates the zonal metric term due to sphericity:
18 C \begin{equation}
19 C -\frac{v^2}{r}
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 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 vMetricTerms :: metric term
42 _RL vMetricTerms(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43
44 C !LOCAL VARIABLES: ====================================================
45 C i,j :: loop indices
46 INTEGER i,j
47 CEOP
48
49 C jmc: using yG make more sense to me but I might be wrong ?
50 DO j=1-Oly+1,sNy+Oly
51 DO i=1-Olx,sNx+Olx-1
52 if (yC(i,j,bi,bj).GT. 0) then
53 vMetricTerms(i,j) =
54 & -1.*0.25*(uFld(i,j) + uFld(i+1,j) +
55 & uFld(i,j-1)+uFld(i+1,j-1))*
56 & 0.25*(uFld(i,j) + uFld(i+1,j) +
57 & uFld(i,j-1)+uFld(i+1,j-1))/yC(i,j,bi,bj)
58 else
59 vMetricTerms(i,j) = 0.
60 endif
61 ENDDO
62 ENDDO
63
64 RETURN
65 END

  ViewVC Help
Powered by ViewVC 1.1.22