136 class(TimeSeriesManagerType) :: this
138 type(TimeSeriesLinkType),
pointer :: tsLink => null()
139 type(TimeSeriesType),
pointer :: timeseries => null()
140 integer(I4B) :: i, nlinks, nauxlinks
141 real(DP) :: begintime, endtime, tsendtime
142 character(len=LENPACKAGENAME + 2) :: pkgID
144 character(len=*),
parameter :: fmt5 = &
145 "(/,'Time-series controlled values in stress period: ', i0, &
146 &', time step ', i0, ':')"
147 10
format(a,
' package: Boundary ', i0,
', entry ', i0, &
148 ' value from time series "', a,
'" = ', g12.5)
149 15
format(a,
' package: Boundary ', i0,
', entry ', i0, &
150 ' value from time series "', a,
'" = ', g12.5,
' (', a,
')')
151 20
format(a,
' package: Boundary ', i0,
', ', a, &
152 ' value from time series "', a,
'" = ', g12.5)
153 25
format(a,
' package: Boundary ', i0,
', ', a, &
154 ' value from time series "', a,
'" = ', g12.5,
' (', a,
')')
158 endtime = begintime + delt
161 nlinks = this%boundtslinks%Count()
162 nauxlinks = this%auxvartslinks%Count()
169 do while (i <= nauxlinks)
170 tslink => gettimeserieslinkfromlist(this%auxvarTsLinks, i)
171 timeseries => tslink%timeSeries
174 if (this%removeTsLinksOnCompletion)
then
175 tsendtime = timeseries%FindLatestTime(.true.)
176 if (tsendtime < begintime)
then
177 call this%auxvarTsLinks%RemoveNode(i, .true.)
178 nauxlinks = this%auxvartslinks%Count()
184 if (tslink%Iprpak == 1)
then
185 write (this%iout, fmt5) kper, kstp
188 tslink%BndElement = timeseries%GetValue(begintime, endtime, &
189 this%extendTsToEndOfSimulation)
192 if (tslink%Iprpak == 1)
then
193 pkgid =
'"'//trim(tslink%PackageName)//
'"'
194 if (tslink%Text ==
'')
then
195 if (tslink%BndName ==
'')
then
196 write (this%iout, 10) trim(pkgid), tslink%IRow, tslink%JCol, &
197 trim(tslink%timeSeries%Name), &
200 write (this%iout, 15) trim(pkgid), tslink%IRow, tslink%JCol, &
201 trim(tslink%timeSeries%Name), &
202 tslink%BndElement, trim(tslink%BndName)
205 if (tslink%BndName ==
'')
then
206 write (this%iout, 20) trim(pkgid), tslink%IRow, trim(tslink%Text), &
207 trim(tslink%timeSeries%Name), &
210 write (this%iout, 25) trim(pkgid), tslink%IRow, trim(tslink%Text), &
211 trim(tslink%timeSeries%Name), &
212 tslink%BndElement, trim(tslink%BndName)
224 do while (i <= nlinks)
225 tslink => gettimeserieslinkfromlist(this%boundTsLinks, i)
226 timeseries => tslink%timeSeries
229 if (this%removeTsLinksOnCompletion)
then
230 tsendtime = timeseries%FindLatestTime(.true.)
231 if (tsendtime < begintime)
then
232 call this%boundTsLinks%RemoveNode(i, .true.)
233 nlinks = this%boundTsLinks%Count()
238 if (i == 1 .and. nauxlinks == 0)
then
239 if (tslink%Iprpak == 1)
then
240 write (this%iout, fmt5) kper, kstp
246 if (tslink%UseDefaultProc)
then
247 timeseries => tslink%timeSeries
248 tslink%BndElement = timeseries%GetValue(begintime, endtime, &
249 this%extendTsToEndOfSimulation)
254 if (
associated(tslink%RMultiplier))
then
255 tslink%BndElement = tslink%BndElement * tslink%RMultiplier
259 if (tslink%Iprpak == 1)
then
260 pkgid =
'"'//trim(tslink%PackageName)//
'"'
261 if (tslink%Text ==
'')
then
262 if (tslink%BndName ==
'')
then
263 write (this%iout, 10) trim(pkgid), tslink%IRow, tslink%JCol, &
264 trim(tslink%timeSeries%Name), &
267 write (this%iout, 15) trim(pkgid), tslink%IRow, tslink%JCol, &
268 trim(tslink%timeSeries%Name), &
269 tslink%BndElement, trim(tslink%BndName)
272 if (tslink%BndName ==
'')
then
273 write (this%iout, 20) trim(pkgid), tslink%IRow, trim(tslink%Text), &
274 trim(tslink%timeSeries%Name), &
277 write (this%iout, 25) trim(pkgid), tslink%IRow, trim(tslink%Text), &
278 trim(tslink%timeSeries%Name), &
279 tslink%BndElement, trim(tslink%BndName)
285 if (tslink%ConvertFlux)
then
286 tslink%BndElement = tslink%BndElement * tslink%CellArea
294 if (nlinks + nauxlinks > 0)
then
295 if (tslink%Iprpak == 1)
then
296 write (this%iout,
'()')