spatial_coordinates listlengths 8.39k 8.39k | phi_coords listlengths 128 128 | theta_coords listlengths 1 1 | lat_coords listlengths 128 128 | time_coordinates listlengths 61 61 | u_initial listlengths 2 2 | h_initial listlengths 128 128 | vorticity_initial listlengths 128 128 | u_trajectory listlengths 61 61 | h_trajectory listlengths 61 61 | vorticity_trajectory listlengths 61 61 | alpha float64 0.05 0.6 | beta float64 0.02 0.3 | lat2 float64 0.53 2.59 | R float64 1 1 | Omega float64 0.26 0.26 | nu float64 0 0 | g float64 19.9 19.9 | H float64 0 0 | Nphi int64 128 128 | Ntheta int64 64 64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
[[-0.02454369260617026,3.141592653589793],[-0.02454369260617026,0.024933275028490423],[-0.0245436926(...TRUNCATED) | [[0.0],[0.04908738521234052],[0.09817477042468103],[0.14726215563702155],[0.19634954084936207],[0.24(...TRUNCATED) | [[3.104308909849477,3.0560109047532484,3.007427674642984,2.958780001133447,2.910107883989908,2.86142(...TRUNCATED) | [[-1.5335125830545806,-1.4852145779583519,-1.4366313478480874,-1.3879836743385505,-1.339311557195011(...TRUNCATED) | [0.0,9.999999999999998,20.000000000000004,30.000000000000075,39.99999999999997,49.99999999999983,59.(...TRUNCATED) | [[[4.571372693075237e-6,-2.9860718710145705e-6,2.3676374503556934e-6,-2.0095433606558997e-6,1.764626(...TRUNCATED) | [[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.00(...TRUNCATED) | [[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,-(...TRUNCATED) | [[[[4.571372693069651e-6,-2.9860718710024604e-6,2.3676374503605503e-6,-2.009543360644702e-6,1.764626(...TRUNCATED) | [[[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.0(...TRUNCATED) | [[[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,(...TRUNCATED) | 0.255997 | 0.2862 | 2.056683 | 1 | 0.262512 | 0 | 19.947174 | 0.00157 | 128 | 64 |
[[-0.02454369260617026,3.141592653589793],[-0.02454369260617026,0.024933275028490423],[-0.0245436926(...TRUNCATED) | [[0.0],[0.04908738521234052],[0.09817477042468103],[0.14726215563702155],[0.19634954084936207],[0.24(...TRUNCATED) | [[3.104308909849477,3.0560109047532484,3.007427674642984,2.958780001133447,2.910107883989908,2.86142(...TRUNCATED) | [[-1.5335125830545806,-1.4852145779583519,-1.4366313478480874,-1.3879836743385505,-1.339311557195011(...TRUNCATED) | [0.0,9.999999999999998,20.000000000000004,30.000000000000075,39.99999999999997,49.99999999999983,59.(...TRUNCATED) | [[[4.571372693075237e-6,-2.9860718710145705e-6,2.3676374503556934e-6,-2.0095433606558997e-6,1.764626(...TRUNCATED) | [[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.00(...TRUNCATED) | [[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,-(...TRUNCATED) | [[[[4.571372693069651e-6,-2.9860718710024604e-6,2.3676374503605503e-6,-2.009543360644702e-6,1.764626(...TRUNCATED) | [[[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.0(...TRUNCATED) | [[[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,(...TRUNCATED) | 0.379262 | 0.063685 | 0.850313 | 1 | 0.262512 | 0 | 19.947174 | 0.00157 | 128 | 64 |
[[-0.02454369260617026,3.141592653589793],[-0.02454369260617026,0.024933275028490423],[-0.0245436926(...TRUNCATED) | [[0.0],[0.04908738521234052],[0.09817477042468103],[0.14726215563702155],[0.19634954084936207],[0.24(...TRUNCATED) | [[3.104308909849477,3.0560109047532484,3.007427674642984,2.958780001133447,2.910107883989908,2.86142(...TRUNCATED) | [[-1.5335125830545806,-1.4852145779583519,-1.4366313478480874,-1.3879836743385505,-1.339311557195011(...TRUNCATED) | [0.0,9.999999999999998,20.000000000000004,30.000000000000075,39.99999999999997,49.99999999999983,59.(...TRUNCATED) | [[[4.571372693075237e-6,-2.9860718710145705e-6,2.3676374503556934e-6,-2.0095433606558997e-6,1.764626(...TRUNCATED) | [[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.00(...TRUNCATED) | [[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,-(...TRUNCATED) | [[[[4.571372693069651e-6,-2.9860718710024604e-6,2.3676374503605503e-6,-2.009543360644702e-6,1.764626(...TRUNCATED) | [[[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.0(...TRUNCATED) | [[[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,(...TRUNCATED) | 0.081946 | 0.262529 | 1.782571 | 1 | 0.262512 | 0 | 19.947174 | 0.00157 | 128 | 64 |
[[-0.02454369260617026,3.141592653589793],[-0.02454369260617026,0.024933275028490423],[-0.0245436926(...TRUNCATED) | [[0.0],[0.04908738521234052],[0.09817477042468103],[0.14726215563702155],[0.19634954084936207],[0.24(...TRUNCATED) | [[3.104308909849477,3.0560109047532484,3.007427674642984,2.958780001133447,2.910107883989908,2.86142(...TRUNCATED) | [[-1.5335125830545806,-1.4852145779583519,-1.4366313478480874,-1.3879836743385505,-1.339311557195011(...TRUNCATED) | [0.0,9.999999999999998,20.000000000000004,30.000000000000075,39.99999999999997,49.99999999999983,59.(...TRUNCATED) | [[[4.571372693075237e-6,-2.9860718710145705e-6,2.3676374503556934e-6,-2.0095433606558997e-6,1.764626(...TRUNCATED) | [[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.00(...TRUNCATED) | [[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,-(...TRUNCATED) | [[[[4.571372693069651e-6,-2.9860718710024604e-6,2.3676374503605503e-6,-2.009543360644702e-6,1.764626(...TRUNCATED) | [[[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.0(...TRUNCATED) | [[[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,(...TRUNCATED) | 0.43944 | 0.025764 | 2.554973 | 1 | 0.262512 | 0 | 19.947174 | 0.00157 | 128 | 64 |
[[-0.02454369260617026,3.141592653589793],[-0.02454369260617026,0.024933275028490423],[-0.0245436926(...TRUNCATED) | [[0.0],[0.04908738521234052],[0.09817477042468103],[0.14726215563702155],[0.19634954084936207],[0.24(...TRUNCATED) | [[3.104308909849477,3.0560109047532484,3.007427674642984,2.958780001133447,2.910107883989908,2.86142(...TRUNCATED) | [[-1.5335125830545806,-1.4852145779583519,-1.4366313478480874,-1.3879836743385505,-1.339311557195011(...TRUNCATED) | [0.0,9.999999999999998,20.000000000000004,30.000000000000075,39.99999999999997,49.99999999999983,59.(...TRUNCATED) | [[[4.571372693075237e-6,-2.9860718710145705e-6,2.3676374503556934e-6,-2.0095433606558997e-6,1.764626(...TRUNCATED) | [[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.00(...TRUNCATED) | [[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,-(...TRUNCATED) | [[[[4.571372693069651e-6,-2.9860718710024604e-6,2.3676374503605503e-6,-2.009543360644702e-6,1.764626(...TRUNCATED) | [[[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.0(...TRUNCATED) | [[[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,(...TRUNCATED) | 0.507843 | 0.079455 | 0.904412 | 1 | 0.262512 | 0 | 19.947174 | 0.00157 | 128 | 64 |
[[-0.02454369260617026,3.141592653589793],[-0.02454369260617026,0.024933275028490423],[-0.0245436926(...TRUNCATED) | [[0.0],[0.04908738521234052],[0.09817477042468103],[0.14726215563702155],[0.19634954084936207],[0.24(...TRUNCATED) | [[3.104308909849477,3.0560109047532484,3.007427674642984,2.958780001133447,2.910107883989908,2.86142(...TRUNCATED) | [[-1.5335125830545806,-1.4852145779583519,-1.4366313478480874,-1.3879836743385505,-1.339311557195011(...TRUNCATED) | [0.0,9.999999999999998,20.000000000000004,30.000000000000075,39.99999999999997,49.99999999999983,59.(...TRUNCATED) | [[[4.571372693075237e-6,-2.9860718710145705e-6,2.3676374503556934e-6,-2.0095433606558997e-6,1.764626(...TRUNCATED) | [[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.00(...TRUNCATED) | [[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,-(...TRUNCATED) | [[[[4.571372693069651e-6,-2.9860718710024604e-6,2.3676374503605503e-6,-2.009543360644702e-6,1.764626(...TRUNCATED) | [[[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.0(...TRUNCATED) | [[[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,(...TRUNCATED) | 0.150872 | 0.105188 | 1.622646 | 1 | 0.262512 | 0 | 19.947174 | 0.00157 | 128 | 64 |
[[-0.02454369260617026,3.141592653589793],[-0.02454369260617026,0.024933275028490423],[-0.0245436926(...TRUNCATED) | [[0.0],[0.04908738521234052],[0.09817477042468103],[0.14726215563702155],[0.19634954084936207],[0.24(...TRUNCATED) | [[3.104308909849477,3.0560109047532484,3.007427674642984,2.958780001133447,2.910107883989908,2.86142(...TRUNCATED) | [[-1.5335125830545806,-1.4852145779583519,-1.4366313478480874,-1.3879836743385505,-1.339311557195011(...TRUNCATED) | [0.0,9.999999999999998,20.000000000000004,30.000000000000075,39.99999999999997,49.99999999999983,59.(...TRUNCATED) | [[[4.571372693075237e-6,-2.9860718710145705e-6,2.3676374503556934e-6,-2.0095433606558997e-6,1.764626(...TRUNCATED) | [[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.00(...TRUNCATED) | [[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,-(...TRUNCATED) | [[[[4.571372693069651e-6,-2.9860718710024604e-6,2.3676374503605503e-6,-2.009543360644702e-6,1.764626(...TRUNCATED) | [[[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.0(...TRUNCATED) | [[[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,(...TRUNCATED) | 0.28757 | 0.101544 | 1.80506 | 1 | 0.262512 | 0 | 19.947174 | 0.00157 | 128 | 64 |
[[-0.02454369260617026,3.141592653589793],[-0.02454369260617026,0.024933275028490423],[-0.0245436926(...TRUNCATED) | [[0.0],[0.04908738521234052],[0.09817477042468103],[0.14726215563702155],[0.19634954084936207],[0.24(...TRUNCATED) | [[3.104308909849477,3.0560109047532484,3.007427674642984,2.958780001133447,2.910107883989908,2.86142(...TRUNCATED) | [[-1.5335125830545806,-1.4852145779583519,-1.4366313478480874,-1.3879836743385505,-1.339311557195011(...TRUNCATED) | [0.0,9.999999999999998,20.000000000000004,30.000000000000075,39.99999999999997,49.99999999999983,59.(...TRUNCATED) | [[[4.571372693075237e-6,-2.9860718710145705e-6,2.3676374503556934e-6,-2.0095433606558997e-6,1.764626(...TRUNCATED) | [[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.00(...TRUNCATED) | [[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,-(...TRUNCATED) | [[[[4.571372693069651e-6,-2.9860718710024604e-6,2.3676374503605503e-6,-2.009543360644702e-6,1.764626(...TRUNCATED) | [[[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.0(...TRUNCATED) | [[[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,(...TRUNCATED) | 0.126722 | 0.101801 | 1.290905 | 1 | 0.262512 | 0 | 19.947174 | 0.00157 | 128 | 64 |
[[-0.02454369260617026,3.141592653589793],[-0.02454369260617026,0.024933275028490423],[-0.0245436926(...TRUNCATED) | [[0.0],[0.04908738521234052],[0.09817477042468103],[0.14726215563702155],[0.19634954084936207],[0.24(...TRUNCATED) | [[3.104308909849477,3.0560109047532484,3.007427674642984,2.958780001133447,2.910107883989908,2.86142(...TRUNCATED) | [[-1.5335125830545806,-1.4852145779583519,-1.4366313478480874,-1.3879836743385505,-1.339311557195011(...TRUNCATED) | [0.0,9.999999999999998,20.000000000000004,30.000000000000075,39.99999999999997,49.99999999999983,59.(...TRUNCATED) | [[[4.571372693075237e-6,-2.9860718710145705e-6,2.3676374503556934e-6,-2.0095433606558997e-6,1.764626(...TRUNCATED) | [[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.00(...TRUNCATED) | [[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,-(...TRUNCATED) | [[[[4.571372693069651e-6,-2.9860718710024604e-6,2.3676374503605503e-6,-2.009543360644702e-6,1.764626(...TRUNCATED) | [[[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.0(...TRUNCATED) | [[[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,(...TRUNCATED) | 0.300838 | 0.239849 | 0.941795 | 1 | 0.262512 | 0 | 19.947174 | 0.00157 | 128 | 64 |
[[-0.02454369260617026,3.141592653589793],[-0.02454369260617026,0.024933275028490423],[-0.0245436926(...TRUNCATED) | [[0.0],[0.04908738521234052],[0.09817477042468103],[0.14726215563702155],[0.19634954084936207],[0.24(...TRUNCATED) | [[3.104308909849477,3.0560109047532484,3.007427674642984,2.958780001133447,2.910107883989908,2.86142(...TRUNCATED) | [[-1.5335125830545806,-1.4852145779583519,-1.4366313478480874,-1.3879836743385505,-1.339311557195011(...TRUNCATED) | [0.0,9.999999999999998,20.000000000000004,30.000000000000075,39.99999999999997,49.99999999999983,59.(...TRUNCATED) | [[[4.571372693075237e-6,-2.9860718710145705e-6,2.3676374503556934e-6,-2.0095433606558997e-6,1.764626(...TRUNCATED) | [[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.00(...TRUNCATED) | [[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,-(...TRUNCATED) | [[[[4.571372693069651e-6,-2.9860718710024604e-6,2.3676374503605503e-6,-2.009543360644702e-6,1.764626(...TRUNCATED) | [[[0.000024828239248106417,0.00002482831011044116,0.00002482821634941272,0.000024828326879962653,0.0(...TRUNCATED) | [[[-0.000013773367801194891,0.000020715566332955003,-0.00002589383533540795,0.000030191261018673048,(...TRUNCATED) | 0.332829 | 0.185876 | 0.620884 | 1 | 0.262512 | 0 | 19.947174 | 0.00157 | 128 | 64 |
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Shallow Water Equations Dataset
Numerical solutions to the viscous shallow water equations on a sphere using spectral methods.
Equations
The dataset simulates the viscous shallow water equations on a rotating sphere:
Momentum equation:
∂u/∂t + ν∇⁴u + g∇h + 2Ω × u = -u·∇u
Continuity equation:
∂h/∂t + ν∇⁴h + H∇·u = -∇·(hu)
Where:
- u is the velocity field (2-component vector)
- h is the height perturbation field
- ν is kinematic viscosity
- g is gravitational acceleration
- Ω is the Earth's rotation vector
- H is the mean fluid height
Variables
The dataset returns a dictionary with the following fields:
Coordinates
spatial_coordinates: (Nphi×Ntheta, 2) - Flattened (phi, theta) coordinate pairsphi_coords: (Nphi, Ntheta) - Longitude gridtheta_coords: (Nphi, Ntheta) - Colatitude gridlat_coords: (Nphi, Ntheta) - Latitude gridtime_coordinates: (time_steps,) - Time points in hours
Initial Conditions
u_initial: (2, Nphi, Ntheta) - Initial velocity fieldh_initial: (Nphi, Ntheta) - Initial height perturbationvorticity_initial: (Nphi, Ntheta) - Initial vorticity field
Solution Trajectories
u_trajectory: (time_steps, 2, Nphi, Ntheta) - Velocity field evolutionh_trajectory: (time_steps, Nphi, Ntheta) - Height field evolutionvorticity_trajectory: (time_steps, Nphi, Ntheta) - Vorticity field evolution
Physical Parameters
alpha: Perturbation width parameterbeta: Perturbation latitude scale parameterR: Earth radius (6.37122×10⁶ m)Omega: Earth rotation rate (7.292×10⁻⁵ rad/s)nu: Kinematic viscosityg: Gravitational acceleration (9.80616 m/s²)H: Mean fluid height (10⁴ m)
Grid Parameters
Nphi: Number of longitude pointsNtheta: Number of latitude points
Dataset Parameters
- Domain: Spherical surface (φ ∈ [0, 2π], θ ∈ [0, π])
- Default grid: 256×128 (longitude × latitude)
- Time range: 0 to 360 hours (default)
- Spatial resolution: Spectral (dealiased at 3/2 factor)
- Temporal resolution: 600 seconds (10 minutes)
- Save interval: Every 5 hours (default)
Physical Parameters
- Earth radius: R = 6.37122×10⁶ m
- Rotation rate: Ω = 7.292×10⁻⁵ rad/s
- Viscosity: ν = 1×10⁵ m²/s / 32² (Reynolds number dependent)
- Gravity: g = 9.80616 m/s²
- Mean height: H = 10⁴ m
- Jet maximum velocity: 80 m/s
- Perturbation amplitude: 120 m
Random Parameters (per sample)
- Alpha range: [0.05, 0.6] - Controls perturbation width in longitude
- Beta range: [0.02, 0.3] - Controls perturbation width in latitude
Physical Context
This dataset simulates atmospheric or oceanic flows on a rotating sphere governed by the shallow water equations. The system models large-scale geophysical fluid dynamics, including:
- Zonal jet streams with realistic velocity profiles
- Geostrophic balance between pressure gradients and Coriolis forces
- Rossby waves and other planetary-scale motions
- Vorticity dynamics in rotating reference frames
Each sample begins with a balanced zonal jet (resembling atmospheric jet streams) perturbed by a localized height anomaly. The evolution showcases:
- Jet instability and wave breaking
- Vortex formation and interaction
- Energy cascades in geophysical turbulence
- Conservation of potential vorticity
This dataset is relevant for:
- Atmospheric and oceanic modeling
- Climate dynamics
- Geophysical fluid dynamics research
- Weather prediction algorithms
- Machine learning for Earth system modeling
Usage
from dataset import ShallowWaterDataset
# Create dataset
dataset = ShallowWaterDataset(
Nphi=256, # Longitude points
Ntheta=128, # Latitude points
stop_sim_time=360, # Hours
save_interval=5 # Save every 5 hours
)
# Generate a sample
sample = next(iter(dataset))
# Access solution data
u_evolution = sample["u_trajectory"] # Velocity field
h_evolution = sample["h_trajectory"] # Height field
vorticity = sample["vorticity_trajectory"] # Vorticity field
times = sample["time_coordinates"] # Time points
alpha, beta = sample["alpha"], sample["beta"] # Parameters
Visualization
Run the plotting scripts to visualize samples:
python plot_sample.py # 4-panel static visualization on sphere
python plot_animation.py # Animated vorticity evolution
The plotting functions create 3D spherical visualizations showing the evolution of vorticity fields over time, with proper Earth-like pole orientation.
Data Generation
Generate the full dataset:
python generate_data.py
This creates train/test splits saved as chunked parquet files in the data/ directory. The generation uses smaller default parameters (128×64 grid, 100-hour simulations) for efficiency while maintaining the same physics.
File Structure
datasets-shallow-water-dedalus/
├── dataset.py # Main dataset class
├── plot_sample.py # 4-panel spherical visualization
├── plot_animation.py # Animated GIF generation
├── generate_data.py # Dataset generation script
├── requirements.txt # Python dependencies
├── README.md # This file
└── sample_plot.png # Example visualization
- Downloads last month
- 19
