--- pretty_name: "Shock Caps (shock-caps)" license: cc-by-4.0 tags: - physics - pde - sphere - shallow-water - hyperbolic - shock-waves - riemann-problem size_categories: - n<1K --- # Shock Caps (shock-caps) **One line description of the data:** 500 shallow-water simulations on the sphere initialized with random spherical caps. **Longer description of the data:** Shock Caps solves the rotation-free shallow-water equations on the unit sphere. Each simulation starts from randomly placed geodesic caps with piecewise-constant fluid depth and horizontal velocity, surrounded by a similarly randomized background state. Discontinuities at cap boundaries produce expanding bores, multi-shock collisions, and antipodal convergence as fronts propagate around the sphere. We vary the number of caps \\(K\\) and the initial velocity scaling \\(\delta\\). Depth jumps are independent of \\(\delta\\), so pressure imbalances drive shock dynamics even when the initial velocities vanish. The dataset captures interactions between discontinuities on a curved, closed domain, with cap boundaries that are not aligned with the computational grid. **Code or software used to generate the data**: [Clawpack/PyClaw](https://www.clawpack.org/), using the `riemann.shallow_sphere_2D` Riemann kernel and the `classic2_sw_sphere` Fortran time-step module. The solver uses high-resolution finite-volume wave propagation with an MC limiter and transverse-wave corrections. Visualization: ## About the data **Dimension of discretized data:** 101 snapshots per trajectory (1.5 non-dimensional time units, sampled every 0.015) on a \\(256 \times 512\\) (lat × lon) grid. **Fields available in the data:** | HDF5 path | Shape | Units | Description | |---|---|---|---| | `t0_fields/height` | `(1, 101, 256, 512)` | dimensionless | Fluid depth \\(h\\) | | `t1_fields/momentum` | `(1, 101, 256, 512, 2)` | dimensionless | Depth-integrated momentum; last axis is `[hu, hv]` (eastward, northward) | | `scalars/{K, delta, seed}` | `()` | — | Run parameters (stored as floats) | | `dimensions/{time, lat, lon}` | `(101,)`, `(256,)`, `(512,)` | —, °, ° | Coordinates | All fields are stored as `float32`; the time coordinate is stored as `float64`. Cartesian momentum components are remapped to the output grid before projection onto its local east/north basis. **Number of trajectories:** 500: \\(5 \times 5\\) parameter combinations, each with 20 seeds. 400/50/50 train/validation/test split in `data/{train,valid,test}/`, stratified jointly on \\((K, \delta)\\). **Estimated size of the ensemble of all simulations:** 63 GB (gzip-compressed HDF5). **Storage format:** One HDF5 file per run, chunked as `(1, 7, 32, 64)` in (trajectory, time, lat, lon). Normalization statistics computed on the train split are in `stats.yaml`. **Grid type:** \\(256 \times 512\\) equiangular, pole-excluding latitude–longitude grid. **Initial conditions:** \\(K\\) geodesic caps with centers drawn uniformly on the sphere and angular radii drawn uniformly from \\([0.3, 1.0]\\) rad. Each cap and the background receive independently sampled primitive states with \\(h \in [0.5, 2.0]\\) and \\(u, v \in [-0.5\delta, 0.5\delta]\\), all sampled uniformly. Higher-index caps overwrite lower-index caps where they overlap. Initial conditions use \\(4 \times 4\\) sub-cell sampling to reduce staircase artifacts at cap boundaries. **Boundary conditions:** Spherical. **Simulation time-step \\((\Delta t)\\):** Adaptive, controlled internally by Clawpack with a target CFL of 0.45 and a maximum permitted CFL of 0.9. **Data are stored separated by \\((\delta t)\\):** 0.015 non-dimensional time units. **Total time range \\((t_\textup{min}\\) to \\(t_\textup{max})\\):** \\(0\\) to \\(1.5\\), including the initial condition. **Set of coefficients or non-dimensional parameters evaluated:** - `K` \\(\in \{1, 2, 4, 8, 16\}\\), the number of spherical caps - `delta` \\(= \delta \in \{0.0, 0.25, 0.5, 0.75, 1.0\}\\), the initial velocity scaling; depth jumps are not scaled - `seed` \\(\in \{0, \ldots, 19\}\\), determining cap centers, radii, cap states, and the background state The sphere radius is fixed at \\(R = 1\\) and gravitational acceleration at \\(g = 9.80616\\), both non-dimensional. No Coriolis term is included. **Approximate time to generate the data:** Approximately 20 minutes per run. **Hardware used to generate the data:** One sciCORE compute node at the University of Basel per run, using OpenMP-parallel Clawpack with 16 threads. ## Loading Download a single run (≈125 MB) and read it with `h5py`: ```python import h5py from huggingface_hub import hf_hub_download path = hf_hub_download("sada-group/shock-caps", "data/test/run_0008.h5", repo_type="dataset") with h5py.File(path, "r") as f: h = f["t0_fields/height"][0] # (101, 256, 512) hu, hv = f["t1_fields/momentum"][0].transpose(3, 0, 1, 2) params = {k: f["scalars"][k][()] for k in f["scalars"]} ``` To download a whole split (or the full 63 GB dataset), use `snapshot_download` with `allow_patterns`: ```python from huggingface_hub import snapshot_download root = snapshot_download( "sada-group/shock-caps", repo_type="dataset", allow_patterns=["data/test/*", "stats.*"], # drop allow_patterns for everything ) ``` Please cite the associated paper if you use this data in your research: ```bibtex @misc{muser2026dandelionsphericalflowerneural, title={Dandelion: A Spherical Flower for Neural Simulation of Planetary Dynamics}, author={Till Muser and Giovanni Abati and Ivan Dokmanić}, year={2026}, eprint={2608.27521}, archivePrefix={arXiv}, primaryClass={cs.LG}, url={https://arxiv.org/abs/2608.27521}, } ``` as well as the solver and the spherical finite-volume method: ```bibtex @article{mandli2016clawpack, title={Clawpack: building an open source ecosystem for solving hyperbolic PDEs}, author={Mandli, Kyle T and Ahmadia, Aron J and Berger, Marsha and Calhoun, Donna and George, David L and Hadjimichael, Yiannis and Ketcheson, David I and Lemoine, Grady I and LeVeque, Randall J}, journal={PeerJ Computer Science}, volume={2}, pages={e68}, year={2016}, publisher={PeerJ Inc.} } @article{calhoun2008logically, title={Logically rectangular grids and finite volume methods for {PDE}s in circular and spherical domains}, author={Calhoun, Donna A and Helzel, Christiane and LeVeque, Randall J}, journal={SIAM Review}, volume={50}, number={4}, pages={723--752}, year={2008}, publisher={SIAM} } ```