Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Computational Modules
com5SnowSlide
com6RockAvalanche
com7Regional
com9MoTVoellmy

Input/Transformation Modules
============================
Expand Down
117 changes: 59 additions & 58 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@
import os
import sys
import sphinx_rtd_theme

# import avaframe
# sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../avaframe'))
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath("../avaframe"))
sys.path.insert(0, os.path.abspath(".."))
# sys.path.insert(0, os.path.abspath('../avaframe'))

# -- Project information -----------------------------------------------------

project = 'AvaFrame'
copyright = '2021, AvaFrame developers'
author = 'AvaFrame developers'
project = "AvaFrame"
copyright = "2021, AvaFrame developers"
author = "AvaFrame developers"


# -- General configuration ---------------------------------------------------
Expand All @@ -32,55 +33,55 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.autosummary',
'sphinx.ext.viewcode',
'sphinx_rtd_theme',
'sphinx.ext.autosectionlabel',
'sphinx.ext.extlinks',
'sphinxcontrib.bibtex',
'sphinx.ext.graphviz',
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.autosummary",
"sphinx.ext.viewcode",
"sphinx_rtd_theme",
"sphinx.ext.autosectionlabel",
"sphinx.ext.extlinks",
"sphinxcontrib.bibtex",
"sphinx.ext.graphviz",
]
# -- GraphViz configuration ----------------------------------
graphviz_output_format = 'svg'
graphviz_output_format = "svg"

bibtex_bibfiles = ['references_all.bib']
bibtex_bibfiles = ["references_all.bib"]

# alternative: use base requirements.txt in readthedocs.yml files to install
# missing modules on rtd
autosummary_mock_imports = [
'avaframe',
'avaframe.com1DFA.damCom1DFA',
'com1DFA.damCom1DFA',
'com1DFA.DFAfunctionsCython',
'com1DFA.DFAToolsCython',
'out3Plot.plotUtils',
'numpy',
'shapefile',
'scipy',
'matplotlib',
'glob',
'subprocess',
'shutil',
'math',
'pandas',
'copy',
'os',
'logging',
'time',
'mpl_toolkits',
'seaborn',
'shapely',
'configUpdater',
'configupdater',
'geopandas',
'tabulate',
'deepdiff',
'deepmerge',
'cmcrameri',
'pyshp',
'make_axes_locatable',
autodoc_mock_imports = [
"avaframe",
"avaframe.com1DFA.damCom1DFA",
"com1DFA.damCom1DFA",
"com1DFA.DFAfunctionsCython",
"com1DFA.DFAToolsCython",
"out3Plot.plotUtils",
"numpy",
"shapefile",
"scipy",
"matplotlib",
"glob",
"subprocess",
"shutil",
"math",
"pandas",
"copy",
"os",
"logging",
"time",
"mpl_toolkits",
"seaborn",
"shapely",
"configUpdater",
"configupdater",
"geopandas",
"tabulate",
"deepdiff",
"deepmerge",
"cmcrameri",
"pyshp",
"make_axes_locatable",
]
autosummary_generate = True

Expand All @@ -96,15 +97,15 @@
autosectionlabel_maxdepth = 4

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'run*', '*run*', 'run']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "run*", "*run*", "run"]

# Set the master document name for readthedocs builds
master_doc = 'index'
master_doc = "index"

# -- Options for HTML output -------------------------------------------------

Expand All @@ -117,27 +118,27 @@
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
'logo_only': True,
'style_nav_header_background': '#343131',
"logo_only": True,
"style_nav_header_background": "#343131",
# 'display_version': False,
}

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = '_static/logo.png'
html_logo = "_static/logo.png"

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
html_favicon = '_static/favicon.png'
html_favicon = "_static/favicon.png"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

# -- Options for LaTeX output ---------------------------------------------
latex_logo = '_static/logo.png'
latex_logo = "_static/logo.png"

# -- Options for referencing -------------------------------------------
numfig = True
Expand All @@ -146,4 +147,4 @@


def setup(app):
app.add_css_file('css/custom.css')
app.add_css_file("css/custom.css")
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Computational modules
* :doc:`moduleCom6RockAvalanche`
* :doc:`moduleCom7Regional`
* :doc:`moduleCom8MoTPSA`
* :doc:`moduleCom8MoTVoellmy`
* :doc:`moduleCom9MoTVoellmy`

