miranda / README.md
ayzk's picture
Update dataset card and file table
47962eb verified
|
Raw History Blame Contribute Delete
6.05 kB
---
license: other
license_name: sdrbench
license_link: https://sdrbench.github.io/
pretty_name: "SDRBench: Miranda"
tags:
- scientific-data
- lossy-compression
- sdrbench
- hpc
- sz3
configs:
- config_name: files
data_files: files.jsonl
default: true
---
# SDRBench — Miranda
Rayleigh-Taylor instability simulated with LLNL's Miranda hydrodynamics code.
> **Raw binary arrays, not an Arrow/Parquet dataset.** `datasets.load_dataset("sdrbench/miranda")` returns the table of files (`files.jsonl`: path, dtype, shape, sha256). Read the arrays with the `sdrbench` package or `hf_hub_download` + numpy as shown below.
This repository is an **unmodified mirror** of the Miranda data of [SDRBench](https://sdrbench.github.io/datasets.html), the
Scientific Data Reduction Benchmark. The originals are hosted by Argonne National Laboratory on Globus;
every archive was unpacked and its files uploaded byte-for-byte (sha256 verified) (revision `cd543db67f`). `metadata/` holds
the original SDRBench property and template files. Kept in sync automatically by
[szcompressor/sdrbench](https://github.com/szcompressor/sdrbench).
- **Data provider:** LLNL; contact Peter Lindstrom (lindstrom2@llnl.gov)
- **Size:** 118.1 GB in 2 variant(s)
- **Format:** raw little-endian binary, C order (slowest dimension first); dtype and shape per field below
## Usage
```bash
pip install "sdrbench[sz3]" # sdrbench + pysz (SZ3)
```
```python
import numpy as np
import sdrbench
from pysz import sz, szConfig, szErrorBoundMode
ds = sdrbench.dataset("miranda") # default variant "small"
print(ds.fields)
x = ds["density"] # numpy array, dtype <f8, shape (256, 384, 384)
# compress with SZ3 (pysz) at a 1e-3 value-range-relative error bound
conf = szConfig()
conf.errorBoundMode = szErrorBoundMode.REL
conf.relErrorBound = 1e-3
compressed, ratio = sz.compress(np.ascontiguousarray(x), conf)
y, _ = sz.decompress(compressed, x.dtype.type, x.shape)
max_err, psnr, nrmse = sz.verify(np.asarray(x), y)
print(f"ratio {ratio:.1f}x, PSNR {psnr:.1f} dB, max error {max_err:.3g}")
```
Files are fetched on first use (in parallel with `ds.download("data/")`) and cached, pinned to the revision
of the installed `sdrbench` release; if Hugging Face is unreachable the package falls back to the original
archive on Globus. Existing local SDRBench copies can be used with `sdrbench.dataset("miranda", root="/path")`.
Without the package, with `huggingface_hub` and numpy only:
```python
from huggingface_hub import hf_hub_download
import numpy as np
p = hf_hub_download("sdrbench/miranda", "256x384x384/density.d64", repo_type="dataset", revision="cd543db67fcb47de3c645312f2db9a27198a9af7")
x = np.fromfile(p, dtype="<f8").reshape((256, 384, 384))
```
## Variants and fields
### `small` (default)
`sdrbench.dataset("miranda", "small")` — folder `256x384x384/` — 7 files, 2.1 GB, from [SDRBENCH-Miranda-256x384x384.tar.gz](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/Miranda/SDRBENCH-Miranda-256x384x384.tar.gz).
7 fields of a 256 x 384 x 384 subdomain at an early time, double precision. pressure, viscocity and diffusivity are legacy (incorrect) names of time-derivative restart fields.
| Field | dtype | Shape (C order) | File |
|---|---|---|---|
| `density` | `<f8` | 256 x 384 x 384 | `256x384x384/density.d64` |
| `diffusivity` | `<f8` | 256 x 384 x 384 | `256x384x384/diffusivity.d64` |
| `pressure` | `<f8` | 256 x 384 x 384 | `256x384x384/pressure.d64` |
| `velocityx` | `<f8` | 256 x 384 x 384 | `256x384x384/velocityx.d64` |
| `velocityy` | `<f8` | 256 x 384 x 384 | `256x384x384/velocityy.d64` |
| `velocityz` | `<f8` | 256 x 384 x 384 | `256x384x384/velocityz.d64` |
| `viscocity` | `<f8` | 256 x 384 x 384 | `256x384x384/viscocity.d64` |
### `big`
`sdrbench.dataset("miranda", "big")` — folder `3072x3072x3072/` — 98 files, 116.0 GB, from [SDRBENCH-Miranda-3072x3072x3072.tar.gz](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/Miranda/SDRBENCH-Miranda-3072x3072x3072.tar.gz).
One 3072^3 single-precision density field at a late time, stored as 96 slabs density/00 ... density/95 of 32 x 3072 x 3072; ds.series('density').concatenate() joins them (116 GB).
1 variable(s) x 96 steps (00 ... 95): `ds.series("density")`, `ds["density", "00"]`.
| Field | dtype | Shape (C order) | File |
|---|---|---|---|
| `density/00` | `<f4` | 32 x 3072 x 3072 | `3072x3072x3072/density-00.f32` |
| `density/01` | `<f4` | 32 x 3072 x 3072 | `3072x3072x3072/density-01.f32` |
| `density/02` | `<f4` | 32 x 3072 x 3072 | `3072x3072x3072/density-02.f32` |
| `density/03` | `<f4` | 32 x 3072 x 3072 | `3072x3072x3072/density-03.f32` |
| `density/04` | `<f4` | 32 x 3072 x 3072 | `3072x3072x3072/density-04.f32` |
| `density/05` | `<f4` | 32 x 3072 x 3072 | `3072x3072x3072/density-05.f32` |
| `density/06` | `<f4` | 32 x 3072 x 3072 | `3072x3072x3072/density-06.f32` |
| `density/07` | `<f4` | 32 x 3072 x 3072 | `3072x3072x3072/density-07.f32` |
| `density/08` | `<f4` | 32 x 3072 x 3072 | `3072x3072x3072/density-08.f32` |
| `density/09` | `<f4` | 32 x 3072 x 3072 | `3072x3072x3072/density-09.f32` |
| ... 86 more | | | |
Other files: `3072x3072x3072/SDRBENCH-Miranda-3072x3072x3072-property.txt`, `3072x3072x3072/template_data-3072x3072x3072.txt`
## Citation
Please cite SDRBench; `sdrbench cite miranda` prints it:
```bibtex
@inproceedings{zhao2020sdrbench,
title = {{SDRBench}: Scientific Data Reduction Benchmark for Lossy Compressors},
author = {Zhao, Kai and Di, Sheng and Liang, Xin and Li, Sihuan and Tao, Dingwen and Chen, Zizhong and Cappello, Franck},
booktitle = {2020 IEEE International Conference on Big Data (Big Data)},
pages = {2716--2724},
year = {2020}
}
```
## License and terms
The data are distributed by the SDRBench team for research use under the terms of the original
data providers listed above (see the [SDRBench website](https://sdrbench.github.io/datasets.html)); please acknowledge them as
requested. Rights remain with the data providers.