def water(target, temperature='pore.temperature', salinity='pore.salinity'):
    """
    Calculates density of pure water or seawater at atmospheric pressure
    using Eq. (8) given by Sharqawy et. al [1]. Values at temperature higher
    than the normal boiling temperature are calculated at the saturation
    pressure.

    Parameters
    ----------
    target : OpenPNM Object
        The object for which these values are being calculated.  This
        controls the length of the calculated array, and also provides
        access to other necessary thermofluid properties.

    temperature : string
        The dictionary key containing the temperature values.  Temperature must
        be in Kelvin for this emperical equation to work

    salinity : string
        The dictionary key containing the salinity values.  Salinity must be
        expressed in g of salt per kg of solution (ppt).


    Returns
    -------
    value : NumPy ndarray
        The density of water/seawater in [kg/m3]

    Notes
    -----
     T must be in K, and S in g of salt per kg of phase, or ppt (parts per
        thousand)
    VALIDITY: 273 < T < 453 K; 0 < S < 160 g/kg;
    ACCURACY: 0.1 %

    References
    ----------
    [1] Sharqawy M. H., Lienhard J. H., and Zubair, S. M., Desalination and
    Water Treatment, 2010.

    """
    T = target[temperature]
    if salinity in target.keys():
        S = target[salinity]
    else:
        S = 0
    a1 = 999.92293295
    a2 = 0.020341179217
    a3 = -0.0061624591598
    a4 = 2.2614664708e-05
    a5 = -4.6570659168e-08
    b1 = 0.80200240891
    b2 = -0.0020005183488
    b3 = 1.6771024982e-05
    b4 = -3.0600536746e-08
    b5 = -1.6132224742e-11
    TC = T - 273.15
    rho_w = a1 + a2 * TC + a3 * TC ** 2 + a4 * TC ** 3 + a5 * TC ** 4
    d_rho = (b1 * S + b2 * S * TC + b3 * S * TC ** 2 + b4 * S * TC ** 3 + 
        b5 * S ** 2 * TC ** 2)
    rho_sw = rho_w + d_rho
    value = rho_sw
    return value
