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

Contents of /MITgcm/pkg/mom_vecinv/mom_vi_v_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, 10 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: +44 -23 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_v_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_V_CORIOLIS(
7 I bi,bj,k,
8 I uFld,omega3,hFacZ,r_hFacZ,
9 O vCoriolisTerm,
10 I myThid)
11 IMPLICIT NONE
12 C *==========================================================*
13 C | S/R MOM_VI_V_CORIOLIS
14 C | o Calculate zonal flux of vorticity at V 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 uFld(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 vCoriolisTerm(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 uBarXY,vort3v
36 _RS epsil
37 PARAMETER ( upwindVort3 =.FALSE. )
38 PARAMETER ( use_original_hFac=.FALSE. )
39
40 epsil = 1. _d -9
41
42 DO J=2-Oly,sNy+Oly
43 DO I=1-Olx,sNx+Olx-1
44 IF ( use_original_hFac ) THEN
45 uBarXY=0.25*(
46 & uFld( i , j )*dyG( i , j ,bi,bj)*hFacW( i , j ,k,bi,bj)
47 & +uFld(i+1, j )*dyG(i+1, j ,bi,bj)*hFacW(i+1, j ,k,bi,bj)
48 & +uFld( i ,j-1)*dyG( i ,j-1,bi,bj)*hFacW( i ,j-1,k,bi,bj)
49 & +uFld(i+1,j-1)*dyG(i+1,j-1,bi,bj)*hFacW(i+1,j-1,k,bi,bj))
50 IF (upwindVort3) THEN
51 IF (uBarXY.GT.0.) THEN
52 vort3v=omega3(i,j)*r_hFacZ(i,j)
53 ELSE
54 vort3v=omega3(i+1,j)*r_hFacZ(i+1,j)
55 ENDIF
56 ELSE
57 vort3v=0.5*(omega3(i,j)*r_hFacZ(i,j)
58 & +omega3(i+1,j)*r_hFacZ(i+1,j))
59 ENDIF
60 ELSE
61 c-- test a different formulation (relatively to hFac)
62 uBarXY=0.5*(
63 & uFld( i , j )*dyG( i , j ,bi,bj)*hFacZ(i,j)
64 & +uFld( i ,j-1)*dyG( i ,j-1,bi,bj)*hFacZ(i,j)
65 & +uFld(i+1, j )*dyG(i+1, j ,bi,bj)*hFacZ(i+1,j)
66 & +uFld(i+1,j-1)*dyG(i+1,j-1,bi,bj)*hFacZ(i+1,j)
67 & )/MAX( epsil, hFacZ(i,j)+hFacZ(i+1,j) )
68 IF (upwindVort3) THEN
69 IF (uBarXY.GT.0.) THEN
70 vort3v=omega3(i,j)
71 ELSE
72 vort3v=omega3(i+1,j)
73 ENDIF
74 ELSE
75 vort3v=0.5*(omega3(i,j)+omega3(i+1,j))
76 ENDIF
77 ENDIF
78
79 vCoriolisTerm(i,j)=
80 & -vort3v*uBarXY*recip_dyC(i,j,bi,bj)*_maskS(i,j,k,bi,bj)
81 C high order vorticity advection term
82 c & ...
83 C linear Coriolis term
84 c & -0.5 *(fCoriG(I,J,bi,bj)+fCoriG(I+1,J,bi,bj))*uBarXY
85 C full nonlinear Coriolis term
86 c & -0.5*(omega3(I,J)+omega3(I+1,J))*uBarXY
87 C correct energy conserving form of Coriolis term
88 c & -0.5 *( fCori(I,J ,bi,bj)*uBarX(I,J ,K,bi,bj) +
89 c & fCori(I,J-1,bi,bj)*uBarX(I,J-1,K,bi,bj) )
90 C original form of Coriolis term (copied from calc_mom_rhs)
91 c & -0.5*(fCori(i,j,bi,bj)+fCori(i,j-1,bi,bj))*uBarXY
92 ENDDO
93 ENDDO
94
95 RETURN
96 END

  ViewVC Help
Powered by ViewVC 1.1.22