歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> GAMIT安裝成功後的配置-doy測試通過~ test.bat失敗

GAMIT安裝成功後的配置-doy測試通過~ test.bat失敗

日期:2017/2/28 15:45:37   编辑:Linux教程

GLOBK installed
++++++++++++++++++

Create the gg link in your home directory to the version of
gamit/globk you just installed ? (y/n)

y
Making required ~/gg link to newly installed software
ln -s -f /opt/gamit1035 ~/gg

Don't forget to set your : path to include /opt/gamit1035/gamit/bin and /opt/gamit1035/kf/bin
: HELP_DIR environment variable in you shell profile
(in .cshrc/.tcshrc add: setenv HELP_DIR /opt/gamit1035/help/)
: INSTITUTE evnironment variable in your shell profile
(in your .cshrc/.tcshrc add: setenv INSTITUTE where_i_work)
where_i_work is a 3 character identifier for your solutions

文章的內容參考了網絡的不少博文,特別是GAMIT幫助文檔,特表感謝!

GAMIT幫助文檔下載:http://www.linuxidc.com/Linux/2012-07/65427.htm

下面是/home/linuxidc/.cshrc文件的全部內容(linuxidc是linux的一個普通用戶,.cshrc文件從#行開始)
網上文章講的:命令行執行環境應該為csh;我是新手,沒敢逾越呵呵。
我個人使用的linux是:Ubuntu-9.04,自帶gcc編譯器,後使用 sudo apt-get install gfortran命令安裝了gfortran 編譯器。
在/home/linuxidc/下若無.cshrc文件,則需先 sudo touch .cshrc 建立該文件;命令行 sudo gedit /home/linuxidc/.cshrc編輯;編輯之後保存 ,然後在命令行 輸入 source .cshrc 檢查有無錯誤;最後,命令行輸入 doy參看執行情況,若正確,則包括幫助,及當前的日期均顯示出來,下面有詳細測試信息;(也可以:命令行輸入 echo $PATH 或LD_LIBRARY_PATH或MANPATH或HELP_DIR或path 檢查設置的環境變量是否正確))
#
# This file is applicable to all Cshell users.
# set prompt
set prompt = "[`echo $cwd`]% "
set history = 50
set gamitpath=/opt/gamit1035
set path = (. /bin /sbin /etc /usr/bin /usr/sbin /usr/bin/X11 /usr/X11R6/bin $path)
set path = (. /usr/lib/gmt/bin /usr/local/bin /usr/local/sbin /usr/lib /usr/local/lib $path)
set path = (. $gamitpath/gamit/bin $gamitpath/kf/bin $gamitpath/com $path)
setenv HELP_DIR $gamitpath/help/
setenv PATH "/usr/sbin:/sbin:${PATH}"
setenv MANPATH /usr/lib/gmt/man:/usr/local/man:/usr/share/man:/usr/X11R6/man
setenv LD_LIBRARY_PATH /usr/lib/gmt/lib:/usr/lib:/usr/local/lib:/usr/lib/gcc/i486-linux-gnu/4.3
# set alias

alias cd 'cd \!*;set prompt = "[`echo $cwd`]% "'
alias pwd 'echo $cwd'
alias ls 'ls --classify'
alias ll 'ls -l'
alias la 'ls -a'
alias rm 'rm -i'
alias mv 'mv -i'

下面是在終端命令行執行驗證的一些輸出:
[/home/linuxidc]% pwd
/home/linuxidc
[/home/linuxidc]% echo $LD_LIBRARY_PATH
/usr/lib/gmt/lib:/usr/lib:/usr/local/lib:/usr/lib/gcc/i486-linux-gnu/4.3
[/home/linuxidc]% echo $PATH
/usr/sbin:/sbin:.:/opt/gamit1035/gamit/bin:/opt/gamit1035/kf/bin:/opt/gamit1035/com:.:/usr/lib/gmt/bin:/usr/local/bin:/usr/local/sbin:/usr/lib:/usr/local/lib:.:/bin:/sbin:/etc:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
[/home/linuxidc]% echo $pach
pach: Undefined variable.
[/home/linuxidc]% echo $MANPATH
/usr/lib/gmt/man:/usr/local/man:/usr/share/man:/usr/X11R6/man
[/home/linuxidc]% echo $HELP_DIR
/opt/gamit1035/help/
[/home/linuxidc]% doy
DOY: Converts various date formats

DOY: Converts various date formats.

Runstring:
% doy <jd/year> <doy/month> <day> <hr> <min>
or
% doy <gps_week>W <gps_sow/gps_dow>
or
% doy <DecYear>Y

where jd is Julian date (assumed if only one argument)
year is calender year
doy is day of year (assumed if two arguments)
month is month
day is day of month.
hr min is hrs and minutes of day (Only if ymd form used).
In the second form (i.e. W appended to the first value),
the entries are assumed to gps week no and the second entry
(optional) is either gps day of week (0-6) or seconds of
gps week.
NOTE: GPS Day of Week runs from 0-6 (Changed May 20, 1997).
In the third form with Y appended, the argument is taken as
deciminal year. (Versions after 2004/12/21 correctly account
for leap years in converting deciminal years back to Julian dates)

The conversions made are based on the number of arguments
passed.

NDOY: Version of doy of year which takes keyboard input in the
forms above. (^D ends program input).

Example: doy 92 200
Date 1992/07/18 0:00 hrs, DOY 200 JD 2448821.5000 MJD 48821.0000
GPS Week 653 Day of week 6, GPS Seconds 518400 Day of Week Sat
Decimal Year 1992.54372

Example: doy 654W 345600
Date 1992/07/23 0:00 hrs, DOY 205 JD 2448826.5000 MJD 48826.0000
GPS Week 654 Day of week 4, GPS Seconds 345600 Day of Week Thu
Decimal Year 1992.55738

***TODAY*** IS:
Date 2010/02/01 21:42 hrs, DOY 32 JD 2455229.4046 MJD 55228.9046
GPS Week 1569 Day of week 1, GPS Seconds 164557 Day of Week Mon
Decimal Year 2010.087410
[/home/linuxidc]%
[/home/linuxidc]% ls
examples.desktop realtek-linux-audiopack-5.14 公共的 圖片 音樂
gamit1035_log soft 模板 文檔 桌面
gg test 視頻 新文件~
[/home/linuxidc]% ll
ll: Command not found.
[/home/linuxidc]% la
la: Command not found.
[/home/linuxidc]% rm
rm: 缺少操作數
請嘗試執行“rm --help”來獲取更多信息。
[/home/linuxidc]%
問題還存在如下:
(1)設置的變量裡 set path,為何 echo $path提示pach: Undefined variable.
(2)已經alias la 'ls -a' 為何la: Command not found.
(3)test.bat測試失敗了,從網上參考的博文測試。
(4)命令行執行時,無法返回前面執行過的命令。不知什麼緣故,set history=50,含義不理解。

非常願意與gamit學習者交流學習的經驗教訓
以上的配置信息全部從我個人的.cshrc中復制。由於是新手,有些專業詞匯沒有細琢磨,寫的不專業請大家輕點拍拍~~~

GAMIT相關閱讀:http://www.linuxidc.com/GAMIT/

GAMIT10.4下載在Linux公社5號FTP服務器,具體下載見 http://www.linuxidc.net/thread-1186-1-1.html

Copyright © Linux教程網 All Rights Reserved