romda — real-time reduced-order modelling and bias-aware data assimilation
romda is an open-source Python package for real-time data assimilation with
reduced-order models: ensemble Kalman filters (including the regularized bias-aware
EnKF), physical and data-driven forecast models (ESN, POD-ESN), bias estimators, and
POD/SPOD decompositions — with applications to thermoacoustics and fluid flows.
📖 Documentation: https://andreanovoa.github.io/real-time-bias-aware-DA/
This repository was formerly the
real-time-DApackage. The code used in the papers listed below is preserved at the release tags v1.0, v1.1 and v2.1.
🚀 Getting started
- Install from PyPI
pip install romda
or, to work on the source, clone and install in editable mode:
git clone https://github.com/andreanovoa/real-time-bias-aware-DA
cd real-time-bias-aware-DA
conda create -n romda python=3.12 && conda activate romda
pip install -e ".[dev,notebooks]" --use-pep517 # dev = pytest, notebooks = jupyter
- (Optional) Run the test suite
python -m pytest tests/ # unit and integration tests
python -m pytest scripts/tutorials/test_tutorials.py # execute the tutorial notebooks
Quick example — bias-aware state and parameter estimation on a Van der Pol twin experiment:
import numpy as np
from romda.bias_estimators import ConstantBias
from romda.estimators import rBA_EnKF
from romda.models.physical import VdP
from romda.observations import Observations
truth = Observations(model=VdP, t_start=0.6, t_stop=0.8, Nt_obs=30,
add_noise=True, manual_bias='linear')
Cdd = np.diag((0.05 * np.max(abs(truth.y_obs), axis=0)) ** 2)
ensemble = rBA_EnKF(parent_model=VdP(dt=truth.dt), parent_bias=ConstantBias,
m=10, std_phi=0.1, std_alpha=dict(zeta=(40., 60.)))
for d, t_d in zip(truth.y_obs, truth.t_obs):
ensemble.forecast_step(t_end=t_d) # advance model (and bias) to the observation time
ensemble.analysis_step(d=d, Cdd=Cdd) # Bayesian update
(The ensemble forecast runs in a multiprocessing pool, so in a script keep this under if __name__ == "__main__":.)
Check out the Tutorials folder, which includes several jupyter notebooks aiming to ease the understanding of the repository.
🌟 What is available?
Data assimilation methods romda.estimators
- EnKF — ensemble Kalman filter
- EnSRKF — ensemble square-root Kalman filter
- rBA-EnKF — regularized bias-aware EnKF
- KalmanFilter — the classical (linear) Kalman filter
Physical models romda.models.physical (from the dynamodels package)
- Rijke tube model (dimensional with Galerkin projection)
- Van der Pol oscillator
- Lorenz 63
- Lorenz 96
- Azimuthal thermoacoustics model
- Kuramoto-Sivashinsky equation
Data-driven models romda.models.data_driven
ESN_model— Echo State Network as a forecasting modelPOD_ESN— POD dimensionality reduction + ESN forecasterLinearModel— linear map with process noise (Kalman-filter tutorials)- Projectors (
autoencoders/):POD,SPOD— (Spectral) Proper Orthogonal Decomposition (Sieber 2016, Towne 2018)
Reservoir core: EchoStateNetwork — from the external echostatenetwork package, re-exported by romda.models.data_driven; pod_utils (in autoencoders/) — standalone POD/SPOD algorithms
Bias estimators romda.bias_estimators
- Echo State Network
- Constant bias
- No bias (unbiased limit)
📂 Structure
.
├── data/ # Dataset files
├── docs/ # Documentation site sources + media used in the notebooks
├── results/ # Generated results
├── scripts/
│ └── tutorials/ # Teaching notebooks + notebook execution tests
├── src/ # Source code (the romda package: `from romda... import ...`)
│ ├── observations.py # Truth / observation generation
│ ├── data_assimilation.py # run_da_loop: the shared sequential DA driver
│ ├── utils.py
│ ├── estimators/ # Estimator hierarchy (the DA layer)
│ │ ├── base.py # Estimator base class (forecast_step, bias wiring)
│ │ ├── ensembles.py # EnsembleEstimator: EnKF, EnSRKF, rBA_EnKF
│ │ ├── deterministic.py # DeterministicEstimator: KalmanFilter
│ │ └── inflation.py # Covariance inflation
│ ├── bias_estimators/ # Bias model classes
│ │ ├── bias.py # Bias base class
│ │ ├── esn.py # ESN_bias
│ │ └── constantbias.py # ConstantBias, NoBias
│ ├── models/ # Model layer
│ │ ├── __init__.py # re-exports the dynamodels package (Model base,
│ │ │ # integrators, physical models) + pickle aliases
│ │ └── data_driven/ # ESN_model, POD_ESN, LinearModel, esn_config
│ │ └── autoencoders/ # Projector hierarchy: POD, SPOD (+ pod_utils)
│ └── plotting/ # Visualization helpers
├── tests/ # Unit and integration test suite
├── mkdocs.yml # Documentation site configuration
├── pyproject.toml # Package setup
└── README.md # This file
📚 Main publications from this repository
Journal papers
- Nóvoa, Noiray, Dawson & Magri (2024). A real-time digital twin of azimuthal thermoacoustic instabilities. Journal of Fluid Mechanics. Published paper | 🏷️ v1.0.
- Nóvoa, Racca & Magri (2023). Inferring unknown unknowns. Computer Methods in Applied Mechanics and Engineering. Published paper | Legacy repository.
- Nóvoa & Magri (2022). Real-time thermoacoustic data assimilation. Journal of Fluid Mechanics. Published paper | Legacy repository.
Conference papers and proceedings
- Nóvoa & Magri (2025). Online model learning with data-assimilated reservoir computers. Preprint | 🏷️ v1.1.
- Nóvoa & Magri (2024). Real-time digital twins of multiphysics and turbulent flows. Paper.
- Nóvoa & Magri (2022). Bias-aware thermoacoustic data assimilation. In_ 51st International Congress and Exposition on Noise Control Engineering. Paper. | Legacy repository.
PhD thesis
- Nóvoa (2024). Real-time data assimilation in nonlinear dynamcal systems. University of Cambridge. Thesis.
🤝 Contributing
Contributions, bug reports, and feature requests are welcome! Please open an issue or submit a pull request. For questions or collaborations, please reach out to A. Nóvoa.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file romda-3.0.0.tar.gz.
File metadata
- Download URL: romda-3.0.0.tar.gz
- Upload date:
- Size: 133.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a952067e4fc3751b3e081c7be7897a1b2492da4c04fba72b5addfc63dd983a7a
|
|
| MD5 |
c18c169c288b8b372ead7d9fb3707479
|
|
| BLAKE2b-256 |
95e23ffc4cb87881ca82a388bdc4c16b7688130d687af12ffb205655e5714a9a
|
Provenance
The following attestation bundles were made for romda-3.0.0.tar.gz:
Publisher:
release.yml on andreanovoa/real-time-bias-aware-DA
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
romda-3.0.0.tar.gz -
Subject digest:
a952067e4fc3751b3e081c7be7897a1b2492da4c04fba72b5addfc63dd983a7a - Sigstore transparency entry: 2583598564
- Sigstore integration time:
-
Permalink:
andreanovoa/real-time-bias-aware-DA@2bd2e7f66dad58c2543122f4604f106a48f27f61 -
Branch / Tag:
refs/tags/v3.0.0 - Owner: https://github.com/andreanovoa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2bd2e7f66dad58c2543122f4604f106a48f27f61 -
Trigger Event:
push
-
Statement type:
File details
Details for the file romda-3.0.0-py3-none-any.whl.
File metadata
- Download URL: romda-3.0.0-py3-none-any.whl
- Upload date:
- Size: 138.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef3a546997d39fc03ddcc5d9399ceacda9abec930e200c1c557df2a8168456be
|
|
| MD5 |
d9d315ec4b71683cd6fd14777e5564cc
|
|
| BLAKE2b-256 |
f9990f5a2a49a50af6b5f0fad43edc88a5c08873f17a5f885a9888e2b801c05e
|
Provenance
The following attestation bundles were made for romda-3.0.0-py3-none-any.whl:
Publisher:
release.yml on andreanovoa/real-time-bias-aware-DA
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
romda-3.0.0-py3-none-any.whl -
Subject digest:
ef3a546997d39fc03ddcc5d9399ceacda9abec930e200c1c557df2a8168456be - Sigstore transparency entry: 2583598636
- Sigstore integration time:
-
Permalink:
andreanovoa/real-time-bias-aware-DA@2bd2e7f66dad58c2543122f4604f106a48f27f61 -
Branch / Tag:
refs/tags/v3.0.0 - Owner: https://github.com/andreanovoa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2bd2e7f66dad58c2543122f4604f106a48f27f61 -
Trigger Event:
push
-
Statement type: