├── .appveyor.yml ├── .gitattributes ├── .github └── workflows │ └── tests.yml ├── .gitignore ├── .travis.yml ├── LICENCE.rst ├── README.rst ├── changelog.rst ├── docs ├── .buildinfo ├── .nojekyll ├── 0.2.2 │ ├── .buildinfo │ ├── .nojekyll │ ├── _images │ │ └── smart-model-structure.svg │ ├── _panels_static │ │ ├── panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css │ │ └── panels-variables.06eb56fa6e07937060861dad626602ad.css │ ├── _sources │ │ ├── api │ │ │ ├── attributes │ │ │ │ ├── smartpy.SMART.parameters.rst.txt │ │ │ │ ├── smartpy.parameters.Parameters.names.rst.txt │ │ │ │ ├── smartpy.parameters.Parameters.ranges.rst.txt │ │ │ │ └── smartpy.parameters.Parameters.values.rst.txt │ │ │ ├── classes │ │ │ │ ├── smartpy.SMART.rst.txt │ │ │ │ ├── smartpy.montecarlo.Best.rst.txt │ │ │ │ ├── smartpy.montecarlo.GLUE.rst.txt │ │ │ │ ├── smartpy.montecarlo.LHS.rst.txt │ │ │ │ ├── smartpy.montecarlo.Total.rst.txt │ │ │ │ └── smartpy.parameters.Parameters.rst.txt │ │ │ └── methods │ │ │ │ ├── smartpy.SMART.get_evaluation_array.rst.txt │ │ │ │ ├── smartpy.SMART.get_simulation_array.rst.txt │ │ │ │ ├── smartpy.SMART.simulate.rst.txt │ │ │ │ ├── smartpy.SMART.write_output_files.rst.txt │ │ │ │ ├── smartpy.montecarlo.Best.run.rst.txt │ │ │ │ ├── smartpy.montecarlo.GLUE.run.rst.txt │ │ │ │ ├── smartpy.montecarlo.LHS.run.rst.txt │ │ │ │ ├── smartpy.montecarlo.Total.run.rst.txt │ │ │ │ ├── smartpy.parameters.Parameters.set_parameters_with_dict.rst.txt │ │ │ │ └── smartpy.parameters.Parameters.set_parameters_with_file.rst.txt │ │ ├── api_reference.rst.txt │ │ ├── changelog.rst.txt │ │ ├── citation.rst.txt │ │ ├── index.rst.txt │ │ ├── installation.rst.txt │ │ ├── licence.rst.txt │ │ ├── model_description.rst.txt │ │ ├── support.rst.txt │ │ ├── tutorial.rst.txt │ │ └── tutorial │ │ │ ├── montecarlo_experiment.rst.txt │ │ │ └── single_experiment.rst.txt │ ├── _static │ │ ├── basic.css │ │ ├── css │ │ │ ├── index.c5995385ac14fb8791e8eb36b4908be2.css │ │ │ └── theme.css │ │ ├── custom.css │ │ ├── doctools.js │ │ ├── documentation_options.js │ │ ├── file.png │ │ ├── jquery-3.5.1.js │ │ ├── jquery.js │ │ ├── js │ │ │ └── index.1c5a1a01449ed65a7b51.js │ │ ├── language_data.js │ │ ├── minus.png │ │ ├── panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css │ │ ├── panels-variables.06eb56fa6e07937060861dad626602ad.css │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ ├── smartpy-favicon.ico │ │ ├── smartpy-logo.svg │ │ ├── underscore-1.13.1.js │ │ ├── underscore.js │ │ ├── vendor │ │ │ └── fontawesome │ │ │ │ └── 5.13.0 │ │ │ │ ├── LICENSE.txt │ │ │ │ ├── css │ │ │ │ └── all.min.css │ │ │ │ └── webfonts │ │ │ │ ├── fa-brands-400.eot │ │ │ │ ├── fa-brands-400.svg │ │ │ │ ├── fa-brands-400.ttf │ │ │ │ ├── fa-brands-400.woff │ │ │ │ ├── fa-brands-400.woff2 │ │ │ │ ├── fa-regular-400.eot │ │ │ │ ├── fa-regular-400.svg │ │ │ │ ├── fa-regular-400.ttf │ │ │ │ ├── fa-regular-400.woff │ │ │ │ ├── fa-regular-400.woff2 │ │ │ │ ├── fa-solid-900.eot │ │ │ │ ├── fa-solid-900.svg │ │ │ │ ├── fa-solid-900.ttf │ │ │ │ ├── fa-solid-900.woff │ │ │ │ └── fa-solid-900.woff2 │ │ └── webpack-macros.html │ ├── api │ │ ├── attributes │ │ │ ├── smartpy.SMART.parameters.html │ │ │ ├── smartpy.parameters.Parameters.names.html │ │ │ ├── smartpy.parameters.Parameters.ranges.html │ │ │ └── smartpy.parameters.Parameters.values.html │ │ ├── classes │ │ │ ├── smartpy.SMART.html │ │ │ ├── smartpy.montecarlo.Best.html │ │ │ ├── smartpy.montecarlo.GLUE.html │ │ │ ├── smartpy.montecarlo.LHS.html │ │ │ ├── smartpy.montecarlo.Total.html │ │ │ └── smartpy.parameters.Parameters.html │ │ └── methods │ │ │ ├── smartpy.SMART.get_evaluation_array.html │ │ │ ├── smartpy.SMART.get_simulation_array.html │ │ │ ├── smartpy.SMART.simulate.html │ │ │ ├── smartpy.SMART.write_output_files.html │ │ │ ├── smartpy.montecarlo.Best.run.html │ │ │ ├── smartpy.montecarlo.GLUE.run.html │ │ │ ├── smartpy.montecarlo.LHS.run.html │ │ │ ├── smartpy.montecarlo.Total.run.html │ │ │ ├── smartpy.parameters.Parameters.set_parameters_with_dict.html │ │ │ └── smartpy.parameters.Parameters.set_parameters_with_file.html │ ├── api_reference.html │ ├── changelog.html │ ├── citation.html │ ├── genindex.html │ ├── index.html │ ├── installation.html │ ├── licence.html │ ├── model_description.html │ ├── objects.inv │ ├── search.html │ ├── searchindex.js │ ├── support.html │ ├── tutorial.html │ └── tutorial │ │ ├── montecarlo_experiment.html │ │ └── single_experiment.html ├── Makefile ├── _doc_img │ ├── smart-model-structure.svg │ ├── smartpy-favicon.ico │ └── smartpy-logo.svg ├── _doc_src │ ├── api │ │ ├── attributes │ │ │ ├── smartpy.SMART.parameters.rst │ │ │ ├── smartpy.parameters.Parameters.names.rst │ │ │ ├── smartpy.parameters.Parameters.ranges.rst │ │ │ └── smartpy.parameters.Parameters.values.rst │ │ ├── classes │ │ │ ├── smartpy.SMART.rst │ │ │ ├── smartpy.montecarlo.Best.rst │ │ │ ├── smartpy.montecarlo.GLUE.rst │ │ │ ├── smartpy.montecarlo.LHS.rst │ │ │ ├── smartpy.montecarlo.Total.rst │ │ │ └── smartpy.parameters.Parameters.rst │ │ └── methods │ │ │ ├── smartpy.SMART.get_evaluation_array.rst │ │ │ ├── smartpy.SMART.get_simulation_array.rst │ │ │ ├── smartpy.SMART.simulate.rst │ │ │ ├── smartpy.SMART.write_output_files.rst │ │ │ ├── smartpy.montecarlo.Best.run.rst │ │ │ ├── smartpy.montecarlo.GLUE.run.rst │ │ │ ├── smartpy.montecarlo.LHS.run.rst │ │ │ ├── smartpy.montecarlo.Total.run.rst │ │ │ ├── smartpy.parameters.Parameters.set_parameters_with_dict.rst │ │ │ └── smartpy.parameters.Parameters.set_parameters_with_file.rst │ ├── api_reference.rst │ ├── changelog.rst │ ├── citation.rst │ ├── conf.py │ ├── index.rst │ ├── installation.rst │ ├── licence.rst │ ├── model_description.rst │ ├── support.rst │ ├── tutorial.rst │ └── tutorial │ │ ├── montecarlo_experiment.rst │ │ └── single_experiment.rst ├── _doc_src_unused │ ├── cpp_extension.rst │ ├── montecarlo.rst │ └── parallel.rst ├── _doc_static │ ├── custom.css │ └── pygments.css ├── _doc_templates │ ├── attribute.rst │ ├── base.rst │ ├── docs-navbar.html │ ├── footer.html │ ├── function.rst │ └── method.rst ├── _images │ └── smart-model-structure.svg ├── _panels_static │ ├── panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css │ └── panels-variables.06eb56fa6e07937060861dad626602ad.css ├── _sources │ ├── api │ │ ├── attributes │ │ │ ├── smartpy.SMART.parameters.rst.txt │ │ │ ├── smartpy.parameters.Parameters.names.rst.txt │ │ │ ├── smartpy.parameters.Parameters.ranges.rst.txt │ │ │ └── smartpy.parameters.Parameters.values.rst.txt │ │ ├── classes │ │ │ ├── smartpy.SMART.rst.txt │ │ │ ├── smartpy.montecarlo.Best.rst.txt │ │ │ ├── smartpy.montecarlo.GLUE.rst.txt │ │ │ ├── smartpy.montecarlo.LHS.rst.txt │ │ │ ├── smartpy.montecarlo.Total.rst.txt │ │ │ └── smartpy.parameters.Parameters.rst.txt │ │ └── methods │ │ │ ├── smartpy.SMART.get_evaluation_array.rst.txt │ │ │ ├── smartpy.SMART.get_simulation_array.rst.txt │ │ │ ├── smartpy.SMART.simulate.rst.txt │ │ │ ├── smartpy.SMART.write_output_files.rst.txt │ │ │ ├── smartpy.montecarlo.Best.run.rst.txt │ │ │ ├── smartpy.montecarlo.GLUE.run.rst.txt │ │ │ ├── smartpy.montecarlo.LHS.run.rst.txt │ │ │ ├── smartpy.montecarlo.Total.run.rst.txt │ │ │ ├── smartpy.parameters.Parameters.set_parameters_with_dict.rst.txt │ │ │ └── smartpy.parameters.Parameters.set_parameters_with_file.rst.txt │ ├── api_reference.rst.txt │ ├── changelog.rst.txt │ ├── citation.rst.txt │ ├── index.rst.txt │ ├── installation.rst.txt │ ├── licence.rst.txt │ ├── model_description.rst.txt │ ├── support.rst.txt │ ├── tutorial.rst.txt │ └── tutorial │ │ ├── montecarlo_experiment.rst.txt │ │ └── single_experiment.rst.txt ├── _static │ ├── basic.css │ ├── css │ │ ├── index.c5995385ac14fb8791e8eb36b4908be2.css │ │ └── theme.css │ ├── custom.css │ ├── doctools.js │ ├── documentation_options.js │ ├── file.png │ ├── jquery-3.5.1.js │ ├── jquery.js │ ├── js │ │ └── index.1c5a1a01449ed65a7b51.js │ ├── language_data.js │ ├── minus.png │ ├── panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css │ ├── panels-variables.06eb56fa6e07937060861dad626602ad.css │ ├── plus.png │ ├── pygments.css │ ├── searchtools.js │ ├── smartpy-favicon.ico │ ├── smartpy-logo.svg │ ├── underscore-1.13.1.js │ ├── underscore.js │ ├── vendor │ │ └── fontawesome │ │ │ └── 5.13.0 │ │ │ ├── LICENSE.txt │ │ │ ├── css │ │ │ └── all.min.css │ │ │ └── webfonts │ │ │ ├── fa-brands-400.eot │ │ │ ├── fa-brands-400.svg │ │ │ ├── fa-brands-400.ttf │ │ │ ├── fa-brands-400.woff │ │ │ ├── fa-brands-400.woff2 │ │ │ ├── fa-regular-400.eot │ │ │ ├── fa-regular-400.svg │ │ │ ├── fa-regular-400.ttf │ │ │ ├── fa-regular-400.woff │ │ │ ├── fa-regular-400.woff2 │ │ │ ├── fa-solid-900.eot │ │ │ ├── fa-solid-900.svg │ │ │ ├── fa-solid-900.ttf │ │ │ ├── fa-solid-900.woff │ │ │ └── fa-solid-900.woff2 │ └── webpack-macros.html ├── api │ ├── attributes │ │ ├── smartpy.SMART.parameters.html │ │ ├── smartpy.parameters.Parameters.names.html │ │ ├── smartpy.parameters.Parameters.ranges.html │ │ └── smartpy.parameters.Parameters.values.html │ ├── classes │ │ ├── smartpy.SMART.html │ │ ├── smartpy.montecarlo.Best.html │ │ ├── smartpy.montecarlo.GLUE.html │ │ ├── smartpy.montecarlo.LHS.html │ │ ├── smartpy.montecarlo.Total.html │ │ └── smartpy.parameters.Parameters.html │ └── methods │ │ ├── smartpy.SMART.get_evaluation_array.html │ │ ├── smartpy.SMART.get_simulation_array.html │ │ ├── smartpy.SMART.simulate.html │ │ ├── smartpy.SMART.write_output_files.html │ │ ├── smartpy.montecarlo.Best.run.html │ │ ├── smartpy.montecarlo.GLUE.run.html │ │ ├── smartpy.montecarlo.LHS.run.html │ │ ├── smartpy.montecarlo.Total.run.html │ │ ├── smartpy.parameters.Parameters.set_parameters_with_dict.html │ │ └── smartpy.parameters.Parameters.set_parameters_with_file.html ├── api_reference.html ├── changelog.html ├── citation.html ├── genindex.html ├── index.html ├── installation.html ├── licence.html ├── model_description.html ├── objects.inv ├── search.html ├── searchindex.js ├── support.html ├── tutorial.html └── tutorial │ ├── montecarlo_experiment.html │ └── single_experiment.html ├── examples ├── api_usage_example.ipynb ├── in │ └── ExampleDaily │ │ ├── ExampleDaily.evaluating.sttngs │ │ ├── ExampleDaily.flow │ │ ├── ExampleDaily.flow.nc │ │ ├── ExampleDaily.parameters │ │ ├── ExampleDaily.peva │ │ ├── ExampleDaily.peva.nc │ │ ├── ExampleDaily.rain │ │ ├── ExampleDaily.rain.nc │ │ ├── ExampleDaily.sampling.sttngs │ │ └── ExampleDaily.sttngs └── out │ └── ExampleDaily │ ├── ExampleDaily.SMART.lhs │ ├── ExampleDaily.mod.flow │ └── ExampleDaily.obs.flow ├── requirements.txt ├── setup.py ├── smartpy ├── __init__.py ├── inout.py ├── montecarlo │ ├── __init__.py │ ├── best.py │ ├── glue.py │ ├── lhs.py │ ├── montecarlo.py │ └── total.py ├── objfunctions.py ├── parameters.py ├── smart.py ├── structure.py ├── timeframe.py └── version.py └── tests ├── data ├── in │ └── Catchment │ │ ├── Catchment.flow │ │ ├── Catchment.flow.nc │ │ ├── Catchment.parameters │ │ ├── Catchment.peva │ │ ├── Catchment.peva.nc │ │ ├── Catchment.rain │ │ ├── Catchment.rain.nc │ │ └── Catchment.sttngs └── out │ └── Catchment │ └── .gitignore ├── run_all_tests.py ├── test_run_daily_to_hourly.py └── test_run_mc_lhs.py /.appveyor.yml: -------------------------------------------------------------------------------- 1 | environment: 2 | matrix: 3 | - PYTHON: "C:\\Python27" 4 | - PYTHON: "C:\\Python27-x64" 5 | - PYTHON: "C:\\Python35" 6 | - PYTHON: "C:\\Python35-x64" 7 | - PYTHON: "C:\\Python36" 8 | - PYTHON: "C:\\Python36-x64" 9 | matrix: 10 | fast_finish: true 11 | install: 12 | - "%PYTHON%\\python.exe -m pip install pytest" 13 | - "%PYTHON%\\python.exe -m pip install spotpy" 14 | - "%PYTHON%\\python.exe -m pip install netCDF4" 15 | - "%PYTHON%\\python.exe -m pip install -e ." 16 | build: off 17 | test_script: 18 | - "%PYTHON%\\python.exe -m pytest tests" 19 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: Tests 2 | 3 | on: 4 | push: 5 | branches: [dev] 6 | pull_request: 7 | types: [ready_for_review] 8 | 9 | jobs: 10 | 11 | run-tests: 12 | 13 | strategy: 14 | matrix: 15 | os: [ubuntu-latest, macos-latest, windows-latest] 16 | python-version: [3.7, 3.8, 3.9] 17 | fail-fast: false 18 | 19 | runs-on: ${{ matrix.os }} 20 | 21 | defaults: 22 | run: 23 | shell: bash -l {0} 24 | 25 | steps: 26 | 27 | - name: check out repository 28 | uses: actions/checkout@v2 29 | 30 | - name: set up conda environment 31 | uses: conda-incubator/setup-miniconda@v2 32 | with: 33 | activate-environment: testing-env 34 | python-version: ${{ matrix.python-version }} 35 | auto-update-conda: true 36 | mamba-version: "*" 37 | channels: conda-forge 38 | channel-priority: true 39 | 40 | - name: install package dependencies 41 | run: | 42 | mamba install -c conda-forge netCDF4 43 | mamba install -c conda-forge spotpy>=1.5.14 44 | mamba install --file=requirements.txt 45 | 46 | - name: install package 47 | run: | 48 | pip install -e . 49 | 50 | - name: run all tests 51 | run: | 52 | (cd ./tests && python run_all_tests.py) -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # Thibault's preferences 21 | *.pyc 22 | *.bat 23 | *.sh 24 | 25 | # ========================= 26 | # Operating System Files 27 | # ========================= 28 | 29 | # OSX 30 | # ========================= 31 | 32 | .DS_Store 33 | .AppleDouble 34 | .LSOverride 35 | 36 | # Thumbnails 37 | ._* 38 | 39 | # Files that might appear in the root of a volume 40 | .DocumentRevisions-V100 41 | .fseventsd 42 | .Spotlight-V100 43 | .TemporaryItems 44 | .Trashes 45 | .VolumeIcon.icns 46 | 47 | # Directories potentially created on remote AFP share 48 | .AppleDB 49 | .AppleDesktop 50 | Network Trash Folder 51 | Temporary Items 52 | .apdisk 53 | 54 | # ignore documentation built because copied in docs/ root already 55 | docs/_doc_build 56 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | os: 2 | - linux 3 | #- osx 4 | language: python 5 | python: 6 | - 2.7 7 | - 3.5 8 | - 3.6 9 | install: 10 | - pip install spotpy 11 | - pip install netCDF4 12 | - pip install -e . 13 | script: 14 | - pytest tests -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | An implementation of the rainfall-runoff model SMART in Python 2 | ============================================================== 3 | 4 | .. image:: https://img.shields.io/pypi/v/smartpy?style=flat-square 5 | :target: https://pypi.python.org/pypi/smartpy 6 | :alt: PyPI version 7 | .. image:: https://img.shields.io/badge/dynamic/json?url=https://zenodo.org/api/records/2564041&label=doi&query=doi&style=flat-square 8 | :target: https://zenodo.org/badge/latestdoi/118467753 9 | :alt: DOI 10 | .. image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg?style=flat-square 11 | :target: https://www.gnu.org/licenses/gpl-3.0 12 | :alt: Licence GPL-3.0 13 | .. image:: https://img.shields.io/github/workflow/status/ThibHlln/smartpy/Tests?style=flat-square&label=tests 14 | :target: https://github.com/ThibHlln/smartpy/actions/workflows/tests.yml 15 | :alt: Tests Status 16 | 17 | `smartpy` is an open-source Python version of the catchment model SMART 18 | (Soil Moisture Accounting and Routing for Transport). SMART is a bucket-style 19 | rainfall-runoff model composed of a soil moisture accounting component and 20 | linear routing components. It requires rainfall and potential evapotranspiration 21 | time series as input, it features a set of ten parameters, and it yields 22 | a discharge time series as output. 23 | -------------------------------------------------------------------------------- /changelog.rst: -------------------------------------------------------------------------------- 1 | .. default-role:: obj 2 | 3 | .. 4 | latest 5 | ------ 6 | 7 | Yet to be versioned and released. Only available from *dev* branch until then. 8 | 9 | 10 | v0.2.2 11 | ------ 12 | 13 | Released on 2022-02-14. 14 | 15 | .. rubric:: General 16 | 17 | * drop support for Python 2.7.x and Python < 3.7 18 | 19 | .. rubric:: Big fixes 20 | 21 | * fix bug in output writing for `montecarlo` due to change in behaviour in `spotpy` 22 | (`e2f695b `_) 23 | * fix mistake in routing parameter used for "educated guess" as initial conditions 24 | (`5345b1d `_) 25 | 26 | .. rubric:: Documentation 27 | 28 | * add documentation build with `sphinx` 29 | (`#3 `_) 30 | * add API reference 31 | (`89dc0b7 `_) 32 | 33 | .. rubric:: Tests 34 | 35 | * add GitHub workflow to run tests 36 | (`#4 `_) 37 | 38 | 39 | v0.2.1 40 | ------ 41 | 42 | Released on 2018-08-24. 43 | 44 | .. rubric:: Algorithm 45 | 46 | * check for the duration of the warm-up period against the simulation period 47 | (to avoid the former being greater than the latter) 48 | 49 | .. rubric:: Bug fixes 50 | 51 | * change test on existence of observed streamflow data in `get_evaluation_array` 52 | method (which was raising a ValueError since v0.2.0) 53 | 54 | .. rubric:: Documentation fixes 55 | 56 | * update tutorial notebook that was not up-to-date since v0.2.0 and that 57 | contained errors 58 | * update readme file to remove mention of objective functions that do not 59 | exist anymore since v0.2.0 60 | 61 | 62 | v0.2.0 63 | ------ 64 | 65 | Released on 2018-11-16. 66 | 67 | .. rubric:: Algorithm 68 | 69 | * redesign of `run` and `run_all_steps` to allow for the use of the 70 | version 0.2.0 of `smartcpp` where a method `allsteps` makes it possible 71 | to go through the whole simulation time series in C++ 72 | 73 | v0.1.4 74 | ------ 75 | 76 | Released on 2018-11-12. 77 | 78 | .. rubric:: Functionality 79 | 80 | * make gauged area optional (default to catchment area) 81 | * allow choice on output files to write out 82 | * indicate `smartpy` version in output files 83 | 84 | .. rubric:: Algorithm 85 | 86 | * use more versatile way to convert Epoch timestamps to DateTime objects 87 | 88 | .. rubric:: Bug fixes 89 | 90 | * use parallel IO to write NetCDF output files in parallel Monte Carlo simulations 91 | * move netCDF compression to the end of simulation (for netCDF4 v1.4.2 compatibility) 92 | 93 | v0.1.3 94 | ------ 95 | 96 | Released on 2018-07-24. 97 | 98 | .. rubric:: Algorithm 99 | 100 | * add built-in Latin hypercube sampling functionality for Monte Carlo experiments 101 | 102 | .. rubric:: Functionality 103 | 104 | * add a class `Total` to run existing sampling on an evaluation period 105 | * allow use of netCDF files for outputs (for both single and Monte Carlo runs) 106 | * allow use of netCDF files for sampling (for Monte Carlo runs) 107 | * allow use of netCDF files for evaluation data 108 | * add optional compression when writing CSV files 109 | 110 | v0.1.2 111 | ------ 112 | 113 | Released on 2018-07-18. 114 | 115 | .. rubric:: Functionality 116 | 117 | * allow use of `smartpy` without the need for evaluation data 118 | * add possibility to set parameter values using a dictionary 119 | 120 | v0.1.1 121 | ------ 122 | 123 | Released on 2018-07-17. 124 | 125 | .. rubric:: Bug fixes 126 | 127 | * fix improper display of README on PyPI due to use of outdated `setuptools`, 128 | `twine`, and `wheel` when building the distribution 129 | 130 | v0.1.0 131 | ------ 132 | 133 | Released on 2018-07-17. 134 | 135 | * first release 136 | -------------------------------------------------------------------------------- /docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 38dfb233e946842937852e7b199220bd 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/.nojekyll -------------------------------------------------------------------------------- /docs/0.2.2/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 38dfb233e946842937852e7b199220bd 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/0.2.2/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/.nojekyll -------------------------------------------------------------------------------- /docs/0.2.2/_panels_static/panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css: -------------------------------------------------------------------------------- 1 | details.dropdown .summary-title{padding-right:3em !important;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}details.dropdown:hover{cursor:pointer}details.dropdown .summary-content{cursor:default}details.dropdown summary{list-style:none;padding:1em}details.dropdown summary .octicon.no-title{vertical-align:middle}details.dropdown[open] summary .octicon.no-title{visibility:hidden}details.dropdown summary::-webkit-details-marker{display:none}details.dropdown summary:focus{outline:none}details.dropdown summary:hover .summary-up svg,details.dropdown summary:hover .summary-down svg{opacity:1}details.dropdown .summary-up svg,details.dropdown .summary-down svg{display:block;opacity:.6}details.dropdown .summary-up,details.dropdown .summary-down{pointer-events:none;position:absolute;right:1em;top:.75em}details.dropdown[open] .summary-down{visibility:hidden}details.dropdown:not([open]) .summary-up{visibility:hidden}details.dropdown.fade-in[open] summary~*{-moz-animation:panels-fade-in .5s ease-in-out;-webkit-animation:panels-fade-in .5s ease-in-out;animation:panels-fade-in .5s ease-in-out}details.dropdown.fade-in-slide-down[open] summary~*{-moz-animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out;-webkit-animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out;animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out}@keyframes panels-fade-in{0%{opacity:0}100%{opacity:1}}@keyframes panels-slide-down{0%{transform:translate(0, -10px)}100%{transform:translate(0, 0)}}.octicon{display:inline-block;fill:currentColor;vertical-align:text-top}.tabbed-content{box-shadow:0 -.0625rem var(--tabs-color-overline),0 .0625rem var(--tabs-color-underline);display:none;order:99;padding-bottom:.75rem;padding-top:.75rem;width:100%}.tabbed-content>:first-child{margin-top:0 !important}.tabbed-content>:last-child{margin-bottom:0 !important}.tabbed-content>.tabbed-set{margin:0}.tabbed-set{border-radius:.125rem;display:flex;flex-wrap:wrap;margin:1em 0;position:relative}.tabbed-set>input{opacity:0;position:absolute}.tabbed-set>input:checked+label{border-color:var(--tabs-color-label-active);color:var(--tabs-color-label-active)}.tabbed-set>input:checked+label+.tabbed-content{display:block}.tabbed-set>input:focus+label{outline-style:auto}.tabbed-set>input:not(.focus-visible)+label{outline:none;-webkit-tap-highlight-color:transparent}.tabbed-set>label{border-bottom:.125rem solid transparent;color:var(--tabs-color-label-inactive);cursor:pointer;font-size:var(--tabs-size-label);font-weight:700;padding:1em 1.25em .5em;transition:color 250ms;width:auto;z-index:1}html .tabbed-set>label:hover{color:var(--tabs-color-label-active)} 2 | -------------------------------------------------------------------------------- /docs/0.2.2/_panels_static/panels-variables.06eb56fa6e07937060861dad626602ad.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --tabs-color-label-active: hsla(231, 99%, 66%, 1); 3 | --tabs-color-label-inactive: rgba(178, 206, 245, 0.62); 4 | --tabs-color-overline: rgb(207, 236, 238); 5 | --tabs-color-underline: rgb(207, 236, 238); 6 | --tabs-size-label: 1rem; 7 | } -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/attributes/smartpy.SMART.parameters.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.SMART.parameters 2 | ======================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. autoattribute:: smartpy.SMART.parameters -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/attributes/smartpy.parameters.Parameters.names.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.parameters.Parameters.names 2 | =================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. autoattribute:: smartpy.parameters.Parameters.names -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/attributes/smartpy.parameters.Parameters.ranges.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.parameters.Parameters.ranges 2 | ==================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. autoattribute:: smartpy.parameters.Parameters.ranges -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/attributes/smartpy.parameters.Parameters.values.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.parameters.Parameters.values 2 | ==================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. autoattribute:: smartpy.parameters.Parameters.values -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/classes/smartpy.SMART.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | SMART 5 | ===== 6 | 7 | .. autoclass:: SMART 8 | 9 | 10 | Methods 11 | ------- 12 | 13 | .. autosummary:: 14 | :nosignatures: 15 | :toctree: ../methods/ 16 | :template: method.rst 17 | 18 | ~smartpy.SMART.simulate 19 | ~smartpy.SMART.write_output_files 20 | ~smartpy.SMART.get_simulation_array 21 | ~smartpy.SMART.get_evaluation_array 22 | 23 | 24 | Attributes 25 | ---------- 26 | 27 | .. autosummary:: 28 | :nosignatures: 29 | :toctree: ../attributes/ 30 | :template: attribute.rst 31 | 32 | ~smartpy.SMART.parameters 33 | -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/classes/smartpy.montecarlo.Best.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Best 5 | ==== 6 | 7 | .. autoclass:: smartpy.montecarlo.Best 8 | 9 | Methods 10 | ------- 11 | 12 | .. autosummary:: 13 | :nosignatures: 14 | :toctree: ../methods/ 15 | :template: method.rst 16 | 17 | ~smartpy.montecarlo.Best.run 18 | -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/classes/smartpy.montecarlo.GLUE.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | GLUE 5 | ==== 6 | 7 | .. autoclass:: smartpy.montecarlo.GLUE 8 | 9 | Methods 10 | ------- 11 | 12 | .. autosummary:: 13 | :nosignatures: 14 | :toctree: ../methods/ 15 | :template: method.rst 16 | 17 | ~smartpy.montecarlo.GLUE.run 18 | -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/classes/smartpy.montecarlo.LHS.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | LHS 5 | === 6 | 7 | .. autoclass:: smartpy.montecarlo.LHS 8 | 9 | Methods 10 | ------- 11 | 12 | .. autosummary:: 13 | :nosignatures: 14 | :toctree: ../methods/ 15 | :template: method.rst 16 | 17 | ~smartpy.montecarlo.LHS.run 18 | -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/classes/smartpy.montecarlo.Total.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Total 5 | ===== 6 | 7 | .. autoclass:: smartpy.montecarlo.Total 8 | 9 | Methods 10 | ------- 11 | 12 | .. autosummary:: 13 | :nosignatures: 14 | :toctree: ../methods/ 15 | :template: method.rst 16 | 17 | ~smartpy.montecarlo.Total.run 18 | -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/classes/smartpy.parameters.Parameters.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Parameters 5 | ========== 6 | 7 | .. autoclass:: smartpy.parameters.Parameters 8 | 9 | Methods 10 | ------- 11 | 12 | .. autosummary:: 13 | :nosignatures: 14 | :toctree: ../methods/ 15 | :template: method.rst 16 | 17 | ~smartpy.parameters.Parameters.set_parameters_with_file 18 | ~smartpy.parameters.Parameters.set_parameters_with_dict 19 | 20 | 21 | Attributes 22 | ---------- 23 | 24 | .. autosummary:: 25 | :nosignatures: 26 | :toctree: ../attributes/ 27 | :template: attribute.rst 28 | 29 | ~smartpy.parameters.Parameters.names 30 | ~smartpy.parameters.Parameters.ranges 31 | ~smartpy.parameters.Parameters.values 32 | -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/methods/smartpy.SMART.get_evaluation_array.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.SMART.get_evaluation_array 2 | ================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.SMART.get_evaluation_array -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/methods/smartpy.SMART.get_simulation_array.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.SMART.get_simulation_array 2 | ================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.SMART.get_simulation_array -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/methods/smartpy.SMART.simulate.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.SMART.simulate 2 | ====================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.SMART.simulate -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/methods/smartpy.SMART.write_output_files.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.SMART.write_output_files 2 | ================================ 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.SMART.write_output_files -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/methods/smartpy.montecarlo.Best.run.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.montecarlo.Best.run 2 | =========================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.montecarlo.Best.run -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/methods/smartpy.montecarlo.GLUE.run.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.montecarlo.GLUE.run 2 | =========================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.montecarlo.GLUE.run -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/methods/smartpy.montecarlo.LHS.run.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.montecarlo.LHS.run 2 | ========================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.montecarlo.LHS.run -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/methods/smartpy.montecarlo.Total.run.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.montecarlo.Total.run 2 | ============================ 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.montecarlo.Total.run -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/methods/smartpy.parameters.Parameters.set_parameters_with_dict.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.parameters.Parameters.set_parameters_with_dict 2 | ====================================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.parameters.Parameters.set_parameters_with_dict -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api/methods/smartpy.parameters.Parameters.set_parameters_with_file.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.parameters.Parameters.set_parameters_with_file 2 | ====================================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.parameters.Parameters.set_parameters_with_file -------------------------------------------------------------------------------- /docs/0.2.2/_sources/api_reference.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | API Reference 5 | ============= 6 | 7 | Single experiment 8 | ----------------- 9 | 10 | .. toctree:: 11 | :maxdepth: 1 12 | 13 | api/classes/smartpy.SMART.rst 14 | api/classes/smartpy.parameters.Parameters.rst 15 | 16 | 17 | Monte Carlo experiment 18 | ---------------------- 19 | 20 | Sampling 21 | ~~~~~~~~ 22 | 23 | .. toctree:: 24 | :maxdepth: 1 25 | 26 | api/classes/smartpy.montecarlo.LHS.rst 27 | 28 | 29 | Conditioning 30 | ~~~~~~~~~~~~ 31 | 32 | .. toctree:: 33 | :maxdepth: 1 34 | 35 | api/classes/smartpy.montecarlo.Best.rst 36 | api/classes/smartpy.montecarlo.GLUE.rst 37 | api/classes/smartpy.montecarlo.Total.rst 38 | 39 | -------------------------------------------------------------------------------- /docs/0.2.2/_sources/changelog.rst.txt: -------------------------------------------------------------------------------- 1 | Change Log 2 | ========== 3 | 4 | .. include:: ../../changelog.rst 5 | -------------------------------------------------------------------------------- /docs/0.2.2/_sources/citation.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Citation 5 | ======== 6 | 7 | Software 8 | -------- 9 | 10 | If you are using `smartpy`, please consider citing the software as follows 11 | (click on the link to get the DOI of a specific version and year): 12 | 13 | .. pull-quote:: 14 | 15 | Hallouin, T., Mockler, E., Bruen, M. (XXXX). 16 | SMARTpy: An implementation if the rainfall-runoff model in Python (Version X.X.X). 17 | *Zenodo*. 18 | ``_ 19 | 20 | 21 | Model 22 | ----- 23 | 24 | If you are using `smartpy`, please consider citing the original model 25 | description article: 26 | 27 | .. pull-quote:: 28 | 29 | Mockler, E., O’Loughlin, F., and Bruen, M. (2016). 30 | Understanding hydrological flow paths in conceptual catchment models 31 | using uncertainty and sensitivity analysis. 32 | *Computers & Geosciences*, 90, 66–77. 33 | ``_ 34 | -------------------------------------------------------------------------------- /docs/0.2.2/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | .. include:: ../../README.rst 5 | 6 | Documentation 7 | ------------- 8 | 9 | .. panels:: 10 | :card: + intro-card text-center 11 | :column: col-lg-4 col-md-4 col-sm-6 col-xs-12 p-2 12 | 13 | Learn how to get `smartpy`. 14 | 15 | +++ 16 | 17 | .. link-button:: installation 18 | :type: ref 19 | :text: Installation 20 | :classes: btn-outline-primary btn-block stretched-link 21 | 22 | --- 23 | 24 | Learn how to use `smartpy`. 25 | 26 | +++ 27 | 28 | .. link-button:: tutorial 29 | :type: ref 30 | :text: Tutorial 31 | :classes: btn-outline-primary btn-block stretched-link 32 | 33 | --- 34 | 35 | Learn more about SMART. 36 | 37 | +++ 38 | 39 | .. link-button:: model_description 40 | :type: ref 41 | :text: Model Description 42 | :classes: btn-outline-primary btn-block stretched-link 43 | 44 | 45 | 46 | Acknowledgment 47 | -------------- 48 | 49 | This model implementation was initially developed with the financial support of 50 | Ireland's Environmental Protection Agency (Grant Number 2014-W-LS-5). 51 | 52 | .. toctree:: 53 | :hidden: 54 | :maxdepth: 1 55 | 56 | installation 57 | tutorial 58 | api_reference 59 | model_description 60 | citation 61 | support 62 | changelog 63 | licence 64 | -------------------------------------------------------------------------------- /docs/0.2.2/_sources/installation.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Installation 5 | ============ 6 | 7 | If you wish to install the most recent stable version of `smartpy`, 8 | it is available on the Python Package Index (PyPI), simply run: 9 | 10 | .. code-block:: bash 11 | 12 | pip install smartpy 13 | 14 | If you need the latest, potentially unstable, features listed in the 15 | :doc:`change log `, please use the *dev* branch on the 16 | GitHub repository: 17 | 18 | .. code-block:: bash 19 | 20 | pip install git+https://github.com/ThibHlln/smartpy.git@dev 21 | 22 | 23 | .. rubric:: Requirements 24 | 25 | The following packages are required to use `smartpy`: 26 | 27 | .. literalinclude:: ../../requirements.txt 28 | :language: none 29 | 30 | .. rubric:: Optional dependency for input/output 31 | 32 | `smartpy` is designed to read/write CSV (Comma-Separated Values) files 33 | and NetCDF (Network Common Data Form) input/output files. However, only 34 | CSV files can natively be read/written in Python. 35 | 36 | To read/write NetCDF files, the `netCDF4` python package is required (specific 37 | pre-requisites prior the installation of `netCDF4` exist and can be found 38 | at ``_). 39 | 40 | .. rubric:: Optional dependencies for Monte Carlo experiments 41 | 42 | The module `smartpy.montecarlo` requires the `spotpy` Python package 43 | to perform the sampling required for Monte Carlo experiments 44 | (``_). 45 | 46 | In addition, if this sampling is to be done in parallel, the `mpi4py` 47 | Python package is also required (``_) 48 | 49 | .. rubric:: Optional dependency for performance improvement 50 | 51 | `smartpy` features a separate accelerator extension written in C++, 52 | `smartcpp` (``_) that will be 53 | automatically used if it is installed alongside `smartpy`. Using 54 | `smartcpp` can significantly improve the execution time. 55 | -------------------------------------------------------------------------------- /docs/0.2.2/_sources/licence.rst.txt: -------------------------------------------------------------------------------- 1 | Licence 2 | ======= 3 | 4 | .. include:: ../../LICENCE.rst 5 | -------------------------------------------------------------------------------- /docs/0.2.2/_sources/support.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Support 5 | ======= 6 | 7 | Support for users is available through `GitHub Discussions 8 | `_. Use this support 9 | page to find answers to previously asked questions, to ask questions 10 | of your own, and to suggest ideas to improve `smartpy`. 11 | 12 | To report bugs, please use `GitHub Issues `_. 13 | -------------------------------------------------------------------------------- /docs/0.2.2/_sources/tutorial.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Tutorial 5 | ======== 6 | 7 | This tutorial showcases an example of the use of the API of `smartpy` for 8 | running a :doc:`single experiment ` (i.e. one 9 | simulation with one parameter set) and a :doc:`Monte Carlo experiment 10 | ` (i.e. several simulations with a 11 | sample of parameter sets): 12 | 13 | .. toctree:: 14 | :maxdepth: 1 15 | 16 | tutorial/single_experiment 17 | tutorial/montecarlo_experiment 18 | 19 | It uses the input files available in the folder *examples/in/ExampleDaily*. 20 | The output files that should be generated following this tutorial are made 21 | available for comparison purposes in *examples/out/ExampleDaily*. Although, 22 | given the stochastic nature of the Monte Carlo experiment, do not expect 23 | the exact same outputs. 24 | -------------------------------------------------------------------------------- /docs/0.2.2/_sources/tutorial/montecarlo_experiment.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Monte Carlo experiment 5 | ====================== 6 | 7 | The Monte Carlo experiment presented here consists of two steps: first the 8 | :ref:`sampling ` in the SMART model parameter space, then the 9 | :ref:`conditioning ` of the sample to select those parameter 10 | sets deemed as satisfactorily reproducing the observed river discharge. 11 | 12 | In `smartpy`, the sampling generates at random a number of parameter sets 13 | that are used to run the SMART model on a given simulation period (the 14 | "calibration" period). The performance of the SMART model structure with 15 | each parameter set is assessed using one or more objective functions. 16 | These objective function values (and optionally the corresponding 17 | streamflow simulations) correspond to the sampling output. 18 | 19 | Then, in `smartpy`, the conditioning selects a subset of parameter sets 20 | from the sampling based on their objective functions values. This subset 21 | of parameter sets is then used to run the SMART model on another given 22 | simulation period (the "evaluation" period, necessarily independent from 23 | the sampling period). The performance of the SMART model with this subset 24 | of parameter sets is then assessed again using one or more objective 25 | functions (not necessarily the same ones as for the conditioning). These 26 | objective function values (and optionally the corresponding streamflow 27 | simulations) correspond to the conditioning output. 28 | 29 | .. _sampling: 30 | 31 | Sampling 32 | -------- 33 | 34 | `smartpy` only offers a Latin Hypercube approach (`McKay et al., 2000 35 | `_) for sampling the SMART 36 | model parameter space. 37 | 38 | Setting up 39 | '''''''''' 40 | 41 | The configuration of the sampling is done as follows: 42 | 43 | .. code-block:: python 44 | 45 | from smartpy import montecarlo 46 | 47 | lhs = montecarlo.LHS( 48 | catchment='ExampleDaily', 49 | root_f='examples/', 50 | in_format='csv, 51 | out_format='csv, 52 | sample_size=10, 53 | parallel=False, 54 | save_sim=True, 55 | settings_filename='ExampleDaily.sttngs' 56 | ) 57 | 58 | .. seealso:: `smartpy.montecarlo.LHS` 59 | 60 | .. note:: 61 | 62 | The configuration of the SMART model itself, unlike for the single 63 | experiment, is done through a settings file. An example of such a 64 | settings file is available as a template in the *examples/* directory. 65 | 66 | Adjusting the parameter space 67 | ````````````````````````````` 68 | 69 | The default model parameter ranges used to define the boundaries of the 70 | Latin hypercube are accessible as follows: 71 | 72 | .. code-block:: python 73 | 74 | >>> print(lhs.model.parameters.ranges) 75 | {'T': (0.9, 1.1), 'C': (0.0, 1.0), 'H': (0.0, 0.3), 'D': (0.0, 1.0), 'S': (0.0, 0.013), 'Z': (15.0, 150.0), 'SK': (1.0, 240.0), 'FK': (48.0, 1440.0), 'GK': (1200.0, 4800.0), 'RK': (1.0, 96.0)} 76 | 77 | And they can be adjusted by assigning a new dictionary to this attribute: 78 | 79 | .. code-block:: python 80 | 81 | lhs.parameter.ranges = { 82 | 'T': (0.9, 1.1), 83 | 'C': (0.0, 1.0), 84 | 'H': (0.0, 0.3), 85 | 'D': (0.0, 1.0), 86 | 'S': (0.0, 0.013), 87 | 'Z': (15.0, 150.0), 88 | 'SK': (1.0, 240.0), 89 | 'FK': (48.0, 1440.0), 90 | 'GK': (1200.0, 4800.0), 91 | 'RK': (1.0, 96.0) 92 | } 93 | 94 | 95 | Defining the initial conditions 96 | ``````````````````````````````` 97 | 98 | Like in the single experiment example, the "educated guess" approach can be 99 | used as follows: 100 | 101 | .. code-block:: python 102 | 103 | lhs.model.extra = { 104 | 'aar': 1200, 105 | 'r-o_ratio': 0.45, 106 | 'r-o_split': (0.10, 0.15, 0.15, 0.30, 0.30) 107 | } 108 | 109 | 110 | Also, a warm up period can be chosen in the settings file where the model 111 | is configured. 112 | 113 | Simulating 114 | '''''''''' 115 | 116 | Simulating in serial 117 | ```````````````````` 118 | 119 | Running the sampling in the parameter space sequentially (i.e. simulating 120 | with one parameter set at a time using one process) can be done as follows: 121 | 122 | .. code-block:: python 123 | 124 | lhs.run(compression=False) 125 | 126 | 127 | .. seealso:: `smartpy.montecarlo.LHS.run` 128 | 129 | Simulating in parallel 130 | `````````````````````` 131 | 132 | To start the sampling in parallel (i.e. simulating with multiple parameter 133 | sets at a time using multiple processes, the parameter *parallel* must be 134 | set as `True` in the set up step above, and all the steps presented above 135 | (including the `lhs.run(...)`) must be saved in a Python script, say 136 | *lhs_sampling.py*. Then, this script must be executed via a `mpirun` 137 | command as follows (e.g. using 4 processors to initialise 4 processes): 138 | 139 | .. code-block:: bash 140 | 141 | mpirun -np 4 python lhs_sampling.py 142 | 143 | Outputs 144 | ``````` 145 | 146 | The sampling performed above will have produced an output file 147 | *{root_f}/out/{catchment}.SMART.lhs* (if `'csv'` was chosen as the output 148 | format or *{root_f}/out/{catchment}.SMART.lhs.nc* (if `'netcdf'` was 149 | chosen as the output format). 150 | 151 | .. _conditioning: 152 | 153 | Conditioning 154 | ------------ 155 | 156 | .. warning:: 157 | 158 | A sampling output file is required to perform the conditioning step. 159 | 160 | `smartpy` offers three conditioning approaches which differ in the way 161 | the parameter sets are elicited as satisfactory: 162 | 163 | - `GLUE` is based on the selection of one or more objective functions 164 | and the a priori definition of conditions (i.e. thresholds) to achieve 165 | with the model simulation on each objective function to deem the 166 | parameter set as "behavioural"; 167 | - `Best` is based on the selection of one target objective function 168 | and the a priori choice of the number of "best" performing parameter 169 | sets to retain; 170 | - `Total` is not a conditioning approach per se, as it retains all 171 | parameter sets for the simulation on the "evaluation" period. This is 172 | provided as a convenient way to offer to the user the opportunity 173 | to perform their own conditioning approach a posteriori using the 174 | streamflow simulations on the "calibration" and the "evaluation" periods 175 | obtained from the sampling and conditioning steps, respectively. 176 | 177 | .. seealso:: `smartpy.montecarlo.GLUE`, `smartpy.montecarlo.Best`, 178 | `smartpy.montecarlo.Total` 179 | 180 | The remainder of this tutorial is based on the `Best` approach. 181 | 182 | Setting up 183 | '''''''''' 184 | 185 | The configuration of the conditioning is done as follows: 186 | 187 | .. code-block:: python 188 | 189 | from smartpy import montecarlo 190 | 191 | montecarlo.Best( 192 | catchment='ExampleDaily', 193 | root_f='examples/', 194 | in_format='csv', 195 | out_format='csv', 196 | target='KGE, 197 | nb_best='2', 198 | parallel=False, 199 | save_sim=True 200 | ) 201 | 202 | For example, here the two best performing parameter sets amongst the 203 | ten sets sampled are selected based on their Kling-Gupta Efficiency (KGE) 204 | values. 205 | 206 | .. important:: 207 | 208 | The *catchment* and *root_f* must be the same between the sampling 209 | and the conditioning steps. In addition, the *out_format* of the 210 | sampling step must be the sme as the *in_format* of the conditioning 211 | step. 212 | 213 | Defining the initial conditions 214 | ``````````````````````````````` 215 | 216 | The initial conditions can be defined the same way they are in the 217 | sampling step above. 218 | 219 | Simulating 220 | '''''''''' 221 | 222 | The simulations can be performed the same way they are in the sampling 223 | step above. 224 | 225 | Outputs 226 | ``````` 227 | 228 | The conditioning performed above will have produced an output file 229 | *{root_f}/out/{catchment}.SMART.best* (if `'csv'` was chosen as the output 230 | format or *{root_f}/out/{catchment}.SMART.best.nc* (if `'netcdf'` was 231 | chosen as the output format). 232 | -------------------------------------------------------------------------------- /docs/0.2.2/_static/css/theme.css: -------------------------------------------------------------------------------- 1 | :root { 2 | /***************************************************************************** 3 | * Theme config 4 | **/ 5 | --pst-header-height: 60px; 6 | 7 | /***************************************************************************** 8 | * Font size 9 | **/ 10 | --pst-font-size-base: 15px; /* base font size - applied at body / html level */ 11 | 12 | /* heading font sizes */ 13 | --pst-font-size-h1: 36px; 14 | --pst-font-size-h2: 32px; 15 | --pst-font-size-h3: 26px; 16 | --pst-font-size-h4: 21px; 17 | --pst-font-size-h5: 18px; 18 | --pst-font-size-h6: 16px; 19 | 20 | /* smaller then heading font sizes*/ 21 | --pst-font-size-milli: 12px; 22 | 23 | --pst-sidebar-font-size: .9em; 24 | --pst-sidebar-caption-font-size: .9em; 25 | 26 | /***************************************************************************** 27 | * Font family 28 | **/ 29 | /* These are adapted from https://systemfontstack.com/ */ 30 | --pst-font-family-base-system: -apple-system, BlinkMacSystemFont, Segoe UI, "Helvetica Neue", 31 | Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; 32 | --pst-font-family-monospace-system: "SFMono-Regular", Menlo, Consolas, Monaco, 33 | Liberation Mono, Lucida Console, monospace; 34 | 35 | --pst-font-family-base: var(--pst-font-family-base-system); 36 | --pst-font-family-heading: var(--pst-font-family-base); 37 | --pst-font-family-monospace: var(--pst-font-family-monospace-system); 38 | 39 | /***************************************************************************** 40 | * Color 41 | * 42 | * Colors are defined in rgb string way, "red, green, blue" 43 | **/ 44 | --pst-color-primary: 19, 6, 84; 45 | --pst-color-success: 40, 167, 69; 46 | --pst-color-info: 0, 123, 255; /*23, 162, 184;*/ 47 | --pst-color-warning: 255, 193, 7; 48 | --pst-color-danger: 220, 53, 69; 49 | --pst-color-text-base: 51, 51, 51; 50 | 51 | --pst-color-h1: var(--pst-color-primary); 52 | --pst-color-h2: var(--pst-color-primary); 53 | --pst-color-h3: var(--pst-color-text-base); 54 | --pst-color-h4: var(--pst-color-text-base); 55 | --pst-color-h5: var(--pst-color-text-base); 56 | --pst-color-h6: var(--pst-color-text-base); 57 | --pst-color-paragraph: var(--pst-color-text-base); 58 | --pst-color-link: 0, 91, 129; 59 | --pst-color-link-hover: 227, 46, 0; 60 | --pst-color-headerlink: 198, 15, 15; 61 | --pst-color-headerlink-hover: 255, 255, 255; 62 | --pst-color-preformatted-text: 34, 34, 34; 63 | --pst-color-preformatted-background: 250, 250, 250; 64 | --pst-color-inline-code: 232, 62, 140; 65 | 66 | --pst-color-active-navigation: 19, 6, 84; 67 | --pst-color-navbar-link: 77, 77, 77; 68 | --pst-color-navbar-link-hover: var(--pst-color-active-navigation); 69 | --pst-color-navbar-link-active: var(--pst-color-active-navigation); 70 | --pst-color-sidebar-link: 77, 77, 77; 71 | --pst-color-sidebar-link-hover: var(--pst-color-active-navigation); 72 | --pst-color-sidebar-link-active: var(--pst-color-active-navigation); 73 | --pst-color-sidebar-expander-background-hover: 244, 244, 244; 74 | --pst-color-sidebar-caption: 77, 77, 77; 75 | --pst-color-toc-link: 119, 117, 122; 76 | --pst-color-toc-link-hover: var(--pst-color-active-navigation); 77 | --pst-color-toc-link-active: var(--pst-color-active-navigation); 78 | 79 | /***************************************************************************** 80 | * Icon 81 | **/ 82 | 83 | /* font awesome icons*/ 84 | --pst-icon-check-circle: '\f058'; 85 | --pst-icon-info-circle: '\f05a'; 86 | --pst-icon-exclamation-triangle: '\f071'; 87 | --pst-icon-exclamation-circle: '\f06a'; 88 | --pst-icon-times-circle: '\f057'; 89 | --pst-icon-lightbulb: '\f0eb'; 90 | 91 | /***************************************************************************** 92 | * Admonitions 93 | **/ 94 | 95 | --pst-color-admonition-default: var(--pst-color-info); 96 | --pst-color-admonition-note: var(--pst-color-info); 97 | --pst-color-admonition-attention: var(--pst-color-warning); 98 | --pst-color-admonition-caution: var(--pst-color-warning); 99 | --pst-color-admonition-warning: var(--pst-color-warning); 100 | --pst-color-admonition-danger: var(--pst-color-danger); 101 | --pst-color-admonition-error: var(--pst-color-danger); 102 | --pst-color-admonition-hint: var(--pst-color-success); 103 | --pst-color-admonition-tip: var(--pst-color-success); 104 | --pst-color-admonition-important: var(--pst-color-success); 105 | 106 | --pst-icon-admonition-default: var(--pst-icon-info-circle); 107 | --pst-icon-admonition-note: var(--pst-icon-info-circle); 108 | --pst-icon-admonition-attention: var(--pst-icon-exclamation-circle); 109 | --pst-icon-admonition-caution: var(--pst-icon-exclamation-triangle); 110 | --pst-icon-admonition-warning: var(--pst-icon-exclamation-triangle); 111 | --pst-icon-admonition-danger: var(--pst-icon-exclamation-triangle); 112 | --pst-icon-admonition-error: var(--pst-icon-times-circle); 113 | --pst-icon-admonition-hint: var(--pst-icon-lightbulb); 114 | --pst-icon-admonition-tip: var(--pst-icon-lightbulb); 115 | --pst-icon-admonition-important: var(--pst-icon-exclamation-circle); 116 | 117 | } 118 | -------------------------------------------------------------------------------- /docs/0.2.2/_static/custom.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;1,400;1,600&display=swap"); 2 | @import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&display=swap"); 3 | 4 | /* blue: #00b0f0 (0, 176, 240) */ 5 | /* green: #92d050 (146, 208, 80) */ 6 | /* brown: #ab7942 (171, 121, 66) */ 7 | :root { 8 | --pst-font-size-h1: 30px; 9 | --pst-font-size-h2: 26px; 10 | --pst-font-size-h3: 22px; 11 | --pst-font-size-h4: 20px; 12 | --pst-font-size-h5: 18px; 13 | --pst-font-size-h6: 16px; 14 | 15 | --pst-color-primary: 77, 77, 77; 16 | --pst-color-success: 146, 208, 80; 17 | --pst-color-info: 0, 176, 240; 18 | --pst-color-warning: 171, 121, 66; 19 | --pst-color-danger: 220, 53, 69; 20 | 21 | --pst-color-text-base: 77, 77, 77; 22 | 23 | --pst-color-active-navigation: 0, 176, 240; 24 | 25 | --pst-color-link: 0, 176, 240; 26 | --pst-color-link-hover: 0, 176, 240; 27 | 28 | --pst-color-preformatted-background: 250, 250, 250; 29 | --pst-color-block-code: 51, 51, 51; 30 | --pst-color-inline-code: 0, 0, 0; 31 | 32 | --pst-color-headerlink: var(--pst-color-link); 33 | --pst-color-headerlink-hover: var(--pst-color-link-hover); 34 | 35 | --pst-font-family-base-system: 'Open Sans', sans-serif; 36 | --pst-font-family-monospace-system: 'JetBrains Mono', monospace; 37 | --pst-font-family-monospace: var(--pst-font-family-monospace-system); 38 | } 39 | 40 | /* override style for code blocks */ 41 | pre { 42 | border: 1px solid rgba(var(--pst-color-preformatted-background),1); /* e1e4e5 */ 43 | font-family: var(--pst-font-family-monospace-system); 44 | border-radius: 4px; 45 | box-shadow: none; 46 | } 47 | 48 | /* override style for class and attributes */ 49 | .sig { 50 | font-family: var(--pst-font-family-monospace-system); 51 | font-weight: 300; 52 | } 53 | 54 | .sig-paren { 55 | font-family: var(--pst-font-family-monospace-system); 56 | font-size: 100%; 57 | } 58 | 59 | .sig-param { 60 | font-family: var(--pst-font-family-monospace-system); 61 | font-style: italic; 62 | font-weight: 300; 63 | font-size: 100%; 64 | } 65 | 66 | em.property{ 67 | font-family: var(--pst-font-family-monospace-system); 68 | font-size: 100%; 69 | padding-right: 6px; 70 | } 71 | 72 | code { 73 | font-family: var(--pst-font-family-monospace-system); 74 | } 75 | 76 | code.descclassname { 77 | font-weight: 300; 78 | font-size: 100%; 79 | } 80 | 81 | code.descname { 82 | font-weight: 600; 83 | font-size: 100%; 84 | } 85 | 86 | .text-monospace { 87 | font-family: var(--pst-font-family-monospace-system); 88 | } 89 | 90 | /* override style for images */ 91 | img { 92 | margin-bottom: 10px; 93 | } 94 | 95 | /* override style for RST directive "contents" */ 96 | div.topic { 97 | background-color: transparent; 98 | border: hidden; 99 | } 100 | 101 | /* override style for permalink */ 102 | a.headerlink{ 103 | color:rgba(var(--pst-color-text-base),1); 104 | text-align: center; 105 | padding-left: 10px; 106 | font-size: 14px; 107 | border-bottom: hidden; 108 | } 109 | a.headerlink:hover{ 110 | background-color: transparent; 111 | color:rgba(var(--pst-color-headerlink-hover),1); 112 | border-bottom: hidden; 113 | } 114 | 115 | /* override style for hyperlinks in paragraphs */ 116 | a { 117 | color: rgba(var(--pst-color-text-base),1); 118 | border-bottom: 1px dotted; 119 | } 120 | 121 | a:hover { 122 | text-decoration: none; /* to remove text-decoration: underline */ 123 | border-bottom: 1px solid; 124 | } 125 | 126 | nav a, nav a:hover, 127 | .figure a, .figure a:hover, 128 | a.image-reference, a.image-reference:hover { 129 | border-bottom: hidden 130 | } 131 | 132 | p a, .code-block-caption a code.literal { 133 | color: rgba(var(--pst-color-text-base),1); 134 | border-bottom: 1px dotted; 135 | } 136 | 137 | p a:hover, .code-block-caption a:hover code.literal { 138 | text-decoration: none; 139 | color: rgba(var(--pst-color-link-hover),1); 140 | border-bottom: 1px solid; 141 | } 142 | 143 | /* override style for inline code */ 144 | code.literal{ 145 | font-size: 95%; 146 | font-weight: normal; 147 | color: rgba(var(--pst-color-inline-code),1); 148 | } 149 | a code.literal{ 150 | font-size: 95%; 151 | font-weight: normal; 152 | color: rgba(var(--pst-color-inline-code),1); 153 | } 154 | a:hover code.literal{ 155 | font-size: 95%; 156 | font-weight: normal; 157 | color: rgba(var(--pst-color-link-hover),1); 158 | } 159 | 160 | /* override style for tables */ 161 | table { 162 | margin-top: 10px; 163 | } 164 | 165 | /* */ 166 | dt:target, span.highlighted { 167 | background-color: rgba(var(--pst-color-link-hover), 0.3); 168 | } 169 | 170 | rect.highlighted { 171 | fill: rgba(var(--pst-color-link-hover), 0.3); 172 | } 173 | 174 | /* override style for sphinx-panels */ 175 | .btn-outline-primary { 176 | color: rgba(var(--pst-color-link),1); 177 | border-color: rgba(var(--pst-color-link),1); 178 | } 179 | 180 | .btn-outline-primary:hover { 181 | color: white; 182 | border-color: rgba(var(--pst-color-link-hover),1); 183 | background-color: rgba(var(--pst-color-link-hover),1); 184 | } 185 | 186 | /* override style for block-quotes */ 187 | blockquote { 188 | padding: 0 1em; 189 | color: #6a737d; 190 | border-left: .25em solid #dfe2e5; 191 | } 192 | -------------------------------------------------------------------------------- /docs/0.2.2/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: 'v0.2.2', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: true 12 | }; -------------------------------------------------------------------------------- /docs/0.2.2/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/file.png -------------------------------------------------------------------------------- /docs/0.2.2/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/minus.png -------------------------------------------------------------------------------- /docs/0.2.2/_static/panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css: -------------------------------------------------------------------------------- 1 | details.dropdown .summary-title{padding-right:3em !important;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}details.dropdown:hover{cursor:pointer}details.dropdown .summary-content{cursor:default}details.dropdown summary{list-style:none;padding:1em}details.dropdown summary .octicon.no-title{vertical-align:middle}details.dropdown[open] summary .octicon.no-title{visibility:hidden}details.dropdown summary::-webkit-details-marker{display:none}details.dropdown summary:focus{outline:none}details.dropdown summary:hover .summary-up svg,details.dropdown summary:hover .summary-down svg{opacity:1}details.dropdown .summary-up svg,details.dropdown .summary-down svg{display:block;opacity:.6}details.dropdown .summary-up,details.dropdown .summary-down{pointer-events:none;position:absolute;right:1em;top:.75em}details.dropdown[open] .summary-down{visibility:hidden}details.dropdown:not([open]) .summary-up{visibility:hidden}details.dropdown.fade-in[open] summary~*{-moz-animation:panels-fade-in .5s ease-in-out;-webkit-animation:panels-fade-in .5s ease-in-out;animation:panels-fade-in .5s ease-in-out}details.dropdown.fade-in-slide-down[open] summary~*{-moz-animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out;-webkit-animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out;animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out}@keyframes panels-fade-in{0%{opacity:0}100%{opacity:1}}@keyframes panels-slide-down{0%{transform:translate(0, -10px)}100%{transform:translate(0, 0)}}.octicon{display:inline-block;fill:currentColor;vertical-align:text-top}.tabbed-content{box-shadow:0 -.0625rem var(--tabs-color-overline),0 .0625rem var(--tabs-color-underline);display:none;order:99;padding-bottom:.75rem;padding-top:.75rem;width:100%}.tabbed-content>:first-child{margin-top:0 !important}.tabbed-content>:last-child{margin-bottom:0 !important}.tabbed-content>.tabbed-set{margin:0}.tabbed-set{border-radius:.125rem;display:flex;flex-wrap:wrap;margin:1em 0;position:relative}.tabbed-set>input{opacity:0;position:absolute}.tabbed-set>input:checked+label{border-color:var(--tabs-color-label-active);color:var(--tabs-color-label-active)}.tabbed-set>input:checked+label+.tabbed-content{display:block}.tabbed-set>input:focus+label{outline-style:auto}.tabbed-set>input:not(.focus-visible)+label{outline:none;-webkit-tap-highlight-color:transparent}.tabbed-set>label{border-bottom:.125rem solid transparent;color:var(--tabs-color-label-inactive);cursor:pointer;font-size:var(--tabs-size-label);font-weight:700;padding:1em 1.25em .5em;transition:color 250ms;width:auto;z-index:1}html .tabbed-set>label:hover{color:var(--tabs-color-label-active)} 2 | -------------------------------------------------------------------------------- /docs/0.2.2/_static/panels-variables.06eb56fa6e07937060861dad626602ad.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --tabs-color-label-active: hsla(231, 99%, 66%, 1); 3 | --tabs-color-label-inactive: rgba(178, 206, 245, 0.62); 4 | --tabs-color-overline: rgb(207, 236, 238); 5 | --tabs-color-underline: rgb(207, 236, 238); 6 | --tabs-size-label: 1rem; 7 | } -------------------------------------------------------------------------------- /docs/0.2.2/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/plus.png -------------------------------------------------------------------------------- /docs/0.2.2/_static/pygments.css: -------------------------------------------------------------------------------- 1 | /*.highlight .hll { background-color: #FFFFCC }*/ 2 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 3 | 4 | .highlight .l { color: rgba(var(--pst-color-block-code),1) } /* Literal */ 5 | 6 | .highlight .p { color: rgba(var(--pst-color-block-code),1) } /* Punctuation */ 7 | /*.highlight .w { color: # } /* Text.Whitespace */ 8 | 9 | .highlight .o { color: rgba(var(--pst-color-block-code),1) } /* Operator */ 10 | .highlight .ow { color: rgba(var(--pst-color-block-code),1) } /* Operator.Word */ 11 | 12 | .highlight .c { color: #969896 } /* Comment */ 13 | .highlight .cm { color: #969896 } /* Comment.Multiline */ 14 | .highlight .cp { color: #969896 } /* Comment.Preproc */ 15 | .highlight .c1 { color: #969896 } /* Comment.Single */ 16 | .highlight .cs { color: #969896 } /* Comment.Special */ 17 | 18 | /*.highlight .gd { color: # } /* Generic.Deleted */ 19 | /*.highlight .ge { font-style: italic } /* Generic.Emph */ 20 | .highlight .gr { color: #969896 } /* Generic.Error */ 21 | /*.highlight .gh { color: #; font-weight: bold } /* Generic.Heading */ 22 | /*.highlight .gi { color: # } /* Generic.Inserted */ 23 | .highlight .go { color: #969896 } /* Generic.Output */ 24 | .highlight .gp { color: #A71D5D } /* Generic.Prompt */ 25 | /*.highlight .gs { font-weight: bold } /* Generic.Strong */ 26 | /*.highlight .gu { color: #; font-weight: bold } /* Generic.Subheading */ 27 | .highlight .gt { color: #969896 } /* Generic.Traceback */ 28 | 29 | .highlight .k { color: #A71D5D } /* Keyword */ 30 | .highlight .kc { color: #A71D5D } /* Keyword.Constant */ 31 | .highlight .kd { color: #A71D5D } /* Keyword.Declaration */ 32 | .highlight .kn { color: #A71D5D } /* Keyword.Namespace */ 33 | .highlight .kp { color: #A71D5D } /* Keyword.Pseudo */ 34 | .highlight .kr { color: #A71D5D } /* Keyword.Reserved */ 35 | .highlight .kt { color: #0086B3 } /* Keyword.Type */ 36 | 37 | .highlight .n { color: #333333 } /* Name */ 38 | .highlight .na { color: #333333 } /* Name.Attribute */ 39 | .highlight .nb { color: #0086B3 } /* Name.Builtin */ 40 | .highlight .nc { color: #333333 } /* Name.Class */ 41 | .highlight .no { color: #0086B3 } /* Name.Constant */ 42 | .highlight .nd { color: #795DA3 } /* Name.Decorator */ 43 | /*.highlight .ni { color: #; font-weight: bold } /* Name.Entity */ 44 | .highlight .ne { color: #0086B3 } /* Name.Exception */ 45 | .highlight .nf { color: #795DA3 } /* Name.Function */ 46 | /*.highlight .nl { color: # } /* Name.Label */ 47 | .highlight .nn { color: rgba(var(--pst-color-block-code),1) } /* Name.Namespace */ 48 | .highlight .nt { color: #A71D5D } /* Name.Tag */ 49 | .highlight .nv { color: rgba(var(--pst-color-block-code),1) } /* Name.Variable */ 50 | 51 | .highlight .m { color: #0086B3 } /* Literal.Number */ 52 | .highlight .mf { color: #0086B3 } /* Literal.Number.Float */ 53 | .highlight .mh { color: #0086B3 } /* Literal.Number.Hex */ 54 | .highlight .mi { color: #0086B3 } /* Literal.Number.Integer */ 55 | .highlight .mo { color: #0086B3 } /* Literal.Number.Oct */ 56 | 57 | .highlight .s { color: #183691 } /* Literal.String */ 58 | .highlight .sb { color: #183691 } /* Literal.String.Backtick */ 59 | .highlight .sc { color: #183691 } /* Literal.String.Char */ 60 | .highlight .sd { color: #183691 } /* Literal.String.Doc */ 61 | .highlight .s2 { color: #183691 } /* Literal.String.Double */ 62 | .highlight .se { color: #183691 } /* Literal.String.Escape */ 63 | .highlight .sh { color: #183691 } /* Literal.String.Heredoc */ 64 | .highlight .si { color: #183691 } /* Literal.String.Interpol */ 65 | /*.highlight .sx { color: # } /* Literal.String.Other */ 66 | /*.highlight .sr { color: # } /* Literal.String.Regex */ 67 | .highlight .s1 { color: #183691 } /* Literal.String.Single */ 68 | .highlight .ss { color: #A71D5D } /* Literal.String.Symbol */ 69 | .highlight .bp { color: #94558D } /* Name.Builtin.Pseudo */ 70 | .highlight .vc { color: #A71D5D } /* Name.Variable.Class */ 71 | .highlight .vg { color: #A71D5D } /* Name.Variable.Global */ 72 | .highlight .vi { color: #A71D5D } /* Name.Variable.Instance */ 73 | 74 | .highlight .il { color: #0086B3 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/0.2.2/_static/smartpy-favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/smartpy-favicon.ico -------------------------------------------------------------------------------- /docs/0.2.2/_static/vendor/fontawesome/5.13.0/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Font Awesome Free License 2 | ------------------------- 3 | 4 | Font Awesome Free is free, open source, and GPL friendly. You can use it for 5 | commercial projects, open source projects, or really almost whatever you want. 6 | Full Font Awesome Free license: https://fontawesome.com/license/free. 7 | 8 | # Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) 9 | In the Font Awesome Free download, the CC BY 4.0 license applies to all icons 10 | packaged as SVG and JS file types. 11 | 12 | # Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL) 13 | In the Font Awesome Free download, the SIL OFL license applies to all icons 14 | packaged as web and desktop font files. 15 | 16 | # Code: MIT License (https://opensource.org/licenses/MIT) 17 | In the Font Awesome Free download, the MIT license applies to all non-font and 18 | non-icon files. 19 | 20 | # Attribution 21 | Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font 22 | Awesome Free files already contain embedded comments with sufficient 23 | attribution, so you shouldn't need to do anything additional when using these 24 | files normally. 25 | 26 | We've kept attribution comments terse, so we ask that you do not actively work 27 | to remove them from files, especially code. They're a great way for folks to 28 | learn about Font Awesome. 29 | 30 | # Brand Icons 31 | All brand icons are trademarks of their respective owners. The use of these 32 | trademarks does not indicate endorsement of the trademark holder by Font 33 | Awesome, nor vice versa. **Please do not use brand logos for any purpose except 34 | to represent the company, product, or service to which they refer.** 35 | -------------------------------------------------------------------------------- /docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /docs/0.2.2/_static/webpack-macros.html: -------------------------------------------------------------------------------- 1 | 2 | {% macro head_pre_icons() %} 3 | 5 | 7 | 9 | {% endmacro %} 10 | 11 | {% macro head_pre_fonts() %} 12 | {% endmacro %} 13 | 14 | {% macro head_pre_bootstrap() %} 15 | 16 | 17 | {% endmacro %} 18 | 19 | {% macro head_js_preload() %} 20 | 21 | {% endmacro %} 22 | 23 | {% macro body_post() %} 24 | 25 | {% endmacro %} -------------------------------------------------------------------------------- /docs/0.2.2/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/0.2.2/objects.inv -------------------------------------------------------------------------------- /docs/0.2.2/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Search — smartpy v0.2.2 documentation 9 | 10 | 11 | 12 | 13 | 14 | 16 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 152 | 153 | 154 |
155 |
156 | 157 | 158 | 159 |
167 |
168 | 169 | 170 | 171 | 172 |
173 | 174 |
175 | 176 | 177 | 178 | 179 | 180 | 181 |
182 | 183 |
184 | 185 |

