xarray-contrib / xeofs

Comprehensive EOF analysis in Python with xarray: A versatile, multidimensional, and scalable tool for advanced climate data analysis
https://xeofs.readthedocs.io/
MIT License
98 stars 18 forks source link

Cross-set models run out of memory #220

Closed nicrie closed 1 week ago

nicrie commented 1 week ago

By mistake I set unwhiten_only=False in the back transformation of the PCA Whitener. As a result, we compute the total squared covariance in the original (physical) space, although it is sufficient to compute it in the PC space which is much more efficient. Setting to unwhiten_only=True should fix it.

https://github.com/xarray-contrib/xeofs/blob/75bbe7af4a9eb072d660c9e331d0284410910e55/xeofs/cross/cpcca.py#L980-L989