Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: 2D chunks for all #285

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

jklymak
Copy link

@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.

None yet

1 participant