It may be ignorance on my part, but the term "variable horizontal grid" is unclear to me. Having looked at the code I assume you mean the horizontal grid is described in terms of two-dimensional x and y coordinates.