1 
C $Header: /u/gcmpack/MITgcm/pkg/ggl90/ggl90_calc_visc.F,v 1.5 2009/10/08 20:07:18 jmc Exp $ 
2 
C $Name: $ 
3 

4 
#include "GGL90_OPTIONS.h" 
5 

6 
SUBROUTINE GGL90_CALC_VISC( 
7 
I bi,bj,iMin,iMax,jMin,jMax,K, 
8 
U KappaRU,KappaRV, 
9 
I myThid) 
10 

11 
CBOP 
12 
C *==========================================================* 
13 
C  SUBROUTINE GGL90_CALC_VISC  
14 
C  o Add contrubution to net viscosity from GGL90 mixing  
15 
C *==========================================================* 
16 
IMPLICIT NONE 
17 

18 
C == GLobal variables == 
19 
#include "SIZE.h" 
20 
#include "EEPARAMS.h" 
21 
#include "PARAMS.h" 
22 
#include "DYNVARS.h" 
23 
#include "GRID.h" 
24 
#include "GGL90.h" 
25 

26 
C == Routine arguments == 
27 
C bi, bj, iMin, iMax, jMin, jMax  Range of points for which calculation 
28 
C myThid  Instance number for this innvocation of GGL90_CALC_VISC 
29 
C 
30 
INTEGER bi,bj,iMin,iMax,jMin,jMax,K 
31 
_RL KappaRU(1Olx:sNx+Olx,1Oly:sNy+Oly,Nr) 
32 
_RL KappaRV(1Olx:sNx+Olx,1Oly:sNy+Oly,Nr) 
33 
INTEGER myThid 
34 
CEOP 
35 

36 
#ifdef ALLOW_GGL90 
37 

38 
C == Local variables == 
39 
C I, J, K  Loop counters 
40 
INTEGER i,j 
41 
_RL p4, p8, p16 
42 

43 
p4=0.25 _d 0 
44 
p8=0.125 _d 0 
45 
p16=0.0625 _d 0 
46 

47 
DO j=jMin,jMax 
48 
DO i=iMin,iMax 
49 
KappaRU(i,j,k) = KappaRU(i,j,k) + 
50 
& (GGL90viscArU(i,j,k,bi,bj)  viscArNr(k) ) 
51 
ENDDO 
52 
ENDDO 
53 

54 
DO j=jMin,jMax 
55 
DO i=iMin,iMax 
56 
KappaRV(i,j,k) = KappaRV(i,j,k) + _maskS(i,j,k,bi,bj) * 
57 
& (GGL90viscArV(i,j,k,bi,bj)  viscArNr(k) ) 
58 
ENDDO 
59 
ENDDO 
60 

61 
#endif /* ALLOW_GGL90 */ 
62 

63 
RETURN 
64 
END 