Bad normalization in EOF
Hello, I think (!) there is a bug in the EOF function.
# Factor to normalize the EOF.
eof.patt.nn <- EOF[e, , ] * mask
eof.patt.ms <- sum(eof.patt.nn^2, na.rm = TRUE)
# Normalize the EOF
eof.patt <- eof.patt.nn/eof.patt.ms
But the norm of the eof pattern is indeed:
eof.patt.ms <- sqrt(sum(eof.patt.nn^2, na.rm = TRUE))
Luckily this never does nothing, as mask is typically all ones, and EOF[e,,] already has norm 1, because La.svd returns u and v matrices normalized already.