fig, ax = plt.subplots(2, 2, figsize=(14,14))
levels=np.arange(-20,22,2)
mpl.rcParams['contour.negative_linestyle'] = 'solid'
loc=(0,0)
cs1 = ax[loc].contourf(tair_grd, td, tw, levels=levels, cmap=mpl.cm.Blues)
cs1_line = ax[loc].contour(tair_grd, td, tw, levels=levels, colors='k')
ax[loc].clabel(cs1_line, inline=1, fontsize=11, fmt='%1.0f')
loc=(0,1)
cs1 = ax[loc].contourf(tair_grd,RH_grd, tw, levels=levels, cmap=mpl.cm.Blues)
cs1_line = ax[loc].contour(tair_grd,RH_grd, tw, levels=levels, colors='k')
ax[loc].clabel(cs1_line, inline=1, fontsize=11, fmt='%1.0f')
loc=(1,0)
cs1 = ax[loc].contourf(tair_grd,RH_grd, (tair_grd + td) /2. , levels=levels, cmap=mpl.cm.Blues)
cs1_line = ax[loc].contour(tair_grd,RH_grd, (tair_grd + td) /2., levels=levels, colors='k')
ax[loc].clabel(cs1_line, inline=1, fontsize=11, fmt='%1.0f')
errlevels=[-20,-15,-10,-8,-6,-4,-2,-1,-.5,-.25,0]
loc=(1,1)
cs1 = ax[loc].contourf(tair_grd,RH_grd, ((tair_grd + td) /2.)-tw , levels=errlevels, cmap=mpl.cm.Reds_r)
cs1_line = ax[loc].contour(tair_grd,RH_grd, ((tair_grd + td) /2.)-tw, levels=errlevels, colors='k')
ax[loc].clabel(cs1_line, inline=1, fontsize=11, fmt='%1.2f')
graph_props = [(True, (-10,5), (-40,5), 'Ta [$^\circ$C]', 'Td [$^\circ$C]','Twet' ),\
(True, (-10,5), (0,100), 'Ta [$^\circ$C]', 'RH [%]','Twet' ),\
(True, (-10,5), (0,100), 'Ta [$^\circ$C]', 'RH [%]','(Ta + Td) / 2' ),\
(True, (-10,5), (0,100), 'Ta [$^\circ$C]', 'RH [%]','error of (Ta + Td) / 2' )]
for n, axs in enumerate(ax.ravel()):
grid, xlim, ylim, xlabel, ylabel, title = graph_props[n]
axs.grid(grid)
axs.set_xlim(xlim)
axs.set_ylim(ylim)
axs.set_xlabel(xlabel, fontsize=10)
axs.set_ylabel(ylabel, fontsize=10)
axs.set_title(title, fontsize=15)
axs.tick_params(labelsize=10, axis='both')