/[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.5 - (show annotations) (download)
Mon Aug 18 12:22:46 2014 UTC (9 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65c, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65o, HEAD
Changes since 1.4: +10 -10 lines
- change Tracer argument (drop bi,bj indices) in S/R GAD_CALC_RHS,
  GAD_C2_ADV_R, GAD_U3_ADV_R, GAD_C4_ADV_R, GAD_DIFF_R, GAD_BIHARM_R
  + also in GMREDI_X/Y/RTRANSPORT ; and update corresponding calls in
  S/R temp/salt/ptracers_integrate.F

1 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/gad_c2_adv_r.F,v 1.4 2001/09/21 13:11:43 adcroft Exp $
2 C $Name: $
3
4 #include "GAD_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: GAD_C2_ADV_R
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE GAD_C2_ADV_R(
11 I bi, bj, k,
12 I rTrans,
13 I tracer,
14 O wT,
15 I myThid )
16
17 C !DESCRIPTION:
18 C Calculates the area integrated vertical flux due to advection of a tracer
19 C using centered second-order interpolation:
20 C \begin{equation*}
21 C F^r_{adv} = W \overline{\theta}^k
22 C \end{equation*}
23
24 C !USES: ===============================================================
25 IMPLICIT NONE
26 #include "SIZE.h"
27 #include "GRID.h"
28 #include "EEPARAMS.h"
29 #include "PARAMS.h"
30
31 C !INPUT PARAMETERS: ===================================================
32 C bi,bj :: tile indices
33 C k :: vertical level
34 C rTrans :: vertical volume transport
35 C tracer :: tracer field
36 C myThid :: thread number
37 INTEGER bi,bj,k
38 _RL rTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
39 _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
40 INTEGER myThid
41
42 C !OUTPUT PARAMETERS: ==================================================
43 C wT :: vertical advective flux
44 _RL wT (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
45
46 C !LOCAL VARIABLES: ====================================================
47 C i,j :: loop indices
48 C km1 :: =k+1 for k<Nr, =Nr for k>=Nr
49 INTEGER i,j,km1
50 CEOP
51
52 km1=max(1,k-1)
53
54 IF ( k.EQ.1 .OR. k.GT.Nr) THEN
55 DO j=1-OLy,sNy+OLy
56 DO i=1-OLx,sNx+OLx
57 wT(i,j) = 0.
58 ENDDO
59 ENDDO
60 ELSE
61 DO j=1-OLy,sNy+OLy
62 DO i=1-OLx,sNx+OLx
63 wT(i,j) = maskC(i,j,km1,bi,bj)*
64 & rTrans(i,j)*
65 & (tracer(i,j,k)+tracer(i,j,km1))*0.5 _d 0
66 ENDDO
67 ENDDO
68 ENDIF
69
70 RETURN
71 END

  ViewVC Help
Powered by ViewVC 1.1.22