def CoolProp_T_dependent_property(T, CASRN, prop, phase):
if not has_CoolProp:  <EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>if CASRN not in coolprop_dict:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>Tc = coolprop_fluids[CASRN].Tc<EOL>T = float(T) <EOL>if phase == '<STR_LIT:l>':<EOL><INDENT>if T > Tc:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>if PhaseSI('<STR_LIT:T>', T, '<STR_LIT:P>', <NUM_LIT>, CASRN) in [u'<STR_LIT>', u'<STR_LIT>']:<EOL><INDENT>return PropsSI(prop, '<STR_LIT:T>', T, '<STR_LIT:P>', <NUM_LIT>, CASRN)<EOL><DEDENT>else:<EOL><INDENT>return PropsSI(prop, '<STR_LIT:T>', T, '<STR_LIT>', <NUM_LIT:0>, CASRN)<EOL><DEDENT><DEDENT>elif phase == '<STR_LIT:g>':<EOL><INDENT>if PhaseSI('<STR_LIT:T>', T, '<STR_LIT:P>', <NUM_LIT>, CASRN) == '<STR_LIT>':<EOL><INDENT>return PropsSI(prop, '<STR_LIT:T>', T, '<STR_LIT:P>', <NUM_LIT>, CASRN)<EOL><DEDENT>else:<EOL><INDENT>if T < Tc:<EOL><INDENT>return PropsSI(prop, '<STR_LIT:T>', T, '<STR_LIT>', <NUM_LIT:1>, CASRN)<EOL><DEDENT>else:<EOL><INDENT>return PropsSI(prop, '<STR_LIT:T>', T, '<STR_LIT:P>', <NUM_LIT>, CASRN)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>
r'''Calculates a property of a chemical in either the liquid or gas phase
    as a function of temperature only. This means that the property is
    either at 1 atm or along the saturation curve.

    Parameters
    ----------
    T : float
        Temperature of the fluid [K]
    CASRN : str
        CAS number of the fluid
    prop : str
        CoolProp string shortcut for desired property
    phase : str
        Either 'l' or 'g' for liquid or gas properties respectively

    Returns
    -------
    prop : float
        Desired chemical property, [units]

    Notes
    -----
    For liquids above their boiling point, the liquid property is found on the
    saturation line (at higher pressures). Under their boiling point, the
    property is calculated at 1 atm.

    No liquid calculations are permitted above the critical temperature.

    For gases under the chemical's boiling point, the gas property is found
    on the saturation line (at sub-atmospheric pressures). Above the boiling
    point, the property is calculated at 1 atm.

    An exception is raised if the desired CAS is not supported, or if CoolProp
    is not available.

    The list of strings acceptable as an input for property types is:
    http://www.coolprop.org/coolprop/HighLevelAPI.html#table-of-string-inputs-to-propssi-function

    Examples
    --------
    Water at STP according to IAPWS-95

    >>> CoolProp_T_dependent_property(298.15, '7732-18-5', 'D', 'l')
    997.047636760347

    References
    ----------
    .. [1] Bell, Ian H., Jorrit Wronski, Sylvain Quoilin, and Vincent Lemort.
       "Pure and Pseudo-Pure Fluid Thermophysical Property Evaluation and the
       Open-Source Thermophysical Property Library CoolProp." Industrial &
       Engineering Chemistry Research 53, no. 6 (February 12, 2014):
       2498-2508. doi:10.1021/ie4033999. http://www.coolprop.org/