def boxcox_reverse(x_t, lam):
    """Perform the inverse Box-Cox transform to return to original units.

    Parameters
    ----------
    x_t : xarray.DataArray
        Contains transformed data, with standard dimensions time x lat x lon
    lam : xarray.DataArray
        Selected lambda values for the Box-Cox transform, with standard dimensions lat x lon

    Returns
    -------
    orig_scale : xarray.DataArray
        Data in the original scale, of same dimension as x_t
    """

    orig_scale = (lam*x_t + 1)**(1/lam)
    orig_scale = (orig_scale.fillna(0)).transpose('time', 'lat', 'lon')

    return orig_scale