# pyBarSim
[![DOI:10.4121/60f148ee-a793-4d16-b1b6-c03442403db1.v1](http://img.shields.io/badge/DOI-10.4121/60f148ee--a793--4d16--b1b6--c03442403db1.v1-B31B1B.svg)](https://doi.org/10.4121/60f148ee-a793-4d16-b1b6-c03442403db1.v1) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/grongier/pybarsim/master?filepath=examples)
pyBarSim is a Python package to simulate wave-dominated shallow-marine environments using [Storms (2003)](https://doi.org/10.1016/S0025-3227(03)00144-0)'s BarSim.
![](https://raw.githubusercontent.com/grongier/pybarsim/master/image.jpg)
## Installation
You can directly install pyBarSim from pip:
pip install pybarsim
Or from GitHub using pip:
pip install git+https://github.com/grongier/pybarsim.git
## Usage
Basic use:
```
import numpy as np
from pybarsim import BarSim2D
import matplotlib.pyplot as plt
# Set the parameters
run_time = 10000.
barsim = BarSim2D(np.linspace(1000., 900., 200),
np.array([(0., 950.), (run_time, 998.)]),
np.array([(0., 25.), (run_time, 5.)]),
spacing=100.)
# Run the simulation
barsim.run(run_time=10000., dt_fair_weather=15., dt_storm=1.)
# Interpolate the outputs into a regular grid
barsim.regrid(900., 1000., 0.5)
# Compute the mean grain size
barsim.finalize(on='record')
# Plot the median grid size in the regular grid
barsim.record_['Mean grain size'].plot(figsize=(12, 4))
plt.show()
```
For a more complete example, see the Jupyter notebook [using_pybarsim.ipynb](examples/using_pybarsim.ipynb) or the Binder link above.
## Citation
If you use pyBarSim in your research, please cite the original article:
> Storms, J.E.A. (2003). Event-based stratigraphic simulation of wave-dominated shallow-marine environments. *Marine Geology*, 199(1), 83-100. doi:10.1016/S0025-3227(03)00144-0
Here is the corresponding BibTex entry if you use LaTex:
@Article{Storms2003,
author="Storms, Joep E.A.",
title="Event-based stratigraphic simulation of wave-dominated shallow-marine environments",
journal="Marine Geology",
year="2003",
volume="199",
number="1",
pages="83--100",
issn="0025-3227",
doi="https://doi.org/10.1016/S0025-3227(03)00144-0",
}
## Credits
This software was written by:
| [Guillaume Rongier](https://github.com/grongier) <br>[![ORCID Badge](https://img.shields.io/badge/ORCID-A6CE39?logo=orcid&logoColor=fff&style=flat-square)](https://orcid.org/0000-0002-5910-6868)</br> | [Joep Storms](https://www.tudelft.nl/en/ceg/about-faculty/departments/geoscience-engineering/sections/applied-geology/staff/academic-staff/storms-jea) <br>[![ORCID Badge](https://img.shields.io/badge/ORCID-A6CE39?logo=orcid&logoColor=fff&style=flat-square)](https://orcid.org/0000-0002-8902-8493)</br> | [Andrea Cuesta Cano](https://www.tudelft.nl/citg/over-faculteit/afdelingen/geoscience-engineering/sections/applied-geology/staff/phd-students/cuesta-cano-a) <br>[![ORCID Badge](https://img.shields.io/badge/ORCID-A6CE39?logo=orcid&logoColor=fff&style=flat-square)](https://orcid.org/0000-0002-7017-6031)</br> |
| :---: | :---: | :---: |
## License
Copyright notice: Technische Universiteit Delft hereby disclaims all copyright interest in the program pyBarSim written by the Author(s). Prof. Dr. Ir. J.D. Jansen, Dean of the Faculty of Civil Engineering and Geosciences
© 2023, G. Rongier, J.E.A. Storms, A. Cuesta Cano
This work is licensed under a MIT OSS licence.
Raw data
{
"_id": null,
"home_page": "https://github.com/grongier/pybarsim",
"name": "pyBarSim",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "stratigraphic modeling, shallow-marine, event-based",
"author": "Guillaume Rongier",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/d5/da/86cd338e722fccdbbbd2ef5128bcbb89412f1ad65488967d54b7862bb2e6/pyBarSim-0.1.0.tar.gz",
"platform": null,
"description": "# pyBarSim\n\n[![DOI:10.4121/60f148ee-a793-4d16-b1b6-c03442403db1.v1](http://img.shields.io/badge/DOI-10.4121/60f148ee--a793--4d16--b1b6--c03442403db1.v1-B31B1B.svg)](https://doi.org/10.4121/60f148ee-a793-4d16-b1b6-c03442403db1.v1) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/grongier/pybarsim/master?filepath=examples)\n\npyBarSim is a Python package to simulate wave-dominated shallow-marine environments using [Storms (2003)](https://doi.org/10.1016/S0025-3227(03)00144-0)'s BarSim.\n\n![](https://raw.githubusercontent.com/grongier/pybarsim/master/image.jpg)\n\n## Installation\n\nYou can directly install pyBarSim from pip:\n\n pip install pybarsim\n\nOr from GitHub using pip:\n\n pip install git+https://github.com/grongier/pybarsim.git\n\n## Usage\n\nBasic use:\n\n```\nimport numpy as np\nfrom pybarsim import BarSim2D\nimport matplotlib.pyplot as plt\n\n# Set the parameters\nrun_time = 10000.\nbarsim = BarSim2D(np.linspace(1000., 900., 200),\n np.array([(0., 950.), (run_time, 998.)]),\n np.array([(0., 25.), (run_time, 5.)]),\n spacing=100.)\n# Run the simulation\nbarsim.run(run_time=10000., dt_fair_weather=15., dt_storm=1.)\n# Interpolate the outputs into a regular grid\nbarsim.regrid(900., 1000., 0.5)\n# Compute the mean grain size\nbarsim.finalize(on='record')\n# Plot the median grid size in the regular grid\nbarsim.record_['Mean grain size'].plot(figsize=(12, 4))\nplt.show()\n```\n\nFor a more complete example, see the Jupyter notebook [using_pybarsim.ipynb](examples/using_pybarsim.ipynb) or the Binder link above.\n\n## Citation\n\nIf you use pyBarSim in your research, please cite the original article:\n\n> Storms, J.E.A. (2003). Event-based stratigraphic simulation of wave-dominated shallow-marine environments. *Marine Geology*, 199(1), 83-100. doi:10.1016/S0025-3227(03)00144-0\n\nHere is the corresponding BibTex entry if you use LaTex:\n\n\t@Article{Storms2003,\n\t\tauthor=\"Storms, Joep E.A.\",\n\t\ttitle=\"Event-based stratigraphic simulation of wave-dominated shallow-marine environments\",\n\t\tjournal=\"Marine Geology\",\n\t\tyear=\"2003\",\n\t\tvolume=\"199\",\n\t\tnumber=\"1\",\n\t\tpages=\"83--100\",\n\t\tissn=\"0025-3227\",\n\t\tdoi=\"https://doi.org/10.1016/S0025-3227(03)00144-0\",\n\t}\n\n## Credits\n\nThis software was written by:\n\n| [Guillaume Rongier](https://github.com/grongier) <br>[![ORCID Badge](https://img.shields.io/badge/ORCID-A6CE39?logo=orcid&logoColor=fff&style=flat-square)](https://orcid.org/0000-0002-5910-6868)</br> | [Joep Storms](https://www.tudelft.nl/en/ceg/about-faculty/departments/geoscience-engineering/sections/applied-geology/staff/academic-staff/storms-jea) <br>[![ORCID Badge](https://img.shields.io/badge/ORCID-A6CE39?logo=orcid&logoColor=fff&style=flat-square)](https://orcid.org/0000-0002-8902-8493)</br> | [Andrea Cuesta Cano](https://www.tudelft.nl/citg/over-faculteit/afdelingen/geoscience-engineering/sections/applied-geology/staff/phd-students/cuesta-cano-a) <br>[![ORCID Badge](https://img.shields.io/badge/ORCID-A6CE39?logo=orcid&logoColor=fff&style=flat-square)](https://orcid.org/0000-0002-7017-6031)</br> |\n| :---: | :---: | :---: |\n\n## License\n\nCopyright notice: Technische Universiteit Delft hereby disclaims all copyright interest in the program pyBarSim written by the Author(s). Prof. Dr. Ir. J.D. Jansen, Dean of the Faculty of Civil Engineering and Geosciences\n\n© 2023, G. Rongier, J.E.A. Storms, A. Cuesta Cano\n\nThis work is licensed under a MIT OSS licence.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python package to simulate wave-dominated shallow-marine environments",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/grongier/pybarsim",
"Reference": "https://doi.org/10.1016/S0025-3227(03)00144-0",
"Source": "https://github.com/grongier/pybarsim"
},
"split_keywords": [
"stratigraphic modeling",
" shallow-marine",
" event-based"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d5da86cd338e722fccdbbbd2ef5128bcbb89412f1ad65488967d54b7862bb2e6",
"md5": "0862b37e595aa110d422a8a725742d5b",
"sha256": "4089b8041f60204787972bda7998c804f1abf262a3ca9b5f92c1521fc9ec6722"
},
"downloads": -1,
"filename": "pyBarSim-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "0862b37e595aa110d422a8a725742d5b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 25649,
"upload_time": "2024-03-24T20:34:53",
"upload_time_iso_8601": "2024-03-24T20:34:53.531033Z",
"url": "https://files.pythonhosted.org/packages/d5/da/86cd338e722fccdbbbd2ef5128bcbb89412f1ad65488967d54b7862bb2e6/pyBarSim-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-24 20:34:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "grongier",
"github_project": "pybarsim",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pybarsim"
}