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)
78 character(len=LINELENGTH) :: datatype
80 if (idt%datatype(1:9) ==
'KEYSTRING')
then
81 datatype =
'KEYSTRING'
82 else if (idt%datatype(1:8) ==
'RECARRAY')
then
84 else if (idt%datatype(1:6) ==
'RECORD')
then
87 datatype = idt%datatype
94 component_type, subcomponent_type, &
95 blockname, tagname, filename) &
98 input_definition_types
99 character(len=*),
intent(in) :: component_type
100 character(len=*),
intent(in) :: subcomponent_type
101 character(len=*),
intent(in) :: blockname
102 character(len=*),
intent(in) :: tagname
103 character(len=*),
intent(in) :: filename
109 do i = 1,
size(input_definition_types)
110 tmp_ptr => input_definition_types(i)
111 if (tmp_ptr%component_type == component_type .and. &
112 tmp_ptr%subcomponent_type == subcomponent_type .and. &
113 tmp_ptr%blockname == blockname .and. &
114 tmp_ptr%tagname == tagname)
then
115 idt => input_definition_types(i)
120 if (.not.
associated(idt))
then
121 write (
errmsg,
'(a,a,a,a,a)') &
122 'Input file tag not found: "', trim(tagname), &
123 '" in block "', trim(blockname), &
133 subcomponent_type, blockname)
result(idt)
135 input_definition_types
136 character(len=*),
intent(in) :: component_type
137 character(len=*),
intent(in) :: subcomponent_type
138 character(len=*),
intent(in) :: blockname
144 do i = 1,
size(input_definition_types)
145 tmp_ptr => input_definition_types(i)
146 if (tmp_ptr%component_type == component_type .and. &
147 tmp_ptr%subcomponent_type == subcomponent_type .and. &
148 tmp_ptr%blockname == blockname)
then
149 idt => input_definition_types(i)
154 if (.not.
associated(idt))
then
155 write (
errmsg,
'(a,a,a,a,a,a,a)') &
156 'Idm aggregate definition not found: ', trim(blockname), &
157 '. Component="', trim(component_type), &
158 '", subcomponent="', trim(subcomponent_type),
'".'
169 subcomponent_type, tagname, nwords, words)
172 input_definition_types
173 character(len=*),
intent(in) :: component_type
174 character(len=*),
intent(in) :: subcomponent_type
175 character(len=*),
intent(in) :: tagname
176 integer(I4B),
intent(inout) :: nwords
177 character(len=40),
dimension(:),
allocatable,
intent(inout) :: words
180 character(len=:),
allocatable :: parse_str
183 if (
allocated(words))
deallocate (words)
187 do i = 1,
size(input_definition_types)
193 tmp_ptr => input_definition_types(i)
196 if (tmp_ptr%component_type == component_type .and. &
197 tmp_ptr%subcomponent_type == subcomponent_type .and. &
201 parse_str = trim(input_definition_types(i)%datatype)//
' '
207 if (nwords >= 2)
then
208 if (words(1) ==
'RECORD' .and. words(2) == tagname)
then
214 if (
allocated(parse_str))
deallocate (parse_str)
215 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