Search

186 | 187 | 195 | 196 | 197 |

198 | Searching for multiple words only shows matches that contain 199 | all words. 200 |

201 | 202 | 203 |
204 | 205 | 206 | 207 |
208 | 209 | 210 | 211 |
212 | 213 |
214 | 215 | 216 |
217 | 218 | 219 |
220 | 221 | 222 |
223 |
224 | 225 | 226 | 227 |
228 |
229 | 234 | 240 |
241 |
242 | 243 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | .ONESHELL: 4 | 5 | # You can set these variables from the command line, and also 6 | # from the environment for the first two. 7 | SPHINXOPTS ?= 8 | SPHINXBUILD ?= sphinx-build 9 | SOURCEDIR = ./_doc_src 10 | BUILDDIR = ./_doc_build 11 | 12 | # Put it first so that "make" without argument is like "make help". 13 | help: 14 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 15 | 16 | .PHONY: help Makefile 17 | 18 | # Catch-all target: route all unknown targets to Sphinx using the new 19 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 20 | %: Makefile 21 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 22 | 23 | github_clean: 24 | find . \( -type d -maxdepth 1 ! -name "." \) \ 25 | -and \( -type d -maxdepth 1 ! -name "*.*.*" \) \ 26 | -and \( -type d -maxdepth 1 ! -name "_doc_*" \) \ 27 | -exec rm -rf {} + 28 | rm -f *.html *.js *.inv .buildinfo 29 | 30 | github_html: 31 | @make github_clean 32 | @make local_html 33 | cp -a $(BUILDDIR)/html/. . 34 | ifdef VERSION_RELEASE 35 | cp -a $(BUILDDIR)/html/. ./$(VERSION_RELEASE) 36 | endif 37 | 38 | local_clean: 39 | rm -rf $(BUILDDIR)/* 40 | 41 | local_html: 42 | @make local_clean 43 | $(MAKE) html 44 | -------------------------------------------------------------------------------- /docs/_doc_img/smartpy-favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_doc_img/smartpy-favicon.ico -------------------------------------------------------------------------------- /docs/_doc_src/api/attributes/smartpy.SMART.parameters.rst: -------------------------------------------------------------------------------- 1 | smartpy.SMART.parameters 2 | ======================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. autoattribute:: smartpy.SMART.parameters -------------------------------------------------------------------------------- /docs/_doc_src/api/attributes/smartpy.parameters.Parameters.names.rst: -------------------------------------------------------------------------------- 1 | smartpy.parameters.Parameters.names 2 | =================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. autoattribute:: smartpy.parameters.Parameters.names -------------------------------------------------------------------------------- /docs/_doc_src/api/attributes/smartpy.parameters.Parameters.ranges.rst: -------------------------------------------------------------------------------- 1 | smartpy.parameters.Parameters.ranges 2 | ==================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. autoattribute:: smartpy.parameters.Parameters.ranges -------------------------------------------------------------------------------- /docs/_doc_src/api/attributes/smartpy.parameters.Parameters.values.rst: -------------------------------------------------------------------------------- 1 | smartpy.parameters.Parameters.values 2 | ==================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. autoattribute:: smartpy.parameters.Parameters.values -------------------------------------------------------------------------------- /docs/_doc_src/api/classes/smartpy.SMART.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | SMART 5 | ===== 6 | 7 | .. autoclass:: SMART 8 | 9 | 10 | Methods 11 | ------- 12 | 13 | .. autosummary:: 14 | :nosignatures: 15 | :toctree: ../methods/ 16 | :template: method.rst 17 | 18 | ~smartpy.SMART.simulate 19 | ~smartpy.SMART.write_output_files 20 | ~smartpy.SMART.get_simulation_array 21 | ~smartpy.SMART.get_evaluation_array 22 | 23 | 24 | Attributes 25 | ---------- 26 | 27 | .. autosummary:: 28 | :nosignatures: 29 | :toctree: ../attributes/ 30 | :template: attribute.rst 31 | 32 | ~smartpy.SMART.parameters 33 | -------------------------------------------------------------------------------- /docs/_doc_src/api/classes/smartpy.montecarlo.Best.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Best 5 | ==== 6 | 7 | .. autoclass:: smartpy.montecarlo.Best 8 | 9 | Methods 10 | ------- 11 | 12 | .. autosummary:: 13 | :nosignatures: 14 | :toctree: ../methods/ 15 | :template: method.rst 16 | 17 | ~smartpy.montecarlo.Best.run 18 | -------------------------------------------------------------------------------- /docs/_doc_src/api/classes/smartpy.montecarlo.GLUE.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | GLUE 5 | ==== 6 | 7 | .. autoclass:: smartpy.montecarlo.GLUE 8 | 9 | Methods 10 | ------- 11 | 12 | .. autosummary:: 13 | :nosignatures: 14 | :toctree: ../methods/ 15 | :template: method.rst 16 | 17 | ~smartpy.montecarlo.GLUE.run 18 | -------------------------------------------------------------------------------- /docs/_doc_src/api/classes/smartpy.montecarlo.LHS.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | LHS 5 | === 6 | 7 | .. autoclass:: smartpy.montecarlo.LHS 8 | 9 | Methods 10 | ------- 11 | 12 | .. autosummary:: 13 | :nosignatures: 14 | :toctree: ../methods/ 15 | :template: method.rst 16 | 17 | ~smartpy.montecarlo.LHS.run 18 | -------------------------------------------------------------------------------- /docs/_doc_src/api/classes/smartpy.montecarlo.Total.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Total 5 | ===== 6 | 7 | .. autoclass:: smartpy.montecarlo.Total 8 | 9 | Methods 10 | ------- 11 | 12 | .. autosummary:: 13 | :nosignatures: 14 | :toctree: ../methods/ 15 | :template: method.rst 16 | 17 | ~smartpy.montecarlo.Total.run 18 | -------------------------------------------------------------------------------- /docs/_doc_src/api/classes/smartpy.parameters.Parameters.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Parameters 5 | ========== 6 | 7 | .. autoclass:: smartpy.parameters.Parameters 8 | 9 | Methods 10 | ------- 11 | 12 | .. autosummary:: 13 | :nosignatures: 14 | :toctree: ../methods/ 15 | :template: method.rst 16 | 17 | ~smartpy.parameters.Parameters.set_parameters_with_file 18 | ~smartpy.parameters.Parameters.set_parameters_with_dict 19 | 20 | 21 | Attributes 22 | ---------- 23 | 24 | .. autosummary:: 25 | :nosignatures: 26 | :toctree: ../attributes/ 27 | :template: attribute.rst 28 | 29 | ~smartpy.parameters.Parameters.names 30 | ~smartpy.parameters.Parameters.ranges 31 | ~smartpy.parameters.Parameters.values 32 | -------------------------------------------------------------------------------- /docs/_doc_src/api/methods/smartpy.SMART.get_evaluation_array.rst: -------------------------------------------------------------------------------- 1 | smartpy.SMART.get_evaluation_array 2 | ================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.SMART.get_evaluation_array -------------------------------------------------------------------------------- /docs/_doc_src/api/methods/smartpy.SMART.get_simulation_array.rst: -------------------------------------------------------------------------------- 1 | smartpy.SMART.get_simulation_array 2 | ================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.SMART.get_simulation_array -------------------------------------------------------------------------------- /docs/_doc_src/api/methods/smartpy.SMART.simulate.rst: -------------------------------------------------------------------------------- 1 | smartpy.SMART.simulate 2 | ====================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.SMART.simulate -------------------------------------------------------------------------------- /docs/_doc_src/api/methods/smartpy.SMART.write_output_files.rst: -------------------------------------------------------------------------------- 1 | smartpy.SMART.write_output_files 2 | ================================ 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.SMART.write_output_files -------------------------------------------------------------------------------- /docs/_doc_src/api/methods/smartpy.montecarlo.Best.run.rst: -------------------------------------------------------------------------------- 1 | smartpy.montecarlo.Best.run 2 | =========================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.montecarlo.Best.run -------------------------------------------------------------------------------- /docs/_doc_src/api/methods/smartpy.montecarlo.GLUE.run.rst: -------------------------------------------------------------------------------- 1 | smartpy.montecarlo.GLUE.run 2 | =========================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.montecarlo.GLUE.run -------------------------------------------------------------------------------- /docs/_doc_src/api/methods/smartpy.montecarlo.LHS.run.rst: -------------------------------------------------------------------------------- 1 | smartpy.montecarlo.LHS.run 2 | ========================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.montecarlo.LHS.run -------------------------------------------------------------------------------- /docs/_doc_src/api/methods/smartpy.montecarlo.Total.run.rst: -------------------------------------------------------------------------------- 1 | smartpy.montecarlo.Total.run 2 | ============================ 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.montecarlo.Total.run -------------------------------------------------------------------------------- /docs/_doc_src/api/methods/smartpy.parameters.Parameters.set_parameters_with_dict.rst: -------------------------------------------------------------------------------- 1 | smartpy.parameters.Parameters.set_parameters_with_dict 2 | ====================================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.parameters.Parameters.set_parameters_with_dict -------------------------------------------------------------------------------- /docs/_doc_src/api/methods/smartpy.parameters.Parameters.set_parameters_with_file.rst: -------------------------------------------------------------------------------- 1 | smartpy.parameters.Parameters.set_parameters_with_file 2 | ====================================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.parameters.Parameters.set_parameters_with_file -------------------------------------------------------------------------------- /docs/_doc_src/api_reference.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | API Reference 5 | ============= 6 | 7 | Single experiment 8 | ----------------- 9 | 10 | .. toctree:: 11 | :maxdepth: 1 12 | 13 | api/classes/smartpy.SMART.rst 14 | api/classes/smartpy.parameters.Parameters.rst 15 | 16 | 17 | Monte Carlo experiment 18 | ---------------------- 19 | 20 | Sampling 21 | ~~~~~~~~ 22 | 23 | .. toctree:: 24 | :maxdepth: 1 25 | 26 | api/classes/smartpy.montecarlo.LHS.rst 27 | 28 | 29 | Conditioning 30 | ~~~~~~~~~~~~ 31 | 32 | .. toctree:: 33 | :maxdepth: 1 34 | 35 | api/classes/smartpy.montecarlo.Best.rst 36 | api/classes/smartpy.montecarlo.GLUE.rst 37 | api/classes/smartpy.montecarlo.Total.rst 38 | 39 | -------------------------------------------------------------------------------- /docs/_doc_src/changelog.rst: -------------------------------------------------------------------------------- 1 | Change Log 2 | ========== 3 | 4 | .. include:: ../../changelog.rst 5 | -------------------------------------------------------------------------------- /docs/_doc_src/citation.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Citation 5 | ======== 6 | 7 | Software 8 | -------- 9 | 10 | If you are using `smartpy`, please consider citing the software as follows 11 | (click on the link to get the DOI of a specific version and year): 12 | 13 | .. pull-quote:: 14 | 15 | Hallouin, T., Mockler, E., Bruen, M. (XXXX). 16 | SMARTpy: An implementation if the rainfall-runoff model in Python (Version X.X.X). 17 | *Zenodo*. 18 | ``_ 19 | 20 | 21 | Model 22 | ----- 23 | 24 | If you are using `smartpy`, please consider citing the original model 25 | description article: 26 | 27 | .. pull-quote:: 28 | 29 | Mockler, E., O’Loughlin, F., and Bruen, M. (2016). 30 | Understanding hydrological flow paths in conceptual catchment models 31 | using uncertainty and sensitivity analysis. 32 | *Computers & Geosciences*, 90, 66–77. 33 | ``_ 34 | -------------------------------------------------------------------------------- /docs/_doc_src/index.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | .. include:: ../../README.rst 5 | 6 | Documentation 7 | ------------- 8 | 9 | .. panels:: 10 | :card: + intro-card text-center 11 | :column: col-lg-4 col-md-4 col-sm-6 col-xs-12 p-2 12 | 13 | Learn how to get `smartpy`. 14 | 15 | +++ 16 | 17 | .. link-button:: installation 18 | :type: ref 19 | :text: Installation 20 | :classes: btn-outline-primary btn-block stretched-link 21 | 22 | --- 23 | 24 | Learn how to use `smartpy`. 25 | 26 | +++ 27 | 28 | .. link-button:: tutorial 29 | :type: ref 30 | :text: Tutorial 31 | :classes: btn-outline-primary btn-block stretched-link 32 | 33 | --- 34 | 35 | Learn more about SMART. 36 | 37 | +++ 38 | 39 | .. link-button:: model_description 40 | :type: ref 41 | :text: Model Description 42 | :classes: btn-outline-primary btn-block stretched-link 43 | 44 | 45 | 46 | Acknowledgment 47 | -------------- 48 | 49 | This model implementation was initially developed with the financial support of 50 | Ireland's Environmental Protection Agency (Grant Number 2014-W-LS-5). 51 | 52 | .. toctree:: 53 | :hidden: 54 | :maxdepth: 1 55 | 56 | installation 57 | tutorial 58 | api_reference 59 | model_description 60 | citation 61 | support 62 | changelog 63 | licence 64 | -------------------------------------------------------------------------------- /docs/_doc_src/installation.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Installation 5 | ============ 6 | 7 | If you wish to install the most recent stable version of `smartpy`, 8 | it is available on the Python Package Index (PyPI), simply run: 9 | 10 | .. code-block:: bash 11 | 12 | pip install smartpy 13 | 14 | If you need the latest, potentially unstable, features listed in the 15 | :doc:`change log `, please use the *dev* branch on the 16 | GitHub repository: 17 | 18 | .. code-block:: bash 19 | 20 | pip install git+https://github.com/ThibHlln/smartpy.git@dev 21 | 22 | 23 | .. rubric:: Requirements 24 | 25 | The following packages are required to use `smartpy`: 26 | 27 | .. literalinclude:: ../../requirements.txt 28 | :language: none 29 | 30 | .. rubric:: Optional dependency for input/output 31 | 32 | `smartpy` is designed to read/write CSV (Comma-Separated Values) files 33 | and NetCDF (Network Common Data Form) input/output files. However, only 34 | CSV files can natively be read/written in Python. 35 | 36 | To read/write NetCDF files, the `netCDF4` python package is required (specific 37 | pre-requisites prior the installation of `netCDF4` exist and can be found 38 | at ``_). 39 | 40 | .. rubric:: Optional dependencies for Monte Carlo experiments 41 | 42 | The module `smartpy.montecarlo` requires the `spotpy` Python package 43 | to perform the sampling required for Monte Carlo experiments 44 | (``_). 45 | 46 | In addition, if this sampling is to be done in parallel, the `mpi4py` 47 | Python package is also required (``_) 48 | 49 | .. rubric:: Optional dependency for performance improvement 50 | 51 | `smartpy` features a separate accelerator extension written in C++, 52 | `smartcpp` (``_) that will be 53 | automatically used if it is installed alongside `smartpy`. Using 54 | `smartcpp` can significantly improve the execution time. 55 | -------------------------------------------------------------------------------- /docs/_doc_src/licence.rst: -------------------------------------------------------------------------------- 1 | Licence 2 | ======= 3 | 4 | .. include:: ../../LICENCE.rst 5 | -------------------------------------------------------------------------------- /docs/_doc_src/support.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Support 5 | ======= 6 | 7 | Support for users is available through `GitHub Discussions 8 | `_. Use this support 9 | page to find answers to previously asked questions, to ask questions 10 | of your own, and to suggest ideas to improve `smartpy`. 11 | 12 | To report bugs, please use `GitHub Issues `_. 13 | -------------------------------------------------------------------------------- /docs/_doc_src/tutorial.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Tutorial 5 | ======== 6 | 7 | This tutorial showcases an example of the use of the API of `smartpy` for 8 | running a :doc:`single experiment ` (i.e. one 9 | simulation with one parameter set) and a :doc:`Monte Carlo experiment 10 | ` (i.e. several simulations with a 11 | sample of parameter sets): 12 | 13 | .. toctree:: 14 | :maxdepth: 1 15 | 16 | tutorial/single_experiment 17 | tutorial/montecarlo_experiment 18 | 19 | It uses the input files available in the folder *examples/in/ExampleDaily*. 20 | The output files that should be generated following this tutorial are made 21 | available for comparison purposes in *examples/out/ExampleDaily*. Although, 22 | given the stochastic nature of the Monte Carlo experiment, do not expect 23 | the exact same outputs. 24 | -------------------------------------------------------------------------------- /docs/_doc_src/tutorial/montecarlo_experiment.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Monte Carlo experiment 5 | ====================== 6 | 7 | The Monte Carlo experiment presented here consists of two steps: first the 8 | :ref:`sampling ` in the SMART model parameter space, then the 9 | :ref:`conditioning ` of the sample to select those parameter 10 | sets deemed as satisfactorily reproducing the observed river discharge. 11 | 12 | In `smartpy`, the sampling generates at random a number of parameter sets 13 | that are used to run the SMART model on a given simulation period (the 14 | "calibration" period). The performance of the SMART model structure with 15 | each parameter set is assessed using one or more objective functions. 16 | These objective function values (and optionally the corresponding 17 | streamflow simulations) correspond to the sampling output. 18 | 19 | Then, in `smartpy`, the conditioning selects a subset of parameter sets 20 | from the sampling based on their objective functions values. This subset 21 | of parameter sets is then used to run the SMART model on another given 22 | simulation period (the "evaluation" period, necessarily independent from 23 | the sampling period). The performance of the SMART model with this subset 24 | of parameter sets is then assessed again using one or more objective 25 | functions (not necessarily the same ones as for the conditioning). These 26 | objective function values (and optionally the corresponding streamflow 27 | simulations) correspond to the conditioning output. 28 | 29 | .. _sampling: 30 | 31 | Sampling 32 | -------- 33 | 34 | `smartpy` only offers a Latin Hypercube approach (`McKay et al., 2000 35 | `_) for sampling the SMART 36 | model parameter space. 37 | 38 | Setting up 39 | '''''''''' 40 | 41 | The configuration of the sampling is done as follows: 42 | 43 | .. code-block:: python 44 | 45 | from smartpy import montecarlo 46 | 47 | lhs = montecarlo.LHS( 48 | catchment='ExampleDaily', 49 | root_f='examples/', 50 | in_format='csv, 51 | out_format='csv, 52 | sample_size=10, 53 | parallel=False, 54 | save_sim=True, 55 | settings_filename='ExampleDaily.sttngs' 56 | ) 57 | 58 | .. seealso:: `smartpy.montecarlo.LHS` 59 | 60 | .. note:: 61 | 62 | The configuration of the SMART model itself, unlike for the single 63 | experiment, is done through a settings file. An example of such a 64 | settings file is available as a template in the *examples/* directory. 65 | 66 | Adjusting the parameter space 67 | ````````````````````````````` 68 | 69 | The default model parameter ranges used to define the boundaries of the 70 | Latin hypercube are accessible as follows: 71 | 72 | .. code-block:: python 73 | 74 | >>> print(lhs.model.parameters.ranges) 75 | {'T': (0.9, 1.1), 'C': (0.0, 1.0), 'H': (0.0, 0.3), 'D': (0.0, 1.0), 'S': (0.0, 0.013), 'Z': (15.0, 150.0), 'SK': (1.0, 240.0), 'FK': (48.0, 1440.0), 'GK': (1200.0, 4800.0), 'RK': (1.0, 96.0)} 76 | 77 | And they can be adjusted by assigning a new dictionary to this attribute: 78 | 79 | .. code-block:: python 80 | 81 | lhs.parameter.ranges = { 82 | 'T': (0.9, 1.1), 83 | 'C': (0.0, 1.0), 84 | 'H': (0.0, 0.3), 85 | 'D': (0.0, 1.0), 86 | 'S': (0.0, 0.013), 87 | 'Z': (15.0, 150.0), 88 | 'SK': (1.0, 240.0), 89 | 'FK': (48.0, 1440.0), 90 | 'GK': (1200.0, 4800.0), 91 | 'RK': (1.0, 96.0) 92 | } 93 | 94 | 95 | Defining the initial conditions 96 | ``````````````````````````````` 97 | 98 | Like in the single experiment example, the "educated guess" approach can be 99 | used as follows: 100 | 101 | .. code-block:: python 102 | 103 | lhs.model.extra = { 104 | 'aar': 1200, 105 | 'r-o_ratio': 0.45, 106 | 'r-o_split': (0.10, 0.15, 0.15, 0.30, 0.30) 107 | } 108 | 109 | 110 | Also, a warm up period can be chosen in the settings file where the model 111 | is configured. 112 | 113 | Simulating 114 | '''''''''' 115 | 116 | Simulating in serial 117 | ```````````````````` 118 | 119 | Running the sampling in the parameter space sequentially (i.e. simulating 120 | with one parameter set at a time using one process) can be done as follows: 121 | 122 | .. code-block:: python 123 | 124 | lhs.run(compression=False) 125 | 126 | 127 | .. seealso:: `smartpy.montecarlo.LHS.run` 128 | 129 | Simulating in parallel 130 | `````````````````````` 131 | 132 | To start the sampling in parallel (i.e. simulating with multiple parameter 133 | sets at a time using multiple processes, the parameter *parallel* must be 134 | set as `True` in the set up step above, and all the steps presented above 135 | (including the `lhs.run(...)`) must be saved in a Python script, say 136 | *lhs_sampling.py*. Then, this script must be executed via a `mpirun` 137 | command as follows (e.g. using 4 processors to initialise 4 processes): 138 | 139 | .. code-block:: bash 140 | 141 | mpirun -np 4 python lhs_sampling.py 142 | 143 | Outputs 144 | ``````` 145 | 146 | The sampling performed above will have produced an output file 147 | *{root_f}/out/{catchment}.SMART.lhs* (if `'csv'` was chosen as the output 148 | format or *{root_f}/out/{catchment}.SMART.lhs.nc* (if `'netcdf'` was 149 | chosen as the output format). 150 | 151 | .. _conditioning: 152 | 153 | Conditioning 154 | ------------ 155 | 156 | .. warning:: 157 | 158 | A sampling output file is required to perform the conditioning step. 159 | 160 | `smartpy` offers three conditioning approaches which differ in the way 161 | the parameter sets are elicited as satisfactory: 162 | 163 | - `GLUE` is based on the selection of one or more objective functions 164 | and the a priori definition of conditions (i.e. thresholds) to achieve 165 | with the model simulation on each objective function to deem the 166 | parameter set as "behavioural"; 167 | - `Best` is based on the selection of one target objective function 168 | and the a priori choice of the number of "best" performing parameter 169 | sets to retain; 170 | - `Total` is not a conditioning approach per se, as it retains all 171 | parameter sets for the simulation on the "evaluation" period. This is 172 | provided as a convenient way to offer to the user the opportunity 173 | to perform their own conditioning approach a posteriori using the 174 | streamflow simulations on the "calibration" and the "evaluation" periods 175 | obtained from the sampling and conditioning steps, respectively. 176 | 177 | .. seealso:: `smartpy.montecarlo.GLUE`, `smartpy.montecarlo.Best`, 178 | `smartpy.montecarlo.Total` 179 | 180 | The remainder of this tutorial is based on the `Best` approach. 181 | 182 | Setting up 183 | '''''''''' 184 | 185 | The configuration of the conditioning is done as follows: 186 | 187 | .. code-block:: python 188 | 189 | from smartpy import montecarlo 190 | 191 | montecarlo.Best( 192 | catchment='ExampleDaily', 193 | root_f='examples/', 194 | in_format='csv', 195 | out_format='csv', 196 | target='KGE, 197 | nb_best='2', 198 | parallel=False, 199 | save_sim=True 200 | ) 201 | 202 | For example, here the two best performing parameter sets amongst the 203 | ten sets sampled are selected based on their Kling-Gupta Efficiency (KGE) 204 | values. 205 | 206 | .. important:: 207 | 208 | The *catchment* and *root_f* must be the same between the sampling 209 | and the conditioning steps. In addition, the *out_format* of the 210 | sampling step must be the sme as the *in_format* of the conditioning 211 | step. 212 | 213 | Defining the initial conditions 214 | ``````````````````````````````` 215 | 216 | The initial conditions can be defined the same way they are in the 217 | sampling step above. 218 | 219 | Simulating 220 | '''''''''' 221 | 222 | The simulations can be performed the same way they are in the sampling 223 | step above. 224 | 225 | Outputs 226 | ``````` 227 | 228 | The conditioning performed above will have produced an output file 229 | *{root_f}/out/{catchment}.SMART.best* (if `'csv'` was chosen as the output 230 | format or *{root_f}/out/{catchment}.SMART.best.nc* (if `'netcdf'` was 231 | chosen as the output format). 232 | -------------------------------------------------------------------------------- /docs/_doc_src_unused/cpp_extension.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | C++ Accelerator Extension 5 | ========================= 6 | 7 | `smartcpp` is available if one wishes to use an accelerator module for 8 | the SMART model (``_). 9 | -------------------------------------------------------------------------------- /docs/_doc_src_unused/montecarlo.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Monte Carlo Experiments 5 | ======================= 6 | 7 | The `montecarlo` suite of classes that comes with `smartpy` gives access 8 | to various options for Monte Carlo simulations. The parameter space of 9 | the SMART model can be explored using Latin Hypercube Sampling (`LHS`) 10 | for any sample size required. Once the sampling is complete for on a 11 | given simulation period, the performance of the whole set of parameter 12 | sets can be evaluated on another simulation period with `Total`, or the 13 | set of parameter sets can be conditioned according to their own 14 | performances against observed discharge data on any of the objective 15 | function(s) calculated by `smartpy` (using `GLUE` to distinguish from 16 | behavioural and non-behavioural parameter sets, or using `Best` to 17 | retain a pre-defined number of best performing samples) and the 18 | resulting subset of parameter sets can be evaluated on another 19 | simulation period. 20 | -------------------------------------------------------------------------------- /docs/_doc_src_unused/parallel.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Parallel Computing 5 | ================== 6 | 7 | If Monte Carlo simulations are required, it is important to make use of 8 | the available computer power to reduce the runtime. Personal Computers 9 | now commonly feature several processor cores that can be used to run as 10 | many runs of the SMART model in parallel (*i.e.* at the same time), not 11 | to mention High Performance Clusters, where the benefits of parallel 12 | computing will be even more significant. The `montecarlo` classes of 13 | `smartpy` are using the `spotpy` package to give access to an easy way 14 | to run simulations in parallel. `spotpy` itself requires `mpi4py` to 15 | operate, which applies to `smartpy` by extension. So before using 16 | `montecarlo` with `parallel='mpi'`, a Message Passing Interface (MPI) 17 | library (*e.g.* Open MPI) and `mpi4py` need to be installed on your 18 | machine, and `spotpy` needs to be installed too. Any of the `montecarlo` 19 | classes can take an optional argument parallel, its default value is set 20 | to 'seq' (for sequential computing), but can be set to 'mpi' if your 21 | setup allows it (for parallel computing). 22 | -------------------------------------------------------------------------------- /docs/_doc_static/custom.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;1,400;1,600&display=swap"); 2 | @import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&display=swap"); 3 | 4 | /* blue: #00b0f0 (0, 176, 240) */ 5 | /* green: #92d050 (146, 208, 80) */ 6 | /* brown: #ab7942 (171, 121, 66) */ 7 | :root { 8 | --pst-font-size-h1: 30px; 9 | --pst-font-size-h2: 26px; 10 | --pst-font-size-h3: 22px; 11 | --pst-font-size-h4: 20px; 12 | --pst-font-size-h5: 18px; 13 | --pst-font-size-h6: 16px; 14 | 15 | --pst-color-primary: 77, 77, 77; 16 | --pst-color-success: 146, 208, 80; 17 | --pst-color-info: 0, 176, 240; 18 | --pst-color-warning: 171, 121, 66; 19 | --pst-color-danger: 220, 53, 69; 20 | 21 | --pst-color-text-base: 77, 77, 77; 22 | 23 | --pst-color-active-navigation: 0, 176, 240; 24 | 25 | --pst-color-link: 0, 176, 240; 26 | --pst-color-link-hover: 0, 176, 240; 27 | 28 | --pst-color-preformatted-background: 250, 250, 250; 29 | --pst-color-block-code: 51, 51, 51; 30 | --pst-color-inline-code: 0, 0, 0; 31 | 32 | --pst-color-headerlink: var(--pst-color-link); 33 | --pst-color-headerlink-hover: var(--pst-color-link-hover); 34 | 35 | --pst-font-family-base-system: 'Open Sans', sans-serif; 36 | --pst-font-family-monospace-system: 'JetBrains Mono', monospace; 37 | --pst-font-family-monospace: var(--pst-font-family-monospace-system); 38 | } 39 | 40 | /* override style for code blocks */ 41 | pre { 42 | border: 1px solid rgba(var(--pst-color-preformatted-background),1); /* e1e4e5 */ 43 | font-family: var(--pst-font-family-monospace-system); 44 | border-radius: 4px; 45 | box-shadow: none; 46 | } 47 | 48 | /* override style for class and attributes */ 49 | .sig { 50 | font-family: var(--pst-font-family-monospace-system); 51 | font-weight: 300; 52 | } 53 | 54 | .sig-paren { 55 | font-family: var(--pst-font-family-monospace-system); 56 | font-size: 100%; 57 | } 58 | 59 | .sig-param { 60 | font-family: var(--pst-font-family-monospace-system); 61 | font-style: italic; 62 | font-weight: 300; 63 | font-size: 100%; 64 | } 65 | 66 | em.property{ 67 | font-family: var(--pst-font-family-monospace-system); 68 | font-size: 100%; 69 | padding-right: 6px; 70 | } 71 | 72 | code { 73 | font-family: var(--pst-font-family-monospace-system); 74 | } 75 | 76 | code.descclassname { 77 | font-weight: 300; 78 | font-size: 100%; 79 | } 80 | 81 | code.descname { 82 | font-weight: 600; 83 | font-size: 100%; 84 | } 85 | 86 | .text-monospace { 87 | font-family: var(--pst-font-family-monospace-system); 88 | } 89 | 90 | /* override style for images */ 91 | img { 92 | margin-bottom: 10px; 93 | } 94 | 95 | /* override style for RST directive "contents" */ 96 | div.topic { 97 | background-color: transparent; 98 | border: hidden; 99 | } 100 | 101 | /* override style for permalink */ 102 | a.headerlink{ 103 | color:rgba(var(--pst-color-text-base),1); 104 | text-align: center; 105 | padding-left: 10px; 106 | font-size: 14px; 107 | border-bottom: hidden; 108 | } 109 | a.headerlink:hover{ 110 | background-color: transparent; 111 | color:rgba(var(--pst-color-headerlink-hover),1); 112 | border-bottom: hidden; 113 | } 114 | 115 | /* override style for hyperlinks in paragraphs */ 116 | a { 117 | color: rgba(var(--pst-color-text-base),1); 118 | border-bottom: 1px dotted; 119 | } 120 | 121 | a:hover { 122 | text-decoration: none; /* to remove text-decoration: underline */ 123 | border-bottom: 1px solid; 124 | } 125 | 126 | nav a, nav a:hover, 127 | .figure a, .figure a:hover, 128 | a.image-reference, a.image-reference:hover { 129 | border-bottom: hidden 130 | } 131 | 132 | p a, .code-block-caption a code.literal { 133 | color: rgba(var(--pst-color-text-base),1); 134 | border-bottom: 1px dotted; 135 | } 136 | 137 | p a:hover, .code-block-caption a:hover code.literal { 138 | text-decoration: none; 139 | color: rgba(var(--pst-color-link-hover),1); 140 | border-bottom: 1px solid; 141 | } 142 | 143 | /* override style for inline code */ 144 | code.literal{ 145 | font-size: 95%; 146 | font-weight: normal; 147 | color: rgba(var(--pst-color-inline-code),1); 148 | } 149 | a code.literal{ 150 | font-size: 95%; 151 | font-weight: normal; 152 | color: rgba(var(--pst-color-inline-code),1); 153 | } 154 | a:hover code.literal{ 155 | font-size: 95%; 156 | font-weight: normal; 157 | color: rgba(var(--pst-color-link-hover),1); 158 | } 159 | 160 | /* override style for tables */ 161 | table { 162 | margin-top: 10px; 163 | } 164 | 165 | /* */ 166 | dt:target, span.highlighted { 167 | background-color: rgba(var(--pst-color-link-hover), 0.3); 168 | } 169 | 170 | rect.highlighted { 171 | fill: rgba(var(--pst-color-link-hover), 0.3); 172 | } 173 | 174 | /* override style for sphinx-panels */ 175 | .btn-outline-primary { 176 | color: rgba(var(--pst-color-link),1); 177 | border-color: rgba(var(--pst-color-link),1); 178 | } 179 | 180 | .btn-outline-primary:hover { 181 | color: white; 182 | border-color: rgba(var(--pst-color-link-hover),1); 183 | background-color: rgba(var(--pst-color-link-hover),1); 184 | } 185 | 186 | /* override style for block-quotes */ 187 | blockquote { 188 | padding: 0 1em; 189 | color: #6a737d; 190 | border-left: .25em solid #dfe2e5; 191 | } 192 | -------------------------------------------------------------------------------- /docs/_doc_static/pygments.css: -------------------------------------------------------------------------------- 1 | /*.highlight .hll { background-color: #FFFFCC }*/ 2 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 3 | 4 | .highlight .l { color: rgba(var(--pst-color-block-code),1) } /* Literal */ 5 | 6 | .highlight .p { color: rgba(var(--pst-color-block-code),1) } /* Punctuation */ 7 | /*.highlight .w { color: # } /* Text.Whitespace */ 8 | 9 | .highlight .o { color: rgba(var(--pst-color-block-code),1) } /* Operator */ 10 | .highlight .ow { color: rgba(var(--pst-color-block-code),1) } /* Operator.Word */ 11 | 12 | .highlight .c { color: #969896 } /* Comment */ 13 | .highlight .cm { color: #969896 } /* Comment.Multiline */ 14 | .highlight .cp { color: #969896 } /* Comment.Preproc */ 15 | .highlight .c1 { color: #969896 } /* Comment.Single */ 16 | .highlight .cs { color: #969896 } /* Comment.Special */ 17 | 18 | /*.highlight .gd { color: # } /* Generic.Deleted */ 19 | /*.highlight .ge { font-style: italic } /* Generic.Emph */ 20 | .highlight .gr { color: #969896 } /* Generic.Error */ 21 | /*.highlight .gh { color: #; font-weight: bold } /* Generic.Heading */ 22 | /*.highlight .gi { color: # } /* Generic.Inserted */ 23 | .highlight .go { color: #969896 } /* Generic.Output */ 24 | .highlight .gp { color: #A71D5D } /* Generic.Prompt */ 25 | /*.highlight .gs { font-weight: bold } /* Generic.Strong */ 26 | /*.highlight .gu { color: #; font-weight: bold } /* Generic.Subheading */ 27 | .highlight .gt { color: #969896 } /* Generic.Traceback */ 28 | 29 | .highlight .k { color: #A71D5D } /* Keyword */ 30 | .highlight .kc { color: #A71D5D } /* Keyword.Constant */ 31 | .highlight .kd { color: #A71D5D } /* Keyword.Declaration */ 32 | .highlight .kn { color: #A71D5D } /* Keyword.Namespace */ 33 | .highlight .kp { color: #A71D5D } /* Keyword.Pseudo */ 34 | .highlight .kr { color: #A71D5D } /* Keyword.Reserved */ 35 | .highlight .kt { color: #0086B3 } /* Keyword.Type */ 36 | 37 | .highlight .n { color: #333333 } /* Name */ 38 | .highlight .na { color: #333333 } /* Name.Attribute */ 39 | .highlight .nb { color: #0086B3 } /* Name.Builtin */ 40 | .highlight .nc { color: #333333 } /* Name.Class */ 41 | .highlight .no { color: #0086B3 } /* Name.Constant */ 42 | .highlight .nd { color: #795DA3 } /* Name.Decorator */ 43 | /*.highlight .ni { color: #; font-weight: bold } /* Name.Entity */ 44 | .highlight .ne { color: #0086B3 } /* Name.Exception */ 45 | .highlight .nf { color: #795DA3 } /* Name.Function */ 46 | /*.highlight .nl { color: # } /* Name.Label */ 47 | .highlight .nn { color: rgba(var(--pst-color-block-code),1) } /* Name.Namespace */ 48 | .highlight .nt { color: #A71D5D } /* Name.Tag */ 49 | .highlight .nv { color: rgba(var(--pst-color-block-code),1) } /* Name.Variable */ 50 | 51 | .highlight .m { color: #0086B3 } /* Literal.Number */ 52 | .highlight .mf { color: #0086B3 } /* Literal.Number.Float */ 53 | .highlight .mh { color: #0086B3 } /* Literal.Number.Hex */ 54 | .highlight .mi { color: #0086B3 } /* Literal.Number.Integer */ 55 | .highlight .mo { color: #0086B3 } /* Literal.Number.Oct */ 56 | 57 | .highlight .s { color: #183691 } /* Literal.String */ 58 | .highlight .sb { color: #183691 } /* Literal.String.Backtick */ 59 | .highlight .sc { color: #183691 } /* Literal.String.Char */ 60 | .highlight .sd { color: #183691 } /* Literal.String.Doc */ 61 | .highlight .s2 { color: #183691 } /* Literal.String.Double */ 62 | .highlight .se { color: #183691 } /* Literal.String.Escape */ 63 | .highlight .sh { color: #183691 } /* Literal.String.Heredoc */ 64 | .highlight .si { color: #183691 } /* Literal.String.Interpol */ 65 | /*.highlight .sx { color: # } /* Literal.String.Other */ 66 | /*.highlight .sr { color: # } /* Literal.String.Regex */ 67 | .highlight .s1 { color: #183691 } /* Literal.String.Single */ 68 | .highlight .ss { color: #A71D5D } /* Literal.String.Symbol */ 69 | .highlight .bp { color: #94558D } /* Name.Builtin.Pseudo */ 70 | .highlight .vc { color: #A71D5D } /* Name.Variable.Class */ 71 | .highlight .vg { color: #A71D5D } /* Name.Variable.Global */ 72 | .highlight .vi { color: #A71D5D } /* Name.Variable.Instance */ 73 | 74 | .highlight .il { color: #0086B3 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_doc_templates/attribute.rst: -------------------------------------------------------------------------------- 1 | {{ fullname }} 2 | {{ underline }} 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. autoattribute:: {{ fullname }} 8 | -------------------------------------------------------------------------------- /docs/_doc_templates/base.rst: -------------------------------------------------------------------------------- 1 | {{ fullname }} 2 | {{ underline }} 3 | 4 | .. auto{{ objtype }}:: {{ fullname }} 5 | -------------------------------------------------------------------------------- /docs/_doc_templates/docs-navbar.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 12 | 13 | 16 | 17 | {% set navbar_class, navbar_align = navbar_align_class() %} 18 | 49 |
-------------------------------------------------------------------------------- /docs/_doc_templates/footer.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 12 | 18 |
19 |
-------------------------------------------------------------------------------- /docs/_doc_templates/function.rst: -------------------------------------------------------------------------------- 1 | {{ fullname }} 2 | {{ underline }} 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. autofunction:: {{ fullname }} 8 | -------------------------------------------------------------------------------- /docs/_doc_templates/method.rst: -------------------------------------------------------------------------------- 1 | {{ fullname }} 2 | {{ underline }} 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: {{ fullname }} 8 | -------------------------------------------------------------------------------- /docs/_panels_static/panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css: -------------------------------------------------------------------------------- 1 | details.dropdown .summary-title{padding-right:3em !important;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}details.dropdown:hover{cursor:pointer}details.dropdown .summary-content{cursor:default}details.dropdown summary{list-style:none;padding:1em}details.dropdown summary .octicon.no-title{vertical-align:middle}details.dropdown[open] summary .octicon.no-title{visibility:hidden}details.dropdown summary::-webkit-details-marker{display:none}details.dropdown summary:focus{outline:none}details.dropdown summary:hover .summary-up svg,details.dropdown summary:hover .summary-down svg{opacity:1}details.dropdown .summary-up svg,details.dropdown .summary-down svg{display:block;opacity:.6}details.dropdown .summary-up,details.dropdown .summary-down{pointer-events:none;position:absolute;right:1em;top:.75em}details.dropdown[open] .summary-down{visibility:hidden}details.dropdown:not([open]) .summary-up{visibility:hidden}details.dropdown.fade-in[open] summary~*{-moz-animation:panels-fade-in .5s ease-in-out;-webkit-animation:panels-fade-in .5s ease-in-out;animation:panels-fade-in .5s ease-in-out}details.dropdown.fade-in-slide-down[open] summary~*{-moz-animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out;-webkit-animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out;animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out}@keyframes panels-fade-in{0%{opacity:0}100%{opacity:1}}@keyframes panels-slide-down{0%{transform:translate(0, -10px)}100%{transform:translate(0, 0)}}.octicon{display:inline-block;fill:currentColor;vertical-align:text-top}.tabbed-content{box-shadow:0 -.0625rem var(--tabs-color-overline),0 .0625rem var(--tabs-color-underline);display:none;order:99;padding-bottom:.75rem;padding-top:.75rem;width:100%}.tabbed-content>:first-child{margin-top:0 !important}.tabbed-content>:last-child{margin-bottom:0 !important}.tabbed-content>.tabbed-set{margin:0}.tabbed-set{border-radius:.125rem;display:flex;flex-wrap:wrap;margin:1em 0;position:relative}.tabbed-set>input{opacity:0;position:absolute}.tabbed-set>input:checked+label{border-color:var(--tabs-color-label-active);color:var(--tabs-color-label-active)}.tabbed-set>input:checked+label+.tabbed-content{display:block}.tabbed-set>input:focus+label{outline-style:auto}.tabbed-set>input:not(.focus-visible)+label{outline:none;-webkit-tap-highlight-color:transparent}.tabbed-set>label{border-bottom:.125rem solid transparent;color:var(--tabs-color-label-inactive);cursor:pointer;font-size:var(--tabs-size-label);font-weight:700;padding:1em 1.25em .5em;transition:color 250ms;width:auto;z-index:1}html .tabbed-set>label:hover{color:var(--tabs-color-label-active)} 2 | -------------------------------------------------------------------------------- /docs/_panels_static/panels-variables.06eb56fa6e07937060861dad626602ad.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --tabs-color-label-active: hsla(231, 99%, 66%, 1); 3 | --tabs-color-label-inactive: rgba(178, 206, 245, 0.62); 4 | --tabs-color-overline: rgb(207, 236, 238); 5 | --tabs-color-underline: rgb(207, 236, 238); 6 | --tabs-size-label: 1rem; 7 | } -------------------------------------------------------------------------------- /docs/_sources/api/attributes/smartpy.SMART.parameters.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.SMART.parameters 2 | ======================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. autoattribute:: smartpy.SMART.parameters -------------------------------------------------------------------------------- /docs/_sources/api/attributes/smartpy.parameters.Parameters.names.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.parameters.Parameters.names 2 | =================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. autoattribute:: smartpy.parameters.Parameters.names -------------------------------------------------------------------------------- /docs/_sources/api/attributes/smartpy.parameters.Parameters.ranges.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.parameters.Parameters.ranges 2 | ==================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. autoattribute:: smartpy.parameters.Parameters.ranges -------------------------------------------------------------------------------- /docs/_sources/api/attributes/smartpy.parameters.Parameters.values.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.parameters.Parameters.values 2 | ==================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. autoattribute:: smartpy.parameters.Parameters.values -------------------------------------------------------------------------------- /docs/_sources/api/classes/smartpy.SMART.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | SMART 5 | ===== 6 | 7 | .. autoclass:: SMART 8 | 9 | 10 | Methods 11 | ------- 12 | 13 | .. autosummary:: 14 | :nosignatures: 15 | :toctree: ../methods/ 16 | :template: method.rst 17 | 18 | ~smartpy.SMART.simulate 19 | ~smartpy.SMART.write_output_files 20 | ~smartpy.SMART.get_simulation_array 21 | ~smartpy.SMART.get_evaluation_array 22 | 23 | 24 | Attributes 25 | ---------- 26 | 27 | .. autosummary:: 28 | :nosignatures: 29 | :toctree: ../attributes/ 30 | :template: attribute.rst 31 | 32 | ~smartpy.SMART.parameters 33 | -------------------------------------------------------------------------------- /docs/_sources/api/classes/smartpy.montecarlo.Best.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Best 5 | ==== 6 | 7 | .. autoclass:: smartpy.montecarlo.Best 8 | 9 | Methods 10 | ------- 11 | 12 | .. autosummary:: 13 | :nosignatures: 14 | :toctree: ../methods/ 15 | :template: method.rst 16 | 17 | ~smartpy.montecarlo.Best.run 18 | -------------------------------------------------------------------------------- /docs/_sources/api/classes/smartpy.montecarlo.GLUE.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | GLUE 5 | ==== 6 | 7 | .. autoclass:: smartpy.montecarlo.GLUE 8 | 9 | Methods 10 | ------- 11 | 12 | .. autosummary:: 13 | :nosignatures: 14 | :toctree: ../methods/ 15 | :template: method.rst 16 | 17 | ~smartpy.montecarlo.GLUE.run 18 | -------------------------------------------------------------------------------- /docs/_sources/api/classes/smartpy.montecarlo.LHS.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | LHS 5 | === 6 | 7 | .. autoclass:: smartpy.montecarlo.LHS 8 | 9 | Methods 10 | ------- 11 | 12 | .. autosummary:: 13 | :nosignatures: 14 | :toctree: ../methods/ 15 | :template: method.rst 16 | 17 | ~smartpy.montecarlo.LHS.run 18 | -------------------------------------------------------------------------------- /docs/_sources/api/classes/smartpy.montecarlo.Total.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Total 5 | ===== 6 | 7 | .. autoclass:: smartpy.montecarlo.Total 8 | 9 | Methods 10 | ------- 11 | 12 | .. autosummary:: 13 | :nosignatures: 14 | :toctree: ../methods/ 15 | :template: method.rst 16 | 17 | ~smartpy.montecarlo.Total.run 18 | -------------------------------------------------------------------------------- /docs/_sources/api/classes/smartpy.parameters.Parameters.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Parameters 5 | ========== 6 | 7 | .. autoclass:: smartpy.parameters.Parameters 8 | 9 | Methods 10 | ------- 11 | 12 | .. autosummary:: 13 | :nosignatures: 14 | :toctree: ../methods/ 15 | :template: method.rst 16 | 17 | ~smartpy.parameters.Parameters.set_parameters_with_file 18 | ~smartpy.parameters.Parameters.set_parameters_with_dict 19 | 20 | 21 | Attributes 22 | ---------- 23 | 24 | .. autosummary:: 25 | :nosignatures: 26 | :toctree: ../attributes/ 27 | :template: attribute.rst 28 | 29 | ~smartpy.parameters.Parameters.names 30 | ~smartpy.parameters.Parameters.ranges 31 | ~smartpy.parameters.Parameters.values 32 | -------------------------------------------------------------------------------- /docs/_sources/api/methods/smartpy.SMART.get_evaluation_array.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.SMART.get_evaluation_array 2 | ================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.SMART.get_evaluation_array -------------------------------------------------------------------------------- /docs/_sources/api/methods/smartpy.SMART.get_simulation_array.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.SMART.get_simulation_array 2 | ================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.SMART.get_simulation_array -------------------------------------------------------------------------------- /docs/_sources/api/methods/smartpy.SMART.simulate.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.SMART.simulate 2 | ====================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.SMART.simulate -------------------------------------------------------------------------------- /docs/_sources/api/methods/smartpy.SMART.write_output_files.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.SMART.write_output_files 2 | ================================ 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.SMART.write_output_files -------------------------------------------------------------------------------- /docs/_sources/api/methods/smartpy.montecarlo.Best.run.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.montecarlo.Best.run 2 | =========================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.montecarlo.Best.run -------------------------------------------------------------------------------- /docs/_sources/api/methods/smartpy.montecarlo.GLUE.run.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.montecarlo.GLUE.run 2 | =========================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.montecarlo.GLUE.run -------------------------------------------------------------------------------- /docs/_sources/api/methods/smartpy.montecarlo.LHS.run.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.montecarlo.LHS.run 2 | ========================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.montecarlo.LHS.run -------------------------------------------------------------------------------- /docs/_sources/api/methods/smartpy.montecarlo.Total.run.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.montecarlo.Total.run 2 | ============================ 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.montecarlo.Total.run -------------------------------------------------------------------------------- /docs/_sources/api/methods/smartpy.parameters.Parameters.set_parameters_with_dict.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.parameters.Parameters.set_parameters_with_dict 2 | ====================================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.parameters.Parameters.set_parameters_with_dict -------------------------------------------------------------------------------- /docs/_sources/api/methods/smartpy.parameters.Parameters.set_parameters_with_file.rst.txt: -------------------------------------------------------------------------------- 1 | smartpy.parameters.Parameters.set_parameters_with_file 2 | ====================================================== 3 | 4 | .. currentmodule:: hydroeval 5 | .. default-role:: obj 6 | 7 | .. automethod:: smartpy.parameters.Parameters.set_parameters_with_file -------------------------------------------------------------------------------- /docs/_sources/api_reference.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | API Reference 5 | ============= 6 | 7 | Single experiment 8 | ----------------- 9 | 10 | .. toctree:: 11 | :maxdepth: 1 12 | 13 | api/classes/smartpy.SMART.rst 14 | api/classes/smartpy.parameters.Parameters.rst 15 | 16 | 17 | Monte Carlo experiment 18 | ---------------------- 19 | 20 | Sampling 21 | ~~~~~~~~ 22 | 23 | .. toctree:: 24 | :maxdepth: 1 25 | 26 | api/classes/smartpy.montecarlo.LHS.rst 27 | 28 | 29 | Conditioning 30 | ~~~~~~~~~~~~ 31 | 32 | .. toctree:: 33 | :maxdepth: 1 34 | 35 | api/classes/smartpy.montecarlo.Best.rst 36 | api/classes/smartpy.montecarlo.GLUE.rst 37 | api/classes/smartpy.montecarlo.Total.rst 38 | 39 | -------------------------------------------------------------------------------- /docs/_sources/changelog.rst.txt: -------------------------------------------------------------------------------- 1 | Change Log 2 | ========== 3 | 4 | .. include:: ../../changelog.rst 5 | -------------------------------------------------------------------------------- /docs/_sources/citation.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Citation 5 | ======== 6 | 7 | Software 8 | -------- 9 | 10 | If you are using `smartpy`, please consider citing the software as follows 11 | (click on the link to get the DOI of a specific version and year): 12 | 13 | .. pull-quote:: 14 | 15 | Hallouin, T., Mockler, E., Bruen, M. (XXXX). 16 | SMARTpy: An implementation if the rainfall-runoff model in Python (Version X.X.X). 17 | *Zenodo*. 18 | ``_ 19 | 20 | 21 | Model 22 | ----- 23 | 24 | If you are using `smartpy`, please consider citing the original model 25 | description article: 26 | 27 | .. pull-quote:: 28 | 29 | Mockler, E., O’Loughlin, F., and Bruen, M. (2016). 30 | Understanding hydrological flow paths in conceptual catchment models 31 | using uncertainty and sensitivity analysis. 32 | *Computers & Geosciences*, 90, 66–77. 33 | ``_ 34 | -------------------------------------------------------------------------------- /docs/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | .. include:: ../../README.rst 5 | 6 | Documentation 7 | ------------- 8 | 9 | .. panels:: 10 | :card: + intro-card text-center 11 | :column: col-lg-4 col-md-4 col-sm-6 col-xs-12 p-2 12 | 13 | Learn how to get `smartpy`. 14 | 15 | +++ 16 | 17 | .. link-button:: installation 18 | :type: ref 19 | :text: Installation 20 | :classes: btn-outline-primary btn-block stretched-link 21 | 22 | --- 23 | 24 | Learn how to use `smartpy`. 25 | 26 | +++ 27 | 28 | .. link-button:: tutorial 29 | :type: ref 30 | :text: Tutorial 31 | :classes: btn-outline-primary btn-block stretched-link 32 | 33 | --- 34 | 35 | Learn more about SMART. 36 | 37 | +++ 38 | 39 | .. link-button:: model_description 40 | :type: ref 41 | :text: Model Description 42 | :classes: btn-outline-primary btn-block stretched-link 43 | 44 | 45 | 46 | Acknowledgment 47 | -------------- 48 | 49 | This model implementation was initially developed with the financial support of 50 | Ireland's Environmental Protection Agency (Grant Number 2014-W-LS-5). 51 | 52 | .. toctree:: 53 | :hidden: 54 | :maxdepth: 1 55 | 56 | installation 57 | tutorial 58 | api_reference 59 | model_description 60 | citation 61 | support 62 | changelog 63 | licence 64 | -------------------------------------------------------------------------------- /docs/_sources/installation.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Installation 5 | ============ 6 | 7 | If you wish to install the most recent stable version of `smartpy`, 8 | it is available on the Python Package Index (PyPI), simply run: 9 | 10 | .. code-block:: bash 11 | 12 | pip install smartpy 13 | 14 | If you need the latest, potentially unstable, features listed in the 15 | :doc:`change log `, please use the *dev* branch on the 16 | GitHub repository: 17 | 18 | .. code-block:: bash 19 | 20 | pip install git+https://github.com/ThibHlln/smartpy.git@dev 21 | 22 | 23 | .. rubric:: Requirements 24 | 25 | The following packages are required to use `smartpy`: 26 | 27 | .. literalinclude:: ../../requirements.txt 28 | :language: none 29 | 30 | .. rubric:: Optional dependency for input/output 31 | 32 | `smartpy` is designed to read/write CSV (Comma-Separated Values) files 33 | and NetCDF (Network Common Data Form) input/output files. However, only 34 | CSV files can natively be read/written in Python. 35 | 36 | To read/write NetCDF files, the `netCDF4` python package is required (specific 37 | pre-requisites prior the installation of `netCDF4` exist and can be found 38 | at ``_). 39 | 40 | .. rubric:: Optional dependencies for Monte Carlo experiments 41 | 42 | The module `smartpy.montecarlo` requires the `spotpy` Python package 43 | to perform the sampling required for Monte Carlo experiments 44 | (``_). 45 | 46 | In addition, if this sampling is to be done in parallel, the `mpi4py` 47 | Python package is also required (``_) 48 | 49 | .. rubric:: Optional dependency for performance improvement 50 | 51 | `smartpy` features a separate accelerator extension written in C++, 52 | `smartcpp` (``_) that will be 53 | automatically used if it is installed alongside `smartpy`. Using 54 | `smartcpp` can significantly improve the execution time. 55 | -------------------------------------------------------------------------------- /docs/_sources/licence.rst.txt: -------------------------------------------------------------------------------- 1 | Licence 2 | ======= 3 | 4 | .. include:: ../../LICENCE.rst 5 | -------------------------------------------------------------------------------- /docs/_sources/support.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Support 5 | ======= 6 | 7 | Support for users is available through `GitHub Discussions 8 | `_. Use this support 9 | page to find answers to previously asked questions, to ask questions 10 | of your own, and to suggest ideas to improve `smartpy`. 11 | 12 | To report bugs, please use `GitHub Issues `_. 13 | -------------------------------------------------------------------------------- /docs/_sources/tutorial.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Tutorial 5 | ======== 6 | 7 | This tutorial showcases an example of the use of the API of `smartpy` for 8 | running a :doc:`single experiment ` (i.e. one 9 | simulation with one parameter set) and a :doc:`Monte Carlo experiment 10 | ` (i.e. several simulations with a 11 | sample of parameter sets): 12 | 13 | .. toctree:: 14 | :maxdepth: 1 15 | 16 | tutorial/single_experiment 17 | tutorial/montecarlo_experiment 18 | 19 | It uses the input files available in the folder *examples/in/ExampleDaily*. 20 | The output files that should be generated following this tutorial are made 21 | available for comparison purposes in *examples/out/ExampleDaily*. Although, 22 | given the stochastic nature of the Monte Carlo experiment, do not expect 23 | the exact same outputs. 24 | -------------------------------------------------------------------------------- /docs/_sources/tutorial/montecarlo_experiment.rst.txt: -------------------------------------------------------------------------------- 1 | .. currentmodule:: smartpy 2 | .. default-role:: obj 3 | 4 | Monte Carlo experiment 5 | ====================== 6 | 7 | The Monte Carlo experiment presented here consists of two steps: first the 8 | :ref:`sampling ` in the SMART model parameter space, then the 9 | :ref:`conditioning ` of the sample to select those parameter 10 | sets deemed as satisfactorily reproducing the observed river discharge. 11 | 12 | In `smartpy`, the sampling generates at random a number of parameter sets 13 | that are used to run the SMART model on a given simulation period (the 14 | "calibration" period). The performance of the SMART model structure with 15 | each parameter set is assessed using one or more objective functions. 16 | These objective function values (and optionally the corresponding 17 | streamflow simulations) correspond to the sampling output. 18 | 19 | Then, in `smartpy`, the conditioning selects a subset of parameter sets 20 | from the sampling based on their objective functions values. This subset 21 | of parameter sets is then used to run the SMART model on another given 22 | simulation period (the "evaluation" period, necessarily independent from 23 | the sampling period). The performance of the SMART model with this subset 24 | of parameter sets is then assessed again using one or more objective 25 | functions (not necessarily the same ones as for the conditioning). These 26 | objective function values (and optionally the corresponding streamflow 27 | simulations) correspond to the conditioning output. 28 | 29 | .. _sampling: 30 | 31 | Sampling 32 | -------- 33 | 34 | `smartpy` only offers a Latin Hypercube approach (`McKay et al., 2000 35 | `_) for sampling the SMART 36 | model parameter space. 37 | 38 | Setting up 39 | '''''''''' 40 | 41 | The configuration of the sampling is done as follows: 42 | 43 | .. code-block:: python 44 | 45 | from smartpy import montecarlo 46 | 47 | lhs = montecarlo.LHS( 48 | catchment='ExampleDaily', 49 | root_f='examples/', 50 | in_format='csv, 51 | out_format='csv, 52 | sample_size=10, 53 | parallel=False, 54 | save_sim=True, 55 | settings_filename='ExampleDaily.sttngs' 56 | ) 57 | 58 | .. seealso:: `smartpy.montecarlo.LHS` 59 | 60 | .. note:: 61 | 62 | The configuration of the SMART model itself, unlike for the single 63 | experiment, is done through a settings file. An example of such a 64 | settings file is available as a template in the *examples/* directory. 65 | 66 | Adjusting the parameter space 67 | ````````````````````````````` 68 | 69 | The default model parameter ranges used to define the boundaries of the 70 | Latin hypercube are accessible as follows: 71 | 72 | .. code-block:: python 73 | 74 | >>> print(lhs.model.parameters.ranges) 75 | {'T': (0.9, 1.1), 'C': (0.0, 1.0), 'H': (0.0, 0.3), 'D': (0.0, 1.0), 'S': (0.0, 0.013), 'Z': (15.0, 150.0), 'SK': (1.0, 240.0), 'FK': (48.0, 1440.0), 'GK': (1200.0, 4800.0), 'RK': (1.0, 96.0)} 76 | 77 | And they can be adjusted by assigning a new dictionary to this attribute: 78 | 79 | .. code-block:: python 80 | 81 | lhs.parameter.ranges = { 82 | 'T': (0.9, 1.1), 83 | 'C': (0.0, 1.0), 84 | 'H': (0.0, 0.3), 85 | 'D': (0.0, 1.0), 86 | 'S': (0.0, 0.013), 87 | 'Z': (15.0, 150.0), 88 | 'SK': (1.0, 240.0), 89 | 'FK': (48.0, 1440.0), 90 | 'GK': (1200.0, 4800.0), 91 | 'RK': (1.0, 96.0) 92 | } 93 | 94 | 95 | Defining the initial conditions 96 | ``````````````````````````````` 97 | 98 | Like in the single experiment example, the "educated guess" approach can be 99 | used as follows: 100 | 101 | .. code-block:: python 102 | 103 | lhs.model.extra = { 104 | 'aar': 1200, 105 | 'r-o_ratio': 0.45, 106 | 'r-o_split': (0.10, 0.15, 0.15, 0.30, 0.30) 107 | } 108 | 109 | 110 | Also, a warm up period can be chosen in the settings file where the model 111 | is configured. 112 | 113 | Simulating 114 | '''''''''' 115 | 116 | Simulating in serial 117 | ```````````````````` 118 | 119 | Running the sampling in the parameter space sequentially (i.e. simulating 120 | with one parameter set at a time using one process) can be done as follows: 121 | 122 | .. code-block:: python 123 | 124 | lhs.run(compression=False) 125 | 126 | 127 | .. seealso:: `smartpy.montecarlo.LHS.run` 128 | 129 | Simulating in parallel 130 | `````````````````````` 131 | 132 | To start the sampling in parallel (i.e. simulating with multiple parameter 133 | sets at a time using multiple processes, the parameter *parallel* must be 134 | set as `True` in the set up step above, and all the steps presented above 135 | (including the `lhs.run(...)`) must be saved in a Python script, say 136 | *lhs_sampling.py*. Then, this script must be executed via a `mpirun` 137 | command as follows (e.g. using 4 processors to initialise 4 processes): 138 | 139 | .. code-block:: bash 140 | 141 | mpirun -np 4 python lhs_sampling.py 142 | 143 | Outputs 144 | ``````` 145 | 146 | The sampling performed above will have produced an output file 147 | *{root_f}/out/{catchment}.SMART.lhs* (if `'csv'` was chosen as the output 148 | format or *{root_f}/out/{catchment}.SMART.lhs.nc* (if `'netcdf'` was 149 | chosen as the output format). 150 | 151 | .. _conditioning: 152 | 153 | Conditioning 154 | ------------ 155 | 156 | .. warning:: 157 | 158 | A sampling output file is required to perform the conditioning step. 159 | 160 | `smartpy` offers three conditioning approaches which differ in the way 161 | the parameter sets are elicited as satisfactory: 162 | 163 | - `GLUE` is based on the selection of one or more objective functions 164 | and the a priori definition of conditions (i.e. thresholds) to achieve 165 | with the model simulation on each objective function to deem the 166 | parameter set as "behavioural"; 167 | - `Best` is based on the selection of one target objective function 168 | and the a priori choice of the number of "best" performing parameter 169 | sets to retain; 170 | - `Total` is not a conditioning approach per se, as it retains all 171 | parameter sets for the simulation on the "evaluation" period. This is 172 | provided as a convenient way to offer to the user the opportunity 173 | to perform their own conditioning approach a posteriori using the 174 | streamflow simulations on the "calibration" and the "evaluation" periods 175 | obtained from the sampling and conditioning steps, respectively. 176 | 177 | .. seealso:: `smartpy.montecarlo.GLUE`, `smartpy.montecarlo.Best`, 178 | `smartpy.montecarlo.Total` 179 | 180 | The remainder of this tutorial is based on the `Best` approach. 181 | 182 | Setting up 183 | '''''''''' 184 | 185 | The configuration of the conditioning is done as follows: 186 | 187 | .. code-block:: python 188 | 189 | from smartpy import montecarlo 190 | 191 | montecarlo.Best( 192 | catchment='ExampleDaily', 193 | root_f='examples/', 194 | in_format='csv', 195 | out_format='csv', 196 | target='KGE, 197 | nb_best='2', 198 | parallel=False, 199 | save_sim=True 200 | ) 201 | 202 | For example, here the two best performing parameter sets amongst the 203 | ten sets sampled are selected based on their Kling-Gupta Efficiency (KGE) 204 | values. 205 | 206 | .. important:: 207 | 208 | The *catchment* and *root_f* must be the same between the sampling 209 | and the conditioning steps. In addition, the *out_format* of the 210 | sampling step must be the sme as the *in_format* of the conditioning 211 | step. 212 | 213 | Defining the initial conditions 214 | ``````````````````````````````` 215 | 216 | The initial conditions can be defined the same way they are in the 217 | sampling step above. 218 | 219 | Simulating 220 | '''''''''' 221 | 222 | The simulations can be performed the same way they are in the sampling 223 | step above. 224 | 225 | Outputs 226 | ``````` 227 | 228 | The conditioning performed above will have produced an output file 229 | *{root_f}/out/{catchment}.SMART.best* (if `'csv'` was chosen as the output 230 | format or *{root_f}/out/{catchment}.SMART.best.nc* (if `'netcdf'` was 231 | chosen as the output format). 232 | -------------------------------------------------------------------------------- /docs/_static/css/theme.css: -------------------------------------------------------------------------------- 1 | :root { 2 | /***************************************************************************** 3 | * Theme config 4 | **/ 5 | --pst-header-height: 60px; 6 | 7 | /***************************************************************************** 8 | * Font size 9 | **/ 10 | --pst-font-size-base: 15px; /* base font size - applied at body / html level */ 11 | 12 | /* heading font sizes */ 13 | --pst-font-size-h1: 36px; 14 | --pst-font-size-h2: 32px; 15 | --pst-font-size-h3: 26px; 16 | --pst-font-size-h4: 21px; 17 | --pst-font-size-h5: 18px; 18 | --pst-font-size-h6: 16px; 19 | 20 | /* smaller then heading font sizes*/ 21 | --pst-font-size-milli: 12px; 22 | 23 | --pst-sidebar-font-size: .9em; 24 | --pst-sidebar-caption-font-size: .9em; 25 | 26 | /***************************************************************************** 27 | * Font family 28 | **/ 29 | /* These are adapted from https://systemfontstack.com/ */ 30 | --pst-font-family-base-system: -apple-system, BlinkMacSystemFont, Segoe UI, "Helvetica Neue", 31 | Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; 32 | --pst-font-family-monospace-system: "SFMono-Regular", Menlo, Consolas, Monaco, 33 | Liberation Mono, Lucida Console, monospace; 34 | 35 | --pst-font-family-base: var(--pst-font-family-base-system); 36 | --pst-font-family-heading: var(--pst-font-family-base); 37 | --pst-font-family-monospace: var(--pst-font-family-monospace-system); 38 | 39 | /***************************************************************************** 40 | * Color 41 | * 42 | * Colors are defined in rgb string way, "red, green, blue" 43 | **/ 44 | --pst-color-primary: 19, 6, 84; 45 | --pst-color-success: 40, 167, 69; 46 | --pst-color-info: 0, 123, 255; /*23, 162, 184;*/ 47 | --pst-color-warning: 255, 193, 7; 48 | --pst-color-danger: 220, 53, 69; 49 | --pst-color-text-base: 51, 51, 51; 50 | 51 | --pst-color-h1: var(--pst-color-primary); 52 | --pst-color-h2: var(--pst-color-primary); 53 | --pst-color-h3: var(--pst-color-text-base); 54 | --pst-color-h4: var(--pst-color-text-base); 55 | --pst-color-h5: var(--pst-color-text-base); 56 | --pst-color-h6: var(--pst-color-text-base); 57 | --pst-color-paragraph: var(--pst-color-text-base); 58 | --pst-color-link: 0, 91, 129; 59 | --pst-color-link-hover: 227, 46, 0; 60 | --pst-color-headerlink: 198, 15, 15; 61 | --pst-color-headerlink-hover: 255, 255, 255; 62 | --pst-color-preformatted-text: 34, 34, 34; 63 | --pst-color-preformatted-background: 250, 250, 250; 64 | --pst-color-inline-code: 232, 62, 140; 65 | 66 | --pst-color-active-navigation: 19, 6, 84; 67 | --pst-color-navbar-link: 77, 77, 77; 68 | --pst-color-navbar-link-hover: var(--pst-color-active-navigation); 69 | --pst-color-navbar-link-active: var(--pst-color-active-navigation); 70 | --pst-color-sidebar-link: 77, 77, 77; 71 | --pst-color-sidebar-link-hover: var(--pst-color-active-navigation); 72 | --pst-color-sidebar-link-active: var(--pst-color-active-navigation); 73 | --pst-color-sidebar-expander-background-hover: 244, 244, 244; 74 | --pst-color-sidebar-caption: 77, 77, 77; 75 | --pst-color-toc-link: 119, 117, 122; 76 | --pst-color-toc-link-hover: var(--pst-color-active-navigation); 77 | --pst-color-toc-link-active: var(--pst-color-active-navigation); 78 | 79 | /***************************************************************************** 80 | * Icon 81 | **/ 82 | 83 | /* font awesome icons*/ 84 | --pst-icon-check-circle: '\f058'; 85 | --pst-icon-info-circle: '\f05a'; 86 | --pst-icon-exclamation-triangle: '\f071'; 87 | --pst-icon-exclamation-circle: '\f06a'; 88 | --pst-icon-times-circle: '\f057'; 89 | --pst-icon-lightbulb: '\f0eb'; 90 | 91 | /***************************************************************************** 92 | * Admonitions 93 | **/ 94 | 95 | --pst-color-admonition-default: var(--pst-color-info); 96 | --pst-color-admonition-note: var(--pst-color-info); 97 | --pst-color-admonition-attention: var(--pst-color-warning); 98 | --pst-color-admonition-caution: var(--pst-color-warning); 99 | --pst-color-admonition-warning: var(--pst-color-warning); 100 | --pst-color-admonition-danger: var(--pst-color-danger); 101 | --pst-color-admonition-error: var(--pst-color-danger); 102 | --pst-color-admonition-hint: var(--pst-color-success); 103 | --pst-color-admonition-tip: var(--pst-color-success); 104 | --pst-color-admonition-important: var(--pst-color-success); 105 | 106 | --pst-icon-admonition-default: var(--pst-icon-info-circle); 107 | --pst-icon-admonition-note: var(--pst-icon-info-circle); 108 | --pst-icon-admonition-attention: var(--pst-icon-exclamation-circle); 109 | --pst-icon-admonition-caution: var(--pst-icon-exclamation-triangle); 110 | --pst-icon-admonition-warning: var(--pst-icon-exclamation-triangle); 111 | --pst-icon-admonition-danger: var(--pst-icon-exclamation-triangle); 112 | --pst-icon-admonition-error: var(--pst-icon-times-circle); 113 | --pst-icon-admonition-hint: var(--pst-icon-lightbulb); 114 | --pst-icon-admonition-tip: var(--pst-icon-lightbulb); 115 | --pst-icon-admonition-important: var(--pst-icon-exclamation-circle); 116 | 117 | } 118 | -------------------------------------------------------------------------------- /docs/_static/custom.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;1,400;1,600&display=swap"); 2 | @import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&display=swap"); 3 | 4 | /* blue: #00b0f0 (0, 176, 240) */ 5 | /* green: #92d050 (146, 208, 80) */ 6 | /* brown: #ab7942 (171, 121, 66) */ 7 | :root { 8 | --pst-font-size-h1: 30px; 9 | --pst-font-size-h2: 26px; 10 | --pst-font-size-h3: 22px; 11 | --pst-font-size-h4: 20px; 12 | --pst-font-size-h5: 18px; 13 | --pst-font-size-h6: 16px; 14 | 15 | --pst-color-primary: 77, 77, 77; 16 | --pst-color-success: 146, 208, 80; 17 | --pst-color-info: 0, 176, 240; 18 | --pst-color-warning: 171, 121, 66; 19 | --pst-color-danger: 220, 53, 69; 20 | 21 | --pst-color-text-base: 77, 77, 77; 22 | 23 | --pst-color-active-navigation: 0, 176, 240; 24 | 25 | --pst-color-link: 0, 176, 240; 26 | --pst-color-link-hover: 0, 176, 240; 27 | 28 | --pst-color-preformatted-background: 250, 250, 250; 29 | --pst-color-block-code: 51, 51, 51; 30 | --pst-color-inline-code: 0, 0, 0; 31 | 32 | --pst-color-headerlink: var(--pst-color-link); 33 | --pst-color-headerlink-hover: var(--pst-color-link-hover); 34 | 35 | --pst-font-family-base-system: 'Open Sans', sans-serif; 36 | --pst-font-family-monospace-system: 'JetBrains Mono', monospace; 37 | --pst-font-family-monospace: var(--pst-font-family-monospace-system); 38 | } 39 | 40 | /* override style for code blocks */ 41 | pre { 42 | border: 1px solid rgba(var(--pst-color-preformatted-background),1); /* e1e4e5 */ 43 | font-family: var(--pst-font-family-monospace-system); 44 | border-radius: 4px; 45 | box-shadow: none; 46 | } 47 | 48 | /* override style for class and attributes */ 49 | .sig { 50 | font-family: var(--pst-font-family-monospace-system); 51 | font-weight: 300; 52 | } 53 | 54 | .sig-paren { 55 | font-family: var(--pst-font-family-monospace-system); 56 | font-size: 100%; 57 | } 58 | 59 | .sig-param { 60 | font-family: var(--pst-font-family-monospace-system); 61 | font-style: italic; 62 | font-weight: 300; 63 | font-size: 100%; 64 | } 65 | 66 | em.property{ 67 | font-family: var(--pst-font-family-monospace-system); 68 | font-size: 100%; 69 | padding-right: 6px; 70 | } 71 | 72 | code { 73 | font-family: var(--pst-font-family-monospace-system); 74 | } 75 | 76 | code.descclassname { 77 | font-weight: 300; 78 | font-size: 100%; 79 | } 80 | 81 | code.descname { 82 | font-weight: 600; 83 | font-size: 100%; 84 | } 85 | 86 | .text-monospace { 87 | font-family: var(--pst-font-family-monospace-system); 88 | } 89 | 90 | /* override style for images */ 91 | img { 92 | margin-bottom: 10px; 93 | } 94 | 95 | /* override style for RST directive "contents" */ 96 | div.topic { 97 | background-color: transparent; 98 | border: hidden; 99 | } 100 | 101 | /* override style for permalink */ 102 | a.headerlink{ 103 | color:rgba(var(--pst-color-text-base),1); 104 | text-align: center; 105 | padding-left: 10px; 106 | font-size: 14px; 107 | border-bottom: hidden; 108 | } 109 | a.headerlink:hover{ 110 | background-color: transparent; 111 | color:rgba(var(--pst-color-headerlink-hover),1); 112 | border-bottom: hidden; 113 | } 114 | 115 | /* override style for hyperlinks in paragraphs */ 116 | a { 117 | color: rgba(var(--pst-color-text-base),1); 118 | border-bottom: 1px dotted; 119 | } 120 | 121 | a:hover { 122 | text-decoration: none; /* to remove text-decoration: underline */ 123 | border-bottom: 1px solid; 124 | } 125 | 126 | nav a, nav a:hover, 127 | .figure a, .figure a:hover, 128 | a.image-reference, a.image-reference:hover { 129 | border-bottom: hidden 130 | } 131 | 132 | p a, .code-block-caption a code.literal { 133 | color: rgba(var(--pst-color-text-base),1); 134 | border-bottom: 1px dotted; 135 | } 136 | 137 | p a:hover, .code-block-caption a:hover code.literal { 138 | text-decoration: none; 139 | color: rgba(var(--pst-color-link-hover),1); 140 | border-bottom: 1px solid; 141 | } 142 | 143 | /* override style for inline code */ 144 | code.literal{ 145 | font-size: 95%; 146 | font-weight: normal; 147 | color: rgba(var(--pst-color-inline-code),1); 148 | } 149 | a code.literal{ 150 | font-size: 95%; 151 | font-weight: normal; 152 | color: rgba(var(--pst-color-inline-code),1); 153 | } 154 | a:hover code.literal{ 155 | font-size: 95%; 156 | font-weight: normal; 157 | color: rgba(var(--pst-color-link-hover),1); 158 | } 159 | 160 | /* override style for tables */ 161 | table { 162 | margin-top: 10px; 163 | } 164 | 165 | /* */ 166 | dt:target, span.highlighted { 167 | background-color: rgba(var(--pst-color-link-hover), 0.3); 168 | } 169 | 170 | rect.highlighted { 171 | fill: rgba(var(--pst-color-link-hover), 0.3); 172 | } 173 | 174 | /* override style for sphinx-panels */ 175 | .btn-outline-primary { 176 | color: rgba(var(--pst-color-link),1); 177 | border-color: rgba(var(--pst-color-link),1); 178 | } 179 | 180 | .btn-outline-primary:hover { 181 | color: white; 182 | border-color: rgba(var(--pst-color-link-hover),1); 183 | background-color: rgba(var(--pst-color-link-hover),1); 184 | } 185 | 186 | /* override style for block-quotes */ 187 | blockquote { 188 | padding: 0 1em; 189 | color: #6a737d; 190 | border-left: .25em solid #dfe2e5; 191 | } 192 | -------------------------------------------------------------------------------- /docs/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: 'v0.2.2', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: true 12 | }; -------------------------------------------------------------------------------- /docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/file.png -------------------------------------------------------------------------------- /docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/minus.png -------------------------------------------------------------------------------- /docs/_static/panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css: -------------------------------------------------------------------------------- 1 | details.dropdown .summary-title{padding-right:3em !important;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}details.dropdown:hover{cursor:pointer}details.dropdown .summary-content{cursor:default}details.dropdown summary{list-style:none;padding:1em}details.dropdown summary .octicon.no-title{vertical-align:middle}details.dropdown[open] summary .octicon.no-title{visibility:hidden}details.dropdown summary::-webkit-details-marker{display:none}details.dropdown summary:focus{outline:none}details.dropdown summary:hover .summary-up svg,details.dropdown summary:hover .summary-down svg{opacity:1}details.dropdown .summary-up svg,details.dropdown .summary-down svg{display:block;opacity:.6}details.dropdown .summary-up,details.dropdown .summary-down{pointer-events:none;position:absolute;right:1em;top:.75em}details.dropdown[open] .summary-down{visibility:hidden}details.dropdown:not([open]) .summary-up{visibility:hidden}details.dropdown.fade-in[open] summary~*{-moz-animation:panels-fade-in .5s ease-in-out;-webkit-animation:panels-fade-in .5s ease-in-out;animation:panels-fade-in .5s ease-in-out}details.dropdown.fade-in-slide-down[open] summary~*{-moz-animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out;-webkit-animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out;animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out}@keyframes panels-fade-in{0%{opacity:0}100%{opacity:1}}@keyframes panels-slide-down{0%{transform:translate(0, -10px)}100%{transform:translate(0, 0)}}.octicon{display:inline-block;fill:currentColor;vertical-align:text-top}.tabbed-content{box-shadow:0 -.0625rem var(--tabs-color-overline),0 .0625rem var(--tabs-color-underline);display:none;order:99;padding-bottom:.75rem;padding-top:.75rem;width:100%}.tabbed-content>:first-child{margin-top:0 !important}.tabbed-content>:last-child{margin-bottom:0 !important}.tabbed-content>.tabbed-set{margin:0}.tabbed-set{border-radius:.125rem;display:flex;flex-wrap:wrap;margin:1em 0;position:relative}.tabbed-set>input{opacity:0;position:absolute}.tabbed-set>input:checked+label{border-color:var(--tabs-color-label-active);color:var(--tabs-color-label-active)}.tabbed-set>input:checked+label+.tabbed-content{display:block}.tabbed-set>input:focus+label{outline-style:auto}.tabbed-set>input:not(.focus-visible)+label{outline:none;-webkit-tap-highlight-color:transparent}.tabbed-set>label{border-bottom:.125rem solid transparent;color:var(--tabs-color-label-inactive);cursor:pointer;font-size:var(--tabs-size-label);font-weight:700;padding:1em 1.25em .5em;transition:color 250ms;width:auto;z-index:1}html .tabbed-set>label:hover{color:var(--tabs-color-label-active)} 2 | -------------------------------------------------------------------------------- /docs/_static/panels-variables.06eb56fa6e07937060861dad626602ad.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --tabs-color-label-active: hsla(231, 99%, 66%, 1); 3 | --tabs-color-label-inactive: rgba(178, 206, 245, 0.62); 4 | --tabs-color-overline: rgb(207, 236, 238); 5 | --tabs-color-underline: rgb(207, 236, 238); 6 | --tabs-size-label: 1rem; 7 | } -------------------------------------------------------------------------------- /docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/plus.png -------------------------------------------------------------------------------- /docs/_static/pygments.css: -------------------------------------------------------------------------------- 1 | /*.highlight .hll { background-color: #FFFFCC }*/ 2 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 3 | 4 | .highlight .l { color: rgba(var(--pst-color-block-code),1) } /* Literal */ 5 | 6 | .highlight .p { color: rgba(var(--pst-color-block-code),1) } /* Punctuation */ 7 | /*.highlight .w { color: # } /* Text.Whitespace */ 8 | 9 | .highlight .o { color: rgba(var(--pst-color-block-code),1) } /* Operator */ 10 | .highlight .ow { color: rgba(var(--pst-color-block-code),1) } /* Operator.Word */ 11 | 12 | .highlight .c { color: #969896 } /* Comment */ 13 | .highlight .cm { color: #969896 } /* Comment.Multiline */ 14 | .highlight .cp { color: #969896 } /* Comment.Preproc */ 15 | .highlight .c1 { color: #969896 } /* Comment.Single */ 16 | .highlight .cs { color: #969896 } /* Comment.Special */ 17 | 18 | /*.highlight .gd { color: # } /* Generic.Deleted */ 19 | /*.highlight .ge { font-style: italic } /* Generic.Emph */ 20 | .highlight .gr { color: #969896 } /* Generic.Error */ 21 | /*.highlight .gh { color: #; font-weight: bold } /* Generic.Heading */ 22 | /*.highlight .gi { color: # } /* Generic.Inserted */ 23 | .highlight .go { color: #969896 } /* Generic.Output */ 24 | .highlight .gp { color: #A71D5D } /* Generic.Prompt */ 25 | /*.highlight .gs { font-weight: bold } /* Generic.Strong */ 26 | /*.highlight .gu { color: #; font-weight: bold } /* Generic.Subheading */ 27 | .highlight .gt { color: #969896 } /* Generic.Traceback */ 28 | 29 | .highlight .k { color: #A71D5D } /* Keyword */ 30 | .highlight .kc { color: #A71D5D } /* Keyword.Constant */ 31 | .highlight .kd { color: #A71D5D } /* Keyword.Declaration */ 32 | .highlight .kn { color: #A71D5D } /* Keyword.Namespace */ 33 | .highlight .kp { color: #A71D5D } /* Keyword.Pseudo */ 34 | .highlight .kr { color: #A71D5D } /* Keyword.Reserved */ 35 | .highlight .kt { color: #0086B3 } /* Keyword.Type */ 36 | 37 | .highlight .n { color: #333333 } /* Name */ 38 | .highlight .na { color: #333333 } /* Name.Attribute */ 39 | .highlight .nb { color: #0086B3 } /* Name.Builtin */ 40 | .highlight .nc { color: #333333 } /* Name.Class */ 41 | .highlight .no { color: #0086B3 } /* Name.Constant */ 42 | .highlight .nd { color: #795DA3 } /* Name.Decorator */ 43 | /*.highlight .ni { color: #; font-weight: bold } /* Name.Entity */ 44 | .highlight .ne { color: #0086B3 } /* Name.Exception */ 45 | .highlight .nf { color: #795DA3 } /* Name.Function */ 46 | /*.highlight .nl { color: # } /* Name.Label */ 47 | .highlight .nn { color: rgba(var(--pst-color-block-code),1) } /* Name.Namespace */ 48 | .highlight .nt { color: #A71D5D } /* Name.Tag */ 49 | .highlight .nv { color: rgba(var(--pst-color-block-code),1) } /* Name.Variable */ 50 | 51 | .highlight .m { color: #0086B3 } /* Literal.Number */ 52 | .highlight .mf { color: #0086B3 } /* Literal.Number.Float */ 53 | .highlight .mh { color: #0086B3 } /* Literal.Number.Hex */ 54 | .highlight .mi { color: #0086B3 } /* Literal.Number.Integer */ 55 | .highlight .mo { color: #0086B3 } /* Literal.Number.Oct */ 56 | 57 | .highlight .s { color: #183691 } /* Literal.String */ 58 | .highlight .sb { color: #183691 } /* Literal.String.Backtick */ 59 | .highlight .sc { color: #183691 } /* Literal.String.Char */ 60 | .highlight .sd { color: #183691 } /* Literal.String.Doc */ 61 | .highlight .s2 { color: #183691 } /* Literal.String.Double */ 62 | .highlight .se { color: #183691 } /* Literal.String.Escape */ 63 | .highlight .sh { color: #183691 } /* Literal.String.Heredoc */ 64 | .highlight .si { color: #183691 } /* Literal.String.Interpol */ 65 | /*.highlight .sx { color: # } /* Literal.String.Other */ 66 | /*.highlight .sr { color: # } /* Literal.String.Regex */ 67 | .highlight .s1 { color: #183691 } /* Literal.String.Single */ 68 | .highlight .ss { color: #A71D5D } /* Literal.String.Symbol */ 69 | .highlight .bp { color: #94558D } /* Name.Builtin.Pseudo */ 70 | .highlight .vc { color: #A71D5D } /* Name.Variable.Class */ 71 | .highlight .vg { color: #A71D5D } /* Name.Variable.Global */ 72 | .highlight .vi { color: #A71D5D } /* Name.Variable.Instance */ 73 | 74 | .highlight .il { color: #0086B3 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_static/smartpy-favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/smartpy-favicon.ico -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Font Awesome Free License 2 | ------------------------- 3 | 4 | Font Awesome Free is free, open source, and GPL friendly. You can use it for 5 | commercial projects, open source projects, or really almost whatever you want. 6 | Full Font Awesome Free license: https://fontawesome.com/license/free. 7 | 8 | # Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) 9 | In the Font Awesome Free download, the CC BY 4.0 license applies to all icons 10 | packaged as SVG and JS file types. 11 | 12 | # Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL) 13 | In the Font Awesome Free download, the SIL OFL license applies to all icons 14 | packaged as web and desktop font files. 15 | 16 | # Code: MIT License (https://opensource.org/licenses/MIT) 17 | In the Font Awesome Free download, the MIT license applies to all non-font and 18 | non-icon files. 19 | 20 | # Attribution 21 | Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font 22 | Awesome Free files already contain embedded comments with sufficient 23 | attribution, so you shouldn't need to do anything additional when using these 24 | files normally. 25 | 26 | We've kept attribution comments terse, so we ask that you do not actively work 27 | to remove them from files, especially code. They're a great way for folks to 28 | learn about Font Awesome. 29 | 30 | # Brand Icons 31 | All brand icons are trademarks of their respective owners. The use of these 32 | trademarks does not indicate endorsement of the trademark holder by Font 33 | Awesome, nor vice versa. **Please do not use brand logos for any purpose except 34 | to represent the company, product, or service to which they refer.** 35 | -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /docs/_static/webpack-macros.html: -------------------------------------------------------------------------------- 1 | 2 | {% macro head_pre_icons() %} 3 | 5 | 7 | 9 | {% endmacro %} 10 | 11 | {% macro head_pre_fonts() %} 12 | {% endmacro %} 13 | 14 | {% macro head_pre_bootstrap() %} 15 | 16 | 17 | {% endmacro %} 18 | 19 | {% macro head_js_preload() %} 20 | 21 | {% endmacro %} 22 | 23 | {% macro body_post() %} 24 | 25 | {% endmacro %} -------------------------------------------------------------------------------- /docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/docs/objects.inv -------------------------------------------------------------------------------- /docs/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Search — smartpy v0.2.2 documentation 9 | 10 | 11 | 12 | 13 | 14 | 16 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 152 | 153 | 154 |
155 |
156 | 157 | 158 | 159 |
167 |
168 | 169 | 170 | 171 | 172 |
173 | 174 |
175 | 176 | 177 | 178 | 179 | 180 | 181 |
182 | 183 |
184 | 185 |

