def getVarTimeRange(dataArray, rangeMin, rangeMax,
                    timeStrt, timeEnd):

    """ This function extracts the radar variable
        for a desired range and time interval.

        Arguments
        ---------

        dataArray : xarray DataArray of the variable

        rangeMin : minimum range in m

        rangeMax : maximum range in m

        timeStrt : starting time (pandas datetime)

        timeEnd : ending time (pandas datetime)

        Returns
        -------

        dataArray : xarray DataArray
            The select DataArray

    """

    dataArray = dataArray.sel(time=slice(timeStrt, timeEnd))
    dataArray = dataArray.sel(range=slice(rangeMin, rangeMax))

    return dataArray