Changeset 1985


Ignore:
Timestamp:
Feb 19, 2014, 6:53:24 AM (10 years ago)
Author:
fhourdin
Message:

Modification de du schéma implicite des thermique pour que la concentration

soit inchangée en cas de flux de masse uniformément nul.

Implicit scheme for thermal plume modified to keep unchanged the concentration

when the mass flux is zero.

File:
1 edited

Legend:

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

    r1943 r1985  
    4040
    4141! Old explicite scheme
    42       if (impl==-1) then
    43          call thermcell_dq_o(ngrid,nlay,ptimestep,fm,entr,  &
     42      if (impl<=-1) then
     43         call thermcell_dq_o(ngrid,nlay,impl,ptimestep,fm,entr,  &
    4444     &           masse,q,dq,qa,lev_out)
    4545         return
     
    124124   else
    125125      do k=nlay-1,1,-1
    126          q(:,k)=(masse(:,k)*q(:,k)/ptimestep+fqa(:,k)-fqa(:,k+1)+fm(:,k+1)*q(:,k+1)) &
    127      &               /(fm(:,k)+masse(:,k)/ptimestep)
     126! FH debut de modif : le calcul ci dessous modifiait numériquement
     127! la concentration quand le flux de masse etait nul car on divisait
     128! puis multipliait par masse/ptimestep.
     129!        q(:,k)=(masse(:,k)*q(:,k)/ptimestep+fqa(:,k)-fqa(:,k+1)+fm(:,k+1)*q(:,k+1)) &
     130!    &               /(fm(:,k)+masse(:,k)/ptimestep)
     131         q(:,k)=(q(:,k)+ptimestep/masse(:,k)*(fqa(:,k)-fqa(:,k+1)+fm(:,k+1)*q(:,k+1))) &
     132      &               /(1.+fm(:,k)*ptimestep/masse(:,k))
     133! FH fin de modif.
    128134      enddo
    129135   endif
     
    144150!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    145151
    146       subroutine thermcell_dq_o(ngrid,nlay,ptimestep,fm,entr,  &
     152      subroutine thermcell_dq_o(ngrid,nlay,impl,ptimestep,fm,entr,  &
    147153     &           masse,q,dq,qa,lev_out)
    148154      implicit none
     
    157163!=======================================================================
    158164
    159       integer ngrid,nlay
     165      integer ngrid,nlay,impl
    160166
    161167      real ptimestep
Note: See TracChangeset for help on using the changeset viewer.