145 class(TimeSeriesManagerType) :: this
147 type(TimeSeriesLinkType),
pointer :: tsLink => null()
148 type(TimeSeriesType),
pointer :: timeseries => null()
149 integer(I4B) :: i, nlinks, nauxlinks
150 real(DP) :: begintime, endtime, tsendtime
151 character(len=LENPACKAGENAME + 2) :: pkgID
153 character(len=*),
parameter :: fmt5 = &
154 "(/,'Time-series controlled values in stress period: ', i0, &
155 &', time step ', i0, ':')"
156 10
format(a,
' package: Boundary ', i0,
', entry ', i0, &
157 ' value from time series "', a,
'" = ', g12.5)
158 15
format(a,
' package: Boundary ', i0,
', entry ', i0, &
159 ' value from time series "', a,
'" = ', g12.5,
' (', a,
')')
160 20
format(a,
' package: Boundary ', i0,
', ', a, &
161 ' value from time series "', a,
'" = ', g12.5)
162 25
format(a,
' package: Boundary ', i0,
', ', a, &
163 ' value from time series "', a,
'" = ', g12.5,
' (', a,
')')
167 endtime = begintime + delt
170 nlinks = this%boundtslinks%Count()
171 nauxlinks = this%auxvartslinks%Count()
178 do while (i <= nauxlinks)
179 tslink => gettimeserieslinkfromlist(this%auxvarTsLinks, i)
180 timeseries => tslink%timeSeries
183 if (this%removeTsLinksOnCompletion)
then
184 tsendtime = timeseries%FindLatestTime(.true.)
185 if (tsendtime < begintime)
then
186 call this%auxvarTsLinks%RemoveNode(i, .true.)
187 nauxlinks = this%auxvartslinks%Count()
193 if (tslink%Iprpak == 1)
then
194 write (this%iout, fmt5) kper, kstp
197 tslink%BndElement = timeseries%GetValue(begintime, endtime, &
198 this%extendTsToEndOfSimulation)
201 if (tslink%Iprpak == 1)
then
202 pkgid =
'"'//trim(tslink%PackageName)//
'"'
203 if (tslink%Text ==
'')
then
204 if (tslink%BndName ==
'')
then
205 write (this%iout, 10) trim(pkgid), tslink%IRow, tslink%JCol, &
206 trim(tslink%timeSeries%Name), &
209 write (this%iout, 15) trim(pkgid), tslink%IRow, tslink%JCol, &
210 trim(tslink%timeSeries%Name), &
211 tslink%BndElement, trim(tslink%BndName)
214 if (tslink%BndName ==
'')
then
215 write (this%iout, 20) trim(pkgid), tslink%IRow, trim(tslink%Text), &
216 trim(tslink%timeSeries%Name), &
219 write (this%iout, 25) trim(pkgid), tslink%IRow, trim(tslink%Text), &
220 trim(tslink%timeSeries%Name), &
221 tslink%BndElement, trim(tslink%BndName)
233 do while (i <= nlinks)
234 tslink => gettimeserieslinkfromlist(this%boundTsLinks, i)
235 timeseries => tslink%timeSeries
238 if (this%removeTsLinksOnCompletion)
then
239 tsendtime = timeseries%FindLatestTime(.true.)
240 if (tsendtime < begintime)
then
241 call this%boundTsLinks%RemoveNode(i, .true.)
242 nlinks = this%boundTsLinks%Count()
247 if (i == 1 .and. nauxlinks == 0)
then
248 if (tslink%Iprpak == 1)
then
249 write (this%iout, fmt5) kper, kstp
255 if (tslink%UseDefaultProc)
then
256 timeseries => tslink%timeSeries
257 tslink%BndElement = timeseries%GetValue(begintime, endtime, &
258 this%extendTsToEndOfSimulation)
263 if (
associated(tslink%RMultiplier))
then
264 tslink%BndElement = tslink%BndElement * tslink%RMultiplier
268 if (tslink%Iprpak == 1)
then
269 pkgid =
'"'//trim(tslink%PackageName)//
'"'
270 if (tslink%Text ==
'')
then
271 if (tslink%BndName ==
'')
then
272 write (this%iout, 10) trim(pkgid), tslink%IRow, tslink%JCol, &
273 trim(tslink%timeSeries%Name), &
276 write (this%iout, 15) trim(pkgid), tslink%IRow, tslink%JCol, &
277 trim(tslink%timeSeries%Name), &
278 tslink%BndElement, trim(tslink%BndName)
281 if (tslink%BndName ==
'')
then
282 write (this%iout, 20) trim(pkgid), tslink%IRow, trim(tslink%Text), &
283 trim(tslink%timeSeries%Name), &
286 write (this%iout, 25) trim(pkgid), tslink%IRow, trim(tslink%Text), &
287 trim(tslink%timeSeries%Name), &
288 tslink%BndElement, trim(tslink%BndName)
294 if (tslink%ConvertFlux)
then
295 tslink%BndElement = tslink%BndElement * tslink%CellArea
303 if (nlinks + nauxlinks > 0)
then
304 if (tslink%Iprpak == 1)
then
305 write (this%iout,
'()')