MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
ModelPackageInput.f90
Go to the documentation of this file.
1!> @brief This module contains the ModelPackageInputModule
2!!
3!! Add an input model type to routines in this module
4!! to integrate the Model with IDM.
5!!
6!<
8
9 use kindmodule, only: dp, i4b, lgp
10 use simvariablesmodule, only: errmsg
25
26 implicit none
27
28 private
30 public :: multi_package_type
31 public :: nmodel, modflow6models
32
33 !> @brief Valid simulation model types
34 !!
35 integer(I4B), parameter :: nmodel = 10
36 character(len=LENPACKAGETYPE), dimension(NMODEL) :: modflow6models
37 data modflow6models/'CHF6 ', 'GWE6 ', 'GWF6 ', 'GWT6 ', 'OLF6 ', & ! 5
38 &'PRT6 ', ' ', ' ', ' ', ' '/ ! 10
39
40contains
41
42 !> @brief set supported package types for model
43 !!
44 !! Allocate a list of package types supported
45 !! by the model. Base packages should be listed
46 !! first as list determines load order.
47 !!
48 !<
49 subroutine supported_model_packages(mtype, pkgtypes, numpkgs)
50 ! -- modules
51 ! -- dummy
52 character(len=LENFTYPE), intent(in) :: mtype
53 character(len=LENPACKAGETYPE), dimension(:), allocatable, &
54 intent(inout) :: pkgtypes
55 integer(I4B), intent(inout) :: numpkgs
56 ! -- local
57 !
58 select case (mtype)
59 case ('CHF6')
60 numpkgs = chf_nbasepkg + chf_nmultipkg
61 allocate (pkgtypes(numpkgs))
62 pkgtypes = [chf_basepkg, chf_multipkg]
63 case ('GWE6')
64 numpkgs = gwe_nbasepkg + gwe_nmultipkg
65 allocate (pkgtypes(numpkgs))
66 pkgtypes = [gwe_basepkg, gwe_multipkg]
67 case ('GWF6')
68 numpkgs = gwf_nbasepkg + gwf_nmultipkg
69 allocate (pkgtypes(numpkgs))
70 pkgtypes = [gwf_basepkg, gwf_multipkg]
71 case ('GWT6')
72 numpkgs = gwt_nbasepkg + gwt_nmultipkg
73 allocate (pkgtypes(numpkgs))
74 pkgtypes = [gwt_basepkg, gwt_multipkg]
75 case ('OLF6')
76 numpkgs = olf_nbasepkg + olf_nmultipkg
77 allocate (pkgtypes(numpkgs))
78 pkgtypes = [olf_basepkg, olf_multipkg]
79 case ('PRT6')
80 numpkgs = prt_nbasepkg + prt_nmultipkg
81 allocate (pkgtypes(numpkgs))
82 pkgtypes = [prt_basepkg, prt_multipkg]
83 case default
84 end select
85 end subroutine supported_model_packages
86
87 !> @brief Is the package multi-instance
88 !<
89 function multi_package_type(mtype_component, ptype_component, pkgtype) &
90 result(multi_package)
91 ! -- modules
92 ! -- dummy
93 character(len=LENFTYPE), intent(in) :: mtype_component
94 character(len=LENFTYPE), intent(in) :: ptype_component
95 character(len=LENFTYPE), intent(in) :: pkgtype
96 ! -- return
97 logical(LGP) :: multi_package
98 ! -- local
99 integer(I4B) :: n
100 !
101 multi_package = .false.
102 !
103 select case (mtype_component)
104 case ('CHF')
105 do n = 1, chf_nmultipkg
106 if (chf_multipkg(n) == pkgtype) then
107 multi_package = .true.
108 exit
109 end if
110 end do
111 !
112 case ('GWE')
113 do n = 1, gwe_nmultipkg
114 if (gwe_multipkg(n) == pkgtype) then
115 multi_package = .true.
116 exit
117 end if
118 end do
119 !
120 case ('GWF')
121 do n = 1, gwf_nmultipkg
122 if (gwf_multipkg(n) == pkgtype) then
123 multi_package = .true.
124 exit
125 end if
126 end do
127 !
128 case ('GWT')
129 do n = 1, gwt_nmultipkg
130 if (gwt_multipkg(n) == pkgtype) then
131 multi_package = .true.
132 exit
133 end if
134 end do
135 !
136 case ('OLF')
137 do n = 1, olf_nmultipkg
138 if (olf_multipkg(n) == pkgtype) then
139 multi_package = .true.
140 exit
141 end if
142 end do
143 !
144 case ('PRT')
145 do n = 1, prt_nmultipkg
146 if (prt_multipkg(n) == pkgtype) then
147 multi_package = .true.
148 exit
149 end if
150 end do
151 !
152 case default
153 end select
154 end function multi_package_type
155
Channel Flow (CHF) Module.
Definition chf.f90:3
integer(i4b), parameter, public chf_nbasepkg
CHF base package array descriptors.
Definition chf.f90:32
character(len=lenpackagetype), dimension(chf_nmultipkg), public chf_multipkg
Definition chf.f90:43
character(len=lenpackagetype), dimension(chf_nbasepkg), public chf_basepkg
candidates for input and these will be loaded in the order specified.
Definition chf.f90:33
integer(i4b), parameter, public chf_nmultipkg
CHF multi package array descriptors.
Definition chf.f90:42
This module contains simulation constants.
Definition Constants.f90:9
integer(i4b), parameter lenpackagetype
maximum length of a package type (DIS6, SFR6, CSUB6, etc.)
Definition Constants.f90:38
integer(i4b), parameter lenftype
maximum length of a package type (DIS, WEL, OC, etc.)
Definition Constants.f90:39
character(len=lenpackagetype), dimension(gwe_nmultipkg), public gwe_multipkg
Definition gwe.f90:85
integer(i4b), parameter, public gwe_nbasepkg
GWE base package array descriptors.
Definition gwe.f90:71
character(len=lenpackagetype), dimension(gwe_nbasepkg), public gwe_basepkg
Definition gwe.f90:72
integer(i4b), parameter, public gwe_nmultipkg
GWE multi package array descriptors.
Definition gwe.f90:84
integer(i4b), parameter, public gwf_nmultipkg
GWF multi package array descriptors.
Definition gwf.f90:120
character(len=lenpackagetype), dimension(gwf_nmultipkg), public gwf_multipkg
Definition gwf.f90:121
integer(i4b), parameter, public gwf_nbasepkg
GWF base package array descriptors.
Definition gwf.f90:107
character(len=lenpackagetype), dimension(gwf_nbasepkg), public gwf_basepkg
Definition gwf.f90:108
integer(i4b), parameter, public gwt_nbasepkg
GWT base package array descriptors.
Definition gwt.f90:74
character(len=lenpackagetype), dimension(gwt_nmultipkg), public gwt_multipkg
Definition gwt.f90:88
character(len=lenpackagetype), dimension(gwt_nbasepkg), public gwt_basepkg
Definition gwt.f90:75
integer(i4b), parameter, public gwt_nmultipkg
GWT multi package array descriptors.
Definition gwt.f90:87
This module defines variable data types.
Definition kind.f90:8
This module contains the ModelPackageInputModule.
integer(i4b), parameter, public nmodel
Valid simulation model types.
logical(lgp) function, public multi_package_type(mtype_component, ptype_component, pkgtype)
Is the package multi-instance.
subroutine, public supported_model_packages(mtype, pkgtypes, numpkgs)
set supported package types for model
character(len=lenpackagetype), dimension(nmodel), public modflow6models
Channel Flow (OLF) Module.
Definition olf.f90:3
integer(i4b), parameter, public olf_nmultipkg
OLF multi package array descriptors.
Definition olf.f90:42
character(len=lenpackagetype), dimension(olf_nbasepkg), public olf_basepkg
candidates for input and these will be loaded in the order specified.
Definition olf.f90:33
character(len=lenpackagetype), dimension(olf_nmultipkg), public olf_multipkg
Definition olf.f90:43
integer(i4b), parameter, public olf_nbasepkg
OLF base package array descriptors.
Definition olf.f90:32
character(len=lenpackagetype), dimension(prt_nmultipkg), public prt_multipkg
Definition prt.f90:123
character(len=lenpackagetype), dimension(prt_nbasepkg), public prt_basepkg
Definition prt.f90:109
integer(i4b), parameter, public prt_nmultipkg
PRT multi package array descriptors.
Definition prt.f90:122
integer(i4b), parameter, public prt_nbasepkg
PRT base package array descriptors.
Definition prt.f90:108
This module contains simulation methods.
Definition Sim.f90:10
subroutine, public store_error(msg, terminate)
Store an error message.
Definition Sim.f90:94
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
Definition Sim.f90:208
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string