1 |
adcroft |
1.1 |
C $Header: $ |
2 |
|
|
|
3 |
|
|
#include "KPP_OPTIONS.h" |
4 |
|
|
|
5 |
|
|
subroutine KPP_TRANSPORT_S ( |
6 |
|
|
I iMin,iMax,jMin,jMax,bi,bj,k,km1, |
7 |
|
|
I maskC,KappaRS, |
8 |
|
|
U df ) |
9 |
|
|
C /==========================================================\ |
10 |
|
|
C | o SUBROUTINE KPP_TRANSPORT_S | |
11 |
|
|
C | Add non local KPP transport term (ghat) to diffusive | |
12 |
|
|
C | salinity flux. | |
13 |
|
|
C |==========================================================| |
14 |
|
|
C | The nonlocal transport term is nonzero only for scalars | |
15 |
|
|
C | in unstable (convective) forcing conditions. | |
16 |
|
|
C | Note: KappaRS(i,j,k) is defined at the top of grid cell | |
17 |
|
|
C | k while KPPghat(i,j,k,bi,bj) is defined at the | |
18 |
|
|
C | bottom of grid cell k. | |
19 |
|
|
C | For K=1, KappaRS(i,j,k) = 0 which insures no flux | |
20 |
|
|
C | through the surface. | |
21 |
|
|
C \==========================================================/ |
22 |
|
|
IMPLICIT NONE |
23 |
|
|
|
24 |
|
|
C == GLobal variables == |
25 |
|
|
#include "SIZE.h" |
26 |
|
|
#include "DYNVARS.h" |
27 |
|
|
#include "EEPARAMS.h" |
28 |
|
|
#include "PARAMS.h" |
29 |
|
|
#include "GRID.h" |
30 |
|
|
#include "FFIELDS.h" |
31 |
|
|
#include "KPP.h" |
32 |
|
|
#include "KPP_PARAMS.h" |
33 |
|
|
|
34 |
|
|
C == Routine arguments == |
35 |
|
|
C iMin,iMax,jMin, - Range of points for which calculation |
36 |
|
|
C jMax,bi,bj,k,km1 results will be set. |
37 |
|
|
C maskC - Land mask for salt cells. |
38 |
|
|
C KappaRS - Total diffusion in vertical for S. |
39 |
|
|
C df - Diffusive flux component work array. |
40 |
|
|
INTEGER iMin,iMax,jMin,jMax,bi,bj,k,km1 |
41 |
|
|
_RS maskC (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
42 |
|
|
_RL KappaRS(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
43 |
|
|
_RL df (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
44 |
|
|
|
45 |
|
|
#ifdef ALLOW_KPP |
46 |
|
|
|
47 |
|
|
C == Local variables == |
48 |
|
|
C I, J - Loop counters |
49 |
|
|
INTEGER I, J |
50 |
|
|
|
51 |
|
|
IF (use_KPPmixing) THEN |
52 |
|
|
|
53 |
|
|
DO j=jMin,jMax |
54 |
|
|
DO i=iMin,iMax |
55 |
|
|
df(i,j) = df(i,j) - _rA(i,j,bi,bj) * maskC(i,j) * |
56 |
|
|
& KappaRS(i,j,k) * KPPghat(i,j,km1,bi,bj) * delZ(1) * |
57 |
|
|
& EmPmR(i,j,bi,bj) |
58 |
|
|
ENDDO |
59 |
|
|
ENDDO |
60 |
|
|
ENDIF |
61 |
|
|
|
62 |
|
|
#endif /* ALLOW_KPP */ |
63 |
|
|
|
64 |
|
|
RETURN |
65 |
|
|
END |