Ignore:
Timestamp:
Apr 6, 2010, 2:49:00 PM (14 years ago)
Author:
idelkadi
Message:

Nouvelle version des thermiques

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/thermcell_main.F90

    r1311 r1338  
    130130
    131131      real wmax(klon)
     132      real wmax_tmp(klon)
    132133      real wmax_sec(klon)
    133134      real fm0(klon,klev+1),entr0(klon,klev),detr0(klon,klev)
     
    191192
    192193
    193 ! #define wrgrads_thermcell
    194 #undef wrgrads_thermcell
     194#define wrgrads_thermcell
    195195#ifdef wrgrads_thermcell
    196196! Initialisation des sorties grads pour les thermiques.
     
    208208
    209209      fm=0. ; entr=0. ; detr=0.
     210
     211      print*,'THERMCELL MAIN OPT7'
    210212
    211213      icount=icount+1
     
    395397
    396398      elseif (iflag_thermals_ed<=19) then
    397 ! Version d'Arnaud Jam
    398 !         print*,'THERM RIO et al 2010'
     399!        print*,'THERM RIO et al 2010, version d Arnaud'
    399400         CALL thermcellV1_plume(itap,ngrid,nlay,ptimestep,ztv,zthl,po,zl,rhobarz,&
    400401     &    zlev,pplev,pphi,zpspsk,alim_star,alim_star_tot,  &
     
    426427      CALL thermcell_height(ngrid,nlay,lalim,lmin,linter,lmix,zw2,  &
    427428     &           zlev,lmax,zmax,zmax0,zmix,wmax,lev_out)
     429! Attention, w2 est transforme en sa racine carree dans cette routine
     430! Le probleme vient du fait que linter et lmix sont souvent égaux à 1.
     431      wmax_tmp=0.
     432      do  l=1,nlay
     433         wmax_tmp(:)=max(wmax_tmp(:),zw2(:,l))
     434      enddo
     435!     print*,"ZMAX ",lalim,lmin,linter,lmix,lmax,zmax,zmax0,zmix,wmax
    428436
    429437
     
    665673         enddo
    666674      enddo
    667 !calcul de ale_bl et alp_bl
    668 !pour le calcul d'une valeur integree entre la surface et lmax
    669       do ig=1,ngrid
    670       alp_int(ig)=0.
    671       ale_int(ig)=0.
    672       n_int(ig)=0
    673       enddo
    674 !
    675       do l=1,nlay
    676       do ig=1,ngrid
    677        if(l.LE.lmax(ig)) THEN
    678         alp_int(ig)=alp_int(ig)+0.5*rhobarz(ig,l)*wth3(ig,l)
    679         ale_int(ig)=ale_int(ig)+0.5*zw2(ig,l)**2
    680         n_int(ig)=n_int(ig)+1
    681        endif
    682       enddo
    683       enddo
     675!
    684676!      print*,'avant calcul ale et alp'
    685677!calcul de ALE et ALP pour la convection
     678      Alp_bl(:)=0.
     679      Ale_bl(:)=0.
     680!          print*,'ALE,ALP ,l,zw2(ig,l),Ale_bl(ig),Alp_bl(ig)'
     681      do l=1,nlay
    686682      do ig=1,ngrid
    687 !      Alp_bl(ig)=0.5*rhobarz(ig,lmix_bis(ig))*wth3(ig,lmix(ig))
    688 !          Alp_bl(ig)=0.5*rhobarz(ig,nivcon(ig))*wth3(ig,nivcon(ig))
    689 !      Alp_bl(ig)=0.5*rhobarz(ig,lmix(ig))*wth3(ig,lmix(ig))
    690 !     &           *0.1
    691 !valeur integree de alp_bl * 0.5:
    692        if (n_int(ig).gt.0) then
    693        Alp_bl(ig)=0.5*alp_int(ig)/n_int(ig)
    694 !       if (Alp_bl(ig).lt.0.) then
    695 !       Alp_bl(ig)=0.
    696        endif
    697 !       endif
    698 !         write(18,*),'rhobarz,wth3,Alp',rhobarz(ig,nivcon(ig)),
    699 !     s               wth3(ig,nivcon(ig)),Alp_bl(ig)
    700 !            write(18,*),'ALP_BL',Alp_bl(ig),lmix(ig)
    701 !      Ale_bl(ig)=0.5*zw2(ig,lmix_bis(ig))**2
    702 !      if (nivcon(ig).eq.1) then
    703 !       Ale_bl(ig)=0.
    704 !       else
    705 !valeur max de ale_bl:
    706        Ale_bl(ig)=0.5*zw2(ig,lmix(ig))**2
    707 !     & /2.
    708 !     & *0.1
    709 !        Ale_bl(ig)=0.5*zw2(ig,lmix_bis(ig))**2
    710 !       if (n_int(ig).gt.0) then
    711 !       Ale_bl(ig)=ale_int(ig)/n_int(ig)
    712 !        Ale_bl(ig)=4.
    713 !       endif
    714 !       endif
    715 !            Ale_bl(ig)=0.5*wth2(ig,lmix_bis(ig))
    716 !          Ale_bl(ig)=wth2(ig,nivcon(ig))
    717 !          write(19,*),'wth2,ALE_BL',wth2(ig,nivcon(ig)),Ale_bl(ig)
    718       enddo
     683           Alp_bl(ig)=max(Alp_bl(ig),0.5*rhobarz(ig,l)*wth3(ig,l) )
     684           Ale_bl(ig)=max(Ale_bl(ig),0.5*zw2(ig,l)**2)
     685!          print*,'ALE,ALP',l,zw2(ig,l),Ale_bl(ig),Alp_bl(ig)
     686      enddo
     687      enddo
     688
     689!     print*,'AAAAAAA ',Alp_bl,Ale_bl,lmix
     690
     691
     692! TEST. IL FAUT REECRIRE LES ALE et ALP
     693!     Ale_bl(:)=0.5*wmax(:)*wmax(:)
     694!     Alp_bl(:)=0.1*wmax(:)*wmax(:)*wmax(:)
     695
    719696!test:calcul de la ponderation des couches pour KE
    720697!initialisations
Note: See TracChangeset for help on using the changeset viewer.