Пример #1
0
    d28 = d.where(d.MY == 28, drop = True)
    d = d.where(d.MY != 28, drop = True)
    d = d.mean(dim = "MY")

    d28 = d28.to_array().squeeze()
    d = d.to_array().squeeze()
    diff = d28 - d
    
    axs[0,0].contourf(d28.lat, d28.pfull, d28.transpose('pfull','lat'),
                    levels = [-50]+boundaries+[150],norm=norm,cmap=cmap)
    c0=axs[0,0].contour(d28.lat, d28.pfull, d28.transpose('pfull','lat'),
                    levels = boundaries[slice(None,None,2)], colors='black',
                    linewidths=0.6)
    
    c0.levels = [funcs.nf(val) for val in c0.levels]
    axs[0,0].clabel(c0, c0.levels, inline=1, fmt=fmt, fontsize=14)

    axs[0,1].contourf(d.lat, d.pfull, d.transpose('pfull','lat'),
                    levels = [-50]+boundaries+[150],norm=norm,cmap=cmap)
    c1=axs[0,1].contour(d.lat, d.pfull, d.transpose('pfull','lat'),
                    levels = boundaries[slice(None,None,2)], colors='black',
                    linewidths=0.6)
    
    c1.levels = [funcs.nf(val) for val in c1.levels]
    axs[0,1].clabel(c1, c1.levels, inline=1, fmt=fmt, fontsize=14)

    axs[0,2].contourf(diff.lat, diff.pfull, diff.transpose('pfull','lat'),
                    levels = [-50]+boundaries0+[150],norm=norm0,cmap=cmap0)
    c2=axs[0,2].contour(diff.lat, diff.pfull, diff.transpose('pfull','lat'),
                    levels = boundaries0[slice(None,None,2)], colors='black',
                c = ax.contour(x.lon,
                               x.lat,
                               u,
                               colors='1',
                               levels=[0, 50, 100],
                               transform=ccrs.PlateCarree(),
                               linewidths=1)
                ax.text(0.05,
                        0.95,
                        string.ascii_lowercase[j],
                        transform=ax.transAxes,
                        size=20,
                        weight='bold')

                c.levels = [funcs.nf(val) for val in c.levels]
                ax.set_title('MY ' + str(my), weight='bold', fontsize=20)
                ax.clabel(c, c.levels, inline=1, fmt=fmt, fontsize=15)
                print(i)
                plt.savefig(figpath + '/Isca_average_winter_PV_' + str(ilev) +
                            'K_' + str(Lsmin) + '-' + str(Lsmax) +
                            '_all_years_7.4e-05.pdf',
                            bbox_inches='tight',
                            pad_inches=0.02)
                plt.savefig(figpath + '/Isca_average_winter_PV_' + str(ilev) +
                            'K_' + str(Lsmin) + '-' + str(Lsmax) +
                            '_all_years_7.4e-05.png',
                            bbox_inches='tight',
                            pad_inches=0.02)
        #####