Example of Parflow CLM tcl file - Wei64380/Parflow-CLM GitHub Wiki

An example of the Parflow-CLM file for the Washita catchment

  1. SCRIPT TO RUN LITTLE WASHITA DOMAIN WITH TERRAIN-FOLLOWING GRID

  2. DETAILS:

  3. Arugments are 1) runname 2) year

  4. Import the ParFlow TCL package

  5. lappend auto_path $env(PARFLOW_DIR)/bin

  6. package require parflow

  7. namespace import Parflow::*

  8. pfset FileVersion 4

  9. #-----------------------------------------------------------------------------

  10. Set Processor topology

  11. #-----------------------------------------------------------------------------

  12. pfset Process.Topology.P 2

  13. pfset Process.Topology.Q 1

  14. pfset Process.Topology.R 1

  15. #-----------------------------------------------------------------------------

  16. Computational Grid

  17. #-----------------------------------------------------------------------------

  18. pfset ComputationalGrid.Lower.X 0.0

  19. pfset ComputationalGrid.Lower.Y 0.0

  20. pfset ComputationalGrid.Lower.Z 0.0

  21. pfset ComputationalGrid.DX 1000.0

  22. pfset ComputationalGrid.DY 1000.0

  23. pfset ComputationalGrid.DZ 2.0

  24. pfset ComputationalGrid.NX 41

  25. pfset ComputationalGrid.NY 41

  26. pfset ComputationalGrid.NZ 50

  27. #-----------------------------------------------------------------------------

  28. Names of the GeomInputs

  29. #-----------------------------------------------------------------------------

  30. pfset GeomInput.Names "box_input indi_input"

  31. #-----------------------------------------------------------------------------

  32. Domain Geometry Input

  33. #-----------------------------------------------------------------------------

  34. pfset GeomInput.box_input.InputType Box

  35. pfset GeomInput.box_input.GeomName domain

  36. #-----------------------------------------------------------------------------

  37. Domain Geometry

  38. #-----------------------------------------------------------------------------

  39. pfset Geom.domain.Lower.X 0.0

  40. pfset Geom.domain.Lower.Y 0.0

  41. pfset Geom.domain.Lower.Z 0.0

  42. pfset Geom.domain.Upper.X 41000.0

  43. pfset Geom.domain.Upper.Y 41000.0

  44. pfset Geom.domain.Upper.Z 100.0

  45. pfset Geom.domain.Patches "x-lower x-upper y-lower y-upper z-lower z-upper"

  46. #-----------------------------------------------------------------------------

  47. Indicator Geometry Input

  48. #-----------------------------------------------------------------------------

  49. pfset GeomInput.indi_input.InputType IndicatorField

  50. pfset GeomInput.indi_input.GeomNames "s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 g1 g2 g3 g4 g5 g6 g7 g8"

  51. pfset Geom.indi_input.FileName "IndicatorFile_Gleeson.50z.pfb"

  52. pfset GeomInput.s1.Value 1

  53. pfset GeomInput.s2.Value 2

  54. pfset GeomInput.s3.Value 3

  55. pfset GeomInput.s4.Value 4

  56. pfset GeomInput.s5.Value 5

  57. pfset GeomInput.s6.Value 6

  58. pfset GeomInput.s7.Value 7

  59. pfset GeomInput.s8.Value 8

  60. pfset GeomInput.s9.Value 9

  61. pfset GeomInput.s10.Value 10

  62. pfset GeomInput.s11.Value 11

  63. pfset GeomInput.s12.Value 12

  64. pfset GeomInput.s13.Value 13

  65. pfset GeomInput.g1.Value 21

  66. pfset GeomInput.g2.Value 22

  67. pfset GeomInput.g3.Value 23

  68. pfset GeomInput.g4.Value 24

  69. pfset GeomInput.g5.Value 25

  70. pfset GeomInput.g6.Value 26

  71. pfset GeomInput.g7.Value 27

  72. pfset GeomInput.g8.Value 28

  73. #-----------------------------------------------------------------------------

  74. Permeability (values in m/hr)

  75. #-----------------------------------------------------------------------------

  76. pfset Geom.Perm.Names "domain s1 s2 s3 s4 s5 s6 s7 s8 s9 g2 g3 g6 g8"

  77. pfset Geom.domain.Perm.Type Constant

  78. pfset Geom.domain.Perm.Value 0.2

  79. pfset Geom.s1.Perm.Type Constant

  80. pfset Geom.s1.Perm.Value 0.269022595

  81. pfset Geom.s2.Perm.Type Constant

  82. pfset Geom.s2.Perm.Value 0.043630356

  83. pfset Geom.s3.Perm.Type Constant

  84. pfset Geom.s3.Perm.Value 0.015841225

  85. pfset Geom.s4.Perm.Type Constant

  86. pfset Geom.s4.Perm.Value 0.007582087

  87. pfset Geom.s5.Perm.Type Constant

  88. pfset Geom.s5.Perm.Value 0.01818816

  89. pfset Geom.s6.Perm.Type Constant

  90. pfset Geom.s6.Perm.Value 0.005009435

  91. pfset Geom.s7.Perm.Type Constant

  92. pfset Geom.s7.Perm.Value 0.005492736

  93. pfset Geom.s8.Perm.Type Constant

  94. pfset Geom.s8.Perm.Value 0.004675077

  95. pfset Geom.s9.Perm.Type Constant

  96. pfset Geom.s9.Perm.Value 0.003386794

  97. pfset Geom.g2.Perm.Type Constant

  98. pfset Geom.g2.Perm.Value 0.025

  99. pfset Geom.g3.Perm.Type Constant

  100. pfset Geom.g3.Perm.Value 0.059

  101. pfset Geom.g6.Perm.Type Constant

  102. pfset Geom.g6.Perm.Value 0.2

  103. pfset Geom.g8.Perm.Type Constant

  104. pfset Geom.g8.Perm.Value 0.68

  105. pfset Perm.TensorType TensorByGeom

  106. pfset Geom.Perm.TensorByGeom.Names "domain"

  107. pfset Geom.domain.Perm.TensorValX 1.0d0

  108. pfset Geom.domain.Perm.TensorValY 1.0d0

  109. pfset Geom.domain.Perm.TensorValZ 1.0d0

  110. #-----------------------------------------------------------------------------

  111. Specific Storage

  112. #-----------------------------------------------------------------------------

  113. pfset SpecificStorage.Type Constant

  114. pfset SpecificStorage.GeomNames "domain"

  115. pfset Geom.domain.SpecificStorage.Value 1.0e-5

  116. #-----------------------------------------------------------------------------

  117. Phases

  118. #-----------------------------------------------------------------------------

  119. pfset Phase.Names "water"

  120. pfset Phase.water.Density.Type Constant

  121. pfset Phase.water.Density.Value 1.0

  122. pfset Phase.water.Viscosity.Type Constant

  123. pfset Phase.water.Viscosity.Value 1.0

  124. #-----------------------------------------------------------------------------

  125. Contaminants

  126. #-----------------------------------------------------------------------------

  127. pfset Contaminants.Names ""

  128. #-----------------------------------------------------------------------------

  129. Gravity

  130. #-----------------------------------------------------------------------------

  131. pfset Gravity 1.0

  132. #-----------------------------------------------------------------------------

  133. Timing (time units is set by units of permeability)

  134. #-----------------------------------------------------------------------------

  135. pfset TimingInfo.BaseUnit 1.0

  136. pfset TimingInfo.StartCount 0.0

  137. pfset TimingInfo.StartTime 0.0

  138. pfset TimingInfo.StopTime 8760.0

  139. pfset TimingInfo.DumpInterval 24.0

  140. pfset TimeStep.Type Constant

  141. pfset TimeStep.Value 1.0

  142. #-----------------------------------------------------------------------------

  143. Porosity

  144. #-----------------------------------------------------------------------------

  145. pfset Geom.Porosity.GeomNames "domain s1 s2 s3 s4 s5 s6 s7 s8 s9"

  146. pfset Geom.domain.Porosity.Type Constant

  147. pfset Geom.domain.Porosity.Value 0.4

  148. pfset Geom.s1.Porosity.Type Constant

  149. pfset Geom.s1.Porosity.Value 0.375

  150. pfset Geom.s2.Porosity.Type Constant

  151. pfset Geom.s2.Porosity.Value 0.39

  152. pfset Geom.s3.Porosity.Type Constant

  153. pfset Geom.s3.Porosity.Value 0.387

  154. pfset Geom.s4.Porosity.Type Constant

  155. pfset Geom.s4.Porosity.Value 0.439

  156. pfset Geom.s5.Porosity.Type Constant

  157. pfset Geom.s5.Porosity.Value 0.489

  158. pfset Geom.s6.Porosity.Type Constant

  159. pfset Geom.s6.Porosity.Value 0.399

  160. pfset Geom.s7.Porosity.Type Constant

  161. pfset Geom.s7.Porosity.Value 0.384

  162. pfset Geom.s8.Porosity.Type Constant

  163. pfset Geom.s8.Porosity.Value 0.482

  164. pfset Geom.s9.Porosity.Type Constant

  165. pfset Geom.s9.Porosity.Value 0.442

  166. #-----------------------------------------------------------------------------

  167. Domain

  168. #-----------------------------------------------------------------------------

  169. pfset Domain.GeomName "domain"

  170. #----------------------------------------------------------------------------

  171. Mobility

  172. #----------------------------------------------------------------------------

  173. pfset Phase.water.Mobility.Type Constant

  174. pfset Phase.water.Mobility.Value 1.0

  175. #-----------------------------------------------------------------------------

  176. Wells

  177. #-----------------------------------------------------------------------------

  178. pfset Wells.Names ""

  179. #-----------------------------------------------------------------------------

  180. Time Cycles

  181. #-----------------------------------------------------------------------------

  182. pfset Cycle.Names "constant"

  183. pfset Cycle.constant.Names "alltime"

  184. pfset Cycle.constant.alltime.Length 1

  185. pfset Cycle.constant.Repeat -1

  186. #-----------------------------------------------------------------------------

  187. Boundary Conditions

  188. #-----------------------------------------------------------------------------

  189. pfset BCPressure.PatchNames [pfget Geom.domain.Patches]

  190. pfset Patch.x-lower.BCPressure.Type FluxConst

  191. pfset Patch.x-lower.BCPressure.Cycle "constant"

  192. pfset Patch.x-lower.BCPressure.alltime.Value 0.0

  193. pfset Patch.y-lower.BCPressure.Type FluxConst

  194. pfset Patch.y-lower.BCPressure.Cycle "constant"

  195. pfset Patch.y-lower.BCPressure.alltime.Value 0.0

  196. pfset Patch.z-lower.BCPressure.Type FluxConst

  197. pfset Patch.z-lower.BCPressure.Cycle "constant"

  198. pfset Patch.z-lower.BCPressure.alltime.Value 0.0

  199. pfset Patch.x-upper.BCPressure.Type FluxConst

  200. pfset Patch.x-upper.BCPressure.Cycle "constant"

  201. pfset Patch.x-upper.BCPressure.alltime.Value 0.0

  202. pfset Patch.y-upper.BCPressure.Type FluxConst

  203. pfset Patch.y-upper.BCPressure.Cycle "constant"

  204. pfset Patch.y-upper.BCPressure.alltime.Value 0.0

  205. pfset Patch.z-upper.BCPressure.Type OverlandFlow

  206. pfset Patch.z-upper.BCPressure.Cycle "constant"

  207. pfset Patch.z-upper.BCPressure.alltime.Value 0.0

  208. #-----------------------------------------------------------------------------

  209. Topo slopes in x-direction

  210. #-----------------------------------------------------------------------------

  211. pfset TopoSlopesX.Type "PFBFile"

  212. pfset TopoSlopesX.GeomNames "domain"

  213. pfset TopoSlopesX.FileName "LW.slopex.pfb"

  214. #-----------------------------------------------------------------------------

  215. Topo slopes in y-direction

  216. #-----------------------------------------------------------------------------

  217. pfset TopoSlopesY.Type "PFBFile"

  218. pfset TopoSlopesY.GeomNames "domain"

  219. pfset TopoSlopesY.FileName "LW.slopey.pfb"

  220. #-----------------------------------------------------------------------------

  221. Mannings coefficient

  222. #-----------------------------------------------------------------------------

  223. pfset Mannings.Type "Constant"

  224. pfset Mannings.GeomNames "domain"

  225. pfset Mannings.Geom.domain.Value 5.52e-6

  226. #-----------------------------------------------------------------------------

  227. Relative Permeability

  228. #-----------------------------------------------------------------------------

  229. pfset Phase.RelPerm.Type VanGenuchten

  230. pfset Phase.RelPerm.GeomNames "domain s1 s2 s3 s4 s5 s6 s7 s8 s9 "

  231. pfset Geom.domain.RelPerm.Alpha 3.5

  232. pfset Geom.domain.RelPerm.N 2.0

  233. pfset Geom.s1.RelPerm.Alpha 3.548

  234. pfset Geom.s1.RelPerm.N 4.162

  235. pfset Geom.s2.RelPerm.Alpha 3.467

  236. pfset Geom.s2.RelPerm.N 2.738

  237. pfset Geom.s3.RelPerm.Alpha 2.692

  238. pfset Geom.s3.RelPerm.N 2.445

  239. pfset Geom.s4.RelPerm.Alpha 0.501

  240. pfset Geom.s4.RelPerm.N 2.659

  241. pfset Geom.s5.RelPerm.Alpha 0.661

  242. pfset Geom.s5.RelPerm.N 2.659

  243. pfset Geom.s6.RelPerm.Alpha 1.122

  244. pfset Geom.s6.RelPerm.N 2.479

  245. pfset Geom.s7.RelPerm.Alpha 2.089

  246. pfset Geom.s7.RelPerm.N 2.318

  247. pfset Geom.s8.RelPerm.Alpha 0.832

  248. pfset Geom.s8.RelPerm.N 2.514

  249. pfset Geom.s9.RelPerm.Alpha 1.585

  250. pfset Geom.s9.RelPerm.N 2.413

  251. #-----------------------------------------------------------------------------

  252. Saturation

  253. #-----------------------------------------------------------------------------

  254. pfset Phase.Saturation.Type VanGenuchten

  255. pfset Phase.Saturation.GeomNames "domain s1 s2 s3 s4 s5 s6 s7 s8 s9 "

  256. pfset Geom.domain.Saturation.Alpha 3.5

  257. pfset Geom.domain.Saturation.N 2.

  258. pfset Geom.domain.Saturation.SRes 0.2

  259. pfset Geom.domain.Saturation.SSat 1.0

  260. pfset Geom.s1.Saturation.Alpha 3.548

  261. pfset Geom.s1.Saturation.N 4.162

  262. pfset Geom.s1.Saturation.SRes 0.000001

  263. pfset Geom.s1.Saturation.SSat 1.0

  264. pfset Geom.s2.Saturation.Alpha 3.467

  265. pfset Geom.s2.Saturation.N 2.738

  266. pfset Geom.s2.Saturation.SRes 0.000001

  267. pfset Geom.s2.Saturation.SSat 1.0

  268. pfset Geom.s3.Saturation.Alpha 2.692

  269. pfset Geom.s3.Saturation.N 2.445

  270. pfset Geom.s3.Saturation.SRes 0.000001

  271. pfset Geom.s3.Saturation.SSat 1.0

  272. pfset Geom.s4.Saturation.Alpha 0.501

  273. pfset Geom.s4.Saturation.N 2.659

  274. pfset Geom.s4.Saturation.SRes 0.000001

  275. pfset Geom.s4.Saturation.SSat 1.0

  276. pfset Geom.s5.Saturation.Alpha 0.661

  277. pfset Geom.s5.Saturation.N 2.659

  278. pfset Geom.s5.Saturation.SRes 0.000001

  279. pfset Geom.s5.Saturation.SSat 1.0

  280. pfset Geom.s6.Saturation.Alpha 1.122

  281. pfset Geom.s6.Saturation.N 2.479

  282. pfset Geom.s6.Saturation.SRes 0.000001

  283. pfset Geom.s6.Saturation.SSat 1.0

  284. pfset Geom.s7.Saturation.Alpha 2.089

  285. pfset Geom.s7.Saturation.N 2.318

  286. pfset Geom.s7.Saturation.SRes 0.000001

  287. pfset Geom.s7.Saturation.SSat 1.0

  288. pfset Geom.s8.Saturation.Alpha 0.832

  289. pfset Geom.s8.Saturation.N 2.514

  290. pfset Geom.s8.Saturation.SRes 0.000001

  291. pfset Geom.s8.Saturation.SSat 1.0

  292. pfset Geom.s9.Saturation.Alpha 1.585

  293. pfset Geom.s9.Saturation.N 2.413

  294. pfset Geom.s9.Saturation.SRes 0.000001

  295. pfset Geom.s9.Saturation.SSat 1.0

  296. #-----------------------------------------------------------------------------

  297. Phase sources:

  298. #-----------------------------------------------------------------------------

  299. pfset PhaseSources.water.Type "Constant"

  300. pfset PhaseSources.water.GeomNames "domain"

  301. pfset PhaseSources.water.Geom.domain.Value 0.0

  302. #----------------------------------------------------------------

  303. CLM Settings:

  304. ------------------------------------------------------------

  305. pfset Solver.LSM CLM

  306. pfset Solver.CLM.CLMFileDir "clm_output/"

  307. pfset Solver.CLM.Print1dOut False

  308. pfset Solver.BinaryOutDir False

  309. pfset Solver.CLM.CLMDumpInterval 24

  310. pfset Solver.CLM.MetForcing 1D

  311. pfset Solver.CLM.MetFileName metfile.dat

  312. pfset Solver.CLM.MetFilePath ./

  313. #pfset Solver.CLM.MetFileNT 24

  314. pfset Solver.CLM.IstepStart 1

  315. pfset Solver.CLM.EvapBeta Linear

  316. pfset Solver.CLM.VegWaterStress Saturation

  317. pfset Solver.CLM.ResSat 0.1

  318. pfset Solver.CLM.WiltingPoint 0.12

  319. pfset Solver.CLM.FieldCapacity 0.98

  320. pfset Solver.CLM.IrrigationType none

  321. #---------------------------------------------------------

  322. Initial conditions: water pressure

  323. #---------------------------------------------------------

  324. pfset ICPressure.Type PFBFile

  325. pfset ICPressure.GeomNames domain

  326. pfset Geom.domain.ICPressure.RefPatch z-upper

  327. pfset Geom.domain.ICPressure.FileName press.init.pfb

  328. #----------------------------------------------------------------

  329. Outputs

  330. ------------------------------------------------------------

  331. #Writing output (all pfb):

  332. pfset SILO.Filetype PDB

  333. pfset Solver.PrintSubsurfData False

  334. pfset Solver.PrintPressure False

  335. pfset Solver.PrintSaturation True

  336. pfset Solver.PrintMask True

  337. pfset Solver.WriteCLMBinary False

  338. pfset Solver.PrintCLM False

  339. pfset Solver.WriteSiloSpecificStorage False

  340. pfset Solver.WriteSiloMannings False

  341. pfset Solver.WriteSiloMask False

  342. pfset Solver.WriteSiloSlopes False

  343. pfset Solver.WriteSiloSubsurfData False

  344. pfset Solver.WriteSiloPressure False

  345. pfset Solver.WriteSiloSaturation True

  346. pfset Solver.WriteSiloEvapTrans False

  347. pfset Solver.WriteSiloEvapTransSum False

  348. pfset Solver.WriteSiloOverlandSum False

  349. pfset Solver.WriteSiloCLM False

  350. #-----------------------------------------------------------------------------

  351. Exact solution specification for error calculations

  352. #-----------------------------------------------------------------------------

  353. pfset KnownSolution NoKnownSolution

  354. #-----------------------------------------------------------------------------

  355. Set solver parameters

  356. #-----------------------------------------------------------------------------

  357. ParFlow Solution

  358. pfset Solver Richards

  359. pfset Solver.TerrainFollowingGrid True

  360. pfset Solver.Nonlinear.VariableDz False

  361. pfset Solver.MaxIter 25000

  362. pfset Solver.Drop 1E-20

  363. pfset Solver.AbsTol 1E-8

  364. pfset Solver.MaxConvergenceFailures 8

  365. pfset Solver.Nonlinear.MaxIter 80

  366. pfset Solver.Nonlinear.ResidualTol 1e-6

  367. new solver settings for Terrain Following Grid

  368. pfset Solver.Nonlinear.EtaChoice EtaConstant

  369. pfset Solver.Nonlinear.EtaValue 0.001

  370. pfset Solver.Nonlinear.UseJacobian True

  371. pfset Solver.Nonlinear.DerivativeEpsilon 1e-16

  372. pfset Solver.Nonlinear.StepTol 1e-30

  373. pfset Solver.Nonlinear.Globalization LineSearch

  374. pfset Solver.Linear.KrylovDimension 70

  375. pfset Solver.Linear.MaxRestarts 2

  376. pfset Solver.Linear.Preconditioner PFMG

  377. pfset Solver.Linear.Preconditioner.PCMatrixType FullJacobian

  378. #-----------------------------------------------------------------------------

  379. Distribute inputs

  380. #-----------------------------------------------------------------------------

  381. pfset ComputationalGrid.NX 41

  382. pfset ComputationalGrid.NY 41

  383. pfset ComputationalGrid.NZ 1

  384. pfdist LW.slopex.pfb

  385. pfdist LW.slopey.pfb

  386. pfset ComputationalGrid.NX 41

  387. pfset ComputationalGrid.NY 41

  388. pfset ComputationalGrid.NZ 50

  389. pfdist IndicatorFile_Gleeson.50z.pfb

  390. pfdist press.init.pfb

  391. #-----------------------------------------------------------------------------

  392. Run Simulation

  393. #-----------------------------------------------------------------------------

  394. set runname "LW"

  395. puts $runname

  396. pfrun $runname

  397. #-----------------------------------------------------------------------------

  398. Undistribute outputs

  399. #-----------------------------------------------------------------------------

  400. pfundist $runname

  401. pfundist press.init.pfb

  402. pfundist LW.slopex.pfb

  403. pfundist LW.slopey.pfb

  404. pfundist IndicatorFile_Gleeson.50z.pfb

  405. puts "ParFlow run Complete"