Replace calls to S.where in grid.py with subscript notation for the purposes of increasing performance on large datasets and decreasing memory usage.
Apparently where with drop=true creates a copy of the DataArray, using large amounts of memory and taking large amounts of time for large data sets. Subscript notation just creates a view into the existing memory space.
Replace calls to
S.where
in grid.py with subscript notation for the purposes of increasing performance on large datasets and decreasing memory usage.where
with drop=true creates a copy of the DataArray, using large amounts of memory and taking large amounts of time for large data sets. Subscript notation just creates a view into the existing memory space.Automatic IDE code "cleanup" (sorry!)