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

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

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


Revision 1.14 - (show annotations) (download)
Wed Oct 22 00:28:47 2008 UTC (15 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62c, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62, checkpoint62b, checkpoint61f, checkpoint61n, checkpoint61q, checkpoint61e, checkpoint61g, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.13: +3 -3 lines
changes in FILL_CS_CORNER_TR_RL argument list.

1 C $Header: /u/gcmpack/MITgcm/pkg/mom_vecinv/mom_vi_del2uv.F,v 1.13 2007/08/16 02:20:41 jmc Exp $
2 C $Name: $
3
4 #include "MOM_VECINV_OPTIONS.h"
5
6 SUBROUTINE MOM_VI_DEL2UV(
7 I bi,bj,k,
8 I hDiv,vort3,hFacZ,
9 O del2u,del2v,
10 I myThid)
11 IMPLICIT NONE
12 C
13 C Calculate del^2 of (u,v) in terms of hDiv and vort3
14 C
15
16 C == Global variables ==
17 #include "SIZE.h"
18 #include "GRID.h"
19 #include "EEPARAMS.h"
20
21 C == Routine arguments ==
22 INTEGER bi,bj,k
23 _RL hDiv(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
24 _RL vort3(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
25 _RS hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
26 _RL del2u(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
27 _RL del2v(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
28 INTEGER myThid
29
30 C == Local variables ==
31 INTEGER i,j
32 c _RL Zip,Zij,Zpj,Dim,Dij,Dmj,uDij
33
34 C - bi-harmonic viscosity :
35
36 c DO j=2-Oly,sNy+Oly-1
37 c DO i=2-Olx,sNx+Olx-1
38
39 c Dim=dyF( i ,j-1,bi,bj)*hFacC( i ,j-1,k,bi,bj)*hDiv( i ,j-1)
40 c Dij=dyF( i , j ,bi,bj)*hFacC( i , j ,k,bi,bj)*hDiv( i , j )
41 c Dmj=dyF(i-1, j ,bi,bj)*hFacC(i-1, j ,k,bi,bj)*hDiv(i-1, j )
42 c Dim=dyF( i ,j-1,bi,bj)* hDiv( i ,j-1)
43 c Dij=dyF( i , j ,bi,bj)* hDiv( i , j )
44 c Dmj=dyF(i-1, j ,bi,bj)* hDiv(i-1, j )
45 c Dim= hDiv( i ,j-1)
46 c Dij= hDiv( i , j )
47 c Dmj= hDiv(i-1, j )
48
49 c Zip=dxV( i ,j+1,bi,bj)*hFacZ( i ,j+1)*vort3( i ,j+1)
50 c Zij=dxV( i , j ,bi,bj)*hFacZ( i , j )*vort3( i , j )
51 c Zpj=dxV(i+1, j ,bi,bj)*hFacZ(i+1, j )*vort3(i+1, j )
52 c Zip= hFacZ( i ,j+1)*vort3( i ,j+1)
53 c Zij= hFacZ( i , j )*vort3( i , j )
54 c Zpj= hFacZ(i+1, j )*vort3(i+1, j )
55
56
57 c del2u(i,j) = recip_rAw(i,j,bi,bj)*(
58 c & +recip_hFacW(i,j,k,bi,bj)*( Dij-Dmj )
59 c & -recip_hFacW(i,j,k,bi,bj)*( Zip-Zij ) )
60 c del2u(i,j) = recip_rAw(i,j,bi,bj)*(
61 c & + ( Dij-Dmj )
62 c & -recip_hFacW(i,j,k,bi,bj)*( Zip-Zij ) )
63 c del2u(i,j) =
64 c & + ( Dij-Dmj )*recip_DXC(i,j,bi,bj)
65 c & -recip_hFacW(i,j,k,bi,bj)*( Zip-Zij )*recip_DYG(i,j,bi,bj)
66
67 c del2v(i,j) = recip_rAs(i,j,bi,bj)*(
68 c & recip_hFacS(i,j,k,bi,bj)*( Zpj-Zij )
69 c & +recip_hFacS(i,j,k,bi,bj)*( Dij-Dim ) )
70 c del2v(i,j) = recip_rAs(i,j,bi,bj)*(
71 c & recip_hFacS(i,j,k,bi,bj)*( Zpj-Zij )
72 c & + ( Dij-Dim ) )
73 c del2v(i,j) =
74 c & recip_hFacS(i,j,k,bi,bj)*( Zpj-Zij )*recip_DXG(i,j,bi,bj)
75 c & + ( Dij-Dim )*recip_DYC(i,j,bi,bj)
76
77 c ENDDO
78 c ENDDO
79
80 C - bi-harmonic viscosity : del^2(U_component)
81
82 cph-exch2#ifndef ALLOW_AUTODIFF_TAMC
83 IF (useCubedSphereExchange) THEN
84 C to compute d/dx(hDiv), fill corners with appropriate values:
85 CALL FILL_CS_CORNER_TR_RL( 1, .FALSE.,
86 & hDiv, bi,bj, myThid )
87 ENDIF
88 cph-exch2#endif
89 c DO j=1,sNy
90 c DO i=1,sNx+1
91 DO j=2-Oly,sNy+Oly-1
92 DO i=2-Olx,sNx+Olx-1
93 del2u(i,j) =
94 & + ( hDiv(i,j) - hDiv(i-1,j) )*recip_DXC(i,j,bi,bj)
95 & -_recip_hFacW(i,j,k,bi,bj)*
96 & ( hFacZ(i,j+1)*vort3(i,j+1) - hFacZ(i,j)*vort3(i,j) )
97 & *recip_DYG(i,j,bi,bj)
98 ENDDO
99 ENDDO
100
101 C - bi-harmonic viscosity : del^2(V_component)
102
103 cph-exch2#ifndef ALLOW_AUTODIFF_TAMC
104 IF (useCubedSphereExchange) THEN
105 C to compute d/dy(hDiv), fill corners with appropriate values:
106 CALL FILL_CS_CORNER_TR_RL( 2, .FALSE.,
107 & hDiv, bi,bj, myThid )
108 ENDIF
109 cph-exch2#endif
110 c DO j=1,sNy+1
111 c DO i=1,sNx
112 DO j=2-Oly,sNy+Oly-1
113 DO i=2-Olx,sNx+Olx-1
114 del2v(i,j) =
115 & + ( hDiv(i,j) - hDiv(i,j-1) )*recip_DYC(i,j,bi,bj)
116 & +_recip_hFacS(i,j,k,bi,bj)*
117 & ( hFacZ(i+1,j)*vort3(i+1,j) - hFacZ(i,j)*vort3(i,j) )
118 & *recip_DXG(i,j,bi,bj)
119 ENDDO
120 ENDDO
121
122 RETURN
123 END

  ViewVC Help
Powered by ViewVC 1.1.22