Changeset 1571
- Timestamp:
- Jul 7, 2016, 9:12:29 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/aeronomars/photochemistry_asis.F90
r1569 r1571 201 201 202 202 call define_dt(nesp, dt_corrected, dt_guess, ctimestep, cold(:), c(ilev,:), & 203 mat1, prod, loss )203 mat1, prod, loss, dens(ilev)) 204 204 205 205 if (time + dt_corrected > ptimestep) then … … 263 263 !================================================================ 264 264 265 subroutine define_dt(nesp, dtnew, dtold, ctimestep, cold, ccur, mat1, prod, loss) 265 subroutine define_dt(nesp, dtnew, dtold, ctimestep, cold, ccur, mat1, & 266 prod, loss, dens) 266 267 267 268 !================================================================ … … 282 283 real (kind = 8), dimension(nesp,nesp) :: mat1 283 284 real (kind = 8), dimension(nesp) :: prod, loss 285 real (kind = 8) :: dens 284 286 285 287 ! output … … 291 293 real (kind = 8), dimension(nesp) :: cnew 292 294 real (kind = 8), dimension(nesp,nesp) :: mat 293 real (kind = 8) :: ratio, e, es, coef295 real (kind = 8) :: atol, ratio, e, es, coef 294 296 295 297 integer :: code, iesp, iter … … 301 303 302 304 real (kind = 8), parameter :: dtmin = 10. ! minimum time step (s) 303 real (kind = 8), parameter :: atol = 1.e4 ! recommended value : 1.e4305 real (kind = 8), parameter :: vmrtol = 1.e-11 ! absolute tolerance on vmr 304 306 real (kind = 8), parameter :: rtol = 1./0.1 ! 1/rtol recommended value : 0.1-0.02 305 307 integer, parameter :: niter = 3 ! number of iterations … … 310 312 dttest = dtold ! dttest = dtold = dt_guess 311 313 314 atol = vmrtol*dens ! absolute tolerance in molecule.cm-3 315 312 316 do iter = 1,niter 313 317 314 318 if (fast_guess) then 315 319 316 ! first guess : fast implicit method320 ! first guess : fast semi-implicit method 317 321 318 322 do iesp = 1, nesp
Note: See TracChangeset
for help on using the changeset viewer.