Why is loading data from a file so slow? #5103
-
I have a netCDF file that is derived from the ERA-5 dataset, originally downloaded using the However, when I load the exact same file into an iris cube with How comes the data is loaded so slowly with iris? It should be possible to load it much quicker, judging from how fast ncview can play back the content, so how comes that it doesn't load that quickly? (For anyone who is wondering, the netCDF file is chuncked, with each time point being one chunk (which is also what I'm loading separately into my script), has the format netCDF-4, and follows the CF-1.7 convention (whatever that is), according to |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hi @krikru, thanks for getting in touch. We don't have an immediate explanation - we would need to do some investigation. What specifically are you downloading via |
Beta Was this translation helpful? Give feedback.
-
Ping @pp-mo |
Beta Was this translation helpful? Give feedback.
Hi @krikru, thanks for your patience.
I've finally had time to try replicating your observations, like you suggested.
I won't think any more about whether Xarray is loading lazily or not: in my script your observations hold true with both lazy AND eager loading.
The implementation of lazy loading is complex, so it is inevitable that Xarray and Iris have made different choices about how to do this. @pp-mo and I have spent an hour trying different things but have not isolated the cause of the performance difference, however I'm not especially surprised: