/[MITgcm]/MITgcm/pkg/mom_common/mom_calc_tension.F
ViewVC logotype

Annotation of /MITgcm/pkg/mom_common/mom_calc_tension.F

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


Revision 1.5 - (hide annotations) (download)
Thu Sep 10 17:53:04 2015 UTC (8 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65o, HEAD
Changes since 1.4: +6 -5 lines
add deep-atmosphere geometry factor in these routines

1 jmc 1.5 C $Header: /u/gcmpack/MITgcm/pkg/mom_common/mom_calc_tension.F,v 1.4 2011/05/03 19:27:26 jmc Exp $
2 adcroft 1.2 C $Name: $
3 adcroft 1.1
4     #include "MOM_COMMON_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: MOM_CALC_TENSION
8    
9     C !INTERFACE: ==========================================================
10 jmc 1.4 SUBROUTINE MOM_CALC_TENSION(
11 adcroft 1.1 I bi,bj,k,
12     I uFld, vFld,
13     O tension,
14 jmc 1.5 I myThid )
15 adcroft 1.1 C !DESCRIPTION:
16     C Calculates the tension of the horizontal flow field (at tracer points):
17     C \begin{equation*}
18     C D_T = \frac{\Delta y_f}{\Delta x_f} \delta_i \frac{u}{\Delta y_g}
19     C - \frac{\Delta x_f}{\Delta y_f} \delta_j \frac{v}{\Delta x_g}
20     C \end{equation*}
21    
22     C !USES: ===============================================================
23     IMPLICIT NONE
24     #include "SIZE.h"
25     #include "EEPARAMS.h"
26     #include "PARAMS.h"
27     #include "GRID.h"
28    
29     C !INPUT PARAMETERS: ===================================================
30     C bi,bj :: tile indices
31     C k :: vertical level
32     C uFld :: zonal flow
33     C vFld :: meridional flow
34     C myThid :: thread number
35     INTEGER bi,bj,k
36     _RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
37     _RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
38     INTEGER myThid
39    
40     C !OUTPUT PARAMETERS: ==================================================
41     C tension :: tension of horizontal flow
42     _RL tension(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43    
44     C !LOCAL VARIABLES: ====================================================
45     C i,j :: loop indices
46     INTEGER i,j
47     CEOP
48    
49 jmc 1.5 DO j=1-OLy,sNy+OLy-1
50     DO i=1-OLx,sNx+OLx-1
51 adcroft 1.1
52     C Calculate tension of horizontal flow (ignoring lopping factors)
53     C *NOTE* that masking is implicit in the contents of the (u,v) fields.
54 jmc 1.4 tension(i,j)=
55     & ( dyG(i+1, j ,bi,bj)*uFld(i+1, j )
56     & -dyG( i , j ,bi,bj)*uFld( i , j )
57     & -dxG( i ,j+1,bi,bj)*vFld( i ,j+1)
58     & +dxG( i , j ,bi,bj)*vFld( i , j )
59 jmc 1.5 & )*recip_rA(i,j,bi,bj)*recip_deepFacC(k)
60 jmc 1.4 #ifdef ALLOW_OBCS
61     & *maskInC(i,j,bi,bj)
62     #endif
63 jmc 1.5 c tension(i,j)=
64 jmc 1.4 c & (dyF(i,j,bi,bj)*recip_dxF(i,j,bi,bj))
65     c & *( uFld(i+1, j )*recip_dyG(i+1, j ,bi,bj)
66     c & -uFld( i , j )*recip_dyG( i , j ,bi,bj) )
67     c & -(dxF(i,j,bi,bj)*recip_dyF(i,j,bi,bj))
68     c & *( vFld( i ,j+1)*recip_dxG( i ,j+1,bi,bj)
69     c & -vFld( i , j )*recip_dxG( i , j ,bi,bj) )
70 adcroft 1.1
71     ENDDO
72     ENDDO
73 jmc 1.4
74 adcroft 1.1 RETURN
75     END

  ViewVC Help
Powered by ViewVC 1.1.22