1 |
heimbach |
1.2 |
C $Header: /u/ralf/cvs/ecco_env/pkg/gmredi/gmredi_calc_diff.F,v 1.3 2000/11/14 17:21:41 heimbach Exp $ |
2 |
adcroft |
1.1 |
|
3 |
|
|
#include "GMREDI_OPTIONS.h" |
4 |
|
|
|
5 |
|
|
SUBROUTINE GMREDI_CALC_DIFF( |
6 |
|
|
I bi,bj,iMin,iMax,jMin,jMax,K, |
7 |
|
|
I maskUp, |
8 |
heimbach |
1.2 |
U KappaRT,KappaRS, |
9 |
adcroft |
1.1 |
I myThid) |
10 |
|
|
|
11 |
|
|
C /==========================================================\ |
12 |
|
|
C | SUBROUTINE GMREDI_CALC_DIFF | |
13 |
|
|
C | o Add contrubution to net diffusivity from GM/Redi | |
14 |
|
|
C \==========================================================/ |
15 |
|
|
IMPLICIT NONE |
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 |
|
|
C bi, bj, iMin, iMax, jMin, jMax - Range of points for which calculation |
25 |
|
|
C maskUp - land/water mask for Wvel points (above tracer level) |
26 |
|
|
C myThid - Instance number for this innvocation of CALC_COMMON_FACTORS |
27 |
|
|
C |
28 |
|
|
INTEGER bi,bj,iMin,iMax,jMin,jMax,K |
29 |
|
|
_RS maskUp(1-Olx:sNx+Olx,1-Oly:sNy+Oly) |
30 |
|
|
_RL KappaRT(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr) |
31 |
|
|
_RL KappaRS(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr) |
32 |
|
|
INTEGER myThid |
33 |
|
|
|
34 |
|
|
#ifdef ALLOW_GMREDI |
35 |
|
|
#include "GMREDI.h" |
36 |
|
|
|
37 |
|
|
C == Local variables == |
38 |
|
|
C I, J, K - Loop counters |
39 |
|
|
INTEGER i,j |
40 |
|
|
|
41 |
|
|
DO j=jMin,jMax |
42 |
|
|
DO i=iMin,iMax |
43 |
|
|
KappaRT(i,j,k) = KappaRT(i,j,k)+maskUp(i,j)* |
44 |
|
|
& ( GM_background_K |
45 |
|
|
#ifdef GM_VISBECK_VARIABLE_K |
46 |
heimbach |
1.2 |
& + VisbeckK(i,j,bi,bj) |
47 |
adcroft |
1.1 |
#endif |
48 |
heimbach |
1.2 |
& )*Kwz(i,j,k,bi,bj) |
49 |
adcroft |
1.1 |
ENDDO |
50 |
|
|
ENDDO |
51 |
|
|
|
52 |
|
|
DO j=jMin,jMax |
53 |
|
|
DO i=iMin,iMax |
54 |
|
|
KappaRS(i,j,k) = KappaRS(i,j,k)+maskUp(i,j)* |
55 |
|
|
& ( GM_background_K |
56 |
|
|
#ifdef GM_VISBECK_VARIABLE_K |
57 |
heimbach |
1.2 |
& + VisbeckK(i,j,bi,bj) |
58 |
adcroft |
1.1 |
#endif |
59 |
heimbach |
1.2 |
& )*Kwz(i,j,k,bi,bj) |
60 |
adcroft |
1.1 |
ENDDO |
61 |
|
|
ENDDO |
62 |
|
|
|
63 |
|
|
#endif /* ALLOW_GMREDI */ |
64 |
|
|
|
65 |
|
|
RETURN |
66 |
|
|
END |