def theta(parameters, T, p):
    """
    Returns an expression for dry potential temperature theta in K.

    :arg parameters: a CompressibleParameters object.
    :arg T: temperature in K.
    :arg p: pressure in Pa.
    """

    kappa = parameters.kappa
    p_0 = parameters.p_0

    return T * (p_0 / p) ** kappa