File size: 5,217 Bytes
65350db | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | ---
license: other
license_name: sdrbench
license_link: https://sdrbench.github.io/
pretty_name: "SDRBench: S3D"
tags:
- scientific-data
- lossy-compression
- sdrbench
- hpc
- sz3
configs:
- config_name: files
data_files: files.jsonl
default: true
---
# SDRBench — S3D
Statistically planar premixed methane flame simulated with S3D (SNL): 11 variables on 500 x 500 x 500, double precision, little-endian.
> **Raw binary arrays, not an Arrow/Parquet dataset.** `datasets.load_dataset("sdrbench/s3d")` 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 S3D 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 `e1229e5a46`). `metadata/` holds
the original SDRBench property and template files. Kept in sync automatically by
[szcompressor/sdrbench](https://github.com/szcompressor/sdrbench).
- **Data provider:** Hemanth Kolla (SNL, hnkolla@sandia.gov)
- **Size:** 55.0 GB in 1 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("s3d")
print(ds.fields)
x = ds["CH4/1.1000E-03"] # numpy array, dtype <f8, shape (500, 500, 500)
# 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("s3d", 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/s3d", "s3d/stat_planar.1.1000E-03.field.d64", repo_type="dataset", revision="e1229e5a4606482948fd3e8272a1dd1ab645dc7e")
x = np.fromfile(p, dtype="<f8").reshape((11, 500, 500, 500))[0] # CH4 -> (500, 500, 500)
```
## Variants and fields
### `default` (default)
`sdrbench.dataset("s3d", "default")` — folder `s3d/` — 7 files, 55.0 GB, from [SDRBENCH-S3D.tar.gz](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/S3D/SDRBENCH-S3D.tar.gz).
5 time steps (t = 1.1e-3 ... 2.995e-3 s). Each stored file holds all 11 variables (variable x z x y x x); fields are zero-copy views per variable: mass fractions CH4, O2, CO, CO2, H2O, N2; temperature T (normalized by 120 K), pressure P (by 1.41837e5 Pa), velocities U, V, W (by 347.2 m/s).
11 variable(s) x 5 steps (1.1000E-03 ... 2.9950E-03): `ds.series("CH4")`, `ds["CH4", "1.1000E-03"]`.
| Field | dtype | Shape (C order) | File |
|---|---|---|---|
| `CH4/1.1000E-03` | `<f8` | 500 x 500 x 500 | `s3d/stat_planar.1.1000E-03.field.d64` [0] |
| `O2/1.1000E-03` | `<f8` | 500 x 500 x 500 | `s3d/stat_planar.1.1000E-03.field.d64` [1] |
| `CO/1.1000E-03` | `<f8` | 500 x 500 x 500 | `s3d/stat_planar.1.1000E-03.field.d64` [2] |
| `CO2/1.1000E-03` | `<f8` | 500 x 500 x 500 | `s3d/stat_planar.1.1000E-03.field.d64` [3] |
| `H2O/1.1000E-03` | `<f8` | 500 x 500 x 500 | `s3d/stat_planar.1.1000E-03.field.d64` [4] |
| `N2/1.1000E-03` | `<f8` | 500 x 500 x 500 | `s3d/stat_planar.1.1000E-03.field.d64` [5] |
| `T/1.1000E-03` | `<f8` | 500 x 500 x 500 | `s3d/stat_planar.1.1000E-03.field.d64` [6] |
| `P/1.1000E-03` | `<f8` | 500 x 500 x 500 | `s3d/stat_planar.1.1000E-03.field.d64` [7] |
| `U/1.1000E-03` | `<f8` | 500 x 500 x 500 | `s3d/stat_planar.1.1000E-03.field.d64` [8] |
| `V/1.1000E-03` | `<f8` | 500 x 500 x 500 | `s3d/stat_planar.1.1000E-03.field.d64` [9] |
| ... 45 more | | | |
Other files: `s3d/flist.txt`, `s3d/template.txt`
## Citation
Please cite SDRBench; `sdrbench cite s3d` 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.
|