Skip to content

Conversation

jklymak
Copy link
Contributor

@jklymak jklymak commented Sep 27, 2021

This allows 2D chunking for all mds files, not just the LLC cases.

This is a total hack at this point/proof of concept. However, it works for me, and allows me to get 2-D chunks and parallel work on a machine that doesn't have enough memory for my model run (for some reason I can't discern - each variable is only 5 Gb).

  • needs docs
  • needs tests
  • probably needs to be properly interested with the other chunking options.
with xm.open_mdsdataset(data_dir, prefix=['means'], 
                                endian="<", geometry='cartesian',
                                chunks="2D") as ds:
   print(ds)

Here Nz=400:

...
Data variables:
    VVEL     (time, Z, YG, XC) float64 dask.array<chunksize=(1, 1, 1216, 1440), meta=np.ndarray>
    UVEL     (time, Z, YC, XG) float64 dask.array<chunksize=(1, 1, 1216, 1440), meta=np.ndarray>
    THETA    (time, Z, YC, XC) float64 dask.array<chunksize=(1, 1, 1216, 1440), meta=np.ndarray>
...

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.

1 participant