allow variable to be dimension

soil depths can be location dependent. In the vertical averaging, a spatially varying field can be used to calculate the weights.