Parameterization of eddy fluxes based on a mesoscale energy budget