很多观测文件分散在不同的目录中,gamit提供了一个rnxfnd的参数,可以检索所有这个根目录下的子文件夹。但是如果这些子文件夹中有软链接,并不能识别,也就是找不到这个软链接下的文件。另外在sh_gamit脚本中,也提供了在这个rnxfnd 参数中指定多个目录,然后逐一循环,但是测试失败,需要修改这个sh_gamit的脚本代码。
# Directory path for RINEX archives (search all levels); e.g. /data18/simon
set rnxfnd = "/home/zhao/work/data1/data/ /home/zhao/work/data2/data"
# set rnxfnd = "/home/zhao/work/data1/data/"
sh_gamit脚本
# Now collect up all the raw data we can find locally
set numrw = `echo ${rawfnd} | wc`
if ( $numrw[2] != 0 ) echo "Getting raw data from ${rawfnd}"
set numrx = `echo ${rnxfnd} | wc`
echo "-----------------Test-2019-11,--rnxfnd--------------------"
echo "-----------------Test-2019-11,--rnxfnd--------------------"
echo $numrx
echo "-----------------Test-2019-11,--rnxfnd------------------------"
echo "-----------------Test-2019-11,--rnxfnd--------------------"
if ( $numrx[2] != 0 ) echo "Getting rinex data from ${rnxfnd}"
if ( $numrw[2] != 0 || $numrx[2] != 0 ) then
# @ count = $rx_doy_plus + $rx_doy_minus + 1
@ count = `echo "ibase=10; ${rx_doy_plus} + ${rx_doy_minus} + 1" | bc`
set chkday = 0
while ( $count )
@ count = $count - 1
# @ chkday = $doy + $rx_doy_plus - $count
@ chkday = `echo "ibase=10; ${doy} + ${rx_doy_plus} - ${count}" | bc`
set chkday = `echo $chkday | awk '{printf "%03d \n", $1}'`
echo "Searching for data on doy: $chkday"
sh_find_data -d ${yr[1]} ${chkday} -type all -expt $expt -cmdfile tmp.cmds.${ts}
end
endif
如果在rnxfnd中放置了2个目录:
-----------------Test-2019-11,--rnxfnd--------------------
-----------------Test-2019-11,--rnxfnd--------------------
1 2 99
-----------------Test-2019-11,--rnxfnd------------------------
-----------------Test-2019-11,--rnxfnd--------------------
Getting rinex data from /home/zhao/work/data1/data /home/zhao/work/data2/data
Searching for data on doy: 000
Searching for data on doy: 001
Checking for raw data with no RINEX
上面的这个,实际上没有找到,sh_gamit代码不完善。