Distribute the input files for Parflow CLM - Wei64380/Parflow-CLM GitHub Wiki
run it with TCL:
tclsh LW_Test.tcl
submit the model with mpiexec -n 2(this number is P*Q, which is set in the tcl running file) $PARFLOW_DIR/bin/parflow LW(this is the name of model, which is set in the tcl funning file)
if you submit the job with sbatch (job scrip with mipexec), you must distribute the input files of the model, the following is an example of how to distribute the input files. (example: tclsh distribute_LW.tcl)
- 1 #Import the ParFlow TCL package
- 2
- 3 lappend auto_path $env(PARFLOW_DIR)/bin
- 4 package require parflow
- 5 namespace import Parflow::*
- 6
- 7 set tcl_precision 16
- 8
- 9 #-----------------------------------------------------------------------------
- 10 #File input version number
- 11 #-----------------------------------------------------------------------------
- 12 pfset FileVersion 4
- 13
- 14 #-----------------------------------------------------------------------------
- 15 #Process Topology
- 16 #-----------------------------------------------------------------------------
- 17 pfset Process.Topology.P 2
- 18 pfset Process.Topology.Q 1
- 19 pfset Process.Topology.R 1
- 20 #-----------------------------------------------------------------------------
- 21 #Computational Grid
- 22 #-----------------------------------------------------------------------------
- 23 pfset ComputationalGrid.Lower.X 0.0
- 24 pfset ComputationalGrid.Lower.Y 0.0
- 25 pfset ComputationalGrid.Lower.Z 0.0
- 26
- 27 pfset ComputationalGrid.DX 1000.0
- 28 pfset ComputationalGrid.DY 1000.0
- 29 pfset ComputationalGrid.DZ 2.0
- 30
- 31 pfset ComputationalGrid.NX 41
- 32 pfset ComputationalGrid.NY 41
- 33 pfset ComputationalGrid.NZ 50
- 34
- 35 #-----------------------------------------------------------------------------
- 36 #Names of the GeomInputs
- 37 #-----------------------------------------------------------------------------
- 38 pfset GeomInput.Names "box_input indi_input"
- 39
- 40 #-----------------------------------------------------------------------------
- 41 #Domain Geometry Input
- 42 #-----------------------------------------------------------------------------
- 43 pfset GeomInput.box_input.InputType Box
- 44 pfset GeomInput.box_input.GeomName domain
- 45
- 46 #-----------------------------------------------------------------------------
- 47 #Domain Geometry
- 48 #-----------------------------------------------------------------------------
- 49
- 50 pfset Geom.domain.Lower.X 0.0
- 51 pfset Geom.domain.Lower.Y 0.0
- 52 pfset Geom.domain.Lower.Z 0.0
- 53
- 54 pfset Geom.domain.Upper.X 41000.0
- 55 pfset Geom.domain.Upper.Y 41000.0
- 56 pfset Geom.domain.Upper.Z 100.0
- 57 pfset Geom.domain.Patches "x-lower x-upper y-lower y-upper z-lower z-upper"
- 58
- 59
- 60 #-----------------------------------------------------------------------------
- 61 #Distribute inputs
- 62 #-----------------------------------------------------------------------------
- 63 pfset ComputationalGrid.NX 41
- 64 pfset ComputationalGrid.NY 41
- 65 pfset ComputationalGrid.NZ 1
- 66 pfdist LW.slopex.pfb
- 67 pfdist LW.slopey.pfb
- 68
- 69 pfset ComputationalGrid.NX 41
- 70 pfset ComputationalGrid.NY 41
- 71 pfset ComputationalGrid.NZ 50
- 72 pfdist IndicatorFile_Gleeson.50z.pfb
- 73 pfdist press.init.pfb