/[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.16 - (show annotations) (download)
Wed Jan 20 01:32:50 2010 UTC (14 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62c, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint63g, checkpoint64, checkpoint63, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint62b, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f
Changes since 1.15: +22 -17 lines
avoid unused variables

1 C $Header: /u/gcmpack/MITgcm/pkg/kpp/kpp_transport_s.F,v 1.15 2007/12/21 02:54:34 atn 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 I myTime, myIter, myThid )
13 C *==========================================================*
14 C | o SUBROUTINE KPP_TRANSPORT_S
15 C | Add non local KPP transport term (ghat) to diffusive
16 C | salinity flux.
17 C *==========================================================*
18 C | The nonlocal transport term is nonzero only for scalars
19 C | in unstable (convective) forcing conditions.
20 C | Note: KPPdiffKzS(-,k) is defined at the top of grid cell
21 C | k while KPPghat(i,j,k,bi,bj) is defined at the
22 C | bottom of grid cell k.
23 C | For K=1, KPPdiffKzS(-,k) = 0 which insures no flux
24 C | through the surface.
25 C *==========================================================*
26 IMPLICIT NONE
27
28 C == GLobal variables ==
29 #include "SIZE.h"
30 #include "EEPARAMS.h"
31 #include "PARAMS.h"
32 #include "GRID.h"
33 #include "FFIELDS.h"
34 #include "KPP.h"
35 #include "KPP_PARAMS.h"
36 #ifdef ALLOW_GMREDI
37 # include "GMREDI.h"
38 #endif
39 #ifdef ALLOW_SALT_PLUME
40 # include "SALT_PLUME.h"
41 #endif
42
43 C == Routine arguments ==
44 C iMin,iMax,jMin, - Range of points for which calculation
45 C jMax,bi,bj,k,km1 results will be set.
46 C df - Diffusive flux component work array.
47 C myTime :: Current time in simulation
48 C myIter :: Current iteration number in simulation
49 C myThid :: My Thread Id. number
50 INTEGER iMin,iMax,jMin,jMax,bi,bj,k,km1
51 _RL df (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
52 _RL myTime
53 INTEGER myIter
54 INTEGER myThid
55
56 #if defined(ALLOW_KPP) && defined(KPP_GHAT)
57
58 C == Local variables ==
59 C I, J - Loop counters
60 INTEGER I, J
61 #ifdef ALLOW_GMREDI
62 _RL tmpFac
63 #endif
64 #ifdef ALLOW_SALT_PLUME
65 _RL tmpFac1
66 #endif
67
68 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
69
70 #ifdef ALLOW_SALT_PLUME
71 IF ( useSALT_PLUME ) THEN
72 tmpFac1 = 1. _d 0
73 ELSE
74 tmpFac1 = 0. _d 0
75 ENDIF
76 #endif /* ALLOW_SALT_PLUME */
77
78 #ifdef ALLOW_GMREDI
79
80 IF ( useGMRedi .AND. KPP_ghatUseTotalDiffus ) THEN
81 tmpFac = 1. _d 0
82 ELSE
83 tmpFac = 0. _d 0
84 ENDIF
85 DO j=jMin,jMax
86 DO i=iMin,iMax
87 df(i,j) = - _rA(i,j,bi,bj)
88 & *( KPPdiffKzS(i,j,k,bi,bj) + tmpFac*Kwz(i,j,k,bi,bj) )
89 & *KPPghat(i,j,km1,bi,bj)
90 & *( surfaceForcingS(i,j,bi,bj)
91 #ifdef ALLOW_SALT_PLUME
92 & + tmpFac1*saltPlumeFlux(i,j,bi,bj)*recip_rhoConst
93 & *(1.-KPPplumefrac(i,j,bi,bj))
94 #endif /* ALLOW_SALT_PLUME */
95 & )
96 ENDDO
97 ENDDO
98
99 #else /* ALLOW_GMREDI */
100
101 DO j=jMin,jMax
102 DO i=iMin,iMax
103 df(i,j) = - _rA(i,j,bi,bj)
104 & *KPPdiffKzS(i,j,k,bi,bj)
105 & *KPPghat(i,j,km1,bi,bj)
106 & *( surfaceForcingS(i,j,bi,bj)
107 #ifdef ALLOW_SALT_PLUME
108 & + tmpFac1*saltPlumeFlux(i,j,bi,bj)*recip_rhoConst
109 & *(1.-KPPplumefrac(i,j,bi,bj))
110 #endif /* ALLOW_SALT_PLUME */
111 & )
112 ENDDO
113 ENDDO
114
115 #endif /* ALLOW_GMREDI */
116
117 #endif /* ALLOW_KPP and KPP_GHAT */
118
119 RETURN
120 END

  ViewVC Help
Powered by ViewVC 1.1.22