401 class(KeystringLoadType), intent(inout) :: this
402 integer(I4B), pointer :: nbound => null()
403 integer(I4B), dimension(:), pointer, contiguous :: period_ifno => null()
404 type(CharacterStringType), dimension(:), pointer, contiguous :: &
405 period_setting => null()
406 type(CharacterStringType), dimension(:), pointer, contiguous :: &
407 period_auxname => null()
408 type(CharacterStringType), dimension(:), pointer, contiguous :: &
409 auxnames => null()
410 real(DP), dimension(:, :), pointer, contiguous :: aux => null()
411 real(DP), pointer :: bndElem
412 type(InputParamDefinitionType), pointer :: idt
413 type(TSStringLocType), pointer :: ts_strloc
414 integer(I4B) :: i, n, ifno, jj, isize, naux, nfeatures, sa_icol, k, nts
415 logical(LGP) :: found
416 logical(LGP), dimension(:), allocatable :: handled
417 character(len=LINELENGTH) :: setting, auxname, thisauxname
418 character(len=LENVARNAME) :: ifno_tagname
419
420 call get_isize('AUXILIARY', this%mf6_input%mempath, naux)
421 if (naux <= 0) return
422
423 call get_isize('NBOUND', this%mf6_input%mempath, isize)
424 if (isize < 1) return
425 call mem_setptr(nbound, 'NBOUND', this%mf6_input%mempath)
426 if (nbound <= 0) return
427
428 call get_isize('AUXNAME', this%mf6_input%mempath, isize)
429 if (isize < 1) return
430
431
432
434 this%mf6_input%component_type, &
435 this%mf6_input%subcomponent_type, &
436 this%ctx%blockname, &
437 this%param_names(1), &
438 this%input_name)
439 ifno_tagname = trim(idt%tagname)
440
441
442
444 this%mf6_input%component_type, &
445 this%mf6_input%subcomponent_type, &
446 this%ctx%blockname, 'AUXILIARY', &
447 this%input_name)
448
449 call mem_setptr(period_ifno, 'IFNO', this%mf6_input%mempath)
450 call mem_setptr(period_setting, 'SETTING', this%mf6_input%mempath)
451 call mem_setptr(period_auxname, 'AUXNAME', this%mf6_input%mempath)
452 call mem_setptr(auxnames, 'AUXILIARY', this%mf6_input%mempath)
453 call mem_setptr(aux, 'AUX', this%mf6_input%mempath)
454 nfeatures = size(aux, 2)
455
456 sa_icol = 0
457 do n = 1, this%structarray%count()
458 if (is_auxval(this%structarray%struct_vectors(n)%idt)) then
459 sa_icol = n
460 exit
461 end if
462 end do
463 if (sa_icol == 0) return
464
465 allocate (handled(nbound))
466 handled = .false.
467
468
469 nts = this%structarray%struct_vectors(sa_icol)%ts_strlocs%count()
470 do k = 1, nts
471 ts_strloc => this%structarray%struct_vectors(sa_icol)%get_ts_strloc(k)
472 i = ts_strloc%row
473 ifno = period_ifno(i)
474 if (.not. this%valid_address(ifno, nfeatures, ifno_tagname, i)) cycle
475 auxname = period_auxname(i)
476 jj = find_auxname_index(auxname, auxnames, naux)
477 if (jj < 1) cycle
478 thisauxname = auxnames(jj)
479 bndelem => aux(jj, ifno)
480 call read_value_or_time_series_adv(ts_strloc%token, ifno, jj, bndelem, &
481 this%mf6_input%subcomponent_name, &
482 'AUX', this%tsmanager, &
483 this%ctx%iprpak, trim(thisauxname))
484 handled(i) = .true.
485 end do
486
487
488 do i = 1, nbound
489 if (handled(i)) cycle
490 setting = period_setting(i)
491 if (trim(setting) /= trim(idt%mf6varname)) cycle
492 ifno = period_ifno(i)
493 if (.not. this%valid_address(ifno, nfeatures, ifno_tagname, i)) cycle
494 auxname = period_auxname(i)
495 jj = find_auxname_index(auxname, auxnames, naux)
496 if (jj < 1) cycle
497 thisauxname = auxnames(jj)
498 found = remove_existing_link(this%tsmanager, ifno, jj, &
499 this%mf6_input%subcomponent_name, &
500 'AUX', trim(thisauxname))
501 aux(jj, ifno) = this%structarray%struct_vectors(sa_icol)%dbl1d(i)
502 end do
505 end if
506 deallocate (handled)
507 call this%structarray%struct_vectors(sa_icol)%clear()
This module contains the StructVectorModule.
derived type which describes time series string field