phil-blain / CICE

Development repository for the CICE sea-ice model
Other
0 stars 0 forks source link

add input validation #27

Closed phil-blain closed 4 years ago

phil-blain commented 4 years ago

Add VP solver-specific section at ice_init.F90:950.

Probably should move the code in anderson_solver that resets im_andacc to zero to that section, because if not the subroutine arguments are declared using the im_andacc value from the namelist, before it is reset to 0.

phil-blain commented 4 years ago

will do #12 first.

phil-blain commented 4 years ago

added some in d154f90

must think if more is necessary.

phil-blain commented 4 years ago

@JFLemieux73 penses-tu que c'est suffisant ? une chose qu'on pourrait ajouter c'est s'assurer que tous les paramètres de namelist int_kind et dbl_kind du solveur :

integer (kind=int_kind), public :: &
         maxits_nonlin  , & ! max nb of iteration for nonlinear solver
         im_fgmres      , & ! size of fgmres Krylov subspace
         im_pgmres      , & ! size of pgmres Krylov subspace
         maxits_fgmres  , & ! max nb of iteration for fgmres
         maxits_pgmres  , & ! max nb of iteration for pgmres
         fpfunc_andacc  , & ! fixed point function for Anderson acceleration: 1: g(x) = FMGRES(A(x),b(x)), 2: g(x) = x - A(x)x + b(x)
         im_andacc      , & ! size of Anderson minimization matrix (number of saved previous residuals)
         start_andacc       ! acceleration delay factor (acceleration starts at this iteration)

      real (kind=dbl_kind), public :: &
         reltol_nonlin  , & ! nonlinear stopping criterion: reltol_nonlin*res(k=0)
         reltol_fgmres  , & ! fgmres stopping criterion: reltol_fgmres*res(k)
         reltol_pgmres  , & ! pgmres stopping criterion: reltol_pgmres*res(k)
         damping_andacc , & ! damping factor for Anderson acceleration
         reltol_andacc      ! relative tolerance for Anderson acceleration

sont positifs, mais ce genre de vérifications est en général pas fait pour les autres paramètres de namelist de CICE, donc pense-tu que ça vaut la peine ?

phil-blain commented 4 years ago

Conclusion: pas nécessaire.