Ignore:
Timestamp:
Jul 7, 2016, 9:12:29 AM (8 years ago)
Author:
flefevre
Message:

Optimisation des reglages du solveur chimique ASIS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/aeronomars/photochemistry_asis.F90

    r1569 r1571  
    201201
    202202   call define_dt(nesp, dt_corrected, dt_guess, ctimestep, cold(:), c(ilev,:),  &
    203                   mat1, prod, loss)
     203                  mat1, prod, loss, dens(ilev))
    204204
    205205   if (time + dt_corrected > ptimestep) then
     
    263263!================================================================
    264264
    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)
    266267
    267268!================================================================
     
    282283real (kind = 8), dimension(nesp,nesp) :: mat1
    283284real (kind = 8), dimension(nesp)      :: prod, loss
     285real (kind = 8)                       :: dens
    284286
    285287! output
     
    291293real (kind = 8), dimension(nesp)      :: cnew
    292294real (kind = 8), dimension(nesp,nesp) :: mat
    293 real (kind = 8) :: ratio, e, es, coef
     295real (kind = 8) :: atol, ratio, e, es, coef
    294296
    295297integer                  :: code, iesp, iter
     
    301303
    302304real (kind = 8), parameter :: dtmin   = 10.      ! minimum time step (s)
    303 real (kind = 8), parameter :: atol    = 1.e4     ! recommended value : 1.e4
     305real (kind = 8), parameter :: vmrtol  = 1.e-11   ! absolute tolerance on vmr
    304306real (kind = 8), parameter :: rtol    = 1./0.1   ! 1/rtol recommended value : 0.1-0.02
    305307integer,         parameter :: niter   = 3        ! number of iterations
     
    310312dttest = dtold   ! dttest = dtold = dt_guess
    311313
     314atol = vmrtol*dens ! absolute tolerance in molecule.cm-3
     315
    312316do iter = 1,niter
    313317
    314318if (fast_guess) then
    315319
    316 ! first guess : fast implicit method
     320! first guess : fast semi-implicit method
    317321
    318322   do iesp = 1, nesp
Note: See TracChangeset for help on using the changeset viewer.