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

Annotation of /MITgcm/pkg/mom_fluxform/mom_u_metric_cylinder.F

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


Revision 1.2 - (hide 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: +2 -2 lines
change loop range to avoid "outbound index" problem.

1 jmc 1.2 C $Header: /u/gcmpack/MITgcm/pkg/mom_fluxform/mom_u_metric_cylinder.F,v 1.1 2004/06/24 20:25:44 afe Exp $
2 afe 1.1 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_U_METRIC_CYLINDER(
11     I bi,bj,k,
12     I uFld, vFld,
13     O uMetricTerms,
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 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     CEOP
48    
49 jmc 1.2 DO j=1-Oly,sNy+Oly-1
50 afe 1.1 DO i=1-Olx+1,sNx+Olx
51     if (yC(i,j,bi,bj).GT. 0) then
52     uMetricTerms(i,j) =
53     & uFld(i,j)
54     & *0.25*(vFld(i,j) + vFld(i-1,j)
55     & + vFld(i,j+1) + vFld(i-1,j+1))/yC(i,j,bi,bj)
56     else
57     uMetricTerms(i,j) = 0.
58     endif
59    
60     ENDDO
61     ENDDO
62    
63     RETURN
64     END

  ViewVC Help
Powered by ViewVC 1.1.22