4.8 A graphical user interface for editing ASPECT parameter files

Preparing a parameter file in a text editor can be a tedious task, not only because the number of input parameters has grown considerably during the development of ASPECT, but also because remembering the names of commonly used options is a waste of (human) memory. Therefore, we provide a graphical user interface that builds upon an available program for deal.II. This GUI allows to investigate existing input parameters, including their default values, modify these values in a spreadsheet like environment and then save a formatted parameter file that can be used to start an ASPECT model. In the following subsections we describe installing and using this user interface.

4.8.1 Installing parameter-GUI

The deal.II parameter-GUI program can be downloaded at https://github.com/dealii/parameter_gui, and is compiled using the cmake program just like ASPECT itself. The program has no dependencies except for the Qt development libraries that should be available as packages for most Linux distributions and can also be obtained for all major operating systems at https://www.qt.io/download-_open-_source/.

Example steps for installing the parameter-gui could look as follows:

  1. Download the program from https://github.com/dealii/parameter_gui.
  2. Prepare a Makefile by running cmake . in the source folder.
  3. Compile the program by running make.
  4. Make sure to set the environment variable PARAMETER_GUI_DIR to the directory that contains the parameter-GUI executable (optional). This will allow ASPECT to automatically enable the GUI during configuration.

Installing on macOS On a mac machine with recent macOS Sierra 10.12.4, Qt development libraries of version 4.x.x at the libraries’ official website https://www.qt.io/download-_open-_source/ may fail to install. Alternatively, you can install qt4 through Homebrew (also see instruction here https://github.com/cartr/homebrew-_qt4)

brew tap cartr/qt4  
brew tap-pin cartr/qt4  
brew install qt@4

or install it through Mac Ports (https://www.macports.org/)

sudo port install qt4-mac

Then you can follow the Linux user instructions provided previously to download and install dealii parameter-GUI. Before running cmake ., you may need to either pass the path of qt4 and specify the value of variable QT_LIBRARIES to the directory that contains the libraries of qt4 or add those information into your .bash_profile. For example, for installation through Mac Ports, you can set the following into your .bash_profile

export PATH="$PATH:/opt/local/libexec/qt4"  
export QT_LIBRARIES="/opt/local/libexec/qt4"

4.8.2 Using ASPECT-GUI

When configuring ASPECT after executing the above steps, it should automatically pick up the location of the parameter-GUI, and will create a new script named aspect-gui within the build folder. If this does not happen, it is possible to hand over the location of the parameter-GUI as a cmake variable during configuration (e.g. cmake -D PARAMETER_GUI_EXECUTABLE=path_to_your_executable).

The aspect-gui script can be executed from any folder either with no argument or with one argument that contains the path to an existing parameter file. The script will run ASPECT with the given (or an empty) parameter file, generate a database of existing input parameters, and open the parameter-GUI program with this database. The resulting window looks similar to Fig. 6. If an existing parameter file was given, all parameter fields are pre-filled with the values set in the file instead of the default values. In the program’s main window you can change parameters as necessary, and then save the file as a new parameter file. This parameter file can then be used to start an ASPECT model as usual. Note that it is possible to prepare and execute the parameter file with different versions of ASPECT, e.g. if you prepare parameter files on a local machine, and execute the model on a remote compute cluster. Note however that if the two ASPECT versions contain different default values or parameter names have changed, this can lead to unexpected model behavior or even unusable parameter files.


PIC

Figure 6: The parameter GUI lists all available parameter options, and allows to change and save them into a new parameter file. Input fields know about the type of the variable and will display useful options to change them (e.g. drop-down menus, file dialogs, text fields).