I have a general region (for example 3 x 3 degrees) and I would like to do the same processing (with batch) in a sub-region of 1x1. Is this an easy way to create an array like this?
0/1/0/1 0/1/1/2 0/1/2/3 1/2/0/1 1/2/1/2 1/2/2/3 2/3/0/1 2/3/1/2 2/3/2/3
yes, see grdinfo -D1 for this use.
Thanks @pwessel I used the following command:
gmt grdinfo -R0/3/0/3 -D0 -I1 > array.txt
-R0/1/0/1 -R1/2/0/1 -R2/3/0/1 -R0/1/1/2 -R1/2/1/2 -R2/3/1/2 -R0/1/2/3 -R1/2/2/3 -R2/3/2/3
and you can add -C if you just want the values in separate columns for any scripting use.