/[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.3 - (hide annotations) (download)
Fri Oct 22 01:42:06 2004 UTC (19 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57v_post, checkpoint58u_post, checkpoint58w_post, checkpoint57m_post, checkpoint57s_post, checkpoint57k_post, checkpoint57d_post, checkpoint57g_post, checkpoint60, checkpoint61, checkpoint57b_post, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, checkpoint58n_post, checkpoint58x_post, checkpoint57g_pre, checkpoint58t_post, checkpoint58h_post, checkpoint56c_post, checkpoint57y_pre, checkpoint57f_pre, checkpoint57a_post, checkpoint58q_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, eckpoint57e_pre, checkpoint57h_done, checkpoint58f_post, checkpoint57x_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint57c_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61h, checkpoint57j_post, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint57h_post, checkpoint56a_post
Changes since 1.2: +42 -30 lines
towards separation of Explicit & Implicit vertical diffusivity

1 jmc 1.3 C $Header: /u/gcmpack/MITgcm/pkg/ggl90/ggl90_calc_diff.F,v 1.2 2004/10/17 23:11:59 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     _RL KappaRx(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
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 mlosch 1.1 #if (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL))
56     & - diffKr(i,j,k,bi,bj) )
57     #else
58 jmc 1.2 & - diffKrNrT(k) )
59 mlosch 1.1 #endif
60 jmc 1.3 ENDDO
61     ENDDO
62     ENDDO
63     ELSE
64     C- do level k=kArg only :
65     k = MIN(kArg,kSize)
66     DO j=jMin,jMax
67     DO i=iMin,iMax
68     KappaRx(i,j,k) = KappaRx(i,j,k)
69     & +( GGL90diffKr(i,j,kArg,bi,bj)
70 mlosch 1.1 #if (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL))
71 jmc 1.3 & - diffKr(i,j,kArg,bi,bj) )
72 mlosch 1.1 #else
73 jmc 1.3 & - diffKrNrT(kArg) )
74 mlosch 1.1 #endif
75 jmc 1.3 ENDDO
76     ENDDO
77     ENDIF
78 mlosch 1.1
79     #endif /* ALLOW_GGL90 */
80    
81     RETURN
82     END

  ViewVC Help
Powered by ViewVC 1.1.22