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

Contents of /MITgcm/pkg/my82/my82_calc_diff.F

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


Revision 1.3 - (show annotations) (download)
Fri Oct 22 01:41:35 2004 UTC (19 years, 6 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, 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 C $Header: /u/gcmpack/MITgcm/pkg/my82/my82_calc_diff.F,v 1.2 2004/10/17 23:12:31 jmc Exp $
2 C $Name: $
3
4 #include "MY82_OPTIONS.h"
5
6 SUBROUTINE MY82_CALC_DIFF(
7 I bi,bj,iMin,iMax,jMin,jMax,kArg,kSize,
8 U KappaRx,
9 I myThid)
10
11 C /==========================================================\
12 C | SUBROUTINE MY82_CALC_DIFF |
13 C | o Add contrubution to net diffusivity from MY82 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 #ifdef ALLOW_MY82
24 #include "MY82.h"
25 #endif
26
27 C == Routine arguments ==
28 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 MY82_CALC_DIFF
36
37 INTEGER bi,bj,iMin,iMax,jMin,jMax,kArg,kSize
38 _RL KappaRx(1-Olx:sNx+Olx,1-Oly:sNy+Oly,kSize)
39 INTEGER myThid
40
41 #ifdef ALLOW_MY82
42
43 C == Local variables ==
44 C i,j,k :: Loop counters
45 INTEGER i,j,k
46
47 C-- Add Vertical diffusivity contribution from MY82
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 & +( MYdiffKr(i,j,k,bi,bj)
55 #if (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL))
56 & - diffKr(i,j,k,bi,bj) )
57 #else
58 & - diffKrNrT(k) )
59 #endif
60 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 & +( MYdiffKr(i,j,kArg,bi,bj)
70 #if (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL))
71 & - diffKr(i,j,kArg,bi,bj) )
72 #else
73 & - diffKrNrT(kArg) )
74 #endif
75 ENDDO
76 ENDDO
77 ENDIF
78
79 #endif /* ALLOW_MY82 */
80
81 RETURN
82 END

  ViewVC Help
Powered by ViewVC 1.1.22