Unidata/thredds — pull request #54 by lost-carrier (2014-06-03 15:02:10+00:00)
Title: Target 4.3.22 interpolation fix

Hi,

I think we've found a bug in the interpolation of reduced gaussian grids to regular lat lon.

It seems the interpolation expects the grid points to be equally distributed from 0 to the maximum longitude (aka. "lo2").

For gaussian grids the last point in each line is at 360° - (360° / nPtsInLine). All points beyond that longitude (in the regular lat lon grid) are interpolate between the last point and the first point (of the reduced gaussian grid).

I attached a small drawing to visualize the problem. The upper figure show what is currently implemented, while the below figure show how the proposed fix works.

Tests are also included.

Regards,
Jochen

![2014-06-03 16 49 34](https://cloud.githubusercontent.com/assets/3090579/3161830/be37d91c-eb2f-11e3-94f0-af76bf79897b.jpg)