sd_rs function

Calculate standard deviation for each location under each regime.