i think i found a small “bug” in documentation of FORMAT_FLOAT_OUT. I was trying to get specific format for a single column in the output (didn’t mind for the rest) but it seems that i must declare the format for all output columns, although in the documentation it is written “To give some columns a separate format,…” see bellow for GMT6.4.
Format (C language printf syntax) to be used when printing double precision floating point numbers to output files [default is %.12g]. For geographic coordinates, see FORMAT_GEO_OUT. To give some columns a separate format, supply one or more comma-separated cols:format specifications, where cols can be specific columns (e.g., 5 for 6th since 0 is the first) or a range of columns (e.g., 3-7). The last specification without column information will override the format for all other columns. Alternatively, you can list N space-separated formats and these apply to the first N columns.
here it is …(by the way i am using windows and GMT6.4)
the commands are
rem this is ok
gmt select test.dat -Ccenter.dat+d4k -R0/20/0/20 --FORMAT_FLOAT_OUT=“0-1:%%5.3f,2:%%.0f,3:%%013.2f,4-8:%%2.3f” > out_all.dat
rem this is not ok
gmt select test.dat -Ccenter.dat+d4k -R0/20/0/20 --FORMAT_FLOAT_OUT=“3:%%013.2f” > out_one.dat