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

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

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


Revision 1.15 - (hide 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 atn 1.15 C $Header: /u/gcmpack/MITgcm/pkg/kpp/kpp_transport_s.F,v 1.14 2007/12/18 09:05:59 dimitri Exp $
2 adcroft 1.7 C $Name: $
3 adcroft 1.1
4     #include "KPP_OPTIONS.h"
5 jmc 1.11 #ifdef ALLOW_GMREDI
6     #include "GMREDI_OPTIONS.h"
7     #endif
8 adcroft 1.1
9     subroutine KPP_TRANSPORT_S (
10     I iMin,iMax,jMin,jMax,bi,bj,k,km1,
11 jmc 1.12 O df,
12     I myTime, myIter, myThid )
13 adcroft 1.1 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 jmc 1.11 C | Note: KPPdiffKzS(-,k) is defined at the top of grid cell |
21 adcroft 1.1 C | k while KPPghat(i,j,k,bi,bj) is defined at the |
22     C | bottom of grid cell k. |
23 jmc 1.11 C | For K=1, KPPdiffKzS(-,k) = 0 which insures no flux |
24 adcroft 1.1 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 jmc 1.11 #ifdef ALLOW_GMREDI
37 dimitri 1.14 # include "GMREDI.h"
38     #endif
39     #ifdef ALLOW_SALT_PLUME
40     # include "SALT_PLUME.h"
41 jmc 1.11 #endif
42 adcroft 1.1
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 jmc 1.12 C myTime :: Current time in simulation
48     C myIter :: Current iteration number in simulation
49     C myThid :: My Thread Id. number
50 adcroft 1.1 INTEGER iMin,iMax,jMin,jMax,bi,bj,k,km1
51     _RL df (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
52 jmc 1.12 _RL myTime
53     INTEGER myIter
54     INTEGER myThid
55 adcroft 1.1
56 heimbach 1.2 #if defined(ALLOW_KPP) && defined(KPP_GHAT)
57 adcroft 1.1
58     C == Local variables ==
59     C I, J - Loop counters
60     INTEGER I, J
61 atn 1.15 _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 adcroft 1.1
72 jmc 1.11 #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 heimbach 1.2 DO j=jMin,jMax
80     DO i=iMin,iMax
81 jmc 1.11 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 dimitri 1.13 & *( surfaceForcingS(i,j,bi,bj)
85     #ifdef ALLOW_SALT_PLUME
86 atn 1.15 & + tmpFac1*saltPlumeFlux(i,j,bi,bj)*recip_rhoConst
87 dimitri 1.13 & *(1.-KPPplumefrac(i,j,bi,bj))
88     #endif /* ALLOW_SALT_PLUME */
89     & )
90 adcroft 1.1 ENDDO
91 heimbach 1.2 ENDDO
92 adcroft 1.1
93 jmc 1.11 #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 dimitri 1.13 & *( surfaceForcingS(i,j,bi,bj)
101     #ifdef ALLOW_SALT_PLUME
102 atn 1.15 & + tmpFac1*saltPlumeFlux(i,j,bi,bj)*recip_rhoConst
103 dimitri 1.13 & *(1.-KPPplumefrac(i,j,bi,bj))
104     #endif /* ALLOW_SALT_PLUME */
105     & )
106 jmc 1.11 ENDDO
107     ENDDO
108    
109     #endif /* ALLOW_GMREDI */
110    
111    
112 heimbach 1.2 #endif /* ALLOW_KPP and KPP_GHAT */
113 adcroft 1.1
114     RETURN
115     END

  ViewVC Help
Powered by ViewVC 1.1.22