def dryAirDensity_from_p(data, units, notation=None, inplace_units=True):
    """
    Calculates dry air density
    NEEDS IMPROVEMENT REGARDING HANDLING OF UNITS
    """
    from . import algs
    from . import constants
    defs = algs.get_notation(notation)
    data = data.copy()
    if not inplace_units:
        units = units.copy()
    Rdry = constants.R_spec['dry']
    Rh2o = constants.R_spec['h2o']
    Runit = constants.units['R_spec']
    p_h2o = data[defs.h2o_mass_density] * Rh2o * data[defs.thermodyn_temp]
    p_h2o_unit = units[defs.h2o_mass_density] * Runit * units[defs.
        thermodyn_temp]
    p_h2o, p_h2o_unit = algs.convert_to(p_h2o, p_h2o_unit, 'kPa')
    p_air, p_air_unit = algs.convert_to(data[defs.pressure], units[defs.
        pressure], 'kPa')
    p_dry = p_air - p_h2o
    data.loc[:, (defs.dry_air_mass_density)] = p_dry / (Rdry * data[defs.
        thermodyn_temp])
    units.update({defs.dry_air_mass_density: p_air_unit / (Runit * units[
        defs.thermodyn_temp])})
    if inplace_units:
        return data
    else:
        return data, units
