1 |
adcroft |
1.3 |
C $Header: /u/gcmpack/models/MITgcmUV/pkg/mom_vecinv/mom_calc_strain.F,v 1.2 2001/11/27 15:39:15 adcroft Exp $ |
2 |
adcroft |
1.2 |
C $Name: $ |
3 |
adcroft |
1.1 |
|
4 |
|
|
#include "CPP_OPTIONS.h" |
5 |
|
|
|
6 |
adcroft |
1.2 |
CBOP |
7 |
|
|
C !ROUTINE: MOM_CALC_STRAIN |
8 |
|
|
|
9 |
|
|
C !INTERFACE: ========================================================== |
10 |
adcroft |
1.1 |
SUBROUTINE MOM_CALC_STRAIN( |
11 |
|
|
I bi,bj,k, |
12 |
|
|
I uFld, vFld, hFacZ, |
13 |
|
|
O strain, |
14 |
|
|
I myThid) |
15 |
adcroft |
1.2 |
|
16 |
|
|
C !DESCRIPTION: |
17 |
|
|
C Calculates the strain of the horizontal flow field (at vorticity points): |
18 |
|
|
C \begin{equation*} |
19 |
|
|
C D_S = \frac{\Delta y_u}{\Delta x_v} \delta_i \frac{v}{\Delta y_c} |
20 |
adcroft |
1.3 |
C + \frac{\Delta x_v}{\Delta y_u} \delta_j \frac{u}{\Delta x_c} |
21 |
adcroft |
1.2 |
C \end{equation*} |
22 |
|
|
C assuming free-slip boundaries. |
23 |
|
|
|
24 |
|
|
C !USES: =============================================================== |
25 |
adcroft |
1.1 |
IMPLICIT NONE |
26 |
|
|
#include "SIZE.h" |
27 |
|
|
#include "EEPARAMS.h" |
28 |
|
|
#include "PARAMS.h" |
29 |
|
|
#include "GRID.h" |
30 |
adcroft |
1.2 |
|
31 |
|
|
C !INPUT PARAMETERS: =================================================== |
32 |
|
|
C bi,bj :: tile indices |
33 |
|
|
C k :: vertical level |
34 |
|
|
C uFld :: zonal flow |
35 |
|
|
C vFld :: meridional flow |
36 |
|
|
C hFacZ :: open-water thickness at vorticity points |
37 |
|
|
C myThid :: thread number |
38 |
adcroft |
1.1 |
INTEGER bi,bj,k |
39 |
|
|
_RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
40 |
|
|
_RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
41 |
|
|
_RS hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
42 |
adcroft |
1.2 |
INTEGER myThid |
43 |
|
|
|
44 |
|
|
C !OUTPUT PARAMETERS: ================================================== |
45 |
|
|
C strain :: strain of horizontal flow |
46 |
adcroft |
1.1 |
_RL strain(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
47 |
|
|
|
48 |
adcroft |
1.2 |
C !LOCAL VARIABLES: ==================================================== |
49 |
|
|
C i,j :: loop indices |
50 |
adcroft |
1.1 |
INTEGER i,j |
51 |
adcroft |
1.2 |
CEOP |
52 |
adcroft |
1.1 |
|
53 |
|
|
DO J=2-Oly,sNy+Oly |
54 |
|
|
DO I=2-Olx,sNx+Olx |
55 |
|
|
|
56 |
adcroft |
1.2 |
C Strain of horizontal flow field (ignoring lopping factors) |
57 |
adcroft |
1.1 |
strain(I,J)= |
58 |
|
|
& dyu(I,J,bi,bj)*recip_dxv(I,J,bi,bj)*( |
59 |
|
|
& vFld( I , J )*recip_dyc( I , J ,bi,bj) |
60 |
|
|
& -vFld(I-1, J )*recip_dyc(I-1, J ,bi,bj) ) |
61 |
|
|
& +dxv(I,J,bi,bj)*recip_dyu(I,J,bi,bj)*( |
62 |
|
|
& +uFld( I , J )*recip_dxc( I , J ,bi,bj) |
63 |
|
|
& -uFld( I ,J-1)*recip_dxc( I ,J-1,bi,bj) ) |
64 |
|
|
|
65 |
adcroft |
1.2 |
C Set strain to zero on boundaries (free-slip) |
66 |
adcroft |
1.1 |
IF (hFacZ(i,j).EQ.0.) THEN |
67 |
|
|
strain(I,J)=0. |
68 |
|
|
ENDIF |
69 |
|
|
|
70 |
|
|
ENDDO |
71 |
|
|
ENDDO |
72 |
|
|
|
73 |
|
|
C Special stuff for Cubed Sphere |
74 |
|
|
IF (useCubedSphereExchange) THEN |
75 |
|
|
I=1 |
76 |
|
|
J=1 |
77 |
|
|
strain(I,J)=0. |
78 |
|
|
I=sNx+1 |
79 |
|
|
J=1 |
80 |
|
|
strain(I,J)=0. |
81 |
|
|
I=1 |
82 |
|
|
J=sNy+1 |
83 |
|
|
strain(I,J)=0. |
84 |
|
|
I=sNx+1 |
85 |
|
|
J=sNy+1 |
86 |
|
|
strain(I,J)=0. |
87 |
|
|
ENDIF |
88 |
|
|
|
89 |
|
|
RETURN |
90 |
|
|
END |