/[MITgcm]/MITgcm/pkg/generic_advdiff/gad_c2_adv_y.F
ViewVC logotype

Contents of /MITgcm/pkg/generic_advdiff/gad_c2_adv_y.F

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


Revision 1.2 - (show annotations) (download)
Thu Sep 20 20:07:06 2001 UTC (22 years, 8 months ago) by adcroft
Branch: MAIN
Changes since 1.1: +28 -7 lines
Added comments in form compatible with "protex".

1 C $Header: /u/gcmpack/models/MITgcmUV/pkg/generic_advdiff/gad_c2_adv_y.F,v 1.1 2001/05/30 19:34:48 adcroft Exp $
2 C $Name: $
3
4 #include "GAD_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: GAD_C2_ADV_Y
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE GAD_C2_ADV_Y(
11 I bi,bj,k,
12 I vTrans,
13 I tracer,
14 O vT,
15 I myThid )
16
17 C !DESCRIPTION:
18 C Calculates the meridional flux due to advection of a tracer using
19 C centered second-order interpolation:
20 C \begin{equation*}
21 C F^y_{adv} = v \theta
22 C \end{equation*}
23
24 C !USES: ===============================================================
25 IMPLICIT NONE
26 #include "SIZE.h"
27 #include "GRID.h"
28
29 C !INPUT PARAMETERS: ===================================================
30 C bi,bj :: tile indices
31 C k :: vertical level
32 C vTrans :: meridional volume transport
33 C tracer :: tracer field
34 C myThid :: thread number
35 INTEGER bi,bj,k
36 _RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
37 _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
38 INTEGER myThid
39
40 C !OUTPUT PARAMETERS: ==================================================
41 C vT :: meridional advective flux
42 _RL vT (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43
44 C !LOCAL VARIABLES: ====================================================
45 C i,j :: loop indices
46 INTEGER i,j
47 CEOP
48
49 DO i=1-Olx,sNx+Olx
50 vT(i,1-Oly)=0.
51 ENDDO
52 DO j=1-Oly+1,sNy+Oly
53 DO i=1-Olx,sNx+Olx
54 vT(i,j) =
55 & vTrans(i,j)*(Tracer(i,j)+Tracer(i,j-1))*0.5 _d 0
56 ENDDO
57 ENDDO
58
59 RETURN
60 END

  ViewVC Help
Powered by ViewVC 1.1.22