/[MITgcm]/MITgcm/pkg/aim_v23/phy_vdifsc.F
ViewVC logotype

Contents of /MITgcm/pkg/aim_v23/phy_vdifsc.F

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


Revision 1.1 - (show annotations) (download)
Fri Nov 22 17:17:03 2002 UTC (21 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint47e_post, checkpoint57m_post, checkpoint52l_pre, hrcube4, hrcube5, checkpoint57g_pre, checkpoint50c_post, checkpoint57s_post, checkpoint58b_post, checkpoint57b_post, checkpoint52d_pre, checkpoint57g_post, checkpoint48e_post, checkpoint56b_post, checkpoint50c_pre, checkpoint57y_post, checkpoint52j_pre, checkpoint51o_pre, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint54d_post, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint54e_post, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62c, checkpoint51l_post, checkpoint48i_post, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint50d_pre, checkpoint52k_post, checkpoint59, checkpoint58, checkpoint55, checkpoint54, checkpoint57, checkpoint56, checkpoint51, checkpoint50, checkpoint53, checkpoint52, checkpoint50d_post, checkpoint58f_post, checkpoint52f_post, checkpoint57n_post, checkpoint58d_post, checkpoint58a_post, checkpoint50b_pre, checkpoint57z_post, checkpoint54f_post, checkpoint51f_post, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint48b_post, checkpoint51d_post, checkpoint48c_pre, checkpoint47d_pre, checkpoint51t_post, checkpoint58t_post, checkpoint51n_post, checkpoint55i_post, checkpoint58m_post, checkpoint57l_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint47a_post, checkpoint57t_post, checkpoint55c_post, checkpoint48d_pre, checkpoint51j_post, checkpoint47i_post, checkpoint52e_pre, checkpoint57v_post, checkpoint57f_post, checkpoint52e_post, checkpoint51n_pre, checkpoint47d_post, checkpoint53d_post, checkpoint64, checkpoint65, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint57a_post, checkpoint48d_post, checkpoint57h_pre, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint48f_post, checkpoint52b_pre, checkpoint54b_post, checkpoint58w_post, checkpoint57h_post, checkpoint51l_pre, checkpoint52m_post, checkpoint57y_pre, checkpoint55g_post, checkpoint48h_post, checkpoint51q_post, checkpoint51b_pre, checkpoint47g_post, checkpoint52b_post, checkpoint52c_post, checkpoint51h_pre, checkpoint58o_post, checkpoint48a_post, checkpoint57c_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint58p_post, checkpoint58q_post, checkpoint52f_pre, checkpoint55d_post, checkpoint58e_post, checkpoint47j_post, checkpoint54a_pre, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint53c_post, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint55d_pre, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, branch-exfmods-tag, branchpoint-genmake2, checkpoint54a_post, checkpoint55h_post, checkpoint58n_post, checkpoint51r_post, checkpoint48c_post, checkpoint51i_post, checkpoint57e_post, checkpoint55b_post, checkpoint51b_post, checkpoint51c_post, checkpoint53a_post, checkpoint65o, checkpoint47b_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint52d_post, checkpoint53g_post, checkpoint57p_post, checkpint57u_post, checkpoint50g_post, checkpoint57q_post, eckpoint57e_pre, checkpoint58k_post, checkpoint52a_pre, checkpoint62b, checkpoint58v_post, checkpoint50h_post, checkpoint52i_post, checkpoint50e_pre, checkpoint50i_post, checkpoint51i_pre, checkpoint52h_pre, checkpoint56a_post, checkpoint64y, checkpoint64x, checkpoint58l_post, checkpoint64z, checkpoint53f_post, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint57h_done, checkpoint52j_post, checkpoint47f_post, checkpoint50e_post, checkpoint57j_post, checkpoint57f_pre, checkpoint61f, checkpoint58g_post, branch-netcdf, checkpoint52l_post, checkpoint58x_post, checkpoint61n, checkpoint52n_post, checkpoint53b_pre, checkpoint58h_post, checkpoint56c_post, checkpoint58j_post, checkpoint51e_post, checkpoint57a_pre, checkpoint55a_post, checkpoint48, checkpoint49, checkpoint57o_post, checkpoint51o_post, checkpoint61q, checkpoint57k_post, checkpoint51f_pre, checkpoint61z, checkpoint53b_post, checkpoint47h_post, checkpoint52a_post, checkpoint57w_post, checkpoint61e, checkpoint58i_post, checkpoint51g_post, ecco_c52_e35, checkpoint57x_post, checkpoint50b_post, checkpoint58c_post, checkpoint58u_post, checkpoint51m_post, checkpoint53d_pre, checkpoint58s_post, checkpoint55e_post, checkpoint61g, checkpoint61d, checkpoint54c_post, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint51a_post, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint51p_post, checkpoint48g_post, checkpoint61x, checkpoint61y, checkpoint51u_post, HEAD
Branch point for: branch-exfmods-curt, branch-genmake2, branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
new aim pkg: adapted from Franco Molteni SPEEDY code, ver23

1 C $Header: $
2 C $Name: $
3
4 #include "AIM_OPTIONS.h"
5
6 SUBROUTINE VDIFSC (dpFac,SE,RH,QA,QSAT,
7 O TTENVD,QTENVD,
8 I kGrd,bi,bj,myThid)
9 C--
10 C-- SUBROUTINE VDIFSC (UA,VA,SE,RH,QA,QSAT,PHI,
11 C-- & UTENVD,VTENVD,TTENVD,QTENVD)
12 C--
13 C-- Purpose: Compute tendencies of momentum, energy and moisture
14 C-- due to vertical diffusion and shallow convection
15 C-- Input: UA = u-wind (3-dim)
16 C-- VA = v-wind (3-dim)
17 C dpFac = cell delta_P fraction (3-dim)
18 C-- SE = dry static energy (3-dim)
19 C-- RH = relative humidity [0-1] (3-dim)
20 C-- QA = specific humidity [g/kg] (3-dim)
21 C-- QSAT = saturation sp. humidity [g/kg] (3-dim)
22 C-- PHI = geopotential (3-dim)
23 C-- Output: UTENVD = u-wind tendency (3-dim)
24 C-- VTENVD = v-wind tendency (3-dim)
25 C-- TTENVD = temperature tendency (3-dim)
26 C-- QTENVD = sp. humidity tendency [g/(kg s)] (3-dim)
27 C Input: kGrd = Ground level index (2-dim)
28 C bi,bj = tile index
29 C myThid = Thread number for this instance of the routine
30 C-------
31 C Note: a) dry static energy (SE,input) has been replaced by Pot.Temp.
32 C b) UA,VA & U,V_TENVD not used => removed
33 C-------
34 C In contrast to other Physics S/R, VDIFSC return a real tendency (dQ/dt,dT/dt)
35 C nevertheless /dpFac is not applied here but later in AIM_AIM2DYN
36 C-------
37
38 IMPLICIT NONE
39
40 C Resolution parameters
41
42 C-- size for MITgcm & Physics package :
43 #include "AIM_SIZE.h"
44
45 #include "EEPARAMS.h"
46
47 C Physical constants + functions of sigma and latitude
48 #include "com_physcon.h"
49
50 C Vertical diffusion constants
51 #include "com_vdicon.h"
52
53 C-- Routine arguments:
54 c _RL UA(NGP,NLEV), VA(NGP,NLEV)
55 _RL dpFac(NGP,NLEV)
56 _RL SE(NGP,NLEV), RH(NGP,NLEV), QA(NGP,NLEV), QSAT(NGP,NLEV)
57 c _RL PHI(NGP,NLEV)
58
59 c _RL UTENVD(NGP,NLEV), VTENVD(NGP,NLEV)
60 _RL TTENVD(NGP,NLEV), QTENVD(NGP,NLEV)
61
62 INTEGER kGrd(NGP)
63 INTEGER bi,bj,myThid
64
65 #ifdef ALLOW_AIM
66
67 C-- Local variables:
68 INTEGER J, K, Ktmp, NL1
69 _RL RSIG(NLEV)
70 _RL dSEdp(NGP,NLEV-1), DeltaPI(NLEV-1), factP
71
72 C- jmc: declare all local variables:
73 _RL CVDI(NGP), FSHCQ
74 _RL DRH0, DRH, DMSE, FLUXSE, FLUXQ
75 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
76
77 C-- 1. Initalization
78
79 C N.B. In this routine, fluxes of dry static energy and humidity
80 C are scaled in such a way that:
81 C d_T/dt = d_F'(SE)/d_sigma, d_Q/dt = d_F'(Q)/d_sigma
82
83 c_FM NL1 = NLEV-1
84 c_FM CSHC = DSIG(NLEV)/3600.
85 c_FM CVDI = (SIGH(NL1)-SIGH(1))/((NL1-1)*3600.)
86
87 c_FM FSHCQ = CSHC/TRSHC
88 c_FM FSHCSE = CSHC/(TRSHC*CP)
89
90 c_FM FVDIQ = CVDI/TRVDI
91 c_FM FVDISE = CVDI/(TRVDS*CP)
92
93 DO J=1,NGP
94 NL1 = kGrd(J)-1
95 CVDI(J) = 0.
96 IF (NL1.GE.2) THEN
97 CVDI(J) = (SIGH(NL1)-SIGH(1))/((NL1-1)*3600. _d 0)
98 ENDIF
99 ENDDO
100
101 DO K=1,NLEV
102 RSIG(K)=1./DSIG(K)
103 ENDDO
104
105 DO K=1,NLEV
106 DO J=1,NGP
107 c UTENVD(J,K) = 0.
108 c VTENVD(J,K) = 0.
109 TTENVD(J,K) = 0.
110 QTENVD(J,K) = 0.
111 ENDDO
112 ENDDO
113
114 C ---------------------------------------------
115 C Write Conditional stability based on Pot.Temp :
116 C dSEdp(K) = Delta[Static-Energy] between 2 Plevels(k,k+1)
117 C and corresponds to SE(K+1)-SE(K) in the original code
118 C -------
119 DO K=1,NLEV-1
120 factP = CP*SIGH(K)**(RD/CP)
121 DO J=1,NGP
122 dSEdp(J,K)=(SE(J,K+1)-SE(J,K))*factP
123 ENDDO
124 DeltaPI(K) = SIG(K+1)**(RD/CP) - SIG(K)**(RD/CP)
125 ENDDO
126
127 C-- 2. Shallow convection
128
129 DO J=1,NGP
130 Ktmp = kGrd(J)
131 NL1 = Ktmp - 1
132 IF (Ktmp.GE.2) THEN
133
134 DRH0=RHGRAD*(SIG(Ktmp)-SIG(NL1))
135 FSHCQ = DSIG(Ktmp)*dpFac(J,Ktmp)/(TRSHC*3600. _d 0)
136
137 c_FM DMSE = (SE(J,NLEV)-SE(J,NL1))+ALHC*(QA(J,NLEV)-QSAT(J,NL1))
138 DMSE = dSEdp(J,NL1) + ALHC*(QA(J,Ktmp)-QSAT(J,NL1))
139 DRH = RH(J,Ktmp)-RH(J,NL1)
140
141 IF (DMSE.GE.0.0) THEN
142
143 c_FM FLUXSE = FSHCSE*DMSE
144 FLUXSE = FSHCQ *DMSE/CP
145 TTENVD(J,NL1) = FLUXSE*RSIG(NL1)
146 TTENVD(J,Ktmp) =-FLUXSE*RSIG(Ktmp)
147
148 IF (DRH.GE.0.0) THEN
149 FLUXQ = FSHCQ*QSAT(J,Ktmp)*DRH
150 QTENVD(J,NL1) = FLUXQ*RSIG(NL1)
151 QTENVD(J,Ktmp) =-FLUXQ*RSIG(Ktmp)
152 ENDIF
153
154 ELSE IF (DRH.GE.DRH0) THEN
155
156 c_FM FLUXQ = FVDIQ*QSAT(J,NL1)*DRH
157 FLUXQ = QSAT(J,NL1)*DRH*CVDI(J)/TRVDI
158 QTENVD(J,NL1) = FLUXQ*RSIG(NL1)
159 QTENVD(J,Ktmp) =-FLUXQ*RSIG(Ktmp)
160
161 ENDIF
162
163 ENDIF
164 ENDDO
165
166 C-- 3. Vertical diffusion of moisture above the PBL
167
168 DO J=1,NGP
169
170 DO K=3,kGrd(J)-2
171
172 DRH0=RHGRAD*(SIG(K+1)-SIG(K))
173
174 DRH=RH(J,K+1)-RH(J,K)
175
176 IF (DRH.GE.DRH0) THEN
177 c_FM FLUXQ = FVDIQ*QSAT(J,K)*DRH
178 FLUXQ = QSAT(J,K)*DRH*CVDI(J)/TRVDI
179 QTENVD(J,K) = QTENVD(J,K) +FLUXQ*RSIG(K)
180 QTENVD(J,K+1)= QTENVD(J,K+1)-FLUXQ*RSIG(K+1)
181 ENDIF
182
183 ENDDO
184
185 ENDDO
186
187 C-- 4. Damping of super-adiabatic lapse rate
188
189 DO J=1,NGP
190 DO K=1,kGrd(J)-1
191
192 c_FM SE0 = SE(J,K+1)+SEGRAD*(PHI(J,K)-PHI(J,K+1))
193 DMSE = dSEdp(J,K)
194 & +SEGRAD*CP*DeltaPI(K)*(SE(J,K+1)+SE(J,K))*0.5 _d 0
195
196 c_FM IF (SE(J,K).LT.SE0) THEN
197 c_FM FLUXSE = FVDISE*(SE0-SE(J,K))
198 IF (DMSE.GT.0.) THEN
199 FLUXSE = DMSE*CVDI(J)/(TRVDS*CP)
200 TTENVD(J,K ) = TTENVD(J,K )+FLUXSE*RSIG(K)
201 TTENVD(J,K+1) = TTENVD(J,K+1)-FLUXSE*RSIG(K+1)
202 ENDIF
203
204 ENDDO
205 ENDDO
206 C--
207 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
208 #endif /* ALLOW_AIM */
209
210 RETURN
211 END

  ViewVC Help
Powered by ViewVC 1.1.22