  We present improvements to the wavelength calibration for the lenslet-based
Integral Field Spectrograph (IFS), that serves as the science instrument for
the Gemini Planet Imager (GPI). The GPI IFS features a 2.7" $\times$ 2.7" field
of view and a 190 $\times$ 190 lenslet array (14.1 mas/lenslet) with spectral
resolving power ranging from R $\sim$ 35 to 78. A unique wavelength solution is
determined for each lenslet characterized by a two-dimensional position, an
n-dimensional polynomial describing the spectral dispersion, and the rotation
of the spectrum with respect to the detector axis. We investigate the
non-linearity of the spectral dispersion across all Y, J, H, and K bands
through both on-sky arc lamp images and simulated IFS images using a model of
the optical path. Additionally, the 10-hole non-redundant masking mode on GPI
provides an alternative measure of wavelength dispersion within a datacube by
cross-correlating reference PSFs with science images. This approach can be used
to confirm deviations from linear dispersion in the reduced datacubes. We find
that the inclusion of a quadratic term provides a factor of 10 improvement in
wavelength solution accuracy over the linear solution and is necessary to
achieve uncertainties of a few hundredths of a pixel in J band to a few
thousands of a pixel in the K bands. This corresponds to a wavelength
uncertainty of $\sim$0.2 nm across all filters.
