Skip to main content

Python package to simulate wave-dominated shallow-marine environments

Project description

pyBarSim

DOI:10.4121/60f148ee-a793-4d16-b1b6-c03442403db1.v1 Binder

pyBarSim is a Python package to simulate wave-dominated shallow-marine environments using Storms (2003)'s BarSim.

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 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
ORCID Badge
Joep Storms
ORCID Badge
Andrea Cuesta Cano
ORCID Badge

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyBarSim-0.0.3.tar.gz (22.6 kB view details)

Uploaded Source

File details

Details for the file pyBarSim-0.0.3.tar.gz.

File metadata

  • Download URL: pyBarSim-0.0.3.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for pyBarSim-0.0.3.tar.gz
Algorithm Hash digest
SHA256 145a07607b8d18eecbec971fb70e1be4a0733cb8235947b9491ccad02463cb7c
MD5 419b71ee843809c409480d37a75a144f
BLAKE2b-256 98d94c054c9856e461e6a47aeae5bc882055ff947354bb4b8d6e099f3505ea69

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page