/[MITgcm]/MITgcm/verification/tutorial_deep_convection/code/mom_w_smag_3d.F
ViewVC logotype

Annotation of /MITgcm/verification/tutorial_deep_convection/code/mom_w_smag_3d.F

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


Revision 1.2 - (hide annotations) (download)
Tue Nov 5 13:53:27 2013 UTC (11 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
- move to pkg/mom_common and model/src (previously in tutorial_deep_convection
  code) 2nd version of isotropic 3-D Smagorinsky code interface: strain and
  viscosity are locally declared in dynmics.F and pass as argument to CALC_GW;
  ensure that all field value that are used are set.

1 jmc 1.2 C $Header: /u/gcmpack/MITgcm/verification/tutorial_deep_convection/code/mom_w_smag_3d.F,v 1.1 2013/09/30 18:19:42 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4     #include "MOM_COMMON_OPTIONS.h"
5    
6     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7     CBOP
8     C !ROUTINE: MOM_W_SMAG_3D
9    
10     C !INTERFACE:
11     SUBROUTINE MOM_W_SMAG_3D(
12     I str13, str23, str33,
13     I viscAh3d_00, viscAh3d_13, viscAh3d_23,
14     I rThickC_W, rThickC_S, rThickC_C, recip_rThickC,
15     O wDissip,
16     I k, bi, bj, myThid )
17    
18     C !DESCRIPTION:
19    
20     C !USES:
21     IMPLICIT NONE
22    
23     C == Global variables ==
24     #include "SIZE.h"
25     #include "EEPARAMS.h"
26     #include "PARAMS.h"
27     #include "GRID.h"
28    
29     C !INPUT PARAMETERS:
30     C rThickC_W :: thickness (in r-units) of W-Cell at Western Edge
31     C rThickC_S :: thickness (in r-units) of W-Cell at Southern Edge
32     C rThickC_C :: thickness (in r-units) of W-Cell (centered on W pt)
33     C recip_rThickC :: reciprol thickness of W-Cell (centered on W-point)
34     _RL str13(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr+1)
35     _RL str23(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr+1)
36     _RL str33(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
37     _RL viscAh3d_00(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
38     _RL viscAh3d_13(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr+1)
39     _RL viscAh3d_23(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr+1)
40     _RL rThickC_W (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
41     _RL rThickC_S (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
42     _RL rThickC_C (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43     _RL recip_rThickC(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
44     INTEGER k, bi, bj
45     INTEGER myThid
46    
47     C !OUTPUT PARAMETERS:
48     _RL wDissip(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
49     CEOP
50    
51     C !LOCAL VARIABLES:
52     INTEGER i,j
53     INTEGER km1
54     _RL maskM1
55    
56     km1 = MAX(1,k-1)
57     maskM1 = 1.
58     IF ( k.LE.1 ) maskM1 = 0.
59    
60     C - Laplacian and bi-harmonic terms
61     c IF (harmonic) THEN
62    
63     C- note: free-slip @ bottom is commented out
64    
65     C- use simple (momentum conserving) scaling
66     C (but not conserving angular momentum)
67    
68     DO j=1-OLy,sNy+OLy-1
69     DO i=1-OLx,sNx+OLx-1
70     c wDissip(i,j) = recip_rThickC(i,j)*
71     wDissip(i,j) =
72     & recip_rA(i,j,bi,bj)*(
73     & ( viscAh3d_13(i+1, j , k )*str13(i+1, j ,k)
74     c & *dyG(i+1, j ,bi,bj)*rThickC_W(i+1, j )
75     & *dyG(i+1, j ,bi,bj)
76     & -viscAh3d_13( i , j , k )*str13( i , j ,k)
77     c & *dyG( i , j ,bi,bj)*rThickC_W( i , j )
78     & *dyG( i , j ,bi,bj)
79     & )
80     & +( viscAh3d_23( i ,j+1, k )*str23( i ,j+1,k)
81     c & *dxG( i ,j+1,bi,bj)*rThickC_S( i ,j+1)
82     & *dxG( i ,j+1,bi,bj)
83     & -viscAh3d_23( i , j , k )*str23( i , j ,k)
84     c & *dxG( i , j ,bi,bj)*rThickC_S( i , j )
85     & *dxG( i , j ,bi,bj)
86     & ) )
87     & + recip_rThickC(i,j)
88     & *( viscAh3d_00( i , j , k )*str33( i , j , k )
89     & -viscAh3d_00( i , j ,km1)*str33( i , j ,km1)*maskM1
90     & )*rkSign
91     ENDDO
92     ENDDO
93    
94     c ENDIF
95    
96     c IF (biharmonic) THEN
97     c STOP 'MOM_UV_SMAG_3D: BIHARMONIC NOT ALLOWED WITH SMAG_3D'
98     c ENDIF
99    
100     RETURN
101     END

  ViewVC Help
Powered by ViewVC 1.1.22