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, &
94 input_definition_types
95 character(len=*),
intent(in) :: component_type
96 character(len=*),
intent(in) :: subcomponent_type
97 character(len=*),
intent(in) :: blockname
98 character(len=*),
intent(in) :: tagname
99 character(len=*),
intent(in) :: filename
100 logical(LGP),
optional,
intent(out) :: found
103 character(len=LINELENGTH) :: component
106 if (
idm_utl_type(component_type, subcomponent_type))
then
109 component = component_type
113 do i = 1,
size(input_definition_types)
114 tmp_ptr => input_definition_types(i)
115 if (tmp_ptr%component_type == component .and. &
116 tmp_ptr%subcomponent_type == subcomponent_type .and. &
117 tmp_ptr%blockname == blockname .and. &
118 tmp_ptr%tagname == tagname)
then
119 idt => input_definition_types(i)
124 if (
present(found))
then
125 found =
associated(idt)
126 else if (.not.
associated(idt))
then
127 write (
errmsg,
'(a,a,a,a,a)') &
128 'Input file tag not found: "', trim(tagname), &
129 '" in block "', trim(blockname), &
139 subcomponent_type, blockname)
result(idt)
143 input_definition_types
144 character(len=*),
intent(in) :: component_type
145 character(len=*),
intent(in) :: subcomponent_type
146 character(len=*),
intent(in) :: blockname
149 character(len=LINELENGTH) :: component
152 if (
idm_utl_type(component_type, subcomponent_type))
then
155 component = component_type
159 do i = 1,
size(input_definition_types)
160 tmp_ptr => input_definition_types(i)
161 if (tmp_ptr%component_type == component .and. &
162 tmp_ptr%subcomponent_type == subcomponent_type .and. &
163 tmp_ptr%blockname == blockname)
then
164 idt => input_definition_types(i)
169 if (.not.
associated(idt))
then
170 write (
errmsg,
'(a,a,a,a,a,a,a)') &
171 'Idm aggregate definition not found: ', trim(blockname), &
172 '. Component="', trim(component_type), &
173 '", subcomponent="', trim(subcomponent_type),
'".'
184 subcomponent_type, tagname, nwords, words)
187 input_definition_types
188 character(len=*),
intent(in) :: component_type
189 character(len=*),
intent(in) :: subcomponent_type
190 character(len=*),
intent(in) :: tagname
191 integer(I4B),
intent(inout) :: nwords
192 character(len=40),
dimension(:),
allocatable,
intent(inout) :: words
195 character(len=:),
allocatable :: parse_str
198 if (
allocated(words))
deallocate (words)
202 do i = 1,
size(input_definition_types)
208 tmp_ptr => input_definition_types(i)
211 if (tmp_ptr%component_type == component_type .and. &
212 tmp_ptr%subcomponent_type == subcomponent_type .and. &
216 parse_str = trim(input_definition_types(i)%datatype)//
' '
222 if (nwords >= 2)
then
223 if (words(1) ==
'RECORD' .and. words(2) == tagname)
then
229 if (
allocated(parse_str))
deallocate (parse_str)
230 if (
allocated(words))
deallocate (words)
241 subcomponent_type, tagname, tag2, nwords, &
245 input_definition_types
246 character(len=*),
intent(in) :: component_type
247 character(len=*),
intent(in) :: subcomponent_type
248 character(len=*),
intent(in) :: tagname
249 character(len=*),
intent(in) :: tag2
250 integer(I4B),
intent(inout) :: nwords
251 character(len=40),
dimension(:),
allocatable,
intent(inout) :: words
254 character(len=:),
allocatable :: parse_str
257 if (
allocated(words))
deallocate (words)
261 do i = 1,
size(input_definition_types)
267 tmp_ptr => input_definition_types(i)
270 if (tmp_ptr%component_type == component_type .and. &
271 tmp_ptr%subcomponent_type == subcomponent_type .and. &
275 parse_str = trim(input_definition_types(i)%datatype)//
' '
281 if (nwords >= 2)
then
282 if (words(1) ==
'RECORD' .and. &
283 words(2) == tagname .and. &
284 words(3) == tag2)
then
290 if (
allocated(parse_str))
deallocate (parse_str)
291 if (
allocated(words))
deallocate (words)
298 function idt_default(component_type, subcomponent_type, blockname, tagname, &
299 mf6varname, datatype)
result(idt)
302 character(len=*),
intent(in) :: component_type
303 character(len=*),
intent(in) :: subcomponent_type
304 character(len=*),
intent(in) :: blockname
305 character(len=*),
intent(in) :: tagname
306 character(len=*),
intent(in) :: mf6varname
307 character(len=*),
intent(in) :: datatype
313 idt%component_type = trim(component_type)
314 idt%subcomponent_type = trim(subcomponent_type)
315 idt%blockname = trim(blockname)
316 idt%tagname = trim(tagname)
317 idt%mf6varname = trim(mf6varname)
318 idt%datatype = trim(datatype)
320 idt%required = .true.
321 idt%developmode = .false.
322 idt%in_record = .false.
323 idt%preserve_case = .false.
324 idt%layered = .false.
325 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 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
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 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
This module contains the SourceCommonModule.
logical(lgp) function, public idm_utl_type(component, subcomponent)
is utility type