Commit fbda5ad0 authored by PStar User Account's avatar PStar User Account
Browse files

allow calibrations to be passed through uhdas_03 to quick_adcp.py

 Committer: PStar User Account <pstar@192.168.122.1>

 On branch dy113
 Changes to be committed:
   (use "git reset HEAD <file>..." to unstage)

	modified:   cruisedir_setup_scripts/conf_script_dy113
	modified:   ctd_linkscript
	modified:   lad_linkscript_ix
	modified:   mexec_cruise_backup
	modified:   modsal_unix
	modified:   uhdas_00_linkmerge
	modified:   uhdas_01_syncraw
	modified:   uhdas_02_sync_postprocessing_from_raw
	modified:   uhdas_03_copy_asclog_for_editing
parent 23431f43
...@@ -71,4 +71,5 @@ mkdir netcdf_files_rawdir_local ...@@ -71,4 +71,5 @@ mkdir netcdf_files_rawdir_local
mkdir techsas_link_logs mkdir techsas_link_logs
cd .. cd ..
ln -s /local/users/pstar/mounts/public public ln -s /local/users/pstar/mounts/public public
mkdir other_backups
#other directories (for processed underway data) are generated by running m_setup #other directories (for processed underway data) are generated by running m_setup
...@@ -3,40 +3,41 @@ ...@@ -3,40 +3,41 @@
#copy the raw and SBE-processed CTD files from the ship machine #copy the raw and SBE-processed CTD files from the ship machine
#then make links to the files to be ingested by mexec using the expected name format #then make links to the files to be ingested by mexec using the expected name format
cd /local/users/pstar/cruise/data #mexecloc is replaced with $mexecloc by conf_script_cruise cd /local/users/pstar/cruise/data
set cpre = DY113 set cpre = DY113_CTD
set cruise = dy113 set cruise = dy113
set ctdloc = /mnt/CTD/CTD/Data/ set ctdloc = /mnt/CTD/CTD/Data/
rsync -av ${ctdloc}/CTDProData/*.cnv ctd/ASCII_FILES/ rsync -auv ${ctdloc}/CTD_Pro_Data/*.cnv ctd/ASCII_FILES/
rsync -av ${ctdloc}/CTDRawData/*.bl ctd/ASCII_FILES/ rsync -auv ${ctdloc}/CTD_Raw_Data/*.bl ctd/ASCII_FILES/
rsync -av ${ctdloc}/CTDProData/*.ros ctd/ASCII_FILES/ rsync -auv ${ctdloc}/CTD_Pro_Data/*.ros ctd/ASCII_FILES/
rsync -av ${ctdloc}/CTDRawData/*.hex ctd/RAW_CTD_FILES/ rsync -auv ${ctdloc}/CTD_Raw_Data/*.hex ctd/RAW_CTD_FILES/
rsync -av ${ctdloc}/CTDRawData/*.XMLCON ctd/RAW_CTD_FILES/ rsync -auv ${ctdloc}/CTD_Raw_Data/*.XMLCON ctd/RAW_CTD_FILES/
rsync -av ${ctdloc}/CTDRawData/*.hdr ctd/RAW_CTD_FILES/ rsync -auv ${ctdloc}/CTD_Raw_Data/*.hdr ctd/RAW_CTD_FILES/
rsync -av ${ctdloc}/CTDProData/*.btl ctd/ASCII_FILES/ rsync -auv ${ctdloc}/CTD_Pro_Data/*.btl ctd/ASCII_FILES/
rsync -auv ${ctdloc}/SBE35/*.asc ctd/ASCII_FILES/SBE35/
cd ctd/ASCII_FILES cd ctd/ASCII_FILES
foreach i (`ls ${cpre}_???_align_ctm.cnv`) foreach i (`ls ${cpre}???_align_ctm.cnv`)
set num = `awk -v nm="$i" 'BEGIN {print substr(nm,index(nm,"_align")-3,3)}'` set num = `awk -v nm="$i" 'BEGIN {print substr(nm,index(nm,"_align")-3,3)}'`
set linkfile = ctd_${cpre}_${num}_align_ctm.cnv set linkfile = ctd_${cruise}_${num}_align_ctm.cnv
if (! -e $linkfile) then if (! -e $linkfile) then
echo Making link $linkfile for raw file $i echo Making link $linkfile for raw file $i
ln -s $i $linkfile ln -s $i $linkfile
endif endif
end end
#below could be commented out if T spikes aren't a problem #below could be commented out if T spikes aren't a problem
#foreach i (`ls ${cpre}_???_align.cnv`) #foreach i (`ls ${cpre}???_align.cnv`)
# set num = `awk -v nm="$i" 'BEGIN {print substr(nm,index(nm,"_align")-3,3)}'` # set num = `awk -v nm="$i" 'BEGIN {print substr(nm,index(nm,"_align")-3,3)}'`
# set linkfile = ctd_${cpre}_${num}_align_noctm.cnv # set linkfile = ctd_${cruise}_${num}_align_noctm.cnv
# if (! -e $linkfile) then # if (! -e $linkfile) then
# echo Making link $linkfile for raw file # echo Making link $linkfile for raw file
# ln -s $i $linkfile # ln -s $i $linkfile
# endif # endif
#end #end
foreach i (`ls ${cpre}_???.bl`) foreach i (`ls ${cpre}???.bl`)
set num = `awk -v nm="$i" 'BEGIN {print substr(nm,index(nm,".bl")-3,3)}'` set num = `awk -v nm="$i" 'BEGIN {print substr(nm,index(nm,".bl")-3,3)}'`
set linkfile = ctd_${cruise}_${num}.bl set linkfile = ctd_${cruise}_${num}.bl
if (! -e $linkfile) then if (! -e $linkfile) then
...@@ -45,15 +46,16 @@ foreach i (`ls ${cpre}_???.bl`) ...@@ -45,15 +46,16 @@ foreach i (`ls ${cpre}_???.bl`)
endif endif
end end
#compress files we probably won't need to use ##compress files we probably won't need to use
foreach i (`ls ${cpre}_???_align.cnv`) ##or don't because then it will sync them again
gzip -f $i #foreach i (`ls ${cpre}???_align.cnv`)
end # gzip -f $i
foreach i (`ls ${cpre}_???.cnv`) #end
gzip -f $i #foreach i (`ls ${cpre}???.cnv`)
end # gzip -f $i
#end
cd ../RAW_CTD_FILES #
gzip -f *.hex #cd ../RAW_CTD_FILES
#gzip -f *.hex
cd ../.. cd ../..
...@@ -4,22 +4,43 @@ ...@@ -4,22 +4,43 @@
cd /local/users/pstar/cruise/data/ladcp/rawdata cd /local/users/pstar/cruise/data/ladcp/rawdata
rsync -av /mnt/data/jcr/current/ladcp/* . cd DL
rsync -av /mnt/CTD/LADCP/DY113/Data/Master/*.* .
cd ../UL
rsync -av /mnt/CTD/LADCP/DY113/Data/Slave/*.* .
#make links for IX #make links for IX
foreach i (`ls JR18002_*.000`) cd /local/users/pstar/cruise/data/ladcp/rawdata/DL
set num = `awk -v nm="$i" 'BEGIN {print substr(nm,index(nm,".000")-3,3)}'` foreach i (`ls DY113_CTD*M.000`)
set num = `awk -v nm="$i" 'BEGIN {print substr(nm,index(nm,".000")-4,3)}'`
set linkfile = ${num}DL000.000 set linkfile = ${num}DL000.000
if(! -e ../ix/raw/$num) then cd /local/users/pstar/cruise/data/ladcp/ix/raw
if(! -e $num) then
echo Making directory $num for raw file $i echo Making directory $num for raw file $i
mkdir -p ../ix/raw/$num mkdir -p $num
endif endif
cd ../ix/raw/$num cd $num
if (! -e $linkfile) then if (! -e $linkfile) then
echo Making link $linkfile for raw file $i echo Making link $linkfile for raw file $i
ln -s ../../../rawdata/$i $linkfile ln -s ../../../rawdata/DL/$i $linkfile
endif endif
cd ../../../rawdata
end end
cd ../.. 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
...@@ -63,13 +63,13 @@ echo ------------- >> $backuplog ...@@ -63,13 +63,13 @@ echo ------------- >> $backuplog
echo Date `date` >> $backuplog echo Date `date` >> $backuplog
echo done copying mexec software, shell scripts, scripts >> $backuplog echo done copying mexec software, shell scripts, scripts >> $backuplog
# backup everything in data # backup everything in data except public drive
echo ------------- >> $backuplog echo ------------- >> $backuplog
echo Date `date` >> $backuplog echo Date `date` >> $backuplog
echo start copy to disk of data >> $backuplog echo start copy to disk of data >> $backuplog
echo ------ >> $backuplog echo ------ >> $backuplog
cd $root cd $root
rsync -aL --exclude legwork --exclude scs_raw --exclude jcrfs --exclude netcdf_files_rawdir_ship --exclude from_public data ${backupdir} rsync -aL --exclude legwork --exclude scs_raw --exclude jcrfs --exclude netcdf_files_rawdir_ship --exclude from_public --exclude public data ${backupdir}
echo ------------- >> $backuplog echo ------------- >> $backuplog
echo Date `date` >> $backuplog echo Date `date` >> $backuplog
echo done copy to disk of data >> $backuplog echo done copy to disk of data >> $backuplog
......
...@@ -6,23 +6,17 @@ ...@@ -6,23 +6,17 @@
#cd data #cd data
#cd ctd #cd ctd
set cruise = 'jc159' set cruise = dy113
cd ctd cd ctd
cd BOTTLE_SAL cd BOTTLE_SAL
foreach i (`ls /local/users/pstar/cruise/data/ctd/BOTTLE_SAL/sal_${cruise}_???.csv`) foreach i (`ls /local/users/pstar/cruise/data/ctd/BOTTLE_SAL/sal_${cruise}_??_??.csv`)
mac2unix -n $i ${i}_linux mac2unix -n $i ${i}_linux
echo " " >> ${i}_linux echo " " >> ${i}_linux
echo " " >> ${i}_linux # extra newline added by bak for dy040; may not be needed echo " " >> ${i}_linux # extra newline added by bak for dy040; may not be needed
end end
foreach i (`ls /local/users/pstar/cruise/data/ctd/BOTTLE_SAL/tsg_${cruise}_???.csv`)
mac2unix -n $i ${i}_linux
echo " " >> ${i}_linux
echo " " >> ${i}_linux
end
touch sal_${cruise}_01.csv touch sal_${cruise}_01.csv
/bin/rm sal_${cruise}_01.csv /bin/rm sal_${cruise}_01.csv
cat *linux >>! sal_${cruise}_01.csv cat *linux >>! sal_${cruise}_01.csv
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
cd /local/users/pstar/cruise/data/vmadcp/spprocessing cd /local/users/pstar/cruise/data/vmadcp/spprocessing
foreach i (`cat ~/cruise/data/vmadcp/cruise_segments`) foreach i (`cat /local/users/pstar/cruise/data/vmadcp/cruise_segments`)
echo linking ${i} to $1 echo linking ${i} to $1
link_uhdaslegs.py ../atsea/${i} $1 link_uhdaslegs.py ../atsea/${i} $1
end end
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
# List of cruise segments to be processed is found in # List of cruise segments to be processed is found in
# ~/cruise/data/vmadcp/cruise_segments # ~/cruise/data/vmadcp/cruise_segments
set rdir = ~/mounts/uhdas_data set rdir = /local/users/pstar/mounts/uhdas_data
set ldir = ~/cruise/data/vmadcp set ldir = /local/users/pstar/cruise/data/vmadcp
mkdir -p ${ldir}/atsea mkdir -p ${ldir}/atsea
mkdir -p ${ldir}/postprocessing mkdir -p ${ldir}/postprocessing
foreach i (`cat ~/cruise/data/vmadcp/cruise_segments`) foreach i (`cat ${ldir}/cruise_segments`)
echo syncing ${i} to ${ldir} echo syncing ${i} to ${ldir}
rsync -auv ${rdir}/${i} ${ldir}/atsea/ rsync -auv ${rdir}/${i} ${ldir}/atsea/
......
...@@ -14,11 +14,12 @@ ...@@ -14,11 +14,12 @@
# #
# List of cruise segments to be processed is found in # List of cruise segments to be processed is found in
# ~/cruise/data/vmadcp/cruise_segments # ~/cruise/data/vmadcp/cruise_segments
#
set ldir = ~/cruise/data/vmadcp set ldir = /local/users/pstar/cruise/data/vmadcp
foreach i (`cat ~/cruise/data/vmadcp/cruise_segments`) foreach i (`cat ${ldir}/cruise_segments`)
echo echo
echo echo
echo syncing echo syncing
......
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
# List of cruise segments to be processed is found in # List of cruise segments to be processed is found in
# ~/cruise/data/vmadcp/cruise_segments # ~/cruise/data/vmadcp/cruise_segments
# #
# ylf dy113 edited so you can specify additional calibrations to apply as
# input argument, in single quotes, e.g.
# uhdas_03 '--rotate_angle 0.59 --xducer_dx 4'
# make sure the bash environment is set up # make sure the bash environment is set up
source ~/.bashrc source ~/.bashrc
...@@ -61,8 +64,13 @@ done ...@@ -61,8 +64,13 @@ done
thisdir=`pwd` thisdir=`pwd`
echo quick_adcp.py in ${thisdir} echo quick_adcp.py in ${thisdir}
which quick_adcp.py which quick_adcp.py
quick_adcp.py --steps2rerun apply_edit:navsteps:calib --auto #quick_adcp.py --steps2rerun apply_edit:navsteps:calib --auto
echo applying calibrations ${1}
echo unless you removed proc_editing/${pingtype} directory before running uhdas_02
echo any calibrations will be double applied to first part of series
quick_adcp.py --steps2rerun rotate:apply_edit:navsteps:calib ${1} --auto #***
echo now edit or apply additional calibrations
popd popd
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment