Grdblend randomly skipping tiles

Hello,

I’m using v5.4.2, and trying to blend together 64 individual GRD files (each 3984x3984 pixels, 20 m/pix, pixel-registered, surface-interpolated). Each tile overlaps by ~2 km. I like the ability of grdblend to use a cosine taper in the overlap regions, vs. GDAL. But, I’m running into an issue where grdblend is leaving out one tile seemingly randomly – I can find nothing wrong with the tile and there are no obvious warning or error messages (even in verbose-debugging mode). The hole where the skipped tile should be is filled with zeros. I tried splitting up the whole area into 4 sub-regions (16 tiles each) and applying grdblend to each of those, and in 2 of those, it skipped a tile, but the original skipped tile was not skipped. I can mosaic all 64 tiles together with GDAL, but it doesn’t do as good a job with the seams, so I’d really like to use grdblend, but so far no luck with figuring this out.

Any help would be much appreciated.

Thank you,
Mike

The number of bugs fixed between 6.2 (current master) and 5.4.2 in grdblend are too many, so it is not possible for us to even guess why your example fails with such an old version of GMT. You should at least install the latest official version 6.1.1 (6.2.0 is going in maybe one week) and rerun things and see if this problem is still there. If so, then we are happy to try to debug and see what is going on.

Hello,

Thanks for the quick response. I get the same result in 6.1.1.

I’m attaching 3 files: 1) screenshot of the whole area (64 tiles) after applying grdblend separately to 4 quadrants, 2 of which have missing tiles, 2) the input GRD list for one of the quadrants (top-right) for which the 3rd GRD in the list is the missing one, and 3) the output messages from the -Vd flag.

Here’s the command for that top-right quadrant:

gmt grdblend blendTiles.list.1.txt -I0.02 -R-0.84/310/-0.84/310 -G/dev/shm/ldem_80s_final_adj_20mpp_1_surf.grd -r -Vd

Let me know if you need anything else.

Thank you,
Mike


blendTiles.list.1.txt (2.1 KB)
blend20mpp1_slurm_444559.txt (234.3 KB)

Hello,
Just following up on this…
Any suggestions would be much appreciated.
Let me know if there’s any more info I can provide.
Thanks!
Mike

Sorry, we got side-tracked with the 6.2.0 release. OK, got your list of files. I will first try a mock example by creating some simple grids that match your 16 inputs. Since these are large grids, could you perhaps send me the output of gmt grdinfo -C ldem_/ldem__final_adj_20mpp_surf_trim.grd so I can use the same grid specs.

Here is the grdinfo output:

ldem_m001_p079_m001_p079/ldem_m001_p079_m001_p079_final_adj_20mpp_surf_trim.grd -0.84 78.84 -0.84 78.84 -4.25256919861 2.72997355461 0.02 0.02 3983984 1 0

Here’s the info for all 16:

ldem_m001_p079_m001_p079/ldem_m001_p079_m001_p079_final_adj_20mpp_surf_trim.grd -0.84 78.84 -0.84 78.84 -4.25256919861 2.72997355461 0.02 0.02 3983984
ldem_m001_p079_p077_p157/ldem_m001_p079_p077_p157_final_adj_20mpp_surf_trim.grd -0.84 78.84 77.16 156.84 -3.56960201263 6.46376466751 0.02 0.02 3983984
ldem_m001_p079_p155_p235/ldem_m001_p079_p155_p235_final_adj_20mpp_surf_trim.grd -0.84 78.84 155.16 234.84 -3.95324540138 4.99337291718 0.02 0.02 3983984
ldem_m001_p079_p233_p313/ldem_m001_p079_p233_p313_final_adj_20mpp_surf_trim.grd -0.84 78.84 233.16 312.84 -1.90877044201 3.39798784256 0.02 0.02 3983984
ldem_p077_p157_m001_p079/ldem_p077_p157_m001_p079_final_adj_20mpp_surf_trim.grd 77.16 156.84 -0.84 78.84 -3.9690144062 2.46147727966 0.02 0.02 3983984
ldem_p077_p157_p077_p157/ldem_p077_p157_p077_p157_final_adj_20mpp_surf_trim.grd 77.16 156.84 77.16 156.84 -2.99499535561 7.02714252472 0.02 0.02 3983984
ldem_p077_p157_p155_p235/ldem_p077_p157_p155_p235_final_adj_20mpp_surf_trim.grd 77.16 156.84 155.16 234.84 -3.65721011162 5.01152038574 0.02 0.02 3983984
ldem_p077_p157_p233_p313/ldem_p077_p157_p233_p313_final_adj_20mpp_surf_trim.grd 77.16 156.84 233.16 312.84 -0.706419289112 3.57303309441 0.02 0.02 3983984
ldem_p155_p235_m001_p079/ldem_p155_p235_m001_p079_final_adj_20mpp_surf_trim.grd 155.16 234.84 -0.84 78.84 -4.43995714188 4.26604795456 0.02 0.02 3983984
ldem_p155_p235_p077_p157/ldem_p155_p235_p077_p157_final_adj_20mpp_surf_trim.grd 155.16 234.84 77.16 156.84 -4.02029561996 2.03231310844 0.02 0.02 3983984
ldem_p155_p235_p155_p235/ldem_p155_p235_p155_p235_final_adj_20mpp_surf_trim.grd 155.16 234.84 155.16 234.84 -4.22570800781 5.0747718811 0.02 0.02 3983984
ldem_p155_p235_p233_p313/ldem_p155_p235_p233_p313_final_adj_20mpp_surf_trim.grd 155.16 234.84 233.16 312.84 -1.44872641563 3.45190906525 0.02 0.02 3983984
ldem_p233_p313_m001_p079/ldem_p233_p313_m001_p079_final_adj_20mpp_surf_trim.grd 233.16 312.84 -0.84 78.84 -2.17820286751 3.88404583931 0.02 0.02 3983984
ldem_p233_p313_p077_p157/ldem_p233_p313_p077_p157_final_adj_20mpp_surf_trim.grd 233.16 312.84 77.16 156.84 -4.0682926178 2.30840492249 0.02 0.02 3983984
ldem_p233_p313_p155_p235/ldem_p233_p313_p155_p235_final_adj_20mpp_surf_trim.grd 233.16 312.84 155.16 234.84 -3.14622735977 4.30892086029 0.02 0.02 3983984
ldem_p233_p313_p233_p313/ldem_p233_p313_p233_p313_final_adj_20mpp_surf_trim.grd 233.16 312.84 233.16 312.84 -1.68396735191 3.79775595665 0.02 0.02 3983984

Thanks, I have reproduced the problem with fake grdmath data. Now to find out why.

Painful, subtle bug was found and now fixed in master. Thanks for the example - we have made a test to ensure this wont happen again.

I can confirm that it works for me now, too.
Thank you very much!