def O2_sat(P_air, temp):
    """Calculate saturaed oxygen concentration in mg/L for 278 K < T < 318 K

    :param P_air: Air pressure with appropriate units
    :type P_air: float
    :param temp: Water temperature with appropriate units
    :type temp: float

    :return: Saturated oxygen concentration in mg/L
    :rtype: float

    :Examples:

    >>> from aguaclara.research.environmental_processes_analysis import O2_sat
    >>> from aguaclara.core.units import unit_registry as u
    >>> round(O2_sat(1*u.atm , 300*u.kelvin), 7)
    <Quantity(8.0931572, 'milligram / liter')>
    """
    fraction_O2 = 0.21
    P_O2 = P_air * fraction_O2
    return ((P_O2.to(u.atm).magnitude) *
            u.mg/u.L*np.exp(1727 / temp.to(u.K).magnitude - 2.105))