Search

186 | 187 | 195 | 196 | 197 |

198 | Searching for multiple words only shows matches that contain 199 | all words. 200 |

201 | 202 | 203 |
204 | 205 | 206 | 207 |
208 | 209 | 210 | 211 |
212 | 213 |
214 | 215 | 216 |
217 | 218 | 219 |
220 | 221 | 222 |
223 |
224 | 225 | 226 | 227 |
228 |
229 | 234 | 240 |
241 |
242 | 243 | -------------------------------------------------------------------------------- /docs/support.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Support — smartpy v0.2.2 documentation 9 | 10 | 11 | 12 | 13 | 14 | 16 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 148 | 149 | 150 |
151 |
152 | 153 | 154 | 155 |
163 |
164 | 165 | 166 | 167 | 168 |
169 | 170 | 171 |
172 | 173 | 174 | 177 |
178 | 179 |
180 | 181 |
182 | 183 | 184 |
185 | 186 | 187 | 188 | 189 | 190 | 191 |
192 | 193 |
194 | 195 |
196 |

Support

197 |

Support for users is available through GitHub Discussions. Use this support 198 | page to find answers to previously asked questions, to ask questions 199 | of your own, and to suggest ideas to improve smartpy.

200 |

To report bugs, please use GitHub Issues.

201 |
202 | 203 | 204 |
205 | 206 | 207 |
208 | 209 | 210 |
211 |
212 | 213 | 214 | 215 |
216 |
217 | 222 | 228 |
229 |
230 | 231 | -------------------------------------------------------------------------------- /examples/in/ExampleDaily/ExampleDaily.evaluating.sttngs: -------------------------------------------------------------------------------- 1 | ARGUMENT,VALUE 2 | catchment_area_km2,175.45914615286598 3 | gauged_area_km2,175.97 4 | start_datetime,01/01/2013 09:00:00 5 | end_datetime,31/12/2016 09:00:00 6 | simu_timedelta_min,60 7 | report_timedelta_min,1440 8 | warm_up_days,365 9 | gw_constraint,0.126671876263756 10 | -------------------------------------------------------------------------------- /examples/in/ExampleDaily/ExampleDaily.flow.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/examples/in/ExampleDaily/ExampleDaily.flow.nc -------------------------------------------------------------------------------- /examples/in/ExampleDaily/ExampleDaily.parameters: -------------------------------------------------------------------------------- 1 | PAR_NAME,PAR_VALUE 2 | T,1.0 3 | C,1.0 4 | H,0.20845296027652363 5 | D,0.24606006380093334 6 | S,0.00012296588050682812 7 | Z,105.25734595830215 8 | SK,46.81961454361724 9 | FK,315.5490902162102 10 | GK,1066.7332319333473 11 | RK,10.640277777777778 12 | -------------------------------------------------------------------------------- /examples/in/ExampleDaily/ExampleDaily.peva.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/examples/in/ExampleDaily/ExampleDaily.peva.nc -------------------------------------------------------------------------------- /examples/in/ExampleDaily/ExampleDaily.rain.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/examples/in/ExampleDaily/ExampleDaily.rain.nc -------------------------------------------------------------------------------- /examples/in/ExampleDaily/ExampleDaily.sampling.sttngs: -------------------------------------------------------------------------------- 1 | ARGUMENT,VALUE 2 | catchment_area_km2,175.45914615286598 3 | gauged_area_km2,175.97 4 | start_datetime,01/01/2007 09:00:00 5 | end_datetime,31/12/2012 09:00:00 6 | simu_timedelta_min,60 7 | report_timedelta_min,1440 8 | warm_up_days,365 9 | gw_constraint,0.126671876263756 10 | -------------------------------------------------------------------------------- /examples/in/ExampleDaily/ExampleDaily.sttngs: -------------------------------------------------------------------------------- 1 | ARGUMENT,VALUE 2 | catchment_area_km2,175.46 3 | gauged_area_km2,175.97 4 | start_datetime,01/01/2007 09:00:00 5 | end_datetime,31/12/2016 09:00:00 6 | simu_timedelta_min,60 7 | report_timedelta_min,1440 8 | warm_up_days,365 9 | gw_constraint,0.12667 10 | -------------------------------------------------------------------------------- /examples/out/ExampleDaily/ExampleDaily.SMART.lhs: -------------------------------------------------------------------------------- 1 | NSE,lgNSE,rtNSE,C2M,KGE,KGEc,KGEa,KGEb,Bias,PBias,RMSE,Rho,MARE,GW,T,C,H,D,S,Z,SK,FK,GK,RK 2 | 2.07642034e-01,5.52293479e-01,3.90815765e-01,1.15848534e-01,1.53398618e-01,7.65749454e-01,2.91067511e-01,6.00906849e-01,2.16250682e+00,-3.99093170e+01,4.91467953e+00,8.55620980e-01,4.96649444e-01,0.00000000e+00,1.04300117e+00,8.75238419e-01,5.92090450e-02,6.41449869e-01,1.20530576e-02,1.73557205e+01,2.10148026e+02,1.04425757e+03,3.77402222e+03,5.38882332e+01 3 | -1.09902602e-02,3.66533726e-01,1.46088406e-01,-5.46509866e-03,1.19290948e-02,7.14722812e-01,2.22187683e-01,4.61567968e-01,2.91752172e+00,-5.38432045e+01,5.55146980e+00,8.37969720e-01,5.66013694e-01,0.00000000e+00,9.03344274e-01,1.97170526e-01,2.14644626e-01,7.14584708e-01,3.28806369e-03,9.00877686e+01,2.22594986e+02,9.42495911e+02,1.90567505e+03,4.64424133e+01 4 | 1.01234823e-01,4.57018495e-01,2.74808109e-01,5.33161387e-02,7.70643428e-02,7.35088289e-01,2.34705895e-01,5.57329774e-01,2.39863157e+00,-4.42670250e+01,5.23428822e+00,8.28733146e-01,5.36130369e-01,0.00000000e+00,9.95470166e-01,4.78098303e-01,7.62406811e-02,9.26302195e-01,9.29527823e-03,4.15432091e+01,9.54152679e+01,8.23290466e+02,2.91846338e+03,8.90927734e+01 5 | 2.07686815e-02,4.26497757e-01,2.05175772e-01,1.04933064e-02,2.28646565e-02,7.39369810e-01,1.93959981e-01,5.13004243e-01,2.63881159e+00,-4.86995773e+01,5.46357822e+00,8.61453772e-01,5.53926885e-01,0.00000000e+00,9.50577557e-01,2.53956288e-01,1.18762895e-01,2.53404558e-01,1.13758640e-02,6.83673859e+01,1.33885635e+02,5.99710571e+02,3.51020117e+03,1.97666950e+01 6 | 1.59214258e-01,5.82448304e-01,3.64390284e-01,8.64925534e-02,1.16732486e-01,8.10743093e-01,2.76258558e-01,5.30381382e-01,2.54465270e+00,-4.69618645e+01,5.06264162e+00,9.05045331e-01,5.00390649e-01,0.00000000e+00,1.02834451e+00,6.42234862e-01,2.62580514e-01,4.77411896e-01,8.34264327e-03,1.33145554e+02,5.06524944e+00,4.02560150e+02,2.11039648e+03,3.86211700e+01 7 | 6.96284547e-02,4.34105664e-01,2.55149037e-01,3.60699743e-02,4.74769585e-02,6.94547474e-01,2.01090872e-01,5.80782712e-01,2.27155042e+00,-4.19217262e+01,5.32552862e+00,8.23615015e-01,5.42829514e-01,0.00000000e+00,9.78973150e-01,1.81275103e-02,1.43467113e-01,1.96652904e-01,7.22670695e-03,4.92145805e+01,1.71906418e+02,1.33884656e+03,2.62151660e+03,6.89768829e+01 8 | 1.73622385e-01,5.47050655e-01,3.65775913e-01,9.50637907e-02,1.39288664e-01,7.74311185e-01,3.21070045e-01,5.21520436e-01,2.59266615e+00,-4.78479538e+01,5.01907635e+00,8.95072639e-01,4.94597137e-01,0.00000000e+00,1.01117539e+00,5.56511819e-01,1.92696258e-01,8.74313354e-01,5.13367634e-03,1.11554329e+02,1.54396774e+02,7.46193695e+01,1.26019714e+03,6.20281334e+01 9 | 2.69315302e-01,6.18746042e-01,4.62399065e-01,1.55611992e-01,1.75752506e-01,8.72584164e-01,2.87500918e-01,6.05672479e-01,2.13668394e+00,-3.94327545e+01,4.71953821e+00,9.19376373e-01,4.81807858e-01,0.00000000e+00,1.08543086e+00,3.95731091e-01,1.66985527e-01,1.77174788e-02,2.54883128e-03,7.94946365e+01,4.79052582e+01,7.14249451e+02,3.20115625e+03,2.76552534e+00 10 | 1.22914843e-01,3.30839679e-02,1.96008861e-01,6.54817596e-02,9.98602137e-02,8.38074327e-01,3.24638963e-01,4.27357703e-01,3.10289168e+00,-5.72642288e+01,5.17077208e+00,8.63192499e-01,5.74714243e-01,1.00000000e+00,9.39204156e-01,7.15413690e-01,5.50904917e-03,3.95094156e-01,2.18063840e-04,1.01668373e+02,6.14925117e+01,1.26650793e+03,4.35021484e+03,8.41531677e+01 11 | 1.42107800e-01,5.55130064e-01,3.48122925e-01,7.64887184e-02,9.91212577e-02,8.22660029e-01,2.40327343e-01,5.49410939e-01,2.44154000e+00,-4.50589066e+01,5.11388397e+00,9.13801432e-01,5.10560215e-01,0.00000000e+00,1.07501197e+00,9.27258492e-01,2.78182805e-01,5.55778325e-01,6.20592618e-03,1.40173126e+02,1.15123451e+02,3.23594543e+02,4.53775586e+03,2.51588326e+01 12 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | numpy>=1.16 2 | scipy 3 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2018-2022 Thibault Hallouin 2 | from setuptools import setup, find_packages 3 | 4 | 5 | with open("README.rst", "r") as fh: 6 | long_desc = fh.read() 7 | 8 | with open('smartpy/version.py') as fv: 9 | exec(fv.read()) 10 | 11 | 12 | def requirements(filename): 13 | requires = [] 14 | with open(filename, 'r') as fr: 15 | for line in fr: 16 | package = line.strip() 17 | if package: 18 | requires.append(package) 19 | 20 | return requires 21 | 22 | 23 | setup( 24 | name='smartpy', 25 | version=__version__, 26 | description='An implementation of the rainfall-runoff model SMART in Python', 27 | long_description=long_desc, 28 | long_description_content_type="text/x-rst", 29 | download_url="https://pypi.python.org/pypi/smartpy", 30 | project_urls={ 31 | 'Bug Tracker': 'https://github.com/thibhlln/smartpy/issues', 32 | 'User Support': 'https://github.com/thibhlln/smartpy/discussions', 33 | 'Documentation': 'https://thibhlln.github.io/smartpy', 34 | 'Source Code': 'https://github.com/thibhlln/smartpy', 35 | }, 36 | author='Thibault Hallouin, Eva Mockler, and Michael Bruen', 37 | author_email='thibhlln@gmail.com', 38 | license='GPL-3.0', 39 | classifiers=[ 40 | 'Development Status :: 4 - Beta', 41 | 'Natural Language :: English', 42 | 'Intended Audience :: Science/Research', 43 | 'Topic :: Scientific/Engineering :: Hydrology', 44 | 'Operating System :: MacOS', 45 | 'Operating System :: Microsoft :: Windows', 46 | 'Operating System :: POSIX :: Linux', 47 | 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 48 | 'Programming Language :: Python :: 3.7', 49 | 'Programming Language :: Python :: 3.8', 50 | 'Programming Language :: Python :: 3.9', 51 | ], 52 | packages=find_packages(exclude=["docs*"]), 53 | install_requires=requirements('requirements.txt'), 54 | extras_require={ 55 | 'with_netcdf': ['netCDF4'], 56 | 'with_spotpy': ['spotpy>=1.5.14'], 57 | 'with_smartcpp': ['smartcpp'], 58 | 'with_all_extras': ['netCDF4', 'spotpy>=1.5.14', 'smartcpp'] 59 | } 60 | ) 61 | -------------------------------------------------------------------------------- /smartpy/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is part of SMARTpy - An open-source rainfall-runoff model in Python 2 | # Copyright (C) 2018-2022 Thibault Hallouin (1) 3 | # 4 | # (1) Dooge Centre for Water Resources Research, University College Dublin, Ireland 5 | # 6 | # SMARTpy is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # SMARTpy is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with SMARTpy. If not, see . 18 | 19 | from .smart import SMART 20 | from . import objfunctions 21 | from .version import __version__ 22 | -------------------------------------------------------------------------------- /smartpy/montecarlo/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is part of SMARTpy - An open-source rainfall-runoff model in Python 2 | # Copyright (C) 2018-2022 Thibault Hallouin (1) 3 | # 4 | # (1) Dooge Centre for Water Resources Research, University College Dublin, Ireland 5 | # 6 | # SMARTpy is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # SMARTpy is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with SMARTpy. If not, see . 18 | 19 | from .lhs import LHS 20 | from .glue import GLUE 21 | from .best import Best 22 | from .total import Total 23 | -------------------------------------------------------------------------------- /smartpy/montecarlo/lhs.py: -------------------------------------------------------------------------------- 1 | # This file is part of SMARTpy - An open-source rainfall-runoff model in Python 2 | # Copyright (C) 2018-2022 Thibault Hallouin (1) 3 | # 4 | # (1) Dooge Centre for Water Resources Research, University College Dublin, Ireland 5 | # 6 | # SMARTpy is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # SMARTpy is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with SMARTpy. If not, see . 18 | 19 | import numpy as np 20 | from scipy.stats import uniform 21 | from builtins import range 22 | 23 | try: 24 | import spotpy 25 | except ImportError: 26 | raise Exception('montecarlo.lhs requires the package spotpy to be installed.') 27 | 28 | from .montecarlo import MonteCarlo 29 | 30 | 31 | class LHS(MonteCarlo): 32 | """LHS is the available to perform a sampling in the SMART parameter 33 | space using a Latin Hypercube sampling `McKay et al. (2000) 34 | `_. 35 | """ 36 | def __init__(self, catchment, root_f, in_format, out_format, 37 | sample_size, 38 | parallel='seq', save_sim=False, settings_filename=None): 39 | """**Instantiation** 40 | 41 | :Parameters: 42 | 43 | catchment: `str` 44 | A name to identify the catchment of interest in the 45 | inputs and outputs directories. 46 | 47 | root_f: `str` 48 | The file path to the directory containing the model 49 | inputs and outputs. Note that a specific internal 50 | structure for this directory must be followed: 51 | 52 | .. code-block:: text 53 | 54 | root_f 55 | ├── in 56 | │ └── catchment 57 | │ ├── catchment.rain 58 | │ ├── catchment.peva 59 | │ ├── catchment.flow 60 | │ └── catchment.sttngs 61 | └── out 62 | 63 | in_format: `str` 64 | The input file format. It can either be `'csv'` or 65 | `'netcdf'`. Note that in either case, a specific file 66 | format must be followed. 67 | 68 | out_format: `str` 69 | The output file format. It can either be `'csv'` or 70 | `'netcdf'`. 71 | 72 | sample_size: `int` 73 | The number of parameter sets to sample in the Latin Hypercube. 74 | 75 | parallel: `str`, optional 76 | Whether the sampling is to performed in parallel (i.e. 77 | using MPI calls to run several simulations at the same 78 | time), or in serial (i.e. running simulations sequentially 79 | one after another). The options are: 80 | 81 | =============== ======================================= 82 | `'seq'` Run the simulations one after another. 83 | `'mpi'` Run several simulations at the same 84 | time. The number of simultaneous 85 | simulations is determined with the 86 | number of processes using `mpirun -np`. 87 | =============== ======================================= 88 | 89 | If not provided, set to default value `'seq'`. 90 | 91 | save_sim: `bool`, optional 92 | Whether to save the simulated discharge time series. If 93 | not provided, set to default value `False` (i.e. the 94 | simulated values are not recorded). Note that the sampled 95 | parameter values as well as a bundle of objective 96 | functions are always recorded in the sampling output 97 | file regardless of this argument. 98 | 99 | settings_filename: `str`, optional 100 | The name of the settings file to use to configure the 101 | SMART model. This argument is to be used when the 102 | settings file does not follow the specific file name 103 | expected by the model, i.e. *{root_f}/in/{catchment}.sttngs*. 104 | If not provided, set to the specific file name expected. 105 | Note that regardless of this argument, the settings file 106 | must be in the inputs folder for the given catchment 107 | (in other words, absolute paths are not supported here). 108 | 109 | """ 110 | MonteCarlo.__init__(self, catchment, root_f, in_format, out_format, 111 | parallel=parallel, save_sim=save_sim, func='lhs', settings_filename=settings_filename) 112 | 113 | # generate a sample of parameter sets from the using Latin Hypercube Sampling 114 | self.lhs_params = self._get_params_from_lh(sample_size) 115 | 116 | # create a map of parameter sets to give access to a unique index for each set 117 | self.p_map = {tuple(self.lhs_params[r, :].tolist()): r for r in range(self.lhs_params.shape[0])} 118 | 119 | # give list of parameters generated from Latin Hypercube Sampling 120 | self.params = [ 121 | spotpy.parameter.List(self.param_names[0], self.lhs_params[:, 0]), 122 | spotpy.parameter.List(self.param_names[1], self.lhs_params[:, 1]), 123 | spotpy.parameter.List(self.param_names[2], self.lhs_params[:, 2]), 124 | spotpy.parameter.List(self.param_names[3], self.lhs_params[:, 3]), 125 | spotpy.parameter.List(self.param_names[4], self.lhs_params[:, 4]), 126 | spotpy.parameter.List(self.param_names[5], self.lhs_params[:, 5]), 127 | spotpy.parameter.List(self.param_names[6], self.lhs_params[:, 6]), 128 | spotpy.parameter.List(self.param_names[7], self.lhs_params[:, 7]), 129 | spotpy.parameter.List(self.param_names[8], self.lhs_params[:, 8]), 130 | spotpy.parameter.List(self.param_names[9], self.lhs_params[:, 9]) 131 | ] 132 | 133 | def _get_params_from_lh(self, sample_size): 134 | """ 135 | Based on the Latin Hypercube Sampling strategy first introduced in: 136 | McKay, M.D., Beckman, R.J., Conover, W.J. (1979) A Comparison of Three Methods for Selecting Values of Input 137 | Variables in the Analysis of Output from a Computer Code. Technometrics 21, 239. https://doi.org/10.2307/1268522 138 | """ 139 | # get the limits for the uniform distributions of each parameter 140 | bounds = np.asarray( 141 | [[self.model.parameters.ranges[p][0], self.model.parameters.ranges[p][1]] for p in self.param_names], 142 | dtype=np.float64 143 | ) 144 | 145 | # get number of parameters 146 | nb_params = len(self.param_names) 147 | 148 | # create a matrix of random values 149 | random_matrix = np.random.rand(sample_size, nb_params) 150 | 151 | # randomly permute the segment to be used for each parameter 152 | sampling_plan = np.zeros((sample_size, nb_params), dtype=np.float64) 153 | for p in range(nb_params): 154 | sampling_plan[:, p] = np.random.permutation(sample_size) 155 | 156 | # move away from (randomly selected) segment lower bound by a random value 157 | sampling_plan += random_matrix 158 | # standardise values to get values between 0 and 1 159 | sampling_plan /= sample_size 160 | 161 | # use sampling plan and inverse cumulative distribution function (CDF) of uniform dist. to get parameter values 162 | parameters = np.zeros((sample_size, nb_params), dtype=np.float64) 163 | for p in range(nb_params): 164 | parameters[:, p] = uniform.ppf(sampling_plan[:, p], bounds[p][0], bounds[p][1] - bounds[p][0]) 165 | 166 | # return the matrix containing the sample of parameter sets 167 | return parameters 168 | -------------------------------------------------------------------------------- /smartpy/montecarlo/total.py: -------------------------------------------------------------------------------- 1 | # This file is part of SMARTpy - An open-source rainfall-runoff model in Python 2 | # Copyright (C) 2018-2022 Thibault Hallouin (1) 3 | # 4 | # (1) Dooge Centre for Water Resources Research, University College Dublin, Ireland 5 | # 6 | # SMARTpy is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # SMARTpy is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with SMARTpy. If not, see . 18 | 19 | try: 20 | import spotpy 21 | except ImportError: 22 | raise Exception('montecarlo.best requires the package spotpy to be installed.') 23 | 24 | from .montecarlo import MonteCarlo 25 | 26 | 27 | class Total(MonteCarlo): 28 | """Total is available to run an existing sample of parameter sets 29 | on a different period, without any conditioning. 30 | 31 | .. important:: 32 | 33 | A sampling must have already been performed prior to using this 34 | functionality, and the unconditioned sample is then used to run 35 | the model on a different simulation period than the sampling 36 | simulation period. 37 | 38 | """ 39 | def __init__(self, catchment, root_f, in_format, out_format, 40 | parallel='seq', save_sim=False, settings_filename=None, decompression_csv=False): 41 | """**Instantiation** 42 | 43 | :Parameters: 44 | 45 | catchment: `str` 46 | A name to identify the catchment of interest in the 47 | inputs and outputs directories. 48 | 49 | root_f: `str` 50 | The file path to the directory containing the model 51 | inputs and outputs. Note that a specific internal 52 | structure for this directory must be followed: 53 | 54 | .. code-block:: text 55 | 56 | root_f 57 | ├── in 58 | │ └── catchment 59 | │ ├── catchment.rain 60 | │ ├── catchment.peva 61 | │ ├── catchment.flow 62 | │ └── catchment.sttngs 63 | └── out 64 | 65 | in_format: `str` 66 | The input file format. It can either be `'csv'` or 67 | `'netcdf'`. Note that in either case, a specific file 68 | format must be followed. 69 | 70 | out_format: `str` 71 | The output file format. It can either be `'csv'` or 72 | `'netcdf'`. 73 | 74 | parallel: `str`, optional 75 | Whether the sampling is to performed in parallel (i.e. 76 | using MPI calls to run several simulations at the same 77 | time), or in serial (i.e. running simulations sequentially 78 | one after another). The options are: 79 | 80 | =============== ======================================= 81 | Parallel Description 82 | =============== ======================================= 83 | `'seq'` Run the simulations one after another. 84 | `'mpi'` Run several simulations at the same 85 | time. The number of simultaneous 86 | simulations is determined with the 87 | number of processes using `mpirun -np`. 88 | =============== ======================================= 89 | 90 | If not provided, set to default value `'seq'`. 91 | 92 | save_sim: `bool`, optional 93 | Whether to save the simulated discharge time series. If 94 | not provided, set to default value `False` (i.e. the 95 | simulated values are not recorded). Note that the sampled 96 | parameter values as well as a bundle of objective 97 | functions are always recorded in the sampling output 98 | file regardless of this argument. 99 | 100 | settings_filename: `str`, optional 101 | The name of the settings file to use to configure the 102 | SMART model. This argument is to be used when the 103 | settings file does not follow the specific file name 104 | expected by the model, i.e. *{root_f}/in/{catchment}.sttngs*. 105 | If not provided, set to the specific file name expected. 106 | Note that regardless of this argument, the settings file 107 | must be in the inputs folder for the given catchment 108 | (in other words, absolute paths are not supported here). 109 | 110 | decompression_csv: `bool`, optional 111 | Whether the CSV files containing the sample of parameter 112 | sets is compressed or not. If it is, this must be set to 113 | `True` to decompress the CSV file as a pre-processing 114 | step. If not provided, set to default vaalue `False` (i.e. 115 | no decompression). 116 | 117 | """ 118 | MonteCarlo.__init__(self, catchment, root_f, in_format, out_format, 119 | parallel=parallel, save_sim=save_sim, func='total', settings_filename=settings_filename) 120 | 121 | # collect the sampling sets from the Monte Carlo simulation (LHS sampling) 122 | self.sampling_run_file = \ 123 | ''.join([self.model.out_f, catchment, '.SMART.lhs.nc']) if self.out_format == 'netcdf' else \ 124 | ''.join([self.model.out_f, catchment, '.SMART.lhs']) 125 | self.sampled_params, self.sampled_obj_fns = self._get_sampled_sets_from_file(self.sampling_run_file, 126 | self.param_names, 127 | self.obj_fn_names, 128 | decompression_csv) 129 | # create a map of parameter sets to give access to a unique index for each set 130 | self.p_map = {tuple(self.sampled_params[r, :].tolist()): r for r in range(self.sampled_params.shape[0])} 131 | 132 | # give list of behavioural parameters 133 | self.params = [ 134 | spotpy.parameter.List(self.param_names[0], self.sampled_params[:, 0]), 135 | spotpy.parameter.List(self.param_names[1], self.sampled_params[:, 1]), 136 | spotpy.parameter.List(self.param_names[2], self.sampled_params[:, 2]), 137 | spotpy.parameter.List(self.param_names[3], self.sampled_params[:, 3]), 138 | spotpy.parameter.List(self.param_names[4], self.sampled_params[:, 4]), 139 | spotpy.parameter.List(self.param_names[5], self.sampled_params[:, 5]), 140 | spotpy.parameter.List(self.param_names[6], self.sampled_params[:, 6]), 141 | spotpy.parameter.List(self.param_names[7], self.sampled_params[:, 7]), 142 | spotpy.parameter.List(self.param_names[8], self.sampled_params[:, 8]), 143 | spotpy.parameter.List(self.param_names[9], self.sampled_params[:, 9]) 144 | ] 145 | -------------------------------------------------------------------------------- /smartpy/objfunctions.py: -------------------------------------------------------------------------------- 1 | # This file is part of SMARTpy - An open-source rainfall-runoff model in Python 2 | # Copyright (C) 2018-2022 Thibault Hallouin (1) 3 | # 4 | # (1) Dooge Centre for Water Resources Research, University College Dublin, Ireland 5 | # 6 | # SMARTpy is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # SMARTpy is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with SMARTpy. If not, see . 18 | 19 | 20 | def groundwater_constraint(evaluation, simulation): 21 | if (evaluation[0] - 0.1 <= simulation[0]) and (simulation[0] <= evaluation[0] + 0.1): 22 | return 1.0 23 | else: 24 | return 0.0 25 | -------------------------------------------------------------------------------- /smartpy/parameters.py: -------------------------------------------------------------------------------- 1 | # This file is part of SMARTpy - An open-source rainfall-runoff model in Python 2 | # Copyright (C) 2018-2022 Thibault Hallouin (1) 3 | # 4 | # (1) Dooge Centre for Water Resources Research, University College Dublin, Ireland 5 | # 6 | # SMARTpy is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # SMARTpy is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with SMARTpy. If not, see . 18 | 19 | from csv import DictReader 20 | 21 | 22 | class Parameters(object): 23 | def __init__(self): 24 | #: Return the SMART model parameter names as a `list`. 25 | self.names = ['T', 'C', 'H', 'D', 'S', 'Z', 'SK', 'FK', 'GK', 'RK'] 26 | #: Return the typical SMART model parameter ranges as a `dict`. 27 | self.ranges = { 28 | 'T': (0.9, 1.1), 29 | 'C': (0.0, 1.0), 30 | 'H': (0.0, 0.3), 31 | 'D': (0.0, 1.0), 32 | 'S': (0.0, 0.013), 33 | 'Z': (15.0, 150.0), 34 | 'SK': (1.0, 240.0), 35 | 'FK': (48.0, 1440.0), 36 | 'GK': (1200.0, 4800.0), 37 | 'RK': (1.0, 96.0) 38 | } 39 | #: Return the set of SMART model parameter values as a `dict`. 40 | self.values = dict() 41 | 42 | def set_parameters_with_file(self, file_location): 43 | """Assign the SMART model parameters values using a CSV file. 44 | 45 | :Parameters: 46 | 47 | file_location: `str` 48 | The absolute file path for the parameters file. 49 | 50 | *Parameter example:* :: 51 | 52 | file_location='examples/in/ExampleDaily/ExampleDaily.parameters' 53 | 54 | """ 55 | my_dict_par = dict() 56 | try: 57 | with open(file_location, 'r', encoding='utf8') as my_file: 58 | my_reader = DictReader(my_file) 59 | for row in my_reader: 60 | if row['PAR_NAME'] in self.names: 61 | my_dict_par[row['PAR_NAME']] = float(row['PAR_VALUE']) 62 | except KeyError: 63 | raise Exception("There is 'PAR_NAME' or 'PAR_VALUE' column in {}.".format(file_location)) 64 | except ValueError: 65 | raise Exception("There is at least one incorrect parameter value in {}.".format(file_location)) 66 | except IOError: 67 | raise Exception("There is no parameters file at {}.".format(file_location)) 68 | 69 | for param in self.names: 70 | try: 71 | self.values[param] = my_dict_par[param] 72 | except KeyError: 73 | raise Exception("The parameter {} is not available in the " 74 | "parameters file at {}.".format(param, file_location)) 75 | 76 | def set_parameters_with_dict(self, dictionary): 77 | """Assign the SMART model parameters values using a dictionary. 78 | 79 | :Parameters: 80 | 81 | dictionary: `dict` 82 | The dictionary containing the parameter values. 83 | 84 | *Parameter example:* :: 85 | 86 | dictionary={ 87 | 'T': 1.0, 88 | 'C': 1.0, 89 | 'H': 0.20845, 90 | 'D': 0.24606, 91 | 'S': 0.0001230, 92 | 'Z': 105.26, 93 | 'SK': 46.82, 94 | 'FK': 315.55, 95 | 'GK': 1066.73, 96 | 'RK': 10.64 97 | } 98 | 99 | """ 100 | for param in self.names: 101 | try: 102 | self.values[param] = dictionary[param] 103 | except KeyError: 104 | raise Exception("The parameter {} is not available in the dictionary provided.") 105 | -------------------------------------------------------------------------------- /smartpy/version.py: -------------------------------------------------------------------------------- 1 | # This file is part of SMARTpy - An open-source rainfall-runoff model in Python 2 | # Copyright (C) 2018-2022 Thibault Hallouin (1) 3 | # 4 | # (1) Dooge Centre for Water Resources Research, University College Dublin, Ireland 5 | # 6 | # SMARTpy is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # SMARTpy is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with SMARTpy. If not, see . 18 | 19 | 20 | __version__ = '0.2.2' 21 | -------------------------------------------------------------------------------- /tests/data/in/Catchment/Catchment.flow.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/tests/data/in/Catchment/Catchment.flow.nc -------------------------------------------------------------------------------- /tests/data/in/Catchment/Catchment.parameters: -------------------------------------------------------------------------------- 1 | PAR_NAME,PAR_VALUE 2 | T,1.0 3 | C,1.0 4 | H,0.20845296027652363 5 | D,0.24606006380093334 6 | S,0.00012296588050682812 7 | Z,105.25734595830215 8 | SK,46.81961454361724 9 | FK,315.5490902162102 10 | GK,1066.7332319333473 11 | RK,10.640277777777778 12 | -------------------------------------------------------------------------------- /tests/data/in/Catchment/Catchment.peva.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/tests/data/in/Catchment/Catchment.peva.nc -------------------------------------------------------------------------------- /tests/data/in/Catchment/Catchment.rain.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThibHlln/smartpy/6870c4f06b6be553a16cce158cfc549ed271d28a/tests/data/in/Catchment/Catchment.rain.nc -------------------------------------------------------------------------------- /tests/data/in/Catchment/Catchment.sttngs: -------------------------------------------------------------------------------- 1 | ARGUMENT,VALUE 2 | catchment_area_km2,175.46 3 | gauged_area_km2,175.97 4 | start_datetime,01/01/2007 09:00:00 5 | end_datetime,31/12/2016 09:00:00 6 | simu_timedelta_min,60 7 | report_timedelta_min,1440 8 | warm_up_days,365 9 | gw_constraint,0.12667 10 | -------------------------------------------------------------------------------- /tests/data/out/Catchment/.gitignore: -------------------------------------------------------------------------------- 1 | # this directory is required to run some of the unittests 2 | # so it needs to exist in the repository when unittests are to be run 3 | # but any file ever created in this directory is of no interest 4 | 5 | # so ignore everything in this directory 6 | * 7 | # except this file 8 | !.gitignore 9 | -------------------------------------------------------------------------------- /tests/run_all_tests.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | 4 | if __name__ == '__main__': 5 | test_loader = unittest.TestLoader() 6 | test_suite = unittest.TestSuite() 7 | 8 | all_tests = test_loader.discover('.', pattern='test_*.py') 9 | test_suite.addTests(all_tests) 10 | 11 | runner = unittest.TextTestRunner(verbosity=2) 12 | result = runner.run(test_suite) 13 | 14 | if not result.wasSuccessful(): 15 | exit(1) 16 | -------------------------------------------------------------------------------- /tests/test_run_mc_lhs.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | from smartpy import montecarlo 3 | 4 | 5 | class TestRunMonteCarloLHS(unittest.TestCase): 6 | maxDiff = None 7 | 8 | def setUp(self): 9 | self.catchment = 'Catchment' 10 | self.root_f = 'data/' 11 | self.sample_size = 5 12 | self.parallel = 'seq' 13 | self.save_sim = True 14 | 15 | self.extra = { 16 | 'aar': 1200, 17 | 'r-o_ratio': 0.45, 18 | 'r-o_split': (0.10, 0.15, 0.15, 0.30, 0.30) 19 | } 20 | 21 | def test_run_lhs_terminates(self): 22 | for in_fmt in ('csv', 'netcdf'): 23 | for out_fmt in ('csv', 'netcdf'): 24 | with self.subTest(in_format=in_fmt, out_format=out_fmt): 25 | # initialise the Monte Carlo LHS 26 | setup = montecarlo.LHS( 27 | catchment=self.catchment, 28 | root_f=self.root_f, 29 | in_format=in_fmt, 30 | out_format=out_fmt, 31 | sample_size=self.sample_size, 32 | parallel=self.parallel, 33 | save_sim=self.save_sim 34 | ) 35 | 36 | # add some extra information to the model 37 | setup.model.extra = self.extra 38 | 39 | # run the simulation (with compression test) 40 | setup.run(compression=True) 41 | 42 | 43 | if __name__ == '__main__': 44 | test_loader = unittest.TestLoader() 45 | test_suite = unittest.TestSuite() 46 | 47 | test_suite.addTests( 48 | test_loader.loadTestsFromTestCase(TestRunMonteCarloLHS) 49 | ) 50 | 51 | runner = unittest.TextTestRunner(verbosity=2) 52 | result = runner.run(test_suite) 53 | 54 | if not result.wasSuccessful(): 55 | exit(1) 56 | --------------------------------------------------------------------------------