33 character(len=LINELENGTH),
dimension(:),
allocatable, &
35 integer(I4B),
intent(inout) :: ncol
36 character(len=:),
allocatable :: parse_str
37 character(len=LINELENGTH),
dimension(:),
allocatable :: param_cols
38 integer(I4B) :: param_ncol, n
41 if (
allocated(cols))
deallocate (cols)
45 parse_str = trim(idt%datatype)//
' '
46 call parseline(parse_str, param_ncol, param_cols)
48 if (param_ncol > 1)
then
49 if (param_cols(1) ==
'RECARRAY' .or. &
50 param_cols(1) ==
'KEYSTRING' .or. &
51 param_cols(1) ==
'RECORD')
then
53 allocate (cols(param_ncol - 1))
55 cols(n - 1) = param_cols(n)
63 if (
allocated(param_cols))
deallocate (param_cols)
64 if (
allocated(parse_str))
deallocate (parse_str)
72 character(len=LINELENGTH) :: datatype
73 if (idt%datatype(1:9) ==
'KEYSTRING')
then
74 datatype =
'KEYSTRING'
75 else if (idt%datatype(1:8) ==
'RECARRAY')
then
77 else if (idt%datatype(1:6) ==
'RECORD')
then
80 datatype = idt%datatype
87 component_type, subcomponent_type, &
88 blockname, tagname, filename) &
91 input_definition_types
92 character(len=*),
intent(in) :: component_type
93 character(len=*),
intent(in) :: subcomponent_type
94 character(len=*),
intent(in) :: blockname
95 character(len=*),
intent(in) :: tagname
96 character(len=*),
intent(in) :: filename
102 do i = 1,
size(input_definition_types)
103 tmp_ptr => input_definition_types(i)
104 if (tmp_ptr%component_type == component_type .and. &
105 tmp_ptr%subcomponent_type == subcomponent_type .and. &
106 tmp_ptr%blockname == blockname .and. &
107 tmp_ptr%tagname == tagname)
then
108 idt => input_definition_types(i)
113 if (.not.
associated(idt))
then
114 write (
errmsg,
'(a,a,a,a,a)') &
115 'Input file tag not found: "', trim(tagname), &
116 '" in block "', trim(blockname), &
126 subcomponent_type, blockname)
result(idt)
128 input_definition_types
129 character(len=*),
intent(in) :: component_type
130 character(len=*),
intent(in) :: subcomponent_type
131 character(len=*),
intent(in) :: blockname
137 do i = 1,
size(input_definition_types)
138 tmp_ptr => input_definition_types(i)
139 if (tmp_ptr%component_type == component_type .and. &
140 tmp_ptr%subcomponent_type == subcomponent_type .and. &
141 tmp_ptr%blockname == blockname)
then
142 idt => input_definition_types(i)
147 if (.not.
associated(idt))
then
148 write (
errmsg,
'(a,a,a,a,a,a,a)') &
149 'Idm aggregate definition not found: ', trim(blockname), &
150 '. Component="', trim(component_type), &
151 '", subcomponent="', trim(subcomponent_type),
'".'
162 subcomponent_type, tagname, nwords, words)
165 input_definition_types
166 character(len=*),
intent(in) :: component_type
167 character(len=*),
intent(in) :: subcomponent_type
168 character(len=*),
intent(in) :: tagname
169 integer(I4B),
intent(inout) :: nwords
170 character(len=40),
dimension(:),
allocatable,
intent(inout) :: words
173 character(len=:),
allocatable :: parse_str
176 if (
allocated(words))
deallocate (words)
180 do i = 1,
size(input_definition_types)
186 tmp_ptr => input_definition_types(i)
189 if (tmp_ptr%component_type == component_type .and. &
190 tmp_ptr%subcomponent_type == subcomponent_type .and. &
194 parse_str = trim(input_definition_types(i)%datatype)//
' '
200 if (nwords >= 2)
then
201 if (words(1) ==
'RECORD' .and. words(2) == tagname)
then
207 if (
allocated(parse_str))
deallocate (parse_str)
208 if (
allocated(words))
deallocate (words)
219 subcomponent_type, tagname, tag2, nwords, &
223 input_definition_types
224 character(len=*),
intent(in) :: component_type
225 character(len=*),
intent(in) :: subcomponent_type
226 character(len=*),
intent(in) :: tagname
227 character(len=*),
intent(in) :: tag2
228 integer(I4B),
intent(inout) :: nwords
229 character(len=40),
dimension(:),
allocatable,
intent(inout) :: words
232 character(len=:),
allocatable :: parse_str
235 if (
allocated(words))
deallocate (words)
239 do i = 1,
size(input_definition_types)
245 tmp_ptr => input_definition_types(i)
248 if (tmp_ptr%component_type == component_type .and. &
249 tmp_ptr%subcomponent_type == subcomponent_type .and. &
253 parse_str = trim(input_definition_types(i)%datatype)//
' '
259 if (nwords >= 2)
then
260 if (words(1) ==
'RECORD' .and. &
261 words(2) == tagname .and. &
262 words(3) == tag2)
then
268 if (
allocated(parse_str))
deallocate (parse_str)
269 if (
allocated(words))
deallocate (words)
276 function idt_default(component_type, subcomponent_type, blockname, tagname, &
277 mf6varname, datatype)
result(idt)
280 character(len=*),
intent(in) :: component_type
281 character(len=*),
intent(in) :: subcomponent_type
282 character(len=*),
intent(in) :: blockname
283 character(len=*),
intent(in) :: tagname
284 character(len=*),
intent(in) :: mf6varname
285 character(len=*),
intent(in) :: datatype
291 idt%component_type = trim(component_type)
292 idt%subcomponent_type = trim(subcomponent_type)
293 idt%blockname = trim(blockname)
294 idt%tagname = trim(tagname)
295 idt%mf6varname = trim(mf6varname)
296 idt%datatype = trim(datatype)
298 idt%required = .true.
299 idt%in_record = .false.
300 idt%preserve_case = .false.
301 idt%layered = .false.
302 idt%timeseries = .false.
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
This module contains the DefinitionSelectModule.
type(inputparamdefinitiontype) function, pointer, public get_param_definition_type(input_definition_types, component_type, subcomponent_type, blockname, tagname, filename)
Return parameter definition.
type(inputparamdefinitiontype) function, pointer, public idt_default(component_type, subcomponent_type, blockname, tagname, mf6varname, datatype)
return allocated input definition type
subroutine, public split_record_dfn_tag1(input_definition_types, component_type, subcomponent_type, tagname, nwords, words)
Return aggregate definition.
type(inputparamdefinitiontype) function, pointer, public get_aggregate_definition_type(input_definition_types, component_type, subcomponent_type, blockname)
Return aggregate definition.
subroutine, public split_record_dfn_tag2(input_definition_types, component_type, subcomponent_type, tagname, tag2, nwords, words)
Return aggregate definition.
subroutine, public idt_parse_rectype(idt, cols, ncol)
allocate and set RECARRAY, KEYSTRING or RECORD param list
character(len=linelength) function, public idt_datatype(idt)
return input definition type datatype
This module defines variable data types.
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string