/[MITgcm]/MITgcm/pkg/gmredi/gmredi_calc_diff.F
ViewVC logotype

Contents of /MITgcm/pkg/gmredi/gmredi_calc_diff.F

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


Revision 1.8 - (show annotations) (download)
Fri Oct 22 01:40:24 2004 UTC (19 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint57g_pre, checkpoint57s_post, checkpoint58b_post, checkpoint57b_post, checkpoint57g_post, checkpoint56b_post, checkpoint57y_post, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint59, checkpoint58, checkpoint57, checkpoint56, checkpoint58f_post, checkpoint57n_post, checkpoint58d_post, checkpoint58a_post, checkpoint57z_post, checkpoint58y_post, checkpoint58t_post, checkpoint55i_post, checkpoint58m_post, checkpoint57l_post, checkpoint57t_post, checkpoint57v_post, checkpoint57f_post, checkpoint57a_post, checkpoint57h_pre, checkpoint58w_post, checkpoint57h_post, checkpoint57y_pre, checkpoint58o_post, checkpoint57c_post, checkpoint58p_post, checkpoint58q_post, checkpoint58e_post, mitgcm_mapl_00, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint58n_post, checkpoint57e_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, eckpoint57e_pre, checkpoint58k_post, checkpoint58v_post, checkpoint56a_post, checkpoint58l_post, checkpoint57h_done, checkpoint57j_post, checkpoint57f_pre, checkpoint58g_post, checkpoint58x_post, checkpoint59j, checkpoint58h_post, checkpoint56c_post, checkpoint58j_post, checkpoint57a_pre, checkpoint57o_post, checkpoint57k_post, checkpoint57w_post, checkpoint58i_post, checkpoint57x_post, checkpoint58c_post, checkpoint58u_post, checkpoint58s_post
Changes since 1.7: +39 -27 lines
towards separation of Explicit & Implicit vertical diffusivity

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

  ViewVC Help
Powered by ViewVC 1.1.22