Changeset 2420 for LMDZ5/trunk/libf/phylmd/cv3p1_closure.F90
- Timestamp:
- Jan 5, 2016, 4:37:49 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/cv3p1_closure.F90
r2311 r2420 58 58 INTEGER il, i, j, k, icbmax, i0(nloc), klfc(nloc) 59 59 REAL deltap, fac, w, amu 60 REAL rhodp 60 REAL rhodp, dz 61 61 REAL pbmxup 62 62 REAL dtmin(nloc, nd), sigold(nloc, nd) … … 79 79 REAL term1, term2, term3 80 80 REAL alp2(nloc) ! Alp with offset 81 !CR: variables for new erosion of adiabiatic ascent 82 REAL mad(nloc, nd), me(nloc, nd), betalim(nloc, nd), beta_coef(nloc, nd) 83 REAL med(nloc, nd), md(nloc,nd) 84 REAL coef_peel 85 PARAMETER (coef_peel=0.25) 81 86 82 87 REAL sigmax … … 110 115 END DO 111 116 END DO 117 118 !CR: initializations for erosion of adiabatic ascent 119 DO k = 1,nl 120 DO il = 1, ncum 121 mad(il,k)=0. 122 me(il,k)=0. 123 betalim(il,k)=1. 124 wlim(il,k)=0. 125 ENDDO 126 ENDDO 112 127 113 128 ! ------------------------------------------------------- … … 431 446 432 447 IF ((k>=(icb(il)+1)) .AND. (k<=inb(il))) THEN 433 448 IF (iflag_mix_adiab.eq.1) THEN 449 !CR:computation of cape from LCL: keep flag or to modify in all cases? 450 deltap = min(plcl(il), ph(il,k-1)) - min(plcl(il), ph(il,k)) 451 ELSE 434 452 deltap = min(pbase(il), ph(il,k-1)) - min(pbase(il), ph(il,k)) 453 ENDIF 435 454 cape(il) = cape(il) + rrd*buoy(il, k-1)*deltap/p(il, k-1) 436 455 cape(il) = amax1(0.0, cape(il)) … … 601 620 IF (prt_level>=20) PRINT *, 'cv3p1_param apres w0_sig_M' 602 621 622 !CR: new erosion of adiabatic ascent: modification of m 623 !computation of the sum of ascending fluxes 624 IF (iflag_mix_adiab.eq.1) THEN 625 626 !Verification sum(me)=sum(m) 627 DO k = 1,nl+1 628 DO il = 1, ncum 629 md(il,k)=0. 630 med(il,k)=0. 631 ENDDO 632 ENDDO 633 634 DO k = nl,1,-1 635 DO il = 1, ncum 636 md(il,k)=md(il,k+1)+m(il,k+1) 637 ENDDO 638 ENDDO 639 640 DO k = nl,1,-1 641 DO il = 1, ncum 642 IF ((k>=(icb(il))) .AND. (k<=inb(il))) THEN 643 mad(il,k)=mad(il,k+1)+m(il,k+1) 644 ENDIF 645 ! print*,"mad",il,k,mad(il,k) 646 ENDDO 647 ENDDO 648 649 !CR: erosion of each adiabatic ascent during its ascent 650 651 !Computation of erosion coefficient beta_coef 652 DO k = 1, nl 653 DO il = 1, ncum 654 IF ((k>=(icb(il)+1)) .AND. (k<=inb(il)) .AND. (mlim(il,k).gt.0.)) THEN 655 ! print*,"beta_coef",il,k,icb(il),inb(il),buoy(il,k),tv(il,k),wlim(il,k),wlim(il,k+1) 656 beta_coef(il,k)=RG*coef_peel*buoy(il,k)/tv(il,k)/((wlim(il,k)+wlim(il,k+1))/2.)**2 657 ELSE 658 beta_coef(il,k)=0. 659 ENDIF 660 ENDDO 661 ENDDO 662 663 ! print*,"apres beta_coef" 664 665 DO k = 1, nl 666 DO il = 1, ncum 667 668 IF ((k>=(icb(il)+1)) .AND. (k<=inb(il))) THEN 669 670 ! print*,"dz",il,k,tv(il, k-1) 671 dz = (ph(il,k-1)-ph(il,k))/(p(il, k-1)/(rrd*tv(il, k-1))*RG) 672 betalim(il,k)=betalim(il,k-1)*exp(-1.*beta_coef(il,k-1)*dz) 673 ! betalim(il,k)=betalim(il,k-1)*exp(-RG*coef_peel*buoy(il,k-1)/tv(il,k-1)/5.**2*dz) 674 ! print*,"me",il,k,mlim(il,k),buoy(il,k),wlim(il,k),mad(il,k) 675 dz = (ph(il,k)-ph(il,k+1))/(p(il, k)/(rrd*tv(il, k))*RG) 676 ! me(il,k)=betalim(il,k)*(m(il,k)+RG*coef_peel*buoy(il,k)/tv(il,k)/((wlim(il,k)+wlim(il,k+1))/2.)**2*dz*mad(il,k)) 677 me(il,k)=betalim(il,k)*(m(il,k)+beta_coef(il,k)*dz*mad(il,k)) 678 ! print*,"B/w2",il,k,RG*coef_peel*buoy(il,k)/tv(il,k)/((wlim(il,k)+wlim(il,k+1))/2.)**2*dz 679 680 END IF 681 682 !Modification of m 683 m(il,k)=me(il,k) 684 END DO 685 END DO 686 687 ! DO il = 1, ncum 688 ! dz = (ph(il,icb(il))-ph(il,icb(il)+1))/(p(il, icb(il))/(rrd*tv(il, icb(il)))*RG) 689 ! m(il,icb(il))=m(il,icb(il))+RG*coef_peel*buoy(il,icb(il))/tv(il,icb(il)) & 690 ! /((wlim(il,icb(il))+wlim(il,icb(il)+1))/2.)**2*dz*mad(il,icb(il)) 691 ! print*,"wlim(icb)",icb(il),wlim(il,icb(il)),m(il,icb(il)) 692 ! ENDDO 693 694 !Verification sum(me)=sum(m) 695 DO k = nl,1,-1 696 DO il = 1, ncum 697 med(il,k)=med(il,k+1)+m(il,k+1) 698 ! print*,"somme(me),somme(m)",il,k,icb(il),med(il,k),md(il,k),me(il,k),m(il,k),wlim(il,k) 699 ENDDO 700 ENDDO 701 702 703 ENDIF !(iflag_mix_adiab) 704 !RC 705 706 707 603 708 ! c 3. Compute final cloud base mass flux and set iflag to 3 if 604 709 ! c cloud base mass flux is exceedingly small and is decreasing (i.e. if
Note: See TracChangeset
for help on using the changeset viewer.