[:+1: to Fabio Riva for raising this issue...] We do a 4th order interpolation to get the metric components, etc. on staggered grids. It is possible that this will result in bad values (e.g. negative values of the diagonal metric components). We should handle or check for this... Options could be:
- check for positivity of the staggered metrics (are there any other properties that we should check?)
- what to do if the check fails?
- interpolate the logarithm of the diagonal metric components
- ensures positivity, but off-diagonal components may sensibly be negative, so we can't interpolate logarithms for those; we end up being slightly inconsistent if we do this
- combine 1. and 2. - interpolate the logarithms only where normal interpolation gives a negative value
- Require the grid generator to give output on the staggered grids as well as the cell centre grid
- probably the ideal solution, but the most work to implement
Any thoughts or other suggestions?
[:+1: to Fabio Riva for raising this issue...] We do a 4th order interpolation to get the metric components, etc. on staggered grids. It is possible that this will result in bad values (e.g. negative values of the diagonal metric components). We should handle or check for this... Options could be:
Any thoughts or other suggestions?