Skip to content

Commit

Permalink
🗃️ Chunk ATL11 dataset along cycle_number when loading
Browse files Browse the repository at this point in the history
Reading in all our ATL11 Zarr files in chunks of 6 along "cycle_number". Should be a bit more optimal (fingers crossed) when calculating along the time dimension, compared to having chunks with 2 "cycle_number"s before. Needed for what is coming next - calculating dhdt over Antarctica! But first, we'll need to package up some of the functions properly.
  • Loading branch information
weiji14 committed May 27, 2020
1 parent 4c91dfe commit d34455d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions atl11_play.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,11 @@
},
"outputs": [],
"source": [
"# Load dataset from all Zarr stores\n",
"# Aligning chunks spatially along cycle_number (i.e. time)\n",
"ds = xr.open_mfdataset(\n",
" paths=stores,\n",
" chunks={\"cycle_number\": 6},\n",
" group=\"pt123\",\n",
" engine=\"zarr\",\n",
" combine=\"nested\",\n",
Expand Down
3 changes: 3 additions & 0 deletions atl11_play.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@
print(f"{len(stores)} reference ground track Zarr stores")

# %%
# Load dataset from all Zarr stores
# Aligning chunks spatially along cycle_number (i.e. time)
ds = xr.open_mfdataset(
paths=stores,
chunks={"cycle_number": 6},
group="pt123",
engine="zarr",
combine="nested",
Expand Down

0 comments on commit d34455d

Please sign in to comment.