Ignore:
Timestamp:
Jan 5, 2016, 4:37:49 PM (9 years ago)
Author:
crio
Message:

Nouvelle option d'epluchage de l'ascendance adiabatique dans le schema d'Emanuel: epluchage fonction de B/w2 au lieu de w. S'active avec iflag_mix_adiab=1 (valeur par defaut iflag_mix_adiab=0). Fonctionne avec iflag_mix=0 et iflag_mix=1.
Correction de bugs dans le schema de convection pour le calcul de inb, cape et buoy (sous le meme flag pour l'instant).
New option for the erosion of the adiabatic ascent in the Emanuel scheme: erosion function of B/w2 instead of w. Activated by iflag_mix_adiab=1 (standard value iflag_mix_adiab=0). Should work with iflag_mix=0 and iflag_mix=1.
Various bug corrections in the convection scheme for the computation of inb, cape, buoy (protected by the same flag for now).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/cv3p1_closure.F90

    r2311 r2420  
    5858  INTEGER il, i, j, k, icbmax, i0(nloc), klfc(nloc)
    5959  REAL deltap, fac, w, amu
    60   REAL rhodp
     60  REAL rhodp, dz
    6161  REAL pbmxup
    6262  REAL dtmin(nloc, nd), sigold(nloc, nd)
     
    7979  REAL term1, term2, term3
    8080  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)
    8186
    8287  REAL sigmax
     
    110115    END DO
    111116  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
    112127
    113128  ! -------------------------------------------------------
     
    431446
    432447      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
    434452        deltap = min(pbase(il), ph(il,k-1)) - min(pbase(il), ph(il,k))
     453        ENDIF
    435454        cape(il) = cape(il) + rrd*buoy(il, k-1)*deltap/p(il, k-1)
    436455        cape(il) = amax1(0.0, cape(il))
     
    601620  IF (prt_level>=20) PRINT *, 'cv3p1_param apres w0_sig_M'
    602621
     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
    603708  ! c 3. Compute final cloud base mass flux and set iflag to 3 if
    604709  ! c    cloud base mass flux is exceedingly small and is decreasing (i.e. if
Note: See TracChangeset for help on using the changeset viewer.