- 积分
- 6960
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-1-1
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 lysx 于 2014-10-23 15:08 编辑
枫叶之前在网上看到有用gs文件从grib/nc数据中提取特定时空范围的数据的gs文件,可惜,其中用到了好几个其余的不常用的gs文件。本着节省空间的原则,自己动手写了一个。
该gs文件支持grib和nc两种格式的数据。对于grib数据,用户首先得生成相应的ctl及index文件。
下载附件后,将其放在grads/opengrads安装目录下。
下面阐述下该gs文件的基本用法
function help()
say 'usage :: cutdata -type type-fctl fctl -fgrd fgrd -var varname -xmin xmin -xmax xmax -ymin ymin -zmin zmin -zmax zmax -tmin tmin -tmax tmax -level level -tim date'
say ' -var varname : the name of the variable to cut'
say ' -tyep type : type can be set as nc or ctl'
say ' -fctl fctl : control file name for input'
say ' -fgrd fgrd : output flat-binary file name'
say ' -xmin xmin : start of x to cut'
say ' -xmax xmax : end of x to cut'
say ' -ymin ymin : start of y to cut'
say ' -ymax ymax : end of y to cut'
say ' -zmin zmin : start of level to cut'
say ' -zmax zmax : end of level to cut'
say ' -tmin tmin : start of time to cut'
say ' -tmax tmax : end of time to cut'
say ' -tim date : date to cut'
say ' level lev : level to cut'
say 'Any problems, email to lovinf_Y2011@163.com'return
其中,-type 和-fctl、-fgrd、-var 为必须参数;当其余参数默认时,将输出该变量整个时空范围内的所有数据; -tim与-tmin、-tmax不能同时使用;-level与-zmin、-zmax不能同时使用。
写起来耗时耗力,唯恐思虑不周,因此收取大家一个贡献值,千万别嫌贵哦!
|
-
-
cutdata.gs
3.91 KB, 下载次数: 20, 下载积分: 金钱 -5
售价: 1 贡献 [记录]
提取数据
|