Ignore:
Timestamp:
Mar 20, 2014, 10:57:19 AM (10 years ago)
Author:
Laurent Fairhead
Message:

Merged trunk changes r1920:1997 into testing branch

Location:
LMDZ5/branches/testing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing

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

    r1910 r1999  
    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
     
    5353            cfl=max(cfl,fm(ig,k)/zzm)
    5454            if (entr(ig,k).gt.zzm) then
    55                print*,'entr dt > m ',entr(ig,k)*ptimestep,masse(ig,k)
    56                abort_message = ''
     55               print*,'entr*dt>m,1',k,entr(ig,k)*ptimestep,masse(ig,k)
     56               abort_message = 'entr dt > m, 1st'
    5757               CALL abort_gcm (modname,abort_message,1)
    5858            endif
     
    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
     
    188194            cfl=max(cfl,fm(ig,k)/zzm)
    189195            if (entr(ig,k).gt.zzm) then
    190                print*,'entr dt > m ',entr(ig,k)*ptimestep,masse(ig,k)
    191                abort_message = ''
     196               print*,'entr*dt>m,2',k,entr(ig,k)*ptimestep,masse(ig,k)
     197               abort_message = 'entr dt > m, 2nd'
    192198               CALL abort_gcm (modname,abort_message,1)
    193199            endif
Note: See TracChangeset for help on using the changeset viewer.