def dpd(td, t, roundit=True):
    """
    This function calculates a dew point depression scalar or array
    from a scalar or array of temperature and dew point temperature and returns it.
    
    :param td: dew point temperature in degrees C (array or scalar)
    :param t: dry bulb temperature in degrees C (array or scalar)
    :param roundit: flag to tell function to round to one decimal place, default TRUE
    :type td: float
    :type t: float
    :type roundit: boolean
    :return: dew point depression in degrees C (array or scalar)
    :rtype: float

    Inputs:	
    td = dew point temperature in degrees C (array or scalar)
    t = dry bulb temperature in degrees C (array or scalar)

    Outputs:
    dp = dew point depression in degrees C (array or scalar)

    Ref:

    TESTED!
    dpd = dpd(10..,15.)
    dpd = 5.0

    """

    if td is None or t is None:
        return None

    dp = t - td

    if roundit:
        dp = round(dp * 10.) / 10.

    return dp