Every row's IFNO is validated against maxbound before use.
288 class(ListLoadType),
intent(inout) :: this
289 type(InputParamDefinitionType),
pointer :: idt
290 integer(I4B),
dimension(:),
pointer,
contiguous :: ifno
291 integer(I4B),
dimension(:),
allocatable :: row_ifno
292 real(DP),
dimension(:),
pointer,
contiguous :: featarr
293 real(DP),
dimension(:, :),
pointer,
contiguous :: featarr2d
294 integer(I4B),
pointer :: naux
295 integer(I4B) :: icol, n, i, j, nfeatures
297 if (.not. this%ctx%is_advanced)
return
302 this%mf6_input%component_type, &
303 this%mf6_input%subcomponent_type, &
304 'PERIOD', this%param_names(1), &
306 call mem_setptr(ifno, trim(idt%mf6varname), this%mf6_input%mempath)
308 nfeatures = this%ctx%maxbound
309 allocate (row_ifno(this%ctx%nbound))
310 do n = 1, this%ctx%nbound
311 if (ifno(n) >= 1 .and. ifno(n) <= nfeatures)
then
312 row_ifno(n) = ifno(n)
314 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,1x,a,1x,i0,a)') &
315 trim(idt%tagname), ifno(n),
'on row', n, &
316 'must be greater than 0 and less than or equal to', nfeatures,
'.'
326 do icol = 1, this%nparam
328 this%mf6_input%component_type, &
329 this%mf6_input%subcomponent_type, &
331 this%param_names(icol), this%input_name)
332 if (idt%datatype ==
'DOUBLE' .and. idt%timeseries)
then
333 call mem_setptr(featarr, trim(idt%mf6varname), this%mf6_input%mempath)
334 if (this%ts_active)
then
335 call this%structarray%ts_update_indexed( &
336 icol, this%tsmanager, this%mf6_input%subcomponent_name, &
337 this%ctx%iprpak, this%ctx%nbound, row_ifno, &
338 varname=trim(idt%tagname), featarr=featarr)
340 do n = 1, this%ctx%nbound
343 if (this%structarray%struct_vectors(icol)%dbl1d(n) == dnodata) cycle
344 featarr(i) = this%structarray%struct_vectors(icol)%dbl1d(n)
347 else if (idt%datatype ==
'DOUBLE1D' .and. idt%timeseries)
then
348 call mem_setptr(featarr2d, trim(idt%tagname)//
'VAR', &
349 this%mf6_input%mempath)
350 if (this%ts_active)
then
351 call this%structarray%ts_update_adv( &
352 icol, this%tsmanager, this%mf6_input%subcomponent_name, &
353 this%ctx%iprpak, this%ctx%nbound, row_ifno, &
354 auxname_cst=this%ctx%auxname_cst, featarr2d=featarr2d)
356 call mem_setptr(naux, trim(idt%shape), this%mf6_input%mempath)
357 do n = 1, this%ctx%nbound
361 if (this%structarray%struct_vectors(icol)%dbl2d(j, n) == dnodata) &
364 this%structarray%struct_vectors(icol)%dbl2d(j, n)
370 deallocate (row_ifno)
This module contains the DefinitionSelectModule.
type(inputparamdefinitiontype) function, pointer, public get_param_definition_type(input_definition_types, component_type, subcomponent_type, blockname, tagname, filename, found)
Return parameter definition.
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string