Due to the massive disparity between the largest and smallest eddies in the atmosphere and ocean, it is not possible to simulate these flows by explicitly resolving all scales on a computational grid. Instead the large scales are explicitly resolved, and the interactions between the unresolved subgrid turbulence and large resolved scales are parameterised. If these interactions are not properly represented then an increase in resolution will not necessarily improve the accuracy of the large scales. This has been a significant and long-standing problem since the earliest climate simulations. Historically subgrid models for the atmosphere and ocean have been developed in isolation, with the structure of each motivated by different physical phenomena. Here we solve the turbulence closure problem by determining the parameterisation coefficients (eddy viscosities) from the subgrid statistics of high-resolution quasi-geostrophic atmospheric and oceanic simulations. These subgrid coefficients are characterised into a set of simple unifying scaling laws, for truncations made within the enstrophy-cascading inertial range. The ocean additionally has an inverse energy cascading range, within which the subgrid model coefficients have different scaling properties. Simulations adopting these scaling laws are shown to reproduce the statistics of the reference benchmark simulations across resolved scales, with orders of magnitude improvement in computational efficiency. This reduction in both resolution dependence and computational effort will improve the efficiency and accuracy of geophysical research and operational activities that require data generated by general circulation models, including weather, seasonal, and climate prediction; transport studies; and understanding natural variability and extreme events.