Linux下GrADS的安裝

來源:互聯網
上載者:User

標籤:blog   class   c   code   java   tar   

安裝環境: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檔案所在目錄下,貌似不支援全路徑寫法。

----------------------------------------------完-----------------------------------------------------------

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.