Skip to content

Implement vertical chunking#222

Open
tomsail wants to merge 3 commits into
schism-dev:masterfrom
tomsail:master
Open

Implement vertical chunking#222
tomsail wants to merge 3 commits into
schism-dev:masterfrom
tomsail:master

Conversation

@tomsail
Copy link
Copy Markdown

@tomsail tomsail commented May 22, 2026

this PR addresses #220

claude and others added 3 commits May 22, 2026 14:55
3D scribed outputs (temperature, salinity, velocity, tracers, ...) were
written with a single chunk per record covering the whole volume
(nvrt x nhoriz x 1). On large meshes this hits the 4 GB chunk ceiling
and makes level-wise reads with xarray / ParaView load the entire
volume just to slice one layer.

Add an SCHOUT namelist switch `nchunk_vrt` controlling vertical
chunking in nc_writeout3D:
  0   - legacy behaviour (whole-volume chunk per time step)
  N>0 - N layers per chunk; default 1 (one layer per chunk)

Also auto-shrink the horizontal chunk dimension when the configured
shape exceeds the 4 GB netCDF-4 limit, instead of aborting outright.
…-9jbNB

Claude/3d export vertical chunking 9jb nb
@pmav99
Copy link
Copy Markdown
Contributor

pmav99 commented May 22, 2026

@tomsail maybe we should rethink the name nchunk_vrt, I think it is a bit misleading. nchunk implies "number of chunks" (matching nproc, nspool etc) while it actually is "number of layers per chunk", is it not?

Maybe something like chunk_size_vrt would be cleaner? Which would also also allow a potential future chunk_size_hrz

@josephzhang8
Copy link
Copy Markdown
Member

I can make the change after accepting the PR. Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants