{"id":23832045,"url":"https://github.com/csdms/dakotathon","last_synced_at":"2025-09-07T11:31:29.659Z","repository":{"id":29296294,"uuid":"32829256","full_name":"csdms/dakotathon","owner":"csdms","description":"A Python API and BMI for the Dakota iterative systems analysis toolkit","archived":false,"fork":false,"pushed_at":"2020-04-13T16:59:30.000Z","size":846,"stargazers_count":12,"open_issues_count":14,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-01-26T00:37:31.267Z","etag":null,"topics":["bmi","csdms","dakota","python","sensitivity-analysis","uncertainty-quantification"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csdms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":"CODE-OF-CONDUCT.rst","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-24T22:38:26.000Z","updated_at":"2022-07-05T11:37:55.000Z","dependencies_parsed_at":"2022-09-04T09:22:58.719Z","dependency_job_id":null,"html_url":"https://github.com/csdms/dakotathon","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fdakotathon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fdakotathon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fdakotathon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fdakotathon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csdms","download_url":"https://codeload.github.com/csdms/dakotathon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232206387,"owners_count":18488512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bmi","csdms","dakota","python","sensitivity-analysis","uncertainty-quantification"],"created_at":"2025-01-02T14:17:09.685Z","updated_at":"2025-01-02T14:17:10.240Z","avatar_url":"https://github.com/csdms.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/csdms/dakotathon.svg?branch=master)](https://travis-ci.org/csdms/dakotathon)\n[![Code Health](https://landscape.io/github/csdms/dakotathon/master/landscape.svg?style=flat)](https://landscape.io/github/csdms/dakotathon/master)\n[![Coverage Status](https://coveralls.io/repos/csdms/dakotathon/badge.svg?branch=master)](https://coveralls.io/r/csdms/dakotathon?branch=master)\n[![Documentation Status](https://readthedocs.org/projects/csdms-dakota/badge/?version=latest)](https://readthedocs.org/projects/csdms-dakota/?badge=latest)\n[![Anaconda-Server Badge](https://anaconda.org/csdms-stack/dakotathon/badges/version.svg)](https://anaconda.org/csdms-stack/dakotathon)\n[![Anaconda-Server Badge](https://anaconda.org/csdms-stack/dakotathon/badges/platforms.svg)](https://anaconda.org/csdms-stack/dakotathon)\n[![Anaconda-Server Badge](https://anaconda.org/csdms-stack/dakotathon/badges/downloads.svg)](https://anaconda.org/csdms-stack/dakotathon)\n\n# Dakotathon\n\nDakotathon provides\na [Basic Model Interface](https://bmi.readthedocs.io)\nand a Python API for a subset of the methods\nincluded in the [Dakota](https://dakota.sandia.gov/)\niterative systems analysis toolkit,\nincluding:\n\n* [vector_parameter_study](https://dakota.sandia.gov/sites/default/files/docs/6.1/html-ref/method-vector_parameter_study.html),\n* [centered_parameter_study](https://dakota.sandia.gov/sites/default/files/docs/6.1/html-ref/method-centered_parameter_study.html),\n* [multidim_parameter_study](https://dakota.sandia.gov/sites/default/files/docs/6.1/html-ref/method-multidim_parameter_study.html),\n* [psuade_moat](https://dakota.sandia.gov/sites/default/files/docs/6.1/html-ref/method-psuade_moat.html),\n* [sampling](https://dakota.sandia.gov/sites/default/files/docs/6.1/html-ref/method-sampling.html),\n* [polynomial_chaos](https://dakota.sandia.gov/sites/default/files/docs/6.1/html-ref/method-polynomial_chaos.html), and\n* [stoch_collocation](https://dakota.sandia.gov/sites/default/files/docs/6.1/html-ref/method-stoch_collocation.html).\n\nDakotathon is currently beta-level software\nsupported on Linux and macOS.\nAPI documentation is available at http://csdms-dakota.readthedocs.io.\n\n## Installation\n\nInstall Dakotathon into an Anaconda Python distribution with\n\n    $ conda install -c csdms-stack dakotathon\n\nor install from source with\n\n\t$ git clone https://github.com/csdms/dakotathon.git\n\t$ cd dakotathon\n\t$ python setup.py install\n\nDakotathon requires Dakota 6.1 or greater.\nInstall Dakota through conda with\n\n    $ conda install -c csdms-stack -c conda-forge dakota\n\nor, follow the instructions on the Dakota website\nfor [downloading](https://dakota.sandia.gov/download.html) and\n[installing](https://dakota.sandia.gov/content/install-linux-macosx)\na precompiled Dakota binary for your system.\n\n## Execution: standalone\n\nImport Dakotathon into a Python session with:\n\n\t\u003e\u003e\u003e from dakotathon import Dakota\n\nCreate a `Dakota` instance,\nspecifying a Dakota analysis method:\n\n\t\u003e\u003e\u003e d = Dakota(method='vector_parameter_study')\n\nTo run a sample case,\ncreate a Dakota input file\nfrom the default vector parameter study\nand call Dakota:\n\n\t\u003e\u003e\u003e d.write_input_file()\n\t\u003e\u003e\u003e d.run()\n\nDakota output is written to two files,\n**dakota.out** (run information)\nand\n**dakota.dat** (tabular output),\nin the current directory.\n\nFor more in-depth examples of using Dakotathon\nas a standalone Python package,\nsee the Jupyter Notebooks\nin the [examples](./examples) directory\nof this repository.\n\n\n### Note\n\nIf you're using Anaconda IPython on macOS,\ninclude the `DYLD_LIBRARY_PATH` environment variable\nin your session before calling the `run` method with:\n\n```python\n\u003e\u003e\u003e from dakotathon.utils import add_dyld_library_path\n\u003e\u003e\u003e add_dyld_library_path()\n```\n\nSee https://github.com/csdms/dakotathon/issues/17 for more information.\n\n## Execution: in PyMT\n\nDakotathon can also be called as a component in\n[PyMT](https://github.com/csdms/pymt).\nFor example,\nto perform a centered parameter study on the Hydrotrend component,\nstart with imports:\n\n```python\nimport os\nfrom pymt.components import CenteredParameterStudy, Hydrotrend\nfrom dakotathon.utils import configure_parameters\n```\n\nthen create instances of the Hydrotrend and Dakota components:\n\n```python\nh, c = Hydrotrend(), CenteredParameterStudy()\n```\n\nNext,\nset up a dict of parameters for the experiment:\n\n```python\nexperiment = {\n  'component': type(c).__name__,\n  'run_duration': 10,                # years\n  'auxiliary_files': 'HYDRO0.HYPS',  # the default Waipaoa hypsometry\n  'descriptors': ['starting_mean_annual_temperature',\n                  'total_annual_precipitation'],\n  'initial_point': [15.0, 2.0],\n  'steps_per_variable': [2, 5],\n  'step_vector': [2.5, 0.2],\n  'response_descriptors': ['channel_exit_water_sediment~suspended__mass_flow_rate',\n                           'channel_exit_water__volume_flow_rate'],\n  'response_statistics': ['median', 'mean']\n}\n```\n\nand use a helper function\nto format the parameters for Dakota and for Hydrotrend:\n\n```python\ncparameters, hparameters = configure_parameters(experiment)\n```\n\nSet up the Hydrotrend component:\n\n```python\ncparameters['run_directory'] = h.setup(os.getcwd(), **hparameters)\n```\n\nCreate the Dakota template file from the Hydrotrend input file:\n\n```python\ncfg_file = 'HYDRO.IN'  # get from pymt eventually\ndtmpl_file = cfg_file + '.dtmpl'\nos.rename(cfg_file, dtmpl_file)\ncparameters['template_file'] = dtmpl_file\n```\n\nSet up the Dakota component:\n\n```python\nc.setup(dparameters['run_directory'], **cparameters)\n```\n\nthen initialize, run, and finalize the Dakota component:\n\n```python\nc.initialize('dakota.yaml')\nc.update()\nc.finalize()\n```\n\nDakota output is written to two files,\n**dakota.out** (run information)\nand\n**dakota.dat** (tabular output),\nin the current directory.\n\nFor more in-depth examples of using Dakotathon with PyMT,\nsee the Python scripts\nin the [examples](./examples) directory\nof this repository.\n\n## Contributing\n\nDakotathon is open source software,\nreleased under an [MIT license](https://opensource.org/licenses/MIT).\n[Contributions](./CONTRIBUTING.rst) are welcome.\nPlease note that this project is released with a\n[Contributor Code of Conduct](./CODE-OF-CONDUCT.rst).\nBy participating in this project you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsdms%2Fdakotathon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsdms%2Fdakotathon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsdms%2Fdakotathon/lists"}