m_dump_ens.F90 519 Bytes
module m_dump_ens
contains
subroutine dump_ens(fname,sol,nrsamp)
   use mod_dimensions
   use mod_states
   implicit none
   integer, intent(in) :: nrsamp
   type(states), intent(in) :: sol(nrsamp)
   character(len=*), intent(in) :: fname
   integer len,iens

   inquire(iolength=len)kdim,nrsamp,sol(1)
   open(10,file=fname,status='replace',form='unformatted',access='direct',recl=len)
      do iens=1,nrsamp
         write(10,rec=iens)kdim,nrsamp,sol(iens)
      enddo
   close(10)
end subroutine dump_ens
end module