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
100 character(len=LENPACKAGETYPE) :: sc_type
102 sc_type = subcomponent_type
104 select case (subcomponent_type)
105 case (
'RCH',
'EVT',
'SCP')
117 character(len=*),
intent(in) :: component_type
118 character(len=*),
intent(in) :: subcomponent_type
119 character(len=*),
intent(in) :: filetype
120 character(len=*),
intent(in) :: filename
122 character(len=LENPACKAGETYPE) :: sc_type
124 integer(I4B) :: ierr, inunit
125 logical(LGP) :: isfound
126 logical(LGP) :: endofblock
127 character(len=LINELENGTH) :: keyword
129 sc_type = subcomponent_type
133 call openfile(inunit, 0, trim(adjustl(filename)), filetype, &
134 'FORMATTED',
'SEQUENTIAL',
'OLD')
136 call parser%Initialize(inunit, 0)
139 call parser%GetBlock(
'OPTIONS', isfound, ierr, &
140 supportopenclose=.true., blockrequired=.false.)
145 call parser%GetNextLine(endofblock)
149 call parser%GetStringCaps(keyword)
151 if (keyword ==
'READASARRAYS')
then
152 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