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

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

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


Revision 1.8 - (show annotations) (download)
Tue Dec 5 05:29:48 2006 UTC (17 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint59, checkpoint58y_post, checkpoint58t_post, checkpoint60, checkpoint61, checkpoint58w_post, mitgcm_mapl_00, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint58v_post, checkpoint58x_post, checkpoint59j, checkpoint61e, checkpoint58u_post, checkpoint58s_post, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a
Changes since 1.7: +1 -2 lines
do not need "DYNVARS.h" here.

1 C $Header: /u/gcmpack/MITgcm/pkg/mom_fluxform/mom_u_coriolis.F,v 1.7 2003/10/09 04:19:20 edhill Exp $
2 C $Name: $
3
4 #include "MOM_FLUXFORM_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: MOM_U_CORIOLIS
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE MOM_U_CORIOLIS(
11 I bi,bj,k,vFld,
12 U uCoriolisTerm,
13 I myThid)
14
15 C !DESCRIPTION:
16 C Calculates the horizontal Coriolis term in the zonal equation:
17 C \begin{equation*}
18 C \overline{f}^i \overline{v}^{ij}
19 C \end{equation*}
20
21 C !USES: ===============================================================
22 IMPLICIT NONE
23 #include "SIZE.h"
24 #include "EEPARAMS.h"
25 #include "PARAMS.h"
26 #include "GRID.h"
27 #include "SURFACE.h"
28
29 C !INPUT PARAMETERS: ===================================================
30 C bi,bj :: tile indices
31 C k :: vertical level
32 C vFld :: meridional flow
33 C myThid :: thread number
34 INTEGER bi,bj,K
35 _RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
36 INTEGER myThid
37
38 C !OUTPUT PARAMETERS: ==================================================
39 C uCoriolisTerm :: Coriolis term
40 _RL uCoriolisTerm(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
41
42 C !LOCAL VARIABLES: ====================================================
43 C i,j :: loop indices
44 INTEGER I,J
45 _RL one
46 PARAMETER(one=1.d0)
47 CEOP
48
49 IF (useEnergyConservingCoriolis) THEN
50 C Energy conserving discretization
51 DO j=1-Oly,sNy+Oly-1
52 DO i=1-Olx+1,sNx+Olx
53 uCoriolisTerm(i,j) =
54 & 0.5*( _fCori( i ,j,bi,bj)
55 & *0.5*( vFld( i ,j)+vFld( i ,j+1) )
56 & + _fCori(i-1,j,bi,bj)
57 & *0.5*( vFld(i-1,j)+vFld(i-1,j+1) ) )
58 ENDDO
59 ENDDO
60 ELSE
61 C Original discretization
62 DO j=1-Oly,sNy+Oly-1
63 DO i=1-Olx+1,sNx+Olx
64 uCoriolisTerm(i,j) =
65 & 0.5*( _fCori( i ,j,bi,bj) +
66 & _fCori(i-1,j,bi,bj) )
67 & *0.25*(
68 & vFld( i ,j)+vFld( i ,j+1)
69 & +vFld(i-1,j)+vFld(i-1,j+1)
70 & )
71 ENDDO
72 ENDDO
73 ENDIF
74
75 IF (useJamartWetPoints) THEN
76 C Scale term so that only "wet" points are used
77 C Due to: Jamart and Ozer, 1986, JGR 91 (C9), 10,621-10,631
78 C "Numerical Boundary Layers and Spurious Residual Flows"
79 DO j=1-Oly,sNy+Oly-1
80 DO i=1-Olx+1,sNx+Olx
81 uCoriolisTerm(i,j) = uCoriolisTerm(i,j)
82 & *4.d0/max(one, maskS( i , j ,k,bi,bj)+maskS( i ,j+1,k,bi,bj)
83 & +maskS(i-1, j ,k,bi,bj)+maskS(i-1,j+1,k,bi,bj) )
84 ENDDO
85 ENDDO
86 ENDIF
87
88 RETURN
89 END

  ViewVC Help
Powered by ViewVC 1.1.22