35 character(len=LENCOMPONENTNAME) :: pkgtype
36 character(len=LENCOMPONENTNAME) :: component_type
37 character(len=LENCOMPONENTNAME) :: subcomponent_type
38 character(len=LENCOMPONENTNAME) :: component_name
39 character(len=LENCOMPONENTNAME) :: subcomponent_name
40 character(len=LENMEMPATH) :: mempath
41 character(len=LENMEMPATH) :: component_mempath
52 component_name, subcomponent_name, filename) &
54 character(len=*),
intent(in) :: pkgtype
55 character(len=*),
intent(in) :: component_type
56 character(len=*),
intent(in) :: subcomponent_type
57 character(len=*),
intent(in) :: component_name
58 character(len=*),
intent(in) :: subcomponent_name
59 character(len=*),
optional,
intent(in) :: filename
61 character(len=LENPACKAGETYPE) :: dfn_subcomponent_type
64 if (
present(filename))
then
65 dfn_subcomponent_type =
update_sc_type(pkgtype, filename, component_type, &
68 dfn_subcomponent_type = trim(subcomponent_type)
72 mf6_input%pkgtype = trim(pkgtype)
73 mf6_input%component_type = trim(component_type)
74 mf6_input%subcomponent_type = trim(dfn_subcomponent_type)
75 mf6_input%component_name = trim(component_name)
76 mf6_input%subcomponent_name = trim(subcomponent_name)
79 mf6_input%mempath =
create_mem_path(component_name, subcomponent_name, &
81 mf6_input%component_mempath =
create_mem_path(component=component_name, &
86 mf6_input%subcomponent_type)
88 mf6_input%subcomponent_type)
90 mf6_input%subcomponent_type)
93 function update_sc_type(filetype, filename, component_type, subcomponent_type) &
95 character(len=*),
intent(in) :: component_type
96 character(len=*),
intent(in) :: subcomponent_type
97 character(len=*),
intent(in) :: filetype
98 character(len=*),
intent(in) :: filename
99 character(len=LENPACKAGETYPE) :: sc_type
100 sc_type = subcomponent_type
101 select case (subcomponent_type)
102 case (
'RCH',
'EVT',
'SCP')
114 character(len=*),
intent(in) :: component_type
115 character(len=*),
intent(in) :: subcomponent_type
116 character(len=*),
intent(in) :: filetype
117 character(len=*),
intent(in) :: filename
118 character(len=LENPACKAGETYPE) :: sc_type
120 integer(I4B) :: ierr, inunit
121 logical(LGP) :: isfound
122 logical(LGP) :: endofblock
123 character(len=LINELENGTH) :: keyword
125 sc_type = subcomponent_type
127 call openfile(inunit, 0, trim(adjustl(filename)), filetype, &
128 'FORMATTED',
'SEQUENTIAL',
'OLD')
129 call parser%Initialize(inunit, 0)
132 call parser%GetBlock(
'OPTIONS', isfound, ierr, &
133 supportopenclose=.true., blockrequired=.false.)
138 call parser%GetNextLine(endofblock)
140 call parser%GetStringCaps(keyword)
141 if (keyword ==
'READASARRAYS')
then
142 write (sc_type,
'(a)') trim(subcomponent_type)//
'A'
This module contains block parser methods.
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lencomponentname
maximum length of a component name
integer(i4b), parameter lenpackagetype
maximum length of a package type (DIS6, SFR6, CSUB6, etc.)
integer(i4b), parameter lenmempath
maximum length of the memory path
type(inputblockdefinitiontype) function, dimension(:), pointer, public block_definitions(component, subcomponent)
type(inputparamdefinitiontype) function, dimension(:), pointer, public param_definitions(component, subcomponent)
type(inputparamdefinitiontype) function, dimension(:), pointer, public aggregate_definitions(component, subcomponent)
This module defines variable data types.
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
This module contains simulation variables.
character(len=linelength) idm_context