def set_range_offset(ds, h_deploy):
    """
    Adds an instrument's height above seafloor (for an up-facing instrument) 
    or depth below water surface (for a down-facing instrument) to the range
    of depth bins

    Parameters
    ----------
    ds : xarray.Dataset
      The adcp dataset to ajust 'range' on
    h_deploy : numeric
      Deployment location in the water column, in [m]

    Returns
    -------
    ds : xarray.Dataset
      The adcp dataset with 'range' adjusted

    Notes
    -----
    `Center of bin 1 = h_deploy + blank_dist + cell_size`

    Nortek doesn't take `h_deploy` into account, so the range that DOLfYN 
    calculates distance is from the ADCP transducers. TRDI asks for `h_deploy` 
    input in their deployment software and is thereby known by DOLfYN.

    If the ADCP is mounted on a tripod on the seafloor, `h_deploy` will be
    the height of the tripod +/- any extra distance to the transducer faces.
    If the instrument is vessel-mounted, `h_deploy` is the distance between 
    the surface and downward-facing ADCP's transducers.

    """
    r = [s for s in ds.dims if 'range' in s]
    for val in r:
        ds = ds.assign_coords({val: ds[val].values + h_deploy})
        ds[val].attrs['units'] = 'm'

    ds.attrs['h_deploy'] = h_deploy
    return ds