/[MITgcm]/MITgcm/model/src/calc_diffusivity.F
ViewVC logotype

Contents of /MITgcm/model/src/calc_diffusivity.F

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


Revision 1.4 - (show annotations) (download)
Wed Jun 10 16:05:39 1998 UTC (26 years ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint11, checkpoint10, checkpoint13, checkpoint7, checkpoint9, checkpoint8, checkpoint12, branch-point-rdot
Branch point for: checkpoint7-4degree-ref, branch-rdot
Changes since 1.3: +10 -2 lines
Added code to bring "salt" up-to-date with "theta".
One caveat is that implicit diffusion of salt is done with the
diffusivity of theta. We'll sort this out later. In explicit
mode, diffKzS is used.

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/calc_diffusivity.F,v 1.3 1998/06/10 01:44:02 cnh Exp $
2
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,KappaZS,
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 #include "EEPARAMS.h"
22 #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 _RS maskC(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
33 _RS maskUp(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
34 _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 _RL KappaZS(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nz)
38 INTEGER myThid
39 CEndOfInterface
40
41 C == Local variables ==
42 C I, J, K - Loop counters
43 INTEGER i,j
44
45 DO j=jMin,jMax
46 DO i=iMin,iMax
47 KappaZT(i,j,k) = maskC(i,j)*maskUp(i,j)*
48 & ( diffKzT + KapGM(i,j)*K33(i,j,k) )
49 ENDDO
50 ENDDO
51
52 DO j=jMin,jMax
53 DO i=iMin,iMax
54 KappaZS(i,j,k) = maskC(i,j)*maskUp(i,j)*
55 & ( diffKzS + KapGM(i,j)*K33(i,j,k) )
56 ENDDO
57 ENDDO
58
59 RETURN
60 END

  ViewVC Help
Powered by ViewVC 1.1.22