m_dump.F90 495 Bytes
module m_dump
contains
subroutine dump(fname,sol)
   use mod_dimensions
   use mod_states
   implicit none
   type(states), intent(in) :: sol(ndim)
   character(len=*), intent(in) :: fname
   integer len

   inquire(iolength=len)kdim,ndim,sol
   open(10,file=fname,status='replace',form='unformatted',access='direct',recl=len)
      write(10,rec=1)kdim,ndim,sol
   close(10)
   open(11,file=trim(fname//'.dat'),form='formatted')
      write(11,*) sol
   close(11)
end subroutine dump
end module