1 |
C $Header: /u/ralf/cvs/ecco_env/pkg/gmredi/gmredi_ytransport.F,v 1.3 2000/11/14 17:21:41 heimbach Exp $ |
2 |
|
3 |
#include "GMREDI_OPTIONS.h" |
4 |
|
5 |
subroutine GMREDI_YTRANSPORT( |
6 |
I iMin,iMax,jMin,jMax,bi,bj,K, |
7 |
I yA,Tracer, |
8 |
U df, |
9 |
I myThid) |
10 |
C /==========================================================\ |
11 |
C | o SUBROUTINE GMREDI_YTRANSPORT | |
12 |
C | Add horizontal y transport terms from GM/Redi | |
13 |
C | parameterization. | |
14 |
C |==========================================================| |
15 |
C \==========================================================/ |
16 |
IMPLICIT NONE |
17 |
|
18 |
C == GLobal variables == |
19 |
#include "SIZE.h" |
20 |
#include "EEPARAMS.h" |
21 |
#include "PARAMS.h" |
22 |
#include "GRID.h" |
23 |
#include "GMREDI.h" |
24 |
|
25 |
C == Routine arguments == |
26 |
C iMin,iMax,jMin, - Range of points for which calculation |
27 |
C jMax,bi,bj,k results will be set. |
28 |
C xA - Area of X face |
29 |
C Tracer - 3D Tracer field |
30 |
C df - Diffusive flux component work array. |
31 |
INTEGER iMin,iMax,jMin,jMax,bi,bj,k |
32 |
_RS yA(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
33 |
_RL Tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
34 |
_RL df (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
35 |
INTEGER myThid |
36 |
|
37 |
#ifdef ALLOW_GMREDI |
38 |
|
39 |
C == Local variables == |
40 |
C I, J - Loop counters |
41 |
INTEGER I, J |
42 |
|
43 |
IF (useGMRedi) THEN |
44 |
|
45 |
C-- Area integrated meridional flux |
46 |
DO j=jMin,jMax |
47 |
DO i=iMin,iMax |
48 |
df(i,j) = df(i,j) |
49 |
& -yA(i,j) |
50 |
& *(GM_background_K |
51 |
#ifdef GM_VISBECK_VARIABLE_K |
52 |
& +0.5*(VisbeckK(i,j,bi,bj)+VisbeckK(i,j-1,bi,bj)) |
53 |
#endif |
54 |
& ) |
55 |
#ifdef GM_NON_UNITY_DIAGONAL |
56 |
& *Kvy(i,j,k,bi,bj) |
57 |
#endif |
58 |
& *_recip_dyC(i,j,bi,bj) |
59 |
& *(Tracer(i,j,k,bi,bj)-Tracer(i,j-1,k,bi,bj)) |
60 |
ENDDO |
61 |
ENDDO |
62 |
|
63 |
ENDIF |
64 |
#endif /* ALLOW_GMREDI */ |
65 |
|
66 |
RETURN |
67 |
END |