An open API service indexing awesome lists of open source software.

https://github.com/ray-chew/pybella

A Python-based Blended sEamLess soLver for Atmospheric dynamics coupled to an ensemble data assimilation engine
https://github.com/ray-chew/pybella

blended-models data-assimilation dynamical-core finite-volume iterative-solvers letkf

Last synced: 9 months ago
JSON representation

A Python-based Blended sEamLess soLver for Atmospheric dynamics coupled to an ensemble data assimilation engine

Awesome Lists containing this project

README

          



pyBELLA Logo


Blended sEamLess soLver for Atmospheric dynamics



GitHub Actions: docs


open issues


License: BSD-3

The Blended sEamLess soLver for Atmospheric dynamics (pyBELLA) is a Python-based numerical flow solver. The current version features PyBELLA+ as it is coupled to an ensemble data assimillation engine based on the [Local Ensemble Transform Kalman Filter](https://www.sciencedirect.com/science/article/abs/pii/S0167278906004647).

The numerical scheme for pyBELLA was introduced by [Benacchio and Klein (2019)](https://journals.ametsoc.org/view/journals/mwre/147/11/mwr-d-19-0073.1.xml), and the seamless blending between physical model regimes within a simulation run was extended in [Chew et al. (2022)](https://journals.ametsoc.org/view/journals/mwre/150/9/MWR-D-21-0175.1.xml); see [`v0.3.0-localdab`](https://github.com/ray-chew/pyBELLA/releases/tag/archive%2Flocaldab) for the source code.

This code was also used to produce the results in
* [Chew (2022)](https://refubium.fu-berlin.de/bitstream/handle/fub188/37313/thesis_final.pdf); [`v0.2.0-thesis`](https://github.com/ray-chew/pyBELLA/releases/tag/archive%2Fthesis)
* [Chew et al. (2023)](https://tinyurl.com/2dc7hjqa); [`v0.4.0-coriolis`](https://github.com/ray-chew/pyBELLA/releases/tag/archive%2Ffull_coriolis)

---

**[Read the documentation here](https://ray-chew.github.io/pyBELLA/index.html)**

---

## Requirements

See [`requirements.txt`](https://github.com/ray-chew/pyBELLA/blob/develop/requirements.txt)

**Note**: The development dependencies can be found in [`dev-requirements.txt`](https://github.com/ray-chew/pyBELLA/blob/develop/dev-requirements.txt).

To install the requirements:
```console
pip install -r requirements.txt
```

## Usage

### Installation

Fork this repository and clone your remote fork. `cd` into your local forked repository and execute:

```console
pip install -e .
```

**Note**: depending on your IDE, you may need to add the `--config-settings editable_mode` at the end of the above command for the pyBELLA package to be visible to the linter. However, this comes with limitations to the development mode, see [here for more details](https://setuptools.pypa.io/en/latest/userguide/development_mode.html).

### Configuration

The user-defined input parameters are in the [`inputs`](https://github.com/ray-chew/pyBELLA/tree/develop/inputs) subpackage. These parameters are imported into the run scripts in [`run_scripts`](https://github.com/ray-chew/pyBELLA/tree/develop/run_scripts).

### Execution

A simple test can be found in [`run_scripts.test_dycore`](https://github.com/ray-chew/pyBELLA/blob/develop/run_scripts/test_dycore.py). To execute this test script from the pyBELLA parent directory:

```console
pytest ./run_scripts/test_dycore.py -v
```

To run a simulation:
```console
pybella -ic rb -N 1
```
Note that only the rising bubble initial condition is implemented for now with ensemble size of 1.

The codebase is structured such that the user can easily assemble a run script to define their own experiments. Refer to the documentation for the [available APIs](https://ray-chew.github.io/pyBELLA/apis.html).

## License

[BSD License v3.0](https://fossa.com/blog/open-source-software-licenses-101-bsd-3-clause-license/)

## Contributions

Refer to the [open issues](https://github.com/ray-chew/pyBELLA/issues), in particular issues with the [`help wanted` label](https://github.com/ray-chew/pyBELLA/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).

Any changes, improvements, or bug fixes can be submitted from your remote to upstream via a pull request.

## To be tidied up

### Profiler
```bash
$ PYTHONPATH=src scalene -m pybella -ic test_lamb_wave -N 1
```

### Coverage
```bash
$ pytest --cov test_scripts/ --cov-report=html
```