Initialize the SPC object using input context data.
75
76 class(TspSpcType) :: this
77 class(DisBaseType), pointer, intent(in) :: dis
78 integer(I4B), intent(in) :: id
79 character(len=*), intent(in) :: input_mempath
80 integer(I4B), intent(in) :: iout
81 character(len=*), intent(in) :: name_model
82 character(len=*), intent(in) :: packNameFlow
83 character(len=*), intent(in) :: dvn
84 character(len=*), intent(in) :: input_fname
85
86 integer(I4B), pointer :: maxbound_ptr
87 integer(I4B) :: isize
88 logical(LGP) :: found_print_input
89
90 write (this%packName, '(a,i0)') 'SPC-', id
91
92 call this%allocate_scalars()
93
94 this%name_model = name_model
95 this%memoryPath = create_mem_path(this%name_model, this%packName)
96 this%input_mempath = input_mempath
97 this%input_fname = input_fname
98 this%id = id
99 this%iout = iout
100 this%packNameFlow = packnameflow
101 this%depvarname = dvn
102 this%dis => dis
103
104
105 call get_isize('READASARRAYS', input_mempath, isize)
106 this%readasarrays = (isize > 0)
107
108
109 if (this%readasarrays) then
110 this%maxbound = dis%get_ncpl()
111 else
112 call mem_setptr(maxbound_ptr, 'MAXBOUND', input_mempath)
113 this%maxbound = maxbound_ptr
114 end if
115
116 call this%allocate_arrays()
117
118
119 call mem_set_value(this%iprpak, 'PRINT_INPUT', this%input_mempath, &
120 found_print_input)
121 if (found_print_input) then
122 write (this%iout, '(4x,a)') 'TIME-VARYING INPUT WILL BE PRINTED.'
123 end if
124
125
126 call get_isize('TS6_FILENAME', input_mempath, isize)
127 if (isize > 0) this%ts_active = .true.
128 call get_isize('TAS6_FILENAME', input_mempath, isize)
129 if (isize > 0) this%ts_active = .true.
130
131 write (this%iout, '(4x,a,a,a,a,a)') 'USING SPC INPUT FILE ', &
132 trim(input_fname), ' TO SET ', trim(dvn), &
133 'S FOR PACKAGE '//trim(packnameflow)
134
135 if (count_errors() > 0) then
136 call store_error_filename(this%input_fname)
137 end if