Skip to content

Bad grdblend job #8756

Closed
Closed

Description

@joa-quim

See this Forum post

The problem is not in grdimage but on the grid that is fed to it.

gmt grdcut @earth_relief_03s -R139.8/140.2/39/40 -Glixo.grd
grdblend [ERROR]: Failed to delete file c:\TMP/grdblend_resampled_a46536.nc

Ignore (here) the grdblend error (unrelated).

Example of how screwed the blended grid got.

Image

Activity

  1. added
    bug
    on Jun 24, 2025
  2. joa-quim commented on Jun 24, 2025

    @joa-quim
    MemberAuthor

    But probably, this is just another manifestation of #7012 and #7453

  3. joa-quim commented on Jan 5, 2026

    @joa-quim
    MemberAuthor

    Many things revealed while (looong) investigation of this bug. Things happen when the grdblend job involves blending two grids that themselves are on the edges of the the two 15s grids used to fill the bathymetry part.

    First, MSVC shamelessly does not honor what is says in the docs of _mktemp_s and repeats the temp names even when a file with that name already exists. This is clearly a MSVC bug but past experiences with but reports there do not give me any motivation to report one more. Given this bug the 2 temporary names are the same and the first resampled grid was lost.

    Second, tinny differences in wesn set by tile limits a the grid bounds of interpolated grids (from the 15s grids) could result in a jump of one grid step (of the 15s grid) leaving a stripe of zeros clearly visible in the figure post. Here, only a very precaution change was made, which solves the present case (and #7012) and does not break the tests.

  4. added a commit that references this issue on Jan 5, 2026
    28997ad
  5. added a commit that references this issue on Jan 6, 2026
    d516e67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions