The aspect ratio effect on side and basal melting in fresh water is systematically investigated across a range of Rayleigh numbers and ambient temperatures using direct numerical simulations. The side mean melt rate follows a
${Ra}^{1/4}\,\gamma ^{-3/8}$ scaling relation in the side-melting dominant regime, where
${Ra}$ is the Rayleigh number, and
$\gamma$ is the width-to-height aspect ratio of the ice block. In the basal-melting dominant regime, the basal mean melt rate follows a
${Ra}^{1/4}\gamma ^{3/8}$ scaling relation at low Rayleigh numbers, but transitions to a
${Ra}^{1/3}\gamma ^{1/2}$ scaling relation at higher Rayleigh numbers. This scaling transition is attributed to the formation of a bottom cavity resulting from flow separation at high Rayleigh numbers. The overall mean melt rate exhibits a non-monotonic dependence on the aspect ratio, driven by the competition between side and basal melting. The proposed theoretical model successfully captures the observed non-monotonic behaviour, and accurately predicts the overall mean melt rate over the considered range of Rayleigh numbers and ambient temperatures, especially in the side- and basal-melting dominant regimes. More specifically, the side, basal and overall mean melt rates follow a linear
${St}$ scaling relation for ambient temperatures
$T_{w}\geqslant 15^{\,\circ }\textrm {C}$, with
${St}$ being the Stefan number (the ratio between sensible heat and latent heat), but deviations from this scaling relation and a non-monotonic dependence on the ambient temperature are observed at lower ambient temperatures, which can be attributed to the density anomaly effect.