32 character(len=LINELENGTH),
dimension(:),
allocatable, &
34 integer(I4B),
intent(inout) :: ncol
35 character(len=:),
allocatable :: parse_str
36 character(len=LINELENGTH),
dimension(:),
allocatable :: param_cols
37 integer(I4B) :: param_ncol, n
40 if (
allocated(cols))
deallocate (cols)
44 parse_str = trim(idt%datatype)//
' '
45 call parseline(parse_str, param_ncol, param_cols)
47 if (param_ncol > 1)
then
48 if (param_cols(1) ==
'RECARRAY' .or. &
49 param_cols(1) ==
'KEYSTRING' .or. &
50 param_cols(1) ==
'RECORD')
then
52 allocate (cols(param_ncol - 1))
54 cols(n - 1) = param_cols(n)
62 if (
allocated(param_cols))
deallocate (param_cols)
63 if (
allocated(parse_str))
deallocate (parse_str)
71 character(len=LINELENGTH) :: datatype
72 if (idt%datatype(1:9) ==
'KEYSTRING')
then
73 datatype =
'KEYSTRING'
74 else if (idt%datatype(1:8) ==
'RECARRAY')
then
76 else if (idt%datatype(1:6) ==
'RECORD')
then
79 datatype = idt%datatype
86 component_type, subcomponent_type, &
87 blockname, tagname, filename) &
90 input_definition_types
91 character(len=*),
intent(in) :: component_type
92 character(len=*),
intent(in) :: subcomponent_type
93 character(len=*),
intent(in) :: blockname
94 character(len=*),
intent(in) :: tagname
95 character(len=*),
intent(in) :: filename
101 do i = 1,
size(input_definition_types)
102 tmp_ptr => input_definition_types(i)
103 if (tmp_ptr%component_type == component_type .and. &
104 tmp_ptr%subcomponent_type == subcomponent_type .and. &
105 tmp_ptr%blockname == blockname .and. &
106 tmp_ptr%tagname == tagname)
then
107 idt => input_definition_types(i)
112 if (.not.
associated(idt))
then
113 write (
errmsg,
'(a,a,a,a,a)') &
114 'Input file tag not found: "', trim(tagname), &
115 '" in block "', trim(blockname), &
125 subcomponent_type, blockname)
result(idt)
127 input_definition_types
128 character(len=*),
intent(in) :: component_type
129 character(len=*),
intent(in) :: subcomponent_type
130 character(len=*),
intent(in) :: blockname
136 do i = 1,
size(input_definition_types)
137 tmp_ptr => input_definition_types(i)
138 if (tmp_ptr%component_type == component_type .and. &
139 tmp_ptr%subcomponent_type == subcomponent_type .and. &
140 tmp_ptr%blockname == blockname)
then
141 idt => input_definition_types(i)
146 if (.not.
associated(idt))
then
147 write (
errmsg,
'(a,a,a,a,a,a,a)') &
148 'Idm aggregate definition not found: ', trim(blockname), &
149 '. Component="', trim(component_type), &
150 '", subcomponent="', trim(subcomponent_type),
'".'
161 subcomponent_type, tagname, nwords, words)
164 input_definition_types
165 character(len=*),
intent(in) :: component_type
166 character(len=*),
intent(in) :: subcomponent_type
167 character(len=*),
intent(in) :: tagname
168 integer(I4B),
intent(inout) :: nwords
169 character(len=40),
dimension(:),
allocatable,
intent(inout) :: words
172 character(len=:),
allocatable :: parse_str
175 if (
allocated(words))
deallocate (words)
179 do i = 1,
size(input_definition_types)
185 tmp_ptr => input_definition_types(i)
188 if (tmp_ptr%component_type == component_type .and. &
189 tmp_ptr%subcomponent_type == subcomponent_type .and. &
193 parse_str = trim(input_definition_types(i)%datatype)//
' '
199 if (nwords >= 2)
then
200 if (words(1) ==
'RECORD' .and. words(2) == tagname)
then
206 if (
allocated(parse_str))
deallocate (parse_str)
207 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