Grid blending of gridded files

Hello sir, I have four gridded data which I named grid1, grid 2, grid 3 and grid 4. I converted the data from xyz2grd, went further to use grdblend to blend them together but no good result then converted the total grid( after using grdblend) to xyz, after which I applied GMT surface but still shows both vertical and horizontal line overlap. How can I effectively correct this?

  1. xyz to grd for first grid (20/75/-30/25), second grid ( 70/120/-30/25) third grid ( 20/75/-65/-25) fourth grid (70/120/-65/-25)
  2. grdblend all the four part together
  3. convert to xyz
  4. applied gmt surface with tensor 0.25 then back to grid but the overlap still shows as an obvious line . What can I do to remove or edit it in order to get an accurate blended grid without overlap line showing?

Just a question: Your four grids 1-4 are they by any chance interpolated prior to your attempted merging? Similar effects normally occur in the border between grids when they have been processed without a proper overlap. Try to use an overlap of a number of cells (10 or so) when you populate and interpolate them.
After that cut them to the correct edges an do the merge. That way each grid gets knowledge of the neighbouring cells during interpolation, and reduced edge effects.

I would just surface the original xyz for the entire area - I do not see any benefits to making 4 subgrids because you are imposing boundary conditions at the seams.

yes, they were interpolated and convert from the xyz format to grid for the four sub-grids. But I don’t understand what you mean by an overlap of cells (10 or so ). Can I get a clearer or picture of what you mean.
many thanks

the xyz are for different long and lat. The software can’t run my entire study area at once so I had to divide my area into four part then, collect the xyz for the different area. then convert to grid with overlap of 5 degree for lat and long. then merge with grdblend. The work is about thickness of the lithosphere. the software only allows short lat and long . so I had no choice than to divide the area into four part , run the software for the four different part then obtained the xyz thereafter to grid then merged but didn’t merge. Sir what can I do to merge them without edge effect?
many thanks Sir.

You need to make the four smaller grids overlap and not share the same border. If they overlap then their overlapping data will be blended and you should not see sharp lines like you show above.

yes sir, that is exactly what I did with an overlap of 5 degrees but still have the sharp edge.
using grdblend 1st.grd 2nd.grd 3rd.grd 4th.grd -R20/120/-65/20 -I2m/2m -V -Gtotal.grd

    long           lat 

first grid 20 to 75 -30 to 20
second grid 70 to 120 -30 to 20
third grid 20 to 75 -65 to -25
fourth grid 70 to 120 -65 to -25

In that case you can try to get rid of the effects by cutting your interpolated grids using x=72.5 and y=-27.5 (or how that is expressed in GMT) that is in the middle of your overlapping region before merging. The data in the outer edges of each grid is still just a guess when it comes to the interpolated cells. That should take away most of your artifacts in the merged dataset.
Have you tried to get all uninterpolated data into one large grid prior to interpolating it? In that case you wouldn’t have to bother about any edge effects.

I have tried your second suggestion before, let me try your first suggestion, thanks .It really consuming my time, trying to use GMT surface as well nothing changed.

I tried both your suggestions, but still the problem shows. Totally confused and worried. What next to do ?

I think you should try to understand why you have such a contrast between your grids instead of trying to disguise it. Maybe there lies the true reason of difficulties that you are facing.

the color contrast is the z value which is the main result, the color has no effect on this, my main issue is just putting the four subgrids together to get one grid. I had to divide the topo.grd and gravity grid data because the software I used to compute them can’t run the entire area, now I have the result from the four areas then putting it together is my problem which I tried to but to no avail.

Yes, I got that but what I’m saying is if the grids are displaying such a large (and we don’t know how large because we have only colors) contrast at the borders, then something else must be going on. What is that other software? How does it work, does it remove trends? Does it use FFTs?

the software is coherence code used to compute Te i.e effective elastic thickness. the code can’t compute the total area at once, so the only way out is to divide the total area into four subgrids then do the computation for each grids , extract the result as xyz format ,then convert to grids for each of the subgrids then grid back to a larger one.

it is just unclear to me why grdblend can’t do it , so much surprised because that should be the function of grdblend but not working, even GMT surface neither worked. Seriously worried.

I think that instead of blaming the tools, you should look more carefully to the data and try to quantify, for example, how much do they differ in the overlapping zones where they should be equal

Many many thanks to you, I have finally gotten it yesterday night, I didn’t blame the tools, in fact it was the tool I used. I just followed another direction to correct it. Which are outlined below for anyone facing similar issue.

  1. gmt cut
  2. gmt sample
  3. gmt blend
  4. gmt grd2xyz
    5 gmt surface
  5. gmt sample.
    these 6 steps helped me to successfully deal with the issue. am grateful for everyone contribution.