/[MITgcm]/MITgcm/pkg/mom_vecinv/mom_vi_u_coriolis.F
ViewVC logotype

Contents of /MITgcm/pkg/mom_vecinv/mom_vi_u_coriolis.F

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


Revision 1.4 - (show annotations) (download)
Sun Aug 3 02:49:35 2003 UTC (20 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint52l_pre, hrcube4, hrcube5, checkpoint52d_pre, checkpoint52j_pre, checkpoint51o_pre, checkpoint51l_post, checkpoint52l_post, checkpoint52k_post, checkpoint53, checkpoint52, checkpoint52f_post, checkpoint51f_post, checkpoint51t_post, checkpoint51n_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint51j_post, checkpoint52e_pre, checkpoint52e_post, checkpoint51n_pre, checkpoint52b_pre, checkpoint51l_pre, checkpoint52m_post, checkpoint51q_post, checkpoint52b_post, checkpoint52c_post, checkpoint51h_pre, checkpoint52f_pre, checkpoint53c_post, branchpoint-genmake2, checkpoint51r_post, checkpoint51i_post, checkpoint53a_post, checkpoint52d_post, checkpoint52a_pre, checkpoint52i_post, checkpoint51i_pre, checkpoint52h_pre, checkpoint52j_post, branch-netcdf, checkpoint52n_post, checkpoint53b_pre, checkpoint51e_post, checkpoint51o_post, checkpoint51f_pre, checkpoint53b_post, checkpoint52a_post, checkpoint51g_post, ecco_c52_e35, checkpoint51m_post, checkpoint53d_pre, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-genmake2, branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.3: +43 -22 lines
* changes related to hFac in vorticity advection: use S/R from aim.5l_cs/code
* add time-ave diagnostic of relative vorticity advection

1 C $Header: /u/gcmpack/MITgcm/pkg/mom_vecinv/mom_vi_u_coriolis.F,v 1.3 2001/09/05 17:46:03 heimbach Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 SUBROUTINE MOM_VI_U_CORIOLIS(
7 I bi,bj,k,
8 I vFld,omega3,hFacZ,r_hFacZ,
9 O uCoriolisTerm,
10 I myThid)
11 IMPLICIT NONE
12 C *==========================================================*
13 C | S/R MOM_VI_U_CORIOLIS
14 C | o Calculate meridional flux of vorticity at U point
15 C *==========================================================*
16
17 C == Global variables ==
18 #include "SIZE.h"
19 #include "EEPARAMS.h"
20 #include "GRID.h"
21 #include "PARAMS.h"
22
23 C == Routine arguments ==
24 INTEGER bi,bj,K
25 _RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
26 _RL omega3(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
27 _RS hFacZ (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
28 _RS r_hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
29 _RL uCoriolisTerm(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
30 INTEGER myThid
31
32 C == Local variables ==
33 LOGICAL upwindVort3, use_original_hFac
34 INTEGER I,J
35 _RL vBarXY,vort3u
36 _RS epsil
37 PARAMETER ( upwindVort3 =.FALSE. )
38 PARAMETER ( use_original_hFac=.FALSE. )
39
40 epsil = 1. _d -9
41
42 DO J=1-Oly,sNy+Oly-1
43 DO I=2-Olx,sNx+Olx
44 IF ( use_original_hFac ) THEN
45 vBarXY=0.25*(
46 & vFld( i , j )*dxG( i , j ,bi,bj)*hFacS( i , j ,k,bi,bj)
47 & +vFld( i ,j+1)*dxG( i ,j+1,bi,bj)*hFacS( i ,j+1,k,bi,bj)
48 & +vFld(i-1, j )*dxG(i-1, j ,bi,bj)*hFacS(i-1, j ,k,bi,bj)
49 & +vFld(i-1,j+1)*dxG(i-1,j+1,bi,bj)*hFacS(i-1,j+1,k,bi,bj))
50 IF (upwindVort3) THEN
51 IF (vBarXY.GT.0.) THEN
52 vort3u=omega3(I,J)*r_hFacZ(i,j)
53 ELSE
54 vort3u=omega3(I,J+1)*r_hFacZ(i,j+1)
55 ENDIF
56 ELSE
57 vort3u=0.5*(omega3(i,j)*r_hFacZ(i,j)
58 & +omega3(i,j+1)*r_hFacZ(i,j+1))
59 ENDIF
60 ELSE
61 c-- test a different formulation (relatively to hFac)
62 vBarXY=0.5*(
63 & vFld( i , j )*dxG( i , j ,bi,bj)*hFacZ(i,j)
64 & +vFld(i-1, j )*dxG(i-1, j ,bi,bj)*hFacZ(i,j)
65 & +vFld( i ,j+1)*dxG( i ,j+1,bi,bj)*hFacZ(i,j+1)
66 & +vFld(i-1,j+1)*dxG(i-1,j+1,bi,bj)*hFacZ(i,j+1)
67 & )/MAX( epsil, hFacZ(i,j)+hFacZ(i,j+1) )
68 IF (upwindVort3) THEN
69 IF (vBarXY.GT.0.) THEN
70 vort3u=omega3(i,j)
71 ELSE
72 vort3u=omega3(i,j+1)
73 ENDIF
74 ELSE
75 vort3u=0.5*(omega3(i,j)+omega3(i,j+1))
76 ENDIF
77 ENDIF
78
79 uCoriolisTerm(i,j)=
80 & +vort3u*vBarXY*recip_dxC(i,j,bi,bj)*_maskW(i,j,k,bi,bj)
81 cph *note* put these comments after end of continued line
82 cph to ensure TAMC compatibility
83 C high order vorticity advection term
84 c & ...
85 C linear Coriolis term
86 c & +0.5*(fCoriG(I,J,bi,bj)+fCoriG(I,J+1,bi,bj))*vBarXY
87 C full nonlinear Coriolis term
88 c & +0.5*(omega3(I,J)+omega3(I,J+1))*vBarXY
89 C correct energy conserving form of Coriolis term
90 c & +0.5*( fCori(I ,J,bi,bj)*vBarY(I ,J,K,bi,bj) +
91 c & fCori(I-1,J,bi,bj)*vBarY(I-1,J,K,bi,bj) )
92 C original form of Coriolis term (copied from calc_mom_rhs)
93 c & +0.5*(fCori(i,j,bi,bj)+fCori(i-1,j,bi,bj))*vBarXY
94 ENDDO
95 ENDDO
96
97 RETURN
98 END

  ViewVC Help
Powered by ViewVC 1.1.22