/[MITgcm]/MITgcm/pkg/my82/my82_calc_diff.F
ViewVC logotype

Annotation of /MITgcm/pkg/my82/my82_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, 9 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 "MY82_OPTIONS.h"
5    
6     SUBROUTINE MY82_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 MY82_CALC_DIFF |
14     C | o Add contrubution to net diffusivity from MY82 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, iMin, iMax, jMin, jMax - Range of points for which calculation
27     C maskUp - land/water mask for Wvel points (above tracer level)
28     C myThid - Instance number for this innvocation of CALC_COMMON_FACTORS
29     C
30     INTEGER bi,bj,iMin,iMax,jMin,jMax,K
31     _RS maskUp(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
32     _RL KappaRT(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
33     _RL KappaRS(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
34     INTEGER myThid
35    
36     #ifdef ALLOW_MY82
37     #include "MY82.h"
38    
39     C == Local variables ==
40     C I, J, K - Loop counters
41     INTEGER i,j
42    
43     DO j=jMin,jMax
44     DO i=iMin,iMax
45     KappaRT(i,j,k) = KappaRT(i,j,k)+maskUp(i,j)*
46     & ( MYdiffKr(i,j,k,bi,bj)
47     #if (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL))
48     & - diffKr(i,j,k,bi,bj) )
49     #else
50     & - diffKrT )
51     #endif
52     ENDDO
53     ENDDO
54    
55     DO j=jMin,jMax
56     DO i=iMin,iMax
57     KappaRS(i,j,k) = KappaRS(i,j,k)+maskUp(i,j)*
58     & ( MYdiffKr(i,j,k,bi,bj)
59     #if (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL))
60     & - diffKr(i,j,k,bi,bj) )
61     #else
62     & - diffKrS )
63     #endif
64     ENDDO
65     ENDDO
66    
67     #endif /* ALLOW_MY82 */
68    
69     RETURN
70     END

  ViewVC Help
Powered by ViewVC 1.1.22