!/*@@
!
! $Id: input.f90,v 1.17 1997/06/04 20:18:58 mijan Exp haupt $
!
!@@*/

!/*@@
!   @routine read_parameters
!   @author Tomasz Haupt
!   @desc
!   reads parameters from a file
!   @enddescr
!   @var PIN
!   @vdesc logical number of the read unit (use 10 for file fort.10)
!   @vtype integer
!   @vio IN
!   @vcomment temporary quick solution; will be improved
!   @endvar 
!   @var params
!   @vdesc list of parameters to be read in
!   @vtype integer, dimension(100)
!   @vio OUT
!   @endvar 
!   @calledby main
!@@*/

subroutine  read_parameters(PIN, params)
use input_params
implicit none
integer PIN,i,inum
real*8, dimension(100) :: params

integer nparam
real*8,dimension(3) :: h

nparam=27

! ---------------------------
! Base Grid Parameters
! ---------------------------
! 1. nx
! 2. ny 
! 3. nz
! 4. dxmin
! 5. dxmax
! 6. dymin
! 7. dymax
! 8. dzmin
! 9. dzmax
! ---------------------------
! Evolution control
! ---------------------------
! 
! and then some other stuff ...
!


do i=1,nparam
   read(PIN,*) params(i), inum
   if(i /= inum) then
      write(*,*) "Input parameter ",i," is incorrect!"
      stop
   end if
enddo
