Ejemplo n.º 1
0
def plot_ratio(r_md_microm,
               Q_ratio,
               ceil_lambda,
               ceil_lambda_str,
               all_aer_constits,
               aer_names,
               savedir,
               extra=''):
    """Plot the absolute Q_dry_ext values"""

    fig, ax = plt.subplots(3, 2, figsize=(8, 7))

    lam_colours = create_colours(len(ceil_lambda) - 1)

    for ax_i, aer_i in zip(ax.flatten(), all_aer_constits + ['MURK']):

        for lam_i, lam_i_colour in zip(ceil_lambda_str, lam_colours):

            ax_i.semilogx(r_md_microm,
                          Q_ratio[aer_i][lam_i],
                          label=lam_i + ' nm',
                          color=lam_i_colour)
            ax_i.set_xlim([0.05, 10.0])
            ax_i.set_ylim([0.4, 2.0])

        # subplot prettify
        ax_i.set_title(aer_names[aer_i], fontsize=12)
        ax_i.yaxis.set_major_formatter(FormatStrFormatter('%.2f'))

    # figure prettify
    ax_main = eu.fig_majorAxis(fig)

    ax_main.set_xlabel(r'$r_{md} \/\mathrm{[\mu m]}$', fontsize=16, labelpad=5)
    ax_main.set_ylabel(
        r'$\frac{Q_{ext,dry}(\lambda=i)}{Q_{ext,dry}(\lambda=905\/nm)}$',
        labelpad=15,
        fontsize=19)
    ax.flatten()[1].legend(fontsize=10,
                           bbox_to_anchor=(1.07, 1),
                           loc=2,
                           borderaxespad=0.0)
    # fig.suptitle('Ratio (lam_i / lam_905)')

    plt.tight_layout(h_pad=0.1)
    plt.subplots_adjust(top=0.9, right=0.8)

    plt.savefig(savedir + 'Q_extdry_multiLam_ratio_sensitivity_10micronscale' +
                extra + '.png')
    plt.close()
Ejemplo n.º 2
0
def plot_diff(r_md_microm,
              Q_diff,
              ceil_lambda,
              ceil_lambda_str,
              all_aer_constits,
              aer_names,
              savedir,
              extra=''):
    """Plot the absolute Q_dry_ext values"""

    fig, ax = plt.subplots(3, 2, figsize=(8, 7))

    lam_colours = create_colours(len(ceil_lambda) - 1)

    for ax_i, aer_i in zip(ax.flatten(), all_aer_constits + ['MURK']):

        for lam_i, lam_i_colour in zip(ceil_lambda_str, lam_colours):

            ax_i.semilogx(r_md_microm,
                          Q_diff[aer_i][lam_i],
                          label=lam_i + ' nm',
                          color=lam_i_colour)
            ax_i.set_xlim([0.05, 4.0])
            # ax_i.set_ylim([0.0, 5.0])

        # subplot prettify
        ax_i.set_title(aer_i)

    # figure prettify
    ax_main = eu.fig_majorAxis(fig)

    ax_main.set_xlabel(r'$r_{md} \/\mathrm{[\mu m]}$', labelpad=5)
    ax_main.set_ylabel(r'$Q_{ext}(dry)$')
    ax.flatten()[1].legend(fontsize=8,
                           bbox_to_anchor=(1.07, 1),
                           loc=2,
                           borderaxespad=0.0)
    fig.suptitle('Difference (lam_i - lam_910)')

    plt.tight_layout(h_pad=0.1)
    plt.subplots_adjust(top=0.9, right=0.8)

    plt.savefig(savedir + 'Q_extdry_multiLam_diff_sensitivity' + extra +
                '.png')
    plt.close()

    return
Ejemplo n.º 3
0
def plot_ratio(r_md_microm,
               Q_ratio,
               ceil_lambda,
               ceil_lambda_str,
               aer_plot_order,
               aer_names,
               savedir,
               extra=''):
    """Plot the absolute Q_dry_ext values"""

    # plot the data as a set of 3 x 2 subplots - 1 subplot per aerosol
    fig, ax = plt.subplots(3, 2, figsize=(8, 7))

    # For 895 - 915 nm
    cmap_range = cm.coolwarm(np.linspace(0, 1, len(ceil_lambda)))

    for ax_i, aer_i in zip(ax.flatten(), aer_plot_order):

        for lam_i, cmap_range_i in zip(ceil_lambda_str, cmap_range):

            ax_i.semilogx(r_md_microm,
                          Q_ratio[aer_i][lam_i],
                          label=lam_i + ' nm',
                          color=cmap_range_i)
            ax_i.set_xlim([0.05, 10.0])
            ax_i.set_ylim([0.7, 1.4])

        # subplot prettify
        ax_i.set_title(aer_names[aer_i], fontsize=12)
        ax_i.yaxis.set_major_formatter(FormatStrFormatter('%.2f'))

    # for 905 vs 1064 nm
    # for ax_i, aer_i in zip(ax.flatten(), aer_plot_order):
    #
    #     ax_i.axhline(y=1, linestyle='--', color='green', alpha=0.5)
    #     ax_i.semilogx(r_md_microm, Q_ratio[aer_i]['1064'])
    #     ax_i.set_xlim([0.05, 10.0])
    #     ax_i.set_ylim([0.4, 2.0])
    #
    # # subplot prettify
    # ax_i.set_title(aer_names[aer_i], fontsize=12)
    # ax_i.yaxis.set_major_formatter(FormatStrFormatter('%.2f'))

    # figure prettify
    ax_main = eu.fig_majorAxis(fig)

    ax_main.set_xlabel(r'$r_{md} \/\mathrm{[\mu m]}$', fontsize=16, labelpad=5)
    # ax_main.set_ylabel(r'$\frac{Q_{ext,dry}(\lambda=1064\/nm)}{Q_{ext,dry}(\lambda=905\/nm)}$', labelpad=15, fontsize=19)
    ax_main.set_ylabel(
        r'$\frac{Q_{ext,dry}(\lambda=i)}{Q_{ext,dry}(\lambda=905\/nm)}$',
        labelpad=15,
        fontsize=19)
    ax.flatten()[1].legend(fontsize=9,
                           bbox_to_anchor=(1.07, 1),
                           loc=2,
                           borderaxespad=0.0)
    # fig.suptitle('Ratio (lam_i / lam_905)')

    plt.tight_layout(h_pad=0.1)
    plt.subplots_adjust(top=0.9, right=0.8)

    # plt.savefig(savedir + 'Q_extdry_multiLam_ratio_sensitivity_10micronscale_1064-905'+extra+'.png')
    plt.savefig(savedir +
                'Q_extdry_multiLam_ratio_sensitivity_10micronscale_895-915' +
                extra + '.png')
    plt.close()