I am using GMT 5.3.3. I have a file.xyz with boundaries of -800000/700000/-3400000/-600000 with a resolution of 5 km. I am trying to change its resolution by using:
blockmean $1 -R-800000/700000/-3400000/-600000 -I1000 -V > $2
nearneighbor $2 -R-800000/700000/-3400000/-600000 -I1000 -V -E0 -G$3 -S50000 -N4
However, I do have this error:
bash-3.2$ ./regrid.sh GrClimBamber.xyz GrClimBamberRg GrClimBamberRg.xyz
blockmean: Processing input table data
blockmean: W: -800000 E: 700000 S: -3400000 N: -600000 n_columns: 1501 n_rows: 2801
blockmean: Calculating block means
blockmean: N read: 168861 N used: 1681 N outside_area: 167180 N cells filled: 1681
nearneighbor: Grid dimensions are n_columns = 1501, n_rows = 2801
nearneighbor: Number of sectors = 4, minimum number of filled sectors = 2
nearneighbor: Processing input table data
nearneighbor: Processed record 1681
nearneighbor: Gridded row 2801
nearneighbor: 60001 nodes were assigned an average value
nearneighbor: 2091 nodes failed sector criteria and 4142209 nodes had no neighbor points (all set to 0)
I could change either -I or -S values, but I still have the same error...
What do I miss?!
RE: Nearneighbor - Added by Paul 10 months ago
According to gmt info:
gmt info GrClimBamber.xyz
GrClimBamber.xyz: N = 168862 <-3400000/-600000> <-800000/700000> <-2693.357/4106.087>
so you are mixing up what is x and y here. Using -R-3400000/-600000/-800000/700000 is what you want.