Changeset 268 for trunk/LMDZ.MARS/libf
- Timestamp:
- Aug 16, 2011, 11:06:45 AM (13 years ago)
- Location:
- trunk/LMDZ.MARS/libf/phymars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/calltherm_mars.F90
r190 r268 87 87 ! =================== 88 88 89 r_aspect_thermals=2. 89 r_aspect_thermals=2. ! ultimately conrols the amount of mass going through the thermals 90 ! decreasing it increases the thermals effect. Tests at gcm resolution 91 ! shows that too low values destabilize the model 92 ! when changing this value, one should check that the surface layer model 93 ! outputs the correct Cd*u and Ch*u through changing the gustiness coefficient beta 90 94 nsplit_thermals=40 91 95 call getin("nsplit_thermals",nsplit_thermals) -
trunk/LMDZ.MARS/libf/phymars/meso_inc/meso_inc_les.F
r265 r268 1 1 DO ig=1,ngrid 2 2 !! sensible heat flux in W/m2 3 hfx(ig) = zflubid(ig)-capcal(ig)*zdtsdif(ig) 3 ! hfx(ig) = zflubid(ig)-capcal(ig)*zdtsdif(ig) 4 5 ! New SL parametrization, correct formulation for hfx : 6 7 hfx(ig) = (pplay(ig,1)/(r*pt(ig,1)))*cpp 8 & *sqrt((pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1))) 9 & *zcdh(ig)*(tsurf(ig)-zh(ig,1)) 10 4 11 !! u star in similarity theory in m/s 5 12 ! ust(ig) = 0.4 -
trunk/LMDZ.MARS/libf/phymars/physiq.F
r267 r268 327 327 INTEGER lmax_th(ngridmx) 328 328 REAL dtke_th(ngridmx,nlayermx+1) 329 REAL zcdv(ngridmx) 329 REAL zcdv(ngridmx), zcdh(ngridmx) 330 330 REAL Teta_out(ngridmx),u_out(ngridmx) ! Interpolated teta and u at z_out 331 331 REAL z_out ! height of interpolation between z0 and z1 … … 346 346 call zerophys(ngrid*nlayer,dtrad) 347 347 call zerophys(ngrid,fluxrad) 348 349 wmax_th(:)=0. 348 350 349 351 c read startfi … … 700 702 $ zdum1,zdum2,zdh,pdq,zflubid, 701 703 $ zdudif,zdvdif,zdhdif,zdtsdif,q2, 702 & zdqdif,zdqsdif,wmax_th,zcdv )704 & zdqdif,zdqsdif,wmax_th,zcdv,zcdh) 703 705 704 706 #ifdef MESOSCALE … … 1679 1681 ! THERMALS STUFF 1D 1680 1682 1683 z_out=0. 1684 if (calltherm .and. (z_out .gt. 0.)) then 1685 1686 call surflayer_interpol(ngrid,nlayer,z0,g,zzlay,zu,zv,wmax_th 1687 & ,tsurf,zt(:,:)*(zplay(:,:)/zplev(:,:))**rcp 1688 & ,z_out,Teta_out,u_out,ustar,tstar) 1689 1690 zu2(:)=sqrt(zu(:,1)*zu(:,1)+zv(:,1)*zv(:,1)) 1691 call WRITEDIAGFI(ngridmx,'sqrt(zu2)', 1692 & 'horizontal velocity norm','m/s', 1693 & 0,zu2) 1694 1695 call WRITEDIAGFI(ngridmx,'Teta_out', 1696 & 'potential temperature at z_out','K', 1697 & 0,Teta_out) 1698 call WRITEDIAGFI(ngridmx,'u_out', 1699 & 'horizontal velocity norm at z_out','m/s', 1700 & 0,u_out) 1701 call WRITEDIAGFI(ngridmx,'u*', 1702 & 'friction velocity','m/s', 1703 & 0,ustar) 1704 call WRITEDIAGFI(ngridmx,'teta*', 1705 & 'friction potential temperature','K', 1706 & 0,tstar) 1707 else 1708 if((.not. calltherm).and.(z_out .gt. 0.)) then 1709 print*, 'WARNING : no interpolation in surface-layer :' 1710 print*, 'Outputing surface-layer quantities without thermals 1711 & does not make sense' 1712 endif 1713 endif 1714 1715 ! --- 1716 1717 1718 1681 1719 if(calltherm) then 1682 1720 … … 1693 1731 & 0,wmax_th) 1694 1732 1695 1696 1733 co2col(:)=0. 1697 1734 if (tracer) then … … 1712 1749 call WRITEDIAGFI(ngrid,"tsurf","Surface temperature","K",0, 1713 1750 & tsurf) 1751 ! call WRITEDIAGFI(ngrid,"u","u wind","m/s",1,zu) 1752 ! call WRITEDIAGFI(ngrid,"v","v wind","m/s",1,zv) 1714 1753 1715 1754 call WRITEDIAGFI(ngrid,"pplay","Pressure","Pa",1,zplay) -
trunk/LMDZ.MARS/libf/phymars/surflayer_interpol.F
r267 r268 5 5 ! 6 6 ! Subject: interpolation of temperature and velocity norm in the surface layer 7 ! by recomputation of surface layer quantities (Richardson, Prandtl, u*, teta*)7 ! by recomputation of surface layer quantities (Richardson, Prandtl, Reynolds, u*, teta*) 8 8 ! ------- 9 9 ! … … 42 42 REAL, INTENT(IN) :: wmax(ngrid) 43 43 REAL, INTENT(IN) :: pts(ngrid),ph(ngrid,nlay) 44 REAL, INTENT(INOUT) :: z_out 45 REAL, INTENT(OUT) :: Teta_out(ngrid),u_out(ngrid) 44 REAL, INTENT(INOUT) :: z_out ! output height (in m above surface) 45 REAL, INTENT(OUT) :: Teta_out(ngrid),u_out(ngrid)! interpolated fields at z_out : potential temperature and norm(uv) 46 46 REAL, INTENT(OUT) :: ustar(ngrid), tstar(ngrid) ! u* and teta* 47 47 … … 79 79 ! For output : 80 80 81 REAL zu2 ! Large-scale wind at first layer81 REAL zu2(ngrid) ! Large-scale wind at first layer 82 82 REAL L_mo(ngrid) ! Monin-Obukhov length 83 83 !----------------------------------------------------------------------- … … 88 88 ustar(:)=0. 89 89 reynolds(:)=0. 90 91 ! Original formulation :92 93 ! DO ig=1,ngrid94 ! z1=1.E+0 + pz(ig,1)/pz0(ig)95 ! zcd0=karman/log(z1)96 ! zcd0=zcd0*zcd097 ! pcdv(ig)=zcd098 ! pcdh(ig)=zcd099 ! ENDDO100 101 ! print*,'old : cd,ch; ',pcdv,pcdh102 90 103 91 ! New formulation (AC) : … … 141 129 ! Richardson number formulation proposed by D.E. England et al. (1995) 142 130 131 ! IF((pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1) .lt. 1.) 132 ! & .and. (wmax(ig) .gt. 0.)) THEN 133 zu2(ig)= 134 ! & (MAX(pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1),wmax(ig)**2)) 135 & ( pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1) + wmax(ig)**2) 136 ! & pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1) 137 ! ELSE 138 ! zu2(ig)=pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1) 139 ! ENDIF 140 143 141 rib(ig) = (pg/ph(ig,1)) 144 & *pz(ig,1)*pz0(ig)/sqrt(pz(ig,1)*pz0t)145 !& *sqrt(pz(ig,1)*pz0(ig))142 ! & *pz(ig,1)*pz0(ig)/sqrt(pz(ig,1)*pz0t) 143 & *sqrt(pz(ig,1)*pz0(ig)) 146 144 & *(((log(pz(ig,1)/pz0(ig)))**2)/(log(pz(ig,1)/pz0t))) 147 & *(ph(ig,1)-pts(ig)) 148 & /(pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1)) 145 & *(ph(ig,1)-pts(ig))/zu2(ig) 146 147 ! & /(MAX(pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1),wmax(ig)**2)) 148 ! & /( pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1) + wmax(ig)**2) 149 149 150 150 else … … 208 208 ENDDO 209 209 210 ! Large-scale wind at first layer (with gustiness) and210 ! Large-scale wind at first layer (without gustiness) and 211 211 ! u* theta* computation 212 212 DO ig=1,ngrid … … 216 216 tstar(ig)=0. 217 217 else 218 zu2=pu(ig,1)*pu(ig,1)+pv(ig,1)*pv(ig,1)+(0.*wmax(ig))**2 219 ustar(ig)=karman*sqrt(fm(ig)*zu2)/(log(pz(ig,1)/pz0(ig))) 220 tstar(ig)=karman*fh(ig)*(ph(ig,1)-pts(ig)) 221 & /(log(pz(ig,1)/pz0tcomp(ig))*sqrt(fm(ig))) 218 219 ! ustar(ig)=karman*sqrt(fm(ig)*zu2(ig))/(log(pz(ig,1)/pz0(ig))) 220 ! tstar(ig)=karman*fh(ig)*(ph(ig,1)-pts(ig)) 221 ! & /(log(pz(ig,1)/pz0tcomp(ig))*sqrt(fm(ig))) 222 223 !simpler definition of u* and teta*, equivalent to the formula above : 224 225 ustar(ig)=sqrt(pcdv(ig))*sqrt(zu2(ig)) 226 tstar(ig)=-pcdh(ig)*(pts(ig)-ph(ig,1))/sqrt(pcdv(ig)) 227 228 if (tstar(ig) .lt. -50) then 229 print*, fh(ig),rib(ig),(ph(ig,1)-pts(ig)) 230 & ,log(pz(ig,1)/pz0tcomp(ig)),sqrt(fm(ig)) 231 endif 222 232 endif 223 233 ENDDO … … 233 243 ENDDO 234 244 245 DO ig=1,ngrid 235 246 IF(z_out .ge. pz(ig,1)) THEN 236 247 z_out=1. … … 252 263 & and computation is resumed' 253 264 ENDIF 254 265 ENDDO 255 266 256 267 print*, 'interpolation of u and teta at z_out=',z_out … … 265 276 & *(z_out-pz0tcomp(ig)) 266 277 ELSEIF (L_mo(ig) .lt. 0.) THEN 267 u_out(ig)=(ustar(ig)/karman)*(( 278 279 IF(L_mo(ig) .gt. -1000.) THEN 280 281 u_out(ig)=(ustar(ig)/karman)*( 268 282 & 2.*atan((1.-16.*z_out/L_mo(ig))**0.25) 269 & +log((-1.+(1.-16.*z_out/L_mo(ig))**0.25) 270 & /(-1.+(1.-16.*z_out/L_mo(ig))**0.25)))-( 271 & 2.*atan((1.-16.*pz0(ig)/L_mo(ig))**0.25) 272 & +log((-1.+(1.-16.*pz0(ig)/L_mo(ig))**0.25) 273 & /(-1.+(1.-16.*pz0(ig)/L_mo(ig))**0.25))) 283 & -2.*atan((1.-16.*pz0(ig)/L_mo(ig))**0.25) 284 & -2.*log(1.+(1.-16.*z_out/L_mo(ig))**0.25) 285 & +2.*log(1.+(1.-16.*pz0(ig)/L_mo(ig))**0.25) 286 & - log(1.+sqrt(1.-16.*z_out/L_mo(ig))) 287 & + log(1.+sqrt(1.-16.*pz0(ig)/L_mo(ig))) 288 & + log(z_out/pz0(ig)) 274 289 & ) 275 Teta_out(ig)=pts(ig)+(tstar(ig)/(prandtl(ig)*karman))*(( 276 & log((-1.+sqrt(1.-16.*z_out/L_mo(ig)))277 & /(1.+sqrt(1.-16.*z_out/L_mo(ig)))))-(278 & log((-1.+sqrt(1.-16.*pz0tcomp(ig)/L_mo(ig)))279 & /(1.+sqrt(1.-16.*pz0tcomp(ig)/L_mo(ig)))))290 291 Teta_out(ig)=pts(ig)+(tstar(ig)/(prandtl(ig)*karman))*( 292 & 2.*log(1.+sqrt(1.-16.*pz0tcomp(ig)/L_mo(ig))) 293 & -2.*log(1.+sqrt(1.-16.*z_out/L_mo(ig))) 294 & + log(z_out/pz0tcomp(ig)) 280 295 & ) 296 297 ELSE 298 299 ! We have to treat the case where L is very large and negative, 300 ! corresponding to a very nearly stable atmosphere (but not quite !) 301 ! i.e. teta* <0 and almost zero. We choose the cutoff 302 ! corresponding to L_mo < -1000 and use a 3rd order taylor expansion. The difference 303 ! between the two expression for z/L = -1/1000 is -1.54324*10^-9 304 ! (we do that to avoid using r*4 precision, otherwise, we get -inf values) 305 306 u_out(ig)=(ustar(ig)/karman)*( 307 & (4./L_mo(ig))*(z_out-pz0(ig)) 308 & + (20./(L_mo(ig))**2)*(z_out**2-pz0(ig)**2) 309 & + (160./(L_mo(ig))**3)*(z_out**3-pz0(ig)**3) 310 & + log(z_out/pz0(ig)) 311 & ) 312 313 Teta_out(ig)=pts(ig)+(tstar(ig)/(prandtl(ig)*karman))*( 314 & (8./L_mo(ig))*(z_out-pz0tcomp(ig)) 315 & + (48./(L_mo(ig))**2)*(z_out**2-pz0tcomp(ig)**2) 316 & + (1280./(3.*(L_mo(ig))**3))*(z_out**3-pz0tcomp(ig)**3) 317 & + log(z_out/pz0tcomp(ig)) 318 & ) 319 320 ENDIF 281 321 ELSE 282 322 u_out(ig)=0. 283 Teta_out(ig)= 0.323 Teta_out(ig)=pts(ig) 284 324 ENDIF 285 325 ENDDO 326 327 ! Usefull diagnostics for the interpolation routine : 286 328 287 329 call WRITEDIAGFI(ngrid,'L', -
trunk/LMDZ.MARS/libf/phymars/vdif_cd.F
r267 r268 1 1 SUBROUTINE vdif_cd(ngrid,nlay,pz0, 2 & pg,pz,pu,pv, pts,ph,pcdv,pcdh)2 & pg,pz,pu,pv,wmax,pts,ph,pcdv,pcdh) 3 3 IMPLICIT NONE 4 4 c======================================================================= … … 45 45 REAL, INTENT(IN) :: pu(ngrid,nlay),pv(ngrid,nlay) 46 46 REAL, INTENT(IN) :: pts(ngrid),ph(ngrid,nlay) 47 REAL, INTENT(IN) :: wmax(ngrid) 47 48 REAL, INTENT(OUT) :: pcdv(ngrid),pcdh(ngrid) ! momentum and heat drag coefficient 48 49 … … 62 63 63 64 REAL rib(ngrid) ! Bulk Richardson number 65 REAL rig(ngrid) ! Gradient Richardson number 64 66 REAL fm(ngrid) ! stability function for momentum 65 67 REAL fh(ngrid) ! stability function for heat … … 79 81 REAL ite 80 82 REAL residual 83 REAL zu2 81 84 c----------------------------------------------------------------------- 82 85 c couche de surface: … … 137 140 c Richardson number formulation proposed by D.E. England et al. (1995) 138 141 142 ! zu2=MAX(pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1),0.25*wmax(ig)**2) 143 ! zu2=pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1) 144 ! zu2=MAX(pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1),wmax(ig)**2) 145 zu2= pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1) + (1.*wmax(ig))**2 146 147 ! we add the wmax to simulate 148 ! bulk Ri changes due to subgrid wind feeding the thermals 149 150 ! rig(ig) = (pg/ph(ig,1))*((pz(ig,1)-pz0(ig))**2 151 ! & /(pz(ig,1)-pz0t))*(ph(ig,1)-pts(ig)) 152 ! & /zu2 153 139 154 rib(ig) = (pg/ph(ig,1)) 140 & *pz(ig,1)*pz0(ig)/sqrt(pz(ig,1)*pz0t) 155 ! & *pz(ig,1)*pz0(ig)/sqrt(pz(ig,1)*pz0t) 156 & *sqrt(pz(ig,1)*pz0(ig)) 141 157 & *(((log(pz(ig,1)/pz0(ig)))**2)/(log(pz(ig,1)/pz0t))) 142 158 & *(ph(ig,1)-pts(ig)) 143 & / (pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1))159 & /zu2 144 160 145 161 else … … 204 220 ! Some useful diagnostics : 205 221 206 ! call WRITEDIAGFI(ngrid,'Ri ',207 ! & ' Richardson nb','no units',222 ! call WRITEDIAGFI(ngrid,'RiB', 223 ! & 'Bulk Richardson nb','no units', 208 224 ! & 2,rib) 225 ! call WRITEDIAGFI(ngrid,'RiG', 226 ! & 'Grad Richardson nb','no units', 227 ! & 2,rig) 209 228 ! call WRITEDIAGFI(ngrid,'Pr', 210 229 ! & 'Prandtl nb','no units', -
trunk/LMDZ.MARS/libf/phymars/vdifc.F
r267 r268 5 5 $ pdufi,pdvfi,pdhfi,pdqfi,pfluxsrf, 6 6 $ pdudif,pdvdif,pdhdif,pdtsrf,pq2, 7 $ pdqdif,pdqsdif,wmax,zcdv_true )7 $ pdqdif,pdqsdif,wmax,zcdv_true,zcdh_true) 8 8 IMPLICIT NONE 9 9 … … 78 78 REAL zkv(ngridmx,nlayermx+1),zkh(ngridmx,nlayermx+1) 79 79 REAL zcdv(ngridmx),zcdh(ngridmx) 80 REAL zcdv_true(ngridmx),zcdh_true(ngridmx) 80 REAL zcdv_true(ngridmx),zcdh_true(ngridmx) ! drag coeff are used by the LES to recompute u* and hfx 81 81 REAL zu(ngridmx,nlayermx),zv(ngridmx,nlayermx) 82 82 REAL zh(ngridmx,nlayermx) … … 232 232 c --------------------- 233 233 234 CALL vdif_cd(ngrid,nlay,pz0,g,pzlay,pu,pv, ptsrf,ph234 CALL vdif_cd(ngrid,nlay,pz0,g,pzlay,pu,pv,wmax,ptsrf,ph 235 235 & ,zcdv_true,zcdh_true) 236 236 … … 238 238 239 239 zu2=pu(ig,1)*pu(ig,1)+pv(ig,1)*pv(ig,1) 240 & +(1.2*wmax(ig))**2 !subgrid gustiness is used to enhance surface flux only, and not u*,t* computations 240 & +(1.*wmax(ig))**2 ! subgrid gustiness added by quadratic interpolation with a coeff beta, here beta=1. (tuned from 241 ! LES comparisons. This parameter is linked to the thermals settings) 241 242 242 zcdv(ig)=zcdv_true(ig)*sqrt(zu2) 243 zcdh(ig)=zcdh_true(ig)*sqrt(zu2) 244 243 zcdv(ig)=zcdv_true(ig)*sqrt(zu2) ! 1 / bulk aerodynamic momentum conductance 244 zcdh(ig)=zcdh_true(ig)*sqrt(zu2) ! 1 / bulk aerodynamic heat conductance 245 ! these are the quantities to be looked at when comparing surface layers of different models 245 246 ENDDO 246 247 247 248 ! Some usefull diagnostics for the new surface layer parametrization : 248 249 249 ! call WRITEDIAGFI(ngridmx,'Cd',250 ! call WRITEDIAGFI(ngridmx,'pcdv', 250 251 ! & 'momentum drag','no units', 251 252 ! & 2,zcdv_true) 252 ! call WRITEDIAGFI(ngridmx,' Ch',253 ! call WRITEDIAGFI(ngridmx,'pcdh', 253 254 ! & 'heat drag','no units', 254 255 ! & 2,zcdh_true) 255 ! call WRITEDIAGFI(ngridmx,'u*2/u', 256 ! & 'friction velocity','m/s', 256 ! call WRITEDIAGFI(ngridmx,'u*', 257 ! & 'friction velocity','m/s', 258 ! & 2,sqrt(zcdv_true(:))*sqrt(zu2)) 259 ! call WRITEDIAGFI(ngridmx,'T*', 260 ! & 'friction temperature','K', 261 ! & 2,-zcdh_true(:)*(ptsrf(:)-ph(:,1))/sqrt(zcdv_true(:))) 262 ! call WRITEDIAGFI(ngridmx,'rm-1', 263 ! & 'aerodyn momentum conductance','m/s', 257 264 ! & 2,zcdv) 258 ! call WRITEDIAGFI(ngridmx,' u*T*/(T0-T)',259 ! & ' friction temperature','m/s',265 ! call WRITEDIAGFI(ngridmx,'rh-1', 266 ! & 'aerodyn heat conductance','m/s', 260 267 ! & 2,zcdh) 261 262 268 263 269 c ** schema de diffusion turbulente dans la couche limite
Note: See TracChangeset
for help on using the changeset viewer.