Added clwvi variable and changed interpolation algorithm in EnsureCorrectDimensions to ensure that there were no NaNs in the data and that values are able to be extrapolated when necessary.