物探论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 910|回复: 0

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

[复制链接]
发表于 2013-2-23 10:16:08 | 显示全部楼层 |阅读模式
对二进制文件操作可以减少存储空间,提高计算速度。GMT的很多程序可以通过-b命令来控制文件格式的输入和输出。其参数为:
[ −b[i|o][s|S|d|D[ncol]|c[var1/...]] ]
−bi
Selects binary input. Append sfor single precision [Default is 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. [Default is 3 (or 4 if −Wiis set)].
−bo
Selects binary output. Append sfor single precision [Default is d(double)]. Uppercase Sor Dwill
force byte-swapping. Optionally, append ncol, the number of desired columns in your binary
output file. [Default is 3 (or 4 if −Wois set)]. −Eadds 3 additional columns.

-bi表示输入文件为二进制文件,-bo表示输出文件为二进制文件。
如果省略-b命令,表示读入的文件格式问程序默认的格式,一般为ASCII格式(除了几个专门处理二进制格网文件的程序)。

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|物探论坛 ( 鄂ICP备12002012号 微信号:iwutan )

GMT+8, 2024-5-6 08:53 , Processed in 0.061216 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表