/[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.15 - (show annotations) (download)
Fri Dec 21 02:54:34 2007 UTC (16 years, 5 months ago) by atn
Branch: MAIN
CVS Tags: checkpoint62a, checkpoint60, checkpoint61, checkpoint62, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59o, checkpoint59n, checkpoint61f, checkpoint61n, checkpoint61q, checkpoint61e, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.14: +13 -4 lines
o pkg/kpp: added saltplume diagnostics

1 C $Header: /u/gcmpack/MITgcm/pkg/kpp/kpp_transport_s.F,v 1.14 2007/12/18 09:05:59 dimitri 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 _RL tmpFac, tmpFac1
62
63
64 #ifdef ALLOW_SALT_PLUME
65 IF ( useSALT_PLUME ) THEN
66 tmpFac1 = 1. _d 0
67 ELSE
68 tmpFac1 = 0. _d 0
69 ENDIF
70 #endif /* ALLOW_SALT_PLUME */
71
72 #ifdef ALLOW_GMREDI
73
74 IF ( useGMRedi .AND. KPP_ghatUseTotalDiffus ) THEN
75 tmpFac = 1. _d 0
76 ELSE
77 tmpFac = 0. _d 0
78 ENDIF
79 DO j=jMin,jMax
80 DO i=iMin,iMax
81 df(i,j) = - _rA(i,j,bi,bj)
82 & *( KPPdiffKzS(i,j,k,bi,bj) + tmpFac*Kwz(i,j,k,bi,bj) )
83 & *KPPghat(i,j,km1,bi,bj)
84 & *( surfaceForcingS(i,j,bi,bj)
85 #ifdef ALLOW_SALT_PLUME
86 & + tmpFac1*saltPlumeFlux(i,j,bi,bj)*recip_rhoConst
87 & *(1.-KPPplumefrac(i,j,bi,bj))
88 #endif /* ALLOW_SALT_PLUME */
89 & )
90 ENDDO
91 ENDDO
92
93 #else /* ALLOW_GMREDI */
94
95 DO j=jMin,jMax
96 DO i=iMin,iMax
97 df(i,j) = - _rA(i,j,bi,bj)
98 & *KPPdiffKzS(i,j,k,bi,bj)
99 & *KPPghat(i,j,km1,bi,bj)
100 & *( surfaceForcingS(i,j,bi,bj)
101 #ifdef ALLOW_SALT_PLUME
102 & + tmpFac1*saltPlumeFlux(i,j,bi,bj)*recip_rhoConst
103 & *(1.-KPPplumefrac(i,j,bi,bj))
104 #endif /* ALLOW_SALT_PLUME */
105 & )
106 ENDDO
107 ENDDO
108
109 #endif /* ALLOW_GMREDI */
110
111
112 #endif /* ALLOW_KPP and KPP_GHAT */
113
114 RETURN
115 END

  ViewVC Help
Powered by ViewVC 1.1.22