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

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

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


Revision 1.2 - (show annotations) (download)
Thu May 22 03:00:49 2003 UTC (20 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51j_post, checkpoint51n_pre, checkpoint52d_pre, checkpoint50g_post, branchpoint-genmake2, branch-netcdf, checkpoint51r_post, checkpoint52b_pre, checkpoint51o_pre, checkpoint51i_post, checkpoint51e_post, checkpoint51b_post, checkpoint51l_pre, checkpoint51c_post, checkpoint51l_post, checkpoint51o_post, checkpoint51f_pre, checkpoint51q_post, checkpoint51, checkpoint52, checkpoint52d_post, checkpoint51b_pre, checkpoint52a_post, checkpoint52b_post, checkpoint52c_post, checkpoint51h_pre, checkpoint51g_post, ecco_c52_e35, checkpoint51f_post, checkpoint50f_post, checkpoint50f_pre, checkpoint52a_pre, checkpoint51d_post, checkpoint51m_post, checkpoint51t_post, checkpoint50h_post, checkpoint51a_post, checkpoint50i_post, checkpoint51p_post, checkpoint51n_post, checkpoint51i_pre, checkpoint51u_post, checkpoint51s_post
Branch point for: netcdf-sm0, branch-genmake2, branch-nonh, tg2-branch, checkpoint51n_branch
Changes since 1.1: +10 -7 lines
o use Pot.Temp (new argument, S/R phy_suflux) to compute near ground temp (T1).
   ==> now also valid with Partal Cell.
o change Evap over land according to F.M. paper.

1 C $Header: /u/gcmpack/MITgcm/pkg/aim_v23/phy_suflux.F,v 1.1 2002/11/22 17:17:03 jmc Exp $
2 C $Name: $
3
4 #include "AIM_OPTIONS.h"
5
6 SUBROUTINE SUFLUX (PSA,TA,QA,RH,ThA,Vsurf2,WVS,CLAT,FOROG,
7 I FMASK,TLAND,TSEA,SWAV,SSR,SLRD,
8 O SPEED0,DRAG,SHF,EVAP,SLRU,
9 O TSFC,TSKIN,T0,Q0,
10 I kGrd,bi,bj,myThid)
11 C--
12 C-- SUBROUTINE SUFLUX (PSA,UA,VA,TA,QA,RH,PHI,
13 C-- & PHI0,FMASK,TLAND,TSEA,SWAV,SSR,SLRD,
14 C-- & USTR,VSTR,SHF,EVAP,SLRU,
15 C-- & TSFC,TSKIN,U0,V0,T0,Q0)
16 C--
17 C-- Purpose: Compute surface fluxes of momentum, energy and moisture,
18 C-- and define surface skin temperature from energy balance
19 C-- Input: PSA = norm. surface pressure [p/p0] (2-dim)
20 C-- UA = u-wind (3-dim)
21 C-- VA = v-wind (3-dim)
22 C-- TA = temperature (3-dim)
23 C-- QA = specific humidity [g/kg] (3-dim)
24 C-- RH = relative humidity [0-1] (3-dim)
25 C ThA = Pot.temperature [K] (3-dim)
26 C Vsurf2 = square of surface wind speed (2-dim,input)
27 C ==> UA,VA are no longer used
28 C WVS = weights for near surf interp (2-dim)
29 C CLAT = cos(lat) (2-dim)
30 C FOROG = orographic factor (surf. drag) (2-dim)
31 C-- PHI = geopotential (3-dim)
32 C-- PHI0 = surface geopotential (2-dim)
33 C-- FMASK = fractional land-sea mask (2-dim)
34 C-- TLAND = land-surface temperature (2-dim)
35 C-- TSEA = sea-surface temperature (2-dim)
36 C-- SWAV = soil wetness availability [0-1] (2-dim)
37 C-- SSR = sfc sw radiation (net flux) (2-dim)
38 C-- SLRD = sfc lw radiation (downward flux)(2-dim)
39 C-- Output: SPEED0 = effective surface wind speed (2-dim)
40 C DRAG = surface Drag term (= Cd*Rho*|V|)(2-dim)
41 C ==> USTR,VSTR are no longer used
42 C-- USTR = u stress (2-dim)
43 C-- VSTR = v stress (2-dim)
44 C-- SHF = sensible heat flux (2-dim)
45 C-- EVAP = evaporation [g/(m^2 s)] (2-dim)
46 C-- SLRU = sfc lw radiation (upward flux) (2-dim)
47 C-- TSFC = surface temperature (clim.) (2-dim)
48 C-- TSKIN = skin surface temperature (2-dim)
49 C-- U0 = near-surface u-wind (2-dim)
50 C-- V0 = near-surface v-wind (2-dim)
51 C-- T0 = near-surface air temperature (2-dim)
52 C-- Q0 = near-surface sp. humidity [g/kg](2-dim)
53 C Input: kGrd = Ground level index (2-dim)
54 C bi,bj = tile index
55 C myThid = Thread number for this instance of the routine
56 C--
57
58 IMPLICIT NONE
59
60 C Resolution parameters
61
62 C-- size for MITgcm & Physics package :
63 #include "AIM_SIZE.h"
64
65 #include "EEPARAMS.h"
66
67 C Physical constants + functions of sigma and latitude
68 #include "com_physcon.h"
69
70 C Surface flux constants
71 #include "com_sflcon.h"
72
73 C-- Routine arguments:
74 _RL PSA(NGP), TA(NGP,NLEV), QA(NGP,NLEV), RH(NGP,NLEV)
75 _RL ThA(NGP,NLEV)
76 _RL Vsurf2(NGP), WVS(NGP), CLAT(NGP), FOROG(NGP)
77 _RL FMASK(NGP), TLAND(NGP), TSEA(NGP), SWAV(NGP)
78 _RL SSR(NGP), SLRD(NGP)
79
80 _RL SPEED0(NGP), DRAG(NGP,3), SHF(NGP,3), EVAP(NGP,3)
81 _RL SLRU(NGP), TSFC(NGP), TSKIN(NGP), T0(NGP), Q0(NGP)
82
83 INTEGER kGrd(NGP)
84 INTEGER bi,bj,myThid
85
86 #ifdef ALLOW_AIM
87
88 C-- Local variables:
89 _RL T1(NGP), QSAT0(NGP,2), DENVV(NGP), CDENVV(NGP,2)
90
91 INTEGER J, K, Ktmp, NL1
92 _RL tmpRH(NGP)
93 _RL factWind2, kappa
94
95 C- jmc: declare all local variables:
96 _RL GTEMP0, GHUM0, RCP, PRD, VG2, RDTH
97 _RL FSLAND, FSSEA, QDUMMY, RDUMMY, TL4, TS4
98 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
99
100 C-- 1. Extrapolation of wind, temp, hum. and density to the surface
101
102 C 1.1 Wind components
103
104 c DO J=1,NGP
105 c U0(J) = 0.0
106 c V0(J) = 0.0
107 c Ktmp = kGrd(J)
108 c IF ( Ktmp.GT.0 ) THEN
109 c U0(J) = FWIND0*UA(J,Ktmp)
110 c V0(J) = FWIND0*VA(J,Ktmp)
111 c ENDIF
112 c ENDDO
113
114 C 1.2 Temperature
115
116 GTEMP0 = 1.-FTEMP0
117 RCP = 1. _d 0 /CP
118 kappa = RD/CP
119 C
120 DO J=1,NGP
121 Ktmp = kGrd(J)
122 NL1 = Ktmp-1
123 IF ( Ktmp.GT.1 ) THEN
124 c_FM T0(J) = TA(J,NLEV)+WVI(NLEV,2)*(TA(J,NLEV)-TA(J,NL1))
125 c_FM T1(J) = TA(J,NLEV)+RCP*(PHI(J,NLEV)-PHI0(J))
126 T0(J) = TA(J,Ktmp) + WVS(J)*(TA(J,Ktmp)-TA(J,NL1))
127 Cjmc: used previously but not valid with partial cell !
128 c T1(J) = TA(J,Ktmp)*(SIGH(Ktmp)/SIG(Ktmp))**kappa
129 T1(J) = ThA(J,Ktmp)*(PSA(J)**kappa)
130 tmpRH(J)=RH(J,Ktmp)
131 ELSE
132 T0(J) = 273.16 _d 0
133 T1(J) = 273.16 _d 0
134 tmpRH(J)= 0.
135 ENDIF
136 ENDDO
137
138 DO J=1,NGP
139 T0(J) = FTEMP0*T0(J)+GTEMP0*T1(J)
140 ENDDO
141
142 C 1.3 Spec. humidity
143
144 GHUM0 = 1.-FHUM0
145
146 CALL SHTORH (-1,NGP,T0, PSA, 1. _d 0, Q0, tmpRH, QSAT0, myThid)
147
148 DO J=1,NGP
149 IF ( kGrd(J) .GT. 0 ) THEN
150 Q0(J)=FHUM0*Q0(J)+GHUM0*QA(J,kGrd(J))
151 ENDIF
152 ENDDO
153
154 C 1.4 Density * wind speed (including gustiness factor)
155
156 PRD = P0/RD
157 VG2 = VGUST*VGUST
158 factWind2 = FWIND0*FWIND0
159
160 DO J=1,NGP
161 c_FM DENVV(J)=(PRD*PSA(J)/T0(J))*
162 c_FM & SQRT(U0(J)*U0(J)+V0(J)*V0(J)+VG2)
163 SPEED0(J)=SQRT(factWind2*Vsurf2(J)+VG2)
164 DENVV(J)=(PRD*PSA(J)/T0(J))*SPEED0(J)
165 ENDDO
166
167 C 1.5 Define effective skin temperature to compensate for
168 C non-linearity of heat/moisture fluxes during the daily cycle
169
170 DO J=1,NGP
171 TSKIN(J)=TLAND(J)+CTDAY*CLAT(J)*SSR(J)*PSA(J)
172 ENDDO
173
174
175 C-- 2. Computation of fluxes over land and sea
176
177 C 2.1 Wind stress
178
179 C Orographic correction
180
181 DO J=1,NGP
182 c CDENVV(J,1)=CDL*DENVV(J)*FOROG(J)
183 c CDENVV(J,2)=CDS*DENVV(J)
184 DRAG(J,1) = CDL*DENVV(J)*FOROG(J)
185 DRAG(J,2) = CDS*DENVV(J)
186 ENDDO
187
188 C - Notes:
189 C Because of a different mapping between the Drag and the Wind (A/C-grid)
190 C the surface stress is computed later, in "External Forcing",
191 C Here compute only surface drag term (= C_drag*Rho*|V| )
192
193 c DO J=1,NGP
194 c USTR(J,1) = -CDENVV(J,1)*UA(J,NLEV)
195 c VSTR(J,1) = -CDENVV(J,1)*VA(J,NLEV)
196 c USTR(J,2) = -CDENVV(J,2)*UA(J,NLEV)
197 c VSTR(J,2) = -CDENVV(J,2)*VA(J,NLEV)
198 c ENDDO
199
200 C 2.2 Sensible heat flux (from clim. TS over land)
201
202 C Stability correction
203
204 RDTH = FSTAB/DTHETA
205
206 DO J=1,NGP
207 FSLAND=1.+MIN(DTHETA,MAX(-DTHETA,TSKIN(J)-T1(J)))*RDTH
208 FSSEA =1.+MIN(DTHETA,MAX(-DTHETA, TSEA(J)-T1(J)))*RDTH
209 CDENVV(J,1)=CHL*DENVV(J)*FSLAND
210 CDENVV(J,2)=CHS*DENVV(J)*FSSEA
211 ENDDO
212
213 DO J=1,NGP
214 SHF(J,1) = CDENVV(J,1)*CP*(TSKIN(J)-T0(J))
215 SHF(J,2) = CDENVV(J,2)*CP*(TSEA(J) -T0(J))
216 ENDDO
217
218 C 2.3 Evaporation
219
220 CALL SHTORH (0, NGP, TSKIN, PSA, 1. _d 0, QDUMMY, RDUMMY,
221 & QSAT0(1,1), myThid)
222 CALL SHTORH (0, NGP, TSEA , PSA, 1. _d 0, QDUMMY, RDUMMY,
223 & QSAT0(1,2), myThid)
224
225 DO J=1,NGP
226 C EVAP(J,1) = CDENVV(J,1)*SWAV(J)*MAX(0. _d 0,QSAT0(J,1)-Q0(J))
227 c EVAP(J,1) = CDENVV(J,1)*MAX(0. _d 0,SWAV(J)*QSAT0(J,1)-Q0(J))
228 Cjmc: try the other formulation (= described in F.M paper):
229 EVAP(J,1) = CDENVV(J,1)*SWAV(J)*MAX(0. _d 0,QSAT0(J,1)-Q0(J))
230 EVAP(J,2) = CDENVV(J,2)* (QSAT0(J,2)-Q0(J))
231 ENDDO
232
233 C 2.4 Emission of lw radiation from the surface
234
235 DO J=1,NGP
236 TL4 = TSKIN(J)**4
237 TS4 = TSEA(J) **4
238 SLRU(J) = SBC*(TS4+FMASK(J)*(TL4-TS4))
239 ENDDO
240
241 C-- 3. Adjustment of skin temperature and fluxes over land
242 C-- based on energy balance (to be implemented)
243
244 C-- 4. Weighted average of surface fluxes and temperatures
245 C-- according to land-sea mask
246
247 DO J=1,NGP
248 c USTR(J,3) = USTR(J,2)+FMASK(J)*(USTR(J,1)-USTR(J,2))
249 c VSTR(J,3) = VSTR(J,2)+FMASK(J)*(VSTR(J,1)-VSTR(J,2))
250 DRAG(J,3) = DRAG(J,2)+FMASK(J)*(DRAG(J,1)-DRAG(J,2))
251 SHF(J,3) = SHF(J,2)+FMASK(J)*( SHF(J,1)- SHF(J,2))
252 EVAP(J,3) = EVAP(J,2)+FMASK(J)*(EVAP(J,1)-EVAP(J,2))
253 ENDDO
254
255 DO J=1,NGP
256 TSFC(J) = TSEA(J)+FMASK(J)*(TLAND(J)-TSEA(J))
257 TSKIN(J) = TSEA(J)+FMASK(J)*(TSKIN(J)-TSEA(J))
258 ENDDO
259
260 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
261 #endif /* ALLOW_AIM */
262
263 RETURN
264 END
265
266
267 SUBROUTINE SFLSET (PHI0, FOROG, bi,bj,myThid)
268 C--
269 C-- SUBROUTINE SFLSET (PHI0)
270 C--
271 C-- Purpose: compute orographic factor for land surface drag
272 C-- Input: PHI0 = surface geopotential (2-dim)
273 C Output: FOROG = orographic factor (surf. drag) (2-dim)
274 C-- (originally in common blocks: SFLFIX)
275
276 IMPLICIT NONE
277
278 C Resolution parameters
279
280 C-- size for MITgcm & Physics package :
281 #include "AIM_SIZE.h"
282
283 #include "EEPARAMS.h"
284
285 C Physical constants + functions of sigma and latitude
286 #include "com_physcon.h"
287
288 C Surface flux constants
289 #include "com_sflcon.h"
290
291 C-- Routine arguments:
292 INTEGER bi,bj,myThid
293 _RL PHI0(NGP)
294 _RL FOROG(NGP)
295
296 #ifdef ALLOW_AIM
297
298 C-- Local variables:
299 INTEGER J
300 _RL RHDRAG
301
302 RHDRAG = 1./(GG*HDRAG)
303
304 DO J=1,NGP
305 FOROG(J) = 1. _d 0
306 & + FHDRAG*(1. _d 0 - EXP(-MAX(PHI0(J),0. _d 0)*RHDRAG) )
307 ENDDO
308
309 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
310 #endif /* ALLOW_AIM */
311
312 RETURN
313 END

  ViewVC Help
Powered by ViewVC 1.1.22