Changeset 1503


Ignore:
Timestamp:
Mar 23, 2011, 12:57:52 PM (13 years ago)
Author:
idelkadi
Message:

Correction de bug et vectorisation de thermcell_plume.F90

File:
1 edited

Legend:

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

    r1403 r1503  
    3737      INTEGER lalim(ngrid)
    3838      integer lev_out                           ! niveau pour les print
     39      integer nbpb
    3940      real zcon2(ngrid)
    4041   
     
    153154               alim_star(ig,l)=MAX((ztv(ig,l)-ztv(ig,l+1)),0.)  &
    154155     &                       *sqrt(zlev(ig,l+1))
    155                lalim(:)=l+1
     156               lalim(ig)=l+1
    156157               alim_star_tot(ig)=alim_star_tot(ig)+alim_star(ig,l)
    157158            endif
     
    343344   do ig=1,ngrid
    344345      if (activetmp(ig)) then
    345         if (prt_level.ge.20) print*,'coucou calcul detr 4512: ig, l', ig, l
    346346! on ecrit de maniere conservative (sat ou non)
    347347!          T = Tl +Lv/Cp ql
     
    370370           zeps=(entr_star(ig,l)+alim_star(ig,l))/(f_star(ig,l)*zdz)
    371371
    372 if (1==0) then
    373            zw2modif=zw2(ig,l)*(1-fact_epsilon/(1.+fact_gamma)*2.*zdz)
    374            zdw2=2.*zbuoy/(1.+fact_gamma)*zdz
    375            zw2(ig,l+1)=zw2modif+zdw2
    376 else
     372!if (1==0) then
     373!           zw2modif=zw2(ig,l)*(1-fact_epsilon/(1.+fact_gamma)*2.*zdz)
     374!           zdw2=2.*zbuoy/(1.+fact_gamma)*zdz
     375!           zw2(ig,l+1)=zw2modif+zdw2
     376!else
    377377           zdrag=fact_epsilon/(zalpha**expa)
    378378           zw2fact=zbuoy/zdrag*a1
    379379           zw2(ig,l+1)=(zw2(ig,l)-zw2fact)*exp(-2.*zdrag/(1+fact_gamma)*zdz) &
    380380      &    +zw2fact
    381 
    382 
    383 endif
     381!endif
    384382
    385383      endif
     
    392390!---------------------------------------------------------------------------
    393391
     392   nbpb=0
    394393   do ig=1,ngrid
    395394            if (zw2(ig,l+1)>0. .and. zw2(ig,l+1).lt.1.e-10) then
    396395!               stop'On tombe sur le cas particulier de thermcell_dry'
    397                 print*,'On tombe sur le cas particulier de thermcell_plume'
     396!               print*,'On tombe sur le cas particulier de thermcell_plume'
     397                nbpb=nbpb+1
    398398                zw2(ig,l+1)=0.
    399399                linter(ig)=l+1
     
    418418        endif
    419419   enddo
     420
     421   if (nbpb>0) then
     422   print*,'WARNING on tombe ',nbpb,' x sur un pb pour l=',l,' dans thermcell_plume'
     423   endif
    420424
    421425!=========================================================================
     
    484488      INTEGER lalim(ngrid)
    485489      integer lev_out                           ! niveau pour les print
     490      integer nbpb
    486491   
    487492      real alim_star_tot(ngrid)
     
    760765   do ig=1,ngrid
    761766      if (activetmp(ig)) then
    762         if (prt_level.ge.20) print*,'coucou calcul detr 4512: ig, l', ig, l
    763767! on ecrit de maniere conservative (sat ou non)
    764768!          T = Tl +Lv/Cp ql
     
    786790!---------------------------------------------------------------------------
    787791
     792   nbpb=0
    788793   do ig=1,ngrid
    789794            if (zw2(ig,l+1)>0. .and. zw2(ig,l+1).lt.1.e-10) then
    790795!               stop'On tombe sur le cas particulier de thermcell_dry'
    791                 print*,'On tombe sur le cas particulier de thermcell_plume'
     796!               print*,'On tombe sur le cas particulier de thermcell_plume'
     797                nbpb=nbpb+1
    792798                zw2(ig,l+1)=0.
    793799                linter(ig)=l+1
     
    813819   enddo
    814820
     821   if (nbpb>0) then
     822   print*,'WARNING on tombe ',nbpb,' x sur un pb pour l=',l,' dans thermcell_plume'
     823   endif
     824
    815825!=========================================================================
    816826! FIN DE LA BOUCLE VERTICALE
Note: See TracChangeset for help on using the changeset viewer.