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

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

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


Revision 1.2.4.2 - (hide annotations) (download)
Tue Jun 24 23:05:28 2003 UTC (20 years, 10 months ago) by heimbach
Branch: ecco-branch
CVS Tags: ecco_c51_e34d, ecco_c51_e34e, ecco_c51_e34f, ecco_c51_e34g, ecco_c51_e34a, ecco_c51_e34b, ecco_c51_e34c, ecco_c51_e34
Changes since 1.2.4.1: +0 -0 lines
Merging from c51

1 heimbach 1.2.4.1 C $Header: /u/gcmpack/MITgcm/model/src/convectively_mixtracer.F,v 1.2 2002/02/26 20:34:14 adcroft Exp $
2 adcroft 1.2 C $Name: $
3 adcroft 1.1
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 adcroft 1.2 C !USES:
22 adcroft 1.1 IMPLICIT NONE
23     #include "SIZE.h"
24     #include "EEPARAMS.h"
25    
26 adcroft 1.2 C !INPUT/OUTPUT PARAMETERS:
27 adcroft 1.1 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 adcroft 1.2 C !LOCAL VARIABLES:
40 adcroft 1.1 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