--- trunk/libf/dyn3d/iniadvtrac.f90 2008/08/07 12:29:13 18 +++ trunk/libf/dyn3d/iniadvtrac.f90 2011/01/06 17:52:19 38 @@ -18,7 +18,7 @@ contains - subroutine iniadvtrac(nq) + subroutine iniadvtrac ! From dyn3d/iniadvtrac.F, version 1.3 2005/04/13 08:58:34 @@ -26,8 +26,10 @@ ! Modification spéciale traceur F. Forget 05/94 ! Modification M.-A. Filiberti 02/02 lecture de "traceur.def" ! Modification de l'intégration de "q" (26/04/94) + ! Pour Van-Leer plus vapeur d'eau saturée : iadv(1)=4 + ! Pour Van-Leer : iadv=10 - integer, intent(out), optional:: nq + use nr_util, only: assert ! Variables local to the procedure: @@ -91,7 +93,7 @@ endif tnom(iq)=str1 tname(iq)=tnom(iq) - str2=tnom(iq) + str2=tnom(iq) ttext(iq) = trim(str2) // descrq(iadv(iq)) end do @@ -103,24 +105,20 @@ print *, 'Ouverture de "traceur.def" ok' read(unit=90, fmt=*) nq_local print *, 'nombre de traceurs ', nq_local - if (nq_local > nqmx) then - print *, 'nombre de traceurs trop important' - print *, 'verifier traceur.def' - stop 1 - endif + call assert(nq_local == nqmx, "iniadvtrac nq_local") - do iq=1, nq_local + do iq=1, nqmx read(90, 999) hadv(iq), vadv(iq), tnom(iq) end do close(90) PRINT *, 'lecture de traceur.def :' - do iq=1, nq_local + do iq=1, nqmx write(*, *) hadv(iq), vadv(iq), tnom(iq) end do else print *, 'Problème à l''ouverture de "traceur.def"' print *, 'Attention : on prend des valeurs par défaut.' - nq_local = 4 + call assert(nqmx == 4, "iniadvtrac nqmx") hadv(1) = 14 vadv(1) = 14 tnom(1) = 'H2Ov' @@ -135,7 +133,7 @@ tnom(4) = 'PB' ENDIF PRINT *, 'Valeur de traceur.def :' - do iq=1, nq_local + do iq=1, nqmx write(*, *) hadv(iq), vadv(iq), tnom(iq) end do @@ -143,7 +141,7 @@ ! détemine le nom long : iiq=0 ii=0 - do iq=1, nq_local + do iq=1, nqmx iiq=iiq+1 if (hadv(iq) /= vadv(iq)) then if (hadv(iq) == 10.and.vadv(iq) == 16) then @@ -209,7 +207,6 @@ niadv(iiq)=iq endif end do - if (present(nq)) nq = nq_local 999 format (i2, 1x, i2, 1x, a8)