lad_linkscript_ix 1.33 KB
Newer Older
Yvonne Firing's avatar
Yvonne Firing committed
1 2 3 4 5 6
#!/bin/csh 
# copy the raw .000 ladcp data into cruise/data/ladcp/raw/
# then make links to those files using the filename format expected by IX processing

cd /local/users/pstar/cruise/data/ladcp/rawdata

7 8 9 10
cd DL
rsync -av /mnt/CTD/LADCP/DY113/Data/Master/*.* .
cd ../UL
rsync -av /mnt/CTD/LADCP/DY113/Data/Slave/*.* .
Yvonne Firing's avatar
Yvonne Firing committed
11 12

#make links for IX
13 14 15
cd /local/users/pstar/cruise/data/ladcp/rawdata/DL
foreach i (`ls DY113_CTD*M.000`)
   set num = `awk -v nm="$i" 'BEGIN {print substr(nm,index(nm,".000")-4,3)}'`
Yvonne Firing's avatar
Yvonne Firing committed
16
   set linkfile = ${num}DL000.000
17 18
   cd /local/users/pstar/cruise/data/ladcp/ix/raw
   if(! -e $num) then
Yvonne Firing's avatar
Yvonne Firing committed
19
      echo Making directory $num for raw file $i
20
      mkdir -p $num
Yvonne Firing's avatar
Yvonne Firing committed
21
   endif
22
   cd $num
Yvonne Firing's avatar
Yvonne Firing committed
23 24
   if (! -e $linkfile) then
      echo Making link $linkfile for raw file $i
25
      ln -s ../../../rawdata/DL/$i $linkfile
Yvonne Firing's avatar
Yvonne Firing committed
26 27 28
   endif
end

29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
cd /local/users/pstar/cruise/data/ladcp/rawdata/UL
foreach i (`ls DY113_CTD*S.000`)
   set num = `awk -v nm="$i" 'BEGIN {print substr(nm,index(nm,".000")-4,3)}'`
   set linkfile = ${num}UL000.000
   cd /local/users/pstar/cruise/data/ladcp/ix/raw
   if(! -e $num) then
      echo Making directory $num for raw file $i
      mkdir -p $num
   endif
   cd $num
   if (! -e $linkfile) then
      echo Making link $linkfile for raw file $i
      ln -s ../../../rawdata/UL/$i $linkfile
   endif
end

cd /local/users/pstar/cruise/data