Changeset 512
- Timestamp:
- Feb 3, 2012, 11:11:45 AM (13 years ago)
- Location:
- trunk/LMDZ.MARS/libf/phymars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/calltherm_interface.F90
r508 r512 59 59 REAL detr_therm(ngridmx,nlayermx) 60 60 REAL zw2(ngridmx,nlayermx+1) 61 REAL fraca(ngridmx,nlayermx+1) 61 REAL fraca(ngridmx,nlayermx+1),zfraca(ngridmx,nlayermx+1) 62 62 REAL ztla(ngridmx,nlayermx) 63 63 REAL q_therm(ngridmx,nlayermx), pq_therm(ngridmx,nlayermx,nqmx) … … 124 124 zw2(:,:)=0. 125 125 fraca(:,:)=0. 126 zfraca(:,:)=0. 126 127 if (tracer) then 127 128 pdq_th(:,:,:)=0. … … 264 265 detr_therm(:,:)=detr_therm(:,:) & 265 266 & +zdetr_therm(:,:)*fact 267 zfraca(:,:)=zfraca(:,:) + fraca(:,:)*fact 266 268 267 269 heatFlux(:,:)=heatFlux(:,:) & … … 273 275 buoyancyEst(:,:)=buoyancyEst(:,:) & 274 276 & +zbuoyancyEst(:,:)*fact 277 275 278 276 279 zw2(:,:)=zw2(:,:) + zzw2(:,:)*fact -
trunk/LMDZ.MARS/libf/phymars/thermcell_main_mars.F90
r508 r512 113 113 REAL zdz,zbuoy(ngridmx,nlayermx),zw2m 114 114 LOGICAL activecell(ngridmx),activetmp(ngridmx) 115 REAL a1,b1,ae,be,ad,bd,fdfu 115 REAL a1,b1,ae,be,ad,bd,fdfu,b1inv,a1inv 116 116 INTEGER tic 117 117 … … 379 379 fdfu = -1.3 380 380 381 ! Best configuration for 222 levels: 382 b1=0. 383 a1=0.7*a1 384 a1inv=0.25*a1 385 b1inv=0.0002 386 381 387 ! -------------------------------------------------------------------------- 382 388 ! -------------------------------------------------------------------------- … … 406 412 ! do l=2,4 407 413 do ig=1,ngridmx 408 if (ztv(ig,l)>(ztv(ig,l+1)+0.) .and. ztv(ig,1)>=ztv(ig,l) .and. (alim_star(ig,l-1) .ne. 0.) ) then414 if (ztv(ig,l)>(ztv(ig,l+1)+0.) .and. ztv(ig,1)>=ztv(ig,l) .and. (alim_star(ig,l-1) .ne. 0.) .and. (zlev(ig,l+1) .lt. 1000.)) then 409 415 alim_star(ig,l)=MAX((ztv(ig,l)-ztv(ig,l+1)),0.) & 410 416 & *sqrt(zlev(ig,l+1)) … … 499 505 & -2.*zdz*w_est(ig,l)*ae*(a1*zbuoy(ig,l)/w_est(ig,l)-b1)**be) 500 506 else 501 w_est(ig,l+1)=Max(0.0001,w_est(ig,l)+2.*zdz*a1 *zbuoy(ig,l)-2.*zdz*w_est(ig,l)*b1)507 w_est(ig,l+1)=Max(0.0001,w_est(ig,l)+2.*zdz*a1inv*zbuoy(ig,l)-2.*zdz*w_est(ig,l)*b1inv) 502 508 endif 503 509 if (w_est(ig,l+1).lt.0.) then … … 518 524 if((a1*(zbuoy(ig,l)/zw2m)-b1) .gt. 0.) then 519 525 entr_star(ig,l)=f_star(ig,l)*zdz* & 520 !& MAX(0.,ae*(a1*(zbuoy(ig,l)/zw2m)-b1)**be)521 & MAX(0.,log(1. + 0.027*sqrt(a1*(zbuoy(ig,l)/zw2m)-b1)))526 & MAX(0.,ae*(a1*(zbuoy(ig,l)/zw2m)-b1)**be) 527 ! & MAX(0.,log(1. + 0.03*sqrt(a1*(zbuoy(ig,l)/zw2m)-b1))) 522 528 else 523 529 entr_star(ig,l)=0. … … 540 546 ! new param from continuity eq with a fit on dfdz 541 547 detr_star(ig,l) = f_star(ig,l)*zdz* & 542 !& ad543 & Max(0., 0.001 - 0.45*zbuoy(ig,l)/zw2m)548 & ad 549 ! & Max(0., 0.0005 - 0.55*zbuoy(ig,l)/zw2m) 544 550 545 551 ! & MAX(0.,-0.38*zbuoy(ig,l)/zw2m+0.0005) !svn baseline … … 553 559 else 554 560 detr_star(ig,l)=f_star(ig,l)*zdz* & 555 ! & bd*zbuoy(ig,l)/zw2m 556 & Max(0., 0.001 - 0.45*zbuoy(ig,l)/zw2m) 561 & bd*zbuoy(ig,l)/zw2m 562 ! & Max(0., 0.001 - 0.45*zbuoy(ig,l)/zw2m) 563 ! & Max(0., Min(0.001,0.0005 - 0.55*zbuoy(ig,l)/zw2m)) 557 564 558 565 … … 573 580 ! alim_star et 0 sinon 574 581 575 582 if (l.lt.lalim(ig)) then 576 583 alim_star(ig,l)=max(alim_star(ig,l),entr_star(ig,l)) 577 entr_star(ig,l)=0. 578 584 entr_star(ig,l)=0. 585 endif 579 586 580 587 ! Calcul du flux montant normalise … … 591 598 !--------------------------------------------------------------------------- 592 599 593 DO tic=0, 1! internal convergence loop600 DO tic=0,0 ! internal convergence loop 594 601 activetmp(:)=activecell(:) .and. f_star(:,l+1)>1.e-10 595 602 do ig=1,ngridmx … … 614 621 & 2.*zdz*zw2(ig,l)*b1-2.*zdz*zw2(ig,l)*ae*(a1*zbuoy(ig,l)/zw2(ig,l)-b1)**be) 615 622 else 616 zw2(ig,l+1)=Max(0.,zw2(ig,l)+2.*zdz*a1 *zbuoy(ig,l)-2.*zdz*zw2(ig,l)*b1)623 zw2(ig,l+1)=Max(0.,zw2(ig,l)+2.*zdz*a1inv*zbuoy(ig,l)-2.*zdz*zw2(ig,l)*b1inv) 617 624 endif 618 625 endif … … 630 637 entr_star(ig,l)=f_star(ig,l)*zdz* & 631 638 & MAX(0.,ae*(a1*(zbuoy(ig,l)/zw2m)-b1)**be) 639 ! & MAX(0.,log(1. + 0.03*sqrt(a1*(zbuoy(ig,l)/zw2m)-b1))) 632 640 else 633 641 entr_star(ig,l)=0. … … 640 648 detr_star(ig,l) = f_star(ig,l)*zdz* & 641 649 & ad 650 ! & Max(0., 0.0005 - 0.55*zbuoy(ig,l)/zw2m) 651 642 652 endif 643 653 else 644 654 detr_star(ig,l)=f_star(ig,l)*zdz* & 645 655 & bd*zbuoy(ig,l)/zw2m 656 ! & Max(0.,Min(0.001,0.0005 - 0.55*zbuoy(ig,l)/zw2m)) 657 646 658 endif 647 659 else … … 736 748 do l=nlayermx,lalim(ig)+1,-1 737 749 if (zw2(ig,l).le.1.e-10) then 738 lmax(ig)=l-1 750 lmax(ig)=l-1 739 751 endif 740 752 enddo … … 1165 1177 if (lmax(ig) .gt. 1) then 1166 1178 do l=1,lmax(ig) 1167 if(zlay(ig,l) .le. 0.7*zmax(ig)) then 1179 ! if(zlay(ig,l) .le. 0.8*zmax(ig)) then 1180 if(zlay(ig,l) .le. zmax(ig)) then 1168 1181 fm_down(ig,l) =fm(ig,l)* & 1169 1182 & max(fdfu,-3*max(0.,(zlay(ig,l)/zmax(ig)))-0.9) 1170 1183 endif 1171 1184 1172 if(zlay(ig,l) .le. 0.06*zmax(ig)) then 1173 ztvd(ig,l)=ztv(ig,l)*max(0.,(1.+(sqrt((zlay(ig,l)/zmax(ig))/0.122449) - 1.)*(ztva(ig,l)/ztv(ig,l) - 1.))) 1174 elseif(zlay(ig,l) .le. 0.4*zmax(ig)) then 1175 ztvd(ig,l)=ztv(ig,l)*max(0.,1.-0.25*(ztva(ig,l)/ztv(ig,l) - 1.)) 1176 elseif(zlay(ig,l) .le. 0.7*zmax(ig)) then 1177 ztvd(ig,l)=ztv(ig,l)*max(0.,(1.+(((zlay(ig,l)/zmax(ig))-0.7)/1.)*(ztva(ig,l)/ztv(ig,l) - 1.))) 1185 ! if(zlay(ig,l) .le. 0.06*zmax(ig)) then 1186 ! ztvd(ig,l)=ztv(ig,l)*max(0.,(1.+(sqrt((zlay(ig,l)/zmax(ig))/0.122449) - 1.)*(ztva(ig,l)/ztv(ig,l) - 1.))) 1187 ! elseif(zlay(ig,l) .le. 0.4*zmax(ig)) then 1188 ! ztvd(ig,l)=ztv(ig,l)*max(0.,1.-0.25*(ztva(ig,l)/ztv(ig,l) - 1.)) 1189 ! elseif(zlay(ig,l) .le. 0.7*zmax(ig)) then 1190 ! ztvd(ig,l)=ztv(ig,l)*max(0.,(1.+(((zlay(ig,l)/zmax(ig))-0.7)/1.)*(ztva(ig,l)/ztv(ig,l) - 1.))) 1191 ! else 1192 ! ztvd(ig,l)=ztv(ig,l) 1193 ! endif 1194 1195 ! if(zlay(ig,l) .le. 0.6*zmax(ig)) then 1196 ! ztvd(ig,l)=ztv(ig,l)*((zlay(ig,l)/zmax(ig))/179.848 + 0.997832) 1197 ! elseif(zlay(ig,l) .le. 0.8*zmax(ig)) then 1198 ! ztvd(ig,l)=-ztv(ig,l)*(((zlay(ig,l)/zmax(ig))-171.74)/170.94) 1199 ! else 1200 ! ztvd(ig,l)=ztv(ig,l) 1201 ! endif 1202 1203 1204 ! if(zlay(ig,l) .le. 0.8*zmax(ig)) then 1205 ! ztvd(ig,l)=ztv(ig,l)*((zlay(ig,l)/zmax(ig))/224.81 + 0.997832) 1206 ! elseif(zlay(ig,l) .le. zmax(ig)) then 1207 ! ztvd(ig,l)=-ztv(ig,l)*(((zlay(ig,l)/zmax(ig))-144.685)/143.885) 1208 ! else 1209 ! ztvd(ig,l)=ztv(ig,l) 1210 ! endif 1211 1212 1213 if(zlay(ig,l) .le. zmax(ig)) then 1214 ztvd(ig,l)=ztv(ig,l)*((zlay(ig,l)/zmax(ig))/299.7 + 0.997832) 1178 1215 else 1179 1216 ztvd(ig,l)=ztv(ig,l) 1180 1217 endif 1181 1182 1218 1183 1219 enddo … … 1432 1468 do ig=1,ngridmx 1433 1469 pdtadj(ig,l)=(zdthladj(ig,l)+zdthladj_down(ig,l))*zpopsk(ig,l)*ratiom(ig,l) 1470 ! pdtadj(ig,l)=zdthladj(ig,l)*zpopsk(ig,l)*ratiom(ig,l) 1434 1471 enddo 1435 1472 enddo
Note: See TracChangeset
for help on using the changeset viewer.