Changeset 4396


Ignore:
Timestamp:
Jan 24, 2023, 2:16:46 PM (16 months ago)
Author:
evignon
Message:

Attention les yeux, commission qui enterine la premiere version
operationnelle des downdrafts dans LMDZ. Speciale dedicace a Fleur

Location:
LMDZ6/trunk/libf/phylmd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/thermcell_down.F90

    r4383 r4396  
    1    SUBROUTINE thermcell_updown_dq(ngrid,nlay,ptimestep,lmax,eup,dup,edn,ddn,masse,trac)
     1   SUBROUTINE thermcell_updown_dq(ngrid,nlay,ptimestep,lmax,eup,dup,edn,ddn,masse,trac,dtrac)
    22
    33!-----------------------------------------------------------------
     
    2525   real,intent(in), dimension(ngrid,nlay) :: ddn ! detrainment from downdrafts * dz [same unit as flux]
    2626   real,intent(in), dimension(ngrid,nlay) :: masse ! mass of layers = rho dz
    27    real,intent(inout), dimension(ngrid,nlay) :: trac ! tracer
     27   real,intent(in), dimension(ngrid,nlay) :: trac ! tracer
    2828   integer, intent(in), dimension(ngrid) :: lmax ! max level index at which downdraft are present
     29   real,intent(out),dimension(ngrid,nlay) ::dtrac ! tendance du traceur
    2930
    3031   
     
    3233
    3334   real, dimension(ngrid,nlay+1) :: fup,fdn,fthu,fthd,fthe,fthtot
    34    real, dimension(ngrid,nlay) :: tracu,tracd,dtrac
     35   real, dimension(ngrid,nlay) :: tracu,tracd
    3536   real :: www
    3637   integer ig,ilay
     
    6869   do ilay=1,nlay,1
    6970      do ig=1,ngrid
    70          if (ilay.le.lmax(ig) .and. lmax(ig)>1) then
     71         if (ilay.lt.lmax(ig) .and. lmax(ig)>1) then
    7172            fup(ig,ilay+1)=fup(ig,ilay)+eup(ig,ilay)-dup(ig,ilay)
    7273            if (ilay == 1 ) then
     
    8384      enddo
    8485   enddo
    85    !Boucle pour calculer le flux up
     86   !Boucle pour calculer le flux du traceur flux updraft, flux downdraft, flux compensatoire
    8687   do ilay=2,nlay,1
    8788     do ig=1,ngrid
     
    9596       endif
    9697       fthe(ig,ilay)=-(fup(ig,ilay)-fdn(ig,ilay))*trac(ig,ilay)
     98       !! si on voulait le prendre en compte on
     99       !fthe(ig,ilay)=-(fup(ig,ilay)-fdn(ig,ilay))*trac(ig,ilay-1)
    97100       fthtot(ig,ilay)=fthu(ig,ilay)+fthd(ig,ilay)+fthe(ig,ilay)
    98101     enddo
     
    101104   do ilay=1,nlay,1
    102105     do ig=1,ngrid
    103        dtrac(ig,ilay)=(fthtot(ig,ilay)-fthtot(ig,ilay+1))*(ptimestep/masse(ig,ilay))
     106       dtrac(ig,ilay)=(fthtot(ig,ilay)-fthtot(ig,ilay+1))*(1./masse(ig,ilay))
    104107!       trac(ig,ilay)=trac(ig,ilay) + (fthtot(ig,ilay)-fthtot(ig,ilay+1))*(ptimestep/masse(ig,ilay))
    105108     enddo
    106109   enddo
    107    if (1==0) then
    108     do ilay=1,nlay,1
    109      do ig=1,ngrid
    110        trac(ig,ilay)=trac(ig,ilay) + (fup(ig,ilay)*tracu(ig,ilay-1)-fup(ig,ilay+1)*tracu(ig,ilay) + &
    111        & (fup(ig,ilay+1)+fdn(ig,ilay+1))*trac(ig,ilay+1) - (fup(ig,ilay)+fdn(ig,ilay))*trac(ig,ilay) + &
    112        & fdn(ig,ilay+1)*tracd(ig,ilay+1)-fdn(ig,ilay)*tracd(ig,ilay))*(ptimestep/masse(ig,ilay))
    113      enddo
    114     enddo
    115    endif
    116110! Il reste a coder :
    117111! d(rho trac)/dt = - d/dz(rho w'trac')
  • LMDZ6/trunk/libf/phylmd/thermcell_main.F90

    r4381 r4396  
    479479      endif
    480480
     481!------------------------------------------------------------------
     482! Calcul de la fraction de l'ascendance
     483!------------------------------------------------------------------
     484      do ig=1,ngrid
     485         fraca(ig,1)=0.
     486         fraca(ig,nlay+1)=0.
     487      enddo
     488      do l=2,nlay
     489         do ig=1,ngrid
     490            if (zw2(ig,l).gt.1.e-10) then
     491            fraca(ig,l)=fm(ig,l)/(rhobarz(ig,l)*zw2(ig,l))
     492            else
     493            fraca(ig,l)=0.
     494            endif
     495         enddo
     496      enddo
     497     
    481498!c------------------------------------------------------------------
    482499!   calcul du transport vertical
     
    485502        print*,'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
    486503        print*,'WARNING !!! routine thermcell_down en cours de developpement'
    487         CALL thermcell_updown_dq(ngrid,nlay,ptimestep,lmax,entr0,detr0,0.5*detr0,0.5*entr0,masse,zthl)
    488       ENDIF
     504        ! on veut transporter la temperature potentielle, l'eau totale, qté de mouvement
     505        CALL thermcell_updown_dq(ngrid,nlay,ptimestep,lmax,entr0,detr0,0.5*detr0,0.5*entr0,masse,zthl,zdthladj)
     506        CALL thermcell_updown_dq(ngrid,nlay,ptimestep,lmax,entr0,detr0,0.5*detr0,0.5*entr0,masse,po,pdoadj)
     507        CALL thermcell_updown_dq(ngrid,nlay,ptimestep,lmax,entr0,detr0,0.5*detr0,0.5*entr0,masse,zu,pduadj)
     508        CALL thermcell_updown_dq(ngrid,nlay,ptimestep,lmax,entr0,detr0,0.5*detr0,0.5*entr0,masse,zv,pdvadj)
     509      ELSE
    489510      !--------------------------------------------------------------
    490511
    491       call thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse,  &
    492      &                    zthl,zdthladj,zta,lev_out)
    493       call thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse,  &
    494      &                   po,pdoadj,zoa,lev_out)
     512        call thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse,  &
     513        &                    zthl,zdthladj,zta,lev_out)
     514        call thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse,  &
     515        &                   po,pdoadj,zoa,lev_out)
    495516
    496517#ifdef ISO
     
    534555
    535556
    536 
    537 !------------------------------------------------------------------
    538 ! Calcul de la fraction de l'ascendance
    539 !------------------------------------------------------------------
    540       do ig=1,ngrid
    541          fraca(ig,1)=0.
    542          fraca(ig,nlay+1)=0.
    543       enddo
    544       do l=2,nlay
    545          do ig=1,ngrid
    546             if (zw2(ig,l).gt.1.e-10) then
    547             fraca(ig,l)=fm(ig,l)/(rhobarz(ig,l)*zw2(ig,l))
    548             else
    549             fraca(ig,l)=0.
    550             endif
    551          enddo
    552       enddo
    553      
    554557!------------------------------------------------------------------
    555558!  calcul du transport vertical du moment horizontal
     
    576579
    577580      endif
     581    ENDIF
    578582
    579583!     print*,'13 OK convect8'
Note: See TracChangeset for help on using the changeset viewer.