/[MITgcm]/MITgcm/pkg/ggl90/ggl90_calc_diff.F
ViewVC logotype

Annotation of /MITgcm/pkg/ggl90/ggl90_calc_diff.F

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


Revision 1.6 - (hide annotations) (download)
Fri Aug 6 18:37:05 2010 UTC (13 years, 9 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint63, checkpoint65h, checkpoint65i, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62k, checkpoint62j, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x
Changes since 1.5: +1 -17 lines
Minor changes in pkg/ggl90:
 o GGL90diffKrS was removed --> always use GGL90diffKr
 o GGL90viscAr was removed --> replaced with GGL90viscArU, GGL90viscArV
 o hack of mxlMaxFlag=2 --> ensure mixing between first and second level (commented out for now)
 o change in max/min operations to ensure that smoothing is ok
 o smoothing of GGL90viscAr was moved to ggl90_calc.F (as done for GGL90diffKr)
 o always use diffKrNrT as background profile (i.e. never use diffKr field)

1 gforget 1.6 C $Header: /u/gcmpack/MITgcm/pkg/ggl90/ggl90_calc_diff.F,v 1.5 2009/08/02 19:30:19 jmc Exp $
2 mlosch 1.1 C $Name: $
3    
4     #include "GGL90_OPTIONS.h"
5    
6     SUBROUTINE GGL90_CALC_DIFF(
7 jmc 1.3 I bi,bj,iMin,iMax,jMin,jMax,kArg,kSize,
8     U KappaRx,
9 mlosch 1.1 I myThid)
10    
11     C /==========================================================\
12     C | SUBROUTINE GGL90_CALC_DIFF |
13     C | o Add contrubution to net diffusivity from GGL90 mixing |
14     C \==========================================================/
15     IMPLICIT NONE
16    
17     C == GLobal variables ==
18     #include "SIZE.h"
19     #include "EEPARAMS.h"
20     #include "PARAMS.h"
21     #include "DYNVARS.h"
22     #include "GRID.h"
23 jmc 1.3 #ifdef ALLOW_GGL90
24     #include "GGL90.h"
25     #endif
26 mlosch 1.1
27     C == Routine arguments ==
28 jmc 1.3 C bi, bj, :: tile indices
29     C iMin,iMax :: Range of points for which calculation is done
30     C jMin,jMax :: Range of points for which calculation is done
31     C kArg :: = 0 -> do the k-loop here and treat all levels
32     C > 0 -> k-loop is done outside and treat only level k=kArg
33     C kSize :: 3rd Dimension of the vertical diffusivity array KappaRx
34     C KappaRx :: vertical diffusivity array
35     C myThid :: Instance number for this innvocation of GGL90_CALC_DIFF
36    
37     INTEGER bi,bj,iMin,iMax,jMin,jMax,kArg,kSize
38 jmc 1.5 _RL KappaRx(1-Olx:sNx+Olx,1-Oly:sNy+Oly,kSize)
39 mlosch 1.1 INTEGER myThid
40    
41     #ifdef ALLOW_GGL90
42    
43     C == Local variables ==
44 jmc 1.3 C i,j,k :: Loop counters
45     INTEGER i,j,k
46 mlosch 1.1
47 jmc 1.3 C-- Add Vertical diffusivity contribution from GGL90
48     IF ( kArg .EQ. 0 ) THEN
49     C- do all levels :
50     DO k=1,MIN(Nr,kSize)
51     DO j=jMin,jMax
52     DO i=iMin,iMax
53     KappaRx(i,j,k) = KappaRx(i,j,k)
54     & +( GGL90diffKr(i,j,k,bi,bj)
55 jmc 1.2 & - diffKrNrT(k) )
56 jmc 1.3 ENDDO
57     ENDDO
58     ENDDO
59     ELSE
60     C- do level k=kArg only :
61     k = MIN(kArg,kSize)
62     DO j=jMin,jMax
63     DO i=iMin,iMax
64     KappaRx(i,j,k) = KappaRx(i,j,k)
65     & +( GGL90diffKr(i,j,kArg,bi,bj)
66     & - diffKrNrT(kArg) )
67     ENDDO
68     ENDDO
69     ENDIF
70 mlosch 1.1
71     #endif /* ALLOW_GGL90 */
72    
73     RETURN
74     END

  ViewVC Help
Powered by ViewVC 1.1.22