| 1 | SUBROUTINE thermcell_down(ngrid,nlay,po,pt,pu,pv,pplay, & |
|---|
| 2 | & pplev,deltaz,lmax,fup,eup,dup) |
|---|
| 3 | |
|---|
| 4 | !-------------------------------------------------------------- |
|---|
| 5 | !thermcell_env: calcule les caracteristiques de l environnement |
|---|
| 6 | !necessaires au calcul des proprietes dans le thermique |
|---|
| 7 | !-------------------------------------------------------------- |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | USE thermcell_ini_mod, ONLY : prt_level,RLvCp,RKAPPA,RETV |
|---|
| 11 | IMPLICIT NONE |
|---|
| 12 | |
|---|
| 13 | ! arguments |
|---|
| 14 | |
|---|
| 15 | integer,intent(in) :: ngrid,nlay |
|---|
| 16 | real,intent(in), dimension(ngrid,nlay) :: po,pt,pu,pv,pplay,eup,dup,deltaz |
|---|
| 17 | real,intent(in), dimension(ngrid,nlay+1) :: pplev,fup |
|---|
| 18 | integer, intent(in), dimension(ngrid) :: lmax |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | ! Local |
|---|
| 23 | |
|---|
| 24 | real, dimension(ngrid,nlay) :: edn,ddn |
|---|
| 25 | real, dimension(ngrid,nlay+1) :: fdn |
|---|
| 26 | |
|---|
| 27 | integer ig,ilay |
|---|
| 28 | real dqsat_dT |
|---|
| 29 | logical mask(ngrid,nlay) |
|---|
| 30 | |
|---|
| 31 | edn(:,:)=0. |
|---|
| 32 | ddn(:,:)=0. |
|---|
| 33 | fdn(:,:)=0. |
|---|
| 34 | |
|---|
| 35 | ! lmax : indice de la derniere couche ou les thermiques sont actifs |
|---|
| 36 | |
|---|
| 37 | ! Convention de flux : fdn négatif vers le bas |
|---|
| 38 | ! Pas évident qu'on veuille conserver ce choix |
|---|
| 39 | |
|---|
| 40 | print*,'LMAX ',lmax(1) |
|---|
| 41 | do ilay=nlay+1,1,-1 |
|---|
| 42 | do ig=1,ngrid |
|---|
| 43 | if (ilay.le.lmax(ig)) then |
|---|
| 44 | edn(ig,ilay)=0.5*dup(ig,ilay)*deltaz(ig,ilay) |
|---|
| 45 | ddn(ig,ilay)=0. |
|---|
| 46 | fdn(ig,ilay)=-(-fdn(ig,ilay+1)+edn(ig,ilay)-ddn(ig,ilay)) |
|---|
| 47 | endif |
|---|
| 48 | enddo |
|---|
| 49 | enddo |
|---|
| 50 | |
|---|
| 51 | ! Suite du travail : |
|---|
| 52 | ! Ecrire la conservervation de theta_l dans le panache descendant |
|---|
| 53 | ! Eventuellement faire la transformation theta_l -> theta_v |
|---|
| 54 | ! Si l'air est sec (et qu'on oublie le côté theta_v) on peut |
|---|
| 55 | ! se contenter de conserver theta. |
|---|
| 56 | ! |
|---|
| 57 | ! Connaissant thetadn, on peut calculer la flotabilité. |
|---|
| 58 | ! Connaissant la flotabilité, on peut calculer w de proche en proche |
|---|
| 59 | ! On peut calculer le detrainement de facon à garder alpha*rho = cste |
|---|
| 60 | ! On en déduit l'entrainement latéral |
|---|
| 61 | ! C'est le modèle des mini-projets. |
|---|
| 62 | |
|---|
| 63 | !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|---|
| 64 | ! Initialisations : |
|---|
| 65 | !------------------ |
|---|
| 66 | |
|---|
| 67 | |
|---|
| 68 | ! |
|---|
| 69 | RETURN |
|---|
| 70 | END |
|---|