/[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.10 - (show annotations) (download)
Wed Jun 7 01:55:15 2006 UTC (17 years, 10 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint59, checkpoint58y_post, checkpoint58t_post, checkpoint58m_post, checkpoint58w_post, checkpoint58o_post, checkpoint58p_post, checkpoint58q_post, mitgcm_mapl_00, checkpoint58r_post, checkpoint58n_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint58k_post, checkpoint58v_post, checkpoint58l_post, checkpoint58x_post, checkpoint59j, checkpoint58h_post, checkpoint58j_post, checkpoint58i_post, checkpoint58u_post, checkpoint58s_post
Changes since 1.9: +11 -11 lines
Modifications for bottom topography control
o replace hFacC by _hFacC at various places
o replace ALLOW_HFACC_CONTROL by ALLOW_DEPTH_CONTROL
o add non-self-adjoint cg2d_nsa
o update autodiff support routines
o re-initialise hfac after ctrl_depth_ini
o works for 5x5 box, doesnt work for global_ocean.90x40x15

1 C $Header: /u/gcmpack/MITgcm/pkg/mom_vecinv/mom_vi_u_coriolis.F,v 1.9 2005/10/01 19:17:17 jmc Exp $
2 C $Name: $
3
4 #include "MOM_VECINV_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 use_original_hFac
34 INTEGER I,J
35 _RL vBarXY,vort3u,Zp,Zm
36 _RS epsil
37 PARAMETER ( use_original_hFac=.FALSE. )
38
39 epsil = 1. _d -9
40
41 DO J=1-Oly,sNy+Oly-1
42 DO I=2-Olx,sNx+Olx
43 IF ( use_original_hFac ) THEN
44 vBarXY=0.25*(
45 & (vFld( i , j )*dxG( i , j ,bi,bj)*_hFacS( i , j ,k,bi,bj)
46 & +vFld(i-1, j )*dxG(i-1, j ,bi,bj)*_hFacS(i-1, 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+1)*dxG(i-1,j+1,bi,bj)*_hFacS(i-1,j+1,k,bi,bj)))
49 IF (upwindVorticity) THEN
50 IF (vBarXY.GT.0.) THEN
51 vort3u=omega3(I,J)*r_hFacZ(i,j)
52 ELSE
53 vort3u=omega3(I,J+1)*r_hFacZ(i,j+1)
54 ENDIF
55 ELSE
56 vort3u=0.5*(omega3(i,j)*r_hFacZ(i,j)
57 & +omega3(i,j+1)*r_hFacZ(i,j+1))
58 ENDIF
59 ELSEIF ( SadournyCoriolis ) THEN
60 Zm=0.5*(
61 & vFld( i , j )*dxG( i , j ,bi,bj)*_hFacS( i , j ,k,bi,bj)
62 & +vFld(i-1, j )*dxG(i-1, j ,bi,bj)*_hFacS(i-1, j ,k,bi,bj) )
63 Zp=0.5*(
64 & vFld( i ,j+1)*dxG( i ,j+1,bi,bj)*_hFacS( i ,j+1,k,bi,bj)
65 & +vFld(i-1,j+1)*dxG(i-1,j+1,bi,bj)*_hFacS(i-1,j+1,k,bi,bj) )
66 IF (upwindVorticity) THEN
67 IF ( (Zm+Zp) .GT.0.) THEN
68 vort3u=Zm*r_hFacZ(i, j )*omega3(i, j )
69 ELSE
70 vort3u=Zp*r_hFacZ(i,j+1)*omega3(i,j+1)
71 ENDIF
72 ELSE
73 Zm=Zm*r_hFacZ(i, j )*omega3(i, j )
74 Zp=Zp*r_hFacZ(i,j+1)*omega3(i,j+1)
75 vort3u=0.5*( Zm + Zp )
76 ENDIF
77 vBarXY=1.
78 ELSE
79 c-- test a different formulation (relatively to hFac)
80 vBarXY=0.5*(
81 & (vFld( i , j )*dxG( i , j ,bi,bj)*hFacZ(i,j)
82 & +vFld(i-1, j )*dxG(i-1, j ,bi,bj)*hFacZ(i,j) )
83 & +(vFld( i ,j+1)*dxG( i ,j+1,bi,bj)*hFacZ(i,j+1)
84 & +vFld(i-1,j+1)*dxG(i-1,j+1,bi,bj)*hFacZ(i,j+1))
85 & )/MAX( epsil, hFacZ(i,j)+hFacZ(i,j+1) )
86 IF (upwindVorticity) THEN
87 IF (vBarXY.GT.0.) THEN
88 vort3u=omega3(i,j)
89 ELSE
90 vort3u=omega3(i,j+1)
91 ENDIF
92 ELSE
93 vort3u=0.5*(omega3(i,j)+omega3(i,j+1))
94 ENDIF
95 ENDIF
96
97 IF (useJamartMomAdv)
98 & vBarXY = vBarXY * 4. _d 0 * hFacW(i,j,k,bi,bj)
99 & / MAX( epsil,(_hFacS(i, j ,k,bi,bj)+_hFacS(i-1, j ,k,bi,bj))
100 & +(_hFacS(i,j+1,k,bi,bj)+_hFacS(i-1,j+1,k,bi,bj)) )
101
102 uCoriolisTerm(i,j)=
103 & +vort3u*vBarXY*recip_dxC(i,j,bi,bj)*_maskW(i,j,k,bi,bj)
104 cph *note* put these comments after end of continued line
105 cph to ensure TAMC compatibility
106 C high order vorticity advection term
107 c & ...
108 C linear Coriolis term
109 c & +0.5*(fCoriG(I,J,bi,bj)+fCoriG(I,J+1,bi,bj))*vBarXY
110 C full nonlinear Coriolis term
111 c & +0.5*(omega3(I,J)+omega3(I,J+1))*vBarXY
112 C correct energy conserving form of Coriolis term
113 c & +0.5*( fCori(I ,J,bi,bj)*vBarY(I ,J,K,bi,bj) +
114 c & fCori(I-1,J,bi,bj)*vBarY(I-1,J,K,bi,bj) )
115 C original form of Coriolis term (copied from calc_mom_rhs)
116 c & +0.5*(fCori(i,j,bi,bj)+fCori(i-1,j,bi,bj))*vBarXY
117 ENDDO
118 ENDDO
119
120 RETURN
121 END

  ViewVC Help
Powered by ViewVC 1.1.22