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
xarray.open_mfdataset can be unusably slow when loading in actualy model data instead of the example data. This is a known thing and there's a lot of discussion of it on the web. A central long running set of forum posts:
It looks like we had this implemented at some point but it has been commented out. Also the addition of this with statement before using open_mfdataset:
with dask.config.set(**{'array.slicing.split_large_chunks': True}):
Seems to improve performance (or makes warnings be quiet anyway). So:
Managed to solve my problem, so maybe not necessary. The first file of the model output had an extra variable (pot_density), which was inconsistent with the rest of the files. Therefore open_mfdataset was having a hard time (it must look for common file structures and can't handle differences very well). The solution above still fixes that problem in this use case. I imagine this situation could be relatively common though, so still something to keep in mind.
xarray.open_mfdataset
can be unusably slow when loading in actualy model data instead of the example data. This is a known thing and there's a lot of discussion of it on the web. A central long running set of forum posts:pydata/xarray#1385
I think getting a multi-file load working well and quickly in COAsT is essential. There are some potential solutions here:
https://xarray.pydata.org/en/stable/io.html#reading-multi-file-datasets
The suggested use of
compat=override
seems to significantly improve performance for me. For example:It looks like we had this implemented at some point but it has been commented out. Also the addition of this with statement before using
open_mfdataset
:Seems to improve performance (or makes warnings be quiet anyway). So:
Currently, this piece of code is:
AC:
Find and implement the best selection of arguments for using open_mfdataset with multiple NEMO data files.
The text was updated successfully, but these errors were encountered: