GAMIT安装成功后的配置-doy测试通过~ test.bat失败


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帮助文档下载:

下面是/home/bkjia/.cshrc文件的全部内容(bkjia是linux的一个普通用户,.cshrc文件从#行开始)
网上文章讲的:命令行执行环境应该为csh;我是新手,没敢逾越呵呵。
我个人使用的linux是:Ubuntu-9.04,自带gcc编译器,后使用 sudo apt-get install gfortran命令安装了gfortran 编译器。
在/home/bkjia/下若无.cshrc文件,则需先 sudo touch .cshrc 建立该文件;命令行 sudo gedit /home/bkjia/.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/bkjia]% pwd
/home/bkjia
[/home/bkjia]% echo $LD_LIBRARY_PATH
/usr/lib/gmt/lib:/usr/lib:/usr/local/lib:/usr/lib/gcc/i486-linux-gnu/4.3
[/home/bkjia]% 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/bkjia]% echo $pach
pach: Undefined variable.
[/home/bkjia]% echo $MANPATH
/usr/lib/gmt/man:/usr/local/man:/usr/share/man:/usr/X11R6/man
[/home/bkjia]% echo $HELP_DIR
/opt/gamit1035/help/
[/home/bkjia]% 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/bkjia]%
[/home/bkjia]% ls
examples.desktop realtek-linux-audiopack-5.14    公共的    图片    音乐
gamit1035_log    soft                模板    文档    桌面
gg        test                视频    新文件~
[/home/bkjia]% ll
ll: Command not found.
[/home/bkjia]% la
la: Command not found.
[/home/bkjia]% rm
rm: 缺少操作数
请尝试执行“rm --help”来获取更多信息。
[/home/bkjia]%
问题还存在如下:
(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相关阅读:l

相关内容