member_dim not found if chunking by member or if there is no member_dim
The functions for the computation of the indices in s2dv had a bug. The current version of the functions checks if there is a member_dim dimension but, if you are chunking by member or there is only one member for a specific dataset, this dimension does not exist.
To solve it, I have removed the member_dim parameter and called the atomic function (.Indices in Utils.R) with multiApply. Now they can work with and without the member dimension (or any other dimensions like dataset). I also have added the na.rm parameter to the functions.
I have tested the new version, and it returns identical results to the old version. The only case in which the new version can return slightly different results is when all the members were passed together to the functions (without chunking by member). In that case, the old version used all the members to compute the climatology. In contrast, the new version calculates the indices independently for each member, so the climatology is member-dependent.
I will open a merge request.
Thank you very much,
Carlos