Closed CommonClimate closed 6 years ago
I often have to multiply both by -1 to get something sensible. How do I do this with your package?
eofs always returns an array-like object for EOFs and PCs (it might be an xarray array or an iris Cube if you are using one of those interfaces) which can be multiplied by -1 in a straightforward way in all cases:
eof1 = solver.eofs(neofs=1)
pc1 = solver.pcs(npcs)
eof1 *= -1
pc1 *= -1
Is that what you wanted to know, or is there more to it?
Is there an easy way to do a scree plot, including the error bars on the eigenvalues? A related feature might be northTest, but I am not quite sure what to do with the numbers it returns.
The northTest
method returns the (approximate) sampling error in each eigenvalue. These sampling errors can be interpreted such that if the sampling error for an eigenvalue is comparable in size to the difference between that eigenvalue and the next smallest eigenvalue, then the associated eigenvectors are degenerate. See North et al 1982 for a detailed explanation.
You can plot these as error bars if you like to produce a visualisation of eigenvector degeneracy. The northTest
method takes a keyword vfscaled
to scale the errors to fractional variance too, if you want the plot to be in fractional variance units instead of eigenvalue units.
Hi @ajdawson , first of all, thanks for a tremendously useful package. here are a few questions I cannot find in the doc or examples:
since the sign of an EOF/PC is arbitrary (only the product counts), I often have to multiply both by -1 to get something sensible (e.g. global warming shows up as an upward trending PC and warm colors, not the reverse). How do I do this with your package? (I should note that I use xarray, and as much as possible would like to use its built-in plot capabilities).
I was able to retrieve the variance fraction - nice feature. Is there an easy way to do a scree plot, including the error bars on the eigenvalues? A related feature might be northTest, but I am not quite sure what to do with the numbers it returns.
Thanks in advance! Julien