def load(url, variable, name=''):
    '''Load a Dataset from an OpenDAP URL

    :param url: The OpenDAP URL for the dataset of interest.
    :type url: :mod:`string`

    :param variable: The name of the variable to read from the dataset.
    :type variable: :mod:`string`

    :param name: (Optional) A name for the loaded dataset.
    :type name: :mod:`string`

    :returns: A :class:`dataset.Dataset` containing the dataset pointed to by
        the OpenDAP URL.

    :raises: ServerError
    '''
    # Grab the dataset information and pull the appropriate variable
    d = open_url(url)
    dataset = d[variable]

    # By convention, but not by standard, if the dimensions exist, they will be in the order:
    # time (t), altitude (z), latitude (y), longitude (x)
    # but conventions aren't always followed and all dimensions aren't always present so
    # see if we can make some educated deductions before defaulting to just pulling the first three
    # columns.
    temp_dimensions = map(lambda x:x.lower(),dataset.dimensions)

    dataset_dimensions = dataset.dimensions
    time = dataset_dimensions[temp_dimensions.index('time') if 'time' in temp_dimensions else 0]
    lat = dataset_dimensions[temp_dimensions.index('lat') if 'lat' in temp_dimensions else 1]
    lon = dataset_dimensions[temp_dimensions.index('lon') if 'lon' in temp_dimensions else 2]

    # Time is given to us in some units since an epoch. We need to convert
    # these values to datetime objects. Note that we use the main object's
    # time object and not the dataset specific reference to it. We need to
    # grab the 'units' from it and it fails on the dataset specific object.
    times = np.array(_convert_times_to_datetime(d[time]))

    lats = np.array(dataset[lat][:])
    lons = np.array(dataset[lon][:])
    values = np.array(dataset[:])

    origin = {
        'source': 'dap',
        'url': url
    }

    return Dataset(lats, lons, times, values, variable,
                   name=name, origin=origin)
dataset/ETHPy150Open apache/climate/ocw/data_source/dap.py/load/original