34 character(len=LINELENGTH),
dimension(:),
allocatable, &
36 integer(I4B),
intent(inout) :: ncol
38 character(len=:),
allocatable :: parse_str
39 character(len=LINELENGTH),
dimension(:),
allocatable :: param_cols
40 integer(I4B) :: param_ncol, n
43 if (
allocated(cols))
deallocate (cols)
47 parse_str = trim(idt%datatype)//
' '
48 call parseline(parse_str, param_ncol, param_cols)
50 if (param_ncol > 1)
then
51 if (param_cols(1) ==
'RECARRAY' .or. &
52 param_cols(1) ==
'KEYSTRING' .or. &
53 param_cols(1) ==
'RECORD')
then
55 allocate (cols(param_ncol - 1))
57 cols(n - 1) = param_cols(n)
66 if (
allocated(param_cols))
deallocate (param_cols)
67 if (
allocated(parse_str))
deallocate (parse_str)
81 character(len=LINELENGTH) :: datatype
83 if (idt%datatype(1:9) ==
'KEYSTRING')
then
84 datatype =
'KEYSTRING'
85 else if (idt%datatype(1:8) ==
'RECARRAY')
then
87 else if (idt%datatype(1:6) ==
'RECORD')
then
90 datatype = idt%datatype
100 component_type, subcomponent_type, &
101 blockname, tagname, filename) &
104 input_definition_types
105 character(len=*),
intent(in) :: component_type
106 character(len=*),
intent(in) :: subcomponent_type
107 character(len=*),
intent(in) :: blockname
108 character(len=*),
intent(in) :: tagname
109 character(len=*),
intent(in) :: filename
115 do i = 1,
size(input_definition_types)
116 tmp_ptr => input_definition_types(i)
117 if (tmp_ptr%component_type == component_type .and. &
118 tmp_ptr%subcomponent_type == subcomponent_type .and. &
119 tmp_ptr%blockname == blockname .and. &
120 tmp_ptr%tagname == tagname)
then
121 idt => input_definition_types(i)
126 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), &
142 subcomponent_type, blockname)
result(idt)
144 input_definition_types
145 character(len=*),
intent(in) :: component_type
146 character(len=*),
intent(in) :: subcomponent_type
147 character(len=*),
intent(in) :: blockname
153 do i = 1,
size(input_definition_types)
154 tmp_ptr => input_definition_types(i)
155 if (tmp_ptr%component_type == component_type .and. &
156 tmp_ptr%subcomponent_type == subcomponent_type .and. &
157 tmp_ptr%blockname == blockname)
then
158 idt => input_definition_types(i)
163 if (.not.
associated(idt))
then
164 write (
errmsg,
'(a,a,a,a,a,a,a)') &
165 'Idm aggregate definition not found: ', trim(blockname), &
166 '. Component="', trim(component_type), &
167 '", subcomponent="', trim(subcomponent_type),
'".'
181 subcomponent_type, tagname, nwords, words)
184 input_definition_types
185 character(len=*),
intent(in) :: component_type
186 character(len=*),
intent(in) :: subcomponent_type
187 character(len=*),
intent(in) :: tagname
188 integer(I4B),
intent(inout) :: nwords
189 character(len=40),
dimension(:),
allocatable,
intent(inout) :: words
192 character(len=:),
allocatable :: parse_str
195 if (
allocated(words))
deallocate (words)
199 do i = 1,
size(input_definition_types)
205 tmp_ptr => input_definition_types(i)
208 if (tmp_ptr%component_type == component_type .and. &
209 tmp_ptr%subcomponent_type == subcomponent_type .and. &
213 parse_str = trim(input_definition_types(i)%datatype)//
' '
219 if (nwords >= 2)
then
220 if (words(1) ==
'RECORD' .and. words(2) == tagname)
then
226 if (
allocated(parse_str))
deallocate (parse_str)
227 if (
allocated(words))
deallocate (words)
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.
subroutine, public split_record_definition(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 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