diff --git a/docs/api.rst b/docs/api.rst index b0af8b82c..616b2f40c 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -17,6 +17,7 @@ Computational Modules com5SnowSlide com6RockAvalanche com7Regional + com9MoTVoellmy Input/Transformation Modules ============================ diff --git a/docs/conf.py b/docs/conf.py index e9cef6d40..630f55ab7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 --------------------------------------------------- @@ -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 @@ -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 ------------------------------------------------- @@ -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 @@ -146,4 +147,4 @@ def setup(app): - app.add_css_file('css/custom.css') + app.add_css_file("css/custom.css") diff --git a/docs/index.rst b/docs/index.rst index 1a8df07a0..54e2e15ce 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -54,7 +54,7 @@ Computational modules * :doc:`moduleCom6RockAvalanche` * :doc:`moduleCom7Regional` * :doc:`moduleCom8MoTPSA` - * :doc:`moduleCom8MoTVoellmy` + * :doc:`moduleCom9MoTVoellmy` .. toctree:: :maxdepth: 3 diff --git a/docs/moduleCom9MoTVoellmy.rst b/docs/moduleCom9MoTVoellmy.rst index 7a141c3e4..3b46eeceb 100644 --- a/docs/moduleCom9MoTVoellmy.rst +++ b/docs/moduleCom9MoTVoellmy.rst @@ -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 @@ -8,16 +8,78 @@ com9MoTVoellmy: NGI MoT-Voellmy :py:mod:`com9MoTVoellmy` allows to run the MoT-Voellmy code by Norwegian-Geotechnical-Institute (`MoT-Voellmy github repository `_). +More information and background can be found there as +well `MoT-Voellmy 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 `_. + +Required is + +* digital elevation model as raster file with `ESRI grid format `_. + +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) @@ -25,16 +87,5 @@ To run * enter the path to the desired dataset in ``local_avaframeCfg.ini`` * run:: - python3 runCom8MoTPSA.py - - -Theory ------- - -TODO - - -Configuration parameters ---------------------------------- + python3 runCom9MoTVoellmy.py -TODO \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index cdff1d1b3..ecdf0afd2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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]