def write_to_pandas(da, 
                    column_dict={}, 
                    name='name'):
    """Write xr.DataArray to pd.DataFrame

    Parameters
    ----------
    da: xr.DaraArray
        
    column_dict:  dict (optional)
        Dictionary containing new pd.DataFrame column names and corresponding values

    name: str (optional)
        Name of the pd.DataFrame rows; e.g. name of the xr.DataArray

    Returns
    -------
    pd.DataFrame
    """
    df_output = da.to_dataframe()
    length = len(df_output)
    for key, value in column_dict.items():
        df_output[key] = [value]*length
    df_output['name'] = [name]*length
    return df_output