48 integer(I4B),
allocatable,
dimension(:) :: kstp_list_print
49 integer(I4B),
allocatable,
dimension(:) :: kstp_list_save
50 integer(I4B) :: ifreq_print
51 integer(I4B) :: ifreq_save
52 logical :: print_first
58 logical :: save_detected
59 logical :: print_detected
79 if (
allocated(this%kstp_list_print))
deallocate (this%kstp_list_print)
80 if (
allocated(this%kstp_list_save))
deallocate (this%kstp_list_save)
81 allocate (this%kstp_list_print(0))
82 allocate (this%kstp_list_save(0))
85 this%save_first = .false.
86 this%save_last = .false.
87 this%save_all = .false.
88 this%print_first = .false.
89 this%print_last = .false.
90 this%print_all = .false.
91 this%save_detected = .false.
92 this%print_detected = .false.
104 subroutine rp(this, linein, iout)
107 character(len=*),
intent(in) :: linein
108 integer(I4B),
intent(in) :: iout
110 character(len=len(linein)) :: line
113 integer(I4B) :: lloc, istart, istop, ival
116 character(len=*),
parameter :: fmt_steps = &
117 &
"(6x,'THE FOLLOWING STEPS WILL BE ',A,': ',50(I0,' '))"
118 character(len=*),
parameter :: fmt_freq = &
119 &
"(6x,'THE FOLLOWING FREQUENCY WILL BE ',A,': ',I0)"
125 call urword(line, lloc, istart, istop, 1, ival, rval, 0, 0)
130 select case (line(istart:istop))
137 'Looking for PRINT or SAVE. Found:', trim(adjustl(line))
142 this%save_detected = ls
143 this%print_detected = lp
146 call urword(line, lloc, istart, istop, 1, ival, rval, 0, 0)
147 select case (line(istart:istop))
150 this%print_all = .true.
151 if (iout > 0)
write (iout,
"(6x,a)")
'ALL TIME STEPS WILL BE PRINTED'
154 this%save_all = .true.
155 if (iout > 0)
write (iout,
"(6x,a)")
'ALL TIME STEPS WILL BE SAVED'
159 call urword(line, lloc, istart, istop, 2, ival, rval, -1, 0)
162 n =
size(this%kstp_list_print)
164 this%kstp_list_print(n + 1) = ival
167 n =
size(this%kstp_list_save)
169 this%kstp_list_save(n + 1) = ival
176 if (lp)
write (iout, fmt_steps)
'PRINTED', this%kstp_list_print
177 if (ls)
write (iout, fmt_steps)
'SAVED', this%kstp_list_save
180 call urword(line, lloc, istart, istop, 2, ival, rval, -1, 0)
181 if (lp) this%ifreq_print = ival
182 if (ls) this%ifreq_save = ival
184 if (lp)
write (iout, fmt_freq)
'PRINTED', this%ifreq_print
185 if (ls)
write (iout, fmt_freq)
'SAVED', this%ifreq_save
189 this%print_first = .true.
190 if (iout > 0)
write (iout,
"(6x,a)")
'THE FIRST TIME STEP WILL BE PRINTED'
193 this%save_first = .true.
194 if (iout > 0)
write (iout,
"(6x,a)")
'THE FIRST TIME STEP WILL BE SAVED'
198 this%print_last = .true.
199 if (iout > 0)
write (iout,
"(6x,a)")
'THE LAST TIME STEP WILL BE PRINTED'
202 this%save_last = .true.
203 if (iout > 0)
write (iout,
"(6x,a)")
'THE LAST TIME STEP WILL BE SAVED'
207 'Looking for ALL, STEPS, FIRST, LAST, OR FREQUENCY. Found: ', &
224 integer(I4B),
intent(in) :: kstp
225 logical(LGP),
intent(in) :: endofperiod
232 if (endofperiod .and. this%print_last)
kstp_to_print = .true.
233 if (this%ifreq_print > 0)
then
236 n =
size(this%kstp_list_print)
239 if (kstp == this%kstp_list_print(i))
then
258 integer(I4B),
intent(in) :: kstp
259 logical(LGP),
intent(in) :: endofperiod
265 if (kstp == 1 .and. this%save_first)
kstp_to_save = .true.
266 if (endofperiod .and. this%save_last)
kstp_to_save = .true.
267 if (this%ifreq_save > 0)
then
268 if (mod(kstp, this%ifreq_save) == 0)
kstp_to_save = .true.
270 n =
size(this%kstp_list_save)
273 if (kstp == this%kstp_list_save(i))
then
This module defines variable data types.
This module contains the PrintSaveManagerModule.
logical function kstp_to_print(this, kstp, endofperiod)
@ brief Determine if it is time to print the data
subroutine rp(this, linein, iout)
@ brief Read and prepare for PrintSaveManager
logical function kstp_to_save(this, kstp, endofperiod)
@ brief Determine if it is time to save the data
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
@ brief PrintSaveManagerType