1 |
cnh |
1.3 |
C $Header: /u/gcmpack/models/MITgcmUV/model/src/calc_diffusivity.F,v 1.2 1998/06/09 16:48:02 cnh Exp $ |
2 |
adcroft |
1.1 |
|
3 |
|
|
#include "CPP_EEOPTIONS.h" |
4 |
|
|
|
5 |
|
|
CStartOfInterFace |
6 |
|
|
SUBROUTINE CALC_DIFFUSIVITY( |
7 |
|
|
I bi,bj,iMin,iMax,jMin,jMax,K, |
8 |
|
|
I maskC,maskUp,KapGM,K33, |
9 |
|
|
O KappaZT, |
10 |
|
|
I myThid) |
11 |
|
|
|
12 |
|
|
C /==========================================================\ |
13 |
|
|
C | SUBROUTINE CALC_DIFFUSIVITY | |
14 |
|
|
C | o Calculate net diffusivity | |
15 |
|
|
C |==========================================================| |
16 |
|
|
C \==========================================================/ |
17 |
|
|
IMPLICIT NONE |
18 |
|
|
|
19 |
|
|
C == GLobal variables == |
20 |
|
|
#include "SIZE.h" |
21 |
cnh |
1.2 |
#include "EEPARAMS.h" |
22 |
adcroft |
1.1 |
#include "PARAMS.h" |
23 |
|
|
#include "DYNVARS.h" |
24 |
|
|
|
25 |
|
|
C == Routine arguments == |
26 |
|
|
C bi, bj, iMin, iMax, jMin, jMax - Range of points for which calculation |
27 |
|
|
C maskC - land/water mask for tracer points |
28 |
|
|
C maskUp - land/water mask for Wvel points (above tracer level) |
29 |
|
|
C myThid - Instance number for this innvocation of CALC_COMMON_FACTORS |
30 |
|
|
C |
31 |
|
|
INTEGER bi,bj,iMin,iMax,jMin,jMax,K |
32 |
cnh |
1.3 |
_RS maskC(1-Olx:sNx+Olx,1-Oly:sNy+Oly) |
33 |
|
|
_RS maskUp(1-Olx:sNx+Olx,1-Oly:sNy+Oly) |
34 |
adcroft |
1.1 |
_RL KapGM(1-Olx:sNx+Olx,1-Oly:sNy+Oly) |
35 |
|
|
_RL K33(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nz) |
36 |
|
|
_RL KappaZT(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nz) |
37 |
|
|
INTEGER myThid |
38 |
|
|
CEndOfInterface |
39 |
|
|
|
40 |
|
|
C == Local variables == |
41 |
|
|
C I, J, K - Loop counters |
42 |
|
|
INTEGER i,j |
43 |
|
|
|
44 |
|
|
DO j=jMin,jMax |
45 |
|
|
DO i=iMin,iMax |
46 |
|
|
KappaZT(i,j,k) = maskC(i,j)*maskUp(i,j)* |
47 |
|
|
& ( diffKzT + KapGM(i,j)*K33(i,j,k) ) |
48 |
|
|
ENDDO |
49 |
|
|
ENDDO |
50 |
|
|
|
51 |
|
|
RETURN |
52 |
|
|
END |