pySTEPS / pysteps

Python framework for short-term ensemble prediction systems.
https://pysteps.github.io/
BSD 3-Clause "New" or "Revised" License
466 stars 168 forks source link

Wrong mrms bounding box coordinates #220

Closed dnerini closed 3 years ago

dnerini commented 3 years ago

The coordinates of the bounding box (x1, x2, y1, y2) in the MRMS importer seem to refer to the coordinates at the center of the pixels, rather than the corners of the bounding box itself. In essence, the following formulas must hold for all importers:

x = np.arange(x1 + xsize // 2, x1 + xsize * precip.shape[1], xsize)
y = np.arange(y1 + ysize // 2, y1 + ysize * precip.shape[0], ysize)

To fix this, we would just need to shift the coordinates by half the grid spacing.