Input points being used outside of grid cells in blockmean

Likely

reminds very much about this thread: Basic understanding grdimage & -JL projection

Meaning there is most likely nothing wrong with your scripts. It’s about grdimage making a rectangular regularly spaced raster from the data, while Mercator Y axis spacing is not regular.

basically, using either grdview -T instead of grdimage or a projection with a regular Y cell spacing (-JQ... in this case instead of -JM...) with grdimage should produce a raster image with grid cells matching the map frame grid and your original data point positions.