78 class(HeadFileReaderType) :: this
79 logical,
intent(out) :: success
80 integer(I4B),
intent(in),
optional :: iout_opt
82 integer(I4B) :: iostat, iout
83 integer(I4B) :: ncol, nrow, ilay
85 if (
present(iout_opt))
then
96 read (this%inunit, iostat=iostat) this%kstp, this%kper, this%pertim, &
97 this%totim, this%text, ncol, nrow, ilay
100 if (iostat < 0) this%endoffile = .true.
105 if (.not.
allocated(this%head))
then
106 allocate (this%head(ncol * nrow))
108 if (
size(this%head) /= ncol * nrow)
then
109 deallocate (this%head)
110 allocate (this%head(ncol * nrow))
115 read (this%inunit) this%head
118 if (.not. this%endoffile)
then
119 read (this%inunit, iostat=iostat) this%kstpnext, this%kpernext
120 if (iostat == 0)
then
122 else if (iostat < 0)
then
123 this%endoffile = .true.