# Modeling of Geophysical Flows through GPUFOW
## Appendix A  
The command-line to run GPUFLOW has the following format:  
_/spufflow <dsm_file> <init_file> <event_or_debris_file> <state> [-c] [-d output_folder] [-device X] [-debris] [-barrier barrier_file] [-diagonal-correction value]_  
where:* _dsm_file_ is the name of the DSM representing the topography of the area of interest around the lava or debris flow; it should be large enough to cover the entire final emplacement of the flow;
* _init_file_ is the name of the initialization file, where most simulation settings (e.g., rheological properties of the lava) are set;
* _vent_or_debris_file_ is the name of the file describing the source term; this is either the location and extension of the vent(s) and/or fracture(s) in an eruption, or a DSM representing the initial distribution of movable mass in the case of a debris flow;
* _state_ is the name of the state file. This will be used to store the automaton state in a way that allows restarting the simulation from the given moment in time (adding the -l option to the command);
* _-c_ specifies compression of the output files (in.zip format);
* _-d_ introduces the _output_folder_, which is the name of the directory where all outputs pertaining the current the simulation will be stored;
* _-device_ specifies the GPU where the simulation will be run;
* _-debris_ specifies that a debris flow should be simulated (as opposed to a lava flow, which is the default);
* _-barrier_ includes barriers to the simulation, with the geometries specified in the _barrier_file_;
* _-diagonal-correction_ to set the diagonal correction factor to the specified _value_. The DSM can be loaded as an ASCII grid (GRASS and ArcInfo formats are both supported) or as a band-sequential binary file (.bsq) with an associated ASCII header in ENVI format (.hdr) for the metadata. The binary format is preferred because it is significantly smaller (50% or more) and considerably faster to load. The _init_file_ is a configuration file in text format including different types of information regarding the lava or debris properties (e.g., density, emission and solidification temperature in Kelvin, emissivity, viscosity law, water content) and the simulation setup (e.g., the end of the simulation and the time step for storage, both expressed in seconds). In the case of a lava flow simulation, the _vent_or_debris_file_ describes the location of eruptive vents and fractures, and a reference to the flux rate file, an external text file describing the TADR as it changes over time. The syntax for the _vent_file_ itself is a sequence of blocks, separated by an empty line, with each block in the form:  
_location: x_coord y_coord temperature: lava_temperature_ _tstar: time_start_ _tstar: time_start_ _tstar: fluxrate_filename_  
Eruptive fissures are described as a segmented line; in this case, location should include the start and end coordinates of each segment end:  
_location: x1_coord y1_coord x2_coord y2_coord x3_coord y3_coord...... temperature: lava_temperature_ _tstar: time_start_ _tend: time_end_ _width: width_in_meters_ _fluxrate_filename_  
For both vents and fractures, it is also possible to specify the width, determining how many cells are activated (either around the punctiform vents or in the cross direction for each fracture segment). All active vents and fractures during a simulation should be included in sequential order within the same _vent_file_. Different times in the activation/deactivation can be specified using the parameters _tstar_ and _tend_. _fluxrate_filename_, which is a required argument in case of a lava flow simulation, is the text file that should specify the time instant (in seconds) and the corresponding effusion rate (in cubic meters/seconds). In the case of eruptive fissure, the defined effusion rate is assumed to be distributed homogeneously along the active cells of the fracture.