snowpack

Running-Snowpack

You are looking at an old revision of the page Running-Snowpack. This revision was created by Mathias Bavay.

Table of Content

How to run a basic simulation

Introduction

SNOWPACK has been deeply transformed compared to its old c code base. This makes it much easier to recompile SNOWPACK on another system but also allows the user to deeply alter the operation of the model at run time, by changing a few keys in a configuration file. The old-style workflow is therefore not valid anymore

Running the provided examples

Once SNOWPACK has been installed (see Getting-started), it is possible to run the simulations provided as examples in {your_install_directory}/share/doc/examples. You can run these either from the command line or from inishell (highly recommended). Most probably, you will need to copy this example folder to a place where you have write permissions (or change the permissions of this folder)

Running Snowpack from Inishell

First, open Inishell. The select the Snowpack application in the left panel

.

Then create an ini file or open the ini file of your choice (so here, open an ini file from the examples).

The, open the Snowpack Workflow and provide the start and end dates

Please make sure that Snowpack will run from the appropriate path! For the provided examples, it should be one level above the ini file, so select "{inifile}/../"

Running Snowpack from the command line

  • open a terminal (on Windows, go to "Start > All Programs > Accessories > Command Prompt", on osX look for the "Terminal" application)
  • go to the directory where the simulations are
  • run the simulation:
    • for Windows
      • in a text editor, open one of the ".sh" files
      • copy the line that runs the simulation to your command line, for example snowpack -c cfgfiles/io_res1exp.ini -e 1996-06-17T00:00
    • for Mac or Linux, run the script file, for example ./run_res1exp.sh or run Snowpack directly from the command line (see above)
  • visualize the results with niViz.

General workflow

For running your own simulations, your are advised to follow the following steps:

  • create a directory for your simulation(s)
  • copy the meteo files as well as initial snow profiles in an input subdirectory
  • create an output subdirectory
  • if you would put many simulations in the same directory, it might be a good idea to create a config directory to store the configuration files
  • create the simulation configuration file:
    • either by using inishell (recommended)
    • or by copying an existing ini file and modifying it (knowing that you can open an existing config file in inishell to modify it)
  • run the simulation directly, providing it with the configuration file to use and the end date, or put this command line in a script file
  • visualize the results with niViz.

When something does not work

Please have a look at GettingHelp!