Changeset 1999 for LMDZ5/branches/testing/libf/phylmd/thermcell_dq.F90
- Timestamp:
- Mar 20, 2014, 10:57:19 AM (10 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 1922-1927,1929-1933,1937-1939,1943-1997
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/libf/phylmd/thermcell_dq.F90
r1910 r1999 40 40 41 41 ! Old explicite scheme 42 if (impl ==-1) then43 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, & 44 44 & masse,q,dq,qa,lev_out) 45 45 return … … 53 53 cfl=max(cfl,fm(ig,k)/zzm) 54 54 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' 57 57 CALL abort_gcm (modname,abort_message,1) 58 58 endif … … 124 124 else 125 125 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. 128 134 enddo 129 135 endif … … 144 150 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 145 151 146 subroutine thermcell_dq_o(ngrid,nlay, ptimestep,fm,entr, &152 subroutine thermcell_dq_o(ngrid,nlay,impl,ptimestep,fm,entr, & 147 153 & masse,q,dq,qa,lev_out) 148 154 implicit none … … 157 163 !======================================================================= 158 164 159 integer ngrid,nlay 165 integer ngrid,nlay,impl 160 166 161 167 real ptimestep … … 188 194 cfl=max(cfl,fm(ig,k)/zzm) 189 195 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' 192 198 CALL abort_gcm (modname,abort_message,1) 193 199 endif
Note: See TracChangeset
for help on using the changeset viewer.