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

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

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


Revision 1.2 - (show annotations) (download)
Thu Jul 12 00:30:27 2001 UTC (22 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint40pre3, checkpoint40pre7, checkpoint40pre6, checkpoint40pre9, checkpoint40pre8, checkpoint40pre2, checkpoint40pre4, checkpoint40pre5, checkpoint40
Changes since 1.1: +10 -16 lines
no longer compute "surface" correction term (done elsewhere)
 fix problem with mask in vertical advection

1 C $Header: /u/gcmpack/models/MITgcmUV/pkg/generic_advdiff/gad_c2_adv_r.F,v 1.1 2001/05/30 19:34:48 adcroft Exp $
2 C $Name: $
3
4 #include "GAD_OPTIONS.h"
5
6 SUBROUTINE GAD_C2_ADV_R(
7 I bi,bj,k,
8 I rTrans,
9 I tracer,
10 O wT,
11 I myThid )
12 C /==========================================================\
13 C | SUBROUTINE GAD_C2_ADV_R |
14 C | o Compute vertical advective Flux of Tracer using |
15 C | 2nd Order Centered Scheme |
16 C |==========================================================|
17 IMPLICIT NONE
18
19 C == GLobal variables ==
20 #include "SIZE.h"
21 #include "GRID.h"
22 #include "EEPARAMS.h"
23 #include "PARAMS.h"
24
25 C == Routine arguments ==
26 INTEGER bi,bj,k
27 _RL rTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
28 _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
29 _RL wT (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
30 INTEGER myThid
31
32 C == Local variables ==
33 INTEGER i,j,km1
34
35 km1=max(1,k-1)
36
37 IF ( k.EQ.1 .OR. k.GT.Nr) THEN
38 DO j=1-Oly,sNy+Oly
39 DO i=1-Olx,sNx+Olx
40 wT(i,j) = 0.
41 ENDDO
42 ENDDO
43 ELSE
44 DO j=1-Oly,sNy+Oly
45 DO i=1-Olx,sNx+Olx
46 wT(i,j) = maskC(i,j,kM1,bi,bj)*
47 & rTrans(i,j)*
48 & (Tracer(i,j,k,bi,bj)+Tracer(i,j,kM1,bi,bj))*0.5 _d 0
49 ENDDO
50 ENDDO
51 ENDIF
52
53 RETURN
54 END

  ViewVC Help
Powered by ViewVC 1.1.22