Changeset 636 for trunk/LMDZ.MARS/libf/phymars/pbl_parameters.F
- Timestamp:
- Apr 27, 2012, 11:22:46 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/pbl_parameters.F
r605 r636 144 144 lambda=(sqrt(bh/bm))/alphah 145 145 ric=betah/(betam**2) 146 147 146 DO ig=1,ngrid 148 147 ite=0. 149 148 residual=abs(pz0tcomp(ig)-pz0t) 150 zu2(ig)=MAX(pu(ig,1)*pu(ig,1)+pv(ig,1)*pv(ig,1) 151 & ,(0.3*wstar_in(ig))**2) 149 ! zu2(ig)=MAX(pu(ig,1)*pu(ig,1)+pv(ig,1)*pv(ig,1) 150 ! & ,(0.3*wstar_in(ig))**2) 151 zu2(ig)=pu(ig,1)*pu(ig,1)+pv(ig,1)*pv(ig,1)+ 152 & + (log(1.+0.7*wstar_in(ig) + 2.3*wstar_in(ig)**2))**2 152 153 153 154 DO WHILE((residual .gt. 0.01*pz0(ig)) .and. (ite .lt. 10.)) … … 157 158 ! Richardson number formulation proposed by D.E. England et al. (1995) 158 159 rib(ig) = (pg/pts(ig)) 159 & *sqrt(zzl ev(ig,2)*pz0(ig))160 & *(((log(zzl ev(ig,2)/pz0(ig)))**2)/(log(zzlev(ig,2)/pz0t)))160 & *sqrt(zzlay(ig,1)*pz0(ig)) 161 & *(((log(zzlay(ig,1)/pz0(ig)))**2)/(log(zzlay(ig,1)/pz0t))) 161 162 & *(ph(ig,1)-pts(ig))/zu2(ig) 162 163 ELSE … … 166 167 ENDIF 167 168 168 z1z0=zzl ev(ig,2)/pz0(ig)169 z1z0t=zzl ev(ig,2)/pz0t169 z1z0=zzlay(ig,1)/pz0(ig) 170 z1z0t=zzlay(ig,1)/pz0t 170 171 171 172 cdn(ig)=karman/log(z1z0) … … 221 222 222 223 223 ! Large-scale wind at first layer (without gustiness) and224 224 ! u* theta* computation 225 ! and Monin Obukhov length: 225 226 226 227 DO ig=1,ngrid … … 228 229 ustar(ig)=0. 229 230 tstar(ig)=0. 231 L_mo(ig)=0. 230 232 ELSE 231 233 ustar(ig)=sqrt(pcdv(ig)) … … 233 235 tstar(ig)=-pcdh(ig)*(pts(ig)-ph(ig,1)) 234 236 & /sqrt(pcdv(ig)) 237 L_mo(ig)=pts(ig)*(ustar(ig)**2)/(pg*karman*tstar(ig)) !as defined here, L is positive for SBL, negative for UBL 235 238 ENDIF 236 239 ENDDO … … 238 241 ! Monin Obukhov length: 239 242 240 DO ig=1,ngrid241 IF (rib(ig) .gt. ric) THEN242 L_mo(ig)=0.243 ELSE244 L_mo(ig)=pts(ig)*(ustar(ig)**2)/(pg*karman*tstar(ig)) !as defined here, L is positive for SBL, negative for UBL245 ENDIF246 ENDDO243 ! DO ig=1,ngrid 244 ! IF (rib(ig) .ge. ric) THEN 245 ! L_mo(ig)=0. 246 ! ELSE 247 ! L_mo(ig)=pts(ig)*(ustar(ig)**2)/(pg*karman*tstar(ig)) !as defined here, L is positive for SBL, negative for UBL 248 ! ENDIF 249 ! ENDDO 247 250 248 251 ! Interpolation: … … 253 256 Teta_out(ig,n)=pts(ig) 254 257 ELSEIF (L_mo(ig) .gt. 0.) THEN 255 u_out(ig,n)=(ustar(ig)/karman)*log(zout/pz0(ig)) + 256 & 5.*(ustar(ig)/(karman*L_mo(ig)))*(zout-pz0(ig)) 257 Teta_out(ig,n)=pts(ig)+(tstar(ig)/(prandtl(ig)*karman)) 258 & *log(zout/pz0tcomp(ig)) + 259 & 5.*(tstar(ig)/(prandtl(ig)*karman*L_mo(ig))) 260 & *(zout-pz0tcomp(ig)) 258 ! u_out(ig,n)=(ustar(ig)/karman)*log(zout/pz0(ig)) + 259 ! & 5.*(ustar(ig)/(karman*L_mo(ig)))*(zout-pz0(ig)) 260 ! Teta_out(ig,n)=pts(ig)+(tstar(ig)/(prandtl(ig)*karman)) 261 ! & *log(zout/pz0tcomp(ig)) + 262 ! & 5.*(tstar(ig)/(prandtl(ig)*karman*L_mo(ig))) 263 ! & *(zout-pz0tcomp(ig)) 264 IF ((zout/L_mo(ig).lt.ric).and.(pz0(ig).lt.ric)) THEN 265 ! & ((zout/L_mo(ig).gt.ric).and.(pz0(ig).gt.ric)) ) THEN 266 267 u_out(ig,n)=(ustar(ig)/karman)*( 268 & log((ric-pz0(ig)/L_mo(ig))/(ric-zout/L_mo(ig))) 269 & +log(zout/pz0(ig)) 270 & ) 271 ELSEIF ((zout/L_mo(ig).gt.ric).and.(pz0(ig).gt.ric)) THEN 272 273 u_out(ig,n)=(ustar(ig)/karman)*( 274 & log((zout-ric*L_mo(ig))/(pz0(ig)-ric*L_mo(ig))) 275 & +log(pz0(ig)/zout) 276 & ) 277 278 ELSEIF ((zout/L_mo(ig).gt.ric).and.(pz0(ig).lt.ric)) THEN 279 !integral of the stability function does not converge 280 281 282 u_out(ig,n)=sqrt(pu(ig,1)**2 + pv(ig,1)**2) 283 284 285 ENDIF 286 IF((zout/L_mo(ig).lt.ric).and.(pz0tcomp(ig).lt.ric)) THEN 287 ! & ((zout/L_mo(ig).gt.ric).and.(pz0tcomp(ig).gt.ric)) ) THEN 288 289 Teta_out(ig,n)=pts(ig)+(tstar(ig)/(prandtl(ig)*karman))*( 290 & log((ric-pz0tcomp(ig)/L_mo(ig))/(ric-zout/L_mo(ig))) 291 & +log(zout/pz0tcomp(ig)) 292 & ) 293 ELSEIF ((zout/L_mo(ig).gt.ric).and.(pz0tcomp(ig).gt.ric)) THEN 294 295 Teta_out(ig,n)=pts(ig)+(tstar(ig)/(prandtl(ig)*karman))*( 296 & log((zout-ric*L_mo(ig))/(pz0tcomp(ig)-ric*L_mo(ig))) 297 & +log(pz0tcomp(ig)/zout) 298 & ) 299 300 ELSEIF ((zout/L_mo(ig).gt.ric).and.(pz0tcomp(ig).lt.ric)) THEN 301 !integral of the stability function does not converge 302 303 Teta_out(ig,n)=ph(ig,1) 304 305 ENDIF 306 261 307 ELSEIF (L_mo(ig) .lt. 0.) THEN 262 308 … … 304 350 ENDIF 305 351 ELSE 306 u_out(ig,n)= 0.307 Teta_out(ig,n)=p ts(ig)352 u_out(ig,n)=sqrt(pu(ig,1)**2 + pv(ig,1)**2) 353 Teta_out(ig,n)=ph(ig,1) 308 354 ENDIF 309 355 IF(zout .lt. pz0(ig)) THEN 310 356 u_out(ig,n)=0. 311 357 ENDIF 358 359 ! Final check 360 IF (L_mo(ig) .gt. 0) THEN 361 IF (Teta_out(ig,n) .gt. ph(ig,1)) THEN 362 Teta_out(ig,n)=ph(ig,1) 363 ELSEIF (Teta_out(ig,n) .lt. pts(ig)) THEN 364 Teta_out(ig,n)=pts(ig) 365 ENDIF 366 ELSEIF (L_mo(ig) .lt. 0) THEN 367 IF (Teta_out(ig,n) .lt. ph(ig,1)) THEN 368 Teta_out(ig,n)=ph(ig,1) 369 ELSEIF (Teta_out(ig,n) .gt. pts(ig)) THEN 370 Teta_out(ig,n)=pts(ig) 371 ENDIF 372 ENDIF 373 374 IF (u_out(ig,n) .gt. sqrt(pu(ig,1)**2 + pv(ig,1)**2)) THEN 375 u_out(ig,n)=sqrt(pu(ig,1)**2 + pv(ig,1)**2) 376 ENDIF 377 312 378 ENDDO 313 379 … … 420 486 ENDIF ! of if calltherm 421 487 488 call WRITEDIAGFI(ngrid,'rib_pbl', 489 & 'Richardson in pbl parameter','m/s',2,rib) 490 call WRITEDIAGFI(ngrid,'cdn_pbl', 491 & 'neutral momentum coef','m/s',2,cdn) 492 call WRITEDIAGFI(ngrid,'fm_pbl', 493 & 'momentum stab function','m/s',2,fm) 494 call WRITEDIAGFI(ngrid,'uv', 495 & 'wind norm first layer','m/s',2,sqrt(zu2)) 496 call WRITEDIAGFI(ngrid,'uvtrue', 497 & 'wind norm first layer','m/s',2,sqrt(pu(:,1)**2+pv(:,1)**2)) 498 call WRITEDIAGFI(ngrid,'chn_pbl', 499 & 'neutral momentum coef','m/s',2,chn) 500 call WRITEDIAGFI(ngrid,'fh_pbl', 501 & 'momentum stab function','m/s',2,fh) 502 call WRITEDIAGFI(ngrid,'B_pbl', 503 & 'flottabilité','m/',2,(ph(:,1)-pts(:))/pts(:)) 504 call WRITEDIAGFI(ngrid,'zot_pbl', 505 & 'flottabilité','ms',2,pz0tcomp) 506 call WRITEDIAGFI(ngrid,'zz1','flottabilité','m',2,zzlay(:,1)) 507 422 508 RETURN 423 509 END
Note: See TracChangeset
for help on using the changeset viewer.