安装环境:Fedora 16,用户名guge
软件包:grads-2.0.1-bin-i686-pc-linux-gnu.tar.gz(grads主程序),
data2.tar.gz(grads自带字体、地图包),
example.tar.Z(样例测试包)
(以上软件包从http://www.iges.org/grads/downloads.html上下载, 放入/home/guge/Downloads目录下)
-----------------------------------------------安装步骤---------------------------------------------------------------
软件推荐安装方法(grads安装在/usr/local/bin下)
1.安装grads程序(切换根用户root)
1 # cd /usr/local/bin 2 3 # tar xzvf ~/Downloads/grads-2.0.1-bin-i686-pc-linux-gnu.tar.gz 4 5 # cd ./grads-2.0.1/bin 6 7 # ls
**********你将见到以下可执行文件*********
bufrscan grib2scan gribscan
gxps stnmap
grads
gribmap gxeps gxtran
wgrib
************************************
2.安装字体、地图数据
#cd /usr/local/lib
#mkdir grads
#cd grads
#tar xzvf ~/Downloads/data2.tar.gz
3.设置环境变量,切换成普通用户
#su
$ vi ~/.bashrc
添加以下几列:
export PATH=$PATH:/usr/local/bin/grads-2.0.1/bin/
export GADDIR=/usr/local/lib/grads
export GASCRP=$HOME/grads/scripts
export GAUDFT=$HOME/grads/udf/table
保存后退出
$ source ~/.bashrc
4.测试
$ uncompress ~/Downloads/example.tar.Z
$ cd ~/grads
$ tar xvf ~/Downloads/example.tar
$ grads
***************************************************************************
Grid Analysis and Display System (GrADS) Version 2.0.1
Copyright (c) 1988-2011 by Brian Doty and the
Institute for Global Environment and Society (IGES)
GrADS comes with ABSOLUTELY NO WARRANTY
See file COPYRIGHT for more information
Config: v2.0.1 little-endian readline printim grib2 netcdf hdf4-sds hdf5 opendap-grids,stn geotiff shapefile
Issue ‘q config‘ command for more detailed configuration information
Landscape mode? (‘n‘ for portrait):
GX Package Initialization: Size = 11 8.5
***************************************************************************
键入ENTER
ga-> open model.ctl
ga-> d ps
ga-> quit
NOTE:可能遇到的问题
(1)以上几个环境变量意义说明:
GADDIR 指向包含补充字体和地图文件的目录,默认为/usr/local/lib/grads/
GASCRP 指向包含grads工具脚本和用户脚本,即gs文件。当指定目录不止一个时,用空格、
分号、冒号或逗号分隔。
GAUDFT 指向用户定义的函数表
详细说明见:http://www.iges.org/grads/gadoc/gradcomdgrads.html
(2)系统中没有uncompress工具,在fedora系统中需下载ncompress
# yum install ncompress
(3)运行grads命令时,最好在ctl文件所在目录下,貌似不支持全路径写法。
----------------------------------------------完-----------------------------------------------------------
原文地址:http://www.cnblogs.com/hbmlml/p/3740275.html