I have two grids.

One, call it A, is 4320x2160 cells and spans the whole globe.

The other, call it B is 8640x3432 and spans the circumference of the globe, but is clipped toward mid-latitudes.

Both files are in ArcGrid ASCII format. The clipped file has a header of:

ncols         8640
nrows         3432
xllcorner     -180
yllcorner     -58
cellsize      0.0416666666667

Looking at the grids in QGis, I see that the B contains four cells for every cell of A.

I would like to sum each group of four cells in B to create a new grid that overlays directly with A and has a one-to-one correspondence of cells.

Is there a way to do this in Linux using either Python or command line only tools?

  • Do A and B already line up, or is the 4-to-1 ratio only relating to the cell size?
    – Erica
    Aug 6, 2014 at 17:52
  • @Erica, A & B already line up on every other cell, giving the 4-to-1 ratio. Thank you for clarifying.
    – Richard
    Aug 7, 2014 at 2:02


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.