1 |
adcroft |
1.2 |
C $Header: /u/gcmpack/models/MITgcmUV/pkg/generic_advdiff/gad_diff_y.F,v 1.1 2001/05/30 19:34:48 adcroft Exp $ |
2 |
|
|
C $Name: $ |
3 |
adcroft |
1.1 |
|
4 |
|
|
#include "GAD_OPTIONS.h" |
5 |
|
|
|
6 |
adcroft |
1.2 |
CBOP |
7 |
|
|
C !ROUTINE: GAD_DIFF_Y |
8 |
|
|
|
9 |
|
|
C !INTERFACE: ========================================================== |
10 |
adcroft |
1.1 |
SUBROUTINE GAD_DIFF_Y( |
11 |
|
|
I bi,bj,k, |
12 |
|
|
I yA, diffKh, |
13 |
|
|
I tracer, |
14 |
|
|
O dfy, |
15 |
|
|
I myThid ) |
16 |
adcroft |
1.2 |
|
17 |
|
|
C !DESCRIPTION: |
18 |
|
|
C Calculates the meridional flux due to down-gradient diffusion of a tracer: |
19 |
|
|
C \begin{equation*} |
20 |
|
|
C F^y_{diff} = - \kappa_h \partial_y \theta |
21 |
|
|
C \end{equation*} |
22 |
|
|
|
23 |
|
|
C !USES: =============================================================== |
24 |
adcroft |
1.1 |
IMPLICIT NONE |
25 |
|
|
#include "SIZE.h" |
26 |
|
|
#include "GRID.h" |
27 |
|
|
|
28 |
adcroft |
1.2 |
C !INPUT PARAMETERS: =================================================== |
29 |
|
|
C bi,bj :: tile indices |
30 |
|
|
C k :: vertical level |
31 |
|
|
C yA :: area of face at V points |
32 |
|
|
C diffKh :: horizontal diffusivity |
33 |
|
|
C tracer :: tracer field |
34 |
|
|
C myThid :: thread number |
35 |
adcroft |
1.1 |
INTEGER bi,bj,k |
36 |
|
|
_RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
37 |
|
|
_RL diffKh |
38 |
|
|
_RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
39 |
adcroft |
1.2 |
INTEGER myThid |
40 |
|
|
|
41 |
|
|
C !OUTPUT PARAMETERS: ================================================== |
42 |
|
|
C dfx :: meridional diffusive flux |
43 |
adcroft |
1.1 |
_RL dfy (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
44 |
|
|
|
45 |
adcroft |
1.2 |
C !LOCAL VARIABLES: ==================================================== |
46 |
|
|
C i,j :: loop indices |
47 |
adcroft |
1.1 |
INTEGER i,j |
48 |
adcroft |
1.2 |
CEOP |
49 |
adcroft |
1.1 |
|
50 |
|
|
DO i=1-Olx,sNx+Olx |
51 |
|
|
dfy(i,1-Oly)=0. |
52 |
|
|
ENDDO |
53 |
|
|
DO j=1-Oly+1,sNy+Oly |
54 |
|
|
DO i=1-Olx,sNx+Olx |
55 |
|
|
dfy(i,j) = -diffKh*yA(i,j) |
56 |
|
|
& *_recip_dyC(i,j,bi,bj) |
57 |
|
|
& *(Tracer(i,j)-Tracer(i,j-1)) |
58 |
|
|
#ifdef ISOTROPIC_COS_SCALING |
59 |
|
|
& *CosFacV(j,bi,bj) |
60 |
|
|
#endif |
61 |
|
|
ENDDO |
62 |
|
|
ENDDO |
63 |
|
|
|
64 |
|
|
RETURN |
65 |
|
|
END |