/[MITgcm]/MITgcm/model/src/convectively_mixtracer.F
ViewVC logotype

Contents of /MITgcm/model/src/convectively_mixtracer.F

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


Revision 1.2.4.1 - (show annotations) (download)
Fri Mar 7 23:10:20 2003 UTC (21 years, 2 months ago) by heimbach
Branch: ecco-branch
CVS Tags: ecco_c50_e32, ecco_c50_e33, ecco_c50_e30, ecco_c50_e31, ecco_c50_e29, ecco_c50_e28, ecco_c50_e33a
Changes since 1.2: +1 -1 lines
merging c49 and e27

1 C $Header: /u/gcmpack/MITgcm/model/src/convectively_mixtracer.F,v 1.2 2002/02/26 20:34:14 adcroft Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: CONVECTIVELY_MIXTRACER
8 C !INTERFACE:
9 SUBROUTINE CONVECTIVELY_MIXTRACER(
10 I bi,bj,k,weightA,weightB,
11 U Tracer,
12 I myThid)
13 C !DESCRIPTION:
14 C Mixes a tracer over two layers according to the weights pre-calculated
15 C as a function of stability.
16 C
17 C Mixing is represented by:
18 C T(k-1) = T(k-1) + B * ( T(k) - T(k-1) )
19 C T(k) = T(k) + A * ( T(k-1) - T(k) )
20
21 C !USES:
22 IMPLICIT NONE
23 #include "SIZE.h"
24 #include "EEPARAMS.h"
25
26 C !INPUT/OUTPUT PARAMETERS:
27 C bi,bj,k - indices
28 C weightA - weight for level K
29 C weightB - weight for level K+1
30 C myThid - thread number
31 INTEGER bi,bj,k
32 _RL weightA(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
33 _RL weightB(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
34 _RL Tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
35 INTEGER myThid
36
37 #ifdef INCLUDE_CONVECT_CALL
38
39 C !LOCAL VARIABLES:
40 C i,j :: Loop counter
41 C delTrac :: Difference between tracer in each layer
42 INTEGER i,j
43 _RL delTrac
44 CEOP
45
46 DO j=1-Oly,sNy+Oly
47 DO i=1-Olx,sNx+Olx
48
49 delTrac=Tracer(i,j,k,bi,bj)-Tracer(i,j,k-1,bi,bj)
50 Tracer(i,j,k-1,bi,bj)=Tracer(i,j,k-1,bi,bj)
51 & +weightA(i,j)*delTrac
52 Tracer(i,j,k,bi,bj)=Tracer(i,j,k,bi,bj)
53 & -weightB(i,j)*delTrac
54
55 ENDDO
56 ENDDO
57
58 #endif /* INCLUDE_CONVECT_CALL */
59
60 RETURN
61 END

  ViewVC Help
Powered by ViewVC 1.1.22