def modis5kmto1km(lons5km, lats5km):
    """Getting 1km geolocation for modis from 5km tiepoints.

    http://www.icare.univ-lille1.fr/tutorials/MODIS_geolocation
    """
    cols5km = np.arange(2, 1354, 5) / 5.0
    cols1km = np.arange(1354) / 5.0
    lines = lons5km.shape[0] * 5
    rows5km = np.arange(2, lines, 5) / 5.0
    rows1km = np.arange(lines) / 5.0

    along_track_order = 1
    cross_track_order = 3

    satint = SatelliteInterpolator((lons5km, lats5km),
                                   (rows5km, cols5km),
                                   (rows1km, cols1km),
                                   along_track_order,
                                   cross_track_order,
                                   chunk_size=10)
    satint.fill_borders("y", "x")
    lons1km, lats1km = satint.interpolate()
    return lons1km, lats1km
def modis5kmto1km ( lons5km , lats5km ) : cols5km = np . arange ( 2 , 1354 , 5 ) / 5.0 cols1km = np . arange ( 1354 ) / 5.0 lines = lons5km . shape [ 0 ] * 5 rows5km = np . arange ( 2 , lines , 5 ) / 5.0 rows1km = np . arange ( lines ) / 5.0 along_track_order = 1 cross_track_order = 3 satint = SatelliteInterpolator ( ( lons5km , lats5km ) , ( rows5km , cols5km ) , ( rows1km , cols1km ) , along_track_order , cross_track_order , chunk_size = 10 ) satint . fill_borders ( "y" , "x" ) lons1km , lats1km = satint . interpolate ( ) return lons1km , lats1km
Getting 1km geolocation for modis from 5km tiepoints.

    http://www.icare.univ-lille1.fr/tutorials/MODIS_geolocation