/[lmdze]/trunk/Sources/phylmd/CV30_routines/cv30_undilute1.f
ViewVC logotype

Diff of /trunk/Sources/phylmd/CV30_routines/cv30_undilute1.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/libf/phylmd/CV3_routines/cv3_undilute1.f90 revision 69 by guez, Mon Feb 18 16:33:12 2013 UTC trunk/Sources/phylmd/CV30_routines/cv30_undilute1.f revision 189 by guez, Tue Mar 29 15:20:23 2016 UTC
# Line 1  Line 1 
1    
2        SUBROUTINE cv3_undilute1(len,nd,t,q,qs,gz,plcl,p,nk,icb &        SUBROUTINE cv30_undilute1(len,nd,t,q,qs,gz,plcl,p,nk,icb &
3                               ,tp,tvp,clw,icbs)                               ,tp,tvp,clw,icbs)
4              use cv3_param_m              use cv30_param_m
5              use cvthermo              use cvthermo
6        implicit none        implicit none
7    
8        ! UNDILUTE (ADIABATIC) UPDRAFT / 1st part
9        ! (up through ICB for convect4, up through ICB + 1 for convect3)
10        ! Calculates the lifted parcel virtual temperature at nk, the
11        ! actual temperature, and the adiabatic liquid water content.
12    
13  !----------------------------------------------------------------  !----------------------------------------------------------------
14  ! Equivalent de TLIFT entre NK et ICB+1 inclus  ! Equivalent de TLIFT entre NK et ICB+1 inclus
15  !  !
# Line 20  Line 25 
25    
26    
27  ! inputs:  ! inputs:
28        integer len, nd        integer, intent(in):: len, nd
29        integer nk(len), icb(len)        integer nk(len), icb(len)
30        real, intent(in):: t(len,nd)        real, intent(in):: t(len,nd)
31        real q(len,nd), qs(len,nd), gz(len,nd)        real, intent(in):: q(len,nd), qs(len,nd), gz(len,nd)
32        real p(len,nd)        real, intent(in):: p(len,nd)
33        real plcl(len) ! convect3        real plcl(len) ! convect3
34    
35  ! outputs:  ! outputs:
# Line 33  Line 38 
38  ! local variables:  ! local variables:
39        integer i, k        integer i, k
40        integer icb1(len), icbs(len), icbsmax2 ! convect3        integer icb1(len), icbs(len), icbsmax2 ! convect3
41        real tg, qg, alv, s, ahg, tc, denom, es, rg        real tg, qg, alv, s, ahg, tc, denom, es
42        real ah0(len), cpp(len)        real ah0(len), cpp(len)
43        real tnk(len), qnk(len), gznk(len), ticb(len), gzicb(len)        real tnk(len), qnk(len), gznk(len), ticb(len), gzicb(len)
44        real qsicb(len) ! convect3        real qsicb(len) ! convect3
# Line 176  Line 181 
181           clw(i,icbs(i))=qnk(i)-qg           clw(i,icbs(i))=qnk(i)-qg
182           clw(i,icbs(i))=max(0.0,clw(i,icbs(i)))           clw(i,icbs(i))=max(0.0,clw(i,icbs(i)))
183    
          rg=qg/(1.-qnk(i))  
 ! ori         tvp(i,icb(i))=tp(i,icb(i))*(1.+rg*epsi)  
184  ! convect3: (qg utilise au lieu du vrai mixing ratio rg)  ! convect3: (qg utilise au lieu du vrai mixing ratio rg)
185           tvp(i,icbs(i))=tp(i,icbs(i))*(1.+qg/eps-qnk(i)) !whole thing           tvp(i,icbs(i))=tp(i,icbs(i))*(1.+qg/eps-qnk(i)) !whole thing
186    
# Line 198  Line 201 
201  !  !
202  ! * the routine above computes tvp from minorig to icbs (included).  ! * the routine above computes tvp from minorig to icbs (included).
203  !  !
204  ! * to compute buoybase (in cv3_trigger.F), both tvp(icb) and tvp(icb+1)  ! * to compute buoybase (in cv30_trigger.F), both tvp(icb) and tvp(icb+1)
205  !    must be known. This is the case if icbs=icb+1, but not if icbs=icb.  !    must be known. This is the case if icbs=icb+1, but not if icbs=icb.
206  !  !
207  ! * therefore, in the case icbs=icb, we compute tvp at level icb+1  ! * therefore, in the case icbs=icb, we compute tvp at level icb+1
208  !   (tvp at other levels will be computed in cv3_undilute2.F)  !   (tvp at other levels will be computed in cv30_undilute2.F)
209  !  !
210    
211          do i=1,len          do i=1,len
# Line 275  Line 278 
278           clw(i,icb(i)+1)=qnk(i)-qg           clw(i,icb(i)+1)=qnk(i)-qg
279           clw(i,icb(i)+1)=max(0.0,clw(i,icb(i)+1))           clw(i,icb(i)+1)=max(0.0,clw(i,icb(i)+1))
280    
          rg=qg/(1.-qnk(i))  
 ! ori         tvp(i,icb(i))=tp(i,icb(i))*(1.+rg*epsi)  
281  ! convect3: (qg utilise au lieu du vrai mixing ratio rg)  ! convect3: (qg utilise au lieu du vrai mixing ratio rg)
282           tvp(i,icb(i)+1)=tp(i,icb(i)+1)*(1.+qg/eps-qnk(i)) !whole thing           tvp(i,icb(i)+1)=tp(i,icb(i)+1)*(1.+qg/eps-qnk(i)) !whole thing
283    

Legend:
Removed from v.69  
changed lines
  Added in v.189

  ViewVC Help
Powered by ViewVC 1.1.21