/[MITgcm]/MITgcm/pkg/aim/phy_convmf.F
ViewVC logotype

Contents of /MITgcm/pkg/aim/phy_convmf.F

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


Revision 1.4 - (show annotations) (download)
Tue Sep 25 19:50:28 2001 UTC (22 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: icebear2, checkpoint44h_pre, release1_p12, release1_p10, release1_p11, release1_p16, release1_p15, ecco_c44_e17, ecco_c44_e16, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, icebear5, icebear4, checkpoint44f_pre, icebear3, checkpoint46f_post, release1_p13_pre, checkpoint46d_pre, checkpoint46e_post, release1-branch_tutorials, release1_p14, checkpoint44g_post, checkpoint46h_pre, checkpoint44h_post, release1_p12_pre, checkpoint44e_post, checkpoint46e_pre, ecco-branch-mod4, checkpoint43a-release1mods, checkpoint45d_post, checkpoint45b_post, checkpoint46b_pre, chkpt44a_pre, release1-branch-end, release1_final_v1, ecco_c44_e19, checkpoint46, ecco_c44_e20, checkpoint44, release1_p13, ecco_c44_e18, checkpoint44f_post, release1_p17, release1_b1, checkpoint44b_post, chkpt44c_post, chkpt44d_post, checkpoint42, release1_p9, release1_p8, checkpoint43, checkpoint46g_pre, release1_p2, release1_p3, release1_p4, release1_p6, checkpoint46a_post, chkpt44a_post, checkpoint44b_pre, release1_p1, checkpoint46a_pre, ecco-branch-mod1, checkpoint45c_post, release1_p5, checkpoint44e_pre, chkpt44c_pre, release1_p7, ecco_ice2, ecco_ice1, checkpoint46b_post, checkpoint46d_post, ecco-branch-mod2, checkpoint46g_post, checkpoint45a_post, checkpoint46c_pre, ecco-branch-mod3, ecco-branch-mod5, ecco_c44_e22, release1_beta1, ecco_c44_e23, release1-branch_branchpoint, checkpoint46c_post, checkpoint45, checkpoint46h_post, release1_chkpt44d_post, ecco_c44_e25
Branch point for: c24_e25_ice, ecco-branch, release1_coupled, icebear, release1_final, release1-branch, release1, release1_50yr
Changes since 1.3: +7 -2 lines
add a CPP option to turn back to old AIM Interface.

1 C $Header: /u/gcmpack/models/MITgcmUV/pkg/aim/phy_convmf.F,v 1.3 2001/05/29 19:28:53 cnh Exp $
2 C $Name: $
3
4 #include "AIM_OPTIONS.h"
5
6 cmolt SUBROUTINE CONVMF (PSA,SE,QA,QSAT,
7 SUBROUTINE CONVMF (PSA,TA,QA,QSAT,
8 * IDEPTH,CBMF,PRECNV,DFSE,DFQA,
9 I myThid)
10 C--
11 C-- SUBROUTINE CONVMF (PSA,SE,QA,QSAT,
12 C-- * IDEPTH,CBMF,PRECNV,DFSE,DFQA)
13 C--
14 C-- Purpose: Compute convective fluxes of dry static energy and moisture
15 C-- using a simplified mass-flux scheme
16 C-- Input: PSA = norm. surface pressure [p/p0] (2-dim)
17 C-- SE = dry static energy (3-dim)
18 C-- QA = specific humidity [g/kg] (3-dim)
19 C-- QSAT = saturation spec. hum. [g/kg] (3-dim)
20 C-- Output: IDEPTH = convection depth in layers (2-dim)
21 C-- CBMF = cloud-base mass flux (2-dim)
22 C-- PRECNV = convective precipitation [g/(m^2 s)] (2-dim)
23 C-- DFSE = net flux of d.s.en. into each atm. layer (3-dim)
24 C-- DFQA = net flux of sp.hum. into each atm. layer (3-dim)
25 C--
26
27 IMPLICIT rEAL*8 ( A-H,O-Z)
28 INTEGER myThid
29
30 C Resolution parameters
31 C
32 #include "EEPARAMS.h"
33
34 #include "atparam.h"
35 #include "atparam1.h"
36 #include "Lev_def.h"
37 C
38 INTEGER NLON, NLAT, NLEV, NGP
39 PARAMETER ( NLON=IX, NLAT=IL, NLEV=KX, NGP=NLON*NLAT )
40 C
41 C Physical constants + functions of sigma and latitude
42 C
43 #include "com_physcon.h"
44 C
45 C Convection constants
46 C
47 #include "com_cnvcon.h"
48 C
49 REAL PSA(NGP), SE(NGP,NLEV), QA(NGP,NLEV), QSAT(NGP,NLEV)
50 C
51 INTEGER IDEPTH(NGP)
52 REAL CBMF(NGP), PRECNV(NGP), DFSE(NGP,NLEV), DFQA(NGP,NLEV)
53 C
54 INTEGER ITOP(NGP)
55 REAL SM(NGP,NLEV), ENTR(NGP,2:NLEV-1)
56 REAL FM0(NGP), DENTR(NGP)
57 C
58 REAL Th(NGP,NLEV), Ta(NGP,NLEV)
59 REAL dThdp(NGP,NLEV), dThdpHat(NGP,NLEV)
60 REAL stab(NGP,NLEV)
61 REAL Prefw(NLEV), Prefs(NLEV)
62 DATA Prefs / 75., 250., 500., 775., 950./
63 DATA Prefw / 0., 150., 350., 650., 900./
64 REAL Pground
65 DATA pground /1000./
66 REAL FDMUS
67
68 INTEGER J, K, K1
69 C
70 C 1. Initialization of output and workspace arrays
71 C
72 DO J=1,NGP
73 FM0(J)=0.
74 IF ( NLEVxy(J,myThid) .NE. 0 ) THEN
75 FM0(J)=P0*DSIG(NLEVxy(J,myThid))/(GG*TRCNV*3600)
76 ENDIF
77 DENTR(J)=ENTMAX/(SIG(NLEV-1)-0.5)
78 ENDDO
79 C
80 DO K=1,NLEV
81 DO J=1,NGP
82 DFSE(J,K)=0.0
83 DFQA(J,K)=0.0
84 ENDDO
85 ENDDO
86 C
87 C
88 DO J=1,NGP
89 ITOP(J) =NLEVxy(J,myThid)
90 CBMF(J) =0.0
91 PRECNV(J)=0.0
92 ENDDO
93 C
94 C Saturation moist static energy
95 cmolt DO J=1,NGP
96 cmolt DO K=1,NLEVxy(J,myThid)
97 cmolt SM(J,K)=SE(J,K)+ALHC*QSAT(J,K)
98 cmolt ENDDO
99 cmolt ENDDO
100 C
101 C Entrainment profile (up to sigma = 0.5)
102 DO J=1,NGP
103 DO K=2,NLEVxy(J,myThid)-1
104 ENTR(J,K)=MAX(0.,SIG(K)-0.5)*DENTR(J)
105 ENDDO
106 ENDDO
107 C
108 C-- 2. Check of conditions for convection
109 C
110 C 2.1 Conditional instability
111 C
112 cmolt DO J=1,NGP
113 cmolt DO K=NLEVxy(J,myThid)-2,2,-1
114 cmolt SMB=SM(J,K)+WVI(K,2)*(SM(J,K+1)-SM(J,K))
115 cmolt IF (SM(J,NLEVxy(J,myThid)).GT.SMB) ITOP(J)=K
116 cmolt ENDDO
117 cmolt ENDDO
118 C
119 C New writing of the Conditional stability
120 C ----------------------------------------
121 DO J=1,NGP
122 DO k=1,NLEVxy(J,myThid)
123 Th(J,K)=Ta(J,K)*(Pground/Prefs(k))**(RD/CP)
124 ENDDO
125 ENDDO
126 C
127 DO J=1,NGP
128 dThdp(J,1)=0.
129 IF ( NLEVxy(J,myThid) .NE. 0 ) THEN
130 dThdp(J,NLEVxy(J,myThid))=0.
131 ENDIF
132 DO k=2,NLEVxy(J,myThid)
133 dThdp(J,K-1)=(Th(J,K-1)-Th(J,K))
134 & *((Prefw(k)/Pground)**(RD/CP))*CP
135 ENDDO
136 ENDDO
137 C
138 DO J=1,NGP
139 IF ( NLEVxy(J,myThid) .NE. 0 ) THEN
140 dThdpHat(J,NLEVxy(J,myThid))=dThdp(J,NLEVxy(J,myThid))
141 ENDIF
142 ENDDO
143 C
144 DO J=1,NGP
145 DO k=NLEVxy(J,myThid)-1,2,-1
146 dThdpHat(J,K)=dThdpHat(J,K+1)+dThdp(J,k)
147 ENDDO
148 ENDDO
149 C
150 DO J=1,NGP
151 DO k=2,NLEVxy(J,myThid)-1
152 stab(J,K)=dThdpHat(J,K)+ALHC*(QSAT(J,K)-QSAT(J,NLEVxy(J,myThid)))
153 & -WVI(K,2)*(dThdp(J,K) +ALHC*(QSAT(J,K) -QSAT(J,K+1)) )
154 ENDDO
155 ENDDO
156 C
157 DO J=1,NGP
158 DO K=NLEVxy(J,myThid)-2,2,-1
159 if(stab(J,K).lt.0.) ITOP(J)=K
160 ENDDO
161 ENDDO
162 C
163 C 2.2 Humidity exceeding prescribed threshold
164 C
165 DO J=1,NGP
166 IF ( NLEVxy(J,myThid) .NE. 0 ) THEN
167 IF (QA(J,NLEVxy(J,myThid)).LT.RHBL*QSAT(J,NLEVxy(J,myThid)))
168 & ITOP(J)=NLEVxy(J,myThid)
169 ENDIF
170 IDEPTH(J)=NLEVxy(J,myThid)-ITOP(J)
171 ENDDO
172 C
173 C-- 3. Convection over selected grid-points
174 C
175 DO 300 J=1,NGP
176 IF (ITOP(J).EQ.NLEVxy(J,myThid)) GO TO 300
177 C
178 C 3.1 Boundary layer (cloud base)
179 C
180 K =NLEVxy(J,myThid)
181 K1=K-1
182 C
183 C Dry static energy and moisture at upper boundary
184 cch SB=SE(J,K1)+WVI(K1,2)*(SE(J,K)-SE(J,K1))
185 QB=QA(J,K1)+WVI(K1,2)*(QA(J,K)-QA(J,K1))
186 cch QB=QA(J,K1)
187 C
188 C Cloud-base mass flux
189 DQSAT=MAX(QSAT(J,K)-QB,0.05*QSAT(J,K))
190 FMASS=FM0(J)*PSA(J)*(QA(J,K)-RHBL*QSAT(J,K))/DQSAT
191 CBMF(J)=FMASS
192 C
193 C Upward fluxes at upper boundary
194 cch FUS=FMASS*SE(J,K)
195 #ifdef OLD_AIM_INTERFACE
196 FUQ=FMASS*QSAT(J,K)
197 #else
198 FUQ=FMASS*MAX( QSAT(J,K), MIN(QB,QA(J,K)) )
199 #endif
200 C
201 C Downward fluxes at upper boundary
202 cch FDS=FMASS*SB
203 FDQ=FMASS*QB
204 C
205 C Net flux of dry static energy and moisture
206 cch DFSE(J,K)=FDS-FUS
207 DFSE(J,K)=FMASS*dThdp(J,K1)*(1-WVI(K1,2))
208 FDMUS=FMASS*dThdp(J,K1)*(1-WVI(K1,2))
209 DFQA(J,K)=FDQ-FUQ
210 C
211 C 3.2 Intermediate layers (entrainment)
212 C
213 DO K=NLEVxy(J,myThid)-1,ITOP(J)+1,-1
214 K1=K-1
215 C
216 C Fluxes at lower boundary
217 cch DFSE(J,K)=FUS-FDS
218 DFQA(J,K)=FUQ-FDQ
219 C
220 C Mass entrainment
221 ENMASS=ENTR(J,K)*PSA(J)*FMASS
222 FMASS=FMASS+ENMASS
223 C
224 C Upward fluxes at upper boundary
225 cch FUS=FUS+ENMASS*SE(J,K)
226 FUQ=FUQ+ENMASS*QA(J,K)
227 C
228 C Downward fluxes at upper boundary
229 cch SB=SE(J,K1)+WVI(K1,2)*(SE(J,K)-SE(J,K1))
230 QB=QA(J,K1)+WVI(K1,2)*(QA(J,K)-QA(J,K1))
231 cch QB=QA(J,K1)
232 cch FDS=FMASS*SB
233 FDQ=FMASS*QB
234 C
235 C Net flux of dry static energy and moisture
236 cch DFSE(J,K)=DFSE(J,K)+FDS-FUS
237 DFSE(J,K)=FMASS*(1-WVI(K1,2))*dThdp(J,K1)+
238 & (FMASS-ENMASS)*WVI(K,2)*dThdp(J,K)
239 FDMUS=FDMUS+ FMASS*(1-WVI(K1,2))*dThdp(J,K1)+
240 & (FMASS-ENMASS)*WVI(K,2)*dThdp(J,K)
241 DFQA(J,K)=DFQA(J,K)+FDQ-FUQ
242 C
243 ENDDO
244 c
245 C 3.3 Top layer (condensation and detrainment)
246 C
247 K=ITOP(J)
248 C
249 C Flux of convective precipitation
250 QSATB=QSAT(J,K)+WVI(K,2)*(QSAT(J,K+1)-QSAT(J,K))
251 PRECNV(J)=MAX(FUQ-FMASS*QSATB,0.0)
252 C
253 C Net flux of dry static energy and moisture
254 cch DFSE(J,K)=FUS-FDS+ALHC*PRECNV(J)
255 DFSE(J,K)=-FDMUS+ALHC*PRECNV(J)
256 DFQA(J,K)=FUQ-FDQ-PRECNV(J)
257 C
258 300 CONTINUE
259 C
260 RETURN
261 END

  ViewVC Help
Powered by ViewVC 1.1.22