56 character(len=*), intent(in) :: pkgtype
57 character(len=*), intent(in) :: component_type
58 character(len=*), intent(in) :: subcomponent_type
59 character(len=*), intent(in) :: component_name
60 character(len=*), intent(in) :: subcomponent_name
61 character(len=*), intent(in) :: load_scope
62 character(len=*), optional, intent(in) :: filename
63 type(ModflowInputType) :: mf6_input
64 character(len=LENPACKAGETYPE) :: dfn_subcomponent_type
65
66
67 if (present(filename)) then
68 dfn_subcomponent_type = update_sc_type(pkgtype, filename, component_type, &
69 subcomponent_type)
70 else
71 dfn_subcomponent_type = trim(subcomponent_type)
72 end if
73
74
75 mf6_input%pkgtype = trim(pkgtype)
76 mf6_input%component_type = trim(component_type)
77 mf6_input%subcomponent_type = trim(dfn_subcomponent_type)
78 mf6_input%component_name = trim(component_name)
79 mf6_input%subcomponent_name = trim(subcomponent_name)
80 mf6_input%load_scope = trim(load_scope)
81
82
83 mf6_input%mempath = create_mem_path(component_name, subcomponent_name, &
84 idm_context)
85 mf6_input%component_mempath = create_mem_path(component=component_name, &
86 context=idm_context)
87
88
89 mf6_input%block_dfns => block_definitions(mf6_input%component_type, &
90 mf6_input%subcomponent_type)
91 mf6_input%aggregate_dfns => aggregate_definitions(mf6_input%component_type, &
92 mf6_input%subcomponent_type)
93 mf6_input%param_dfns => param_definitions(mf6_input%component_type, &
94 mf6_input%subcomponent_type)