小二 发表于 2013-2-23 10:16:08

GMT对二进制文件的读取和输出控制

对二进制文件操作可以减少存储空间,提高计算速度。GMT的很多程序可以通过-b命令来控制文件格式的输入和输出。其参数为: [ −b[i|o][s|S|d|D[ncol]|c[var1/...]] ]
−biSelects binary input. Append sfor single precision d(double)]. Uppercase Sor Dwill force byte-swapping. Optionally, append ncol, the number of columns in your binary input file if it exceeds the columns needed by the program. Or append cif the input file is netCDF. Optionally, append var1/var2/...to specify the variables to be read. −Wiis set)].−boSelects binary output. Append sfor single precision d(double)]. Uppercase Sor Dwill force byte-swapping. Optionally, append ncol, the number of desired columns in your binary output file. −Wois set)]. −Eadds 3 additional columns.
-bi表示输入文件为二进制文件,-bo表示输出文件为二进制文件。如果省略-b命令,表示读入的文件格式问程序默认的格式,一般为ASCII格式(除了几个专门处理二进制格网文件的程序)。
页: [1]
查看完整版本: GMT对二进制文件的读取和输出控制