.. toctree::
:maxdepth: 3
Expand Down
87 changes: 69 additions & 18 deletions docs/moduleCom9MoTVoellmy.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
com9MoTVoellmy: NGI MoT-Voellmy
==========================
===============================

.. Note:: This module (as well as this documentation) is currently under development and highly experimental!
The parameter settings are completely untested and unchecked. Do not expect sensible results with the included
Expand All @@ -8,33 +8,84 @@ com9MoTVoellmy: NGI MoT-Voellmy
:py:mod:`com9MoTVoellmy` allows to run the MoT-Voellmy code by Norwegian-Geotechnical-Institute
(`MoT-Voellmy github repository <https://github.com/norwegian-geotechnical-institute/MoT-Voellmy>`_).

More information and background can be found there as
well `MoT-Voellmy Documentation <https://github.com/norwegian-geotechnical-institute/MoT-Voellmy/tree/main/Documentation>`_

**This documentation covers issues related directly to running MoT-Voellmy with the help of AvaFrame**

There are 2 ways of running, please choose below.

MoT Voellmy via QGis
--------------------

Installation on Windows:
^^^^^^^^^^^^^^^^^^^^^^^^

#. Open the OSGeo4WShell that matches your QGis installation
#. Run::

pip install avaframe==2.0a3

#. Start QGis and go to `Plugins` -> `Manage and install plugins`
#. Choose `All`, search for `AvaFrame` and install/update
#. You find the `AvaFrame` toolset in the `Processing Toolbox`
#. Go to `NGI_experimental` and start `MoTVoellmy (com9)`


Input
-----
TODO
^^^^^

For additional info, see also `NGI Documentation <https://github.com/norwegian-geotechnical-institute/MoT-Voellmy/blob/main/Documentation/MoT-Voellmy_use.md#raster-input-data>`_.

Required is

* digital elevation model as raster file with `ESRI grid format <https://desktop.arcgis.com/en/arcmap/10.3/manage-data/raster-and-images/esri-ascii-raster-format.htm>`_.

ONE of the following:

* release area scenario as (multi-) polygon shapefile

- the release area polygon must not contain any "holes" or inner rings
- the release area name should not contain an underscore.
- recommended attributes are *name*, *thickness* (see :ref:`moduleCom1DFA:Release-, entrainment thickness settings`)
- ALL features within one shapefile are released at the same time (and interact), this is what we refer to as *scenario*
- if you want to simulate different scenarios with the same features, you have to copy them to separate shapefiles

* release area scenario as raster file

- same specifications as the DEM (extent, cellsize)

And the following optional raster files, in the same specification as the DEM (extent, cellsize):

* mu / Dry friction coefficient. If this is given, k needs to be set as well.
* k / Turbulent friction coefficient. If this is given, mu needs to be set as well.
* b0 / Erodible snow depth. If this is given, tau_c needs to be set as well.
* tau_c / Snow shear strength. If this is given, b0 needs to be set as well.
* nd / Forest density. If this is given, bhd needs to be set as well.
* bhd / Tree diameter. If this is given, nd needs to be set as well.

The `Destination Folder` should be empty!



Outputs
--------
TODO
^^^^^^^

After you ran the simulation, the peak fields will be loaded in QGis and the `Destination Folder` will contain, results,
plots, and configuration files.


MoT Voellmy via the script variant
----------------------------------

To run
-------
^^^^^

* go to ``AvaFrame/avaframe/com9MoTVoellmy``
* copy ``com9MoTVoellmy/com9MoTVoellmyCfg.ini`` to ``com9MoTVoellmy/local_com9MoTVoellmyCfg.ini`` and edit (if not, default values are used)
* make sure all the required inputs are available in the avalanche directory
* enter the path to the desired dataset in ``local_avaframeCfg.ini``
* run::

python3 runCom8MoTPSA.py


Theory
------

TODO


Configuration parameters
---------------------------------
python3 runCom9MoTVoellmy.py

TODO
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ setuptools = "*"
setuptools-scm = "*"
cibuildwheel = "*"
# FSO: remove as soon as possible
gdal = "*"
#gdal = "*"
libgdal = "*"
geos = "*"
proj = "*"
#geos = "*"
#proj = "*"
#python = "<3.14"

# Feature dev
[tool.pixi.feature.dev.pypi-dependencies]
Expand Down
Loading