/[MITgcm]/MITgcm/pkg/pp81/pp81_calc_diff.F
ViewVC logotype

Annotation of /MITgcm/pkg/pp81/pp81_calc_diff.F

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


Revision 1.1 - (hide annotations) (download)
Thu Sep 2 09:11:54 2004 UTC (19 years, 10 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint55c_post, checkpoint54e_post, checkpoint55d_pre, checkpoint55b_post, checkpoint55, checkpoint54f_post, checkpoint55g_post, checkpoint55f_post, checkpoint55e_post, checkpoint55a_post, checkpoint55d_post
o add two new packages
  - pp81 (Packanowski and Philander, 1981), Richardson number and
    stratification dependent mixing
  - my82 (Mellor and Yamada, 1982) level 2 turbulence closure scheme

1 mlosch 1.1 C $Header: $
2     C $Name: $
3    
4     #include "PP81_OPTIONS.h"
5    
6     SUBROUTINE PP81_CALC_DIFF(
7     I bi,bj,iMin,iMax,jMin,jMax,K,
8     I maskUp,
9     U KappaRT,KappaRS,
10     I myThid)
11    
12     C /==========================================================\
13     C | SUBROUTINE PP81_CALC_DIFF |
14     C | o Add contrubution to net diffusivity from PP81 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    
25     C == Routine arguments ==
26     C bi, bj - tile numbers
27     C iMin, iMax, jMin, jMax - Range of points for which calculation
28     C maskUp - land/water mask for Wvel points (above tracer level)
29     C myThid - Instance number for this innvocation of PP81_CALC_DIFF
30     C
31     INTEGER bi,bj,iMin,iMax,jMin,jMax,K
32     _RS maskUp(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
33     _RL KappaRT(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
34     _RL KappaRS(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
35     INTEGER myThid
36    
37     #ifdef ALLOW_PP81
38     #include "PP81.h"
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     KappaRT(i,j,k) = KappaRT(i,j,k)+maskUp(i,j)*
47     & ( PPdiffKr(i,j,k,bi,bj)
48     #if (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL))
49     & - diffKr(i,j,k,bi,bj) )
50     #else
51     & - diffKrT )
52     #endif
53     ENDDO
54     ENDDO
55    
56     DO j=jMin,jMax
57     DO i=iMin,iMax
58     KappaRS(i,j,k) = KappaRS(i,j,k)+maskUp(i,j)*
59     & ( PPdiffKr(i,j,k,bi,bj)
60     #if (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL))
61     & - diffKr(i,j,k,bi,bj) )
62     #else
63     & - diffKrS )
64     #endif
65     ENDDO
66     ENDDO
67    
68     #endif /* ALLOW_PP81 */
69    
70     RETURN
71     END

  ViewVC Help
Powered by ViewVC 1.1.22