A Python package for running idealized model data assimilation experiments
Project description
DAPyr: (D)ata (A)ssimilation (Py)ton (R)elease
DAPyr (pronounced "dapper") is a Python package for running, testing, and experimenting with data assimilation methods using Lorenz models. DAPyr supports quick configuration and running of experiments, allowing one to setup and run data assimilation cycles in as little as two lines. In addition, DAPyr utilizes numbalsoda and numba for model integration, allowing for faster runtimes.
For a in-depth tutorials and explanations, see the documentation.
DAPyr currently supports the following:
secret readme edit
Models:
- Lorenz 1963
- Lorenz 1996
- Lorenz 2005
Data Assimilation Methods:
- Ensemble Square Root Filter (Whitaker and Hamill, 2002)
- Localized Particle Filter (Poterjoy, 2022)
Measurement Operators:
- Linear
- Quadratic
- Logarithmic
Installation
Pip:
python -m pip install DAPyr
Basic Usage
import DAPyr as dap
import numpy as np
# Use the Expt class to initialize an new experiment and calculate all necessary initial states
# Experiment will use Lorenz 63 (model_flag: 0), run for 300 time steps, and use the EnSRF method (expt_flag: 0)
expt = dap.Expt('Basic_L63', {'model_flag': 0, 'expt_flag': 0, 'T': 300})
# Run the experiment using the runDA function
dap.runDA(expt)
# Access RMSE and spread using the rmse and spread attributes
print('Avg. RMSE: {:.3f}'.format(np.mean(expt.rmse)))
print('Avg. Prior Spread: {:.3f}'.format(np.mean(expt.spread[:, 0])))
print('Avg. Posteriod Spread: {:.3f}'.format(np.mean(expt.spread[:, 1])))
#Save the experiment to filesystem using saveExpt, the file will be called it's experiment name
dap.saveExpt('./', expt)
#Load in previous experiments using loadExpt
expt2 = dap.loadExpt('./Basic_L63.expt')
For more examples, see tutorial.ipynb in src.
Citation
Please cite this repository if you use DAPyr in your research publications or presentations.
Contributions
Many thanks to the following for their contributions to DAPyr:
- Henry Santer (LPF Python implementation and many, many bug discoveries)
- Raelynn Wonacott (For advice on speeding up model integration using numba)
Acknowledgement
The development of this software is supported by the following funding sources:
- NSF CAREER Award #1848363
Project details
Release history Release notifications | RSS feed
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 dapyr-1.0.0.tar.gz.
File metadata
- Download URL: dapyr-1.0.0.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54b0fc010254e56c1602db02492999ec6ba29b6d23764db4cc34abbb5cb0ab72
|
|
| MD5 |
f75d1f1a77f87e388fa213a97497450e
|
|
| BLAKE2b-256 |
b32f556c96ced942c8c80eeea5207888b0fb618a1498545262df1e0af74285e4
|
Provenance
The following attestation bundles were made for dapyr-1.0.0.tar.gz:
Publisher:
publish.yml on nikolaitM/DAPyr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dapyr-1.0.0.tar.gz -
Subject digest:
54b0fc010254e56c1602db02492999ec6ba29b6d23764db4cc34abbb5cb0ab72 - Sigstore transparency entry: 771676059
- Sigstore integration time:
-
Permalink:
nikolaitM/DAPyr@46302751339e62eb3f97f4d9a8ed9110647d65e2 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/nikolaitM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@46302751339e62eb3f97f4d9a8ed9110647d65e2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file dapyr-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dapyr-1.0.0-py3-none-any.whl
- Upload date:
- Size: 25.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9991d9647b02a10dec50d3ad9e7c6a4649acda3b6d254e1a6a4cd1c611b2b8cd
|
|
| MD5 |
b8e6b57db4099865dd4b6a2738ceb854
|
|
| BLAKE2b-256 |
20dd42b43df87da2da8ae142b95c8f41e335579452d5c30d463cd34136ea3d64
|
Provenance
The following attestation bundles were made for dapyr-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on nikolaitM/DAPyr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dapyr-1.0.0-py3-none-any.whl -
Subject digest:
9991d9647b02a10dec50d3ad9e7c6a4649acda3b6d254e1a6a4cd1c611b2b8cd - Sigstore transparency entry: 771676065
- Sigstore integration time:
-
Permalink:
nikolaitM/DAPyr@46302751339e62eb3f97f4d9a8ed9110647d65e2 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/nikolaitM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@46302751339e62eb3f97f4d9a8ed9110647d65e2 -
Trigger Event:
release
-
Statement type: