Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

This is a tutorial of level 'beginner'. If you have not done so already, familiarise familiarize yourself with the DeltaShell User interface here before starting this tutorial.

This tutorial requires no knowledge of Python.

...

This tutorial assumes that you have a SOBEK 3 model at your disposal. If you have not, follow this tutorial first to build one.

...

Running a single model

  1. Navigate to the directory in which you model (*.dsproj) is located. If you have no model, follow this tutorial first to build one.
  2. Create a new .bat file in the same directory with your favorite text editor. In the bat file, enter 1 line using the following syntax: Path_To_DSConsole -p path_to_dsproj -f path_toscript. For example:

    echo 'a'
    Code Block
    languagepowershell
    titleRunModel.bat
    firstline1
    linenumberstrue
    collapsetrue
    "d:\software\SOBEK (3.4.0.32140)\bin\DeltaShell.Console.exe"  -p SingleChannel.dsproj -f RunModel.py >> output.txt

    This script consists of the following items

      • '(....)\bin\DeltaShell.Console.exe' is the path to DeltaShell's console interface. For more information on this interface, please check the 'Command Line and Scripting' chapter of the DeltaShell User Manual.
      • '-p *.dsproj' This tells DeltaShell to load a project
      • '-f *.py'  This tells DeltaShell to execute said script. We will write the script in the next steps.
      • >> output.txt The output of the bat script will be written to file, instead echoed to the command promp

 

Info

Content by Label
showLabelsfalse
max5
spacesSobek
sortmodified
showSpacefalse
reversetrue
typepage
labelstutorial tut-scripting