You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
uxds.uxgrid data not all loaded during uxds.load() #1838
After calling uxds.load() for a UxDataset object, the grid has face_lon and face_lat which are dask arrays. Is this intentional? I would have expected there to be no dask arrays internally after calling uxds.load().
I believe this could cause slowdowns later if face_lon and face_lat are used more than once, as they would need to be re-loaded or re-computed each time.
I don't have time to look into this immediately, but FWIW: a quick chat with gemini (without any uxarray context) gave me this:
"
The One Exception: Lazy Coordinates
The only time you might still see Dask objects anywhere in the dataset structure is if your Xarray object has coordinate variables that were explicitly left uncomputed or are backed by a different lazy mechanism. However, for the data variables and standard coordinates, everything is fully evaluated and loaded into your local RAM.
"
I don't recall if we intentionally left those coords lazy, but I don't believe we did so (we have no load mechanism ourselves I think). I don't think we should keep them lazy either.
This needs a supported way to load grid data and avoid repeated computation. I’d keep grid loading explicit rather than automatically include it in .load(), since grids can be large and shared between arrays. We should document that behavior and keep load(), compute(), and persist() consistent.
@erogluorhan, I agree that users need a way to load the grid rather than leave it lazy. I’d prefer making that explicit instead of loading it automatically with the data, since a grid can be large and shared by multiple arrays. This would let users choose when to use the extra memory and avoid repeated computation.
I agree with @rajeeja , since the grid is not owned by the array loading the array should not end up loading the grid too. Explicitly documenting the behavior IMO should be the first step here.
Agreed in principle, but I'll add that the end-to-end chunking in #1789 is aiming for chunked grids, and if that's implemented fully, the ideal would probably be to load chunkwise, particularly if the data has the same chunking (hopefully it would).
Activity
erogluorhan commentedon Oct 22, 2026
I don't have time to look into this immediately, but FWIW: a quick chat with gemini (without any uxarray context) gave me this:
"
The One Exception: Lazy Coordinates
The only time you might still see Dask objects anywhere in the dataset structure is if your Xarray object has coordinate variables that were explicitly left uncomputed or are backed by a different lazy mechanism. However, for the data variables and standard coordinates, everything is fully evaluated and loaded into your local RAM.
"
I don't recall if we intentionally left those coords lazy, but I don't believe we did so (we have no load mechanism ourselves I think). I don't think we should keep them lazy either.
@rajeeja , @cmdupuis3 thoughts?
rajeeja commentedon Nov 11, 2026
This needs a supported way to load grid data and avoid repeated computation. I’d keep grid loading explicit rather than automatically include it in
.load(), since grids can be large and shared between arrays. We should document that behavior and keepload(),compute(), andpersist()consistent.rajeeja commentedon Nov 11, 2026
@erogluorhan, I agree that users need a way to load the grid rather than leave it lazy. I’d prefer making that explicit instead of loading it automatically with the data, since a grid can be large and shared by multiple arrays. This would let users choose when to use the extra memory and avoid repeated computation.
jayeshkrishna commentedon Nov 11, 2026
I agree with @rajeeja , since the grid is not owned by the array loading the array should not end up loading the grid too. Explicitly documenting the behavior IMO should be the first step here.
cmdupuis3 commentedon Nov 11, 2026
Agreed in principle, but I'll add that the end-to-end chunking in #1789 is aiming for chunked grids, and if that's implemented fully, the ideal would probably be to load chunkwise, particularly if the data has the same chunking (hopefully it would).