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

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

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


Revision 1.2 - (hide annotations) (download)
Tue Feb 26 20:34:14 2002 UTC (22 years, 3 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint44f_post, checkpoint46b_post, checkpoint45d_post, checkpoint44h_pre, checkpoint46a_post, checkpoint45a_post, checkpoint44e_post, checkpoint44g_post, checkpoint45b_post, checkpoint46b_pre, checkpoint46c_pre, checkpoint46, checkpoint46a_pre, checkpoint45c_post, checkpoint44h_post, checkpoint45, checkpoint44f_pre
Changes since 1.1: +5 -8 lines
Tidied up protex preamble promments.

1 adcroft 1.2 C $Header: /u/gcmpack/models/MITgcmUV/model/src/convective_weights.F,v 1.1 2002/02/26 19:50:12 adcroft Exp $
2     C $Name: $
3 adcroft 1.1
4     #include "CPP_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: CONVECTIVE_WEIGHTS
8     C !INTERFACE:
9     SUBROUTINE CONVECTIVE_WEIGHTS(
10     I bi,bj,k,rhoKm1,rhoK,
11     O weightA,weightB,ConvectCount,
12     I myThid)
13     C !DESCRIPTION:
14     C Calculates the weights used to represent convective mixing
15     C between two layers.
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     C
21     C In the stable case, A = B = 0
22     C In the unstable case, A and B are non-zero and are chosen so as to
23     C conserve total volume of T.
24    
25 adcroft 1.2 C !USES:
26 adcroft 1.1 IMPLICIT NONE
27     #include "SIZE.h"
28     #include "EEPARAMS.h"
29     #include "PARAMS.h"
30     #include "GRID.h"
31    
32 adcroft 1.2 C !INPUT/OUTPUT PARAMETERS:
33 adcroft 1.1 C bi,bj,k - indices
34     C rhoKm1 - rho in layer above
35     C rhoK - rho in layer below
36     C weightA - weight for level K
37     C weightB - weight for level K+1
38     C ConvectCount - counter to diagnose where convection occurs
39     C myThid - thread number
40     INTEGER bi,bj,k
41     _RL rhoKm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
42     _RL rhoK(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43     _RL weightA(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
44     _RL weightB(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
45     _RL ConvectCount(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
46     INTEGER myThid
47    
48     #ifdef INCLUDE_CONVECT_CALL
49    
50 adcroft 1.2 C !LOCAL VARIABLES:
51 adcroft 1.1 C i,j :: Loop counter
52     C dS,d1,d2 :: Layer thicknesses
53     INTEGER i,j
54     _RL dS,d1,d2
55     CEOP
56    
57     DO j=1-Oly,sNy+Oly
58     DO i=1-Olx,sNx+Olx
59     IF ( _hFacC(i,j,k-1,bi,bj)
60     & *_hFacC(i,j,k,bi,bj) .GT. 0.
61     & .AND. rhokm1(i,j) .GT. rhok(i,j) ) THEN
62    
63     C Where statically unstable, mix the tracers conserving volume
64     d1 = _hFacC(i,j,k-1,bi,bj)*drF(k-1)
65     d2 = _hFacC(i,j, k ,bi,bj)*drF( k )
66     dS = d1+d2
67     weightA(i,j) = d2/dS
68     weightB(i,j) = d1/dS
69     ConvectCount(i,j,k) = ConvectCount(i,j,k) + 1.
70     ELSE
71     C Where statically stable, do nothing
72     weightA(i,j) = 0.
73     weightB(i,j) = 0.
74     ENDIF
75     ENDDO
76     ENDDO
77    
78     #endif /* INCLUDE_CONVECT_CALL */
79    
80     RETURN
81     END

  ViewVC Help
Powered by ViewVC 1.1.22