Skip to content

Commit e4e78b3

Browse files
authored
feat(idm): integrate FMI packages (#2387)
1 parent 667c7b5 commit e4e78b3

File tree

21 files changed

+919
-441
lines changed

21 files changed

+919
-441
lines changed

doc/mf6io/framework/processing_of_input.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ \subsection{Supported Components}
4545
GWT/DISU & DISU6 \\
4646
GWT/DISV & DISV6 \\
4747
GWT/DSP & DSP6 \\
48+
GWT/FMI & FMI6 \\
4849
GWT/IC & IC6 \\
4950
GWT/IST & IST6 \\
5051
GWT/MST & MST6 \\
@@ -60,12 +61,14 @@ \subsection{Supported Components}
6061
GWE/DISV & DISV6 \\
6162
GWE/ESL & ESL6 \\
6263
GWE/EST & EST6 \\
64+
GWE/FMI & FMI6 \\
6365
GWE/IC & IC6 \\
6466
GWE/SSM & SSM6 \\
6567
\hline
6668
PRT/NAM & PRT name file \\
6769
PRT/DIS & DIS6 \\
6870
PRT/DISV & DISV6 \\
71+
PRT/FMI & FMI6 \\
6972
PRT/MIP & MIP6 \\
7073
PRT/PRP & PRP6 \\
7174
\hline

doc/mf6io/mf6ivar/dfn/gwe-fmi.dfn

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ name flow_imbalance_correction
1313
type keyword
1414
reader urword
1515
optional true
16+
mf6internal imbalancecorrect
1617
longname correct for flow imbalance
1718
description correct for an imbalance in flows by assuming that any residual flow error comes in or leaves at the temperature of the cell. When this option is activated, the GWE Model budget written to the listing file will contain two additional entries: FLOW-ERROR and FLOW-CORRECTION. These two entries will be equal but opposite in sign. The FLOW-CORRECTION term is a mass flow that is added to offset the error caused by an imprecise flow balance. If these terms are not relatively small, the flow model should be rerun with stricter convergence tolerances.
1819

@@ -22,7 +23,7 @@ block packagedata
2223
name packagedata
2324
type recarray flowtype filein fname
2425
reader urword
25-
optional false
26+
optional true
2627
longname flowtype list
2728
description
2829

doc/mf6io/mf6ivar/dfn/gwt-fmi.dfn

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ name flow_imbalance_correction
1313
type keyword
1414
reader urword
1515
optional true
16+
mf6internal imbalancecorrect
1617
longname correct for flow imbalance
1718
description correct for an imbalance in flows by assuming that any residual flow error comes in or leaves at the concentration of the cell. When this option is activated, the GWT Model budget written to the listing file will contain two additional entries: FLOW-ERROR and FLOW-CORRECTION. These two entries will be equal but opposite in sign. The FLOW-CORRECTION term is a mass flow that is added to offset the error caused by an imprecise flow balance. If these terms are not relatively small, the flow model should be rerun with stricter convergence tolerances.
1819

@@ -22,7 +23,7 @@ block packagedata
2223
name packagedata
2324
type recarray flowtype filein fname
2425
reader urword
25-
optional false
26+
optional true
2627
longname flowtype list
2728
description
2829

doc/mf6io/mf6ivar/dfn/prt-fmi.dfn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ block packagedata
1414
name packagedata
1515
type recarray flowtype filein fname
1616
reader urword
17-
optional false
17+
optional true
1818
longname flowtype list
1919
description
2020

make/makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ $(OBJDIR)/sim-namidm.o \
156156
$(OBJDIR)/prt-prpidm.o \
157157
$(OBJDIR)/prt-namidm.o \
158158
$(OBJDIR)/prt-mipidm.o \
159+
$(OBJDIR)/prt-fmiidm.o \
159160
$(OBJDIR)/prt-disvidm.o \
160161
$(OBJDIR)/prt-disidm.o \
161162
$(OBJDIR)/olf-zdgidm.o \
@@ -176,6 +177,7 @@ $(OBJDIR)/gwt-namidm.o \
176177
$(OBJDIR)/gwt-mstidm.o \
177178
$(OBJDIR)/gwt-istidm.o \
178179
$(OBJDIR)/gwt-icidm.o \
180+
$(OBJDIR)/gwt-fmiidm.o \
179181
$(OBJDIR)/gwt-dspidm.o \
180182
$(OBJDIR)/gwt-disvidm.o \
181183
$(OBJDIR)/gwt-disuidm.o \
@@ -212,6 +214,7 @@ $(OBJDIR)/gwf-apiidm.o \
212214
$(OBJDIR)/gwe-ssmidm.o \
213215
$(OBJDIR)/gwe-namidm.o \
214216
$(OBJDIR)/gwe-icidm.o \
217+
$(OBJDIR)/gwe-fmiidm.o \
215218
$(OBJDIR)/gwe-estidm.o \
216219
$(OBJDIR)/gwe-eslidm.o \
217220
$(OBJDIR)/gwe-disvidm.o \

msvs/mf6core.vfproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@
170170
<File RelativePath="..\src\Idm\gwe-disvidm.f90"/>
171171
<File RelativePath="..\src\Idm\gwe-eslidm.f90"/>
172172
<File RelativePath="..\src\Idm\gwe-estidm.f90"/>
173+
<File RelativePath="..\src\Idm\gwe-fmiidm.f90"/>
173174
<File RelativePath="..\src\Idm\gwe-icidm.f90"/>
174175
<File RelativePath="..\src\Idm\gwe-namidm.f90"/>
175176
<File RelativePath="..\src\Idm\gwe-ssmidm.f90"/>
@@ -205,6 +206,7 @@
205206
<File RelativePath="..\src\Idm\gwt-disuidm.f90"/>
206207
<File RelativePath="..\src\Idm\gwt-disvidm.f90"/>
207208
<File RelativePath="..\src\Idm\gwt-dspidm.f90"/>
209+
<File RelativePath="..\src\Idm\gwt-fmiidm.f90"/>
208210
<File RelativePath="..\src\Idm\gwt-icidm.f90"/>
209211
<File RelativePath="..\src\Idm\gwt-istidm.f90"/>
210212
<File RelativePath="..\src\Idm\gwt-mstidm.f90"/>
@@ -227,6 +229,7 @@
227229
<File RelativePath="..\src\Idm\olf-zdgidm.f90"/>
228230
<File RelativePath="..\src\Idm\prt-disidm.f90"/>
229231
<File RelativePath="..\src\Idm\prt-disvidm.f90"/>
232+
<File RelativePath="..\src\Idm\prt-fmiidm.f90"/>
230233
<File RelativePath="..\src\Idm\prt-mipidm.f90"/>
231234
<File RelativePath="..\src\Idm\prt-namidm.f90"/>
232235
<File RelativePath="..\src\Idm\prt-prpidm.f90"/>

src/Idm/gwe-fmiidm.f90

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
! ** Do Not Modify! MODFLOW 6 system generated file. **
2+
module GweFmiInputModule
3+
use ConstantsModule, only: LENVARNAME
4+
use InputDefinitionModule, only: InputParamDefinitionType, &
5+
InputBlockDefinitionType
6+
private
7+
public gwe_fmi_param_definitions
8+
public gwe_fmi_aggregate_definitions
9+
public gwe_fmi_block_definitions
10+
public GweFmiParamFoundType
11+
public gwe_fmi_multi_package
12+
public gwe_fmi_subpackages
13+
14+
type GweFmiParamFoundType
15+
logical :: save_flows = .false.
16+
logical :: imbalancecorrect = .false.
17+
logical :: flowtype = .false.
18+
logical :: filein = .false.
19+
logical :: fname = .false.
20+
end type GweFmiParamFoundType
21+
22+
logical :: gwe_fmi_multi_package = .false.
23+
24+
character(len=16), parameter :: &
25+
gwe_fmi_subpackages(*) = &
26+
[ &
27+
' ' &
28+
]
29+
30+
type(InputParamDefinitionType), parameter :: &
31+
gwefmi_save_flows = InputParamDefinitionType &
32+
( &
33+
'GWE', & ! component
34+
'FMI', & ! subcomponent
35+
'OPTIONS', & ! block
36+
'SAVE_FLOWS', & ! tag name
37+
'SAVE_FLOWS', & ! fortran variable
38+
'KEYWORD', & ! type
39+
'', & ! shape
40+
'save calculated flow imbalance correction to budget file', & ! longname
41+
.false., & ! required
42+
.false., & ! multi-record
43+
.false., & ! preserve case
44+
.false., & ! layered
45+
.false. & ! timeseries
46+
)
47+
48+
type(InputParamDefinitionType), parameter :: &
49+
gwefmi_imbalancecorrect = InputParamDefinitionType &
50+
( &
51+
'GWE', & ! component
52+
'FMI', & ! subcomponent
53+
'OPTIONS', & ! block
54+
'FLOW_IMBALANCE_CORRECTION', & ! tag name
55+
'IMBALANCECORRECT', & ! fortran variable
56+
'KEYWORD', & ! type
57+
'', & ! shape
58+
'correct for flow imbalance', & ! longname
59+
.false., & ! required
60+
.false., & ! multi-record
61+
.false., & ! preserve case
62+
.false., & ! layered
63+
.false. & ! timeseries
64+
)
65+
66+
type(InputParamDefinitionType), parameter :: &
67+
gwefmi_flowtype = InputParamDefinitionType &
68+
( &
69+
'GWE', & ! component
70+
'FMI', & ! subcomponent
71+
'PACKAGEDATA', & ! block
72+
'FLOWTYPE', & ! tag name
73+
'FLOWTYPE', & ! fortran variable
74+
'STRING', & ! type
75+
'', & ! shape
76+
'flow type', & ! longname
77+
.true., & ! required
78+
.true., & ! multi-record
79+
.false., & ! preserve case
80+
.false., & ! layered
81+
.false. & ! timeseries
82+
)
83+
84+
type(InputParamDefinitionType), parameter :: &
85+
gwefmi_filein = InputParamDefinitionType &
86+
( &
87+
'GWE', & ! component
88+
'FMI', & ! subcomponent
89+
'PACKAGEDATA', & ! block
90+
'FILEIN', & ! tag name
91+
'FILEIN', & ! fortran variable
92+
'KEYWORD', & ! type
93+
'', & ! shape
94+
'file keyword', & ! longname
95+
.true., & ! required
96+
.true., & ! multi-record
97+
.false., & ! preserve case
98+
.false., & ! layered
99+
.false. & ! timeseries
100+
)
101+
102+
type(InputParamDefinitionType), parameter :: &
103+
gwefmi_fname = InputParamDefinitionType &
104+
( &
105+
'GWE', & ! component
106+
'FMI', & ! subcomponent
107+
'PACKAGEDATA', & ! block
108+
'FNAME', & ! tag name
109+
'FNAME', & ! fortran variable
110+
'STRING', & ! type
111+
'', & ! shape
112+
'file name', & ! longname
113+
.true., & ! required
114+
.true., & ! multi-record
115+
.true., & ! preserve case
116+
.false., & ! layered
117+
.false. & ! timeseries
118+
)
119+
120+
type(InputParamDefinitionType), parameter :: &
121+
gwe_fmi_param_definitions(*) = &
122+
[ &
123+
gwefmi_save_flows, &
124+
gwefmi_imbalancecorrect, &
125+
gwefmi_flowtype, &
126+
gwefmi_filein, &
127+
gwefmi_fname &
128+
]
129+
130+
type(InputParamDefinitionType), parameter :: &
131+
gwefmi_packagedata = InputParamDefinitionType &
132+
( &
133+
'GWE', & ! component
134+
'FMI', & ! subcomponent
135+
'PACKAGEDATA', & ! block
136+
'PACKAGEDATA', & ! tag name
137+
'PACKAGEDATA', & ! fortran variable
138+
'RECARRAY FLOWTYPE FILEIN FNAME', & ! type
139+
'', & ! shape
140+
'flowtype list', & ! longname
141+
.false., & ! required
142+
.false., & ! multi-record
143+
.false., & ! preserve case
144+
.false., & ! layered
145+
.false. & ! timeseries
146+
)
147+
148+
type(InputParamDefinitionType), parameter :: &
149+
gwe_fmi_aggregate_definitions(*) = &
150+
[ &
151+
gwefmi_packagedata &
152+
]
153+
154+
type(InputBlockDefinitionType), parameter :: &
155+
gwe_fmi_block_definitions(*) = &
156+
[ &
157+
InputBlockDefinitionType( &
158+
'OPTIONS', & ! blockname
159+
.false., & ! required
160+
.false., & ! aggregate
161+
.false. & ! block_variable
162+
), &
163+
InputBlockDefinitionType( &
164+
'PACKAGEDATA', & ! blockname
165+
.false., & ! required
166+
.true., & ! aggregate
167+
.false. & ! block_variable
168+
) &
169+
]
170+
171+
end module GweFmiInputModule

0 commit comments

Comments
 (0)