Call this each time step or subtime step.
103
104 class(TimeArraySeriesManagerType) :: this
105
106 type(TimeArraySeriesLinkType), pointer :: tasLink => null()
107 type(TimeArraySeriesType), pointer :: timearrayseries => null()
108 integer(I4B) :: i, j, nlinks, nvals, isize1, isize2, inunit
109 real(DP) :: begintime, endtime
110
111 character(len=*), parameter :: fmt5 = &
112 "(/,'Time-array-series controlled arrays in stress period ', &
113 &i0, ', time step ', i0, ':')"
11410 format('"', a, '" package: ', a, ' array obtained from time-array series "', &
115 a, '"')
116
117
118 begintime = totimc
119 endtime = begintime + delt
120
121
122
123
124 if (associated(this%boundTasLinks)) then
125 nlinks = this%boundTasLinks%Count()
126 do i = 1, nlinks
127 taslink => gettimearrayserieslinkfromlist(this%boundTasLinks, i)
128 if (taslink%Iprpak == 1 .and. i == 1) then
129 write (this%iout, fmt5) kper, kstp
130 end if
131 if (taslink%UseDefaultProc) then
132 timearrayseries => taslink%timeArraySeries
133 nvals = size(taslink%BndArray)
134
135
136 call timearrayseries%GetAverageValues(nvals, taslink%BndArray, &
137 begintime, endtime)
138
139
140 if (taslink%ConvertFlux) then
141 call this%tasmgr_convert_flux(taslink)
142 end if
143
144
145
146 if (taslink%Iprpak == 1) then
147 write (this%iout, 10) trim(taslink%PackageName), &
148 trim(taslink%Text), &
149 trim(taslink%timeArraySeries%Name)
150 end if
151 end if
152 if (i == nlinks) then
153 write (this%iout, '()')
154 end if
155 end do
156
157
158
159 do i = 1, nlinks
160 taslink => gettimearrayserieslinkfromlist(this%boundTasLinks, i)
161 if (taslink%UseDefaultProc) then
162 if (associated(taslink%RMultArray)) then
163 isize1 = size(taslink%BndArray)
164 isize2 = size(taslink%RMultArray)
165 if (isize1 == isize2 .and. isize1 == nvals) then
166 do j = 1, nvals
167 taslink%BndArray(j) = taslink%BndArray(j) * taslink%RMultArray(j)
168 end do
169 else
170 errmsg = 'Size mismatch between boundary and multiplier arrays'// &
171 ' using time-array series: '// &
172 trim(taslink%TimeArraySeries%Name)
173 call store_error(errmsg)
174 inunit = taslink%TimeArraySeries%GetInunit()
175 call store_error_unit(inunit)
176 end if
177 end if
178 end if
179 end do
180 end if