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