1 |
|
C $Header$ |
2 |
|
C $Name$ |
3 |
|
|
4 |
|
#include "CPP_OPTIONS.h" |
5 |
|
|
6 |
|
SUBROUTINE MOM_V_DEL2V( |
7 |
|
I bi,bj,k, |
8 |
|
I vFld, hFacZ, |
9 |
|
O del2v, |
10 |
|
I myThid) |
11 |
|
IMPLICIT NONE |
12 |
|
C |
13 |
|
C Calculate horizontal del^2 of vFld |
14 |
|
C - is not vector invariant ... |
15 |
|
C |
16 |
|
|
17 |
|
C == Global variables == |
18 |
|
#include "SIZE.h" |
19 |
|
#include "EEPARAMS.h" |
20 |
|
#include "PARAMS.h" |
21 |
|
#include "GRID.h" |
22 |
|
|
23 |
|
C == Routine arguments == |
24 |
|
INTEGER bi,bj,k |
25 |
|
_RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
26 |
|
_RS hFacZ(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 |
|
_RL fZon(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
33 |
|
_RL fMer(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
34 |
|
_RS hFacZClosedE,hFacZClosedW |
35 |
|
|
36 |
|
C Zonal flux d/dx V |
37 |
|
DO j=1-Oly,sNy+Oly |
38 |
|
DO i=1-Olx+1,sNx+Olx |
39 |
|
fZon(i,j) = drF(k)*hFacZ(i,j) |
40 |
|
& *_dyU(i,j,bi,bj) |
41 |
|
& *_recip_dxV(i,j,bi,bj) |
42 |
|
& *(vFld(i,j)-vFld(i-1,j)) |
43 |
|
#ifdef COSINEMETH_III |
44 |
|
& *sqcosFacV(J,bi,bj) |
45 |
|
#endif |
46 |
|
ENDDO |
47 |
|
ENDDO |
48 |
|
|
49 |
|
C Meridional flux d/dy V |
50 |
|
DO j=1-Oly,sNy+Oly-1 |
51 |
|
DO i=1-Olx,sNx+Olx |
52 |
|
fMer(i,j) = drF(k)*_hFacC(i,j,k,bi,bj) |
53 |
|
& *_dxF(i,j,bi,bj) |
54 |
|
& *_recip_dyF(i,j,bi,bj) |
55 |
|
& *(vFld(i,j+1)-vFld(i,j)) |
56 |
|
ENDDO |
57 |
|
ENDDO |
58 |
|
|
59 |
|
C del^2 U |
60 |
|
DO j=0,sNy+2 |
61 |
|
DO i=0,sNx+1 |
62 |
|
del2v(i,j) = recip_drF(k)*_recip_hFacS(i,j,k,bi,bj) |
63 |
|
& *recip_rAs(i,j,bi,bj) |
64 |
|
& *( fZon(i+1,j) - fZon(i, j ) |
65 |
|
& +fMer( i ,j) - fMer(i,j-1) |
66 |
|
& )*_maskS(i,j,k,bi,bj) |
67 |
|
ENDDO |
68 |
|
ENDDO |
69 |
|
|
70 |
|
IF (no_slip_sides) THEN |
71 |
|
C-- No-slip BCs impose a drag at walls... |
72 |
|
DO j=0,sNy+2 |
73 |
|
DO i=0,sNx+1 |
74 |
|
hFacZClosedW = _hFacS(i,j,k,bi,bj) - hFacZ(i,j) |
75 |
|
hFacZClosedE = _hFacS(i,j,k,bi,bj) - hFacZ(i+1,j) |
76 |
|
del2v(i,j) = del2v(i,j) |
77 |
|
& -_recip_hFacS(i,j,k,bi,bj)*recip_drF(k) |
78 |
|
& *recip_rAs(i,j,bi,bj) |
79 |
|
& *( hFacZClosedW*dyU( i ,j,bi,bj) |
80 |
|
& *_recip_dxV( i ,j,bi,bj) |
81 |
|
& +hFacZClosedE*dyU(i+1,j,bi,bj) |
82 |
|
& *_recip_dxV(i+1,j,bi,bj) |
83 |
|
& )*drF(k)*2.*vFld(i,j) |
84 |
|
& *_maskS(i,j,k,bi,bj) |
85 |
|
ENDDO |
86 |
|
ENDDO |
87 |
|
ENDIF |
88 |
|
|
89 |
|
RETURN |
90 |
|
END |