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

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

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


Revision 1.5 - (show annotations) (download)
Wed Jun 22 00:25:32 2005 UTC (18 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint57m_post, checkpoint62u, checkpoint62t, checkpoint57s_post, checkpoint58b_post, checkpoint57y_post, checkpoint62c, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint58f_post, checkpoint57n_post, checkpoint58d_post, checkpoint62s, checkpoint58a_post, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint57z_post, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint58t_post, checkpoint58m_post, checkpoint57l_post, checkpoint57t_post, checkpoint63g, checkpoint57v_post, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint58w_post, checkpoint57y_pre, checkpoint58o_post, checkpoint58p_post, checkpoint58q_post, checkpoint58e_post, mitgcm_mapl_00, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint58r_post, checkpoint58n_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, checkpoint58k_post, checkpoint62b, checkpoint58v_post, checkpoint58l_post, checkpoint57j_post, checkpoint61f, checkpoint58g_post, checkpoint58x_post, checkpoint61n, checkpoint59j, checkpoint58h_post, checkpoint58j_post, checkpoint57o_post, checkpoint61q, checkpoint57k_post, checkpoint57w_post, checkpoint61e, checkpoint58i_post, checkpoint57x_post, checkpoint58c_post, checkpoint58u_post, checkpoint58s_post, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.4: +2 -2 lines
"rkSign" replaces "-rkFac" (<- removed)

1 C $Header: /u/gcmpack/MITgcm/model/src/convective_weights.F,v 1.4 2003/10/15 22:55:01 jmc Exp $
2 C $Name: $
3
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 C !USES:
26 IMPLICIT NONE
27 #include "SIZE.h"
28 #include "EEPARAMS.h"
29 #include "PARAMS.h"
30 #include "GRID.h"
31
32 C !INPUT/OUTPUT PARAMETERS:
33 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 C !LOCAL VARIABLES:
51 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)-rhok(i,j))*rkSign*gravitySign .GT. 0.
62 & ) THEN
63
64 C Where statically unstable, mix the tracers conserving volume
65 d1 = _hFacC(i,j,k-1,bi,bj)*drF(k-1)
66 d2 = _hFacC(i,j, k ,bi,bj)*drF( k )
67 dS = d1+d2
68 weightA(i,j) = d2/dS
69 weightB(i,j) = d1/dS
70 ConvectCount(i,j,k) = ConvectCount(i,j,k) + 1.
71 ELSE
72 C Where statically stable, do nothing
73 weightA(i,j) = 0.
74 weightB(i,j) = 0.
75 ENDIF
76 ENDDO
77 ENDDO
78
79 #endif /* INCLUDE_CONVECT_CALL */
80
81 RETURN
82 END

  ViewVC Help
Powered by ViewVC 1.1.22