Ignore:
Timestamp:
Dec 14, 2015, 11:43:09 AM (9 years ago)
Author:
Laurent Fairhead
Message:

Merged trunk changes r2298:2396 into testing branch

Location:
LMDZ5/branches/testing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing

  • LMDZ5/branches/testing/libf/phylmd/thermcell_plume.F90

    r2298 r2408  
    1313USE IOIPSL, ONLY : getin
    1414
     15       USE print_control_mod, ONLY: prt_level
    1516       IMPLICIT NONE
    1617
     
    1819#include "YOETHF.h"
    1920#include "FCTTRE.h"
    20 #include "iniprint.h"
    2121#include "thermcell.h"
    2222
     
    8282      real zbuoyjam(ngrid,klev),zdqtjam(ngrid,klev)
    8383      real zbuoybis,zdz2,zdz3,lmel,entrbis,zdzbis
     84      real d_temp(ngrid)
    8485      real ztv1,ztv2,factinv,zinv,zlmel
    8586      real zlmelup,zlmeldwn,zlt,zltdwn,zltup
     
    104105      REAL,SAVE :: detr_q_power,detr_q_power_omp=0.5
    105106      REAL,SAVE :: mix0,mix0_omp=0.
     107      INTEGER,SAVE :: thermals_flag_alim,thermals_flag_alim_omp=0
    106108
    107109      LOGICAL, SAVE :: first=.true.
     
    127129     CALL getin('thermals_detr_q_power',detr_q_power_omp)
    128130     CALL getin('thermals_mix0',mix0_omp)
     131     CALL getin('thermals_flag_alim',thermals_flag_alim_omp)
    129132!    CALL getin('thermals_X',X_omp)
    130133!    X=X_omp
     
    140143     detr_q_power=detr_q_power_omp
    141144     mix0=mix0_omp
     145     thermals_flag_alim=thermals_flag_alim_omp
    142146      first=.false.
    143147      ENDIF
     
    188192      lmix_bis(:)=2
    189193      wmaxa(:)=0.
    190       lalim(:)=1
    191194
    192195
     
    195198! couches sont instables.
    196199!-------------------------------------------------------------------------
     200
    197201      active(:)=ztv(:,1)>ztv(:,2)
    198 
    199 !-------------------------------------------------------------------------
    200 ! Definition de l'alimentation a l'origine dans thermcell_init
    201 !-------------------------------------------------------------------------
    202       do l=1,klev-1
    203          do ig=1,ngrid
    204             if (ztv(ig,l)> ztv(ig,l+1) .and. ztv(ig,1)>=ztv(ig,l) ) then
    205                alim_star(ig,l)=MAX((ztv(ig,l)-ztv(ig,l+1)),0.)  &
    206      &                       *sqrt(zlev(ig,l+1))
    207                lalim(ig)=l+1
    208                alim_star_tot(ig)=alim_star_tot(ig)+alim_star(ig,l)
    209 !               print*,'alim2',l,ztv(ig,l),ztv(ig,l+1),alim_star(ig,l)
    210             endif
    211          enddo
    212       enddo
    213       do l=1,klev
    214          do ig=1,ngrid
    215             if (alim_star_tot(ig) > 1.e-10 ) then
    216                alim_star(ig,l)=alim_star(ig,l)/alim_star_tot(ig)
    217             endif
    218          enddo
    219       enddo
    220       alim_star_tot(:)=1.
    221 
    222 
    223 
     202      d_temp(:)=0. ! Pour activer un contraste de temperature a la base
     203                   ! du panache
     204!  Cet appel pourrait être fait avant thermcell_plume dans thermcell_main
     205      CALL thermcell_alim(thermals_flag_alim,ngrid,klev,ztv,d_temp,zlev,alim_star,lalim)
    224206
    225207!------------------------------------------------------------------------------
     
    811793!--------------------------------------------------------------------------
    812794
     795      USE print_control_mod, ONLY: prt_level
    813796      IMPLICIT NONE
    814797
     
    816799#include "YOETHF.h"
    817800#include "FCTTRE.h"
    818 #include "iniprint.h"
    819801#include "thermcell.h"
    820802
Note: See TracChangeset for help on using the changeset viewer.