Returns the code to produce a ctypes output variable for interacting with fortran.

def _py_outvar(parameter, lparams, tab):
    """Returns the code to produce a ctypes output variable for interacting with fortran.
    """
    if ("out" in parameter.direction and parameter.D > 0 and ":" in parameter.dimension and
        ("allocatable" in parameter.modifiers or "pointer" in parameter.modifiers)):
        lparams.append("byref({}_o)".format(parameter.lname))
        blank = True if parameter.direction == "(inout)" else False
        return ("{0}_o = POINTER({1})()".format(parameter.lname, _py_ctype(parameter)), blank)