dartobsgen
A pip-installable Python package that generates non-overlapping DART obs_seq
files from pluggable observation data sources.
Documentation: https://crocodile-cesm.github.io/dartobsgen/
Install
cd /path/to/dartobsgen
pip install -e .
Quick Start
import datetime
from dartobsgen import ObsGenConfig, CrocLakeSource, generate_obs_sequences
config = ObsGenConfig(
start=datetime.datetime(2010, 5, 1), # model run start; first analysis is 06Z
# (or say it directly: first_analysis=...)
end=datetime.datetime(2010, 5, 3), # last analysis time (inclusive)
lat_min=5, lat_max=60,
lon_min=-100, lon_max=-30,
obs_types=["ARGO_TEMPERATURE", "ARGO_SALINITY"],
assimilation_frequency=datetime.timedelta(hours=6), # assimilate every 6 hours
output_dir="./obs_output",
)
source = CrocLakeSource(
crocolake_path="/path/to/crocolake/",
dart_path="/path/to/DART/",
)
# Sequential
written_files = generate_obs_sequences(config, source)
# Parallel (all CPUs)
written_files = generate_obs_sequences(config, source, max_workers=None)
# Parallel (fixed number of workers)
written_files = generate_obs_sequences(config, source, max_workers=4)
print(written_files)
Documentation
| Topic | |
|---|---|
Time windows — start vs first_analysis, window bounds |
docs |
Output file naming — the {S} seconds-of-day token |
docs |
| Observation types — naming styles and supported types | docs |
| Parallel generation | docs |
Spatial masking with trim_obs_seq |
docs |
Data sources — CrocoLake, NNJA-AI, perfect_model_obs |
docs |
| Adding a new data source | docs |
| API reference | docs |
Package Structure
dartobsgen/
├── pyproject.toml
├── README.md
├── docs/ # Sphinx documentation source
└── src/
└── dartobsgen/
├── __init__.py # Public API
├── config.py # ObsGenConfig dataclass
├── generate.py # generate_obs_sequences(), _make_analysis_windows()
├── model_state.py # ModelStateProvider ABC + MOM6StateProvider
├── spatial.py # trim_obs_seq(), polygon helpers
└── sources/
├── __init__.py
├── base.py # DataSource ABC + ObsSeqSource stub
├── crocolake.py # CrocLakeSource + DEFAULT_OBS_TYPE_MAP
├── nnja.py # NNJASource
└── perfect_model.py # PerfectModelSource + ObsNetworkEntry
Building the documentation
pip install -e ".[docs]"
sphinx-build -b html docs docs/_build/html
open docs/_build/html/index.html
Metadata
Release files for dartobsgen 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dartobsgen-0.1.2.tar.gz | 39.4 kB | Without provenance | Details for dartobsgen-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dartobsgen-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for dartobsgen-0.1.2-py3-none-any.whl |
Total release size: 75.5 kB
Release files / dartobsgen-0.1.2.tar.gz
| Download URL | dartobsgen-0.1.2.tar.gz |
|---|---|
| Size | 39.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43e70483f04b390ada5db586fa5fa78003b25fb3aef184371154b382f84dea6a
|
|
BLAKE2b-256 checksum How to use checksums |
5daa035e94ad0a913c99e7be306e8a55c3024d05ab4ceaf8f8880a92869119e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / dartobsgen-0.1.2-py3-none-any.whl
| Download URL | dartobsgen-0.1.2-py3-none-any.whl |
|---|---|
| Size | 36.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6bcacd7e09bac1b4e2215674a73f820460f1a1532a5485bc1b4957ed568a3347
|
|
BLAKE2b-256 checksum How to use checksums |
252b67b34ffb17431642bc82144576a52951222b21867d8ed38ca332c3f9f4bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for dartobsgen 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.