-
Notifications
You must be signed in to change notification settings - Fork 1
/
profileclm.tcl
executable file
·301 lines (226 loc) · 11.5 KB
/
profileclm.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
#
# Import the ParFlow TCL package
#
lappend auto_path $env(PARFLOW_DIR)/bin
package require parflow
namespace import Parflow::*
pfset FileVersion 4
pfset Process.Topology.P 1
pfset Process.Topology.Q 1
pfset Process.Topology.R 1
#---------------------------------------------------------
# Computational Grid
#---------------------------------------------------------
pfset ComputationalGrid.Lower.X 0.0
pfset ComputationalGrid.Lower.Y 0.0
pfset ComputationalGrid.Lower.Z 0.0
pfset ComputationalGrid.NX 100
pfset ComputationalGrid.NY 5
pfset ComputationalGrid.NZ 600
pfset ComputationalGrid.DX 1.0
pfset ComputationalGrid.DY 0.2
pfset ComputationalGrid.DZ 0.01
set nx [pfget ComputationalGrid.NX]
set dx [pfget ComputationalGrid.DX]
set ny [pfget ComputationalGrid.NY]
set dy [pfget ComputationalGrid.DY]
set nz [pfget ComputationalGrid.NZ]
set dz [pfget ComputationalGrid.DZ]
#---------------------------------------------------------
# The Names of the GeomInputs
#---------------------------------------------------------
pfset GeomInput.Names "solidinput"
pfset GeomInput.solidinput.InputType SolidFile
pfset GeomInput.solidinput.GeomNames domain
pfset GeomInput.solidinput.FileName geom.pfsol
pfset Geom.domain.Patches "top bottom perimeter"
#-----------------------------------------------------------------------------
# Perm
#-----------------------------------------------------------------------------
pfset Geom.Perm.Names domain
# Values in m/hour
pfset Geom.domain.Perm.Type Constant
pfset Geom.domain.Perm.Value 1.0
#-----------------------------------------------------------------------------
# Perm Tensors
#-----------------------------------------------------------------------------
pfset Perm.TensorType TensorByGeom
pfset Geom.Perm.TensorByGeom.Names "domain"
pfset Geom.domain.Perm.TensorValX 1.0d0
pfset Geom.domain.Perm.TensorValY 1.0d0
pfset Geom.domain.Perm.TensorValZ 1.0d0
#-----------------------------------------------------------------------------
# Specific Storage
#-----------------------------------------------------------------------------
pfset SpecificStorage.Type Constant
pfset SpecificStorage.GeomNames "domain"
pfset Geom.domain.SpecificStorage.Value 0.0001
pfset Geom.domain.SpecificStorage.Value 0.0
#-----------------------------------------------------------------------------
# Phases
#-----------------------------------------------------------------------------
pfset Phase.Names "water"
pfset Phase.water.Density.Type Constant
pfset Phase.water.Density.Value 1.0
pfset Phase.water.Viscosity.Type Constant
pfset Phase.water.Viscosity.Value 1.0
#-----------------------------------------------------------------------------
# Contaminants
#-----------------------------------------------------------------------------
pfset Contaminants.Names ""
#-----------------------------------------------------------------------------
# Retardation
#-----------------------------------------------------------------------------
pfset Geom.Retardation.GeomNames ""
#-----------------------------------------------------------------------------
# Gravity
#-----------------------------------------------------------------------------
pfset Gravity 1.0
#-----------------------------------------------------------------------------
# Setup timing info
#-----------------------------------------------------------------------------
pfset TimingInfo.BaseUnit 1.0
pfset TimingInfo.StartCount 0
pfset TimingInfo.StartTime 0.0
pfset TimingInfo.StopTime 24.0
pfset TimingInfo.DumpInterval 1.0
pfset TimeStep.Type Constant
pfset TimeStep.Value 1.0
#-----------------------------------------------------------------------------
# Porosity
#-----------------------------------------------------------------------------
pfset Geom.Porosity.GeomNames domain
pfset Geom.domain.Porosity.Type Constant
pfset Geom.domain.Porosity.Value 0.415
#-----------------------------------------------------------------------------
# Domain
#-----------------------------------------------------------------------------
pfset Domain.GeomName domain
#-----------------------------------------------------------------------------
# Relative Permeability
#-----------------------------------------------------------------------------
pfset Phase.RelPerm.Type VanGenuchten
pfset Phase.RelPerm.GeomNames domain
pfset Geom.domain.RelPerm.Alpha 1.0
pfset Geom.domain.RelPerm.N 2.
#---------------------------------------------------------
# Saturation
#---------------------------------------------------------
pfset Phase.Saturation.Type VanGenuchten
pfset Phase.Saturation.GeomNames domain
pfset Geom.domain.Saturation.Alpha 1.0
pfset Geom.domain.Saturation.N 2.0
pfset Geom.domain.Saturation.SRes 0.11
pfset Geom.domain.Saturation.SSat 1.0
#-----------------------------------------------------------------------------
# Wells
#-----------------------------------------------------------------------------
pfset Wells.Names ""
#-----------------------------------------------------------------------------
# Time Cycles
#-----------------------------------------------------------------------------
pfset Cycle.Names constant
pfset Cycle.constant.Names "alltime"
pfset Cycle.constant.alltime.Length 1
pfset Cycle.constant.Repeat -1
#-----------------------------------------------------------------------------
# Boundary Conditions: Pressure
#-----------------------------------------------------------------------------
pfset BCPressure.PatchNames "top bottom perimeter"
pfset Patch.perimeter.BCPressure.Type FluxConst
pfset Patch.perimeter.BCPressure.Cycle "constant"
pfset Patch.perimeter.BCPressure.alltime.Value 0.0
pfset Patch.bottom.BCPressure.Type FluxConst
pfset Patch.bottom.BCPressure.Cycle "constant"
pfset Patch.bottom.BCPressure.alltime.Value 0.0
pfset Patch.top.BCPressure.Type OverlandFlow
pfset Patch.top.BCPressure.Cycle "constant"
pfset Patch.top.BCPressure.alltime.Value 0.0
#---------------------------------------------------------
# Topo slopes in x-direction
#---------------------------------------------------------
pfset TopoSlopesX.Type "Constant"
pfset TopoSlopesX.GeomNames "domain"
pfset TopoSlopesX.Geom.domain.Value 0.01
#---------------------------------------------------------
# Topo slopes in y-direction
#---------------------------------------------------------
pfset TopoSlopesY.Type "Constant"
pfset TopoSlopesY.GeomNames "domain"
pfset TopoSlopesY.Geom.domain.Value 0.01
#---------------------------------------------------------
# Mannings coefficient
#---------------------------------------------------------
pfset Mannings.Type "Constant"
pfset Mannings.GeomNames "domain"
pfset Mannings.Geom.domain.Value 5.52e-6
#-----------------------------------------------------------------------------
# Phase sources:
#-----------------------------------------------------------------------------
pfset PhaseSources.water.Type Constant
pfset PhaseSources.water.GeomNames domain
pfset PhaseSources.water.Geom.domain.Value 0.0
#-----------------------------------------------------------------------------
# Exact solution specification for error calculations
#-----------------------------------------------------------------------------
pfset KnownSolution NoKnownSolution
#-----------------------------------------------------------------------------
# Set solver parameters
#-----------------------------------------------------------------------------
pfset Solver Richards
pfset Solver.MaxIter 2500000
#pfset Solver.TerrainFollowingGrid True
pfset Solver.Nonlinear.MaxIter 300
pfset Solver.Nonlinear.ResidualTol 1.0e-8
pfset Solver.Nonlinear.EtaChoice Walker1
pfset Solver.Nonlinear.EtaChoice EtaConstant
pfset Solver.Nonlinear.EtaValue 0.001
pfset Solver.Nonlinear.UseJacobian True
pfset Solver.Nonlinear.DerivativeEpsilon 1e-16
pfset Solver.Nonlinear.StepTol 1e-10
pfset Solver.Nonlinear.Globalization LineSearch
pfset Solver.Linear.KrylovDimension 40
pfset Solver.Linear.MaxRestart 2
pfset Solver.Linear.Preconditioner PFMGOctree
#pfset Solver.Linear.Preconditioner PFMG
#pfset Solver.Linear.Preconditioner.PCMatrixType FullJacobian
#pfset Solver.Linear.Preconditioner.PCMatrixType FullJacobian
#pfset Solver.Linear.Preconditioner MGSemi
#pfset Solver.Linear.Preconditioner.MGSemi.MaxIter 1
#pfset Solver.Linear.Preconditioner.MGSemi.MaxLevels 100
pfset Solver.Drop 1E-20
pfset Solver.AbsTol 1E-9
pfset Solver.LSM CLM
pfset Solver.WriteSiloCLM True
pfset Solver.CLM.Print1dOut True
pfset Solver.BinaryOutDir ./binout
pfset Solver.CLM.CLMDumpInterval 8760
pfset Solver.CLM.MetForcing 1D
pfset Solver.CLM.MetFileName atmforcing.txt
pfset Solver.CLM.MetFilePath ./
pfset Solver.CLM.IstepStart 1
pfset Solver.PrintPressure True
pfset Solver.PrintSaturation True
pfset Solver.PrintSubsurfData True
pfset Solver.PrintLSMSink True
pfset Solver.PrintEvapTransSum True
pfset Solver.PrintSlopes True
pfset Solver.PrintMannings True
pfset Solver.PrintMask True
pfset Solver.PrintOverlandSum False
#---------------------------------------------------------
# Initial conditions: water pressure
#---------------------------------------------------------
pfset ICPressure.Type HydroStaticPatch
pfset ICPressure.GeomNames domain
pfset Geom.domain.ICPressure.Value -0.125
pfset Geom.domain.ICPressure.RefGeom domain
pfset Geom.domain.ICPressure.RefPatch top
#pfdist press.ini.pfb
#pfset ICPressure.Type PFBFile
#pfset Geom.domain.ICPressure.FileName press.ini.pfb
#pfset ICPressure.GeomNames domain
#-----------------------------------------------------------------------------
# Run and Unload the ParFlow output files
#-----------------------------------------------------------------------------
pfwritedb profileclm1