Open seisman opened 1 year ago
GMT 6.4 and 6.5 produce different grids:
# Using GMT 6.4.0
$ gmt grdcut @earth_relief_03s_g -R-10/-9.8/4.9/5.0 -Grelief-6.4.nc
gmt grdinfo relief-6.4.nc
relief-6.4.nc: Title:
relief-6.4.nc: Command: gmt grdcut @earth_relief_03s_g/ -R-10/-9.8/4.9/5.0 -Grelief-6.4.nc
relief-6.4.nc: Remark:
relief-6.4.nc: Gridline node registration used [Geographic grid]
relief-6.4.nc: Grid file format: nf = GMT netCDF format (32-bit float), CF-1.7
relief-6.4.nc: x_min: -10 x_max: -9.8 x_inc: 0.000833333333333 (3 sec) name: longitude n_columns: 241
relief-6.4.nc: y_min: 4.9 y_max: 5 y_inc: 0.000833333333333 (3 sec) name: latitude n_rows: 121
relief-6.4.nc: v_min: -2069.99609375 v_max: -924.080078125 name: z
relief-6.4.nc: scale_factor: 1 add_offset: 0
relief-6.4.nc: format: netCDF-4 chunk_size: 241,121 shuffle: on deflation_level: 3
relief-6.4.nc: Default CPT: geo
# Using 6.5.0_3122cc8_2023.04.21
$ gmt grdcut @earth_relief_03s_g -R-10/-9.8/4.9/5.0 -Grelief-6.5.nc
$ gmt grdinfo relief-6.5.nc
relief-6.5.nc: Title:
relief-6.5.nc: Command: gmt grdcut @earth_relief_03s_g/ -R-10/-9.8/4.9/5.0 -Grelief-6.5.nc
relief-6.5.nc: Remark:
relief-6.5.nc: Gridline node registration used [Geographic grid]
relief-6.5.nc: Grid file format: nf = GMT netCDF format (32-bit float), CF-1.7
relief-6.5.nc: x_min: -10 x_max: -9.8 x_inc: 0.000833333333333 (3 sec) name: longitude n_columns: 241
relief-6.5.nc: y_min: 4.9 y_max: 5 y_inc: 0.000833333333333 (3 sec) name: latitude n_rows: 121
relief-6.5.nc: v_min: -2131.97070312 v_max: -924.080078125 name: z
relief-6.5.nc: scale_factor: 1 add_offset: 0
relief-6.5.nc: format: netCDF-4 chunk_size: 241,121 shuffle: on deflation_level: 3
relief-6.5.nc: Default CPT: geo
Here is the difference between the two grids:
gmt grdmath relief-6.5.nc relief-6.4.nc SUB = diff.nc
gmt grdimage diff.nc -Cturbo -Baf -png diff
Obviously, the two grids diff at the lower-left corner.
Then I tried to compare the two grids in a larger region:
# GMT 6.4
$ gmt grdcut @earth_relief_03s_g -R-10.5/-9.8/4.6/5.0 -Grelief-6.4.nc
# GMT 6.5
$ gmt grdcut @earth_relief_03s_g -R-10.5/-9.8/4.6/5.0 -Grelief-6.5.nc
$ gmt grdmath relief-6.5.nc relief-6.4.nc SUB = diff.nc
$ gmt grdimage diff.nc -Cturbo -Baf -png diff
Here is the diff: The two grids diff at (-10, 4.6).
@PaulWessel Do you have any ideas why GMT 6.4/6.5 produce different grids and which one is correct?
You see the same thing, @Esteban82 ?
I can't test it for now because I have another problem. I get this message when I run anything with a remote data set.
*** buffer overflow detected ***: terminated
Please post the command so we can test
Please post the command so we can test
Now it works. I thinks that is something wrong in gmt_data_server.txt in the TEST server. We could see it later.
I got the error with this command for example this.
gmt grdcut @earth_relief_03s_g -R-10.5/-9.8/4.6/5.0 -Grelief-6.4.nc
We could see it later.
You see the same thing, @Esteban82 ?
Yes, I also get a diff at 10, 4.6.
$ gmt grdinfo diff.nc
diff.nc: Title: Produced by grdmath
diff.nc: Command: gmt grdmath relief-6.5.nc relief-6.4.0.nc SUB = diff.nc
diff.nc: Remark:
diff.nc: Gridline node registration used [Geographic grid]
diff.nc: Grid file format: nf = GMT netCDF format (32-bit float), CF-1.7
diff.nc: x_min: -10.5 x_max: -9.8 x_inc: 0.000833333333333 (3 sec) name: longitude n_columns: 841
diff.nc: y_min: 4.6 y_max: 5 y_inc: 0.000833333333333 (3 sec) name: latitude n_rows: 481
diff.nc: v_min: -96.9716796875 v_max: 659.251953125 name: z
diff.nc: scale_factor: 1 add_offset: 0
diff.nc: format: netCDF-4 chunk_size: 141,161 shuffle: on deflation_level: 3
diff.nc: Default CPT: geo