or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
Flowy
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →1. How to run the code
From what we can tell,
mr_lava_loba.py
was run by copying the script, together with the input files into a run folder. Then, the python script was executed from that folder.The recommended way to run
flowy
is to give it the path to theinput.toml
file and to the DEM.asc
file via command line arguments or by specifying absolute paths ininput.toml
.Help instructions for the command line arguments are printed when using
flowy --help
.As an example: Let's assume we have stored the
input.toml
in a folder namedrun_folder
. And we have a DEM stored in the same folder. Then we could invoke flowy like so:flowy run_folder/input.toml -a run_folder/dem.asc -o run_folder
.This will tell flowy where to find
input.toml
anddem.asc
, as well as to store the outputs in therun_folder
.For a simple shell script that runs the Kilauea example see here.
Note that this script also tries to plot the output, which relies on a few extra python packages being installed.
On Elja, we installed
Flowy
so that you can run it like this:Please note, you cannot write to the
flowy-stuff
folder. If you want to run the ETNA or KILAUEA examples, you should specify an output folder in your own home directory (or any directory you have write permissions to).2. How to convert the
input.py
andinput_advanced.py
toinput.toml
To convert a given pair of input files to the new format, create an empty file
input.toml
.First, copy and paste the contents of
input.py
intoinput.toml
.Then write
[Advanced]
in a new line and paste the contents ofinput_advanced.py
after that line.Overall
input.toml
should look like this:For concrete examples see the
./examples
folder in the repository. E.g. here.3. Prerequisites: Sanitaziation of
.asc
filesOne issue, that occurred when trying to run the Mt. Etna example, from the Mr. Lava Loba repository, was that the DEM .asc file was "corrupted". It contained invisible
\r
characters. Because of that, the reading those files intoflowy
fails. In addition, 'nan' values in these files, or incorrect values ofncols
ornrows
in the ASCII files can causeFlowy
to crash.We have written a simple asc file sanitaziation script, that gets rid of the invisible characters, checks the number of rows and columns, etc. We recommend that you run this sanitization script on the input DEM asc file first, just to be safe. This script is inside the shared directory we have created, so you can use it like this:
The first argument is the path to the asc file you want to sanitize, and the second argument is the path to the new asc file. You can set the name to be the same, in which case the old asc file would be overwritten. In addition, if you want to run this sanitization script on your own machine, you can get it from the GitHub repository.
4. Unimplemented input parameters
Some parameters have not been implemented yet. We will not list the implemented parameters here.
Unimplemented parameters from
input.py
:topo_mod_flag
: Right now, the topography is always modified by the flow. Each lobe is added to the topography.n_flows_counter
: Not implementedn_lobes_counter
: Not implemented. The slope is reevaluated in every step.Unimplemented parameters from
input_advanced.py
:saveshape_flag
: Not implemented.saveraster_flag
: The output is always saved in .asc format or .nc format, so this is not used.flag_threshold
: We didn't know what this was.plot_lobes_flag
: We don't use this, but we have a new option calledwrite_lobes_csv
(which can be true or false) that outputs lobe informationplot_flow_flag
: Not implemented. What is this?force_max_length
andmax_length
: Not implementedn_check_loop
: We didn't see this being used in Mr Lava Lobastart_from_dist_flag
: Not implementedshape_name
: Not implemented.