/[MITgcm]/MITgcm/pkg/kpp/kpp_transport_s.F
ViewVC logotype

Contents of /MITgcm/pkg/kpp/kpp_transport_s.F

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


Revision 1.11 - (show annotations) (download)
Wed Oct 20 21:54:17 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, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint58n_post, checkpoint57e_post, checkpoint59a, 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, 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.10: +36 -11 lines
Compute the non-local term using either KPP vertical diffusivity (default)
         or the total vertical diffusivity (when KPP_ghatUseTotalDiffus=T)

1 C $Header: /u/gcmpack/MITgcm/pkg/kpp/kpp_transport_s.F,v 1.10 2004/07/18 01:19:36 jmc Exp $
2 C $Name: $
3
4 #include "KPP_OPTIONS.h"
5 #ifdef ALLOW_GMREDI
6 #include "GMREDI_OPTIONS.h"
7 #endif
8
9 subroutine KPP_TRANSPORT_S (
10 I iMin,iMax,jMin,jMax,bi,bj,k,km1,
11 O df )
12 C /==========================================================\
13 C | o SUBROUTINE KPP_TRANSPORT_S |
14 C | Add non local KPP transport term (ghat) to diffusive |
15 C | salinity flux. |
16 C |==========================================================|
17 C | The nonlocal transport term is nonzero only for scalars |
18 C | in unstable (convective) forcing conditions. |
19 C | Note: KPPdiffKzS(-,k) is defined at the top of grid cell |
20 C | k while KPPghat(i,j,k,bi,bj) is defined at the |
21 C | bottom of grid cell k. |
22 C | For K=1, KPPdiffKzS(-,k) = 0 which insures no flux |
23 C | through the surface. |
24 C \==========================================================/
25 IMPLICIT NONE
26
27 C == GLobal variables ==
28 #include "SIZE.h"
29 #include "EEPARAMS.h"
30 #include "PARAMS.h"
31 #include "GRID.h"
32 #include "FFIELDS.h"
33 #include "KPP.h"
34 #include "KPP_PARAMS.h"
35 #ifdef ALLOW_GMREDI
36 #include "GMREDI.h"
37 #endif
38
39 C == Routine arguments ==
40 C iMin,iMax,jMin, - Range of points for which calculation
41 C jMax,bi,bj,k,km1 results will be set.
42 C df - Diffusive flux component work array.
43 INTEGER iMin,iMax,jMin,jMax,bi,bj,k,km1
44 _RL df (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
45
46 #if defined(ALLOW_KPP) && defined(KPP_GHAT)
47
48 C == Local variables ==
49 C I, J - Loop counters
50 INTEGER I, J
51 _RL tmpFac
52
53 #ifdef ALLOW_GMREDI
54
55 IF ( useGMRedi .AND. KPP_ghatUseTotalDiffus ) THEN
56 tmpFac = 1. _d 0
57 ELSE
58 tmpFac = 0. _d 0
59 ENDIF
60 DO j=jMin,jMax
61 DO i=iMin,iMax
62 df(i,j) = - _rA(i,j,bi,bj)
63 & *( KPPdiffKzS(i,j,k,bi,bj) + tmpFac*Kwz(i,j,k,bi,bj) )
64 & *KPPghat(i,j,km1,bi,bj)
65 & *surfaceForcingS(i,j,bi,bj)
66 ENDDO
67 ENDDO
68
69 #else /* ALLOW_GMREDI */
70
71 DO j=jMin,jMax
72 DO i=iMin,iMax
73 df(i,j) = - _rA(i,j,bi,bj)
74 & *KPPdiffKzS(i,j,k,bi,bj)
75 & *KPPghat(i,j,km1,bi,bj)
76 & *surfaceForcingS(i,j,bi,bj)
77 ENDDO
78 ENDDO
79
80 #endif /* ALLOW_GMREDI */
81
82
83 #endif /* ALLOW_KPP and KPP_GHAT */
84
85 RETURN
86 END

  ViewVC Help
Powered by ViewVC 1.1.22